@tanagram/lore 0.1.249 → 0.1.250
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -6
- 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 rot=Object.create;var uU=Object.defineProperty;var oot=Object.getOwnPropertyDescriptor;var iot=Object.getOwnPropertyNames;var sot=Object.getPrototypeOf,aot=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 k=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var M=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Xs=(e,t)=>{for(var n in t)uU(e,n,{get:t[n],enumerable:!0})},Sge=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of iot(t))!aot.call(e,o)&&o!==n&&uU(e,o,{get:()=>t[o],enumerable:!(r=oot(t,o))||r.enumerable});return e};var ue=(e,t,n)=>(n=e!=null?rot(sot(e)):{},Sge(t||!e||!e.__esModule?uU(n,"default",{value:e,enumerable:!0}):n,e)),Le=e=>Sge(uU({},"__esModule",{value:!0}),e);var m=k(()=>{(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.249"}}catch{}})()});var Ig,iV=k(()=>{m();Ig="1.9.1"});function uot(e){let t=new Set([e]),n=new Set,r=e.match(Ige);if(!r)return()=>!1;let o={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(o.prerelease!=null)return function(l){return l===e};function i(u){return n.add(u),!1}function s(u){return t.add(u),!0}return function(l){if(t.has(l))return!0;if(n.has(l))return!1;let f=l.match(Ige);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 Ige,Cge,vge=k(()=>{m();iV();Ige=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;Cge=uot(Ig)});function vm(e,t,n,r=!1){var o;let i=bw[Tw]=(o=bw[Tw])!==null&&o!==void 0?o:{version:Ig};if(!r&&i[e]){let s=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(s.stack||s.message),!1}if(i.version!==Ig){let s=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${Ig}`);return n.error(s.stack||s.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${Ig}.`),!0}function jl(e){var t,n;let r=(t=bw[Tw])===null||t===void 0?void 0:t.version;if(!(!r||!Cge(r)))return(n=bw[Tw])===null||n===void 0?void 0:n[e]}function Rm(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${Ig}.`);let n=bw[Tw];n&&delete n[e]}var cot,Tw,bw,lS=k(()=>{m();iV();vge();cot=Ig.split(".")[0],Tw=Symbol.for(`opentelemetry.js.api.${cot}`),bw=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function Iw(e,t,n){let r=jl("diag");if(r)return r[e](t,...n)}var cU,Rge=k(()=>{m();lS();cU=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return Iw("debug",this._namespace,t)}error(...t){return Iw("error",this._namespace,t)}info(...t){return Iw("info",this._namespace,t)}warn(...t){return Iw("warn",this._namespace,t)}verbose(...t){return Iw("verbose",this._namespace,t)}}});var xs,lU=k(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(xs||(xs={}))});function xge(e,t){e<xs.NONE?e=xs.NONE:e>xs.ALL&&(e=xs.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",xs.ERROR),warn:n("warn",xs.WARN),info:n("info",xs.INFO),debug:n("debug",xs.DEBUG),verbose:n("verbose",xs.VERBOSE)}}var Dge=k(()=>{m();lU()});var lot,ea,dS=k(()=>{m();Rge();Dge();lU();lS();lot="diag",ea=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let s=jl("diag");if(s)return s[o](...i)}}let n=this,r=(o,i={logLevel:xs.INFO})=>{var s,u,l;if(o===n){let _=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=_.stack)!==null&&s!==void 0?s:_.message),!1}typeof i=="number"&&(i={logLevel:i});let f=jl("diag"),h=xge((u=i.logLevel)!==null&&u!==void 0?u:xs.INFO,o);if(f&&!i.suppressOverrideMessage){let _=(l=new Error().stack)!==null&&l!==void 0?l:"<failed to generate stacktrace>";f.warn(`Current logger will be overwritten from ${_}`),h.warn(`Current logger will overwrite one already registered from ${_}`)}return vm("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{Rm(lot,n)},n.createComponentLogger=o=>new cU(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var dU,Nge=k(()=>{m();dU=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 wge,kge=k(()=>{m();wge=Symbol("BaggageEntryMetadata")});function Bge(e={}){return new dU(new Map(Object.entries(e)))}function Oge(e){return typeof e!="string"&&(dot.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:wge,toString(){return e}}}var dot,sV=k(()=>{m();dS();Nge();kge();dot=ea.instance()});function zl(e){return Symbol.for(e)}var aV,QC,Cw=k(()=>{m();aV=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}}},QC=new aV});var uV,cV,pU,Pge=k(()=>{m();uV=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],cV={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(cV[t]=console[t])}pU=class{constructor(){function t(n){return function(...r){let o=cV[n];if(typeof o!="function"&&(o=cV.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<uV.length;n++)this[uV[n].n]=t(uV[n].c)}}});function Mge(){return _V}var lV,FC,dV,pV,fV,mV,vw,AV,gV,hV,_V,pot,fot,mot,Aot,got,hot,_ot,EV=k(()=>{m();lV=class{constructor(){}createGauge(t,n){return fot}createHistogram(t,n){return mot}createCounter(t,n){return pot}createUpDownCounter(t,n){return Aot}createObservableGauge(t,n){return hot}createObservableCounter(t,n){return got}createObservableUpDownCounter(t,n){return _ot}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},FC=class{},dV=class extends FC{add(t,n){}},pV=class extends FC{add(t,n){}},fV=class extends FC{record(t,n){}},mV=class extends FC{record(t,n){}},vw=class{addCallback(t){}removeCallback(t){}},AV=class extends vw{},gV=class extends vw{},hV=class extends vw{},_V=new lV,pot=new dV,fot=new fV,mot=new mV,Aot=new pV,got=new AV,hot=new gV,_ot=new hV});var fU,Lge=k(()=>{m();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(fU||(fU={}))});var mU,AU,yV=k(()=>{m();mU={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},AU={set(e,t,n){e!=null&&(e[t]=n)}}});var gU,Uge=k(()=>{m();Cw();gU=class{active(){return QC}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var SV,Eot,xm,Rw=k(()=>{m();Uge();lS();dS();SV="context",Eot=new gU,xm=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return vm(SV,t,ea.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 jl(SV)||Eot}disable(){this._getContextManager().disable(),Rm(SV,ea.instance())}}});var ou,TV=k(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(ou||(ou={}))});var xw,pS,hU,_U=k(()=>{m();TV();xw="0000000000000000",pS="00000000000000000000000000000000",hU={traceId:pS,spanId:xw,traceFlags:ou.NONE}});var Dm,EU=k(()=>{m();_U();Dm=class{constructor(t=hU){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 yU(e){return e.getValue(bV)||void 0}function Qge(){return yU(xm.getInstance().active())}function Dw(e,t){return e.setValue(bV,t)}function Fge(e){return e.deleteValue(bV)}function Gge(e,t){return Dw(e,new Dm(t))}function SU(e){var t;return(t=yU(e))===null||t===void 0?void 0:t.spanContext()}var bV,IV=k(()=>{m();Cw();EU();Rw();bV=zl("OpenTelemetry Context Key SPAN")});function jge(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(TU[e.charCodeAt(r)]|0)+(TU[e.charCodeAt(r+1)]|0)+(TU[e.charCodeAt(r+2)]|0)+(TU[e.charCodeAt(r+3)]|0);return n===t}function CV(e){return jge(e,32)&&e!==pS}function vV(e){return jge(e,16)&&e!==xw}function Cg(e){return CV(e.traceId)&&vV(e.spanId)}function zge(e){return new Dm(e)}var TU,bU=k(()=>{m();_U();EU();TU=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 yot(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 RV,GC,xV=k(()=>{m();Rw();IV();EU();bU();RV=xm.getInstance(),GC=class{startSpan(t,n,r=RV.active()){if(!!n?.root)return new Dm;let i=r&&SU(r);return yot(i)&&Cg(i)?new Dm(i):new Dm}startActiveSpan(t,n,r,o){let i,s,u;if(arguments.length<2)return;arguments.length===2?u=n:arguments.length===3?(i=n,u=r):(i=n,s=r,u=o);let l=s??RV.active(),f=this.startSpan(t,i,l),h=Dw(l,f);return RV.with(h,u,void 0,f)}}});var Sot,jC,DV=k(()=>{m();xV();Sot=new GC,jC=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):Sot}}});var IU,Hge=k(()=>{m();xV();IU=class{getTracer(t,n,r){return new GC}}});var Tot,fS,NV=k(()=>{m();DV();Hge();Tot=new IU,fS=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new jC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Tot}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 CU,$ge=k(()=>{m();(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(CU||(CU={}))});var Ao,qge=k(()=>{m();(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(Ao||(Ao={}))});var hi,Vge=k(()=>{m();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(hi||(hi={}))});function Kge(e){return Cot.test(e)}function Yge(e){return vot.test(e)&&!Rot.test(e)}var wV,bot,Iot,Cot,vot,Rot,Jge=k(()=>{m();wV="[_0-9a-z-*/]",bot=`[a-z]${wV}{0,255}`,Iot=`[a-z0-9]${wV}{0,240}@[a-z]${wV}{0,13}`,Cot=new RegExp(`^(?:${bot}|${Iot})$`),vot=/^[ -~]{0,255}[!-~]$/,Rot=/,|=/});var Zge,xot,Wge,Xge,vU,ehe=k(()=>{m();Jge();Zge=32,xot=512,Wge=",",Xge="=",vU=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+Xge+this.get(n)),t),[]).join(Wge)}_parse(t){t.length>xot||(this._internalState=t.split(Wge).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(Xge);if(i!==-1){let s=o.slice(0,i),u=o.slice(i+1,r.length);Kge(s)&&Yge(u)&&n.set(s,u)}return n},new Map),this._internalState.size>Zge&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Zge))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function the(e){return new vU(e)}var nhe=k(()=>{m();ehe()});var Xe,rhe=k(()=>{m();Rw();Xe=xm.getInstance()});var Hl,ohe=k(()=>{m();dS();Hl=ea.instance()});var kV,ihe,she=k(()=>{m();EV();kV=class{getMeter(t,n,r){return _V}},ihe=new kV});var BV,RU,ahe=k(()=>{m();she();lS();dS();BV="metrics",RU=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return vm(BV,t,ea.instance())}getMeterProvider(){return jl(BV)||ihe}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){Rm(BV,ea.instance())}}});var OV,uhe=k(()=>{m();ahe();OV=RU.getInstance()});var xU,che=k(()=>{m();xU=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function MV(e){return e.getValue(PV)||void 0}function lhe(){return MV(xm.getInstance().active())}function dhe(e,t){return e.setValue(PV,t)}function phe(e){return e.deleteValue(PV)}var PV,fhe=k(()=>{m();Rw();Cw();PV=zl("OpenTelemetry Baggage Key")});var LV,Dot,DU,mhe=k(()=>{m();lS();che();yV();fhe();sV();dS();LV="propagation",Dot=new xU,DU=class e{constructor(){this.createBaggage=Bge,this.getBaggage=MV,this.getActiveBaggage=lhe,this.setBaggage=dhe,this.deleteBaggage=phe}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return vm(LV,t,ea.instance())}inject(t,n,r=AU){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=mU){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){Rm(LV,ea.instance())}_getGlobalPropagator(){return jl(LV)||Dot}}});var Af,Ahe=k(()=>{m();mhe();Af=DU.getInstance()});var UV,NU,ghe=k(()=>{m();lS();NV();bU();IV();dS();UV="trace",NU=class e{constructor(){this._proxyTracerProvider=new fS,this.wrapSpanContext=zge,this.isSpanContextValid=Cg,this.deleteSpan=Fge,this.getSpan=yU,this.getActiveSpan=Qge,this.getSpanContext=SU,this.setSpan=Dw,this.setSpanContext=Gge}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=vm(UV,this._proxyTracerProvider,ea.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return jl(UV)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){Rm(UV,ea.instance()),this._proxyTracerProvider=new fS}}});var Jt,hhe=k(()=>{m();ghe();Jt=NU.getInstance()});var nt={};Xs(nt,{DiagConsoleLogger:()=>pU,DiagLogLevel:()=>xs,INVALID_SPANID:()=>xw,INVALID_SPAN_CONTEXT:()=>hU,INVALID_TRACEID:()=>pS,ProxyTracer:()=>jC,ProxyTracerProvider:()=>fS,ROOT_CONTEXT:()=>QC,SamplingDecision:()=>CU,SpanKind:()=>Ao,SpanStatusCode:()=>hi,TraceFlags:()=>ou,ValueType:()=>fU,baggageEntryMetadataFromString:()=>Oge,context:()=>Xe,createContextKey:()=>zl,createNoopMeter:()=>Mge,createTraceState:()=>the,default:()=>Not,defaultTextMapGetter:()=>mU,defaultTextMapSetter:()=>AU,diag:()=>Hl,isSpanContextValid:()=>Cg,isValidSpanId:()=>vV,isValidTraceId:()=>CV,metrics:()=>OV,propagation:()=>Af,trace:()=>Jt});var Not,$e=k(()=>{m();sV();Cw();Pge();lU();EV();Lge();yV();DV();NV();$ge();qge();Vge();TV();nhe();bU();_U();rhe();ohe();uhe();Ahe();hhe();Not={context:Xe,diag:Hl,metrics:OV,propagation:Af,trace:Jt}});var Nw=M(D_=>{"use strict";m();Object.defineProperty(D_,"__esModule",{value:!0});D_.isTracingSuppressed=D_.unsuppressTracing=D_.suppressTracing=void 0;var wot=($e(),Le(nt)),QV=(0,wot.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function kot(e){return e.setValue(QV,!0)}D_.suppressTracing=kot;function Bot(e){return e.deleteValue(QV)}D_.unsuppressTracing=Bot;function Oot(e){return e.getValue(QV)===!0}D_.isTracingSuppressed=Oot});var FV=M(iu=>{"use strict";m();Object.defineProperty(iu,"__esModule",{value:!0});iu.BAGGAGE_MAX_TOTAL_LENGTH=iu.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=iu.BAGGAGE_MAX_NAME_VALUE_PAIRS=iu.BAGGAGE_HEADER=iu.BAGGAGE_ITEMS_SEPARATOR=iu.BAGGAGE_PROPERTIES_SEPARATOR=iu.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;iu.BAGGAGE_KEY_PAIR_SEPARATOR="=";iu.BAGGAGE_PROPERTIES_SEPARATOR=";";iu.BAGGAGE_ITEMS_SEPARATOR=",";iu.BAGGAGE_HEADER="baggage";iu.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;iu.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;iu.BAGGAGE_MAX_TOTAL_LENGTH=8192});var jV=M(Yd=>{"use strict";m();Object.defineProperty(Yd,"__esModule",{value:!0});Yd.parseKeyPairsIntoRecord=Yd.parseBaggageHeaderString=Yd.parsePairKeyValue=Yd.getKeyPairs=Yd.serializeKeyPairs=void 0;var Pot=($e(),Le(nt)),Nm=FV();function Mot(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?Nm.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>Nm.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}Yd.serializeKeyPairs=Mot;function Lot(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=Nm.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}Yd.getKeyPairs=Lot;function GV(e){if(!e)return;let t=e.indexOf(Nm.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(Nm.BAGGAGE_KEY_PAIR_SEPARATOR);if(r<=0)return;let o=n.substring(0,r).trim(),i=n.substring(r+1).trim();if(!o||!i)return;let s,u;try{s=decodeURIComponent(o),u=decodeURIComponent(i)}catch{return}let l;if(t!==-1&&t<e.length-1){let f=e.substring(t+1);l=(0,Pot.baggageEntryMetadataFromString)(f)}return{key:s,value:u,metadata:l}}Yd.parsePairKeyValue=GV;function Uot(e,t,n,r){let o=0;for(;o<e.length&&n<Nm.BAGGAGE_MAX_NAME_VALUE_PAIRS;){let i=e.indexOf(Nm.BAGGAGE_ITEMS_SEPARATOR,o),s=i===-1?e.length:i,u=s-o;if(u<=Nm.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS){let l=GV(e.substring(o,s));if(l){let f=(n===0?0:1)+u;if(r+f>Nm.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]}Yd.parseBaggageHeaderString=Uot;function Qot(e){let t={};return typeof e=="string"&&e.length>0&&e.split(Nm.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=GV(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}Yd.parseKeyPairsIntoRecord=Qot});var _he=M(kU=>{"use strict";m();Object.defineProperty(kU,"__esModule",{value:!0});kU.W3CBaggagePropagator=void 0;var zV=($e(),Le(nt)),Fot=Nw(),ww=FV(),wU=jV(),HV=class{inject(t,n,r){let o=zV.propagation.getBaggage(t);if(!o||(0,Fot.isTracingSuppressed)(t))return;let i=(0,wU.getKeyPairs)(o).filter(u=>u.length<=ww.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,ww.BAGGAGE_MAX_NAME_VALUE_PAIRS),s=(0,wU.serializeKeyPairs)(i);s.length>0&&r.set(n,ww.BAGGAGE_HEADER,s)}extract(t,n,r){let o=r.get(n,ww.BAGGAGE_HEADER);if(!o)return t;let i={},s=0,u=0;if(Array.isArray(o))for(let l=0;l<o.length;l++)[s,u]=(0,wU.parseBaggageHeaderString)(o[l],i,s,u);else[s]=(0,wU.parseBaggageHeaderString)(o,i,s,u);return s===0?t:zV.propagation.setBaggage(t,zV.propagation.createBaggage(i))}fields(){return[ww.BAGGAGE_HEADER]}};kU.W3CBaggagePropagator=HV});var Ehe=M(BU=>{"use strict";m();Object.defineProperty(BU,"__esModule",{value:!0});BU.AnchoredClock=void 0;var $V=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}};BU.AnchoredClock=$V});var Ihe=M(N_=>{"use strict";m();Object.defineProperty(N_,"__esModule",{value:!0});N_.isAttributeValue=N_.isAttributeKey=N_.sanitizeAttributes=void 0;var yhe=($e(),Le(nt));function Got(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(!She(n)){yhe.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!The(r)){yhe.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}N_.sanitizeAttributes=Got;function She(e){return typeof e=="string"&&e!==""}N_.isAttributeKey=She;function The(e){return e==null?!0:Array.isArray(e)?jot(e):bhe(typeof e)}N_.isAttributeValue=The;function jot(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(bhe(r)){t=r;continue}return!1}return!1}}return!0}function bhe(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var qV=M(OU=>{"use strict";m();Object.defineProperty(OU,"__esModule",{value:!0});OU.loggingErrorHandler=void 0;var zot=($e(),Le(nt));function Hot(){return e=>{zot.diag.error($ot(e))}}OU.loggingErrorHandler=Hot;function $ot(e){return typeof e=="string"?e:JSON.stringify(qot(e))}function qot(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 vhe=M(zC=>{"use strict";m();Object.defineProperty(zC,"__esModule",{value:!0});zC.globalErrorHandler=zC.setGlobalErrorHandler=void 0;var Vot=qV(),Che=(0,Vot.loggingErrorHandler)();function Kot(e){Che=e}zC.setGlobalErrorHandler=Kot;function Yot(e){try{Che(e)}catch{}}zC.globalErrorHandler=Yot});var Nhe=M(wm=>{"use strict";m();Object.defineProperty(wm,"__esModule",{value:!0});wm.getStringListFromEnv=wm.getBooleanFromEnv=wm.getStringFromEnv=wm.getNumberFromEnv=void 0;var Rhe=($e(),Le(nt)),xhe=Fe("util");function Jot(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){Rhe.diag.warn(`Unknown value ${(0,xhe.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}wm.getNumberFromEnv=Jot;function Dhe(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}wm.getStringFromEnv=Dhe;function Zot(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||Rhe.diag.warn(`Unknown value ${(0,xhe.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}wm.getBooleanFromEnv=Zot;function Wot(e){return Dhe(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}wm.getStringListFromEnv=Wot});var whe=M(PU=>{"use strict";m();Object.defineProperty(PU,"__esModule",{value:!0});PU._globalThis=void 0;PU._globalThis=globalThis});var khe=M(MU=>{"use strict";m();Object.defineProperty(MU,"__esModule",{value:!0});MU.VERSION=void 0;MU.VERSION="2.8.0"});function Li(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 VV=k(()=>{m()});var Bhe,Ohe,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,jhe,zhe,Hhe,$he,qhe,Vhe,Khe,Yhe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,s_e,a_e,u_e,c_e,l_e,d_e,p_e,f_e,m_e,A_e,g_e,h_e,__e,E_e,y_e,S_e,T_e,b_e,I_e,C_e,v_e,R_e,x_e,D_e,N_e,w_e,k_e,B_e,O_e,P_e,M_e,L_e,U_e,Q_e,F_e,G_e,j_e,z_e,H_e,$_e,q_e,V_e,K_e,Y_e,J_e,Z_e,W_e,X_e,eEe,tEe,nEe,rEe,oEe,iEe,sEe,aEe,uEe,cEe,lEe,dEe,pEe,fEe,mEe,AEe,gEe,hEe,_Ee,EEe,yEe,SEe,TEe,bEe,IEe,CEe,vEe,REe,xEe,DEe,NEe,wEe,kEe,BEe,OEe,PEe,MEe,LEe,UEe,QEe,FEe,GEe,jEe,zEe,HEe,$Ee,qEe,VEe,KEe,YEe,JEe,ZEe,WEe,Xot,KV,eit,tit,nit,rit,YV,oit,iit,sit,ait,uit,cit,lit,dit,pit,fit,mit,Ait,git,hit,_it,Eit,yit,Sit,JV,Tit,bit,Iit,Cit,vit,Rit,xit,Dit,Nit,wit,kit,Bit,ZV,Oit,Pit,WV,XV,Mit,Lit,Uit,Qit,Fit,Git,jit,zit,Hit,$it,qit,Vit,Kit,Yit,Jit,Zit,Wit,kw,HC,e7,Xit,est,mS,tst,nst,rst,ost,t7,n7,ist,r7,sst,ast,ust,cst,lst,dst,pst,fst,mst,Ast,gst,hst,_st,Est,yst,Sst,Tst,bst,Ist,Cst,vst,Rst,xst,o7,Dst,Nst,wst,kst,Bst,Ost,Pst,Mst,Lst,Ust,Qst,Fst,Gst,jst,zst,Hst,$st,qst,Vst,i7,Kst,s7,Yst,Jst,Zst,Wst,Xst,eat,tat,nat,rat,XEe,eye,tye,nye,rye,oye,iye,sye,aye,uye,cye,lye,dye,pye,fye,mye,Aye,gye,hye,_ye,Eye,yye,Sye,Tye,bye,Iye,Cye,vye,Rye,xye,Dye,Nye,wye,kye,Bye,Oye,Pye,Mye,Lye,Uye,Qye,Fye,Gye,jye,zye,Hye,$ye,oat,iat,sat,aat,uat,cat,lat,dat,pat,fat,mat,Aat,gat,hat,_at,Eat,yat,Sat,Tat,bat,Iat,Cat,vat,Rat,xat,Dat,Nat,wat,kat,Bat,Oat,Pat,Mat,Lat,Uat,Qat,Fat,Gat,jat,zat,Hat,$at,qat,Vat,Kat,Yat,Jat,Zat,qye,Vye,Kye,Yye,Jye,Zye,Wye,Xye,e0e,t0e,n0e,Wat,Xat,eut,tut,nut,rut,out,iut,sut,aut,uut,cut,r0e,o0e,i0e,s0e,a0e,lut,dut,put,fut,mut,Aut,u0e,c0e,l0e,gut,hut,_ut,Eut,d0e,p0e,f0e,m0e,yut,Sut,Tut,but,Iut,A0e,g0e,h0e,_0e,E0e,y0e,S0e,Cut,vut,Rut,xut,Dut,Nut,wut,kut,T0e,b0e,I0e,C0e,v0e,But,Out,Put,Mut,Lut,Uut,R0e,x0e,D0e,N0e,w0e,k0e,B0e,O0e,P0e,M0e,L0e,U0e,Q0e,F0e,G0e,j0e,z0e,H0e,$0e,q0e,V0e,Qut,Fut,Gut,jut,zut,Hut,$ut,qut,Vut,Kut,Yut,Jut,Zut,Wut,Xut,ect,tct,nct,rct,oct,ict,sct,K0e,Y0e,J0e,Z0e,W0e,act,uct,cct,lct,dct,pct,X0e,eSe,fct,mct,Act,tSe,nSe,gct,hct,_ct,rSe,oSe,iSe,sSe,aSe,uSe,cSe,lSe,dSe,pSe,fSe,mSe,ASe,gSe,hSe,_Se,ESe,Ect,yct,Sct,Tct,bct,Ict,Cct,vct,Rct,xct,Dct,Nct,wct,kct,Bct,Oct,Pct,Mct,ySe,SSe,Lct,Uct,Qct,TSe=k(()=>{m();VV();Bhe="aws.lambda.invoked_arn",Ohe="db.system",Phe="db.connection_string",Mhe="db.user",Lhe="db.jdbc.driver_classname",Uhe="db.name",Qhe="db.statement",Fhe="db.operation",Ghe="db.mssql.instance_name",jhe="db.cassandra.keyspace",zhe="db.cassandra.page_size",Hhe="db.cassandra.consistency_level",$he="db.cassandra.table",qhe="db.cassandra.idempotence",Vhe="db.cassandra.speculative_execution_count",Khe="db.cassandra.coordinator.id",Yhe="db.cassandra.coordinator.dc",Jhe="db.hbase.namespace",Zhe="db.redis.database_index",Whe="db.mongodb.collection",Xhe="db.sql.table",e_e="exception.type",t_e="exception.message",n_e="exception.stacktrace",r_e="exception.escaped",o_e="faas.trigger",i_e="faas.execution",s_e="faas.document.collection",a_e="faas.document.operation",u_e="faas.document.time",c_e="faas.document.name",l_e="faas.time",d_e="faas.cron",p_e="faas.coldstart",f_e="faas.invoked_name",m_e="faas.invoked_provider",A_e="faas.invoked_region",g_e="net.transport",h_e="net.peer.ip",__e="net.peer.port",E_e="net.peer.name",y_e="net.host.ip",S_e="net.host.port",T_e="net.host.name",b_e="net.host.connection.type",I_e="net.host.connection.subtype",C_e="net.host.carrier.name",v_e="net.host.carrier.mcc",R_e="net.host.carrier.mnc",x_e="net.host.carrier.icc",D_e="peer.service",N_e="enduser.id",w_e="enduser.role",k_e="enduser.scope",B_e="thread.id",O_e="thread.name",P_e="code.function",M_e="code.namespace",L_e="code.filepath",U_e="code.lineno",Q_e="http.method",F_e="http.url",G_e="http.target",j_e="http.host",z_e="http.scheme",H_e="http.status_code",$_e="http.flavor",q_e="http.user_agent",V_e="http.request_content_length",K_e="http.request_content_length_uncompressed",Y_e="http.response_content_length",J_e="http.response_content_length_uncompressed",Z_e="http.server_name",W_e="http.route",X_e="http.client_ip",eEe="aws.dynamodb.table_names",tEe="aws.dynamodb.consumed_capacity",nEe="aws.dynamodb.item_collection_metrics",rEe="aws.dynamodb.provisioned_read_capacity",oEe="aws.dynamodb.provisioned_write_capacity",iEe="aws.dynamodb.consistent_read",sEe="aws.dynamodb.projection",aEe="aws.dynamodb.limit",uEe="aws.dynamodb.attributes_to_get",cEe="aws.dynamodb.index_name",lEe="aws.dynamodb.select",dEe="aws.dynamodb.global_secondary_indexes",pEe="aws.dynamodb.local_secondary_indexes",fEe="aws.dynamodb.exclusive_start_table",mEe="aws.dynamodb.table_count",AEe="aws.dynamodb.scan_forward",gEe="aws.dynamodb.segment",hEe="aws.dynamodb.total_segments",_Ee="aws.dynamodb.count",EEe="aws.dynamodb.scanned_count",yEe="aws.dynamodb.attribute_definitions",SEe="aws.dynamodb.global_secondary_index_updates",TEe="messaging.system",bEe="messaging.destination",IEe="messaging.destination_kind",CEe="messaging.temp_destination",vEe="messaging.protocol",REe="messaging.protocol_version",xEe="messaging.url",DEe="messaging.message_id",NEe="messaging.conversation_id",wEe="messaging.message_payload_size_bytes",kEe="messaging.message_payload_compressed_size_bytes",BEe="messaging.operation",OEe="messaging.consumer_id",PEe="messaging.rabbitmq.routing_key",MEe="messaging.kafka.message_key",LEe="messaging.kafka.consumer_group",UEe="messaging.kafka.client_id",QEe="messaging.kafka.partition",FEe="messaging.kafka.tombstone",GEe="rpc.system",jEe="rpc.service",zEe="rpc.method",HEe="rpc.grpc.status_code",$Ee="rpc.jsonrpc.version",qEe="rpc.jsonrpc.request_id",VEe="rpc.jsonrpc.error_code",KEe="rpc.jsonrpc.error_message",YEe="message.type",JEe="message.id",ZEe="message.compressed_size",WEe="message.uncompressed_size",Xot=Bhe,KV=Ohe,eit=Phe,tit=Mhe,nit=Lhe,rit=Uhe,YV=Qhe,oit=Fhe,iit=Ghe,sit=jhe,ait=zhe,uit=Hhe,cit=$he,lit=qhe,dit=Vhe,pit=Khe,fit=Yhe,mit=Jhe,Ait=Zhe,git=Whe,hit=Xhe,_it=e_e,Eit=t_e,yit=n_e,Sit=r_e,JV=o_e,Tit=i_e,bit=s_e,Iit=a_e,Cit=u_e,vit=c_e,Rit=l_e,xit=d_e,Dit=p_e,Nit=f_e,wit=m_e,kit=A_e,Bit=g_e,ZV=h_e,Oit=__e,Pit=E_e,WV=y_e,XV=S_e,Mit=T_e,Lit=b_e,Uit=I_e,Qit=C_e,Fit=v_e,Git=R_e,jit=x_e,zit=D_e,Hit=N_e,$it=w_e,qit=k_e,Vit=B_e,Kit=O_e,Yit=P_e,Jit=M_e,Zit=L_e,Wit=U_e,kw=Q_e,HC=F_e,e7=G_e,Xit=j_e,est=z_e,mS=H_e,tst=$_e,nst=q_e,rst=V_e,ost=K_e,t7=Y_e,n7=J_e,ist=Z_e,r7=W_e,sst=X_e,ast=eEe,ust=tEe,cst=nEe,lst=rEe,dst=oEe,pst=iEe,fst=sEe,mst=aEe,Ast=uEe,gst=cEe,hst=lEe,_st=dEe,Est=pEe,yst=fEe,Sst=mEe,Tst=AEe,bst=gEe,Ist=hEe,Cst=_Ee,vst=EEe,Rst=yEe,xst=SEe,o7=TEe,Dst=bEe,Nst=IEe,wst=CEe,kst=vEe,Bst=REe,Ost=xEe,Pst=DEe,Mst=NEe,Lst=wEe,Ust=kEe,Qst=BEe,Fst=OEe,Gst=PEe,jst=MEe,zst=LEe,Hst=UEe,$st=QEe,qst=FEe,Vst=GEe,i7=jEe,Kst=zEe,s7=HEe,Yst=$Ee,Jst=qEe,Zst=VEe,Wst=KEe,Xst=YEe,eat=JEe,tat=ZEe,nat=WEe,rat=Li([Bhe,Ohe,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,jhe,zhe,Hhe,$he,qhe,Vhe,Khe,Yhe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,s_e,a_e,u_e,c_e,l_e,d_e,p_e,f_e,m_e,A_e,g_e,h_e,__e,E_e,y_e,S_e,T_e,b_e,I_e,C_e,v_e,R_e,x_e,D_e,N_e,w_e,k_e,B_e,O_e,P_e,M_e,L_e,U_e,Q_e,F_e,G_e,j_e,z_e,H_e,$_e,q_e,V_e,K_e,Y_e,J_e,Z_e,W_e,X_e,eEe,tEe,nEe,rEe,oEe,iEe,sEe,aEe,uEe,cEe,lEe,dEe,pEe,fEe,mEe,AEe,gEe,hEe,_Ee,EEe,yEe,SEe,TEe,bEe,IEe,CEe,vEe,REe,xEe,DEe,NEe,wEe,kEe,BEe,OEe,PEe,MEe,LEe,UEe,QEe,FEe,GEe,jEe,zEe,HEe,$Ee,qEe,VEe,KEe,YEe,JEe,ZEe,WEe]),XEe="other_sql",eye="mssql",tye="mysql",nye="oracle",rye="db2",oye="postgresql",iye="redshift",sye="hive",aye="cloudscape",uye="hsqldb",cye="progress",lye="maxdb",dye="hanadb",pye="ingres",fye="firstsql",mye="edb",Aye="cache",gye="adabas",hye="firebird",_ye="derby",Eye="filemaker",yye="informix",Sye="instantdb",Tye="interbase",bye="mariadb",Iye="netezza",Cye="pervasive",vye="pointbase",Rye="sqlite",xye="sybase",Dye="teradata",Nye="vertica",wye="h2",kye="coldfusion",Bye="cassandra",Oye="hbase",Pye="mongodb",Mye="redis",Lye="couchbase",Uye="couchdb",Qye="cosmosdb",Fye="dynamodb",Gye="neo4j",jye="geode",zye="elasticsearch",Hye="memcached",$ye="cockroachdb",oat=XEe,iat=eye,sat=tye,aat=nye,uat=rye,cat=oye,lat=iye,dat=sye,pat=aye,fat=uye,mat=cye,Aat=lye,gat=dye,hat=pye,_at=fye,Eat=mye,yat=Aye,Sat=gye,Tat=hye,bat=_ye,Iat=Eye,Cat=yye,vat=Sye,Rat=Tye,xat=bye,Dat=Iye,Nat=Cye,wat=vye,kat=Rye,Bat=xye,Oat=Dye,Pat=Nye,Mat=wye,Lat=kye,Uat=Bye,Qat=Oye,Fat=Pye,Gat=Mye,jat=Lye,zat=Uye,Hat=Qye,$at=Fye,qat=Gye,Vat=jye,Kat=zye,Yat=Hye,Jat=$ye,Zat=Li([XEe,eye,tye,nye,rye,oye,iye,sye,aye,uye,cye,lye,dye,pye,fye,mye,Aye,gye,hye,_ye,Eye,yye,Sye,Tye,bye,Iye,Cye,vye,Rye,xye,Dye,Nye,wye,kye,Bye,Oye,Pye,Mye,Lye,Uye,Qye,Fye,Gye,jye,zye,Hye,$ye]),qye="all",Vye="each_quorum",Kye="quorum",Yye="local_quorum",Jye="one",Zye="two",Wye="three",Xye="local_one",e0e="any",t0e="serial",n0e="local_serial",Wat=qye,Xat=Vye,eut=Kye,tut=Yye,nut=Jye,rut=Zye,out=Wye,iut=Xye,sut=e0e,aut=t0e,uut=n0e,cut=Li([qye,Vye,Kye,Yye,Jye,Zye,Wye,Xye,e0e,t0e,n0e]),r0e="datasource",o0e="http",i0e="pubsub",s0e="timer",a0e="other",lut=r0e,dut=o0e,put=i0e,fut=s0e,mut=a0e,Aut=Li([r0e,o0e,i0e,s0e,a0e]),u0e="insert",c0e="edit",l0e="delete",gut=u0e,hut=c0e,_ut=l0e,Eut=Li([u0e,c0e,l0e]),d0e="alibaba_cloud",p0e="aws",f0e="azure",m0e="gcp",yut=d0e,Sut=p0e,Tut=f0e,but=m0e,Iut=Li([d0e,p0e,f0e,m0e]),A0e="ip_tcp",g0e="ip_udp",h0e="ip",_0e="unix",E0e="pipe",y0e="inproc",S0e="other",Cut=A0e,vut=g0e,Rut=h0e,xut=_0e,Dut=E0e,Nut=y0e,wut=S0e,kut=Li([A0e,g0e,h0e,_0e,E0e,y0e,S0e]),T0e="wifi",b0e="wired",I0e="cell",C0e="unavailable",v0e="unknown",But=T0e,Out=b0e,Put=I0e,Mut=C0e,Lut=v0e,Uut=Li([T0e,b0e,I0e,C0e,v0e]),R0e="gprs",x0e="edge",D0e="umts",N0e="cdma",w0e="evdo_0",k0e="evdo_a",B0e="cdma2000_1xrtt",O0e="hsdpa",P0e="hsupa",M0e="hspa",L0e="iden",U0e="evdo_b",Q0e="lte",F0e="ehrpd",G0e="hspap",j0e="gsm",z0e="td_scdma",H0e="iwlan",$0e="nr",q0e="nrnsa",V0e="lte_ca",Qut=R0e,Fut=x0e,Gut=D0e,jut=N0e,zut=w0e,Hut=k0e,$ut=B0e,qut=O0e,Vut=P0e,Kut=M0e,Yut=L0e,Jut=U0e,Zut=Q0e,Wut=F0e,Xut=G0e,ect=j0e,tct=z0e,nct=H0e,rct=$0e,oct=q0e,ict=V0e,sct=Li([R0e,x0e,D0e,N0e,w0e,k0e,B0e,O0e,P0e,M0e,L0e,U0e,Q0e,F0e,G0e,j0e,z0e,H0e,$0e,q0e,V0e]),K0e="1.0",Y0e="1.1",J0e="2.0",Z0e="SPDY",W0e="QUIC",act=K0e,uct=Y0e,cct=J0e,lct=Z0e,dct=W0e,pct={HTTP_1_0:K0e,HTTP_1_1:Y0e,HTTP_2_0:J0e,SPDY:Z0e,QUIC:W0e},X0e="queue",eSe="topic",fct=X0e,mct=eSe,Act=Li([X0e,eSe]),tSe="receive",nSe="process",gct=tSe,hct=nSe,_ct=Li([tSe,nSe]),rSe=0,oSe=1,iSe=2,sSe=3,aSe=4,uSe=5,cSe=6,lSe=7,dSe=8,pSe=9,fSe=10,mSe=11,ASe=12,gSe=13,hSe=14,_Se=15,ESe=16,Ect=rSe,yct=oSe,Sct=iSe,Tct=sSe,bct=aSe,Ict=uSe,Cct=cSe,vct=lSe,Rct=dSe,xct=pSe,Dct=fSe,Nct=mSe,wct=ASe,kct=gSe,Bct=hSe,Oct=_Se,Pct=ESe,Mct={OK:rSe,CANCELLED:oSe,UNKNOWN:iSe,INVALID_ARGUMENT:sSe,DEADLINE_EXCEEDED:aSe,NOT_FOUND:uSe,ALREADY_EXISTS:cSe,PERMISSION_DENIED:lSe,RESOURCE_EXHAUSTED:dSe,FAILED_PRECONDITION:pSe,ABORTED:fSe,OUT_OF_RANGE:mSe,UNIMPLEMENTED:ASe,INTERNAL:gSe,UNAVAILABLE:hSe,DATA_LOSS:_Se,UNAUTHENTICATED:ESe},ySe="SENT",SSe="RECEIVED",Lct=ySe,Uct=SSe,Qct=Li([ySe,SSe])});var bSe=k(()=>{m();TSe()});var ISe,CSe,vSe,RSe,xSe,DSe,NSe,wSe,kSe,BSe,OSe,PSe,MSe,LSe,USe,QSe,FSe,GSe,jSe,zSe,HSe,$Se,qSe,VSe,KSe,YSe,JSe,ZSe,WSe,XSe,eTe,tTe,nTe,rTe,oTe,iTe,sTe,aTe,uTe,cTe,lTe,dTe,pTe,fTe,mTe,ATe,gTe,hTe,_Te,ETe,yTe,STe,TTe,bTe,ITe,CTe,vTe,RTe,xTe,DTe,NTe,wTe,kTe,BTe,OTe,PTe,MTe,LTe,UTe,QTe,FTe,GTe,jTe,zTe,HTe,$Te,qTe,VTe,KTe,YTe,JTe,Fct,Gct,jct,zct,Hct,$ct,qct,Vct,Kct,Yct,Jct,Zct,Wct,Xct,elt,tlt,nlt,rlt,olt,ilt,slt,alt,ult,clt,llt,dlt,plt,flt,mlt,Alt,glt,hlt,_lt,Elt,ylt,Slt,Tlt,blt,Ilt,Clt,vlt,Rlt,xlt,Dlt,Nlt,wlt,klt,Blt,Olt,Plt,Mlt,Llt,Ult,Qlt,Flt,Glt,jlt,zlt,Hlt,$lt,qlt,Vlt,Klt,Ylt,Jlt,Zlt,Wlt,Xlt,edt,tdt,ndt,a7,rdt,odt,idt,sdt,adt,udt,cdt,ldt,ddt,pdt,ZTe,WTe,XTe,ebe,fdt,mdt,Adt,gdt,hdt,tbe,nbe,rbe,obe,ibe,sbe,abe,ube,cbe,lbe,dbe,pbe,fbe,mbe,Abe,gbe,hbe,_dt,Edt,ydt,Sdt,Tdt,bdt,Idt,Cdt,vdt,Rdt,xdt,Ddt,Ndt,wdt,kdt,Bdt,Odt,Pdt,_be,Ebe,Mdt,Ldt,Udt,ybe,Sbe,Tbe,bbe,Ibe,Cbe,vbe,Qdt,Fdt,Gdt,jdt,zdt,Hdt,$dt,qdt,Rbe,xbe,Dbe,Nbe,wbe,kbe,Bbe,Obe,Pbe,Mbe,Lbe,Vdt,Kdt,Ydt,Jdt,Zdt,Wdt,Xdt,ept,tpt,npt,rpt,opt,Ube,Qbe,Fbe,Gbe,jbe,zbe,Hbe,$be,qbe,Vbe,ipt,spt,apt,upt,cpt,lpt,dpt,ppt,fpt,mpt,Apt,Kbe=k(()=>{m();VV();ISe="cloud.provider",CSe="cloud.account.id",vSe="cloud.region",RSe="cloud.availability_zone",xSe="cloud.platform",DSe="aws.ecs.container.arn",NSe="aws.ecs.cluster.arn",wSe="aws.ecs.launchtype",kSe="aws.ecs.task.arn",BSe="aws.ecs.task.family",OSe="aws.ecs.task.revision",PSe="aws.eks.cluster.arn",MSe="aws.log.group.names",LSe="aws.log.group.arns",USe="aws.log.stream.names",QSe="aws.log.stream.arns",FSe="container.name",GSe="container.id",jSe="container.runtime",zSe="container.image.name",HSe="container.image.tag",$Se="deployment.environment",qSe="device.id",VSe="device.model.identifier",KSe="device.model.name",YSe="faas.name",JSe="faas.id",ZSe="faas.version",WSe="faas.instance",XSe="faas.max_memory",eTe="host.id",tTe="host.name",nTe="host.type",rTe="host.arch",oTe="host.image.name",iTe="host.image.id",sTe="host.image.version",aTe="k8s.cluster.name",uTe="k8s.node.name",cTe="k8s.node.uid",lTe="k8s.namespace.name",dTe="k8s.pod.uid",pTe="k8s.pod.name",fTe="k8s.container.name",mTe="k8s.replicaset.uid",ATe="k8s.replicaset.name",gTe="k8s.deployment.uid",hTe="k8s.deployment.name",_Te="k8s.statefulset.uid",ETe="k8s.statefulset.name",yTe="k8s.daemonset.uid",STe="k8s.daemonset.name",TTe="k8s.job.uid",bTe="k8s.job.name",ITe="k8s.cronjob.uid",CTe="k8s.cronjob.name",vTe="os.type",RTe="os.description",xTe="os.name",DTe="os.version",NTe="process.pid",wTe="process.executable.name",kTe="process.executable.path",BTe="process.command",OTe="process.command_line",PTe="process.command_args",MTe="process.owner",LTe="process.runtime.name",UTe="process.runtime.version",QTe="process.runtime.description",FTe="service.name",GTe="service.namespace",jTe="service.instance.id",zTe="service.version",HTe="telemetry.sdk.name",$Te="telemetry.sdk.language",qTe="telemetry.sdk.version",VTe="telemetry.auto.version",KTe="webengine.name",YTe="webengine.version",JTe="webengine.description",Fct=ISe,Gct=CSe,jct=vSe,zct=RSe,Hct=xSe,$ct=DSe,qct=NSe,Vct=wSe,Kct=kSe,Yct=BSe,Jct=OSe,Zct=PSe,Wct=MSe,Xct=LSe,elt=USe,tlt=QSe,nlt=FSe,rlt=GSe,olt=jSe,ilt=zSe,slt=HSe,alt=$Se,ult=qSe,clt=VSe,llt=KSe,dlt=YSe,plt=JSe,flt=ZSe,mlt=WSe,Alt=XSe,glt=eTe,hlt=tTe,_lt=nTe,Elt=rTe,ylt=oTe,Slt=iTe,Tlt=sTe,blt=aTe,Ilt=uTe,Clt=cTe,vlt=lTe,Rlt=dTe,xlt=pTe,Dlt=fTe,Nlt=mTe,wlt=ATe,klt=gTe,Blt=hTe,Olt=_Te,Plt=ETe,Mlt=yTe,Llt=STe,Ult=TTe,Qlt=bTe,Flt=ITe,Glt=CTe,jlt=vTe,zlt=RTe,Hlt=xTe,$lt=DTe,qlt=NTe,Vlt=wTe,Klt=kTe,Ylt=BTe,Jlt=OTe,Zlt=PTe,Wlt=MTe,Xlt=LTe,edt=UTe,tdt=QTe,ndt=FTe,a7=GTe,rdt=jTe,odt=zTe,idt=HTe,sdt=$Te,adt=qTe,udt=VTe,cdt=KTe,ldt=YTe,ddt=JTe,pdt=Li([ISe,CSe,vSe,RSe,xSe,DSe,NSe,wSe,kSe,BSe,OSe,PSe,MSe,LSe,USe,QSe,FSe,GSe,jSe,zSe,HSe,$Se,qSe,VSe,KSe,YSe,JSe,ZSe,WSe,XSe,eTe,tTe,nTe,rTe,oTe,iTe,sTe,aTe,uTe,cTe,lTe,dTe,pTe,fTe,mTe,ATe,gTe,hTe,_Te,ETe,yTe,STe,TTe,bTe,ITe,CTe,vTe,RTe,xTe,DTe,NTe,wTe,kTe,BTe,OTe,PTe,MTe,LTe,UTe,QTe,FTe,GTe,jTe,zTe,HTe,$Te,qTe,VTe,KTe,YTe,JTe]),ZTe="alibaba_cloud",WTe="aws",XTe="azure",ebe="gcp",fdt=ZTe,mdt=WTe,Adt=XTe,gdt=ebe,hdt=Li([ZTe,WTe,XTe,ebe]),tbe="alibaba_cloud_ecs",nbe="alibaba_cloud_fc",rbe="aws_ec2",obe="aws_ecs",ibe="aws_eks",sbe="aws_lambda",abe="aws_elastic_beanstalk",ube="azure_vm",cbe="azure_container_instances",lbe="azure_aks",dbe="azure_functions",pbe="azure_app_service",fbe="gcp_compute_engine",mbe="gcp_cloud_run",Abe="gcp_kubernetes_engine",gbe="gcp_cloud_functions",hbe="gcp_app_engine",_dt=tbe,Edt=nbe,ydt=rbe,Sdt=obe,Tdt=ibe,bdt=sbe,Idt=abe,Cdt=ube,vdt=cbe,Rdt=lbe,xdt=dbe,Ddt=pbe,Ndt=fbe,wdt=mbe,kdt=Abe,Bdt=gbe,Odt=hbe,Pdt=Li([tbe,nbe,rbe,obe,ibe,sbe,abe,ube,cbe,lbe,dbe,pbe,fbe,mbe,Abe,gbe,hbe]),_be="ec2",Ebe="fargate",Mdt=_be,Ldt=Ebe,Udt=Li([_be,Ebe]),ybe="amd64",Sbe="arm32",Tbe="arm64",bbe="ia64",Ibe="ppc32",Cbe="ppc64",vbe="x86",Qdt=ybe,Fdt=Sbe,Gdt=Tbe,jdt=bbe,zdt=Ibe,Hdt=Cbe,$dt=vbe,qdt=Li([ybe,Sbe,Tbe,bbe,Ibe,Cbe,vbe]),Rbe="windows",xbe="linux",Dbe="darwin",Nbe="freebsd",wbe="netbsd",kbe="openbsd",Bbe="dragonflybsd",Obe="hpux",Pbe="aix",Mbe="solaris",Lbe="z_os",Vdt=Rbe,Kdt=xbe,Ydt=Dbe,Jdt=Nbe,Zdt=wbe,Wdt=kbe,Xdt=Bbe,ept=Obe,tpt=Pbe,npt=Mbe,rpt=Lbe,opt=Li([Rbe,xbe,Dbe,Nbe,wbe,kbe,Bbe,Obe,Pbe,Mbe,Lbe]),Ube="cpp",Qbe="dotnet",Fbe="erlang",Gbe="go",jbe="java",zbe="nodejs",Hbe="php",$be="python",qbe="ruby",Vbe="webjs",ipt=Ube,spt=Qbe,apt=Fbe,upt=Gbe,cpt=jbe,lpt=zbe,dpt=Hbe,ppt=$be,fpt=qbe,mpt=Vbe,Apt=Li([Ube,Qbe,Fbe,Gbe,jbe,zbe,Hbe,$be,qbe,Vbe])});var Ybe=k(()=>{m();Kbe()});var gpt,hpt,_pt,Ept,ypt,Spt,Tpt,bpt,Ipt,Cpt,vpt,Rpt,xpt,Dpt,Npt,wpt,kpt,Bpt,Opt,Ppt,Mpt,Lpt,Upt,Qpt,Fpt,u7,c7,Gpt,$C,jpt,l7,d7,zpt,AS,Hpt,$pt,qpt,Vpt,Kpt,Ypt,Jpt,Zpt,Rdn,xdn,p7,Wpt,Xpt,eft,tft,nft,rft,gS,oft,ift,sft,Ddn,aft,uft,cft,lft,Ndn,dft,pft,fft,mft,vg,Rg,Aft,gft,hft,_ft,Eft,yft,Sft,Tft,bft,wdn,Ift,Cft,vft,Rft,xft,Dft,f7,m7,Nft,A7,g7,wft,kft,kdn,Bdn,Bft,Oft,Pft,Mft,Lft,Uft,Qft,Fft,Odn,Gft,h7,_7,jft,E7,zft,y7,Hft,$ft,qft,Vft,Kft,Yft,Jft,Zft,Wft,Pdn,Xft,emt,Mdn,tmt,nmt,Ldn,rmt,omt,imt,smt,amt,umt,cmt,lmt,w_,dmt,pmt,fmt,S7,Jbe=k(()=>{m();gpt="aspnetcore.diagnostics.exception.result",hpt="aborted",_pt="handled",Ept="skipped",ypt="unhandled",Spt="aspnetcore.diagnostics.handler.type",Tpt="aspnetcore.rate_limiting.policy",bpt="aspnetcore.rate_limiting.result",Ipt="acquired",Cpt="endpoint_limiter",vpt="global_limiter",Rpt="request_canceled",xpt="aspnetcore.request.is_unhandled",Dpt="aspnetcore.routing.is_fallback",Npt="aspnetcore.routing.match_status",wpt="failure",kpt="success",Bpt="aspnetcore.user.is_authenticated",Opt="client.address",Ppt="client.port",Mpt="code.column.number",Lpt="code.file.path",Upt="code.function.name",Qpt="code.line.number",Fpt="code.stacktrace",u7="db.collection.name",c7="db.namespace",Gpt="db.operation.batch.size",$C="db.operation.name",jpt="db.query.summary",l7="db.query.text",d7="db.response.status_code",zpt="db.stored_procedure.name",AS="db.system.name",Hpt="mariadb",$pt="microsoft.sql_server",qpt="mysql",Vpt="postgresql",Kpt="dotnet.gc.heap.generation",Ypt="gen0",Jpt="gen1",Zpt="gen2",Rdn="loh",xdn="poh",p7="error.type",Wpt="_OTHER",Xpt="exception.escaped",eft="exception.message",tft="exception.stacktrace",nft="exception.type",rft=e=>`http.request.header.${e}`,gS="http.request.method",oft="_OTHER",ift="CONNECT",sft="DELETE",Ddn="GET",aft="HEAD",uft="OPTIONS",cft="PATCH",lft="POST",Ndn="PUT",dft="TRACE",pft="http.request.method_original",fft="http.request.resend_count",mft=e=>`http.response.header.${e}`,vg="http.response.status_code",Rg="http.route",Aft="jvm.gc.action",gft="jvm.gc.name",hft="jvm.memory.pool.name",_ft="jvm.memory.type",Eft="heap",yft="non_heap",Sft="jvm.thread.daemon",Tft="jvm.thread.state",bft="blocked",wdn="new",Ift="runnable",Cft="terminated",vft="timed_waiting",Rft="waiting",xft="network.local.address",Dft="network.local.port",f7="network.peer.address",m7="network.peer.port",Nft="network.protocol.name",A7="network.protocol.version",g7="network.transport",wft="pipe",kft="quic",kdn="tcp",Bdn="udp",Bft="unix",Oft="network.type",Pft="ipv4",Mft="ipv6",Lft="otel.scope.name",Uft="otel.scope.version",Qft="otel.status_code",Fft="ERROR",Odn="OK",Gft="otel.status_description",h7="server.address",_7="server.port",jft="service.instance.id",E7="service.name",zft="service.namespace",y7="service.version",Hft="signalr.connection.status",$ft="app_shutdown",qft="normal_closure",Vft="timeout",Kft="signalr.transport",Yft="long_polling",Jft="server_sent_events",Zft="web_sockets",Wft="telemetry.sdk.language",Pdn="cpp",Xft="dotnet",emt="erlang",Mdn="go",tmt="java",nmt="nodejs",Ldn="php",rmt="python",omt="ruby",imt="rust",smt="swift",amt="webjs",umt="telemetry.sdk.name",cmt="telemetry.sdk.version",lmt="url.fragment",w_="url.full",dmt="url.path",pmt="url.query",fmt="url.scheme",S7="user_agent.original"});var mmt,Amt,gmt,hmt,_mt,Emt,ymt,Smt,Tmt,bmt,Imt,Cmt,vmt,Rmt,xmt,Dmt,Nmt,wmt,kmt,Bmt,Omt,Pmt,Mmt,Lmt,Umt,Qmt,Fmt,Gmt,jmt,zmt,Hmt,$mt,qmt,Vmt,Kmt,Ymt,Jmt,Zmt,Wmt,Xmt,eAt,tAt,nAt,rAt,oAt,iAt,sAt,aAt,uAt,cAt,lAt,Zbe=k(()=>{m();mmt="aspnetcore.diagnostics.exceptions",Amt="aspnetcore.rate_limiting.active_request_leases",gmt="aspnetcore.rate_limiting.queued_requests",hmt="aspnetcore.rate_limiting.request.time_in_queue",_mt="aspnetcore.rate_limiting.request_lease.duration",Emt="aspnetcore.rate_limiting.requests",ymt="aspnetcore.routing.match_attempts",Smt="db.client.operation.duration",Tmt="dotnet.assembly.count",bmt="dotnet.exceptions",Imt="dotnet.gc.collections",Cmt="dotnet.gc.heap.total_allocated",vmt="dotnet.gc.last_collection.heap.fragmentation.size",Rmt="dotnet.gc.last_collection.heap.size",xmt="dotnet.gc.last_collection.memory.committed_size",Dmt="dotnet.gc.pause.time",Nmt="dotnet.jit.compilation.time",wmt="dotnet.jit.compiled_il.size",kmt="dotnet.jit.compiled_methods",Bmt="dotnet.monitor.lock_contentions",Omt="dotnet.process.cpu.count",Pmt="dotnet.process.cpu.time",Mmt="dotnet.process.memory.working_set",Lmt="dotnet.thread_pool.queue.length",Umt="dotnet.thread_pool.thread.count",Qmt="dotnet.thread_pool.work_item.count",Fmt="dotnet.timer.count",Gmt="http.client.request.duration",jmt="http.server.request.duration",zmt="jvm.class.count",Hmt="jvm.class.loaded",$mt="jvm.class.unloaded",qmt="jvm.cpu.count",Vmt="jvm.cpu.recent_utilization",Kmt="jvm.cpu.time",Ymt="jvm.gc.duration",Jmt="jvm.memory.committed",Zmt="jvm.memory.limit",Wmt="jvm.memory.used",Xmt="jvm.memory.used_after_last_gc",eAt="jvm.thread.count",tAt="kestrel.active_connections",nAt="kestrel.active_tls_handshakes",rAt="kestrel.connection.duration",oAt="kestrel.queued_connections",iAt="kestrel.queued_requests",sAt="kestrel.rejected_connections",aAt="kestrel.tls_handshake.duration",uAt="kestrel.upgraded_connections",cAt="signalr.server.active_connections",lAt="signalr.server.connection.duration"});var dAt,Wbe=k(()=>{m();dAt="exception"});var Kr={};Xs(Kr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>hpt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>_pt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>Ept,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>ypt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>Ipt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>Cpt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>vpt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>Rpt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>wpt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>kpt,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>gpt,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Spt,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Tpt,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>bpt,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>xpt,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>Dpt,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>Npt,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>Bpt,ATTR_CLIENT_ADDRESS:()=>Opt,ATTR_CLIENT_PORT:()=>Ppt,ATTR_CODE_COLUMN_NUMBER:()=>Mpt,ATTR_CODE_FILE_PATH:()=>Lpt,ATTR_CODE_FUNCTION_NAME:()=>Upt,ATTR_CODE_LINE_NUMBER:()=>Qpt,ATTR_CODE_STACKTRACE:()=>Fpt,ATTR_DB_COLLECTION_NAME:()=>u7,ATTR_DB_NAMESPACE:()=>c7,ATTR_DB_OPERATION_BATCH_SIZE:()=>Gpt,ATTR_DB_OPERATION_NAME:()=>$C,ATTR_DB_QUERY_SUMMARY:()=>jpt,ATTR_DB_QUERY_TEXT:()=>l7,ATTR_DB_RESPONSE_STATUS_CODE:()=>d7,ATTR_DB_STORED_PROCEDURE_NAME:()=>zpt,ATTR_DB_SYSTEM_NAME:()=>AS,ATTR_DOTNET_GC_HEAP_GENERATION:()=>Kpt,ATTR_ERROR_TYPE:()=>p7,ATTR_EXCEPTION_ESCAPED:()=>Xpt,ATTR_EXCEPTION_MESSAGE:()=>eft,ATTR_EXCEPTION_STACKTRACE:()=>tft,ATTR_EXCEPTION_TYPE:()=>nft,ATTR_HTTP_REQUEST_HEADER:()=>rft,ATTR_HTTP_REQUEST_METHOD:()=>gS,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>pft,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>fft,ATTR_HTTP_RESPONSE_HEADER:()=>mft,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>vg,ATTR_HTTP_ROUTE:()=>Rg,ATTR_JVM_GC_ACTION:()=>Aft,ATTR_JVM_GC_NAME:()=>gft,ATTR_JVM_MEMORY_POOL_NAME:()=>hft,ATTR_JVM_MEMORY_TYPE:()=>_ft,ATTR_JVM_THREAD_DAEMON:()=>Sft,ATTR_JVM_THREAD_STATE:()=>Tft,ATTR_NETWORK_LOCAL_ADDRESS:()=>xft,ATTR_NETWORK_LOCAL_PORT:()=>Dft,ATTR_NETWORK_PEER_ADDRESS:()=>f7,ATTR_NETWORK_PEER_PORT:()=>m7,ATTR_NETWORK_PROTOCOL_NAME:()=>Nft,ATTR_NETWORK_PROTOCOL_VERSION:()=>A7,ATTR_NETWORK_TRANSPORT:()=>g7,ATTR_NETWORK_TYPE:()=>Oft,ATTR_OTEL_SCOPE_NAME:()=>Lft,ATTR_OTEL_SCOPE_VERSION:()=>Uft,ATTR_OTEL_STATUS_CODE:()=>Qft,ATTR_OTEL_STATUS_DESCRIPTION:()=>Gft,ATTR_SERVER_ADDRESS:()=>h7,ATTR_SERVER_PORT:()=>_7,ATTR_SERVICE_INSTANCE_ID:()=>jft,ATTR_SERVICE_NAME:()=>E7,ATTR_SERVICE_NAMESPACE:()=>zft,ATTR_SERVICE_VERSION:()=>y7,ATTR_SIGNALR_CONNECTION_STATUS:()=>Hft,ATTR_SIGNALR_TRANSPORT:()=>Kft,ATTR_TELEMETRY_SDK_LANGUAGE:()=>Wft,ATTR_TELEMETRY_SDK_NAME:()=>umt,ATTR_TELEMETRY_SDK_VERSION:()=>cmt,ATTR_URL_FRAGMENT:()=>lmt,ATTR_URL_FULL:()=>w_,ATTR_URL_PATH:()=>dmt,ATTR_URL_QUERY:()=>pmt,ATTR_URL_SCHEME:()=>fmt,ATTR_USER_AGENT_ORIGINAL:()=>S7,AWSECSLAUNCHTYPEVALUES_EC2:()=>Mdt,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>Ldt,AwsEcsLaunchtypeValues:()=>Udt,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>_dt,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>Edt,CLOUDPLATFORMVALUES_AWS_EC2:()=>ydt,CLOUDPLATFORMVALUES_AWS_ECS:()=>Sdt,CLOUDPLATFORMVALUES_AWS_EKS:()=>Tdt,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>Idt,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>bdt,CLOUDPLATFORMVALUES_AZURE_AKS:()=>Rdt,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>Ddt,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>vdt,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>xdt,CLOUDPLATFORMVALUES_AZURE_VM:()=>Cdt,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>Odt,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>Bdt,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>wdt,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>Ndt,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>kdt,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>fdt,CLOUDPROVIDERVALUES_AWS:()=>mdt,CLOUDPROVIDERVALUES_AZURE:()=>Adt,CLOUDPROVIDERVALUES_GCP:()=>gdt,CloudPlatformValues:()=>Pdt,CloudProviderValues:()=>hdt,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>Wat,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>sut,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>Xat,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>iut,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>tut,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>uut,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>nut,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>eut,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>aut,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>out,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>rut,DBSYSTEMVALUES_ADABAS:()=>Sat,DBSYSTEMVALUES_CACHE:()=>yat,DBSYSTEMVALUES_CASSANDRA:()=>Uat,DBSYSTEMVALUES_CLOUDSCAPE:()=>pat,DBSYSTEMVALUES_COCKROACHDB:()=>Jat,DBSYSTEMVALUES_COLDFUSION:()=>Lat,DBSYSTEMVALUES_COSMOSDB:()=>Hat,DBSYSTEMVALUES_COUCHBASE:()=>jat,DBSYSTEMVALUES_COUCHDB:()=>zat,DBSYSTEMVALUES_DB2:()=>uat,DBSYSTEMVALUES_DERBY:()=>bat,DBSYSTEMVALUES_DYNAMODB:()=>$at,DBSYSTEMVALUES_EDB:()=>Eat,DBSYSTEMVALUES_ELASTICSEARCH:()=>Kat,DBSYSTEMVALUES_FILEMAKER:()=>Iat,DBSYSTEMVALUES_FIREBIRD:()=>Tat,DBSYSTEMVALUES_FIRSTSQL:()=>_at,DBSYSTEMVALUES_GEODE:()=>Vat,DBSYSTEMVALUES_H2:()=>Mat,DBSYSTEMVALUES_HANADB:()=>gat,DBSYSTEMVALUES_HBASE:()=>Qat,DBSYSTEMVALUES_HIVE:()=>dat,DBSYSTEMVALUES_HSQLDB:()=>fat,DBSYSTEMVALUES_INFORMIX:()=>Cat,DBSYSTEMVALUES_INGRES:()=>hat,DBSYSTEMVALUES_INSTANTDB:()=>vat,DBSYSTEMVALUES_INTERBASE:()=>Rat,DBSYSTEMVALUES_MARIADB:()=>xat,DBSYSTEMVALUES_MAXDB:()=>Aat,DBSYSTEMVALUES_MEMCACHED:()=>Yat,DBSYSTEMVALUES_MONGODB:()=>Fat,DBSYSTEMVALUES_MSSQL:()=>iat,DBSYSTEMVALUES_MYSQL:()=>sat,DBSYSTEMVALUES_NEO4J:()=>qat,DBSYSTEMVALUES_NETEZZA:()=>Dat,DBSYSTEMVALUES_ORACLE:()=>aat,DBSYSTEMVALUES_OTHER_SQL:()=>oat,DBSYSTEMVALUES_PERVASIVE:()=>Nat,DBSYSTEMVALUES_POINTBASE:()=>wat,DBSYSTEMVALUES_POSTGRESQL:()=>cat,DBSYSTEMVALUES_PROGRESS:()=>mat,DBSYSTEMVALUES_REDIS:()=>Gat,DBSYSTEMVALUES_REDSHIFT:()=>lat,DBSYSTEMVALUES_SQLITE:()=>kat,DBSYSTEMVALUES_SYBASE:()=>Bat,DBSYSTEMVALUES_TERADATA:()=>Oat,DBSYSTEMVALUES_VERTICA:()=>Pat,DB_SYSTEM_NAME_VALUE_MARIADB:()=>Hpt,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>$pt,DB_SYSTEM_NAME_VALUE_MYSQL:()=>qpt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>Vpt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>Ypt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>Jpt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>Zpt,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>Rdn,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>xdn,DbCassandraConsistencyLevelValues:()=>cut,DbSystemValues:()=>Zat,ERROR_TYPE_VALUE_OTHER:()=>Wpt,EVENT_EXCEPTION:()=>dAt,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>_ut,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>hut,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>gut,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>yut,FAASINVOKEDPROVIDERVALUES_AWS:()=>Sut,FAASINVOKEDPROVIDERVALUES_AZURE:()=>Tut,FAASINVOKEDPROVIDERVALUES_GCP:()=>but,FAASTRIGGERVALUES_DATASOURCE:()=>lut,FAASTRIGGERVALUES_HTTP:()=>dut,FAASTRIGGERVALUES_OTHER:()=>mut,FAASTRIGGERVALUES_PUBSUB:()=>put,FAASTRIGGERVALUES_TIMER:()=>fut,FaasDocumentOperationValues:()=>Eut,FaasInvokedProviderValues:()=>Iut,FaasTriggerValues:()=>Aut,HOSTARCHVALUES_AMD64:()=>Qdt,HOSTARCHVALUES_ARM32:()=>Fdt,HOSTARCHVALUES_ARM64:()=>Gdt,HOSTARCHVALUES_IA64:()=>jdt,HOSTARCHVALUES_PPC32:()=>zdt,HOSTARCHVALUES_PPC64:()=>Hdt,HOSTARCHVALUES_X86:()=>$dt,HTTPFLAVORVALUES_HTTP_1_0:()=>act,HTTPFLAVORVALUES_HTTP_1_1:()=>uct,HTTPFLAVORVALUES_HTTP_2_0:()=>cct,HTTPFLAVORVALUES_QUIC:()=>dct,HTTPFLAVORVALUES_SPDY:()=>lct,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>ift,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>sft,HTTP_REQUEST_METHOD_VALUE_GET:()=>Ddn,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>aft,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>uft,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>oft,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>cft,HTTP_REQUEST_METHOD_VALUE_POST:()=>lft,HTTP_REQUEST_METHOD_VALUE_PUT:()=>Ndn,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>dft,HostArchValues:()=>qdt,HttpFlavorValues:()=>pct,JVM_MEMORY_TYPE_VALUE_HEAP:()=>Eft,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>yft,JVM_THREAD_STATE_VALUE_BLOCKED:()=>bft,JVM_THREAD_STATE_VALUE_NEW:()=>wdn,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>Ift,JVM_THREAD_STATE_VALUE_TERMINATED:()=>Cft,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>vft,JVM_THREAD_STATE_VALUE_WAITING:()=>Rft,MESSAGETYPEVALUES_RECEIVED:()=>Uct,MESSAGETYPEVALUES_SENT:()=>Lct,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>fct,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>mct,MESSAGINGOPERATIONVALUES_PROCESS:()=>hct,MESSAGINGOPERATIONVALUES_RECEIVE:()=>gct,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>mmt,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>Amt,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>gmt,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>Emt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>_mt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>hmt,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>ymt,METRIC_DB_CLIENT_OPERATION_DURATION:()=>Smt,METRIC_DOTNET_ASSEMBLY_COUNT:()=>Tmt,METRIC_DOTNET_EXCEPTIONS:()=>bmt,METRIC_DOTNET_GC_COLLECTIONS:()=>Imt,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>Cmt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>vmt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>Rmt,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>xmt,METRIC_DOTNET_GC_PAUSE_TIME:()=>Dmt,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>Nmt,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>wmt,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>kmt,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>Bmt,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>Omt,METRIC_DOTNET_PROCESS_CPU_TIME:()=>Pmt,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>Mmt,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>Lmt,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>Umt,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>Qmt,METRIC_DOTNET_TIMER_COUNT:()=>Fmt,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>Gmt,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>jmt,METRIC_JVM_CLASS_COUNT:()=>zmt,METRIC_JVM_CLASS_LOADED:()=>Hmt,METRIC_JVM_CLASS_UNLOADED:()=>$mt,METRIC_JVM_CPU_COUNT:()=>qmt,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>Vmt,METRIC_JVM_CPU_TIME:()=>Kmt,METRIC_JVM_GC_DURATION:()=>Ymt,METRIC_JVM_MEMORY_COMMITTED:()=>Jmt,METRIC_JVM_MEMORY_LIMIT:()=>Zmt,METRIC_JVM_MEMORY_USED:()=>Wmt,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>Xmt,METRIC_JVM_THREAD_COUNT:()=>eAt,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>tAt,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>nAt,METRIC_KESTREL_CONNECTION_DURATION:()=>rAt,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>oAt,METRIC_KESTREL_QUEUED_REQUESTS:()=>iAt,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>sAt,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>aAt,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>uAt,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>cAt,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>lAt,MessageTypeValues:()=>Qct,MessagingDestinationKindValues:()=>Act,MessagingOperationValues:()=>_ct,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>jut,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>$ut,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>Fut,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>Wut,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>zut,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>Hut,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>Jut,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>Qut,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>ect,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>qut,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>Kut,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>Xut,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>Vut,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>Yut,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>nct,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>Zut,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>ict,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>rct,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>oct,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>tct,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>Gut,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>Put,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>Mut,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>Lut,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>But,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>Out,NETTRANSPORTVALUES_INPROC:()=>Nut,NETTRANSPORTVALUES_IP:()=>Rut,NETTRANSPORTVALUES_IP_TCP:()=>Cut,NETTRANSPORTVALUES_IP_UDP:()=>vut,NETTRANSPORTVALUES_OTHER:()=>wut,NETTRANSPORTVALUES_PIPE:()=>Dut,NETTRANSPORTVALUES_UNIX:()=>xut,NETWORK_TRANSPORT_VALUE_PIPE:()=>wft,NETWORK_TRANSPORT_VALUE_QUIC:()=>kft,NETWORK_TRANSPORT_VALUE_TCP:()=>kdn,NETWORK_TRANSPORT_VALUE_UDP:()=>Bdn,NETWORK_TRANSPORT_VALUE_UNIX:()=>Bft,NETWORK_TYPE_VALUE_IPV4:()=>Pft,NETWORK_TYPE_VALUE_IPV6:()=>Mft,NetHostConnectionSubtypeValues:()=>sct,NetHostConnectionTypeValues:()=>Uut,NetTransportValues:()=>kut,OSTYPEVALUES_AIX:()=>tpt,OSTYPEVALUES_DARWIN:()=>Ydt,OSTYPEVALUES_DRAGONFLYBSD:()=>Xdt,OSTYPEVALUES_FREEBSD:()=>Jdt,OSTYPEVALUES_HPUX:()=>ept,OSTYPEVALUES_LINUX:()=>Kdt,OSTYPEVALUES_NETBSD:()=>Zdt,OSTYPEVALUES_OPENBSD:()=>Wdt,OSTYPEVALUES_SOLARIS:()=>npt,OSTYPEVALUES_WINDOWS:()=>Vdt,OSTYPEVALUES_Z_OS:()=>rpt,OTEL_STATUS_CODE_VALUE_ERROR:()=>Fft,OTEL_STATUS_CODE_VALUE_OK:()=>Odn,OsTypeValues:()=>opt,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>Dct,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>Cct,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>yct,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>Oct,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>bct,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>xct,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>kct,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>Tct,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>Ict,RPCGRPCSTATUSCODEVALUES_OK:()=>Ect,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>Nct,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>vct,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>Rct,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>Pct,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>Bct,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>wct,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>Sct,RpcGrpcStatusCodeValues:()=>Mct,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>Ast,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>Rst,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>pst,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>ust,SEMATTRS_AWS_DYNAMODB_COUNT:()=>Cst,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>yst,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>_st,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>xst,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>gst,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>cst,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>mst,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>Est,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>fst,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>lst,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>dst,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>vst,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>Tst,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>bst,SEMATTRS_AWS_DYNAMODB_SELECT:()=>hst,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>Sst,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>ast,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>Ist,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>Xot,SEMATTRS_CODE_FILEPATH:()=>Zit,SEMATTRS_CODE_FUNCTION:()=>Yit,SEMATTRS_CODE_LINENO:()=>Wit,SEMATTRS_CODE_NAMESPACE:()=>Jit,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>uit,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>fit,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>pit,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>lit,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>sit,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>ait,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>dit,SEMATTRS_DB_CASSANDRA_TABLE:()=>cit,SEMATTRS_DB_CONNECTION_STRING:()=>eit,SEMATTRS_DB_HBASE_NAMESPACE:()=>mit,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>nit,SEMATTRS_DB_MONGODB_COLLECTION:()=>git,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>iit,SEMATTRS_DB_NAME:()=>rit,SEMATTRS_DB_OPERATION:()=>oit,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>Ait,SEMATTRS_DB_SQL_TABLE:()=>hit,SEMATTRS_DB_STATEMENT:()=>YV,SEMATTRS_DB_SYSTEM:()=>KV,SEMATTRS_DB_USER:()=>tit,SEMATTRS_ENDUSER_ID:()=>Hit,SEMATTRS_ENDUSER_ROLE:()=>$it,SEMATTRS_ENDUSER_SCOPE:()=>qit,SEMATTRS_EXCEPTION_ESCAPED:()=>Sit,SEMATTRS_EXCEPTION_MESSAGE:()=>Eit,SEMATTRS_EXCEPTION_STACKTRACE:()=>yit,SEMATTRS_EXCEPTION_TYPE:()=>_it,SEMATTRS_FAAS_COLDSTART:()=>Dit,SEMATTRS_FAAS_CRON:()=>xit,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>bit,SEMATTRS_FAAS_DOCUMENT_NAME:()=>vit,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>Iit,SEMATTRS_FAAS_DOCUMENT_TIME:()=>Cit,SEMATTRS_FAAS_EXECUTION:()=>Tit,SEMATTRS_FAAS_INVOKED_NAME:()=>Nit,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>wit,SEMATTRS_FAAS_INVOKED_REGION:()=>kit,SEMATTRS_FAAS_TIME:()=>Rit,SEMATTRS_FAAS_TRIGGER:()=>JV,SEMATTRS_HTTP_CLIENT_IP:()=>sst,SEMATTRS_HTTP_FLAVOR:()=>tst,SEMATTRS_HTTP_HOST:()=>Xit,SEMATTRS_HTTP_METHOD:()=>kw,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>rst,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>ost,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>t7,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>n7,SEMATTRS_HTTP_ROUTE:()=>r7,SEMATTRS_HTTP_SCHEME:()=>est,SEMATTRS_HTTP_SERVER_NAME:()=>ist,SEMATTRS_HTTP_STATUS_CODE:()=>mS,SEMATTRS_HTTP_TARGET:()=>e7,SEMATTRS_HTTP_URL:()=>HC,SEMATTRS_HTTP_USER_AGENT:()=>nst,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>tat,SEMATTRS_MESSAGE_ID:()=>eat,SEMATTRS_MESSAGE_TYPE:()=>Xst,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>nat,SEMATTRS_MESSAGING_CONSUMER_ID:()=>Fst,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>Mst,SEMATTRS_MESSAGING_DESTINATION:()=>Dst,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>Nst,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>Hst,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>zst,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>jst,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>$st,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>qst,SEMATTRS_MESSAGING_MESSAGE_ID:()=>Pst,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>Ust,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>Lst,SEMATTRS_MESSAGING_OPERATION:()=>Qst,SEMATTRS_MESSAGING_PROTOCOL:()=>kst,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>Bst,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>Gst,SEMATTRS_MESSAGING_SYSTEM:()=>o7,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>wst,SEMATTRS_MESSAGING_URL:()=>Ost,SEMATTRS_NET_HOST_CARRIER_ICC:()=>jit,SEMATTRS_NET_HOST_CARRIER_MCC:()=>Fit,SEMATTRS_NET_HOST_CARRIER_MNC:()=>Git,SEMATTRS_NET_HOST_CARRIER_NAME:()=>Qit,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>Uit,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>Lit,SEMATTRS_NET_HOST_IP:()=>WV,SEMATTRS_NET_HOST_NAME:()=>Mit,SEMATTRS_NET_HOST_PORT:()=>XV,SEMATTRS_NET_PEER_IP:()=>ZV,SEMATTRS_NET_PEER_NAME:()=>Pit,SEMATTRS_NET_PEER_PORT:()=>Oit,SEMATTRS_NET_TRANSPORT:()=>Bit,SEMATTRS_PEER_SERVICE:()=>zit,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>s7,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>Zst,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>Wst,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>Jst,SEMATTRS_RPC_JSONRPC_VERSION:()=>Yst,SEMATTRS_RPC_METHOD:()=>Kst,SEMATTRS_RPC_SERVICE:()=>i7,SEMATTRS_RPC_SYSTEM:()=>Vst,SEMATTRS_THREAD_ID:()=>Vit,SEMATTRS_THREAD_NAME:()=>Kit,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>qct,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>$ct,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>Vct,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>Kct,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>Yct,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>Jct,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>Zct,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>Xct,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>Wct,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>tlt,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>elt,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>Gct,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>zct,SEMRESATTRS_CLOUD_PLATFORM:()=>Hct,SEMRESATTRS_CLOUD_PROVIDER:()=>Fct,SEMRESATTRS_CLOUD_REGION:()=>jct,SEMRESATTRS_CONTAINER_ID:()=>rlt,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>ilt,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>slt,SEMRESATTRS_CONTAINER_NAME:()=>nlt,SEMRESATTRS_CONTAINER_RUNTIME:()=>olt,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>alt,SEMRESATTRS_DEVICE_ID:()=>ult,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>clt,SEMRESATTRS_DEVICE_MODEL_NAME:()=>llt,SEMRESATTRS_FAAS_ID:()=>plt,SEMRESATTRS_FAAS_INSTANCE:()=>mlt,SEMRESATTRS_FAAS_MAX_MEMORY:()=>Alt,SEMRESATTRS_FAAS_NAME:()=>dlt,SEMRESATTRS_FAAS_VERSION:()=>flt,SEMRESATTRS_HOST_ARCH:()=>Elt,SEMRESATTRS_HOST_ID:()=>glt,SEMRESATTRS_HOST_IMAGE_ID:()=>Slt,SEMRESATTRS_HOST_IMAGE_NAME:()=>ylt,SEMRESATTRS_HOST_IMAGE_VERSION:()=>Tlt,SEMRESATTRS_HOST_NAME:()=>hlt,SEMRESATTRS_HOST_TYPE:()=>_lt,SEMRESATTRS_K8S_CLUSTER_NAME:()=>blt,SEMRESATTRS_K8S_CONTAINER_NAME:()=>Dlt,SEMRESATTRS_K8S_CRONJOB_NAME:()=>Glt,SEMRESATTRS_K8S_CRONJOB_UID:()=>Flt,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>Llt,SEMRESATTRS_K8S_DAEMONSET_UID:()=>Mlt,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>Blt,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>klt,SEMRESATTRS_K8S_JOB_NAME:()=>Qlt,SEMRESATTRS_K8S_JOB_UID:()=>Ult,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>vlt,SEMRESATTRS_K8S_NODE_NAME:()=>Ilt,SEMRESATTRS_K8S_NODE_UID:()=>Clt,SEMRESATTRS_K8S_POD_NAME:()=>xlt,SEMRESATTRS_K8S_POD_UID:()=>Rlt,SEMRESATTRS_K8S_REPLICASET_NAME:()=>wlt,SEMRESATTRS_K8S_REPLICASET_UID:()=>Nlt,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>Plt,SEMRESATTRS_K8S_STATEFULSET_UID:()=>Olt,SEMRESATTRS_OS_DESCRIPTION:()=>zlt,SEMRESATTRS_OS_NAME:()=>Hlt,SEMRESATTRS_OS_TYPE:()=>jlt,SEMRESATTRS_OS_VERSION:()=>$lt,SEMRESATTRS_PROCESS_COMMAND:()=>Ylt,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>Zlt,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>Jlt,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>Vlt,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>Klt,SEMRESATTRS_PROCESS_OWNER:()=>Wlt,SEMRESATTRS_PROCESS_PID:()=>qlt,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>tdt,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>Xlt,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>edt,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>rdt,SEMRESATTRS_SERVICE_NAME:()=>ndt,SEMRESATTRS_SERVICE_NAMESPACE:()=>a7,SEMRESATTRS_SERVICE_VERSION:()=>odt,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>udt,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>sdt,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>idt,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>adt,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>ddt,SEMRESATTRS_WEBENGINE_NAME:()=>cdt,SEMRESATTRS_WEBENGINE_VERSION:()=>ldt,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>$ft,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>qft,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>Vft,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>Yft,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>Jft,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>Zft,SemanticAttributes:()=>rat,SemanticResourceAttributes:()=>pdt,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>ipt,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>spt,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>apt,TELEMETRYSDKLANGUAGEVALUES_GO:()=>upt,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>cpt,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>lpt,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>dpt,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>ppt,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>fpt,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>mpt,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>Pdn,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>Xft,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>emt,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>Mdn,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>tmt,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>nmt,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>Ldn,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>rmt,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>omt,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>imt,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>smt,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>amt,TelemetrySdkLanguageValues:()=>Apt});var tr=k(()=>{m();bSe();Ybe();Jbe();Zbe();Wbe()});var Xbe=M(LU=>{"use strict";m();Object.defineProperty(LU,"__esModule",{value:!0});LU.ATTR_PROCESS_RUNTIME_NAME=void 0;LU.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var eIe=M(QU=>{"use strict";m();Object.defineProperty(QU,"__esModule",{value:!0});QU.SDK_INFO=void 0;var pAt=khe(),UU=(tr(),Le(Kr)),fAt=Xbe();QU.SDK_INFO={[UU.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[fAt.ATTR_PROCESS_RUNTIME_NAME]:"node",[UU.ATTR_TELEMETRY_SDK_LANGUAGE]:UU.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[UU.ATTR_TELEMETRY_SDK_VERSION]:pAt.VERSION}});var tIe=M(su=>{"use strict";m();Object.defineProperty(su,"__esModule",{value:!0});su.otperformance=su.SDK_INFO=su._globalThis=su.getStringListFromEnv=su.getNumberFromEnv=su.getBooleanFromEnv=su.getStringFromEnv=void 0;var FU=Nhe();Object.defineProperty(su,"getStringFromEnv",{enumerable:!0,get:function(){return FU.getStringFromEnv}});Object.defineProperty(su,"getBooleanFromEnv",{enumerable:!0,get:function(){return FU.getBooleanFromEnv}});Object.defineProperty(su,"getNumberFromEnv",{enumerable:!0,get:function(){return FU.getNumberFromEnv}});Object.defineProperty(su,"getStringListFromEnv",{enumerable:!0,get:function(){return FU.getStringListFromEnv}});var mAt=whe();Object.defineProperty(su,"_globalThis",{enumerable:!0,get:function(){return mAt._globalThis}});var AAt=eIe();Object.defineProperty(su,"SDK_INFO",{enumerable:!0,get:function(){return AAt.SDK_INFO}});su.otperformance=performance});var T7=M(au=>{"use strict";m();Object.defineProperty(au,"__esModule",{value:!0});au.getStringListFromEnv=au.getNumberFromEnv=au.getStringFromEnv=au.getBooleanFromEnv=au.otperformance=au._globalThis=au.SDK_INFO=void 0;var hS=tIe();Object.defineProperty(au,"SDK_INFO",{enumerable:!0,get:function(){return hS.SDK_INFO}});Object.defineProperty(au,"_globalThis",{enumerable:!0,get:function(){return hS._globalThis}});Object.defineProperty(au,"otperformance",{enumerable:!0,get:function(){return hS.otperformance}});Object.defineProperty(au,"getBooleanFromEnv",{enumerable:!0,get:function(){return hS.getBooleanFromEnv}});Object.defineProperty(au,"getStringFromEnv",{enumerable:!0,get:function(){return hS.getStringFromEnv}});Object.defineProperty(au,"getNumberFromEnv",{enumerable:!0,get:function(){return hS.getNumberFromEnv}});Object.defineProperty(au,"getStringListFromEnv",{enumerable:!0,get:function(){return hS.getStringListFromEnv}})});var iIe=M(Yr=>{"use strict";m();Object.defineProperty(Yr,"__esModule",{value:!0});Yr.addHrTimes=Yr.isTimeInput=Yr.isTimeInputHrTime=Yr.hrTimeToSeconds=Yr.hrTimeToMilliseconds=Yr.hrTimeToMicroseconds=Yr.hrTimeToNanoseconds=Yr.hrTimeToTimeStamp=Yr.hrTimeDuration=Yr.timeInputToHrTime=Yr.hrTime=Yr.getTimeOrigin=Yr.millisToHrTime=void 0;var GU=T7(),nIe=9,gAt=6,hAt=Math.pow(10,gAt),Bw=Math.pow(10,nIe);function Ow(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*hAt);return[n,r]}Yr.millisToHrTime=Ow;function _At(){return GU.otperformance.timeOrigin}Yr.getTimeOrigin=_At;function rIe(e){let t=Ow(GU.otperformance.timeOrigin),n=Ow(typeof e=="number"?e:GU.otperformance.now());return oIe(t,n)}Yr.hrTime=rIe;function EAt(e){if(b7(e))return e;if(typeof e=="number")return e<GU.otperformance.timeOrigin?rIe(e):Ow(e);if(e instanceof Date)return Ow(e.getTime());throw TypeError("Invalid input type")}Yr.timeInputToHrTime=EAt;function yAt(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=Bw),[n,r]}Yr.hrTimeDuration=yAt;function SAt(e){let t=nIe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}Yr.hrTimeToTimeStamp=SAt;function TAt(e){return e[0]*Bw+e[1]}Yr.hrTimeToNanoseconds=TAt;function bAt(e){return e[0]*1e6+e[1]/1e3}Yr.hrTimeToMicroseconds=bAt;function IAt(e){return e[0]*1e3+e[1]/1e6}Yr.hrTimeToMilliseconds=IAt;function CAt(e){return e[0]+e[1]/Bw}Yr.hrTimeToSeconds=CAt;function b7(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}Yr.isTimeInputHrTime=b7;function vAt(e){return b7(e)||typeof e=="number"||e instanceof Date}Yr.isTimeInput=vAt;function oIe(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Bw&&(n[1]-=Bw,n[0]+=1),n}Yr.addHrTimes=oIe});var sIe=M(jU=>{"use strict";m();Object.defineProperty(jU,"__esModule",{value:!0});jU.unrefTimer=void 0;function RAt(e){typeof e!="number"&&e.unref()}jU.unrefTimer=RAt});var aIe=M(Pw=>{"use strict";m();Object.defineProperty(Pw,"__esModule",{value:!0});Pw.ExportResultCode=void 0;var xAt;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(xAt=Pw.ExportResultCode||(Pw.ExportResultCode={}))});var cIe=M(zU=>{"use strict";m();Object.defineProperty(zU,"__esModule",{value:!0});zU.CompositePropagator=void 0;var uIe=($e(),Le(nt)),I7=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){uIe.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){uIe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${s.message}`)}return o},t)}fields(){return this._fields.slice()}};zU.CompositePropagator=I7});var lIe=M(qC=>{"use strict";m();Object.defineProperty(qC,"__esModule",{value:!0});qC.validateValue=qC.validateKey=void 0;var C7="[_0-9a-z-*/]",DAt=`[a-z]${C7}{0,255}`,NAt=`[a-z0-9]${C7}{0,240}@[a-z]${C7}{0,13}`,wAt=new RegExp(`^(?:${DAt}|${NAt})$`),kAt=/^[ -~]{0,255}[!-~]$/,BAt=/,|=/;function OAt(e){return wAt.test(e)}qC.validateKey=OAt;function PAt(e){return kAt.test(e)&&!BAt.test(e)}qC.validateValue=PAt});var R7=M($U=>{"use strict";m();Object.defineProperty($U,"__esModule",{value:!0});$U.TraceState=void 0;var HU=lIe(),MAt=32,dIe=512,pIe=",",fIe="=",v7=class e{_length;_rawTraceState;_internalState;constructor(t){this._rawTraceState=typeof t=="string"?t:"",this._length=this._rawTraceState.length}set(t,n){if(!(0,HU.validateKey)(t)||!(0,HU.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>dIe)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=pIe+t),t=`${r[0]}${fIe}${r[1]}`+t,n++;return t}_getState(){if(this._internalState)return this._internalState;let t=this._rawTraceState.split(pIe),n=new Map,r=0;for(let o of t){let i=o.trim(),s=i.indexOf(fIe);if(s===-1)continue;let u=i.slice(0,s),l=i.slice(s+1);if(!(0,HU.validateKey)(u)||!(0,HU.validateValue)(l))continue;let f=r+i.length+(n.size>0?1:0);if(!(f>dIe)&&(n.set(u,l),r=f,n.size>=MAt))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}};$U.TraceState=v7});var AIe=M(uu=>{"use strict";m();Object.defineProperty(uu,"__esModule",{value:!0});uu.W3CTraceContextPropagator=uu.parseTraceParent=uu.TRACE_STATE_HEADER=uu.TRACE_PARENT_HEADER=void 0;var qU=($e(),Le(nt)),LAt=Nw(),UAt=R7();uu.TRACE_PARENT_HEADER="traceparent";uu.TRACE_STATE_HEADER="tracestate";var QAt="00",FAt="(?!ff)[\\da-f]{2}",GAt="(?![0]{32})[\\da-f]{32}",jAt="(?![0]{16})[\\da-f]{16}",zAt="[\\da-f]{2}",HAt=new RegExp(`^\\s?(${FAt})-(${GAt})-(${jAt})-(${zAt})(-.*)?\\s?$`);function mIe(e){let t=HAt.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}uu.parseTraceParent=mIe;var x7=class{inject(t,n,r){let o=qU.trace.getSpanContext(t);if(!o||(0,LAt.isTracingSuppressed)(t)||!(0,qU.isSpanContextValid)(o))return;let i=`${QAt}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||qU.TraceFlags.NONE).toString(16)}`;r.set(n,uu.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,uu.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,uu.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let s=mIe(i);if(!s)return t;s.isRemote=!0;let u=r.get(n,uu.TRACE_STATE_HEADER);if(u){let l=Array.isArray(u)?u.join(","):u;s.traceState=new UAt.TraceState(typeof l=="string"?l:void 0)}return qU.trace.setSpanContext(t,s)}fields(){return[uu.TRACE_PARENT_HEADER,uu.TRACE_STATE_HEADER]}};uu.W3CTraceContextPropagator=x7});var gIe=M(gf=>{"use strict";m();Object.defineProperty(gf,"__esModule",{value:!0});gf.getRPCMetadata=gf.deleteRPCMetadata=gf.setRPCMetadata=gf.RPCType=void 0;var $At=($e(),Le(nt)),D7=(0,$At.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),qAt;(function(e){e.HTTP="http"})(qAt=gf.RPCType||(gf.RPCType={}));function VAt(e,t){return e.setValue(D7,t)}gf.setRPCMetadata=VAt;function KAt(e){return e.deleteValue(D7)}gf.deleteRPCMetadata=KAt;function YAt(e){return e.getValue(D7)}gf.getRPCMetadata=YAt});var SIe=M(VU=>{"use strict";m();Object.defineProperty(VU,"__esModule",{value:!0});VU.isPlainObject=void 0;var JAt="[object Object]",ZAt="[object Null]",WAt="[object Undefined]",XAt=Function.prototype,hIe=XAt.toString,egt=hIe.call(Object),tgt=Object.getPrototypeOf,_Ie=Object.prototype,EIe=_Ie.hasOwnProperty,_S=Symbol?Symbol.toStringTag:void 0,yIe=_Ie.toString;function ngt(e){if(!rgt(e)||ogt(e)!==JAt)return!1;let t=tgt(e);if(t===null)return!0;let n=EIe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&hIe.call(n)===egt}VU.isPlainObject=ngt;function rgt(e){return e!=null&&typeof e=="object"}function ogt(e){return e==null?e===void 0?WAt:ZAt:_S&&_S in Object(e)?igt(e):sgt(e)}function igt(e){let t=EIe.call(e,_S),n=e[_S],r=!1;try{e[_S]=void 0,r=!0}catch{}let o=yIe.call(e);return r&&(t?e[_S]=n:delete e[_S]),o}function sgt(e){return yIe.call(e)}});var vIe=M(JU=>{"use strict";m();Object.defineProperty(JU,"__esModule",{value:!0});JU.merge=void 0;var TIe=SIe(),agt=20;function ugt(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=IIe(t,e.shift(),0,n);return t}JU.merge=ugt;function N7(e){return YU(e)?e.slice():e}function IIe(e,t,n=0,r){let o;if(!(n>agt)){if(n++,KU(e)||KU(t)||CIe(t))o=N7(t);else if(YU(e)){if(o=e.slice(),YU(t))for(let i=0,s=t.length;i<s;i++)o.push(N7(t[i]));else if(Mw(t)){let i=Object.keys(t);for(let s=0,u=i.length;s<u;s++){let l=i[s];l==="__proto__"||l==="constructor"||l==="prototype"||(o[l]=N7(t[l]))}}}else if(Mw(e))if(Mw(t)){if(!cgt(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let s=0,u=i.length;s<u;s++){let l=i[s];if(l==="__proto__"||l==="constructor"||l==="prototype")continue;let f=t[l];if(KU(f))typeof f>"u"?delete o[l]:o[l]=f;else{let h=o[l],_=f;if(bIe(e,l,r)||bIe(t,l,r))delete o[l];else{if(Mw(h)&&Mw(_)){let E=r.get(h)||[],T=r.get(_)||[];E.push({obj:e,key:l}),T.push({obj:t,key:l}),r.set(h,E),r.set(_,T)}o[l]=IIe(o[l],f,n,r)}}}}else o=t;return o}}function bIe(e,t,n){let r=n.get(e[t])||[];for(let o=0,i=r.length;o<i;o++){let s=r[o];if(s.key===t&&s.obj===e)return!0}return!1}function YU(e){return Array.isArray(e)}function CIe(e){return typeof e=="function"}function Mw(e){return!KU(e)&&!YU(e)&&!CIe(e)&&typeof e=="object"}function KU(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function cgt(e,t){return!(!(0,TIe.isPlainObject)(e)||!(0,TIe.isPlainObject)(t))}});var RIe=M(VC=>{"use strict";m();Object.defineProperty(VC,"__esModule",{value:!0});VC.callWithTimeout=VC.TimeoutError=void 0;var ZU=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};VC.TimeoutError=ZU;function lgt(e,t){let n,r=new Promise(function(i,s){n=setTimeout(function(){s(new ZU("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}VC.callWithTimeout=lgt});var DIe=M(KC=>{"use strict";m();Object.defineProperty(KC,"__esModule",{value:!0});KC.isUrlIgnored=KC.urlMatches=void 0;function xIe(e,t){return typeof t=="string"?e===t:!!e.match(t)}KC.urlMatches=xIe;function dgt(e,t){if(!t)return!1;for(let n of t)if(xIe(e,n))return!0;return!1}KC.isUrlIgnored=dgt});var NIe=M(WU=>{"use strict";m();Object.defineProperty(WU,"__esModule",{value:!0});WU.Deferred=void 0;var w7=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)}};WU.Deferred=w7});var wIe=M(XU=>{"use strict";m();Object.defineProperty(XU,"__esModule",{value:!0});XU.BindOnceFuture=void 0;var pgt=NIe(),k7=class{_isCalled=!1;_deferred=new pgt.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}};XU.BindOnceFuture=k7});var BIe=M(eQ=>{"use strict";m();Object.defineProperty(eQ,"__esModule",{value:!0});eQ.diagLogLevelFromString=void 0;var xg=($e(),Le(nt)),kIe={ALL:xg.DiagLogLevel.ALL,VERBOSE:xg.DiagLogLevel.VERBOSE,DEBUG:xg.DiagLogLevel.DEBUG,INFO:xg.DiagLogLevel.INFO,WARN:xg.DiagLogLevel.WARN,ERROR:xg.DiagLogLevel.ERROR,NONE:xg.DiagLogLevel.NONE};function fgt(e){if(e==null)return;let t=kIe[e.toUpperCase()];return t??(xg.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(kIe)}, using default`),xg.DiagLogLevel.INFO)}eQ.diagLogLevelFromString=fgt});var PIe=M(tQ=>{"use strict";m();Object.defineProperty(tQ,"__esModule",{value:!0});tQ._export=void 0;var OIe=($e(),Le(nt)),mgt=Nw();function Agt(e,t){return new Promise(n=>{OIe.context.with((0,mgt.suppressTracing)(OIe.context.active()),()=>{e.export(t,n)})})}tQ._export=Agt});var Rr=M(ke=>{"use strict";m();Object.defineProperty(ke,"__esModule",{value:!0});ke.diagLogLevelFromString=ke.BindOnceFuture=ke.urlMatches=ke.isUrlIgnored=ke.callWithTimeout=ke.TimeoutError=ke.merge=ke.TraceState=ke.unsuppressTracing=ke.suppressTracing=ke.isTracingSuppressed=ke.setRPCMetadata=ke.getRPCMetadata=ke.deleteRPCMetadata=ke.RPCType=ke.parseTraceParent=ke.W3CTraceContextPropagator=ke.TRACE_STATE_HEADER=ke.TRACE_PARENT_HEADER=ke.CompositePropagator=ke.otperformance=ke.getStringListFromEnv=ke.getNumberFromEnv=ke.getBooleanFromEnv=ke.getStringFromEnv=ke._globalThis=ke.SDK_INFO=ke.parseKeyPairsIntoRecord=ke.ExportResultCode=ke.unrefTimer=ke.timeInputToHrTime=ke.millisToHrTime=ke.isTimeInputHrTime=ke.isTimeInput=ke.hrTimeToTimeStamp=ke.hrTimeToSeconds=ke.hrTimeToNanoseconds=ke.hrTimeToMilliseconds=ke.hrTimeToMicroseconds=ke.hrTimeDuration=ke.hrTime=ke.getTimeOrigin=ke.addHrTimes=ke.loggingErrorHandler=ke.setGlobalErrorHandler=ke.globalErrorHandler=ke.sanitizeAttributes=ke.isAttributeValue=ke.AnchoredClock=ke.W3CBaggagePropagator=void 0;ke.internal=void 0;var ggt=_he();Object.defineProperty(ke,"W3CBaggagePropagator",{enumerable:!0,get:function(){return ggt.W3CBaggagePropagator}});var hgt=Ehe();Object.defineProperty(ke,"AnchoredClock",{enumerable:!0,get:function(){return hgt.AnchoredClock}});var MIe=Ihe();Object.defineProperty(ke,"isAttributeValue",{enumerable:!0,get:function(){return MIe.isAttributeValue}});Object.defineProperty(ke,"sanitizeAttributes",{enumerable:!0,get:function(){return MIe.sanitizeAttributes}});var LIe=vhe();Object.defineProperty(ke,"globalErrorHandler",{enumerable:!0,get:function(){return LIe.globalErrorHandler}});Object.defineProperty(ke,"setGlobalErrorHandler",{enumerable:!0,get:function(){return LIe.setGlobalErrorHandler}});var _gt=qV();Object.defineProperty(ke,"loggingErrorHandler",{enumerable:!0,get:function(){return _gt.loggingErrorHandler}});var $l=iIe();Object.defineProperty(ke,"addHrTimes",{enumerable:!0,get:function(){return $l.addHrTimes}});Object.defineProperty(ke,"getTimeOrigin",{enumerable:!0,get:function(){return $l.getTimeOrigin}});Object.defineProperty(ke,"hrTime",{enumerable:!0,get:function(){return $l.hrTime}});Object.defineProperty(ke,"hrTimeDuration",{enumerable:!0,get:function(){return $l.hrTimeDuration}});Object.defineProperty(ke,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return $l.hrTimeToMicroseconds}});Object.defineProperty(ke,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return $l.hrTimeToMilliseconds}});Object.defineProperty(ke,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return $l.hrTimeToNanoseconds}});Object.defineProperty(ke,"hrTimeToSeconds",{enumerable:!0,get:function(){return $l.hrTimeToSeconds}});Object.defineProperty(ke,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return $l.hrTimeToTimeStamp}});Object.defineProperty(ke,"isTimeInput",{enumerable:!0,get:function(){return $l.isTimeInput}});Object.defineProperty(ke,"isTimeInputHrTime",{enumerable:!0,get:function(){return $l.isTimeInputHrTime}});Object.defineProperty(ke,"millisToHrTime",{enumerable:!0,get:function(){return $l.millisToHrTime}});Object.defineProperty(ke,"timeInputToHrTime",{enumerable:!0,get:function(){return $l.timeInputToHrTime}});var Egt=sIe();Object.defineProperty(ke,"unrefTimer",{enumerable:!0,get:function(){return Egt.unrefTimer}});var ygt=aIe();Object.defineProperty(ke,"ExportResultCode",{enumerable:!0,get:function(){return ygt.ExportResultCode}});var Sgt=jV();Object.defineProperty(ke,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Sgt.parseKeyPairsIntoRecord}});var ES=T7();Object.defineProperty(ke,"SDK_INFO",{enumerable:!0,get:function(){return ES.SDK_INFO}});Object.defineProperty(ke,"_globalThis",{enumerable:!0,get:function(){return ES._globalThis}});Object.defineProperty(ke,"getStringFromEnv",{enumerable:!0,get:function(){return ES.getStringFromEnv}});Object.defineProperty(ke,"getBooleanFromEnv",{enumerable:!0,get:function(){return ES.getBooleanFromEnv}});Object.defineProperty(ke,"getNumberFromEnv",{enumerable:!0,get:function(){return ES.getNumberFromEnv}});Object.defineProperty(ke,"getStringListFromEnv",{enumerable:!0,get:function(){return ES.getStringListFromEnv}});Object.defineProperty(ke,"otperformance",{enumerable:!0,get:function(){return ES.otperformance}});var Tgt=cIe();Object.defineProperty(ke,"CompositePropagator",{enumerable:!0,get:function(){return Tgt.CompositePropagator}});var nQ=AIe();Object.defineProperty(ke,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return nQ.TRACE_PARENT_HEADER}});Object.defineProperty(ke,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return nQ.TRACE_STATE_HEADER}});Object.defineProperty(ke,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return nQ.W3CTraceContextPropagator}});Object.defineProperty(ke,"parseTraceParent",{enumerable:!0,get:function(){return nQ.parseTraceParent}});var rQ=gIe();Object.defineProperty(ke,"RPCType",{enumerable:!0,get:function(){return rQ.RPCType}});Object.defineProperty(ke,"deleteRPCMetadata",{enumerable:!0,get:function(){return rQ.deleteRPCMetadata}});Object.defineProperty(ke,"getRPCMetadata",{enumerable:!0,get:function(){return rQ.getRPCMetadata}});Object.defineProperty(ke,"setRPCMetadata",{enumerable:!0,get:function(){return rQ.setRPCMetadata}});var B7=Nw();Object.defineProperty(ke,"isTracingSuppressed",{enumerable:!0,get:function(){return B7.isTracingSuppressed}});Object.defineProperty(ke,"suppressTracing",{enumerable:!0,get:function(){return B7.suppressTracing}});Object.defineProperty(ke,"unsuppressTracing",{enumerable:!0,get:function(){return B7.unsuppressTracing}});var bgt=R7();Object.defineProperty(ke,"TraceState",{enumerable:!0,get:function(){return bgt.TraceState}});var Igt=vIe();Object.defineProperty(ke,"merge",{enumerable:!0,get:function(){return Igt.merge}});var UIe=RIe();Object.defineProperty(ke,"TimeoutError",{enumerable:!0,get:function(){return UIe.TimeoutError}});Object.defineProperty(ke,"callWithTimeout",{enumerable:!0,get:function(){return UIe.callWithTimeout}});var QIe=DIe();Object.defineProperty(ke,"isUrlIgnored",{enumerable:!0,get:function(){return QIe.isUrlIgnored}});Object.defineProperty(ke,"urlMatches",{enumerable:!0,get:function(){return QIe.urlMatches}});var Cgt=wIe();Object.defineProperty(ke,"BindOnceFuture",{enumerable:!0,get:function(){return Cgt.BindOnceFuture}});var vgt=BIe();Object.defineProperty(ke,"diagLogLevelFromString",{enumerable:!0,get:function(){return vgt.diagLogLevelFromString}});var Rgt=PIe();ke.internal={_export:Rgt._export}});var FIe=M(oQ=>{"use strict";m();Object.defineProperty(oQ,"__esModule",{value:!0});oQ.VERSION=void 0;oQ.VERSION="0.214.0"});var GIe=M(Lw=>{"use strict";m();Object.defineProperty(Lw,"__esModule",{value:!0});Lw.SeverityNumber=void 0;var xgt;(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"})(xgt=Lw.SeverityNumber||(Lw.SeverityNumber={}))});var sQ=M(YC=>{"use strict";m();Object.defineProperty(YC,"__esModule",{value:!0});YC.NOOP_LOGGER=YC.NoopLogger=void 0;var iQ=class{emit(t){}};YC.NoopLogger=iQ;YC.NOOP_LOGGER=new iQ});var jIe=M(km=>{"use strict";m();Object.defineProperty(km,"__esModule",{value:!0});km.API_BACKWARDS_COMPATIBILITY_VERSION=km.makeGetter=km._global=km.GLOBAL_LOGS_API_KEY=void 0;km.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");km._global=globalThis;function Dgt(e,t,n){return r=>r===e?t:n}km.makeGetter=Dgt;km.API_BACKWARDS_COMPATIBILITY_VERSION=1});var O7=M(JC=>{"use strict";m();Object.defineProperty(JC,"__esModule",{value:!0});JC.NOOP_LOGGER_PROVIDER=JC.NoopLoggerProvider=void 0;var Ngt=sQ(),aQ=class{getLogger(t,n,r){return new Ngt.NoopLogger}};JC.NoopLoggerProvider=aQ;JC.NOOP_LOGGER_PROVIDER=new aQ});var zIe=M(uQ=>{"use strict";m();Object.defineProperty(uQ,"__esModule",{value:!0});uQ.ProxyLogger=void 0;var wgt=sQ(),P7=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):wgt.NOOP_LOGGER}};uQ.ProxyLogger=P7});var HIe=M(cQ=>{"use strict";m();Object.defineProperty(cQ,"__esModule",{value:!0});cQ.ProxyLoggerProvider=void 0;var kgt=O7(),Bgt=zIe(),M7=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Bgt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:kgt.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)}};cQ.ProxyLoggerProvider=M7});var qIe=M(lQ=>{"use strict";m();Object.defineProperty(lQ,"__esModule",{value:!0});lQ.LogsAPI=void 0;var Jd=jIe(),Ogt=O7(),$Ie=HIe(),L7=class e{constructor(){this._proxyLoggerProvider=new $Ie.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Jd._global[Jd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Jd._global[Jd.GLOBAL_LOGS_API_KEY]=(0,Jd.makeGetter)(Jd.API_BACKWARDS_COMPATIBILITY_VERSION,t,Ogt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Jd._global[Jd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Jd._global,Jd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Jd._global[Jd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new $Ie.ProxyLoggerProvider}};lQ.LogsAPI=L7});var U7=M(Bm=>{"use strict";m();Object.defineProperty(Bm,"__esModule",{value:!0});Bm.logs=Bm.NoopLogger=Bm.NOOP_LOGGER=Bm.SeverityNumber=void 0;var Pgt=GIe();Object.defineProperty(Bm,"SeverityNumber",{enumerable:!0,get:function(){return Pgt.SeverityNumber}});var VIe=sQ();Object.defineProperty(Bm,"NOOP_LOGGER",{enumerable:!0,get:function(){return VIe.NOOP_LOGGER}});Object.defineProperty(Bm,"NoopLogger",{enumerable:!0,get:function(){return VIe.NoopLogger}});var Mgt=qIe();Bm.logs=Mgt.LogsAPI.getInstance()});var KIe=M(ZC=>{"use strict";m();Object.defineProperty(ZC,"__esModule",{value:!0});ZC.disableInstrumentations=ZC.enableInstrumentations=void 0;function Lgt(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()}}ZC.enableInstrumentations=Lgt;function Ugt(e){e.forEach(t=>t.disable())}ZC.disableInstrumentations=Ugt});var ZIe=M(dQ=>{"use strict";m();Object.defineProperty(dQ,"__esModule",{value:!0});dQ.registerInstrumentations=void 0;var YIe=($e(),Le(nt)),Qgt=U7(),JIe=KIe();function Fgt(e){let t=e.tracerProvider||YIe.trace.getTracerProvider(),n=e.meterProvider||YIe.metrics.getMeterProvider(),r=e.loggerProvider||Qgt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,JIe.enableInstrumentations)(o,t,n,r),()=>{(0,JIe.disableInstrumentations)(o)}}dQ.registerInstrumentations=Fgt});var sCe=M(pQ=>{"use strict";m();Object.defineProperty(pQ,"__esModule",{value:!0});pQ.satisfies=void 0;var j7=($e(),Le(nt)),nCe=/^(?: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-]+)*))?$/,Ggt=/^(?<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-]+)*))?$/,jgt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function zgt(e,t,n){if(!Hgt(e))return j7.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=Kgt(e);if(!r)return!1;let o=[],i=rCe(r,t,o,n);return i&&!n?.includePrerelease?qgt(r,o):i}pQ.satisfies=zgt;function Hgt(e){return typeof e=="string"&&nCe.test(e)}function rCe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(Q7(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Aht(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!Q7(e,i,n,r))return!1;return!0}return Q7(e,t,n,r)}function Q7(e,t,n,r){if(t=Vgt(t,r),t.includes(" "))return rCe(e,t,n,r);{let o=Ygt(t);return n.push(o),$gt(e,o)}}function $gt(e,t){if(t.invalid)return!1;if(!t.version||G7(t.version))return!0;let n=XIe(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=XIe(r,o)}return jgt[t.op]?.includes(n)}function qgt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Vgt(e,t){return e=e.trim(),e=fht(e,t),e=pht(e),e=mht(e,t),e=e.trim(),e}function $u(e){return!e||e.toLowerCase()==="x"||e==="*"}function Kgt(e){let t=e.match(nCe);if(!t){j7.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 Ygt(e){if(!e)return{};let t=e.match(Ggt);if(!t)return j7.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,s=r.split("."),u=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:o,prereleaseSegments:u,prereleaseSegmentCount:u?u.length:0,build:i}}function G7(e){return e==="*"||e==="x"||e==="X"}function WIe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function Jgt(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 Zgt(e,t){if(G7(e)||G7(t))return 0;let[n,r]=Jgt(WIe(e),WIe(t));return n>r?1:n<r?-1:0}function XIe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=Zgt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var oCe="[a-zA-Z0-9-]",iCe="0|[1-9]\\d*",Wgt=`\\d*[a-zA-Z-]${oCe}*`,Xgt="((?:<|>)?=?)",eCe=`(?:${iCe}|${Wgt})`,eht=`(?:-(${eCe}(?:\\.${eCe})*))`,tCe=`${oCe}+`,tht=`(?:\\+(${tCe}(?:\\.${tCe})*))`,F7=`${iCe}|x|X|\\*`,Uw=`[v=\\s]*(${F7})(?:\\.(${F7})(?:\\.(${F7})(?:${eht})?${tht}?)?)?`,nht=`^${Xgt}\\s*${Uw}$`,rht=new RegExp(nht),oht=`^\\s*(${Uw})\\s+-\\s+(${Uw})\\s*$`,iht=new RegExp(oht),sht="(?:~>?)",aht=`^${sht}${Uw}$`,uht=new RegExp(aht),cht="(?:\\^)",lht=`^${cht}${Uw}$`,dht=new RegExp(lht);function pht(e){let t=uht;return e.replace(t,(n,r,o,i,s)=>{let u;return $u(r)?u="":$u(o)?u=`>=${r}.0.0 <${+r+1}.0.0-0`:$u(i)?u=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:s?u=`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:u=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,u})}function fht(e,t){let n=dht,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,u,l)=>{let f;return $u(i)?f="":$u(s)?f=`>=${i}.0.0${r} <${+i+1}.0.0-0`:$u(u)?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}.${u}-${l} <${i}.${s}.${+u+1}-0`:f=`>=${i}.${s}.${u}-${l} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${u}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?f=`>=${i}.${s}.${u}${r} <${i}.${s}.${+u+1}-0`:f=`>=${i}.${s}.${u}${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${u} <${+i+1}.0.0-0`,f})}function mht(e,t){let n=rht;return e.replace(n,(r,o,i,s,u,l)=>{let f=$u(i),h=f||$u(s),_=h||$u(u),E=_;return o==="="&&E&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&E?(h&&(s=0),u=0,o===">"?(o=">=",h?(i=+i+1,s=0,u=0):(s=+s+1,u=0)):o==="<="&&(o="<",h?i=+i+1:s=+s+1),o==="<"&&(l="-0"),r=`${o+i}.${s}.${u}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:_&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function Aht(e,t){let n=iht;return e.replace(n,(r,o,i,s,u,l,f,h,_,E,T,v)=>($u(i)?o="":$u(s)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:$u(u)?o=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,$u(_)?h="":$u(E)?h=`<${+_+1}.0.0-0`:$u(T)?h=`<${_}.${+E+1}.0-0`:v?h=`<=${_}.${E}.${T}-${v}`:t?.includePrerelease?h=`<${_}.${E}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var z7=M(Na=>{"use strict";m();Object.defineProperty(Na,"__esModule",{value:!0});Na.massUnwrap=Na.unwrap=Na.massWrap=Na.wrap=void 0;var qu=console.error.bind(console);function Qw(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 ght=(e,t,n)=>{if(!e||!e[t]){qu("no original function "+String(t)+" to wrap");return}if(!n){qu("no wrapper function"),qu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){qu("original object and wrapper must be functions");return}let o=n(r,t);return Qw(o,"__original",r),Qw(o,"__unwrap",()=>{e[t]===o&&Qw(e,t,r)}),Qw(o,"__wrapped",!0),Qw(e,t,o),o};Na.wrap=ght;var hht=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{qu("must provide one or more modules to patch"),qu(new Error().stack);return}if(!(t&&Array.isArray(t))){qu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Na.wrap)(r,o,n)})})};Na.massWrap=hht;var _ht=(e,t)=>{if(!e||!e[t]){qu("no function to unwrap."),qu(new Error().stack);return}let n=e[t];if(!n.__unwrap)qu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Na.unwrap=_ht;var Eht=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{qu("must provide one or more modules to patch"),qu(new Error().stack);return}if(!(t&&Array.isArray(t))){qu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Na.unwrap)(n,r)})})};Na.massUnwrap=Eht;function Fw(e){e&&e.logger&&(typeof e.logger!="function"?qu("new logger isn't a function, not replacing"):qu=e.logger)}Na.default=Fw;Fw.wrap=Na.wrap;Fw.massWrap=Na.massWrap;Fw.unwrap=Na.unwrap;Fw.massUnwrap=Na.massUnwrap});var aCe=M(mQ=>{"use strict";m();Object.defineProperty(mQ,"__esModule",{value:!0});mQ.InstrumentationAbstract=void 0;var H7=($e(),Le(nt)),yht=U7(),fQ=z7(),$7=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=H7.diag.createComponentLogger({namespace:t}),this._tracer=H7.trace.getTracer(t,n),this._meter=H7.metrics.getMeter(t,n),this._logger=yht.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=fQ.wrap;_unwrap=fQ.unwrap;_massWrap=fQ.massWrap;_massUnwrap=fQ.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)}}};mQ.InstrumentationAbstract=$7});var cCe=M((pfn,uCe)=>{m();var WC=1e3,XC=WC*60,ev=XC*60,yS=ev*24,Sht=yS*7,Tht=yS*365.25;uCe.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return bht(e);if(n==="number"&&isFinite(e))return t.long?Cht(e):Iht(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function bht(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*Tht;case"weeks":case"week":case"w":return n*Sht;case"days":case"day":case"d":return n*yS;case"hours":case"hour":case"hrs":case"hr":case"h":return n*ev;case"minutes":case"minute":case"mins":case"min":case"m":return n*XC;case"seconds":case"second":case"secs":case"sec":case"s":return n*WC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Iht(e){var t=Math.abs(e);return t>=yS?Math.round(e/yS)+"d":t>=ev?Math.round(e/ev)+"h":t>=XC?Math.round(e/XC)+"m":t>=WC?Math.round(e/WC)+"s":e+"ms"}function Cht(e){var t=Math.abs(e);return t>=yS?AQ(e,t,yS,"day"):t>=ev?AQ(e,t,ev,"hour"):t>=XC?AQ(e,t,XC,"minute"):t>=WC?AQ(e,t,WC,"second"):e+" ms"}function AQ(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var q7=M((mfn,lCe)=>{m();function vht(e){n.debug=n,n.default=n,n.coerce=l,n.disable=s,n.enable=o,n.enabled=u,n.humanize=cCe(),n.destroy=f,Object.keys(e).forEach(h=>{n[h]=e[h]}),n.names=[],n.skips=[],n.formatters={};function t(h){let _=0;for(let E=0;E<h.length;E++)_=(_<<5)-_+h.charCodeAt(E),_|=0;return n.colors[Math.abs(_)%n.colors.length]}n.selectColor=t;function n(h){let _,E=null,T,v;function R(...x){if(!R.enabled)return;let B=R,P=Number(new Date),G=P-(_||P);B.diff=G,B.prev=_,B.curr=P,_=P,x[0]=n.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let j=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(V,oe)=>{if(V==="%%")return"%";j++;let te=n.formatters[oe];if(typeof te=="function"){let le=x[j];V=te.call(B,le),x.splice(j,1),j--}return V}),n.formatArgs.call(B,x),(B.log||n.log).apply(B,x)}return R.namespace=h,R.useColors=n.useColors(),R.color=n.selectColor(h),R.extend=r,R.destroy=n.destroy,Object.defineProperty(R,"enabled",{enumerable:!0,configurable:!1,get:()=>E!==null?E:(T!==n.namespaces&&(T=n.namespaces,v=n.enabled(h)),v),set:x=>{E=x}}),typeof n.init=="function"&&n.init(R),R}function r(h,_){let E=n(this.namespace+(typeof _>"u"?":":_)+h);return E.log=this.log,E}function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let _=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let E of _)E[0]==="-"?n.skips.push(E.slice(1)):n.names.push(E)}function i(h,_){let E=0,T=0,v=-1,R=0;for(;E<h.length;)if(T<_.length&&(_[T]===h[E]||_[T]==="*"))_[T]==="*"?(v=T,R=E,T++):(E++,T++);else if(v!==-1)T=v+1,R++,E=R;else return!1;for(;T<_.length&&_[T]==="*";)T++;return T===_.length}function s(){let h=[...n.names,...n.skips.map(_=>"-"+_)].join(",");return n.enable(""),h}function u(h){for(let _ of n.skips)if(i(h,_))return!1;for(let _ of n.names)if(i(h,_))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}lCe.exports=vht});var dCe=M((jc,gQ)=>{m();jc.formatArgs=xht;jc.save=Dht;jc.load=Nht;jc.useColors=Rht;jc.storage=wht();jc.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`."))}})();jc.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 Rht(){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 xht(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+gQ.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)}jc.log=console.debug||console.log||(()=>{});function Dht(e){try{e?jc.storage.setItem("debug",e):jc.storage.removeItem("debug")}catch{}}function Nht(){let e;try{e=jc.storage.getItem("debug")||jc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function wht(){try{return localStorage}catch{}}gQ.exports=q7()(jc);var{formatters:kht}=gQ.exports;kht.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var fCe=M((hfn,pCe)=>{"use strict";m();pCe.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 gCe=M((Efn,ACe)=>{"use strict";m();var Bht=Fe("os"),mCe=Fe("tty"),Zd=fCe(),{env:ta}=process,k_;Zd("no-color")||Zd("no-colors")||Zd("color=false")||Zd("color=never")?k_=0:(Zd("color")||Zd("colors")||Zd("color=true")||Zd("color=always"))&&(k_=1);"FORCE_COLOR"in ta&&(ta.FORCE_COLOR==="true"?k_=1:ta.FORCE_COLOR==="false"?k_=0:k_=ta.FORCE_COLOR.length===0?1:Math.min(parseInt(ta.FORCE_COLOR,10),3));function V7(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function K7(e,t){if(k_===0)return 0;if(Zd("color=16m")||Zd("color=full")||Zd("color=truecolor"))return 3;if(Zd("color=256"))return 2;if(e&&!t&&k_===void 0)return 0;let n=k_||0;if(ta.TERM==="dumb")return n;if(process.platform==="win32"){let r=Bht.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in ta)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in ta)||ta.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in ta)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ta.TEAMCITY_VERSION)?1:0;if(ta.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ta){let r=parseInt((ta.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ta.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ta.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ta.TERM)||"COLORTERM"in ta?1:n}function Oht(e){let t=K7(e,e&&e.isTTY);return V7(t)}ACe.exports={supportsColor:Oht,stdout:V7(K7(!0,mCe.isatty(1))),stderr:V7(K7(!0,mCe.isatty(2)))}});var _Ce=M((na,_Q)=>{m();var Pht=Fe("tty"),hQ=Fe("util");na.init=jht;na.log=Qht;na.formatArgs=Lht;na.save=Fht;na.load=Ght;na.useColors=Mht;na.destroy=hQ.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");na.colors=[6,2,3,4,5,1];try{let e=gCe();e&&(e.stderr||e).level>=2&&(na.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{}na.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 Mht(){return"colors"in na.inspectOpts?!!na.inspectOpts.colors:Pht.isatty(process.stderr.fd)}function Lht(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 rot=Object.create;var uU=Object.defineProperty;var oot=Object.getOwnPropertyDescriptor;var iot=Object.getOwnPropertyNames;var sot=Object.getPrototypeOf,aot=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 k=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var M=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Xs=(e,t)=>{for(var n in t)uU(e,n,{get:t[n],enumerable:!0})},Sge=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of iot(t))!aot.call(e,o)&&o!==n&&uU(e,o,{get:()=>t[o],enumerable:!(r=oot(t,o))||r.enumerable});return e};var ue=(e,t,n)=>(n=e!=null?rot(sot(e)):{},Sge(t||!e||!e.__esModule?uU(n,"default",{value:e,enumerable:!0}):n,e)),Le=e=>Sge(uU({},"__esModule",{value:!0}),e);var m=k(()=>{(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.250"}}catch{}})()});var Ig,iV=k(()=>{m();Ig="1.9.1"});function uot(e){let t=new Set([e]),n=new Set,r=e.match(Ige);if(!r)return()=>!1;let o={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(o.prerelease!=null)return function(l){return l===e};function i(u){return n.add(u),!1}function s(u){return t.add(u),!0}return function(l){if(t.has(l))return!0;if(n.has(l))return!1;let f=l.match(Ige);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 Ige,Cge,vge=k(()=>{m();iV();Ige=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;Cge=uot(Ig)});function vm(e,t,n,r=!1){var o;let i=bw[Tw]=(o=bw[Tw])!==null&&o!==void 0?o:{version:Ig};if(!r&&i[e]){let s=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(s.stack||s.message),!1}if(i.version!==Ig){let s=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${Ig}`);return n.error(s.stack||s.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${Ig}.`),!0}function jl(e){var t,n;let r=(t=bw[Tw])===null||t===void 0?void 0:t.version;if(!(!r||!Cge(r)))return(n=bw[Tw])===null||n===void 0?void 0:n[e]}function Rm(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${Ig}.`);let n=bw[Tw];n&&delete n[e]}var cot,Tw,bw,lS=k(()=>{m();iV();vge();cot=Ig.split(".")[0],Tw=Symbol.for(`opentelemetry.js.api.${cot}`),bw=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function Iw(e,t,n){let r=jl("diag");if(r)return r[e](t,...n)}var cU,Rge=k(()=>{m();lS();cU=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return Iw("debug",this._namespace,t)}error(...t){return Iw("error",this._namespace,t)}info(...t){return Iw("info",this._namespace,t)}warn(...t){return Iw("warn",this._namespace,t)}verbose(...t){return Iw("verbose",this._namespace,t)}}});var xs,lU=k(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(xs||(xs={}))});function xge(e,t){e<xs.NONE?e=xs.NONE:e>xs.ALL&&(e=xs.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",xs.ERROR),warn:n("warn",xs.WARN),info:n("info",xs.INFO),debug:n("debug",xs.DEBUG),verbose:n("verbose",xs.VERBOSE)}}var Dge=k(()=>{m();lU()});var lot,ea,dS=k(()=>{m();Rge();Dge();lU();lS();lot="diag",ea=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let s=jl("diag");if(s)return s[o](...i)}}let n=this,r=(o,i={logLevel:xs.INFO})=>{var s,u,l;if(o===n){let _=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=_.stack)!==null&&s!==void 0?s:_.message),!1}typeof i=="number"&&(i={logLevel:i});let f=jl("diag"),h=xge((u=i.logLevel)!==null&&u!==void 0?u:xs.INFO,o);if(f&&!i.suppressOverrideMessage){let _=(l=new Error().stack)!==null&&l!==void 0?l:"<failed to generate stacktrace>";f.warn(`Current logger will be overwritten from ${_}`),h.warn(`Current logger will overwrite one already registered from ${_}`)}return vm("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{Rm(lot,n)},n.createComponentLogger=o=>new cU(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var dU,Nge=k(()=>{m();dU=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 wge,kge=k(()=>{m();wge=Symbol("BaggageEntryMetadata")});function Bge(e={}){return new dU(new Map(Object.entries(e)))}function Oge(e){return typeof e!="string"&&(dot.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:wge,toString(){return e}}}var dot,sV=k(()=>{m();dS();Nge();kge();dot=ea.instance()});function zl(e){return Symbol.for(e)}var aV,QC,Cw=k(()=>{m();aV=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}}},QC=new aV});var uV,cV,pU,Pge=k(()=>{m();uV=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],cV={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(cV[t]=console[t])}pU=class{constructor(){function t(n){return function(...r){let o=cV[n];if(typeof o!="function"&&(o=cV.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<uV.length;n++)this[uV[n].n]=t(uV[n].c)}}});function Mge(){return _V}var lV,FC,dV,pV,fV,mV,vw,AV,gV,hV,_V,pot,fot,mot,Aot,got,hot,_ot,EV=k(()=>{m();lV=class{constructor(){}createGauge(t,n){return fot}createHistogram(t,n){return mot}createCounter(t,n){return pot}createUpDownCounter(t,n){return Aot}createObservableGauge(t,n){return hot}createObservableCounter(t,n){return got}createObservableUpDownCounter(t,n){return _ot}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},FC=class{},dV=class extends FC{add(t,n){}},pV=class extends FC{add(t,n){}},fV=class extends FC{record(t,n){}},mV=class extends FC{record(t,n){}},vw=class{addCallback(t){}removeCallback(t){}},AV=class extends vw{},gV=class extends vw{},hV=class extends vw{},_V=new lV,pot=new dV,fot=new fV,mot=new mV,Aot=new pV,got=new AV,hot=new gV,_ot=new hV});var fU,Lge=k(()=>{m();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(fU||(fU={}))});var mU,AU,yV=k(()=>{m();mU={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},AU={set(e,t,n){e!=null&&(e[t]=n)}}});var gU,Uge=k(()=>{m();Cw();gU=class{active(){return QC}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var SV,Eot,xm,Rw=k(()=>{m();Uge();lS();dS();SV="context",Eot=new gU,xm=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return vm(SV,t,ea.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 jl(SV)||Eot}disable(){this._getContextManager().disable(),Rm(SV,ea.instance())}}});var ou,TV=k(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(ou||(ou={}))});var xw,pS,hU,_U=k(()=>{m();TV();xw="0000000000000000",pS="00000000000000000000000000000000",hU={traceId:pS,spanId:xw,traceFlags:ou.NONE}});var Dm,EU=k(()=>{m();_U();Dm=class{constructor(t=hU){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 yU(e){return e.getValue(bV)||void 0}function Qge(){return yU(xm.getInstance().active())}function Dw(e,t){return e.setValue(bV,t)}function Fge(e){return e.deleteValue(bV)}function Gge(e,t){return Dw(e,new Dm(t))}function SU(e){var t;return(t=yU(e))===null||t===void 0?void 0:t.spanContext()}var bV,IV=k(()=>{m();Cw();EU();Rw();bV=zl("OpenTelemetry Context Key SPAN")});function jge(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(TU[e.charCodeAt(r)]|0)+(TU[e.charCodeAt(r+1)]|0)+(TU[e.charCodeAt(r+2)]|0)+(TU[e.charCodeAt(r+3)]|0);return n===t}function CV(e){return jge(e,32)&&e!==pS}function vV(e){return jge(e,16)&&e!==xw}function Cg(e){return CV(e.traceId)&&vV(e.spanId)}function zge(e){return new Dm(e)}var TU,bU=k(()=>{m();_U();EU();TU=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 yot(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 RV,GC,xV=k(()=>{m();Rw();IV();EU();bU();RV=xm.getInstance(),GC=class{startSpan(t,n,r=RV.active()){if(!!n?.root)return new Dm;let i=r&&SU(r);return yot(i)&&Cg(i)?new Dm(i):new Dm}startActiveSpan(t,n,r,o){let i,s,u;if(arguments.length<2)return;arguments.length===2?u=n:arguments.length===3?(i=n,u=r):(i=n,s=r,u=o);let l=s??RV.active(),f=this.startSpan(t,i,l),h=Dw(l,f);return RV.with(h,u,void 0,f)}}});var Sot,jC,DV=k(()=>{m();xV();Sot=new GC,jC=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):Sot}}});var IU,Hge=k(()=>{m();xV();IU=class{getTracer(t,n,r){return new GC}}});var Tot,fS,NV=k(()=>{m();DV();Hge();Tot=new IU,fS=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new jC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Tot}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 CU,$ge=k(()=>{m();(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(CU||(CU={}))});var Ao,qge=k(()=>{m();(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(Ao||(Ao={}))});var hi,Vge=k(()=>{m();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(hi||(hi={}))});function Kge(e){return Cot.test(e)}function Yge(e){return vot.test(e)&&!Rot.test(e)}var wV,bot,Iot,Cot,vot,Rot,Jge=k(()=>{m();wV="[_0-9a-z-*/]",bot=`[a-z]${wV}{0,255}`,Iot=`[a-z0-9]${wV}{0,240}@[a-z]${wV}{0,13}`,Cot=new RegExp(`^(?:${bot}|${Iot})$`),vot=/^[ -~]{0,255}[!-~]$/,Rot=/,|=/});var Zge,xot,Wge,Xge,vU,ehe=k(()=>{m();Jge();Zge=32,xot=512,Wge=",",Xge="=",vU=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+Xge+this.get(n)),t),[]).join(Wge)}_parse(t){t.length>xot||(this._internalState=t.split(Wge).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(Xge);if(i!==-1){let s=o.slice(0,i),u=o.slice(i+1,r.length);Kge(s)&&Yge(u)&&n.set(s,u)}return n},new Map),this._internalState.size>Zge&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Zge))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function the(e){return new vU(e)}var nhe=k(()=>{m();ehe()});var Xe,rhe=k(()=>{m();Rw();Xe=xm.getInstance()});var Hl,ohe=k(()=>{m();dS();Hl=ea.instance()});var kV,ihe,she=k(()=>{m();EV();kV=class{getMeter(t,n,r){return _V}},ihe=new kV});var BV,RU,ahe=k(()=>{m();she();lS();dS();BV="metrics",RU=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return vm(BV,t,ea.instance())}getMeterProvider(){return jl(BV)||ihe}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){Rm(BV,ea.instance())}}});var OV,uhe=k(()=>{m();ahe();OV=RU.getInstance()});var xU,che=k(()=>{m();xU=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function MV(e){return e.getValue(PV)||void 0}function lhe(){return MV(xm.getInstance().active())}function dhe(e,t){return e.setValue(PV,t)}function phe(e){return e.deleteValue(PV)}var PV,fhe=k(()=>{m();Rw();Cw();PV=zl("OpenTelemetry Baggage Key")});var LV,Dot,DU,mhe=k(()=>{m();lS();che();yV();fhe();sV();dS();LV="propagation",Dot=new xU,DU=class e{constructor(){this.createBaggage=Bge,this.getBaggage=MV,this.getActiveBaggage=lhe,this.setBaggage=dhe,this.deleteBaggage=phe}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return vm(LV,t,ea.instance())}inject(t,n,r=AU){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=mU){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){Rm(LV,ea.instance())}_getGlobalPropagator(){return jl(LV)||Dot}}});var Af,Ahe=k(()=>{m();mhe();Af=DU.getInstance()});var UV,NU,ghe=k(()=>{m();lS();NV();bU();IV();dS();UV="trace",NU=class e{constructor(){this._proxyTracerProvider=new fS,this.wrapSpanContext=zge,this.isSpanContextValid=Cg,this.deleteSpan=Fge,this.getSpan=yU,this.getActiveSpan=Qge,this.getSpanContext=SU,this.setSpan=Dw,this.setSpanContext=Gge}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=vm(UV,this._proxyTracerProvider,ea.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return jl(UV)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){Rm(UV,ea.instance()),this._proxyTracerProvider=new fS}}});var Jt,hhe=k(()=>{m();ghe();Jt=NU.getInstance()});var nt={};Xs(nt,{DiagConsoleLogger:()=>pU,DiagLogLevel:()=>xs,INVALID_SPANID:()=>xw,INVALID_SPAN_CONTEXT:()=>hU,INVALID_TRACEID:()=>pS,ProxyTracer:()=>jC,ProxyTracerProvider:()=>fS,ROOT_CONTEXT:()=>QC,SamplingDecision:()=>CU,SpanKind:()=>Ao,SpanStatusCode:()=>hi,TraceFlags:()=>ou,ValueType:()=>fU,baggageEntryMetadataFromString:()=>Oge,context:()=>Xe,createContextKey:()=>zl,createNoopMeter:()=>Mge,createTraceState:()=>the,default:()=>Not,defaultTextMapGetter:()=>mU,defaultTextMapSetter:()=>AU,diag:()=>Hl,isSpanContextValid:()=>Cg,isValidSpanId:()=>vV,isValidTraceId:()=>CV,metrics:()=>OV,propagation:()=>Af,trace:()=>Jt});var Not,$e=k(()=>{m();sV();Cw();Pge();lU();EV();Lge();yV();DV();NV();$ge();qge();Vge();TV();nhe();bU();_U();rhe();ohe();uhe();Ahe();hhe();Not={context:Xe,diag:Hl,metrics:OV,propagation:Af,trace:Jt}});var Nw=M(D_=>{"use strict";m();Object.defineProperty(D_,"__esModule",{value:!0});D_.isTracingSuppressed=D_.unsuppressTracing=D_.suppressTracing=void 0;var wot=($e(),Le(nt)),QV=(0,wot.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function kot(e){return e.setValue(QV,!0)}D_.suppressTracing=kot;function Bot(e){return e.deleteValue(QV)}D_.unsuppressTracing=Bot;function Oot(e){return e.getValue(QV)===!0}D_.isTracingSuppressed=Oot});var FV=M(iu=>{"use strict";m();Object.defineProperty(iu,"__esModule",{value:!0});iu.BAGGAGE_MAX_TOTAL_LENGTH=iu.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=iu.BAGGAGE_MAX_NAME_VALUE_PAIRS=iu.BAGGAGE_HEADER=iu.BAGGAGE_ITEMS_SEPARATOR=iu.BAGGAGE_PROPERTIES_SEPARATOR=iu.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;iu.BAGGAGE_KEY_PAIR_SEPARATOR="=";iu.BAGGAGE_PROPERTIES_SEPARATOR=";";iu.BAGGAGE_ITEMS_SEPARATOR=",";iu.BAGGAGE_HEADER="baggage";iu.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;iu.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;iu.BAGGAGE_MAX_TOTAL_LENGTH=8192});var jV=M(Yd=>{"use strict";m();Object.defineProperty(Yd,"__esModule",{value:!0});Yd.parseKeyPairsIntoRecord=Yd.parseBaggageHeaderString=Yd.parsePairKeyValue=Yd.getKeyPairs=Yd.serializeKeyPairs=void 0;var Pot=($e(),Le(nt)),Nm=FV();function Mot(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?Nm.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>Nm.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}Yd.serializeKeyPairs=Mot;function Lot(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=Nm.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}Yd.getKeyPairs=Lot;function GV(e){if(!e)return;let t=e.indexOf(Nm.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(Nm.BAGGAGE_KEY_PAIR_SEPARATOR);if(r<=0)return;let o=n.substring(0,r).trim(),i=n.substring(r+1).trim();if(!o||!i)return;let s,u;try{s=decodeURIComponent(o),u=decodeURIComponent(i)}catch{return}let l;if(t!==-1&&t<e.length-1){let f=e.substring(t+1);l=(0,Pot.baggageEntryMetadataFromString)(f)}return{key:s,value:u,metadata:l}}Yd.parsePairKeyValue=GV;function Uot(e,t,n,r){let o=0;for(;o<e.length&&n<Nm.BAGGAGE_MAX_NAME_VALUE_PAIRS;){let i=e.indexOf(Nm.BAGGAGE_ITEMS_SEPARATOR,o),s=i===-1?e.length:i,u=s-o;if(u<=Nm.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS){let l=GV(e.substring(o,s));if(l){let f=(n===0?0:1)+u;if(r+f>Nm.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]}Yd.parseBaggageHeaderString=Uot;function Qot(e){let t={};return typeof e=="string"&&e.length>0&&e.split(Nm.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=GV(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}Yd.parseKeyPairsIntoRecord=Qot});var _he=M(kU=>{"use strict";m();Object.defineProperty(kU,"__esModule",{value:!0});kU.W3CBaggagePropagator=void 0;var zV=($e(),Le(nt)),Fot=Nw(),ww=FV(),wU=jV(),HV=class{inject(t,n,r){let o=zV.propagation.getBaggage(t);if(!o||(0,Fot.isTracingSuppressed)(t))return;let i=(0,wU.getKeyPairs)(o).filter(u=>u.length<=ww.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,ww.BAGGAGE_MAX_NAME_VALUE_PAIRS),s=(0,wU.serializeKeyPairs)(i);s.length>0&&r.set(n,ww.BAGGAGE_HEADER,s)}extract(t,n,r){let o=r.get(n,ww.BAGGAGE_HEADER);if(!o)return t;let i={},s=0,u=0;if(Array.isArray(o))for(let l=0;l<o.length;l++)[s,u]=(0,wU.parseBaggageHeaderString)(o[l],i,s,u);else[s]=(0,wU.parseBaggageHeaderString)(o,i,s,u);return s===0?t:zV.propagation.setBaggage(t,zV.propagation.createBaggage(i))}fields(){return[ww.BAGGAGE_HEADER]}};kU.W3CBaggagePropagator=HV});var Ehe=M(BU=>{"use strict";m();Object.defineProperty(BU,"__esModule",{value:!0});BU.AnchoredClock=void 0;var $V=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}};BU.AnchoredClock=$V});var Ihe=M(N_=>{"use strict";m();Object.defineProperty(N_,"__esModule",{value:!0});N_.isAttributeValue=N_.isAttributeKey=N_.sanitizeAttributes=void 0;var yhe=($e(),Le(nt));function Got(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(!She(n)){yhe.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!The(r)){yhe.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}N_.sanitizeAttributes=Got;function She(e){return typeof e=="string"&&e!==""}N_.isAttributeKey=She;function The(e){return e==null?!0:Array.isArray(e)?jot(e):bhe(typeof e)}N_.isAttributeValue=The;function jot(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(bhe(r)){t=r;continue}return!1}return!1}}return!0}function bhe(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var qV=M(OU=>{"use strict";m();Object.defineProperty(OU,"__esModule",{value:!0});OU.loggingErrorHandler=void 0;var zot=($e(),Le(nt));function Hot(){return e=>{zot.diag.error($ot(e))}}OU.loggingErrorHandler=Hot;function $ot(e){return typeof e=="string"?e:JSON.stringify(qot(e))}function qot(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 vhe=M(zC=>{"use strict";m();Object.defineProperty(zC,"__esModule",{value:!0});zC.globalErrorHandler=zC.setGlobalErrorHandler=void 0;var Vot=qV(),Che=(0,Vot.loggingErrorHandler)();function Kot(e){Che=e}zC.setGlobalErrorHandler=Kot;function Yot(e){try{Che(e)}catch{}}zC.globalErrorHandler=Yot});var Nhe=M(wm=>{"use strict";m();Object.defineProperty(wm,"__esModule",{value:!0});wm.getStringListFromEnv=wm.getBooleanFromEnv=wm.getStringFromEnv=wm.getNumberFromEnv=void 0;var Rhe=($e(),Le(nt)),xhe=Fe("util");function Jot(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){Rhe.diag.warn(`Unknown value ${(0,xhe.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}wm.getNumberFromEnv=Jot;function Dhe(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}wm.getStringFromEnv=Dhe;function Zot(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||Rhe.diag.warn(`Unknown value ${(0,xhe.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}wm.getBooleanFromEnv=Zot;function Wot(e){return Dhe(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}wm.getStringListFromEnv=Wot});var whe=M(PU=>{"use strict";m();Object.defineProperty(PU,"__esModule",{value:!0});PU._globalThis=void 0;PU._globalThis=globalThis});var khe=M(MU=>{"use strict";m();Object.defineProperty(MU,"__esModule",{value:!0});MU.VERSION=void 0;MU.VERSION="2.8.0"});function Li(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 VV=k(()=>{m()});var Bhe,Ohe,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,jhe,zhe,Hhe,$he,qhe,Vhe,Khe,Yhe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,s_e,a_e,u_e,c_e,l_e,d_e,p_e,f_e,m_e,A_e,g_e,h_e,__e,E_e,y_e,S_e,T_e,b_e,I_e,C_e,v_e,R_e,x_e,D_e,N_e,w_e,k_e,B_e,O_e,P_e,M_e,L_e,U_e,Q_e,F_e,G_e,j_e,z_e,H_e,$_e,q_e,V_e,K_e,Y_e,J_e,Z_e,W_e,X_e,eEe,tEe,nEe,rEe,oEe,iEe,sEe,aEe,uEe,cEe,lEe,dEe,pEe,fEe,mEe,AEe,gEe,hEe,_Ee,EEe,yEe,SEe,TEe,bEe,IEe,CEe,vEe,REe,xEe,DEe,NEe,wEe,kEe,BEe,OEe,PEe,MEe,LEe,UEe,QEe,FEe,GEe,jEe,zEe,HEe,$Ee,qEe,VEe,KEe,YEe,JEe,ZEe,WEe,Xot,KV,eit,tit,nit,rit,YV,oit,iit,sit,ait,uit,cit,lit,dit,pit,fit,mit,Ait,git,hit,_it,Eit,yit,Sit,JV,Tit,bit,Iit,Cit,vit,Rit,xit,Dit,Nit,wit,kit,Bit,ZV,Oit,Pit,WV,XV,Mit,Lit,Uit,Qit,Fit,Git,jit,zit,Hit,$it,qit,Vit,Kit,Yit,Jit,Zit,Wit,kw,HC,e7,Xit,est,mS,tst,nst,rst,ost,t7,n7,ist,r7,sst,ast,ust,cst,lst,dst,pst,fst,mst,Ast,gst,hst,_st,Est,yst,Sst,Tst,bst,Ist,Cst,vst,Rst,xst,o7,Dst,Nst,wst,kst,Bst,Ost,Pst,Mst,Lst,Ust,Qst,Fst,Gst,jst,zst,Hst,$st,qst,Vst,i7,Kst,s7,Yst,Jst,Zst,Wst,Xst,eat,tat,nat,rat,XEe,eye,tye,nye,rye,oye,iye,sye,aye,uye,cye,lye,dye,pye,fye,mye,Aye,gye,hye,_ye,Eye,yye,Sye,Tye,bye,Iye,Cye,vye,Rye,xye,Dye,Nye,wye,kye,Bye,Oye,Pye,Mye,Lye,Uye,Qye,Fye,Gye,jye,zye,Hye,$ye,oat,iat,sat,aat,uat,cat,lat,dat,pat,fat,mat,Aat,gat,hat,_at,Eat,yat,Sat,Tat,bat,Iat,Cat,vat,Rat,xat,Dat,Nat,wat,kat,Bat,Oat,Pat,Mat,Lat,Uat,Qat,Fat,Gat,jat,zat,Hat,$at,qat,Vat,Kat,Yat,Jat,Zat,qye,Vye,Kye,Yye,Jye,Zye,Wye,Xye,e0e,t0e,n0e,Wat,Xat,eut,tut,nut,rut,out,iut,sut,aut,uut,cut,r0e,o0e,i0e,s0e,a0e,lut,dut,put,fut,mut,Aut,u0e,c0e,l0e,gut,hut,_ut,Eut,d0e,p0e,f0e,m0e,yut,Sut,Tut,but,Iut,A0e,g0e,h0e,_0e,E0e,y0e,S0e,Cut,vut,Rut,xut,Dut,Nut,wut,kut,T0e,b0e,I0e,C0e,v0e,But,Out,Put,Mut,Lut,Uut,R0e,x0e,D0e,N0e,w0e,k0e,B0e,O0e,P0e,M0e,L0e,U0e,Q0e,F0e,G0e,j0e,z0e,H0e,$0e,q0e,V0e,Qut,Fut,Gut,jut,zut,Hut,$ut,qut,Vut,Kut,Yut,Jut,Zut,Wut,Xut,ect,tct,nct,rct,oct,ict,sct,K0e,Y0e,J0e,Z0e,W0e,act,uct,cct,lct,dct,pct,X0e,eSe,fct,mct,Act,tSe,nSe,gct,hct,_ct,rSe,oSe,iSe,sSe,aSe,uSe,cSe,lSe,dSe,pSe,fSe,mSe,ASe,gSe,hSe,_Se,ESe,Ect,yct,Sct,Tct,bct,Ict,Cct,vct,Rct,xct,Dct,Nct,wct,kct,Bct,Oct,Pct,Mct,ySe,SSe,Lct,Uct,Qct,TSe=k(()=>{m();VV();Bhe="aws.lambda.invoked_arn",Ohe="db.system",Phe="db.connection_string",Mhe="db.user",Lhe="db.jdbc.driver_classname",Uhe="db.name",Qhe="db.statement",Fhe="db.operation",Ghe="db.mssql.instance_name",jhe="db.cassandra.keyspace",zhe="db.cassandra.page_size",Hhe="db.cassandra.consistency_level",$he="db.cassandra.table",qhe="db.cassandra.idempotence",Vhe="db.cassandra.speculative_execution_count",Khe="db.cassandra.coordinator.id",Yhe="db.cassandra.coordinator.dc",Jhe="db.hbase.namespace",Zhe="db.redis.database_index",Whe="db.mongodb.collection",Xhe="db.sql.table",e_e="exception.type",t_e="exception.message",n_e="exception.stacktrace",r_e="exception.escaped",o_e="faas.trigger",i_e="faas.execution",s_e="faas.document.collection",a_e="faas.document.operation",u_e="faas.document.time",c_e="faas.document.name",l_e="faas.time",d_e="faas.cron",p_e="faas.coldstart",f_e="faas.invoked_name",m_e="faas.invoked_provider",A_e="faas.invoked_region",g_e="net.transport",h_e="net.peer.ip",__e="net.peer.port",E_e="net.peer.name",y_e="net.host.ip",S_e="net.host.port",T_e="net.host.name",b_e="net.host.connection.type",I_e="net.host.connection.subtype",C_e="net.host.carrier.name",v_e="net.host.carrier.mcc",R_e="net.host.carrier.mnc",x_e="net.host.carrier.icc",D_e="peer.service",N_e="enduser.id",w_e="enduser.role",k_e="enduser.scope",B_e="thread.id",O_e="thread.name",P_e="code.function",M_e="code.namespace",L_e="code.filepath",U_e="code.lineno",Q_e="http.method",F_e="http.url",G_e="http.target",j_e="http.host",z_e="http.scheme",H_e="http.status_code",$_e="http.flavor",q_e="http.user_agent",V_e="http.request_content_length",K_e="http.request_content_length_uncompressed",Y_e="http.response_content_length",J_e="http.response_content_length_uncompressed",Z_e="http.server_name",W_e="http.route",X_e="http.client_ip",eEe="aws.dynamodb.table_names",tEe="aws.dynamodb.consumed_capacity",nEe="aws.dynamodb.item_collection_metrics",rEe="aws.dynamodb.provisioned_read_capacity",oEe="aws.dynamodb.provisioned_write_capacity",iEe="aws.dynamodb.consistent_read",sEe="aws.dynamodb.projection",aEe="aws.dynamodb.limit",uEe="aws.dynamodb.attributes_to_get",cEe="aws.dynamodb.index_name",lEe="aws.dynamodb.select",dEe="aws.dynamodb.global_secondary_indexes",pEe="aws.dynamodb.local_secondary_indexes",fEe="aws.dynamodb.exclusive_start_table",mEe="aws.dynamodb.table_count",AEe="aws.dynamodb.scan_forward",gEe="aws.dynamodb.segment",hEe="aws.dynamodb.total_segments",_Ee="aws.dynamodb.count",EEe="aws.dynamodb.scanned_count",yEe="aws.dynamodb.attribute_definitions",SEe="aws.dynamodb.global_secondary_index_updates",TEe="messaging.system",bEe="messaging.destination",IEe="messaging.destination_kind",CEe="messaging.temp_destination",vEe="messaging.protocol",REe="messaging.protocol_version",xEe="messaging.url",DEe="messaging.message_id",NEe="messaging.conversation_id",wEe="messaging.message_payload_size_bytes",kEe="messaging.message_payload_compressed_size_bytes",BEe="messaging.operation",OEe="messaging.consumer_id",PEe="messaging.rabbitmq.routing_key",MEe="messaging.kafka.message_key",LEe="messaging.kafka.consumer_group",UEe="messaging.kafka.client_id",QEe="messaging.kafka.partition",FEe="messaging.kafka.tombstone",GEe="rpc.system",jEe="rpc.service",zEe="rpc.method",HEe="rpc.grpc.status_code",$Ee="rpc.jsonrpc.version",qEe="rpc.jsonrpc.request_id",VEe="rpc.jsonrpc.error_code",KEe="rpc.jsonrpc.error_message",YEe="message.type",JEe="message.id",ZEe="message.compressed_size",WEe="message.uncompressed_size",Xot=Bhe,KV=Ohe,eit=Phe,tit=Mhe,nit=Lhe,rit=Uhe,YV=Qhe,oit=Fhe,iit=Ghe,sit=jhe,ait=zhe,uit=Hhe,cit=$he,lit=qhe,dit=Vhe,pit=Khe,fit=Yhe,mit=Jhe,Ait=Zhe,git=Whe,hit=Xhe,_it=e_e,Eit=t_e,yit=n_e,Sit=r_e,JV=o_e,Tit=i_e,bit=s_e,Iit=a_e,Cit=u_e,vit=c_e,Rit=l_e,xit=d_e,Dit=p_e,Nit=f_e,wit=m_e,kit=A_e,Bit=g_e,ZV=h_e,Oit=__e,Pit=E_e,WV=y_e,XV=S_e,Mit=T_e,Lit=b_e,Uit=I_e,Qit=C_e,Fit=v_e,Git=R_e,jit=x_e,zit=D_e,Hit=N_e,$it=w_e,qit=k_e,Vit=B_e,Kit=O_e,Yit=P_e,Jit=M_e,Zit=L_e,Wit=U_e,kw=Q_e,HC=F_e,e7=G_e,Xit=j_e,est=z_e,mS=H_e,tst=$_e,nst=q_e,rst=V_e,ost=K_e,t7=Y_e,n7=J_e,ist=Z_e,r7=W_e,sst=X_e,ast=eEe,ust=tEe,cst=nEe,lst=rEe,dst=oEe,pst=iEe,fst=sEe,mst=aEe,Ast=uEe,gst=cEe,hst=lEe,_st=dEe,Est=pEe,yst=fEe,Sst=mEe,Tst=AEe,bst=gEe,Ist=hEe,Cst=_Ee,vst=EEe,Rst=yEe,xst=SEe,o7=TEe,Dst=bEe,Nst=IEe,wst=CEe,kst=vEe,Bst=REe,Ost=xEe,Pst=DEe,Mst=NEe,Lst=wEe,Ust=kEe,Qst=BEe,Fst=OEe,Gst=PEe,jst=MEe,zst=LEe,Hst=UEe,$st=QEe,qst=FEe,Vst=GEe,i7=jEe,Kst=zEe,s7=HEe,Yst=$Ee,Jst=qEe,Zst=VEe,Wst=KEe,Xst=YEe,eat=JEe,tat=ZEe,nat=WEe,rat=Li([Bhe,Ohe,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,jhe,zhe,Hhe,$he,qhe,Vhe,Khe,Yhe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,s_e,a_e,u_e,c_e,l_e,d_e,p_e,f_e,m_e,A_e,g_e,h_e,__e,E_e,y_e,S_e,T_e,b_e,I_e,C_e,v_e,R_e,x_e,D_e,N_e,w_e,k_e,B_e,O_e,P_e,M_e,L_e,U_e,Q_e,F_e,G_e,j_e,z_e,H_e,$_e,q_e,V_e,K_e,Y_e,J_e,Z_e,W_e,X_e,eEe,tEe,nEe,rEe,oEe,iEe,sEe,aEe,uEe,cEe,lEe,dEe,pEe,fEe,mEe,AEe,gEe,hEe,_Ee,EEe,yEe,SEe,TEe,bEe,IEe,CEe,vEe,REe,xEe,DEe,NEe,wEe,kEe,BEe,OEe,PEe,MEe,LEe,UEe,QEe,FEe,GEe,jEe,zEe,HEe,$Ee,qEe,VEe,KEe,YEe,JEe,ZEe,WEe]),XEe="other_sql",eye="mssql",tye="mysql",nye="oracle",rye="db2",oye="postgresql",iye="redshift",sye="hive",aye="cloudscape",uye="hsqldb",cye="progress",lye="maxdb",dye="hanadb",pye="ingres",fye="firstsql",mye="edb",Aye="cache",gye="adabas",hye="firebird",_ye="derby",Eye="filemaker",yye="informix",Sye="instantdb",Tye="interbase",bye="mariadb",Iye="netezza",Cye="pervasive",vye="pointbase",Rye="sqlite",xye="sybase",Dye="teradata",Nye="vertica",wye="h2",kye="coldfusion",Bye="cassandra",Oye="hbase",Pye="mongodb",Mye="redis",Lye="couchbase",Uye="couchdb",Qye="cosmosdb",Fye="dynamodb",Gye="neo4j",jye="geode",zye="elasticsearch",Hye="memcached",$ye="cockroachdb",oat=XEe,iat=eye,sat=tye,aat=nye,uat=rye,cat=oye,lat=iye,dat=sye,pat=aye,fat=uye,mat=cye,Aat=lye,gat=dye,hat=pye,_at=fye,Eat=mye,yat=Aye,Sat=gye,Tat=hye,bat=_ye,Iat=Eye,Cat=yye,vat=Sye,Rat=Tye,xat=bye,Dat=Iye,Nat=Cye,wat=vye,kat=Rye,Bat=xye,Oat=Dye,Pat=Nye,Mat=wye,Lat=kye,Uat=Bye,Qat=Oye,Fat=Pye,Gat=Mye,jat=Lye,zat=Uye,Hat=Qye,$at=Fye,qat=Gye,Vat=jye,Kat=zye,Yat=Hye,Jat=$ye,Zat=Li([XEe,eye,tye,nye,rye,oye,iye,sye,aye,uye,cye,lye,dye,pye,fye,mye,Aye,gye,hye,_ye,Eye,yye,Sye,Tye,bye,Iye,Cye,vye,Rye,xye,Dye,Nye,wye,kye,Bye,Oye,Pye,Mye,Lye,Uye,Qye,Fye,Gye,jye,zye,Hye,$ye]),qye="all",Vye="each_quorum",Kye="quorum",Yye="local_quorum",Jye="one",Zye="two",Wye="three",Xye="local_one",e0e="any",t0e="serial",n0e="local_serial",Wat=qye,Xat=Vye,eut=Kye,tut=Yye,nut=Jye,rut=Zye,out=Wye,iut=Xye,sut=e0e,aut=t0e,uut=n0e,cut=Li([qye,Vye,Kye,Yye,Jye,Zye,Wye,Xye,e0e,t0e,n0e]),r0e="datasource",o0e="http",i0e="pubsub",s0e="timer",a0e="other",lut=r0e,dut=o0e,put=i0e,fut=s0e,mut=a0e,Aut=Li([r0e,o0e,i0e,s0e,a0e]),u0e="insert",c0e="edit",l0e="delete",gut=u0e,hut=c0e,_ut=l0e,Eut=Li([u0e,c0e,l0e]),d0e="alibaba_cloud",p0e="aws",f0e="azure",m0e="gcp",yut=d0e,Sut=p0e,Tut=f0e,but=m0e,Iut=Li([d0e,p0e,f0e,m0e]),A0e="ip_tcp",g0e="ip_udp",h0e="ip",_0e="unix",E0e="pipe",y0e="inproc",S0e="other",Cut=A0e,vut=g0e,Rut=h0e,xut=_0e,Dut=E0e,Nut=y0e,wut=S0e,kut=Li([A0e,g0e,h0e,_0e,E0e,y0e,S0e]),T0e="wifi",b0e="wired",I0e="cell",C0e="unavailable",v0e="unknown",But=T0e,Out=b0e,Put=I0e,Mut=C0e,Lut=v0e,Uut=Li([T0e,b0e,I0e,C0e,v0e]),R0e="gprs",x0e="edge",D0e="umts",N0e="cdma",w0e="evdo_0",k0e="evdo_a",B0e="cdma2000_1xrtt",O0e="hsdpa",P0e="hsupa",M0e="hspa",L0e="iden",U0e="evdo_b",Q0e="lte",F0e="ehrpd",G0e="hspap",j0e="gsm",z0e="td_scdma",H0e="iwlan",$0e="nr",q0e="nrnsa",V0e="lte_ca",Qut=R0e,Fut=x0e,Gut=D0e,jut=N0e,zut=w0e,Hut=k0e,$ut=B0e,qut=O0e,Vut=P0e,Kut=M0e,Yut=L0e,Jut=U0e,Zut=Q0e,Wut=F0e,Xut=G0e,ect=j0e,tct=z0e,nct=H0e,rct=$0e,oct=q0e,ict=V0e,sct=Li([R0e,x0e,D0e,N0e,w0e,k0e,B0e,O0e,P0e,M0e,L0e,U0e,Q0e,F0e,G0e,j0e,z0e,H0e,$0e,q0e,V0e]),K0e="1.0",Y0e="1.1",J0e="2.0",Z0e="SPDY",W0e="QUIC",act=K0e,uct=Y0e,cct=J0e,lct=Z0e,dct=W0e,pct={HTTP_1_0:K0e,HTTP_1_1:Y0e,HTTP_2_0:J0e,SPDY:Z0e,QUIC:W0e},X0e="queue",eSe="topic",fct=X0e,mct=eSe,Act=Li([X0e,eSe]),tSe="receive",nSe="process",gct=tSe,hct=nSe,_ct=Li([tSe,nSe]),rSe=0,oSe=1,iSe=2,sSe=3,aSe=4,uSe=5,cSe=6,lSe=7,dSe=8,pSe=9,fSe=10,mSe=11,ASe=12,gSe=13,hSe=14,_Se=15,ESe=16,Ect=rSe,yct=oSe,Sct=iSe,Tct=sSe,bct=aSe,Ict=uSe,Cct=cSe,vct=lSe,Rct=dSe,xct=pSe,Dct=fSe,Nct=mSe,wct=ASe,kct=gSe,Bct=hSe,Oct=_Se,Pct=ESe,Mct={OK:rSe,CANCELLED:oSe,UNKNOWN:iSe,INVALID_ARGUMENT:sSe,DEADLINE_EXCEEDED:aSe,NOT_FOUND:uSe,ALREADY_EXISTS:cSe,PERMISSION_DENIED:lSe,RESOURCE_EXHAUSTED:dSe,FAILED_PRECONDITION:pSe,ABORTED:fSe,OUT_OF_RANGE:mSe,UNIMPLEMENTED:ASe,INTERNAL:gSe,UNAVAILABLE:hSe,DATA_LOSS:_Se,UNAUTHENTICATED:ESe},ySe="SENT",SSe="RECEIVED",Lct=ySe,Uct=SSe,Qct=Li([ySe,SSe])});var bSe=k(()=>{m();TSe()});var ISe,CSe,vSe,RSe,xSe,DSe,NSe,wSe,kSe,BSe,OSe,PSe,MSe,LSe,USe,QSe,FSe,GSe,jSe,zSe,HSe,$Se,qSe,VSe,KSe,YSe,JSe,ZSe,WSe,XSe,eTe,tTe,nTe,rTe,oTe,iTe,sTe,aTe,uTe,cTe,lTe,dTe,pTe,fTe,mTe,ATe,gTe,hTe,_Te,ETe,yTe,STe,TTe,bTe,ITe,CTe,vTe,RTe,xTe,DTe,NTe,wTe,kTe,BTe,OTe,PTe,MTe,LTe,UTe,QTe,FTe,GTe,jTe,zTe,HTe,$Te,qTe,VTe,KTe,YTe,JTe,Fct,Gct,jct,zct,Hct,$ct,qct,Vct,Kct,Yct,Jct,Zct,Wct,Xct,elt,tlt,nlt,rlt,olt,ilt,slt,alt,ult,clt,llt,dlt,plt,flt,mlt,Alt,glt,hlt,_lt,Elt,ylt,Slt,Tlt,blt,Ilt,Clt,vlt,Rlt,xlt,Dlt,Nlt,wlt,klt,Blt,Olt,Plt,Mlt,Llt,Ult,Qlt,Flt,Glt,jlt,zlt,Hlt,$lt,qlt,Vlt,Klt,Ylt,Jlt,Zlt,Wlt,Xlt,edt,tdt,ndt,a7,rdt,odt,idt,sdt,adt,udt,cdt,ldt,ddt,pdt,ZTe,WTe,XTe,ebe,fdt,mdt,Adt,gdt,hdt,tbe,nbe,rbe,obe,ibe,sbe,abe,ube,cbe,lbe,dbe,pbe,fbe,mbe,Abe,gbe,hbe,_dt,Edt,ydt,Sdt,Tdt,bdt,Idt,Cdt,vdt,Rdt,xdt,Ddt,Ndt,wdt,kdt,Bdt,Odt,Pdt,_be,Ebe,Mdt,Ldt,Udt,ybe,Sbe,Tbe,bbe,Ibe,Cbe,vbe,Qdt,Fdt,Gdt,jdt,zdt,Hdt,$dt,qdt,Rbe,xbe,Dbe,Nbe,wbe,kbe,Bbe,Obe,Pbe,Mbe,Lbe,Vdt,Kdt,Ydt,Jdt,Zdt,Wdt,Xdt,ept,tpt,npt,rpt,opt,Ube,Qbe,Fbe,Gbe,jbe,zbe,Hbe,$be,qbe,Vbe,ipt,spt,apt,upt,cpt,lpt,dpt,ppt,fpt,mpt,Apt,Kbe=k(()=>{m();VV();ISe="cloud.provider",CSe="cloud.account.id",vSe="cloud.region",RSe="cloud.availability_zone",xSe="cloud.platform",DSe="aws.ecs.container.arn",NSe="aws.ecs.cluster.arn",wSe="aws.ecs.launchtype",kSe="aws.ecs.task.arn",BSe="aws.ecs.task.family",OSe="aws.ecs.task.revision",PSe="aws.eks.cluster.arn",MSe="aws.log.group.names",LSe="aws.log.group.arns",USe="aws.log.stream.names",QSe="aws.log.stream.arns",FSe="container.name",GSe="container.id",jSe="container.runtime",zSe="container.image.name",HSe="container.image.tag",$Se="deployment.environment",qSe="device.id",VSe="device.model.identifier",KSe="device.model.name",YSe="faas.name",JSe="faas.id",ZSe="faas.version",WSe="faas.instance",XSe="faas.max_memory",eTe="host.id",tTe="host.name",nTe="host.type",rTe="host.arch",oTe="host.image.name",iTe="host.image.id",sTe="host.image.version",aTe="k8s.cluster.name",uTe="k8s.node.name",cTe="k8s.node.uid",lTe="k8s.namespace.name",dTe="k8s.pod.uid",pTe="k8s.pod.name",fTe="k8s.container.name",mTe="k8s.replicaset.uid",ATe="k8s.replicaset.name",gTe="k8s.deployment.uid",hTe="k8s.deployment.name",_Te="k8s.statefulset.uid",ETe="k8s.statefulset.name",yTe="k8s.daemonset.uid",STe="k8s.daemonset.name",TTe="k8s.job.uid",bTe="k8s.job.name",ITe="k8s.cronjob.uid",CTe="k8s.cronjob.name",vTe="os.type",RTe="os.description",xTe="os.name",DTe="os.version",NTe="process.pid",wTe="process.executable.name",kTe="process.executable.path",BTe="process.command",OTe="process.command_line",PTe="process.command_args",MTe="process.owner",LTe="process.runtime.name",UTe="process.runtime.version",QTe="process.runtime.description",FTe="service.name",GTe="service.namespace",jTe="service.instance.id",zTe="service.version",HTe="telemetry.sdk.name",$Te="telemetry.sdk.language",qTe="telemetry.sdk.version",VTe="telemetry.auto.version",KTe="webengine.name",YTe="webengine.version",JTe="webengine.description",Fct=ISe,Gct=CSe,jct=vSe,zct=RSe,Hct=xSe,$ct=DSe,qct=NSe,Vct=wSe,Kct=kSe,Yct=BSe,Jct=OSe,Zct=PSe,Wct=MSe,Xct=LSe,elt=USe,tlt=QSe,nlt=FSe,rlt=GSe,olt=jSe,ilt=zSe,slt=HSe,alt=$Se,ult=qSe,clt=VSe,llt=KSe,dlt=YSe,plt=JSe,flt=ZSe,mlt=WSe,Alt=XSe,glt=eTe,hlt=tTe,_lt=nTe,Elt=rTe,ylt=oTe,Slt=iTe,Tlt=sTe,blt=aTe,Ilt=uTe,Clt=cTe,vlt=lTe,Rlt=dTe,xlt=pTe,Dlt=fTe,Nlt=mTe,wlt=ATe,klt=gTe,Blt=hTe,Olt=_Te,Plt=ETe,Mlt=yTe,Llt=STe,Ult=TTe,Qlt=bTe,Flt=ITe,Glt=CTe,jlt=vTe,zlt=RTe,Hlt=xTe,$lt=DTe,qlt=NTe,Vlt=wTe,Klt=kTe,Ylt=BTe,Jlt=OTe,Zlt=PTe,Wlt=MTe,Xlt=LTe,edt=UTe,tdt=QTe,ndt=FTe,a7=GTe,rdt=jTe,odt=zTe,idt=HTe,sdt=$Te,adt=qTe,udt=VTe,cdt=KTe,ldt=YTe,ddt=JTe,pdt=Li([ISe,CSe,vSe,RSe,xSe,DSe,NSe,wSe,kSe,BSe,OSe,PSe,MSe,LSe,USe,QSe,FSe,GSe,jSe,zSe,HSe,$Se,qSe,VSe,KSe,YSe,JSe,ZSe,WSe,XSe,eTe,tTe,nTe,rTe,oTe,iTe,sTe,aTe,uTe,cTe,lTe,dTe,pTe,fTe,mTe,ATe,gTe,hTe,_Te,ETe,yTe,STe,TTe,bTe,ITe,CTe,vTe,RTe,xTe,DTe,NTe,wTe,kTe,BTe,OTe,PTe,MTe,LTe,UTe,QTe,FTe,GTe,jTe,zTe,HTe,$Te,qTe,VTe,KTe,YTe,JTe]),ZTe="alibaba_cloud",WTe="aws",XTe="azure",ebe="gcp",fdt=ZTe,mdt=WTe,Adt=XTe,gdt=ebe,hdt=Li([ZTe,WTe,XTe,ebe]),tbe="alibaba_cloud_ecs",nbe="alibaba_cloud_fc",rbe="aws_ec2",obe="aws_ecs",ibe="aws_eks",sbe="aws_lambda",abe="aws_elastic_beanstalk",ube="azure_vm",cbe="azure_container_instances",lbe="azure_aks",dbe="azure_functions",pbe="azure_app_service",fbe="gcp_compute_engine",mbe="gcp_cloud_run",Abe="gcp_kubernetes_engine",gbe="gcp_cloud_functions",hbe="gcp_app_engine",_dt=tbe,Edt=nbe,ydt=rbe,Sdt=obe,Tdt=ibe,bdt=sbe,Idt=abe,Cdt=ube,vdt=cbe,Rdt=lbe,xdt=dbe,Ddt=pbe,Ndt=fbe,wdt=mbe,kdt=Abe,Bdt=gbe,Odt=hbe,Pdt=Li([tbe,nbe,rbe,obe,ibe,sbe,abe,ube,cbe,lbe,dbe,pbe,fbe,mbe,Abe,gbe,hbe]),_be="ec2",Ebe="fargate",Mdt=_be,Ldt=Ebe,Udt=Li([_be,Ebe]),ybe="amd64",Sbe="arm32",Tbe="arm64",bbe="ia64",Ibe="ppc32",Cbe="ppc64",vbe="x86",Qdt=ybe,Fdt=Sbe,Gdt=Tbe,jdt=bbe,zdt=Ibe,Hdt=Cbe,$dt=vbe,qdt=Li([ybe,Sbe,Tbe,bbe,Ibe,Cbe,vbe]),Rbe="windows",xbe="linux",Dbe="darwin",Nbe="freebsd",wbe="netbsd",kbe="openbsd",Bbe="dragonflybsd",Obe="hpux",Pbe="aix",Mbe="solaris",Lbe="z_os",Vdt=Rbe,Kdt=xbe,Ydt=Dbe,Jdt=Nbe,Zdt=wbe,Wdt=kbe,Xdt=Bbe,ept=Obe,tpt=Pbe,npt=Mbe,rpt=Lbe,opt=Li([Rbe,xbe,Dbe,Nbe,wbe,kbe,Bbe,Obe,Pbe,Mbe,Lbe]),Ube="cpp",Qbe="dotnet",Fbe="erlang",Gbe="go",jbe="java",zbe="nodejs",Hbe="php",$be="python",qbe="ruby",Vbe="webjs",ipt=Ube,spt=Qbe,apt=Fbe,upt=Gbe,cpt=jbe,lpt=zbe,dpt=Hbe,ppt=$be,fpt=qbe,mpt=Vbe,Apt=Li([Ube,Qbe,Fbe,Gbe,jbe,zbe,Hbe,$be,qbe,Vbe])});var Ybe=k(()=>{m();Kbe()});var gpt,hpt,_pt,Ept,ypt,Spt,Tpt,bpt,Ipt,Cpt,vpt,Rpt,xpt,Dpt,Npt,wpt,kpt,Bpt,Opt,Ppt,Mpt,Lpt,Upt,Qpt,Fpt,u7,c7,Gpt,$C,jpt,l7,d7,zpt,AS,Hpt,$pt,qpt,Vpt,Kpt,Ypt,Jpt,Zpt,Rdn,xdn,p7,Wpt,Xpt,eft,tft,nft,rft,gS,oft,ift,sft,Ddn,aft,uft,cft,lft,Ndn,dft,pft,fft,mft,vg,Rg,Aft,gft,hft,_ft,Eft,yft,Sft,Tft,bft,wdn,Ift,Cft,vft,Rft,xft,Dft,f7,m7,Nft,A7,g7,wft,kft,kdn,Bdn,Bft,Oft,Pft,Mft,Lft,Uft,Qft,Fft,Odn,Gft,h7,_7,jft,E7,zft,y7,Hft,$ft,qft,Vft,Kft,Yft,Jft,Zft,Wft,Pdn,Xft,emt,Mdn,tmt,nmt,Ldn,rmt,omt,imt,smt,amt,umt,cmt,lmt,w_,dmt,pmt,fmt,S7,Jbe=k(()=>{m();gpt="aspnetcore.diagnostics.exception.result",hpt="aborted",_pt="handled",Ept="skipped",ypt="unhandled",Spt="aspnetcore.diagnostics.handler.type",Tpt="aspnetcore.rate_limiting.policy",bpt="aspnetcore.rate_limiting.result",Ipt="acquired",Cpt="endpoint_limiter",vpt="global_limiter",Rpt="request_canceled",xpt="aspnetcore.request.is_unhandled",Dpt="aspnetcore.routing.is_fallback",Npt="aspnetcore.routing.match_status",wpt="failure",kpt="success",Bpt="aspnetcore.user.is_authenticated",Opt="client.address",Ppt="client.port",Mpt="code.column.number",Lpt="code.file.path",Upt="code.function.name",Qpt="code.line.number",Fpt="code.stacktrace",u7="db.collection.name",c7="db.namespace",Gpt="db.operation.batch.size",$C="db.operation.name",jpt="db.query.summary",l7="db.query.text",d7="db.response.status_code",zpt="db.stored_procedure.name",AS="db.system.name",Hpt="mariadb",$pt="microsoft.sql_server",qpt="mysql",Vpt="postgresql",Kpt="dotnet.gc.heap.generation",Ypt="gen0",Jpt="gen1",Zpt="gen2",Rdn="loh",xdn="poh",p7="error.type",Wpt="_OTHER",Xpt="exception.escaped",eft="exception.message",tft="exception.stacktrace",nft="exception.type",rft=e=>`http.request.header.${e}`,gS="http.request.method",oft="_OTHER",ift="CONNECT",sft="DELETE",Ddn="GET",aft="HEAD",uft="OPTIONS",cft="PATCH",lft="POST",Ndn="PUT",dft="TRACE",pft="http.request.method_original",fft="http.request.resend_count",mft=e=>`http.response.header.${e}`,vg="http.response.status_code",Rg="http.route",Aft="jvm.gc.action",gft="jvm.gc.name",hft="jvm.memory.pool.name",_ft="jvm.memory.type",Eft="heap",yft="non_heap",Sft="jvm.thread.daemon",Tft="jvm.thread.state",bft="blocked",wdn="new",Ift="runnable",Cft="terminated",vft="timed_waiting",Rft="waiting",xft="network.local.address",Dft="network.local.port",f7="network.peer.address",m7="network.peer.port",Nft="network.protocol.name",A7="network.protocol.version",g7="network.transport",wft="pipe",kft="quic",kdn="tcp",Bdn="udp",Bft="unix",Oft="network.type",Pft="ipv4",Mft="ipv6",Lft="otel.scope.name",Uft="otel.scope.version",Qft="otel.status_code",Fft="ERROR",Odn="OK",Gft="otel.status_description",h7="server.address",_7="server.port",jft="service.instance.id",E7="service.name",zft="service.namespace",y7="service.version",Hft="signalr.connection.status",$ft="app_shutdown",qft="normal_closure",Vft="timeout",Kft="signalr.transport",Yft="long_polling",Jft="server_sent_events",Zft="web_sockets",Wft="telemetry.sdk.language",Pdn="cpp",Xft="dotnet",emt="erlang",Mdn="go",tmt="java",nmt="nodejs",Ldn="php",rmt="python",omt="ruby",imt="rust",smt="swift",amt="webjs",umt="telemetry.sdk.name",cmt="telemetry.sdk.version",lmt="url.fragment",w_="url.full",dmt="url.path",pmt="url.query",fmt="url.scheme",S7="user_agent.original"});var mmt,Amt,gmt,hmt,_mt,Emt,ymt,Smt,Tmt,bmt,Imt,Cmt,vmt,Rmt,xmt,Dmt,Nmt,wmt,kmt,Bmt,Omt,Pmt,Mmt,Lmt,Umt,Qmt,Fmt,Gmt,jmt,zmt,Hmt,$mt,qmt,Vmt,Kmt,Ymt,Jmt,Zmt,Wmt,Xmt,eAt,tAt,nAt,rAt,oAt,iAt,sAt,aAt,uAt,cAt,lAt,Zbe=k(()=>{m();mmt="aspnetcore.diagnostics.exceptions",Amt="aspnetcore.rate_limiting.active_request_leases",gmt="aspnetcore.rate_limiting.queued_requests",hmt="aspnetcore.rate_limiting.request.time_in_queue",_mt="aspnetcore.rate_limiting.request_lease.duration",Emt="aspnetcore.rate_limiting.requests",ymt="aspnetcore.routing.match_attempts",Smt="db.client.operation.duration",Tmt="dotnet.assembly.count",bmt="dotnet.exceptions",Imt="dotnet.gc.collections",Cmt="dotnet.gc.heap.total_allocated",vmt="dotnet.gc.last_collection.heap.fragmentation.size",Rmt="dotnet.gc.last_collection.heap.size",xmt="dotnet.gc.last_collection.memory.committed_size",Dmt="dotnet.gc.pause.time",Nmt="dotnet.jit.compilation.time",wmt="dotnet.jit.compiled_il.size",kmt="dotnet.jit.compiled_methods",Bmt="dotnet.monitor.lock_contentions",Omt="dotnet.process.cpu.count",Pmt="dotnet.process.cpu.time",Mmt="dotnet.process.memory.working_set",Lmt="dotnet.thread_pool.queue.length",Umt="dotnet.thread_pool.thread.count",Qmt="dotnet.thread_pool.work_item.count",Fmt="dotnet.timer.count",Gmt="http.client.request.duration",jmt="http.server.request.duration",zmt="jvm.class.count",Hmt="jvm.class.loaded",$mt="jvm.class.unloaded",qmt="jvm.cpu.count",Vmt="jvm.cpu.recent_utilization",Kmt="jvm.cpu.time",Ymt="jvm.gc.duration",Jmt="jvm.memory.committed",Zmt="jvm.memory.limit",Wmt="jvm.memory.used",Xmt="jvm.memory.used_after_last_gc",eAt="jvm.thread.count",tAt="kestrel.active_connections",nAt="kestrel.active_tls_handshakes",rAt="kestrel.connection.duration",oAt="kestrel.queued_connections",iAt="kestrel.queued_requests",sAt="kestrel.rejected_connections",aAt="kestrel.tls_handshake.duration",uAt="kestrel.upgraded_connections",cAt="signalr.server.active_connections",lAt="signalr.server.connection.duration"});var dAt,Wbe=k(()=>{m();dAt="exception"});var Kr={};Xs(Kr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>hpt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>_pt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>Ept,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>ypt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>Ipt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>Cpt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>vpt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>Rpt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>wpt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>kpt,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>gpt,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Spt,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Tpt,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>bpt,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>xpt,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>Dpt,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>Npt,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>Bpt,ATTR_CLIENT_ADDRESS:()=>Opt,ATTR_CLIENT_PORT:()=>Ppt,ATTR_CODE_COLUMN_NUMBER:()=>Mpt,ATTR_CODE_FILE_PATH:()=>Lpt,ATTR_CODE_FUNCTION_NAME:()=>Upt,ATTR_CODE_LINE_NUMBER:()=>Qpt,ATTR_CODE_STACKTRACE:()=>Fpt,ATTR_DB_COLLECTION_NAME:()=>u7,ATTR_DB_NAMESPACE:()=>c7,ATTR_DB_OPERATION_BATCH_SIZE:()=>Gpt,ATTR_DB_OPERATION_NAME:()=>$C,ATTR_DB_QUERY_SUMMARY:()=>jpt,ATTR_DB_QUERY_TEXT:()=>l7,ATTR_DB_RESPONSE_STATUS_CODE:()=>d7,ATTR_DB_STORED_PROCEDURE_NAME:()=>zpt,ATTR_DB_SYSTEM_NAME:()=>AS,ATTR_DOTNET_GC_HEAP_GENERATION:()=>Kpt,ATTR_ERROR_TYPE:()=>p7,ATTR_EXCEPTION_ESCAPED:()=>Xpt,ATTR_EXCEPTION_MESSAGE:()=>eft,ATTR_EXCEPTION_STACKTRACE:()=>tft,ATTR_EXCEPTION_TYPE:()=>nft,ATTR_HTTP_REQUEST_HEADER:()=>rft,ATTR_HTTP_REQUEST_METHOD:()=>gS,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>pft,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>fft,ATTR_HTTP_RESPONSE_HEADER:()=>mft,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>vg,ATTR_HTTP_ROUTE:()=>Rg,ATTR_JVM_GC_ACTION:()=>Aft,ATTR_JVM_GC_NAME:()=>gft,ATTR_JVM_MEMORY_POOL_NAME:()=>hft,ATTR_JVM_MEMORY_TYPE:()=>_ft,ATTR_JVM_THREAD_DAEMON:()=>Sft,ATTR_JVM_THREAD_STATE:()=>Tft,ATTR_NETWORK_LOCAL_ADDRESS:()=>xft,ATTR_NETWORK_LOCAL_PORT:()=>Dft,ATTR_NETWORK_PEER_ADDRESS:()=>f7,ATTR_NETWORK_PEER_PORT:()=>m7,ATTR_NETWORK_PROTOCOL_NAME:()=>Nft,ATTR_NETWORK_PROTOCOL_VERSION:()=>A7,ATTR_NETWORK_TRANSPORT:()=>g7,ATTR_NETWORK_TYPE:()=>Oft,ATTR_OTEL_SCOPE_NAME:()=>Lft,ATTR_OTEL_SCOPE_VERSION:()=>Uft,ATTR_OTEL_STATUS_CODE:()=>Qft,ATTR_OTEL_STATUS_DESCRIPTION:()=>Gft,ATTR_SERVER_ADDRESS:()=>h7,ATTR_SERVER_PORT:()=>_7,ATTR_SERVICE_INSTANCE_ID:()=>jft,ATTR_SERVICE_NAME:()=>E7,ATTR_SERVICE_NAMESPACE:()=>zft,ATTR_SERVICE_VERSION:()=>y7,ATTR_SIGNALR_CONNECTION_STATUS:()=>Hft,ATTR_SIGNALR_TRANSPORT:()=>Kft,ATTR_TELEMETRY_SDK_LANGUAGE:()=>Wft,ATTR_TELEMETRY_SDK_NAME:()=>umt,ATTR_TELEMETRY_SDK_VERSION:()=>cmt,ATTR_URL_FRAGMENT:()=>lmt,ATTR_URL_FULL:()=>w_,ATTR_URL_PATH:()=>dmt,ATTR_URL_QUERY:()=>pmt,ATTR_URL_SCHEME:()=>fmt,ATTR_USER_AGENT_ORIGINAL:()=>S7,AWSECSLAUNCHTYPEVALUES_EC2:()=>Mdt,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>Ldt,AwsEcsLaunchtypeValues:()=>Udt,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>_dt,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>Edt,CLOUDPLATFORMVALUES_AWS_EC2:()=>ydt,CLOUDPLATFORMVALUES_AWS_ECS:()=>Sdt,CLOUDPLATFORMVALUES_AWS_EKS:()=>Tdt,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>Idt,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>bdt,CLOUDPLATFORMVALUES_AZURE_AKS:()=>Rdt,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>Ddt,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>vdt,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>xdt,CLOUDPLATFORMVALUES_AZURE_VM:()=>Cdt,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>Odt,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>Bdt,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>wdt,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>Ndt,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>kdt,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>fdt,CLOUDPROVIDERVALUES_AWS:()=>mdt,CLOUDPROVIDERVALUES_AZURE:()=>Adt,CLOUDPROVIDERVALUES_GCP:()=>gdt,CloudPlatformValues:()=>Pdt,CloudProviderValues:()=>hdt,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>Wat,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>sut,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>Xat,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>iut,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>tut,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>uut,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>nut,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>eut,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>aut,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>out,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>rut,DBSYSTEMVALUES_ADABAS:()=>Sat,DBSYSTEMVALUES_CACHE:()=>yat,DBSYSTEMVALUES_CASSANDRA:()=>Uat,DBSYSTEMVALUES_CLOUDSCAPE:()=>pat,DBSYSTEMVALUES_COCKROACHDB:()=>Jat,DBSYSTEMVALUES_COLDFUSION:()=>Lat,DBSYSTEMVALUES_COSMOSDB:()=>Hat,DBSYSTEMVALUES_COUCHBASE:()=>jat,DBSYSTEMVALUES_COUCHDB:()=>zat,DBSYSTEMVALUES_DB2:()=>uat,DBSYSTEMVALUES_DERBY:()=>bat,DBSYSTEMVALUES_DYNAMODB:()=>$at,DBSYSTEMVALUES_EDB:()=>Eat,DBSYSTEMVALUES_ELASTICSEARCH:()=>Kat,DBSYSTEMVALUES_FILEMAKER:()=>Iat,DBSYSTEMVALUES_FIREBIRD:()=>Tat,DBSYSTEMVALUES_FIRSTSQL:()=>_at,DBSYSTEMVALUES_GEODE:()=>Vat,DBSYSTEMVALUES_H2:()=>Mat,DBSYSTEMVALUES_HANADB:()=>gat,DBSYSTEMVALUES_HBASE:()=>Qat,DBSYSTEMVALUES_HIVE:()=>dat,DBSYSTEMVALUES_HSQLDB:()=>fat,DBSYSTEMVALUES_INFORMIX:()=>Cat,DBSYSTEMVALUES_INGRES:()=>hat,DBSYSTEMVALUES_INSTANTDB:()=>vat,DBSYSTEMVALUES_INTERBASE:()=>Rat,DBSYSTEMVALUES_MARIADB:()=>xat,DBSYSTEMVALUES_MAXDB:()=>Aat,DBSYSTEMVALUES_MEMCACHED:()=>Yat,DBSYSTEMVALUES_MONGODB:()=>Fat,DBSYSTEMVALUES_MSSQL:()=>iat,DBSYSTEMVALUES_MYSQL:()=>sat,DBSYSTEMVALUES_NEO4J:()=>qat,DBSYSTEMVALUES_NETEZZA:()=>Dat,DBSYSTEMVALUES_ORACLE:()=>aat,DBSYSTEMVALUES_OTHER_SQL:()=>oat,DBSYSTEMVALUES_PERVASIVE:()=>Nat,DBSYSTEMVALUES_POINTBASE:()=>wat,DBSYSTEMVALUES_POSTGRESQL:()=>cat,DBSYSTEMVALUES_PROGRESS:()=>mat,DBSYSTEMVALUES_REDIS:()=>Gat,DBSYSTEMVALUES_REDSHIFT:()=>lat,DBSYSTEMVALUES_SQLITE:()=>kat,DBSYSTEMVALUES_SYBASE:()=>Bat,DBSYSTEMVALUES_TERADATA:()=>Oat,DBSYSTEMVALUES_VERTICA:()=>Pat,DB_SYSTEM_NAME_VALUE_MARIADB:()=>Hpt,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>$pt,DB_SYSTEM_NAME_VALUE_MYSQL:()=>qpt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>Vpt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>Ypt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>Jpt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>Zpt,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>Rdn,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>xdn,DbCassandraConsistencyLevelValues:()=>cut,DbSystemValues:()=>Zat,ERROR_TYPE_VALUE_OTHER:()=>Wpt,EVENT_EXCEPTION:()=>dAt,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>_ut,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>hut,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>gut,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>yut,FAASINVOKEDPROVIDERVALUES_AWS:()=>Sut,FAASINVOKEDPROVIDERVALUES_AZURE:()=>Tut,FAASINVOKEDPROVIDERVALUES_GCP:()=>but,FAASTRIGGERVALUES_DATASOURCE:()=>lut,FAASTRIGGERVALUES_HTTP:()=>dut,FAASTRIGGERVALUES_OTHER:()=>mut,FAASTRIGGERVALUES_PUBSUB:()=>put,FAASTRIGGERVALUES_TIMER:()=>fut,FaasDocumentOperationValues:()=>Eut,FaasInvokedProviderValues:()=>Iut,FaasTriggerValues:()=>Aut,HOSTARCHVALUES_AMD64:()=>Qdt,HOSTARCHVALUES_ARM32:()=>Fdt,HOSTARCHVALUES_ARM64:()=>Gdt,HOSTARCHVALUES_IA64:()=>jdt,HOSTARCHVALUES_PPC32:()=>zdt,HOSTARCHVALUES_PPC64:()=>Hdt,HOSTARCHVALUES_X86:()=>$dt,HTTPFLAVORVALUES_HTTP_1_0:()=>act,HTTPFLAVORVALUES_HTTP_1_1:()=>uct,HTTPFLAVORVALUES_HTTP_2_0:()=>cct,HTTPFLAVORVALUES_QUIC:()=>dct,HTTPFLAVORVALUES_SPDY:()=>lct,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>ift,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>sft,HTTP_REQUEST_METHOD_VALUE_GET:()=>Ddn,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>aft,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>uft,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>oft,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>cft,HTTP_REQUEST_METHOD_VALUE_POST:()=>lft,HTTP_REQUEST_METHOD_VALUE_PUT:()=>Ndn,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>dft,HostArchValues:()=>qdt,HttpFlavorValues:()=>pct,JVM_MEMORY_TYPE_VALUE_HEAP:()=>Eft,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>yft,JVM_THREAD_STATE_VALUE_BLOCKED:()=>bft,JVM_THREAD_STATE_VALUE_NEW:()=>wdn,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>Ift,JVM_THREAD_STATE_VALUE_TERMINATED:()=>Cft,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>vft,JVM_THREAD_STATE_VALUE_WAITING:()=>Rft,MESSAGETYPEVALUES_RECEIVED:()=>Uct,MESSAGETYPEVALUES_SENT:()=>Lct,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>fct,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>mct,MESSAGINGOPERATIONVALUES_PROCESS:()=>hct,MESSAGINGOPERATIONVALUES_RECEIVE:()=>gct,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>mmt,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>Amt,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>gmt,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>Emt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>_mt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>hmt,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>ymt,METRIC_DB_CLIENT_OPERATION_DURATION:()=>Smt,METRIC_DOTNET_ASSEMBLY_COUNT:()=>Tmt,METRIC_DOTNET_EXCEPTIONS:()=>bmt,METRIC_DOTNET_GC_COLLECTIONS:()=>Imt,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>Cmt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>vmt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>Rmt,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>xmt,METRIC_DOTNET_GC_PAUSE_TIME:()=>Dmt,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>Nmt,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>wmt,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>kmt,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>Bmt,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>Omt,METRIC_DOTNET_PROCESS_CPU_TIME:()=>Pmt,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>Mmt,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>Lmt,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>Umt,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>Qmt,METRIC_DOTNET_TIMER_COUNT:()=>Fmt,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>Gmt,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>jmt,METRIC_JVM_CLASS_COUNT:()=>zmt,METRIC_JVM_CLASS_LOADED:()=>Hmt,METRIC_JVM_CLASS_UNLOADED:()=>$mt,METRIC_JVM_CPU_COUNT:()=>qmt,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>Vmt,METRIC_JVM_CPU_TIME:()=>Kmt,METRIC_JVM_GC_DURATION:()=>Ymt,METRIC_JVM_MEMORY_COMMITTED:()=>Jmt,METRIC_JVM_MEMORY_LIMIT:()=>Zmt,METRIC_JVM_MEMORY_USED:()=>Wmt,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>Xmt,METRIC_JVM_THREAD_COUNT:()=>eAt,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>tAt,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>nAt,METRIC_KESTREL_CONNECTION_DURATION:()=>rAt,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>oAt,METRIC_KESTREL_QUEUED_REQUESTS:()=>iAt,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>sAt,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>aAt,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>uAt,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>cAt,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>lAt,MessageTypeValues:()=>Qct,MessagingDestinationKindValues:()=>Act,MessagingOperationValues:()=>_ct,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>jut,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>$ut,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>Fut,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>Wut,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>zut,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>Hut,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>Jut,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>Qut,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>ect,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>qut,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>Kut,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>Xut,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>Vut,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>Yut,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>nct,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>Zut,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>ict,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>rct,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>oct,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>tct,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>Gut,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>Put,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>Mut,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>Lut,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>But,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>Out,NETTRANSPORTVALUES_INPROC:()=>Nut,NETTRANSPORTVALUES_IP:()=>Rut,NETTRANSPORTVALUES_IP_TCP:()=>Cut,NETTRANSPORTVALUES_IP_UDP:()=>vut,NETTRANSPORTVALUES_OTHER:()=>wut,NETTRANSPORTVALUES_PIPE:()=>Dut,NETTRANSPORTVALUES_UNIX:()=>xut,NETWORK_TRANSPORT_VALUE_PIPE:()=>wft,NETWORK_TRANSPORT_VALUE_QUIC:()=>kft,NETWORK_TRANSPORT_VALUE_TCP:()=>kdn,NETWORK_TRANSPORT_VALUE_UDP:()=>Bdn,NETWORK_TRANSPORT_VALUE_UNIX:()=>Bft,NETWORK_TYPE_VALUE_IPV4:()=>Pft,NETWORK_TYPE_VALUE_IPV6:()=>Mft,NetHostConnectionSubtypeValues:()=>sct,NetHostConnectionTypeValues:()=>Uut,NetTransportValues:()=>kut,OSTYPEVALUES_AIX:()=>tpt,OSTYPEVALUES_DARWIN:()=>Ydt,OSTYPEVALUES_DRAGONFLYBSD:()=>Xdt,OSTYPEVALUES_FREEBSD:()=>Jdt,OSTYPEVALUES_HPUX:()=>ept,OSTYPEVALUES_LINUX:()=>Kdt,OSTYPEVALUES_NETBSD:()=>Zdt,OSTYPEVALUES_OPENBSD:()=>Wdt,OSTYPEVALUES_SOLARIS:()=>npt,OSTYPEVALUES_WINDOWS:()=>Vdt,OSTYPEVALUES_Z_OS:()=>rpt,OTEL_STATUS_CODE_VALUE_ERROR:()=>Fft,OTEL_STATUS_CODE_VALUE_OK:()=>Odn,OsTypeValues:()=>opt,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>Dct,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>Cct,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>yct,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>Oct,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>bct,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>xct,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>kct,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>Tct,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>Ict,RPCGRPCSTATUSCODEVALUES_OK:()=>Ect,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>Nct,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>vct,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>Rct,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>Pct,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>Bct,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>wct,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>Sct,RpcGrpcStatusCodeValues:()=>Mct,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>Ast,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>Rst,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>pst,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>ust,SEMATTRS_AWS_DYNAMODB_COUNT:()=>Cst,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>yst,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>_st,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>xst,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>gst,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>cst,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>mst,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>Est,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>fst,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>lst,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>dst,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>vst,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>Tst,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>bst,SEMATTRS_AWS_DYNAMODB_SELECT:()=>hst,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>Sst,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>ast,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>Ist,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>Xot,SEMATTRS_CODE_FILEPATH:()=>Zit,SEMATTRS_CODE_FUNCTION:()=>Yit,SEMATTRS_CODE_LINENO:()=>Wit,SEMATTRS_CODE_NAMESPACE:()=>Jit,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>uit,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>fit,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>pit,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>lit,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>sit,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>ait,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>dit,SEMATTRS_DB_CASSANDRA_TABLE:()=>cit,SEMATTRS_DB_CONNECTION_STRING:()=>eit,SEMATTRS_DB_HBASE_NAMESPACE:()=>mit,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>nit,SEMATTRS_DB_MONGODB_COLLECTION:()=>git,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>iit,SEMATTRS_DB_NAME:()=>rit,SEMATTRS_DB_OPERATION:()=>oit,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>Ait,SEMATTRS_DB_SQL_TABLE:()=>hit,SEMATTRS_DB_STATEMENT:()=>YV,SEMATTRS_DB_SYSTEM:()=>KV,SEMATTRS_DB_USER:()=>tit,SEMATTRS_ENDUSER_ID:()=>Hit,SEMATTRS_ENDUSER_ROLE:()=>$it,SEMATTRS_ENDUSER_SCOPE:()=>qit,SEMATTRS_EXCEPTION_ESCAPED:()=>Sit,SEMATTRS_EXCEPTION_MESSAGE:()=>Eit,SEMATTRS_EXCEPTION_STACKTRACE:()=>yit,SEMATTRS_EXCEPTION_TYPE:()=>_it,SEMATTRS_FAAS_COLDSTART:()=>Dit,SEMATTRS_FAAS_CRON:()=>xit,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>bit,SEMATTRS_FAAS_DOCUMENT_NAME:()=>vit,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>Iit,SEMATTRS_FAAS_DOCUMENT_TIME:()=>Cit,SEMATTRS_FAAS_EXECUTION:()=>Tit,SEMATTRS_FAAS_INVOKED_NAME:()=>Nit,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>wit,SEMATTRS_FAAS_INVOKED_REGION:()=>kit,SEMATTRS_FAAS_TIME:()=>Rit,SEMATTRS_FAAS_TRIGGER:()=>JV,SEMATTRS_HTTP_CLIENT_IP:()=>sst,SEMATTRS_HTTP_FLAVOR:()=>tst,SEMATTRS_HTTP_HOST:()=>Xit,SEMATTRS_HTTP_METHOD:()=>kw,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>rst,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>ost,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>t7,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>n7,SEMATTRS_HTTP_ROUTE:()=>r7,SEMATTRS_HTTP_SCHEME:()=>est,SEMATTRS_HTTP_SERVER_NAME:()=>ist,SEMATTRS_HTTP_STATUS_CODE:()=>mS,SEMATTRS_HTTP_TARGET:()=>e7,SEMATTRS_HTTP_URL:()=>HC,SEMATTRS_HTTP_USER_AGENT:()=>nst,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>tat,SEMATTRS_MESSAGE_ID:()=>eat,SEMATTRS_MESSAGE_TYPE:()=>Xst,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>nat,SEMATTRS_MESSAGING_CONSUMER_ID:()=>Fst,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>Mst,SEMATTRS_MESSAGING_DESTINATION:()=>Dst,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>Nst,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>Hst,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>zst,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>jst,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>$st,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>qst,SEMATTRS_MESSAGING_MESSAGE_ID:()=>Pst,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>Ust,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>Lst,SEMATTRS_MESSAGING_OPERATION:()=>Qst,SEMATTRS_MESSAGING_PROTOCOL:()=>kst,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>Bst,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>Gst,SEMATTRS_MESSAGING_SYSTEM:()=>o7,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>wst,SEMATTRS_MESSAGING_URL:()=>Ost,SEMATTRS_NET_HOST_CARRIER_ICC:()=>jit,SEMATTRS_NET_HOST_CARRIER_MCC:()=>Fit,SEMATTRS_NET_HOST_CARRIER_MNC:()=>Git,SEMATTRS_NET_HOST_CARRIER_NAME:()=>Qit,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>Uit,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>Lit,SEMATTRS_NET_HOST_IP:()=>WV,SEMATTRS_NET_HOST_NAME:()=>Mit,SEMATTRS_NET_HOST_PORT:()=>XV,SEMATTRS_NET_PEER_IP:()=>ZV,SEMATTRS_NET_PEER_NAME:()=>Pit,SEMATTRS_NET_PEER_PORT:()=>Oit,SEMATTRS_NET_TRANSPORT:()=>Bit,SEMATTRS_PEER_SERVICE:()=>zit,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>s7,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>Zst,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>Wst,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>Jst,SEMATTRS_RPC_JSONRPC_VERSION:()=>Yst,SEMATTRS_RPC_METHOD:()=>Kst,SEMATTRS_RPC_SERVICE:()=>i7,SEMATTRS_RPC_SYSTEM:()=>Vst,SEMATTRS_THREAD_ID:()=>Vit,SEMATTRS_THREAD_NAME:()=>Kit,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>qct,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>$ct,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>Vct,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>Kct,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>Yct,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>Jct,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>Zct,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>Xct,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>Wct,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>tlt,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>elt,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>Gct,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>zct,SEMRESATTRS_CLOUD_PLATFORM:()=>Hct,SEMRESATTRS_CLOUD_PROVIDER:()=>Fct,SEMRESATTRS_CLOUD_REGION:()=>jct,SEMRESATTRS_CONTAINER_ID:()=>rlt,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>ilt,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>slt,SEMRESATTRS_CONTAINER_NAME:()=>nlt,SEMRESATTRS_CONTAINER_RUNTIME:()=>olt,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>alt,SEMRESATTRS_DEVICE_ID:()=>ult,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>clt,SEMRESATTRS_DEVICE_MODEL_NAME:()=>llt,SEMRESATTRS_FAAS_ID:()=>plt,SEMRESATTRS_FAAS_INSTANCE:()=>mlt,SEMRESATTRS_FAAS_MAX_MEMORY:()=>Alt,SEMRESATTRS_FAAS_NAME:()=>dlt,SEMRESATTRS_FAAS_VERSION:()=>flt,SEMRESATTRS_HOST_ARCH:()=>Elt,SEMRESATTRS_HOST_ID:()=>glt,SEMRESATTRS_HOST_IMAGE_ID:()=>Slt,SEMRESATTRS_HOST_IMAGE_NAME:()=>ylt,SEMRESATTRS_HOST_IMAGE_VERSION:()=>Tlt,SEMRESATTRS_HOST_NAME:()=>hlt,SEMRESATTRS_HOST_TYPE:()=>_lt,SEMRESATTRS_K8S_CLUSTER_NAME:()=>blt,SEMRESATTRS_K8S_CONTAINER_NAME:()=>Dlt,SEMRESATTRS_K8S_CRONJOB_NAME:()=>Glt,SEMRESATTRS_K8S_CRONJOB_UID:()=>Flt,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>Llt,SEMRESATTRS_K8S_DAEMONSET_UID:()=>Mlt,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>Blt,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>klt,SEMRESATTRS_K8S_JOB_NAME:()=>Qlt,SEMRESATTRS_K8S_JOB_UID:()=>Ult,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>vlt,SEMRESATTRS_K8S_NODE_NAME:()=>Ilt,SEMRESATTRS_K8S_NODE_UID:()=>Clt,SEMRESATTRS_K8S_POD_NAME:()=>xlt,SEMRESATTRS_K8S_POD_UID:()=>Rlt,SEMRESATTRS_K8S_REPLICASET_NAME:()=>wlt,SEMRESATTRS_K8S_REPLICASET_UID:()=>Nlt,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>Plt,SEMRESATTRS_K8S_STATEFULSET_UID:()=>Olt,SEMRESATTRS_OS_DESCRIPTION:()=>zlt,SEMRESATTRS_OS_NAME:()=>Hlt,SEMRESATTRS_OS_TYPE:()=>jlt,SEMRESATTRS_OS_VERSION:()=>$lt,SEMRESATTRS_PROCESS_COMMAND:()=>Ylt,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>Zlt,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>Jlt,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>Vlt,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>Klt,SEMRESATTRS_PROCESS_OWNER:()=>Wlt,SEMRESATTRS_PROCESS_PID:()=>qlt,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>tdt,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>Xlt,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>edt,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>rdt,SEMRESATTRS_SERVICE_NAME:()=>ndt,SEMRESATTRS_SERVICE_NAMESPACE:()=>a7,SEMRESATTRS_SERVICE_VERSION:()=>odt,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>udt,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>sdt,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>idt,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>adt,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>ddt,SEMRESATTRS_WEBENGINE_NAME:()=>cdt,SEMRESATTRS_WEBENGINE_VERSION:()=>ldt,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>$ft,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>qft,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>Vft,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>Yft,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>Jft,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>Zft,SemanticAttributes:()=>rat,SemanticResourceAttributes:()=>pdt,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>ipt,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>spt,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>apt,TELEMETRYSDKLANGUAGEVALUES_GO:()=>upt,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>cpt,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>lpt,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>dpt,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>ppt,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>fpt,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>mpt,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>Pdn,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>Xft,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>emt,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>Mdn,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>tmt,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>nmt,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>Ldn,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>rmt,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>omt,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>imt,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>smt,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>amt,TelemetrySdkLanguageValues:()=>Apt});var tr=k(()=>{m();bSe();Ybe();Jbe();Zbe();Wbe()});var Xbe=M(LU=>{"use strict";m();Object.defineProperty(LU,"__esModule",{value:!0});LU.ATTR_PROCESS_RUNTIME_NAME=void 0;LU.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var eIe=M(QU=>{"use strict";m();Object.defineProperty(QU,"__esModule",{value:!0});QU.SDK_INFO=void 0;var pAt=khe(),UU=(tr(),Le(Kr)),fAt=Xbe();QU.SDK_INFO={[UU.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[fAt.ATTR_PROCESS_RUNTIME_NAME]:"node",[UU.ATTR_TELEMETRY_SDK_LANGUAGE]:UU.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[UU.ATTR_TELEMETRY_SDK_VERSION]:pAt.VERSION}});var tIe=M(su=>{"use strict";m();Object.defineProperty(su,"__esModule",{value:!0});su.otperformance=su.SDK_INFO=su._globalThis=su.getStringListFromEnv=su.getNumberFromEnv=su.getBooleanFromEnv=su.getStringFromEnv=void 0;var FU=Nhe();Object.defineProperty(su,"getStringFromEnv",{enumerable:!0,get:function(){return FU.getStringFromEnv}});Object.defineProperty(su,"getBooleanFromEnv",{enumerable:!0,get:function(){return FU.getBooleanFromEnv}});Object.defineProperty(su,"getNumberFromEnv",{enumerable:!0,get:function(){return FU.getNumberFromEnv}});Object.defineProperty(su,"getStringListFromEnv",{enumerable:!0,get:function(){return FU.getStringListFromEnv}});var mAt=whe();Object.defineProperty(su,"_globalThis",{enumerable:!0,get:function(){return mAt._globalThis}});var AAt=eIe();Object.defineProperty(su,"SDK_INFO",{enumerable:!0,get:function(){return AAt.SDK_INFO}});su.otperformance=performance});var T7=M(au=>{"use strict";m();Object.defineProperty(au,"__esModule",{value:!0});au.getStringListFromEnv=au.getNumberFromEnv=au.getStringFromEnv=au.getBooleanFromEnv=au.otperformance=au._globalThis=au.SDK_INFO=void 0;var hS=tIe();Object.defineProperty(au,"SDK_INFO",{enumerable:!0,get:function(){return hS.SDK_INFO}});Object.defineProperty(au,"_globalThis",{enumerable:!0,get:function(){return hS._globalThis}});Object.defineProperty(au,"otperformance",{enumerable:!0,get:function(){return hS.otperformance}});Object.defineProperty(au,"getBooleanFromEnv",{enumerable:!0,get:function(){return hS.getBooleanFromEnv}});Object.defineProperty(au,"getStringFromEnv",{enumerable:!0,get:function(){return hS.getStringFromEnv}});Object.defineProperty(au,"getNumberFromEnv",{enumerable:!0,get:function(){return hS.getNumberFromEnv}});Object.defineProperty(au,"getStringListFromEnv",{enumerable:!0,get:function(){return hS.getStringListFromEnv}})});var iIe=M(Yr=>{"use strict";m();Object.defineProperty(Yr,"__esModule",{value:!0});Yr.addHrTimes=Yr.isTimeInput=Yr.isTimeInputHrTime=Yr.hrTimeToSeconds=Yr.hrTimeToMilliseconds=Yr.hrTimeToMicroseconds=Yr.hrTimeToNanoseconds=Yr.hrTimeToTimeStamp=Yr.hrTimeDuration=Yr.timeInputToHrTime=Yr.hrTime=Yr.getTimeOrigin=Yr.millisToHrTime=void 0;var GU=T7(),nIe=9,gAt=6,hAt=Math.pow(10,gAt),Bw=Math.pow(10,nIe);function Ow(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*hAt);return[n,r]}Yr.millisToHrTime=Ow;function _At(){return GU.otperformance.timeOrigin}Yr.getTimeOrigin=_At;function rIe(e){let t=Ow(GU.otperformance.timeOrigin),n=Ow(typeof e=="number"?e:GU.otperformance.now());return oIe(t,n)}Yr.hrTime=rIe;function EAt(e){if(b7(e))return e;if(typeof e=="number")return e<GU.otperformance.timeOrigin?rIe(e):Ow(e);if(e instanceof Date)return Ow(e.getTime());throw TypeError("Invalid input type")}Yr.timeInputToHrTime=EAt;function yAt(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=Bw),[n,r]}Yr.hrTimeDuration=yAt;function SAt(e){let t=nIe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}Yr.hrTimeToTimeStamp=SAt;function TAt(e){return e[0]*Bw+e[1]}Yr.hrTimeToNanoseconds=TAt;function bAt(e){return e[0]*1e6+e[1]/1e3}Yr.hrTimeToMicroseconds=bAt;function IAt(e){return e[0]*1e3+e[1]/1e6}Yr.hrTimeToMilliseconds=IAt;function CAt(e){return e[0]+e[1]/Bw}Yr.hrTimeToSeconds=CAt;function b7(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}Yr.isTimeInputHrTime=b7;function vAt(e){return b7(e)||typeof e=="number"||e instanceof Date}Yr.isTimeInput=vAt;function oIe(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Bw&&(n[1]-=Bw,n[0]+=1),n}Yr.addHrTimes=oIe});var sIe=M(jU=>{"use strict";m();Object.defineProperty(jU,"__esModule",{value:!0});jU.unrefTimer=void 0;function RAt(e){typeof e!="number"&&e.unref()}jU.unrefTimer=RAt});var aIe=M(Pw=>{"use strict";m();Object.defineProperty(Pw,"__esModule",{value:!0});Pw.ExportResultCode=void 0;var xAt;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(xAt=Pw.ExportResultCode||(Pw.ExportResultCode={}))});var cIe=M(zU=>{"use strict";m();Object.defineProperty(zU,"__esModule",{value:!0});zU.CompositePropagator=void 0;var uIe=($e(),Le(nt)),I7=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){uIe.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){uIe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${s.message}`)}return o},t)}fields(){return this._fields.slice()}};zU.CompositePropagator=I7});var lIe=M(qC=>{"use strict";m();Object.defineProperty(qC,"__esModule",{value:!0});qC.validateValue=qC.validateKey=void 0;var C7="[_0-9a-z-*/]",DAt=`[a-z]${C7}{0,255}`,NAt=`[a-z0-9]${C7}{0,240}@[a-z]${C7}{0,13}`,wAt=new RegExp(`^(?:${DAt}|${NAt})$`),kAt=/^[ -~]{0,255}[!-~]$/,BAt=/,|=/;function OAt(e){return wAt.test(e)}qC.validateKey=OAt;function PAt(e){return kAt.test(e)&&!BAt.test(e)}qC.validateValue=PAt});var R7=M($U=>{"use strict";m();Object.defineProperty($U,"__esModule",{value:!0});$U.TraceState=void 0;var HU=lIe(),MAt=32,dIe=512,pIe=",",fIe="=",v7=class e{_length;_rawTraceState;_internalState;constructor(t){this._rawTraceState=typeof t=="string"?t:"",this._length=this._rawTraceState.length}set(t,n){if(!(0,HU.validateKey)(t)||!(0,HU.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>dIe)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=pIe+t),t=`${r[0]}${fIe}${r[1]}`+t,n++;return t}_getState(){if(this._internalState)return this._internalState;let t=this._rawTraceState.split(pIe),n=new Map,r=0;for(let o of t){let i=o.trim(),s=i.indexOf(fIe);if(s===-1)continue;let u=i.slice(0,s),l=i.slice(s+1);if(!(0,HU.validateKey)(u)||!(0,HU.validateValue)(l))continue;let f=r+i.length+(n.size>0?1:0);if(!(f>dIe)&&(n.set(u,l),r=f,n.size>=MAt))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}};$U.TraceState=v7});var AIe=M(uu=>{"use strict";m();Object.defineProperty(uu,"__esModule",{value:!0});uu.W3CTraceContextPropagator=uu.parseTraceParent=uu.TRACE_STATE_HEADER=uu.TRACE_PARENT_HEADER=void 0;var qU=($e(),Le(nt)),LAt=Nw(),UAt=R7();uu.TRACE_PARENT_HEADER="traceparent";uu.TRACE_STATE_HEADER="tracestate";var QAt="00",FAt="(?!ff)[\\da-f]{2}",GAt="(?![0]{32})[\\da-f]{32}",jAt="(?![0]{16})[\\da-f]{16}",zAt="[\\da-f]{2}",HAt=new RegExp(`^\\s?(${FAt})-(${GAt})-(${jAt})-(${zAt})(-.*)?\\s?$`);function mIe(e){let t=HAt.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}uu.parseTraceParent=mIe;var x7=class{inject(t,n,r){let o=qU.trace.getSpanContext(t);if(!o||(0,LAt.isTracingSuppressed)(t)||!(0,qU.isSpanContextValid)(o))return;let i=`${QAt}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||qU.TraceFlags.NONE).toString(16)}`;r.set(n,uu.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,uu.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,uu.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let s=mIe(i);if(!s)return t;s.isRemote=!0;let u=r.get(n,uu.TRACE_STATE_HEADER);if(u){let l=Array.isArray(u)?u.join(","):u;s.traceState=new UAt.TraceState(typeof l=="string"?l:void 0)}return qU.trace.setSpanContext(t,s)}fields(){return[uu.TRACE_PARENT_HEADER,uu.TRACE_STATE_HEADER]}};uu.W3CTraceContextPropagator=x7});var gIe=M(gf=>{"use strict";m();Object.defineProperty(gf,"__esModule",{value:!0});gf.getRPCMetadata=gf.deleteRPCMetadata=gf.setRPCMetadata=gf.RPCType=void 0;var $At=($e(),Le(nt)),D7=(0,$At.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),qAt;(function(e){e.HTTP="http"})(qAt=gf.RPCType||(gf.RPCType={}));function VAt(e,t){return e.setValue(D7,t)}gf.setRPCMetadata=VAt;function KAt(e){return e.deleteValue(D7)}gf.deleteRPCMetadata=KAt;function YAt(e){return e.getValue(D7)}gf.getRPCMetadata=YAt});var SIe=M(VU=>{"use strict";m();Object.defineProperty(VU,"__esModule",{value:!0});VU.isPlainObject=void 0;var JAt="[object Object]",ZAt="[object Null]",WAt="[object Undefined]",XAt=Function.prototype,hIe=XAt.toString,egt=hIe.call(Object),tgt=Object.getPrototypeOf,_Ie=Object.prototype,EIe=_Ie.hasOwnProperty,_S=Symbol?Symbol.toStringTag:void 0,yIe=_Ie.toString;function ngt(e){if(!rgt(e)||ogt(e)!==JAt)return!1;let t=tgt(e);if(t===null)return!0;let n=EIe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&hIe.call(n)===egt}VU.isPlainObject=ngt;function rgt(e){return e!=null&&typeof e=="object"}function ogt(e){return e==null?e===void 0?WAt:ZAt:_S&&_S in Object(e)?igt(e):sgt(e)}function igt(e){let t=EIe.call(e,_S),n=e[_S],r=!1;try{e[_S]=void 0,r=!0}catch{}let o=yIe.call(e);return r&&(t?e[_S]=n:delete e[_S]),o}function sgt(e){return yIe.call(e)}});var vIe=M(JU=>{"use strict";m();Object.defineProperty(JU,"__esModule",{value:!0});JU.merge=void 0;var TIe=SIe(),agt=20;function ugt(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=IIe(t,e.shift(),0,n);return t}JU.merge=ugt;function N7(e){return YU(e)?e.slice():e}function IIe(e,t,n=0,r){let o;if(!(n>agt)){if(n++,KU(e)||KU(t)||CIe(t))o=N7(t);else if(YU(e)){if(o=e.slice(),YU(t))for(let i=0,s=t.length;i<s;i++)o.push(N7(t[i]));else if(Mw(t)){let i=Object.keys(t);for(let s=0,u=i.length;s<u;s++){let l=i[s];l==="__proto__"||l==="constructor"||l==="prototype"||(o[l]=N7(t[l]))}}}else if(Mw(e))if(Mw(t)){if(!cgt(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let s=0,u=i.length;s<u;s++){let l=i[s];if(l==="__proto__"||l==="constructor"||l==="prototype")continue;let f=t[l];if(KU(f))typeof f>"u"?delete o[l]:o[l]=f;else{let h=o[l],_=f;if(bIe(e,l,r)||bIe(t,l,r))delete o[l];else{if(Mw(h)&&Mw(_)){let E=r.get(h)||[],T=r.get(_)||[];E.push({obj:e,key:l}),T.push({obj:t,key:l}),r.set(h,E),r.set(_,T)}o[l]=IIe(o[l],f,n,r)}}}}else o=t;return o}}function bIe(e,t,n){let r=n.get(e[t])||[];for(let o=0,i=r.length;o<i;o++){let s=r[o];if(s.key===t&&s.obj===e)return!0}return!1}function YU(e){return Array.isArray(e)}function CIe(e){return typeof e=="function"}function Mw(e){return!KU(e)&&!YU(e)&&!CIe(e)&&typeof e=="object"}function KU(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function cgt(e,t){return!(!(0,TIe.isPlainObject)(e)||!(0,TIe.isPlainObject)(t))}});var RIe=M(VC=>{"use strict";m();Object.defineProperty(VC,"__esModule",{value:!0});VC.callWithTimeout=VC.TimeoutError=void 0;var ZU=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};VC.TimeoutError=ZU;function lgt(e,t){let n,r=new Promise(function(i,s){n=setTimeout(function(){s(new ZU("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}VC.callWithTimeout=lgt});var DIe=M(KC=>{"use strict";m();Object.defineProperty(KC,"__esModule",{value:!0});KC.isUrlIgnored=KC.urlMatches=void 0;function xIe(e,t){return typeof t=="string"?e===t:!!e.match(t)}KC.urlMatches=xIe;function dgt(e,t){if(!t)return!1;for(let n of t)if(xIe(e,n))return!0;return!1}KC.isUrlIgnored=dgt});var NIe=M(WU=>{"use strict";m();Object.defineProperty(WU,"__esModule",{value:!0});WU.Deferred=void 0;var w7=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)}};WU.Deferred=w7});var wIe=M(XU=>{"use strict";m();Object.defineProperty(XU,"__esModule",{value:!0});XU.BindOnceFuture=void 0;var pgt=NIe(),k7=class{_isCalled=!1;_deferred=new pgt.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}};XU.BindOnceFuture=k7});var BIe=M(eQ=>{"use strict";m();Object.defineProperty(eQ,"__esModule",{value:!0});eQ.diagLogLevelFromString=void 0;var xg=($e(),Le(nt)),kIe={ALL:xg.DiagLogLevel.ALL,VERBOSE:xg.DiagLogLevel.VERBOSE,DEBUG:xg.DiagLogLevel.DEBUG,INFO:xg.DiagLogLevel.INFO,WARN:xg.DiagLogLevel.WARN,ERROR:xg.DiagLogLevel.ERROR,NONE:xg.DiagLogLevel.NONE};function fgt(e){if(e==null)return;let t=kIe[e.toUpperCase()];return t??(xg.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(kIe)}, using default`),xg.DiagLogLevel.INFO)}eQ.diagLogLevelFromString=fgt});var PIe=M(tQ=>{"use strict";m();Object.defineProperty(tQ,"__esModule",{value:!0});tQ._export=void 0;var OIe=($e(),Le(nt)),mgt=Nw();function Agt(e,t){return new Promise(n=>{OIe.context.with((0,mgt.suppressTracing)(OIe.context.active()),()=>{e.export(t,n)})})}tQ._export=Agt});var Rr=M(ke=>{"use strict";m();Object.defineProperty(ke,"__esModule",{value:!0});ke.diagLogLevelFromString=ke.BindOnceFuture=ke.urlMatches=ke.isUrlIgnored=ke.callWithTimeout=ke.TimeoutError=ke.merge=ke.TraceState=ke.unsuppressTracing=ke.suppressTracing=ke.isTracingSuppressed=ke.setRPCMetadata=ke.getRPCMetadata=ke.deleteRPCMetadata=ke.RPCType=ke.parseTraceParent=ke.W3CTraceContextPropagator=ke.TRACE_STATE_HEADER=ke.TRACE_PARENT_HEADER=ke.CompositePropagator=ke.otperformance=ke.getStringListFromEnv=ke.getNumberFromEnv=ke.getBooleanFromEnv=ke.getStringFromEnv=ke._globalThis=ke.SDK_INFO=ke.parseKeyPairsIntoRecord=ke.ExportResultCode=ke.unrefTimer=ke.timeInputToHrTime=ke.millisToHrTime=ke.isTimeInputHrTime=ke.isTimeInput=ke.hrTimeToTimeStamp=ke.hrTimeToSeconds=ke.hrTimeToNanoseconds=ke.hrTimeToMilliseconds=ke.hrTimeToMicroseconds=ke.hrTimeDuration=ke.hrTime=ke.getTimeOrigin=ke.addHrTimes=ke.loggingErrorHandler=ke.setGlobalErrorHandler=ke.globalErrorHandler=ke.sanitizeAttributes=ke.isAttributeValue=ke.AnchoredClock=ke.W3CBaggagePropagator=void 0;ke.internal=void 0;var ggt=_he();Object.defineProperty(ke,"W3CBaggagePropagator",{enumerable:!0,get:function(){return ggt.W3CBaggagePropagator}});var hgt=Ehe();Object.defineProperty(ke,"AnchoredClock",{enumerable:!0,get:function(){return hgt.AnchoredClock}});var MIe=Ihe();Object.defineProperty(ke,"isAttributeValue",{enumerable:!0,get:function(){return MIe.isAttributeValue}});Object.defineProperty(ke,"sanitizeAttributes",{enumerable:!0,get:function(){return MIe.sanitizeAttributes}});var LIe=vhe();Object.defineProperty(ke,"globalErrorHandler",{enumerable:!0,get:function(){return LIe.globalErrorHandler}});Object.defineProperty(ke,"setGlobalErrorHandler",{enumerable:!0,get:function(){return LIe.setGlobalErrorHandler}});var _gt=qV();Object.defineProperty(ke,"loggingErrorHandler",{enumerable:!0,get:function(){return _gt.loggingErrorHandler}});var $l=iIe();Object.defineProperty(ke,"addHrTimes",{enumerable:!0,get:function(){return $l.addHrTimes}});Object.defineProperty(ke,"getTimeOrigin",{enumerable:!0,get:function(){return $l.getTimeOrigin}});Object.defineProperty(ke,"hrTime",{enumerable:!0,get:function(){return $l.hrTime}});Object.defineProperty(ke,"hrTimeDuration",{enumerable:!0,get:function(){return $l.hrTimeDuration}});Object.defineProperty(ke,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return $l.hrTimeToMicroseconds}});Object.defineProperty(ke,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return $l.hrTimeToMilliseconds}});Object.defineProperty(ke,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return $l.hrTimeToNanoseconds}});Object.defineProperty(ke,"hrTimeToSeconds",{enumerable:!0,get:function(){return $l.hrTimeToSeconds}});Object.defineProperty(ke,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return $l.hrTimeToTimeStamp}});Object.defineProperty(ke,"isTimeInput",{enumerable:!0,get:function(){return $l.isTimeInput}});Object.defineProperty(ke,"isTimeInputHrTime",{enumerable:!0,get:function(){return $l.isTimeInputHrTime}});Object.defineProperty(ke,"millisToHrTime",{enumerable:!0,get:function(){return $l.millisToHrTime}});Object.defineProperty(ke,"timeInputToHrTime",{enumerable:!0,get:function(){return $l.timeInputToHrTime}});var Egt=sIe();Object.defineProperty(ke,"unrefTimer",{enumerable:!0,get:function(){return Egt.unrefTimer}});var ygt=aIe();Object.defineProperty(ke,"ExportResultCode",{enumerable:!0,get:function(){return ygt.ExportResultCode}});var Sgt=jV();Object.defineProperty(ke,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Sgt.parseKeyPairsIntoRecord}});var ES=T7();Object.defineProperty(ke,"SDK_INFO",{enumerable:!0,get:function(){return ES.SDK_INFO}});Object.defineProperty(ke,"_globalThis",{enumerable:!0,get:function(){return ES._globalThis}});Object.defineProperty(ke,"getStringFromEnv",{enumerable:!0,get:function(){return ES.getStringFromEnv}});Object.defineProperty(ke,"getBooleanFromEnv",{enumerable:!0,get:function(){return ES.getBooleanFromEnv}});Object.defineProperty(ke,"getNumberFromEnv",{enumerable:!0,get:function(){return ES.getNumberFromEnv}});Object.defineProperty(ke,"getStringListFromEnv",{enumerable:!0,get:function(){return ES.getStringListFromEnv}});Object.defineProperty(ke,"otperformance",{enumerable:!0,get:function(){return ES.otperformance}});var Tgt=cIe();Object.defineProperty(ke,"CompositePropagator",{enumerable:!0,get:function(){return Tgt.CompositePropagator}});var nQ=AIe();Object.defineProperty(ke,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return nQ.TRACE_PARENT_HEADER}});Object.defineProperty(ke,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return nQ.TRACE_STATE_HEADER}});Object.defineProperty(ke,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return nQ.W3CTraceContextPropagator}});Object.defineProperty(ke,"parseTraceParent",{enumerable:!0,get:function(){return nQ.parseTraceParent}});var rQ=gIe();Object.defineProperty(ke,"RPCType",{enumerable:!0,get:function(){return rQ.RPCType}});Object.defineProperty(ke,"deleteRPCMetadata",{enumerable:!0,get:function(){return rQ.deleteRPCMetadata}});Object.defineProperty(ke,"getRPCMetadata",{enumerable:!0,get:function(){return rQ.getRPCMetadata}});Object.defineProperty(ke,"setRPCMetadata",{enumerable:!0,get:function(){return rQ.setRPCMetadata}});var B7=Nw();Object.defineProperty(ke,"isTracingSuppressed",{enumerable:!0,get:function(){return B7.isTracingSuppressed}});Object.defineProperty(ke,"suppressTracing",{enumerable:!0,get:function(){return B7.suppressTracing}});Object.defineProperty(ke,"unsuppressTracing",{enumerable:!0,get:function(){return B7.unsuppressTracing}});var bgt=R7();Object.defineProperty(ke,"TraceState",{enumerable:!0,get:function(){return bgt.TraceState}});var Igt=vIe();Object.defineProperty(ke,"merge",{enumerable:!0,get:function(){return Igt.merge}});var UIe=RIe();Object.defineProperty(ke,"TimeoutError",{enumerable:!0,get:function(){return UIe.TimeoutError}});Object.defineProperty(ke,"callWithTimeout",{enumerable:!0,get:function(){return UIe.callWithTimeout}});var QIe=DIe();Object.defineProperty(ke,"isUrlIgnored",{enumerable:!0,get:function(){return QIe.isUrlIgnored}});Object.defineProperty(ke,"urlMatches",{enumerable:!0,get:function(){return QIe.urlMatches}});var Cgt=wIe();Object.defineProperty(ke,"BindOnceFuture",{enumerable:!0,get:function(){return Cgt.BindOnceFuture}});var vgt=BIe();Object.defineProperty(ke,"diagLogLevelFromString",{enumerable:!0,get:function(){return vgt.diagLogLevelFromString}});var Rgt=PIe();ke.internal={_export:Rgt._export}});var FIe=M(oQ=>{"use strict";m();Object.defineProperty(oQ,"__esModule",{value:!0});oQ.VERSION=void 0;oQ.VERSION="0.214.0"});var GIe=M(Lw=>{"use strict";m();Object.defineProperty(Lw,"__esModule",{value:!0});Lw.SeverityNumber=void 0;var xgt;(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"})(xgt=Lw.SeverityNumber||(Lw.SeverityNumber={}))});var sQ=M(YC=>{"use strict";m();Object.defineProperty(YC,"__esModule",{value:!0});YC.NOOP_LOGGER=YC.NoopLogger=void 0;var iQ=class{emit(t){}};YC.NoopLogger=iQ;YC.NOOP_LOGGER=new iQ});var jIe=M(km=>{"use strict";m();Object.defineProperty(km,"__esModule",{value:!0});km.API_BACKWARDS_COMPATIBILITY_VERSION=km.makeGetter=km._global=km.GLOBAL_LOGS_API_KEY=void 0;km.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");km._global=globalThis;function Dgt(e,t,n){return r=>r===e?t:n}km.makeGetter=Dgt;km.API_BACKWARDS_COMPATIBILITY_VERSION=1});var O7=M(JC=>{"use strict";m();Object.defineProperty(JC,"__esModule",{value:!0});JC.NOOP_LOGGER_PROVIDER=JC.NoopLoggerProvider=void 0;var Ngt=sQ(),aQ=class{getLogger(t,n,r){return new Ngt.NoopLogger}};JC.NoopLoggerProvider=aQ;JC.NOOP_LOGGER_PROVIDER=new aQ});var zIe=M(uQ=>{"use strict";m();Object.defineProperty(uQ,"__esModule",{value:!0});uQ.ProxyLogger=void 0;var wgt=sQ(),P7=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):wgt.NOOP_LOGGER}};uQ.ProxyLogger=P7});var HIe=M(cQ=>{"use strict";m();Object.defineProperty(cQ,"__esModule",{value:!0});cQ.ProxyLoggerProvider=void 0;var kgt=O7(),Bgt=zIe(),M7=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Bgt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:kgt.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)}};cQ.ProxyLoggerProvider=M7});var qIe=M(lQ=>{"use strict";m();Object.defineProperty(lQ,"__esModule",{value:!0});lQ.LogsAPI=void 0;var Jd=jIe(),Ogt=O7(),$Ie=HIe(),L7=class e{constructor(){this._proxyLoggerProvider=new $Ie.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Jd._global[Jd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Jd._global[Jd.GLOBAL_LOGS_API_KEY]=(0,Jd.makeGetter)(Jd.API_BACKWARDS_COMPATIBILITY_VERSION,t,Ogt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Jd._global[Jd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Jd._global,Jd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Jd._global[Jd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new $Ie.ProxyLoggerProvider}};lQ.LogsAPI=L7});var U7=M(Bm=>{"use strict";m();Object.defineProperty(Bm,"__esModule",{value:!0});Bm.logs=Bm.NoopLogger=Bm.NOOP_LOGGER=Bm.SeverityNumber=void 0;var Pgt=GIe();Object.defineProperty(Bm,"SeverityNumber",{enumerable:!0,get:function(){return Pgt.SeverityNumber}});var VIe=sQ();Object.defineProperty(Bm,"NOOP_LOGGER",{enumerable:!0,get:function(){return VIe.NOOP_LOGGER}});Object.defineProperty(Bm,"NoopLogger",{enumerable:!0,get:function(){return VIe.NoopLogger}});var Mgt=qIe();Bm.logs=Mgt.LogsAPI.getInstance()});var KIe=M(ZC=>{"use strict";m();Object.defineProperty(ZC,"__esModule",{value:!0});ZC.disableInstrumentations=ZC.enableInstrumentations=void 0;function Lgt(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()}}ZC.enableInstrumentations=Lgt;function Ugt(e){e.forEach(t=>t.disable())}ZC.disableInstrumentations=Ugt});var ZIe=M(dQ=>{"use strict";m();Object.defineProperty(dQ,"__esModule",{value:!0});dQ.registerInstrumentations=void 0;var YIe=($e(),Le(nt)),Qgt=U7(),JIe=KIe();function Fgt(e){let t=e.tracerProvider||YIe.trace.getTracerProvider(),n=e.meterProvider||YIe.metrics.getMeterProvider(),r=e.loggerProvider||Qgt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,JIe.enableInstrumentations)(o,t,n,r),()=>{(0,JIe.disableInstrumentations)(o)}}dQ.registerInstrumentations=Fgt});var sCe=M(pQ=>{"use strict";m();Object.defineProperty(pQ,"__esModule",{value:!0});pQ.satisfies=void 0;var j7=($e(),Le(nt)),nCe=/^(?: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-]+)*))?$/,Ggt=/^(?<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-]+)*))?$/,jgt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function zgt(e,t,n){if(!Hgt(e))return j7.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=Kgt(e);if(!r)return!1;let o=[],i=rCe(r,t,o,n);return i&&!n?.includePrerelease?qgt(r,o):i}pQ.satisfies=zgt;function Hgt(e){return typeof e=="string"&&nCe.test(e)}function rCe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(Q7(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Aht(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!Q7(e,i,n,r))return!1;return!0}return Q7(e,t,n,r)}function Q7(e,t,n,r){if(t=Vgt(t,r),t.includes(" "))return rCe(e,t,n,r);{let o=Ygt(t);return n.push(o),$gt(e,o)}}function $gt(e,t){if(t.invalid)return!1;if(!t.version||G7(t.version))return!0;let n=XIe(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=XIe(r,o)}return jgt[t.op]?.includes(n)}function qgt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Vgt(e,t){return e=e.trim(),e=fht(e,t),e=pht(e),e=mht(e,t),e=e.trim(),e}function $u(e){return!e||e.toLowerCase()==="x"||e==="*"}function Kgt(e){let t=e.match(nCe);if(!t){j7.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 Ygt(e){if(!e)return{};let t=e.match(Ggt);if(!t)return j7.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,s=r.split("."),u=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:o,prereleaseSegments:u,prereleaseSegmentCount:u?u.length:0,build:i}}function G7(e){return e==="*"||e==="x"||e==="X"}function WIe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function Jgt(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 Zgt(e,t){if(G7(e)||G7(t))return 0;let[n,r]=Jgt(WIe(e),WIe(t));return n>r?1:n<r?-1:0}function XIe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=Zgt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var oCe="[a-zA-Z0-9-]",iCe="0|[1-9]\\d*",Wgt=`\\d*[a-zA-Z-]${oCe}*`,Xgt="((?:<|>)?=?)",eCe=`(?:${iCe}|${Wgt})`,eht=`(?:-(${eCe}(?:\\.${eCe})*))`,tCe=`${oCe}+`,tht=`(?:\\+(${tCe}(?:\\.${tCe})*))`,F7=`${iCe}|x|X|\\*`,Uw=`[v=\\s]*(${F7})(?:\\.(${F7})(?:\\.(${F7})(?:${eht})?${tht}?)?)?`,nht=`^${Xgt}\\s*${Uw}$`,rht=new RegExp(nht),oht=`^\\s*(${Uw})\\s+-\\s+(${Uw})\\s*$`,iht=new RegExp(oht),sht="(?:~>?)",aht=`^${sht}${Uw}$`,uht=new RegExp(aht),cht="(?:\\^)",lht=`^${cht}${Uw}$`,dht=new RegExp(lht);function pht(e){let t=uht;return e.replace(t,(n,r,o,i,s)=>{let u;return $u(r)?u="":$u(o)?u=`>=${r}.0.0 <${+r+1}.0.0-0`:$u(i)?u=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:s?u=`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:u=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,u})}function fht(e,t){let n=dht,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,u,l)=>{let f;return $u(i)?f="":$u(s)?f=`>=${i}.0.0${r} <${+i+1}.0.0-0`:$u(u)?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}.${u}-${l} <${i}.${s}.${+u+1}-0`:f=`>=${i}.${s}.${u}-${l} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${u}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?f=`>=${i}.${s}.${u}${r} <${i}.${s}.${+u+1}-0`:f=`>=${i}.${s}.${u}${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${u} <${+i+1}.0.0-0`,f})}function mht(e,t){let n=rht;return e.replace(n,(r,o,i,s,u,l)=>{let f=$u(i),h=f||$u(s),_=h||$u(u),E=_;return o==="="&&E&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&E?(h&&(s=0),u=0,o===">"?(o=">=",h?(i=+i+1,s=0,u=0):(s=+s+1,u=0)):o==="<="&&(o="<",h?i=+i+1:s=+s+1),o==="<"&&(l="-0"),r=`${o+i}.${s}.${u}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:_&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function Aht(e,t){let n=iht;return e.replace(n,(r,o,i,s,u,l,f,h,_,E,T,v)=>($u(i)?o="":$u(s)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:$u(u)?o=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,$u(_)?h="":$u(E)?h=`<${+_+1}.0.0-0`:$u(T)?h=`<${_}.${+E+1}.0-0`:v?h=`<=${_}.${E}.${T}-${v}`:t?.includePrerelease?h=`<${_}.${E}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var z7=M(Na=>{"use strict";m();Object.defineProperty(Na,"__esModule",{value:!0});Na.massUnwrap=Na.unwrap=Na.massWrap=Na.wrap=void 0;var qu=console.error.bind(console);function Qw(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 ght=(e,t,n)=>{if(!e||!e[t]){qu("no original function "+String(t)+" to wrap");return}if(!n){qu("no wrapper function"),qu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){qu("original object and wrapper must be functions");return}let o=n(r,t);return Qw(o,"__original",r),Qw(o,"__unwrap",()=>{e[t]===o&&Qw(e,t,r)}),Qw(o,"__wrapped",!0),Qw(e,t,o),o};Na.wrap=ght;var hht=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{qu("must provide one or more modules to patch"),qu(new Error().stack);return}if(!(t&&Array.isArray(t))){qu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Na.wrap)(r,o,n)})})};Na.massWrap=hht;var _ht=(e,t)=>{if(!e||!e[t]){qu("no function to unwrap."),qu(new Error().stack);return}let n=e[t];if(!n.__unwrap)qu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Na.unwrap=_ht;var Eht=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{qu("must provide one or more modules to patch"),qu(new Error().stack);return}if(!(t&&Array.isArray(t))){qu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Na.unwrap)(n,r)})})};Na.massUnwrap=Eht;function Fw(e){e&&e.logger&&(typeof e.logger!="function"?qu("new logger isn't a function, not replacing"):qu=e.logger)}Na.default=Fw;Fw.wrap=Na.wrap;Fw.massWrap=Na.massWrap;Fw.unwrap=Na.unwrap;Fw.massUnwrap=Na.massUnwrap});var aCe=M(mQ=>{"use strict";m();Object.defineProperty(mQ,"__esModule",{value:!0});mQ.InstrumentationAbstract=void 0;var H7=($e(),Le(nt)),yht=U7(),fQ=z7(),$7=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=H7.diag.createComponentLogger({namespace:t}),this._tracer=H7.trace.getTracer(t,n),this._meter=H7.metrics.getMeter(t,n),this._logger=yht.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=fQ.wrap;_unwrap=fQ.unwrap;_massWrap=fQ.massWrap;_massUnwrap=fQ.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)}}};mQ.InstrumentationAbstract=$7});var cCe=M((pfn,uCe)=>{m();var WC=1e3,XC=WC*60,ev=XC*60,yS=ev*24,Sht=yS*7,Tht=yS*365.25;uCe.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return bht(e);if(n==="number"&&isFinite(e))return t.long?Cht(e):Iht(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function bht(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*Tht;case"weeks":case"week":case"w":return n*Sht;case"days":case"day":case"d":return n*yS;case"hours":case"hour":case"hrs":case"hr":case"h":return n*ev;case"minutes":case"minute":case"mins":case"min":case"m":return n*XC;case"seconds":case"second":case"secs":case"sec":case"s":return n*WC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Iht(e){var t=Math.abs(e);return t>=yS?Math.round(e/yS)+"d":t>=ev?Math.round(e/ev)+"h":t>=XC?Math.round(e/XC)+"m":t>=WC?Math.round(e/WC)+"s":e+"ms"}function Cht(e){var t=Math.abs(e);return t>=yS?AQ(e,t,yS,"day"):t>=ev?AQ(e,t,ev,"hour"):t>=XC?AQ(e,t,XC,"minute"):t>=WC?AQ(e,t,WC,"second"):e+" ms"}function AQ(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var q7=M((mfn,lCe)=>{m();function vht(e){n.debug=n,n.default=n,n.coerce=l,n.disable=s,n.enable=o,n.enabled=u,n.humanize=cCe(),n.destroy=f,Object.keys(e).forEach(h=>{n[h]=e[h]}),n.names=[],n.skips=[],n.formatters={};function t(h){let _=0;for(let E=0;E<h.length;E++)_=(_<<5)-_+h.charCodeAt(E),_|=0;return n.colors[Math.abs(_)%n.colors.length]}n.selectColor=t;function n(h){let _,E=null,T,v;function R(...x){if(!R.enabled)return;let B=R,P=Number(new Date),G=P-(_||P);B.diff=G,B.prev=_,B.curr=P,_=P,x[0]=n.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let j=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(V,oe)=>{if(V==="%%")return"%";j++;let te=n.formatters[oe];if(typeof te=="function"){let le=x[j];V=te.call(B,le),x.splice(j,1),j--}return V}),n.formatArgs.call(B,x),(B.log||n.log).apply(B,x)}return R.namespace=h,R.useColors=n.useColors(),R.color=n.selectColor(h),R.extend=r,R.destroy=n.destroy,Object.defineProperty(R,"enabled",{enumerable:!0,configurable:!1,get:()=>E!==null?E:(T!==n.namespaces&&(T=n.namespaces,v=n.enabled(h)),v),set:x=>{E=x}}),typeof n.init=="function"&&n.init(R),R}function r(h,_){let E=n(this.namespace+(typeof _>"u"?":":_)+h);return E.log=this.log,E}function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let _=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let E of _)E[0]==="-"?n.skips.push(E.slice(1)):n.names.push(E)}function i(h,_){let E=0,T=0,v=-1,R=0;for(;E<h.length;)if(T<_.length&&(_[T]===h[E]||_[T]==="*"))_[T]==="*"?(v=T,R=E,T++):(E++,T++);else if(v!==-1)T=v+1,R++,E=R;else return!1;for(;T<_.length&&_[T]==="*";)T++;return T===_.length}function s(){let h=[...n.names,...n.skips.map(_=>"-"+_)].join(",");return n.enable(""),h}function u(h){for(let _ of n.skips)if(i(h,_))return!1;for(let _ of n.names)if(i(h,_))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}lCe.exports=vht});var dCe=M((jc,gQ)=>{m();jc.formatArgs=xht;jc.save=Dht;jc.load=Nht;jc.useColors=Rht;jc.storage=wht();jc.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`."))}})();jc.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 Rht(){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 xht(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+gQ.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)}jc.log=console.debug||console.log||(()=>{});function Dht(e){try{e?jc.storage.setItem("debug",e):jc.storage.removeItem("debug")}catch{}}function Nht(){let e;try{e=jc.storage.getItem("debug")||jc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function wht(){try{return localStorage}catch{}}gQ.exports=q7()(jc);var{formatters:kht}=gQ.exports;kht.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var fCe=M((hfn,pCe)=>{"use strict";m();pCe.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 gCe=M((Efn,ACe)=>{"use strict";m();var Bht=Fe("os"),mCe=Fe("tty"),Zd=fCe(),{env:ta}=process,k_;Zd("no-color")||Zd("no-colors")||Zd("color=false")||Zd("color=never")?k_=0:(Zd("color")||Zd("colors")||Zd("color=true")||Zd("color=always"))&&(k_=1);"FORCE_COLOR"in ta&&(ta.FORCE_COLOR==="true"?k_=1:ta.FORCE_COLOR==="false"?k_=0:k_=ta.FORCE_COLOR.length===0?1:Math.min(parseInt(ta.FORCE_COLOR,10),3));function V7(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function K7(e,t){if(k_===0)return 0;if(Zd("color=16m")||Zd("color=full")||Zd("color=truecolor"))return 3;if(Zd("color=256"))return 2;if(e&&!t&&k_===void 0)return 0;let n=k_||0;if(ta.TERM==="dumb")return n;if(process.platform==="win32"){let r=Bht.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in ta)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in ta)||ta.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in ta)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ta.TEAMCITY_VERSION)?1:0;if(ta.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ta){let r=parseInt((ta.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ta.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ta.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ta.TERM)||"COLORTERM"in ta?1:n}function Oht(e){let t=K7(e,e&&e.isTTY);return V7(t)}ACe.exports={supportsColor:Oht,stdout:V7(K7(!0,mCe.isatty(1))),stderr:V7(K7(!0,mCe.isatty(2)))}});var _Ce=M((na,_Q)=>{m();var Pht=Fe("tty"),hQ=Fe("util");na.init=jht;na.log=Qht;na.formatArgs=Lht;na.save=Fht;na.load=Ght;na.useColors=Mht;na.destroy=hQ.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");na.colors=[6,2,3,4,5,1];try{let e=gCe();e&&(e.stderr||e).level>=2&&(na.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{}na.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 Mht(){return"colors"in na.inspectOpts?!!na.inspectOpts.colors:Pht.isatty(process.stderr.fd)}function Lht(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+"+_Q.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Uht()+t+" "+e[0]}function Uht(){return na.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Qht(...e){return process.stderr.write(hQ.formatWithOptions(na.inspectOpts,...e)+`
|
|
6
6
|
`)}function Fht(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function Ght(){return process.env.DEBUG}function jht(e){e.inspectOpts={};let t=Object.keys(na.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=na.inspectOpts[t[n]]}_Q.exports=q7()(na);var{formatters:hCe}=_Q.exports;hCe.o=function(e){return this.inspectOpts.colors=this.useColors,hQ.inspect(e,this.inspectOpts).split(`
|
|
@@ -35,7 +35,7 @@ Url: ${xF(e)}`),!0}return!1}function o0t(e,t){return t?.length?bF(e).some(n=>j_(
|
|
|
35
35
|
`);for(let o of r){if(!o)continue;let i=o.indexOf(":");if(i===-1)continue;let s=o.substring(0,i).toLowerCase(),u=o.substring(i+1).trim(),l=n.get(s);l&&Array.isArray(l)?l.push(u):l?n.set(s,[l,u]):n.set(s,u)}}return n}onRequestCreated({request:t}){let n=this.getConfig(),r=n.enabled!==!1;if((0,nB.safeExecuteInTheMiddle)(()=>!r||t.method==="CONNECT"||n.ignoreRequestHook?.(t),V=>V&&this._diag.error("caught ignoreRequestHook error: ",V),!0))return;let i=(0,h3.hrTime)(),s;try{s=new uRt.URL(t.path,t.origin)}catch(V){this._diag.warn("could not determine url.full:",V);return}let u=s.protocol.replace(":",""),l=this.getRequestMethod(t.method),f={[as.ATTR_HTTP_REQUEST_METHOD]:l,[as.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]:t.method,[as.ATTR_URL_FULL]:s.toString(),[as.ATTR_URL_PATH]:s.pathname,[as.ATTR_URL_QUERY]:s.search,[as.ATTR_URL_SCHEME]:u},h={https:"443",http:"80"},_=s.hostname,E=s.port||h[u];f[as.ATTR_SERVER_ADDRESS]=_,E&&!isNaN(Number(E))&&(f[as.ATTR_SERVER_PORT]=Number(E));let v=this.parseRequestHeaders(t).get("user-agent");if(v){let V=Array.isArray(v)?v[v.length-1]:v;f[as.ATTR_USER_AGENT_ORIGINAL]=V}let R=(0,nB.safeExecuteInTheMiddle)(()=>n.startSpanHook?.(t),V=>V&&this._diag.error("caught startSpanHook error: ",V),!0);R&&Object.entries(R).forEach(([V,oe])=>{f[V]=oe});let x=td.context.active(),B=td.trace.getSpan(x),P;n.requireParentforSpans&&(!B||!td.trace.isSpanContextValid(B.spanContext()))?P=td.trace.wrapSpanContext(td.INVALID_SPAN_CONTEXT):P=this.tracer.startSpan(l==="_OTHER"?"HTTP":l,{kind:td.SpanKind.CLIENT,attributes:f},x),(0,nB.safeExecuteInTheMiddle)(()=>n.requestHook?.(P,t),V=>V&&this._diag.error("caught requestHook error: ",V),!0);let G=td.trace.setSpan(td.context.active(),P),j={};td.propagation.inject(G,j);let $=Object.entries(j);for(let V=0;V<$.length;V++){let[oe,te]=$[V];typeof t.addHeader=="function"?t.addHeader(oe,te):typeof t.headers=="string"?t.headers+=`${oe}: ${te}\r
|
|
36
36
|
`:Array.isArray(t.headers)&&t.headers.push(oe,te)}this._recordFromReq.set(t,{span:P,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:u}=n,l={[as.ATTR_NETWORK_PEER_ADDRESS]:s,[as.ATTR_NETWORK_PEER_PORT]:u};if(o.headersToSpanAttributes?.requestHeaders){let f=new Set(o.headersToSpanAttributes.requestHeaders.map(_=>_.toLowerCase())),h=this.parseRequestHeaders(t);for(let[_,E]of h.entries())if(f.has(_)){let T=Array.isArray(E)?E:[E];l[`http.request.header.${_}`]=T}}i.setAttributes(l)}onResponseHeaders({request:t,response:n}){let r=this._recordFromReq.get(t);if(!r)return;let{span:o,attributes:i}=r,s={[as.ATTR_HTTP_RESPONSE_STATUS_CODE]:n.statusCode},u=this.getConfig();if((0,nB.safeExecuteInTheMiddle)(()=>u.responseHook?.(o,{request:t,response:n}),l=>l&&this._diag.error("caught responseHook error: ",l),!0),u.headersToSpanAttributes?.responseHeaders){let l=new Set;u.headersToSpanAttributes?.responseHeaders.forEach(f=>l.add(f.toLowerCase()));for(let f=0;f<n.headers.length;f=f+2){let h=n.headers[f].toString().toLowerCase(),_=n.headers[f+1];if(l.has(h)){let E=`http.response.header.${h}`;Object.hasOwn(s,E)?s[E].push(_.toString()):s[E]=[_.toString()]}}}o.setAttributes(s),o.setStatus({code:n.statusCode>=400?td.SpanStatusCode.ERROR:td.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:td.SpanStatusCode.ERROR,message:n.message}),o.end(),this._recordFromReq.delete(t),i[as.ATTR_ERROR_TYPE]=n.message,this.recordRequestDuration(i,s)}recordRequestDuration(t,n){let r={};[as.ATTR_HTTP_RESPONSE_STATUS_CODE,as.ATTR_HTTP_REQUEST_METHOD,as.ATTR_SERVER_ADDRESS,as.ATTR_SERVER_PORT,as.ATTR_URL_SCHEME,as.ATTR_ERROR_TYPE].forEach(s=>{s in t&&(r[s]=t[s])});let i=(0,h3.hrTimeToMilliseconds)((0,h3.hrTimeDuration)(n,(0,h3.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"}};_3.UndiciInstrumentation=xW});var SBe=M(E3=>{"use strict";m();Object.defineProperty(E3,"__esModule",{value:!0});E3.UndiciInstrumentation=void 0;var cRt=yBe();Object.defineProperty(E3,"UndiciInstrumentation",{enumerable:!0,get:function(){return cRt.UndiciInstrumentation}})});function TBe(e,t="/"){let n=`${e}`;return n.endsWith("/")&&t.startsWith("/")?`${n}${t.slice(1)}`:!n.endsWith("/")&&!t.startsWith("/")?`${n}/${t}`:`${n}${t}`}function fRt(e,t={}){return typeof e.spans=="boolean"?e.spans:!t.skipOpenTelemetrySetup&&Fi(t)}function mRt(e={}){return{requireParentforSpans:!1,ignoreRequestHook:n=>{let r=TBe(n.origin,n.path),o=e.ignoreOutgoingRequests;return!!(o&&r&&o(r))},startSpanHook:n=>{let r=TBe(n.origin,n.path);if(r.startsWith("data:")){let o=kv(r);return{[Ut]:"auto.http.otel.node_fetch","http.url":o,[V_]:o,[tp]:`${n.method||"GET"} ${o}`}}return{[Ut]:"auto.http.otel.node_fetch"}},requestHook:e.requestHook,responseHook:e.responseHook,headersToSpanAttributes:e.headersToSpanAttributes}}var bBe,IBe,lRt,dRt,pRt,CBe,vBe=k(()=>{m();bBe=ue(SBe(),1);mt();yr();IBe="NodeFetch",lRt=ct(IBe,bBe.UndiciInstrumentation,e=>mRt(e)),dRt=ct(`${IBe}.sentry`,zS,e=>e),pRt=((e={})=>({name:"NodeFetch",setupOnce(){fRt(e,yt()?.getOptions())&&lRt(e),dRt(e)}})),CBe=pRt});var y3=M(rB=>{"use strict";m();Object.defineProperty(rB,"__esModule",{value:!0});rB.ExpressLayerType=void 0;var ARt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(ARt=rB.ExpressLayerType||(rB.ExpressLayerType={}))});var S3=M(oB=>{"use strict";m();Object.defineProperty(oB,"__esModule",{value:!0});oB.AttributeNames=void 0;var gRt;(function(e){e.EXPRESS_TYPE="express.type",e.EXPRESS_NAME="express.name"})(gRt=oB.AttributeNames||(oB.AttributeNames={}))});var DW=M(cR=>{"use strict";m();Object.defineProperty(cR,"__esModule",{value:!0});cR._LAYERS_STORE_PROPERTY=cR.kLayerPatched=void 0;cR.kLayerPatched=Symbol("express-layer-patched");cR._LAYERS_STORE_PROPERTY="__ot_middlewares"});var DBe=M(us=>{"use strict";m();Object.defineProperty(us,"__esModule",{value:!0});us.getActualMatchedRoute=us.getConstructedRoute=us.getLayerPath=us.asErrorAndMessage=us.isLayerIgnored=us.getLayerMetadata=us.getRouterPath=us.storeLayerPath=void 0;var NW=y3(),lR=S3(),YS=DW(),hRt=(e,t)=>(Array.isArray(e[YS._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,YS._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),t===void 0?{isLayerPathStored:!1}:(e[YS._LAYERS_STORE_PROPERTY].push(t),{isLayerPathStored:!0}));us.storeLayerPath=hRt;var _Rt=(e,t)=>{let n=t.handle?.stack?.[0];return n?.route?.path?`${e}${n.route.path}`:n?.handle?.stack?(0,us.getRouterPath)(e,n):e};us.getRouterPath=_Rt;var ERt=(e,t,n)=>{if(t.name==="router"){let r=(0,us.getRouterPath)("",t),o=r||n||e||"/";return{attributes:{[lR.AttributeNames.EXPRESS_NAME]:o,[lR.AttributeNames.EXPRESS_TYPE]:NW.ExpressLayerType.ROUTER},name:`router - ${o}`}}else return t.name==="bound dispatch"||t.name==="handle"?{attributes:{[lR.AttributeNames.EXPRESS_NAME]:(e||n)??"request handler",[lR.AttributeNames.EXPRESS_TYPE]:NW.ExpressLayerType.REQUEST_HANDLER},name:`request handler${t.path?` - ${e||n}`:""}`}:{attributes:{[lR.AttributeNames.EXPRESS_NAME]:t.name,[lR.AttributeNames.EXPRESS_TYPE]:NW.ExpressLayerType.MIDDLEWARE},name:`middleware - ${t.name}`}};us.getLayerMetadata=ERt;var yRt=(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")},SRt=(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(yRt(e,r))return!0}catch{}return!1};us.isLayerIgnored=SRt;var TRt=e=>e instanceof Error?[e,e.message]:[String(e),String(e)];us.asErrorAndMessage=TRt;var bRt=e=>{let t=e[0];return Array.isArray(t)?t.map(n=>RBe(n)||"").join(","):RBe(t)};us.getLayerPath=bRt;var RBe=e=>{if(typeof e=="string")return e;if(e instanceof RegExp||typeof e=="number")return e.toString()};function xBe(e){let n=(Array.isArray(e[YS._LAYERS_STORE_PROPERTY])?e[YS._LAYERS_STORE_PROPERTY]:[]).filter(r=>r!=="/"&&r!=="/*");return n.length===1&&n[0]==="*"?"*":n.join("").replace(/\/{2,}/g,"/")}us.getConstructedRoute=xBe;function IRt(e){let t=Array.isArray(e[YS._LAYERS_STORE_PROPERTY])?e[YS._LAYERS_STORE_PROPERTY]:[];if(t.length===0)return;if(t.every(i=>i==="/"))return e.originalUrl==="/"?"/":void 0;let n=xBe(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)||CRt(r))?r:void 0}us.getActualMatchedRoute=IRt;function CRt(e){return e.includes(":")||e.includes("*")}});var NBe=M(dR=>{"use strict";m();Object.defineProperty(dR,"__esModule",{value:!0});dR.PACKAGE_NAME=dR.PACKAGE_VERSION=void 0;dR.PACKAGE_VERSION="0.62.0";dR.PACKAGE_NAME="@opentelemetry/instrumentation-express"});var PBe=M(b3=>{"use strict";m();Object.defineProperty(b3,"__esModule",{value:!0});b3.ExpressInstrumentation=void 0;var wBe=Rr(),Yc=($e(),Le(nt)),kBe=y3(),BBe=S3(),Xm=DBe(),OBe=NBe(),pR=ln(),vRt=(tr(),Le(Kr)),T3=DW(),wW=class extends pR.InstrumentationBase{constructor(t={}){super(OBe.PACKAGE_NAME,OBe.PACKAGE_VERSION,t)}init(){return[new pR.InstrumentationNodeModuleDefinition("express",[">=4.0.0 <6"],t=>{let n=typeof t?.Router?.prototype?.route=="function",r=n?t.Router.prototype:t.Router;return(0,pR.isWrapped)(r.route)&&this._unwrap(r,"route"),this._wrap(r,"route",this._getRoutePatch()),(0,pR.isWrapped)(r.use)&&this._unwrap(r,"use"),this._wrap(r,"use",this._getRouterUsePatch()),(0,pR.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,Xm.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,Xm.getLayerPath)(o)),i}}}_getAppUsePatch(t){let n=this;return function(r){return function(...i){let s=t?this.router:this._router,u=r.apply(this,i);if(s){let l=s.stack[s.stack.length-1];n._applyPatch(l,(0,Xm.getLayerPath)(i))}return u}}}_applyPatch(t,n){let r=this;t[T3.kLayerPatched]!==!0&&(t[T3.kLayerPatched]=!0,this._wrap(t,"handle",o=>{if(o.length===4)return o;let i=function(s,u){let{isLayerPathStored:l}=(0,Xm.storeLayerPath)(s,n),f=(0,Xm.getConstructedRoute)(s),h=(0,Xm.getActualMatchedRoute)(s),_={[vRt.ATTR_HTTP_ROUTE]:h},E=(0,Xm.getLayerMetadata)(f,t,n),T=E.attributes[BBe.AttributeNames.EXPRESS_TYPE],v=(0,wBe.getRPCMetadata)(Yc.context.active());if(v?.type===wBe.RPCType.HTTP&&(v.route=h),(0,Xm.isLayerIgnored)(E.name,T,r.getConfig()))return T===kBe.ExpressLayerType.MIDDLEWARE&&s[T3._LAYERS_STORE_PROPERTY].pop(),o.apply(this,arguments);if(Yc.trace.getSpan(Yc.context.active())===void 0)return o.apply(this,arguments);let R=r._getSpanName({request:s,layerType:T,route:f},E.name),x=r.tracer.startSpan(R,{attributes:Object.assign(_,E.attributes)}),B=Yc.context.active(),P=Yc.trace.setSpan(B,x),{requestHook:G}=r.getConfig();G&&(0,pR.safeExecuteInTheMiddle)(()=>G(x,{request:s,layerType:T,route:f}),te=>{te&&Yc.diag.error("express instrumentation: request hook failed",te)},!0);let j=!1;E.attributes[BBe.AttributeNames.EXPRESS_TYPE]===kBe.ExpressLayerType.ROUTER&&(x.end(),j=!0,P=B);let $=()=>{j===!1&&(j=!0,x.end())},V=Array.from(arguments),oe=V.findIndex(te=>typeof te=="function");oe>=0&&(arguments[oe]=function(){let te=arguments[0],le=![void 0,null,"route","router"].includes(te);if(!j&&le){let[bt,ye]=(0,Xm.asErrorAndMessage)(te);x.recordException(bt),x.setStatus({code:Yc.SpanStatusCode.ERROR,message:ye})}j===!1&&(j=!0,s.res?.removeListener("finish",$),x.end()),!(s.route&&le)&&l&&s[T3._LAYERS_STORE_PROPERTY].pop();let Qe=V[oe],Ze=Yc.context.active(),Ce=Yc.trace.getSpan(B),_t=Ce?Yc.trace.setSpan(Ze,Ce):Ze;return Yc.context.bind(_t,Qe).apply(this,arguments)});try{return Yc.context.bind(P,o).apply(this,arguments)}catch(te){let[le,Qe]=(0,Xm.asErrorAndMessage)(te);throw x.recordException(le),x.setStatus({code:Yc.SpanStatusCode.ERROR,message:Qe}),te}finally{j||u.once("finish",$)}};for(let s in o)Object.defineProperty(i,s,{get(){return o[s]},set(u){o[s]=u}});return i}))}_getSpanName(t,n){let{spanNameHook:r}=this.getConfig();if(!(r instanceof Function))return n;try{return r(t,n)??n}catch(o){return Yc.diag.error("express instrumentation: error calling span name rewrite hook",o),n}}};b3.ExpressInstrumentation=wW});var MBe=M(AE=>{"use strict";m();Object.defineProperty(AE,"__esModule",{value:!0});AE.AttributeNames=AE.ExpressLayerType=AE.ExpressInstrumentation=void 0;var RRt=PBe();Object.defineProperty(AE,"ExpressInstrumentation",{enumerable:!0,get:function(){return RRt.ExpressInstrumentation}});var xRt=y3();Object.defineProperty(AE,"ExpressLayerType",{enumerable:!0,get:function(){return xRt.ExpressLayerType}});var DRt=S3();Object.defineProperty(AE,"AttributeNames",{enumerable:!0,get:function(){return DRt.AttributeNames}})});var ks,JS=k(()=>{m();ks=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__});function NRt(e){Jr(e,"auto.http.otel.express");let t=Lt(e).data,n=t["express.type"];n&&e.setAttribute(on,`${n}.express`);let r=t["express.name"];typeof r=="string"&&e.updateName(r)}function wRt(e,t){if(xn()===ep())return ks&&W.warn("Isolation scope is still default isolation scope - skipping setting transactionName"),t;if(e.layerType==="request_handler"){let n=e.request,r=n.method?n.method.toUpperCase():"GET";xn().setTransactionName(`${r} ${e.route}`)}return t}var LBe,UBe,QBe,kRt,FBe,GBe=k(()=>{m();LBe=ue(MBe(),1);mt();yr();JS();UBe="Express";QBe=ct(UBe,()=>new LBe.ExpressInstrumentation({requestHook:e=>NRt(e),spanNameHook:(e,t)=>wRt(e,t)})),kRt=(()=>({name:UBe,setupOnce(){QBe()}})),FBe=kRt});var jBe=M(iB=>{"use strict";m();Object.defineProperty(iB,"__esModule",{value:!0});iB.SeverityNumber=void 0;var BRt;(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"})(BRt=iB.SeverityNumber||(iB.SeverityNumber={}))});var v3=M(fR=>{"use strict";m();Object.defineProperty(fR,"__esModule",{value:!0});fR.NOOP_LOGGER=fR.NoopLogger=void 0;var C3=class{emit(t){}};fR.NoopLogger=C3;fR.NOOP_LOGGER=new C3});var zBe=M(eA=>{"use strict";m();Object.defineProperty(eA,"__esModule",{value:!0});eA.API_BACKWARDS_COMPATIBILITY_VERSION=eA.makeGetter=eA._global=eA.GLOBAL_LOGS_API_KEY=void 0;eA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");eA._global=globalThis;function ORt(e,t,n){return r=>r===e?t:n}eA.makeGetter=ORt;eA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var kW=M(mR=>{"use strict";m();Object.defineProperty(mR,"__esModule",{value:!0});mR.NOOP_LOGGER_PROVIDER=mR.NoopLoggerProvider=void 0;var PRt=v3(),R3=class{getLogger(t,n,r){return new PRt.NoopLogger}};mR.NoopLoggerProvider=R3;mR.NOOP_LOGGER_PROVIDER=new R3});var HBe=M(x3=>{"use strict";m();Object.defineProperty(x3,"__esModule",{value:!0});x3.ProxyLogger=void 0;var MRt=v3(),BW=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):MRt.NOOP_LOGGER}};x3.ProxyLogger=BW});var $Be=M(D3=>{"use strict";m();Object.defineProperty(D3,"__esModule",{value:!0});D3.ProxyLoggerProvider=void 0;var LRt=kW(),URt=HBe(),OW=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new URt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:LRt.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)}};D3.ProxyLoggerProvider=OW});var VBe=M(N3=>{"use strict";m();Object.defineProperty(N3,"__esModule",{value:!0});N3.LogsAPI=void 0;var ap=zBe(),QRt=kW(),qBe=$Be(),PW=class e{constructor(){this._proxyLoggerProvider=new qBe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return ap._global[ap.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(ap._global[ap.GLOBAL_LOGS_API_KEY]=(0,ap.makeGetter)(ap.API_BACKWARDS_COMPATIBILITY_VERSION,t,QRt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=ap._global[ap.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(ap._global,ap.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete ap._global[ap.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new qBe.ProxyLoggerProvider}};N3.LogsAPI=PW});var MW=M(tA=>{"use strict";m();Object.defineProperty(tA,"__esModule",{value:!0});tA.logs=tA.NoopLogger=tA.NOOP_LOGGER=tA.SeverityNumber=void 0;var FRt=jBe();Object.defineProperty(tA,"SeverityNumber",{enumerable:!0,get:function(){return FRt.SeverityNumber}});var KBe=v3();Object.defineProperty(tA,"NOOP_LOGGER",{enumerable:!0,get:function(){return KBe.NOOP_LOGGER}});Object.defineProperty(tA,"NoopLogger",{enumerable:!0,get:function(){return KBe.NoopLogger}});var GRt=VBe();tA.logs=GRt.LogsAPI.getInstance()});var YBe=M(AR=>{"use strict";m();Object.defineProperty(AR,"__esModule",{value:!0});AR.disableInstrumentations=AR.enableInstrumentations=void 0;function jRt(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()}}AR.enableInstrumentations=jRt;function zRt(e){e.forEach(t=>t.disable())}AR.disableInstrumentations=zRt});var WBe=M(w3=>{"use strict";m();Object.defineProperty(w3,"__esModule",{value:!0});w3.registerInstrumentations=void 0;var JBe=($e(),Le(nt)),HRt=MW(),ZBe=YBe();function $Rt(e){let t=e.tracerProvider||JBe.trace.getTracerProvider(),n=e.meterProvider||JBe.metrics.getMeterProvider(),r=e.loggerProvider||HRt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,ZBe.enableInstrumentations)(o,t,n,r),()=>{(0,ZBe.disableInstrumentations)(o)}}w3.registerInstrumentations=$Rt});var aOe=M(k3=>{"use strict";m();Object.defineProperty(k3,"__esModule",{value:!0});k3.satisfies=void 0;var FW=($e(),Le(nt)),rOe=/^(?: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-]+)*))?$/,qRt=/^(?<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-]+)*))?$/,VRt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function KRt(e,t,n){if(!YRt(e))return FW.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=XRt(e);if(!r)return!1;let o=[],i=oOe(r,t,o,n);return i&&!n?.includePrerelease?ZRt(r,o):i}k3.satisfies=KRt;function YRt(e){return typeof e=="string"&&rOe.test(e)}function oOe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(LW(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=yxt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!LW(e,i,n,r))return!1;return!0}return LW(e,t,n,r)}function LW(e,t,n,r){if(t=WRt(t,r),t.includes(" "))return oOe(e,t,n,r);{let o=ext(t);return n.push(o),JRt(e,o)}}function JRt(e,t){if(t.invalid)return!1;if(!t.version||QW(t.version))return!0;let n=eOe(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=eOe(r,o)}return VRt[t.op]?.includes(n)}function ZRt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function WRt(e,t){return e=e.trim(),e=_xt(e,t),e=hxt(e),e=Ext(e,t),e=e.trim(),e}function Xu(e){return!e||e.toLowerCase()==="x"||e==="*"}function XRt(e){let t=e.match(rOe);if(!t){FW.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 ext(e){if(!e)return{};let t=e.match(qRt);if(!t)return FW.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,s=r.split("."),u=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:o,prereleaseSegments:u,prereleaseSegmentCount:u?u.length:0,build:i}}function QW(e){return e==="*"||e==="x"||e==="X"}function XBe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function txt(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 nxt(e,t){if(QW(e)||QW(t))return 0;let[n,r]=txt(XBe(e),XBe(t));return n>r?1:n<r?-1:0}function eOe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=nxt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var iOe="[a-zA-Z0-9-]",sOe="0|[1-9]\\d*",rxt=`\\d*[a-zA-Z-]${iOe}*`,oxt="((?:<|>)?=?)",tOe=`(?:${sOe}|${rxt})`,ixt=`(?:-(${tOe}(?:\\.${tOe})*))`,nOe=`${iOe}+`,sxt=`(?:\\+(${nOe}(?:\\.${nOe})*))`,UW=`${sOe}|x|X|\\*`,sB=`[v=\\s]*(${UW})(?:\\.(${UW})(?:\\.(${UW})(?:${ixt})?${sxt}?)?)?`,axt=`^${oxt}\\s*${sB}$`,uxt=new RegExp(axt),cxt=`^\\s*(${sB})\\s+-\\s+(${sB})\\s*$`,lxt=new RegExp(cxt),dxt="(?:~>?)",pxt=`^${dxt}${sB}$`,fxt=new RegExp(pxt),mxt="(?:\\^)",Axt=`^${mxt}${sB}$`,gxt=new RegExp(Axt);function hxt(e){let t=fxt;return e.replace(t,(n,r,o,i,s)=>{let u;return Xu(r)?u="":Xu(o)?u=`>=${r}.0.0 <${+r+1}.0.0-0`:Xu(i)?u=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:s?u=`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:u=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,u})}function _xt(e,t){let n=gxt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,u,l)=>{let f;return Xu(i)?f="":Xu(s)?f=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Xu(u)?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}.${u}-${l} <${i}.${s}.${+u+1}-0`:f=`>=${i}.${s}.${u}-${l} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${u}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?f=`>=${i}.${s}.${u}${r} <${i}.${s}.${+u+1}-0`:f=`>=${i}.${s}.${u}${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${u} <${+i+1}.0.0-0`,f})}function Ext(e,t){let n=uxt;return e.replace(n,(r,o,i,s,u,l)=>{let f=Xu(i),h=f||Xu(s),_=h||Xu(u),E=_;return o==="="&&E&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&E?(h&&(s=0),u=0,o===">"?(o=">=",h?(i=+i+1,s=0,u=0):(s=+s+1,u=0)):o==="<="&&(o="<",h?i=+i+1:s=+s+1),o==="<"&&(l="-0"),r=`${o+i}.${s}.${u}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:_&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function yxt(e,t){let n=lxt;return e.replace(n,(r,o,i,s,u,l,f,h,_,E,T,v)=>(Xu(i)?o="":Xu(s)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Xu(u)?o=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Xu(_)?h="":Xu(E)?h=`<${+_+1}.0.0-0`:Xu(T)?h=`<${_}.${+E+1}.0-0`:v?h=`<=${_}.${E}.${T}-${v}`:t?.includePrerelease?h=`<${_}.${E}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var GW=M(Ua=>{"use strict";m();Object.defineProperty(Ua,"__esModule",{value:!0});Ua.massUnwrap=Ua.unwrap=Ua.massWrap=Ua.wrap=void 0;var ec=console.error.bind(console);function aB(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 Sxt=(e,t,n)=>{if(!e||!e[t]){ec("no original function "+String(t)+" to wrap");return}if(!n){ec("no wrapper function"),ec(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){ec("original object and wrapper must be functions");return}let o=n(r,t);return aB(o,"__original",r),aB(o,"__unwrap",()=>{e[t]===o&&aB(e,t,r)}),aB(o,"__wrapped",!0),aB(e,t,o),o};Ua.wrap=Sxt;var Txt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{ec("must provide one or more modules to patch"),ec(new Error().stack);return}if(!(t&&Array.isArray(t))){ec("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Ua.wrap)(r,o,n)})})};Ua.massWrap=Txt;var bxt=(e,t)=>{if(!e||!e[t]){ec("no function to unwrap."),ec(new Error().stack);return}let n=e[t];if(!n.__unwrap)ec("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Ua.unwrap=bxt;var Ixt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{ec("must provide one or more modules to patch"),ec(new Error().stack);return}if(!(t&&Array.isArray(t))){ec("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Ua.unwrap)(n,r)})})};Ua.massUnwrap=Ixt;function uB(e){e&&e.logger&&(typeof e.logger!="function"?ec("new logger isn't a function, not replacing"):ec=e.logger)}Ua.default=uB;uB.wrap=Ua.wrap;uB.massWrap=Ua.massWrap;uB.unwrap=Ua.unwrap;uB.massUnwrap=Ua.massUnwrap});var uOe=M(O3=>{"use strict";m();Object.defineProperty(O3,"__esModule",{value:!0});O3.InstrumentationAbstract=void 0;var jW=($e(),Le(nt)),Cxt=MW(),B3=GW(),zW=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=jW.diag.createComponentLogger({namespace:t}),this._tracer=jW.trace.getTracer(t,n),this._meter=jW.metrics.getMeter(t,n),this._logger=Cxt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=B3.wrap;_unwrap=B3.unwrap;_massWrap=B3.massWrap;_massUnwrap=B3.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)}}};O3.InstrumentationAbstract=zW});var cOe=M(gE=>{"use strict";m();Object.defineProperty(gE,"__esModule",{value:!0});gE.ModuleNameTrie=gE.ModuleNameSeparator=void 0;gE.ModuleNameSeparator="/";var P3=class{hooks=[];children=new Map},HW=class{_trie=new P3;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(gE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new P3,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],s=!0;for(let u of t.split(gE.ModuleNameSeparator)){let l=o.children.get(u);if(!l){s=!1;break}r||i.push(...l.hooks),o=l}return r&&s&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((u,l)=>u.insertedId-l.insertedId),i.map(({hook:u})=>u))}};gE.ModuleNameTrie=HW});var dOe=M(M3=>{"use strict";m();Object.defineProperty(M3,"__esModule",{value:!0});M3.RequireInTheMiddleSingleton=void 0;var vxt=SS(),lOe=Fe("path"),$W=cOe(),Rxt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),qW=class e{_moduleNameTrie=new $W.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new vxt.Hook(null,{internals:!0},(t,n,r)=>{let o=xxt(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 Rxt?new e:this._instance=this._instance??new e}};M3.RequireInTheMiddleSingleton=qW;function xxt(e){return lOe.sep!==$W.ModuleNameSeparator?e.split(lOe.sep).join($W.ModuleNameSeparator):e}});var gOe=M(cB=>{m();var pOe=[],VW=new WeakMap,fOe=new WeakMap,mOe=new Map,AOe=[],Dxt={set(e,t,n){let r=VW.get(e),o=r&&r[t];return typeof o=="function"?o(n):!0},get(e,t){if(t===Symbol.toStringTag)return"Module";let n=fOe.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=VW.get(e),o=r&&r[t];return typeof o=="function"?o(n.value):!0}};function Nxt(e,t,n,r,o){mOe.set(e,o),VW.set(t,n),fOe.set(t,r);let i=new Proxy(t,Dxt);pOe.forEach(s=>s(e,i,o)),AOe.push([e,i,o])}cB.register=Nxt;cB.importHooks=pOe;cB.specifiers=mOe;cB.toHook=AOe});var ZW=M((DBn,hR)=>{m();var hOe=Fe("path"),wxt=EQ(),{fileURLToPath:kxt}=Fe("url"),{MessageChannel:Bxt}=Fe("worker_threads"),{isBuiltin:KW}=Fe("module");KW||(KW=()=>!0);var{importHooks:YW,specifiers:Oxt,toHook:Pxt}=gOe();function _Oe(e){YW.push(e),Pxt.forEach(([t,n,r])=>e(t,n,r))}function EOe(e){let t=YW.indexOf(e);t>-1&&YW.splice(t,1)}function gR(e,t,n,r){let o=e(t,n,r);o&&o!==t&&"default"in t&&(t.default=o)}var JW;function Mxt(){let{port1:e,port2:t}=new Bxt,n=0,r;JW=u=>{n++,e.postMessage(u)},e.on("message",()=>{n--,r&&n<=0&&r()}).unref();function o(){let u=setInterval(()=>{},1e3),l=new Promise(f=>{r=f}).then(()=>{clearInterval(u)});return n===0&&r(),l}let i=t;return{registerOptions:{data:{addHookMessagePort:i,include:[]},transferList:[i]},addHookMessagePort:i,waitForAllMessagesAcknowledged:o}}function lB(e,t,n){if(!(this instanceof lB))return new lB(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;JW&&Array.isArray(e)&&JW(e),this._iitmHook=(o,i,s)=>{let u=o,l=u.startsWith("node:"),f,h;if(l){let _=o.slice(5);KW(_)&&(o=_)}else if(u.startsWith("file://")){let _=Error.stackTraceLimit;Error.stackTraceLimit=0;try{f=kxt(o),o=f}catch{}if(Error.stackTraceLimit=_,f){let E=wxt(f);E&&(o=E.name,h=E.basedir)}}if(e)for(let _ of e)if(f&&_===f)gR(n,i,f,void 0);else if(_===o){if(!h)gR(n,i,o,h);else if(h.endsWith(Oxt.get(u)))gR(n,i,o,h);else if(r){let E=o+hOe.sep+hOe.relative(h,f);gR(n,i,E,h)}}else _===s&&gR(n,i,s,h);else gR(n,i,o,h)},_Oe(this._iitmHook)}lB.prototype.unhook=function(){EOe(this._iitmHook)};hR.exports=lB;hR.exports.Hook=lB;hR.exports.addHook=_Oe;hR.exports.removeHook=EOe;hR.exports.createAddHookMessageChannel=Mxt});var WW=M(hE=>{"use strict";m();Object.defineProperty(hE,"__esModule",{value:!0});hE.isWrapped=hE.safeExecuteInTheMiddleAsync=hE.safeExecuteInTheMiddle=void 0;function Lxt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}hE.safeExecuteInTheMiddle=Lxt;async function Uxt(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}}hE.safeExecuteInTheMiddleAsync=Uxt;function Qxt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}hE.isWrapped=Qxt});var TOe=M(L3=>{"use strict";m();Object.defineProperty(L3,"__esModule",{value:!0});L3.InstrumentationBase=void 0;var dB=Fe("path"),yOe=Fe("util"),Fxt=aOe(),XW=GW(),Gxt=uOe(),jxt=dOe(),zxt=ZW(),pB=($e(),Le(nt)),Hxt=SS(),$xt=Fe("fs"),qxt=WW(),eX=class extends Gxt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=jxt.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,qxt.isWrapped)(t[n])&&this._unwrap(t,n),yOe.types.isProxy(t)){let o=(0,XW.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,XW.wrap)(t,n,r)};_unwrap=(t,n)=>yOe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,XW.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{pB.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){pB.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{pB.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){pB.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,$xt.readFileSync)(dB.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{pB.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 SOe(t.supportedVersions,i,t.includePrerelease)&&typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:t.name,version:t.moduleVersion,baseDir:o}),t.patch(n,t.moduleVersion)):n;let s=t.files??[],u=dB.normalize(r);return s.filter(f=>f.name===u&&SOe(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,u,l)=>{if(!l&&dB.isAbsolute(u)){let f=dB.parse(u);u=f.name,l=f.dir}return this._onRequire(t,s,u,l)},r=(s,u,l)=>this._onRequire(t,s,u,l),o=dB.isAbsolute(t.name)?new Hxt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new zxt.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}};L3.InstrumentationBase=eX;function SOe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,Fxt.satisfies)(t,r,{includePrerelease:n}))}});var bOe=M(U3=>{"use strict";m();Object.defineProperty(U3,"__esModule",{value:!0});U3.normalize=void 0;var Vxt=Fe("path");Object.defineProperty(U3,"normalize",{enumerable:!0,get:function(){return Vxt.normalize}})});var IOe=M(_R=>{"use strict";m();Object.defineProperty(_R,"__esModule",{value:!0});_R.normalize=_R.InstrumentationBase=void 0;var Kxt=TOe();Object.defineProperty(_R,"InstrumentationBase",{enumerable:!0,get:function(){return Kxt.InstrumentationBase}});var Yxt=bOe();Object.defineProperty(_R,"normalize",{enumerable:!0,get:function(){return Yxt.normalize}})});var tX=M(ER=>{"use strict";m();Object.defineProperty(ER,"__esModule",{value:!0});ER.normalize=ER.InstrumentationBase=void 0;var COe=IOe();Object.defineProperty(ER,"InstrumentationBase",{enumerable:!0,get:function(){return COe.InstrumentationBase}});Object.defineProperty(ER,"normalize",{enumerable:!0,get:function(){return COe.normalize}})});var vOe=M(Q3=>{"use strict";m();Object.defineProperty(Q3,"__esModule",{value:!0});Q3.InstrumentationNodeModuleDefinition=void 0;var nX=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}};Q3.InstrumentationNodeModuleDefinition=nX});var ROe=M(F3=>{"use strict";m();Object.defineProperty(F3,"__esModule",{value:!0});F3.InstrumentationNodeModuleFile=void 0;var Jxt=tX(),rX=class{name;supportedVersions;patch;unpatch;constructor(t,n,r,o){this.name=(0,Jxt.normalize)(t),this.supportedVersions=n,this.patch=r,this.unpatch=o}};F3.InstrumentationNodeModuleFile=rX});var xOe=M(ZS=>{"use strict";m();Object.defineProperty(ZS,"__esModule",{value:!0});ZS.semconvStabilityFromStr=ZS.SemconvStability=void 0;var G3;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(G3=ZS.SemconvStability||(ZS.SemconvStability={}));function Zxt(e,t){let n=G3.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=G3.DUPLICATE;break}else o.toLowerCase()===e&&(n=G3.STABLE);return n}ZS.semconvStabilityFromStr=Zxt});var NOe=M(cs=>{"use strict";m();Object.defineProperty(cs,"__esModule",{value:!0});cs.semconvStabilityFromStr=cs.SemconvStability=cs.safeExecuteInTheMiddleAsync=cs.safeExecuteInTheMiddle=cs.isWrapped=cs.InstrumentationNodeModuleFile=cs.InstrumentationNodeModuleDefinition=cs.InstrumentationBase=cs.registerInstrumentations=void 0;var Wxt=WBe();Object.defineProperty(cs,"registerInstrumentations",{enumerable:!0,get:function(){return Wxt.registerInstrumentations}});var Xxt=tX();Object.defineProperty(cs,"InstrumentationBase",{enumerable:!0,get:function(){return Xxt.InstrumentationBase}});var eDt=vOe();Object.defineProperty(cs,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return eDt.InstrumentationNodeModuleDefinition}});var tDt=ROe();Object.defineProperty(cs,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return tDt.InstrumentationNodeModuleFile}});var oX=WW();Object.defineProperty(cs,"isWrapped",{enumerable:!0,get:function(){return oX.isWrapped}});Object.defineProperty(cs,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return oX.safeExecuteInTheMiddle}});Object.defineProperty(cs,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return oX.safeExecuteInTheMiddleAsync}});var DOe=xOe();Object.defineProperty(cs,"SemconvStability",{enumerable:!0,get:function(){return DOe.SemconvStability}});Object.defineProperty(cs,"semconvStabilityFromStr",{enumerable:!0,get:function(){return DOe.semconvStabilityFromStr}})});var wOe=M((JBn,nDt)=>{nDt.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 BOe=M(WS=>{"use strict";m();Object.defineProperty(WS,"__esModule",{value:!0});WS.range=WS.balanced=void 0;var rDt=(e,t,n)=>{let r=e instanceof RegExp?kOe(e,n):e,o=t instanceof RegExp?kOe(t,n):t,i=r!==null&&o!=null&&(0,WS.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)}};WS.balanced=rDt;var kOe=(e,t)=>{let n=t.match(e);return n?n[0]:null},oDt=(e,t,n)=>{let r,o,i,s,u,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&&!u;){if(h===l)r.push(h),l=n.indexOf(e,h+1);else if(r.length===1){let _=r.pop();_!==void 0&&(u=[_,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&&(u=[i,s])}return u};WS.range=oDt});var FOe=M(yR=>{"use strict";m();Object.defineProperty(yR,"__esModule",{value:!0});yR.EXPANSION_MAX=void 0;yR.expand=hDt;var OOe=BOe(),POe="\0SLASH"+Math.random()+"\0",MOe="\0OPEN"+Math.random()+"\0",sX="\0CLOSE"+Math.random()+"\0",LOe="\0COMMA"+Math.random()+"\0",UOe="\0PERIOD"+Math.random()+"\0",iDt=new RegExp(POe,"g"),sDt=new RegExp(MOe,"g"),aDt=new RegExp(sX,"g"),uDt=new RegExp(LOe,"g"),cDt=new RegExp(UOe,"g"),lDt=/\\\\/g,dDt=/\\{/g,pDt=/\\}/g,fDt=/\\,/g,mDt=/\\\./g;yR.EXPANSION_MAX=1e5;function iX(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function ADt(e){return e.replace(lDt,POe).replace(dDt,MOe).replace(pDt,sX).replace(fDt,LOe).replace(mDt,UOe)}function gDt(e){return e.replace(iDt,"\\").replace(sDt,"{").replace(aDt,"}").replace(uDt,",").replace(cDt,".")}function QOe(e){if(!e)return[""];let t=[],n=(0,OOe.balanced)("{","}",e);if(!n)return e.split(",");let{pre:r,body:o,post:i}=n,s=r.split(",");s[s.length-1]+="{"+o+"}";let u=QOe(i);return i.length&&(s[s.length-1]+=u.shift(),s.push.apply(s,u)),t.push.apply(t,s),t}function hDt(e,t={}){if(!e)return[];let{max:n=yR.EXPANSION_MAX}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),fB(ADt(e),n,!0).map(gDt)}function _Dt(e){return"{"+e+"}"}function EDt(e){return/^-?0\d/.test(e)}function yDt(e,t){return e<=t}function SDt(e,t){return e>=t}function fB(e,t,n){let r=[],o=(0,OOe.balanced)("{","}",e);if(!o)return[e];let i=o.pre,s=o.post.length?fB(o.post,t,!1):[""];if(/\$$/.test(o.pre))for(let u=0;u<s.length&&u<t;u++){let l=i+"{"+o.body+"}"+s[u];r.push(l)}else{let u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),f=u||l,h=o.body.indexOf(",")>=0;if(!f&&!h)return o.post.match(/,(?!,).*\}/)?(e=o.pre+"{"+o.body+sX+o.post,fB(e,t,!0)):[e];let _;if(f)_=o.body.split(/\.\./);else if(_=QOe(o.body),_.length===1&&_[0]!==void 0&&(_=fB(_[0],t,!1).map(_Dt),_.length===1))return s.map(T=>o.pre+_[0]+T);let E;if(f&&_[0]!==void 0&&_[1]!==void 0){let T=iX(_[0]),v=iX(_[1]),R=Math.max(_[0].length,_[1].length),x=_.length===3&&_[2]!==void 0?Math.max(Math.abs(iX(_[2])),1):1,B=yDt;v<T&&(x*=-1,B=SDt);let G=_.some(EDt);E=[];for(let j=T;B(j,v)&&E.length<t;j+=x){let $;if(l)$=String.fromCharCode(j),$==="\\"&&($="");else if($=String(j),G){let V=R-$.length;if(V>0){let oe=new Array(V+1).join("0");j<0?$="-"+oe+$.slice(1):$=oe+$}}E.push($)}}else{E=[];for(let T=0;T<_.length;T++)E.push.apply(E,fB(_[T],t,!1))}for(let T=0;T<E.length;T++)for(let v=0;v<s.length&&r.length<t;v++){let R=i+E[T]+s[v];(!n||f||R)&&r.push(R)}}return r}});var GOe=M(j3=>{"use strict";m();Object.defineProperty(j3,"__esModule",{value:!0});j3.assertValidPattern=void 0;var TDt=1024*64,bDt=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>TDt)throw new TypeError("pattern is too long")};j3.assertValidPattern=bDt});var zOe=M(z3=>{"use strict";m();Object.defineProperty(z3,"__esModule",{value:!0});z3.parseClass=void 0;var IDt={"[: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]},mB=e=>e.replace(/[[\]\\-]/g,"\\$&"),CDt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),jOe=e=>e.join(""),vDt=(e,t)=>{let n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");let r=[],o=[],i=n+1,s=!1,u=!1,l=!1,f=!1,h=n,_="";e:for(;i<e.length;){let R=e.charAt(i);if((R==="!"||R==="^")&&i===n+1){f=!0,i++;continue}if(R==="]"&&s&&!l){h=i+1;break}if(s=!0,R==="\\"&&!l){l=!0,i++;continue}if(R==="["&&!l){for(let[x,[B,P,G]]of Object.entries(IDt))if(e.startsWith(x,i)){if(_)return["$.",!1,e.length-n,!0];i+=x.length,G?o.push(B):r.push(B),u=u||P;continue e}}if(l=!1,_){R>_?r.push(mB(_)+"-"+mB(R)):R===_&&r.push(mB(R)),_="",i++;continue}if(e.startsWith("-]",i+1)){r.push(mB(R+"-")),i+=2;continue}if(e.startsWith("-",i+1)){_=R,i+=2;continue}r.push(mB(R)),i++}if(h<i)return["",!1,0,!1];if(!r.length&&!o.length)return["$.",!1,e.length-n,!0];if(o.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!f){let R=r[0].length===2?r[0].slice(-1):r[0];return[CDt(R),!1,h-n,!1]}let E="["+(f?"^":"")+jOe(r)+"]",T="["+(f?"":"^")+jOe(o)+"]";return[r.length&&o.length?"("+E+"|"+T+")":r.length?E:T,u,h-n,!0]};z3.parseClass=vDt});var $3=M(H3=>{"use strict";m();Object.defineProperty(H3,"__esModule",{value:!0});H3.unescape=void 0;var RDt=(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");H3.unescape=RDt});var cX=M(Y3=>{"use strict";m();var Jc;Object.defineProperty(Y3,"__esModule",{value:!0});Y3.AST=void 0;var xDt=zOe(),q3=$3(),DDt=new Set(["!","?","+","*","@"]),aX=e=>DDt.has(e),HOe=e=>aX(e.type),NDt=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),wDt=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),kDt=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),$Oe=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),BDt="(?!(?:^|/)\\.\\.?(?:$|/))",V3="(?!\\.)",ODt=new Set(["[","."]),PDt=new Set(["..","."]),MDt=new Set("().*{}+?[]^$\\!"),LDt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),uX="[^/]",qOe=uX+"*?",VOe=uX+"+?",UDt=0,K3=class{type;#n;#r;#o=!1;#e=[];#t;#a;#c;#u=!1;#i;#s;#l=!1;id=++UDt;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 Jc&&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 Jc&&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 Jc(this.type,t);for(let r of this.#e)n.copyIn(r);return n}static#d(t,n,r,o,i){let s=o.maxExtglobRecursion??2,u=!1,l=!1,f=-1,h=!1;if(n.type===null){let R=r,x="";for(;R<t.length;){let B=t.charAt(R++);if(u||B==="\\"){u=!u,x+=B;continue}if(l){R===f+1?(B==="^"||B==="!")&&(h=!0):B==="]"&&!(R===f+2&&h)&&(l=!1),x+=B;continue}else if(B==="["){l=!0,f=R,h=!1,x+=B;continue}if(!o.noext&&aX(B)&&t.charAt(R)==="("&&i<=s){n.push(x),x="";let G=new Jc(B,n);R=Jc.#d(t,G,R,o,i+1),n.push(G);continue}x+=B}return n.push(x),R}let _=r+1,E=new Jc(null,n),T=[],v="";for(;_<t.length;){let R=t.charAt(_++);if(u||R==="\\"){u=!u,v+=R;continue}if(l){_===f+1?(R==="^"||R==="!")&&(h=!0):R==="]"&&!(_===f+2&&h)&&(l=!1),v+=R;continue}else if(R==="["){l=!0,f=_,h=!1,v+=R;continue}if(!o.noext&&aX(R)&&t.charAt(_)==="("&&(i<=s||n&&n.#p(R))){let B=n&&n.#p(R)?0:1;E.push(v),v="";let P=new Jc(R,E);E.push(P),_=Jc.#d(t,P,_,o,i+B);continue}if(R==="|"){E.push(v),v="",T.push(E),E=new Jc(null,n);continue}if(R===")")return v===""&&n.#e.length===0&&(n.#l=!0),E.push(v),v="",n.push(...T,E),_;v+=R}return n.type=null,n.#r=void 0,n.#e=[t.substring(r-1)],_}#_(t){return this.#m(t,wDt)}#m(t,n=NDt){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=kDt){return!!n.get(this.type)?.includes(t)}#E(t,n){let r=t.#e[0],o=new Jc(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!!$Oe.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=$Oe.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 Jc(null,void 0,n);return Jc.#d(t,r,0,n,0),r}toMMPattern(){if(this!==this.#n)return this.#n.toMMPattern();let t=this.toString(),[n,r,o,i]=this.toRegExpSource();if(!(o||this.#r||this.#i.nocase&&!this.#i.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;let u=(this.#i.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${n}$`,u),{_src:n,_glob:t})}get options(){return this.#i}toRegExpSource(t){let n=t??!!this.#i.dot;if(this.#n===this&&(this.#f(),this.#h()),!HOe(this)){let l=this.isStart()&&this.isEnd()&&!this.#e.some(T=>typeof T!="string"),f=this.#e.map(T=>{let[v,R,x,B]=typeof T=="string"?Jc.#b(T,this.#r,l):T.toRegExpSource(t);return this.#r=this.#r||x,this.#o=this.#o||B,v}).join(""),h="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&PDt.has(this.#e[0]))){let v=ODt,R=n&&v.has(f.charAt(0))||f.startsWith("\\.")&&v.has(f.charAt(2))||f.startsWith("\\.\\.")&&v.has(f.charAt(4)),x=!n&&!t&&v.has(f.charAt(0));h=R?BDt:x?V3:""}let _="";return this.isEnd()&&this.#n.#u&&this.#t?.type==="!"&&(_="(?:$|\\/)"),[h+f+_,(0,q3.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,q3.unescape)(this.toString()),!1,!1]}let s=!r||t||n||!V3?"":this.#g(!0);s===i&&(s=""),s&&(i=`(?:${i})(?:${s})*?`);let u="";if(this.type==="!"&&this.#l)u=(this.isStart()&&!n?V3:"")+VOe;else{let l=this.type==="!"?"))"+(this.isStart()&&!n&&!t?V3:"")+qOe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;u=o+i+l}return[u,(0,q3.unescape)(i),this.#r=!!this.#r,this.#o]}#f(){if(HOe(this)){let t=0,n=!1;do{n=!0;for(let r=0;r<this.#e.length;r++){let o=this.#e[r];typeof o=="object"&&(o.#f(),this.#m(o)?(n=!1,this.#A(o,r)):this.#_(o)?(n=!1,this.#E(o,r)):this.#S(o)&&(n=!1,this.#T(o)))}}while(!n&&++t<10)}else for(let t of this.#e)typeof t=="object"&&t.#f();this.#s=void 0}#g(t){return this.#e.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");let[r,o,i,s]=n.toRegExpSource(t);return this.#o=this.#o||s,r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#b(t,n,r=!1){let o=!1,i="",s=!1,u=!1;for(let l=0;l<t.length;l++){let f=t.charAt(l);if(o){o=!1,i+=(MDt.has(f)?"\\":"")+f;continue}if(f==="*"){if(u)continue;u=!0,i+=r&&/^[*]+$/.test(t)?VOe:qOe,n=!0;continue}else u=!1;if(f==="\\"){l===t.length-1?i+="\\\\":o=!0;continue}if(f==="["){let[h,_,E,T]=(0,xDt.parseClass)(t,l);if(E){i+=h,s=s||_,l+=E-1,n=n||T;continue}}if(f==="?"){i+=uX,n=!0;continue}i+=LDt(f)}return[i,(0,q3.unescape)(t),!!n,s]}};Y3.AST=K3;Jc=K3});var lX=M(J3=>{"use strict";m();Object.defineProperty(J3,"__esModule",{value:!0});J3.escape=void 0;var QDt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");J3.escape=QDt});var ePe=M(gt=>{"use strict";m();Object.defineProperty(gt,"__esModule",{value:!0});gt.unescape=gt.escape=gt.AST=gt.Minimatch=gt.match=gt.makeRe=gt.braceExpand=gt.defaults=gt.filter=gt.GLOBSTAR=gt.sep=gt.minimatch=void 0;var FDt=FOe(),Z3=GOe(),JOe=cX(),GDt=lX(),jDt=$3(),zDt=(e,t,n={})=>((0,Z3.assertValidPattern)(t),!n.nocomment&&t.charAt(0)==="#"?!1:new XS(t,n).match(e));gt.minimatch=zDt;var HDt=/^\*+([^+@!?\*\[\(]*)$/,$Dt=e=>t=>!t.startsWith(".")&&t.endsWith(e),qDt=e=>t=>t.endsWith(e),VDt=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),KDt=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),YDt=/^\*+\.\*+$/,JDt=e=>!e.startsWith(".")&&e.includes("."),ZDt=e=>e!=="."&&e!==".."&&e.includes("."),WDt=/^\.\*+$/,XDt=e=>e!=="."&&e!==".."&&e.startsWith("."),e1t=/^\*+$/,t1t=e=>e.length!==0&&!e.startsWith("."),n1t=e=>e.length!==0&&e!=="."&&e!=="..",r1t=/^\?+([^+@!?\*\[\(]*)?$/,o1t=([e,t=""])=>{let n=ZOe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},i1t=([e,t=""])=>{let n=WOe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},s1t=([e,t=""])=>{let n=WOe([e]);return t?r=>n(r)&&r.endsWith(t):n},a1t=([e,t=""])=>{let n=ZOe([e]);return t?r=>n(r)&&r.endsWith(t):n},ZOe=([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},WOe=([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},XOe=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",KOe={win32:{sep:"\\"},posix:{sep:"/"}};gt.sep=XOe==="win32"?KOe.win32.sep:KOe.posix.sep;gt.minimatch.sep=gt.sep;gt.GLOBSTAR=Symbol("globstar **");gt.minimatch.GLOBSTAR=gt.GLOBSTAR;var u1t="[^/]",c1t=u1t+"*?",l1t="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",d1t="(?:(?!(?:\\/|^)\\.).)*?",p1t=(e,t={})=>n=>(0,gt.minimatch)(n,e,t);gt.filter=p1t;gt.minimatch.filter=gt.filter;var up=(e,t={})=>Object.assign({},e,t),f1t=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return gt.minimatch;let t=gt.minimatch;return Object.assign((r,o,i={})=>t(r,o,up(e,i)),{Minimatch:class extends t.Minimatch{constructor(o,i={}){super(o,up(e,i))}static defaults(o){return t.defaults(up(e,o)).Minimatch}},AST:class extends t.AST{constructor(o,i,s={}){super(o,i,up(e,s))}static fromGlob(o,i={}){return t.AST.fromGlob(o,up(e,i))}},unescape:(r,o={})=>t.unescape(r,up(e,o)),escape:(r,o={})=>t.escape(r,up(e,o)),filter:(r,o={})=>t.filter(r,up(e,o)),defaults:r=>t.defaults(up(e,r)),makeRe:(r,o={})=>t.makeRe(r,up(e,o)),braceExpand:(r,o={})=>t.braceExpand(r,up(e,o)),match:(r,o,i={})=>t.match(r,o,up(e,i)),sep:t.sep,GLOBSTAR:gt.GLOBSTAR})};gt.defaults=f1t;gt.minimatch.defaults=gt.defaults;var m1t=(e,t={})=>((0,Z3.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,FDt.expand)(e,{max:t.braceExpandMax}));gt.braceExpand=m1t;gt.minimatch.braceExpand=gt.braceExpand;var A1t=(e,t={})=>new XS(e,t).makeRe();gt.makeRe=A1t;gt.minimatch.makeRe=gt.makeRe;var g1t=(e,t,n={})=>{let r=new XS(t,n);return e=e.filter(o=>r.match(o)),r.options.nonull&&!e.length&&e.push(t),e};gt.match=g1t;gt.minimatch.match=gt.match;var YOe=/[?*]|[+@!]\(.*?\)|\[|\]/,h1t=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),XS=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,n={}){(0,Z3.assertValidPattern)(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||XOe,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let n of t)if(typeof n!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let o=this.globParts.map((i,s,u)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=i[0]===""&&i[1]===""&&(i[2]==="?"||!YOe.test(i[2]))&&!YOe.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 u=r[o+1],l=r[o+2],f=r[o+3];if(u!==".."||!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 u=r[s];s===1&&u===""&&r[0]===""||(u==="."||u==="")&&(n=!0,r.splice(s,1),s--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let i=0;for(;(i=r.indexOf("..",i+1))!==-1;){let s=r[i-1];if(s&&s!=="."&&s!==".."&&s!=="**"){n=!0;let l=i===1&&r[i+1]==="**"?["."]:[];r.splice(i-1,2,...l),r.length===0&&r.push(""),i-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let r=n+1;r<t.length;r++){let o=this.partsMatch(t[n],t[r],!this.preserveMultipleSlashes);if(o){t[n]=[],t[r]=o;break}}return t.filter(n=>n.length)}partsMatch(t,n,r=!1){let o=0,i=0,s=[],u="";for(;o<t.length&&i<n.length;)if(t[o]===n[i])s.push(u==="b"?n[i]:t[o]),o++,i++;else if(r&&t[o]==="**"&&n[i]===t[o+1])s.push(t[o]),o++;else if(r&&n[i]==="**"&&t[o]===n[i+1])s.push(n[i]),i++;else if(t[o]==="*"&&n[i]&&(this.options.dot||!n[i].startsWith("."))&&n[i]!=="**"){if(u==="b")return!1;u="a",s.push(t[o]),o++,i++}else if(n[i]==="*"&&t[o]&&(this.options.dot||!t[o].startsWith("."))&&t[o]!=="**"){if(u==="a")return!1;u="b",s.push(n[i]),o++,i++}else return!1;return t.length===n.length&&s}parseNegate(){if(this.nonegate)return;let t=this.pattern,n=!1,r=0;for(let o=0;o<t.length&&t.charAt(o)==="!";o++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r=!1){let o=0,i=0;if(this.isWindows){let u=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),l=!u&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),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]),_=l?3:u?0:void 0,E=h?3:f?0:void 0;if(typeof _=="number"&&typeof E=="number"){let[T,v]=[t[_],n[E]];T.toLowerCase()===v.toLowerCase()&&(n[E]=T,i=E,o=_)}}let{optimizationLevel:s=1}=this.options;return s>=2&&(t=this.levelTwoFileOptimize(t)),n.includes(gt.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(gt.GLOBSTAR,i),u=n.lastIndexOf(gt.GLOBSTAR),[l,f,h]=r?[n.slice(i,s),n.slice(s+1),[]]:[n.slice(i,s),n.slice(s+1,u),n.slice(u+1)];if(l.length){let P=t.slice(o,o+l.length);if(!this.#o(P,l,r,0,0))return!1;o+=l.length,i+=l.length}let _=0;if(h.length){if(h.length+o>t.length)return!1;let P=t.length-h.length;if(this.#o(t,h,r,P,0))_=h.length;else{if(t[t.length-1]!==""||o+h.length===t.length||(P--,!this.#o(t,h,r,P,0)))return!1;_=h.length+1}}if(!f.length){let P=!!_;for(let G=o;G<t.length-_;G++){let j=String(t[G]);if(P=!0,j==="."||j===".."||!this.options.dot&&j.startsWith("."))return!1}return r||P}let E=[[[],0]],T=E[0],v=0,R=[0];for(let P of f)P===gt.GLOBSTAR?(R.push(v),T=[[],0],E.push(T)):(T[0].push(P),v++);let x=E.length-1,B=t.length-_;for(let P of E)P[1]=B-(R[x--]+P[0].length);return!!this.#r(t,E,o,0,r,0,!!_)}#r(t,n,r,o,i,s,u){let l=n[o];if(!l){for(let _=r;_<t.length;_++){u=!0;let E=t[_];if(E==="."||E===".."||!this.options.dot&&E.startsWith("."))return!1}return u}let[f,h]=l;for(;r<=h;){if(this.#o(t.slice(0,r+f.length),f,i,r,0)&&s<this.maxGlobstarRecursion){let T=this.#r(t,n,r+f.length,o+1,i,s+1,u);if(T!==!1)return T}let E=t[r];if(E==="."||E===".."||!this.options.dot&&E.startsWith("."))return!1;r++}return i||null}#o(t,n,r,o,i){let s,u,l,f;for(s=o,u=i,f=t.length,l=n.length;s<f&&u<l;s++,u++){this.debug("matchOne loop");let h=n[u],_=t[s];if(this.debug(n,h,_),h===!1||h===gt.GLOBSTAR)return!1;let E;if(typeof h=="string"?(E=_===h,this.debug("string match",h,_,E)):(E=h.test(_),this.debug("pattern match",h,_,E)),!E)return!1}if(s===f&&u===l)return!0;if(s===f)return r;if(u===l)return s===f-1&&t[s]==="";throw new Error("wtf?")}braceExpand(){return(0,gt.braceExpand)(this.pattern,this.options)}parse(t){(0,Z3.assertValidPattern)(t);let n=this.options;if(t==="**")return gt.GLOBSTAR;if(t==="")return"";let r,o=null;(r=t.match(e1t))?o=n.dot?n1t:t1t:(r=t.match(HDt))?o=(n.nocase?n.dot?KDt:VDt:n.dot?qDt:$Dt)(r[1]):(r=t.match(r1t))?o=(n.nocase?n.dot?i1t:o1t:n.dot?s1t:a1t)(r):(r=t.match(YDt))?o=n.dot?ZDt:JDt:(r=t.match(WDt))&&(o=XDt);let i=JOe.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?c1t:n.dot?l1t:d1t,o=new Set(n.nocase?["i"]:[]),i=t.map(l=>{let f=l.map(_=>{if(_ instanceof RegExp)for(let E of _.flags.split(""))o.add(E);return typeof _=="string"?h1t(_):_===gt.GLOBSTAR?gt.GLOBSTAR:_._src});f.forEach((_,E)=>{let T=f[E+1],v=f[E-1];_!==gt.GLOBSTAR||v===gt.GLOBSTAR||(v===void 0?T!==void 0&&T!==gt.GLOBSTAR?f[E+1]="(?:\\/|"+r+"\\/)?"+T:f[E]=r:T===void 0?f[E-1]=v+"(?:\\/|\\/"+r+")?":T!==gt.GLOBSTAR&&(f[E-1]=v+"(?:\\/|\\/"+r+"\\/)"+T,f[E+1]=gt.GLOBSTAR))});let h=f.filter(_=>_!==gt.GLOBSTAR);if(this.partial&&h.length>=1){let _=[];for(let E=1;E<=h.length;E++)_.push(h.slice(0,E).join("/"));return"(?:"+_.join("|")+")"}return h.join("/")}).join("|"),[s,u]=t.length>1?["(?:",")"]:["",""];i="^"+s+i+u+"$",this.partial&&(i="^(?:\\/|"+s+i.slice(1,-1)+u+")$"),this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...o].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,n=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;let r=this.options;this.isWindows&&(t=t.split("\\").join("/"));let o=this.slashSplit(t);this.debug(this.pattern,"split",o);let i=this.set;this.debug(this.pattern,"set",i);let s=o[o.length-1];if(!s)for(let u=o.length-2;!s&&u>=0;u--)s=o[u];for(let u=0;u<i.length;u++){let l=i[u],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 gt.minimatch.defaults(t).Minimatch}};gt.Minimatch=XS;var _1t=cX();Object.defineProperty(gt,"AST",{enumerable:!0,get:function(){return _1t.AST}});var E1t=lX();Object.defineProperty(gt,"escape",{enumerable:!0,get:function(){return E1t.escape}});var y1t=$3();Object.defineProperty(gt,"unescape",{enumerable:!0,get:function(){return y1t.unescape}});gt.minimatch.AST=JOe.AST;gt.minimatch.Minimatch=XS;gt.minimatch.escape=GDt.escape;gt.minimatch.unescape=jDt.unescape});var aPe=M((AOn,fX)=>{"use strict";m();var tPe=Fe("node:diagnostics_channel"),{context:W3,trace:dX,SpanStatusCode:X3,propagation:pX,diag:S1t}=($e(),Le(nt)),{getRPCMetadata:T1t,RPCType:b1t}=Rr(),{ATTR_HTTP_ROUTE:e6,ATTR_HTTP_RESPONSE_STATUS_CODE:nPe,ATTR_HTTP_REQUEST_METHOD:I1t,ATTR_URL_PATH:C1t}=(tr(),Le(Kr)),{InstrumentationBase:v1t}=NOe(),{version:R1t,name:rPe}=wOe(),x1t=">=4.0.0 <6",oPe=["onRequest","preParsing","preValidation","preHandler","preSerialization","onSend","onResponse","onError"],Ro={HOOK_NAME:"hook.name",FASTIFY_TYPE:"fastify.type",HOOK_CALLBACK_NAME:"hook.callback.name",ROOT:"fastify.root"},_E={ROUTE:"route-hook",INSTANCE:"hook",HANDLER:"request-handler"},Kg="anonymous",EE=Symbol("fastify otel instance"),yE=Symbol("fastify otel request spans"),AB=Symbol("fastify otel request context"),iPe=Symbol("fastify otel addhook original"),sPe=Symbol("fastify otel setnotfound original"),gB=Symbol("fastify otel ignore path"),hB=Symbol("fastify otel record exceptions"),t6=class extends v1t{logger=null;_requestHook=null;_lifecycleHook=null;constructor(t){if(super(rPe,R1t,t),this.logger=S1t.createComponentLogger({namespace:rPe}),this[gB]=null,this[hB]=!0,t?.recordExceptions!=null){if(typeof t.recordExceptions!="boolean")throw new TypeError("recordExceptions must be a boolean");this[hB]=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[gB]=o=>typeof n=="function"?n(o):(r==null&&(r=ePe().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)},tPe.subscribe("fastify.initialization",this._handleInitialization)),super.enable()}disable(){return this._handleInitialization&&(tPe.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:x1t,name:"@fastify/otel"},n;function n(r,o,i){r.decorate(EE,t),r.decorate(iPe,r.addHook),r.decorate(sPe,r.setNotFoundHandler),r.decorateRequest("opentelemetry",function(){let T=this[AB],v=this[yE];return{enabled:this.routeOptions.config?.otel!==!1,span:v,tracer:t.tracer,context:T,inject:(R,x)=>pX.inject(T,R,x),extract:(R,x)=>pX.extract(T,R,x)}}),r.decorateRequest(yE,null),r.decorateRequest(AB,null),r.addHook("onRoute",function(T){if(t[gB]?.(T)===!0){t.logger.debug(`Ignoring route instrumentation ${T.method} ${T.url} because it matches the ignore path`);return}if(T.config?.otel===!1){t.logger.debug(`Ignoring route instrumentation ${T.method} ${T.url} because it is disabled`);return}for(let v of oPe)if(T[v]!=null){let R=T[v];if(typeof R=="function")T[v]=_(R,v,{[Ro.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[Ro.FASTIFY_TYPE]:_E.ROUTE,[e6]:T.url,[Ro.HOOK_CALLBACK_NAME]:R.name?.length>0?R.name:Kg});else if(Array.isArray(R)){let x=[];for(let B of R)x.push(_(B,v,{[Ro.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[Ro.FASTIFY_TYPE]:_E.ROUTE,[e6]:T.url,[Ro.HOOK_CALLBACK_NAME]:B.name?.length>0?B.name:Kg}));T[v]=x}}T.onSend!=null?T.onSend=Array.isArray(T.onSend)?[...T.onSend,s]:[T.onSend,s]:T.onSend=s,T.onError!=null?T.onError=Array.isArray(T.onError)?[...T.onError,u]:[T.onError,u]:T.onError=u,T.handler=_(T.handler,"handler",{[Ro.HOOK_NAME]:`${this.pluginName} - route-handler`,[Ro.FASTIFY_TYPE]:_E.HANDLER,[e6]:T.url,[Ro.HOOK_CALLBACK_NAME]:T.handler.name.length>0?T.handler.name:Kg})}),r.addHook("onRequest",function(T,v,R){if(this[EE].isEnabled()===!1||T.routeOptions.config?.otel===!1)return R();if(this[EE][gB]?.({url:T.url,method:T.method})===!0)return this[EE].logger.debug(`Ignoring request ${T.method} ${T.url} because it matches the ignore path`),R();let x=W3.active();dX.getSpan(x)==null&&(x=pX.extract(x,T.headers));let B=T1t(x);T.routeOptions.url!=null&&B?.type===b1t.HTTP&&(B.route=T.routeOptions.url);let P={[Ro.ROOT]:"@fastify/otel",[I1t]:T.method,[C1t]:T.url};T.routeOptions.url!=null&&(P[e6]=T.routeOptions.url);let G=this[EE].tracer.startSpan("request",{attributes:P},x);try{this[EE]._requestHook?.(G,T)}catch(j){this[EE].logger.error({err:j},"requestHook threw")}T[AB]=dX.setSpan(x,G),T[yE]=G,W3.with(T[AB],()=>{R()})}),r.addHook("onResponse",function(T,v,R){let x=T[yE];x!=null&&(x.setAttributes({[nPe]:v.statusCode}),x.end()),T[yE]=null,R()}),r.addHook=l,r.setNotFoundHandler=f,i();function s(E,T,v,R){let x=E[yE];x!=null&&(T.statusCode>=500&&x.setStatus({code:X3.ERROR}),x.setAttributes({[nPe]:T.statusCode}),x.end()),E[yE]=null,R(null,v)}function u(E,T,v,R){let x=E[yE];x!=null&&(x.setStatus({code:X3.ERROR,message:v.message}),t[hB]!==!1&&x.recordException(v)),R()}function l(E,T){let v=this[iPe];return oPe.includes(E)?v.call(this,E,_(T,E,{[Ro.HOOK_NAME]:`${this.pluginName} - ${E}`,[Ro.FASTIFY_TYPE]:_E.INSTANCE,[Ro.HOOK_CALLBACK_NAME]:T.name?.length>0?T.name:Kg})):v.call(this,E,T)}function f(E,T){let v=this[sPe];typeof E=="function"?(T=_(E,"notFoundHandler",{[Ro.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[Ro.FASTIFY_TYPE]:_E.INSTANCE,[Ro.HOOK_CALLBACK_NAME]:E.name?.length>0?E.name:Kg}),v.call(this,T)):(E.preValidation!=null&&(E.preValidation=_(E.preValidation,"notFoundHandler - preValidation",{[Ro.HOOK_NAME]:`${this.pluginName} - not-found-handler - preValidation`,[Ro.FASTIFY_TYPE]:_E.INSTANCE,[Ro.HOOK_CALLBACK_NAME]:E.preValidation.name?.length>0?E.preValidation.name:Kg})),E.preHandler!=null&&(E.preHandler=_(E.preHandler,"notFoundHandler - preHandler",{[Ro.HOOK_NAME]:`${this.pluginName} - not-found-handler - preHandler`,[Ro.FASTIFY_TYPE]:_E.INSTANCE,[Ro.HOOK_CALLBACK_NAME]:E.preHandler.name?.length>0?E.preHandler.name:Kg})),T=_(T,"notFoundHandler",{[Ro.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[Ro.FASTIFY_TYPE]:_E.INSTANCE,[Ro.HOOK_CALLBACK_NAME]:T.name?.length>0?T.name:Kg}),v.call(this,E,T))}function h(E){for(let T of E)if(T?.routeOptions&&T.url&&T.method)return T;return null}function _(E,T,v={}){return function(...x){let B=this[EE],P=h(x);if(P===null)return B.logger.debug(`Ignoring route instrumentation because ${T} was called without a Fastify request argument`),E.call(this,...x);if(B.isEnabled()===!1||P.routeOptions.config?.otel===!1)return B.logger.debug(`Ignoring route instrumentation ${P.routeOptions.method} ${P.routeOptions.url} because it is disabled`),E.call(this,...x);if(B[gB]?.({url:P.url,method:P.method})===!0)return B.logger.debug(`Ignoring route instrumentation ${P.routeOptions.method} ${P.routeOptions.url} because it matches the ignore path`),E.call(this,...x);let G=P[AB]??W3.active(),j=E.name?.length>0?E.name:this.pluginName??Kg,$=B.tracer.startSpan(`${T} - ${j}`,{attributes:v},G);if(B._lifecycleHook!=null)try{B._lifecycleHook($,{hookName:T,request:P,handler:j})}catch(V){B.logger.error({err:V},"Execution of lifecycleHook failed")}return W3.with(dX.setSpan(G,$),function(){try{let V=E.call(this,...x);return typeof V?.then=="function"?V.then(oe=>($.end(),oe),oe=>($.setStatus({code:X3.ERROR,message:oe.message}),B[hB]!==!1&&$.recordException(oe),$.end(),Promise.reject(oe))):($.end(),V)}catch(V){throw $.setStatus({code:X3.ERROR,message:V.message}),B[hB]!==!1&&$.recordException(V),$.end(),V}},this)}}}}};fX.exports=t6;fX.exports.FastifyOtelInstrumentation=t6});var Yg,_B,EB,uPe=k(()=>{m();(function(e){let t="fastify.name";e.FASTIFY_NAME=t;let n="fastify.type";e.FASTIFY_TYPE=n;let r="hook.name";e.HOOK_NAME=r;let o="plugin.name";e.PLUGIN_NAME=o})(Yg||(Yg={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request_handler";e.REQUEST_HANDLER=n})(_B||(_B={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request handler";e.REQUEST_HANDLER=n})(EB||(EB={}))});var yB,cPe=k(()=>{m();yB=Symbol("opentelemetry.instrumentation.fastify.request_active_span")});function mX(e,t,n,r={}){let o=t.startSpan(n,{attributes:r}),i=e[yB]||[];return i.push(o),Object.defineProperty(e,yB,{enumerable:!1,configurable:!0,value:i}),o}function n6(e,t){let n=e[yB]||[];n.length&&(n.forEach(r=>{t&&(r.setStatus({code:hi.ERROR,message:t.message}),r.recordException(t)),r.end()}),delete e[yB])}function dPe(e,t,n){let r,o;try{o=e(),lPe(o)&&o.then(i=>t(void 0,i),i=>t(i))}catch(i){r=i}finally{if(!lPe(o)&&(t(r,o),r))throw r;return o}}function lPe(e){return typeof e=="object"&&e&&typeof Object.getOwnPropertyDescriptor(e,"then")?.value=="function"||!1}var pPe=k(()=>{m();$e();cPe()});function k1t(){let e=yt();e&&e.on("spanStart",t=>{mPe(t)})}function mPe(e){let t=Lt(e).data,n=t["fastify.type"];if(t[on]||!n)return;e.setAttributes({[Ut]:"auto.http.otel.fastify",[on]:`${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 o6,eT,D1t,N1t,fPe,w1t,r6,APe=k(()=>{m();$e();o6=ue(Rr(),1),eT=ue(ln(),1);tr();mt();uPe();pPe();D1t="0.1.0",N1t="@sentry/instrumentation-fastify-v3",fPe="anonymous",w1t=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"]),r6=class extends eT.InstrumentationBase{constructor(t={}){super(N1t,D1t,t)}init(){return[new eT.InstrumentationNodeModuleDefinition("fastify",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_hookOnRequest(){let t=this;return function(r,o,i){if(!t.isEnabled())return i();t._wrap(o,"send",t._patchSend());let s=r,u=(0,o6.getRPCMetadata)(Xe.active()),l=s.routeOptions?s.routeOptions.url:r.routerPath;l&&u?.type===o6.RPCType.HTTP&&(u.route=l);let f=r.method||"GET";xn().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 u=r.name||t||fPe,l=`${EB.MIDDLEWARE} - ${u}`,f=s[1],h=mX(f,i.tracer,l,{[Yg.FASTIFY_TYPE]:_B.MIDDLEWARE,[Yg.PLUGIN_NAME]:t,[Yg.HOOK_NAME]:n}),_=o&&s[s.length-1];return _&&(s[s.length-1]=function(...E){n6(f),_.apply(this,E)}),Xe.with(Jt.setSpan(Xe.active(),h),()=>dPe(()=>r.apply(this,s),E=>{E instanceof Error&&(h.setStatus({code:hi.ERROR,message:E.message}),h.recordException(E)),o||n6(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],u=this.pluginName;if(!w1t.has(i))return n.apply(this,o);let l=typeof o[o.length-1]=="function"&&s.constructor.name!=="AsyncFunction";return n.apply(this,[i,t._wrapHandler(u,i,s,l)])}}}_patchConstructor(t){let n=this;function r(...o){let i=t.fastify.apply(this,o);return i.addHook("onRequest",n._hookOnRequest()),i.addHook("preHandler",n._hookPreHandler()),k1t(),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,eT.safeExecuteInTheMiddle)(()=>r.apply(this,i),u=>{!u&&s instanceof Error&&(u=s),n6(this,u)}):r.apply(this,i)}}}_hookPreHandler(){let t=this;return this._diag.debug("Patching fastify preHandler function"),function(r,o,i){if(!t.isEnabled())return i();let s=r,u=s.routeOptions?.handler||s.context?.handler,l=u?.name.startsWith("bound ")?u.name.substring(6):u?.name,f=`${EB.REQUEST_HANDLER} - ${l||this.pluginName||fPe}`,h={[Yg.PLUGIN_NAME]:this.pluginName,[Yg.FASTIFY_TYPE]:_B.REQUEST_HANDLER,[r7]:s.routeOptions?s.routeOptions.url:r.routerPath};l&&(h[Yg.FASTIFY_NAME]=l);let _=mX(o,t.tracer,f,h);mPe(_);let{requestHook:E}=t.getConfig();return E&&(0,eT.safeExecuteInTheMiddle)(()=>E(_,{request:r}),T=>{T&&t._diag.error("request hook failed",T)},!0),Xe.with(Jt.setSpan(Xe.active(),_),()=>{i()})}}}});import*as AX from"node:diagnostics_channel";function B1t(){let e=yt();if(e)return e.getIntegrationByName(i6)}function gPe(e,t,n,r){let o=B1t()?.getShouldHandleError()||SPe;if(r==="diagnostics-channel"&&(this.diagnosticsChannelExists=!0),this.diagnosticsChannelExists&&r==="onError-hook"){ks&&W.warn("Fastify error handler was already registered via diagnostics channel.","You can safely remove `setupFastifyErrorHandler` call and set `shouldHandleError` on the integration options.");return}o(e,t,n)&&cn(e,{mechanism:{handled:!1,type:"auto.function.fastify"}})}function SPe(e,t,n){let r=n.statusCode;return r>=500||r<=299}function TPe(e){let t=Lt(e),n=t.description,r=t.data,o=r["fastify.type"],i=o==="hook",s=o===n?.startsWith("handler -"),u=n==="request"||o==="request-handler";if(r[on]||!s&&!u&&!i)return;let l=i?"hook":s?"middleware":u?"request_handler":"<unknown>";e.setAttributes({[Ut]:"auto.http.otel.fastify",[on]:`${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 P1t(){let e=yt();e&&e.on("spanStart",t=>{TPe(t)})}function M1t(e){e.addHook("onRequest",async(t,n)=>{if(t.opentelemetry){let{span:i}=t.opentelemetry();i&&TPe(i)}let r=t.routeOptions?.url,o=t.method||"GET";xn().setTransactionName(`${o} ${r}`)})}var hPe,i6,_Pe,EPe,O1t,yPe,bPe=k(()=>{m();hPe=ue(aPe(),1);mt();yr();JS();APe();i6="Fastify",_Pe=ct(`${i6}.v3`,()=>new r6);EPe=ct(`${i6}.v5`,()=>{let e=new hPe.FastifyOtelInstrumentation,t=e.plugin();return AX.subscribe("fastify.initialization",n=>{let r=n.fastify;r?.register(t).after(o=>{o?ks&&W.error("Failed to setup Fastify instrumentation",o):(P1t(),r&&M1t(r))})}),AX.subscribe("tracing:fastify.request.handler:error",n=>{let{error:r,request:o,reply:i}=n;gPe.call(gPe,r,o,i,"diagnostics-channel")}),e}),O1t=(({shouldHandleError:e})=>{let t;return{name:i6,setupOnce(){t=e||SPe,_Pe(),EPe()},getShouldHandleError(){return t},setShouldHandleError(n){t=n}}}),yPe=(e={})=>O1t(e)});var gX=M(xf=>{"use strict";m();Object.defineProperty(xf,"__esModule",{value:!0});xf.SpanNames=xf.TokenKind=xf.AllowedOperationTypes=void 0;var L1t;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(L1t=xf.AllowedOperationTypes||(xf.AllowedOperationTypes={}));var U1t;(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"})(U1t=xf.TokenKind||(xf.TokenKind={}));var Q1t;(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"})(Q1t=xf.SpanNames||(xf.SpanNames={}))});var hX=M(SB=>{"use strict";m();Object.defineProperty(SB,"__esModule",{value:!0});SB.AttributeNames=void 0;var F1t;(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"})(F1t=SB.AttributeNames||(SB.AttributeNames={}))});var s6=M(SR=>{"use strict";m();Object.defineProperty(SR,"__esModule",{value:!0});SR.OTEL_GRAPHQL_DATA_SYMBOL=SR.OTEL_PATCHED_SYMBOL=void 0;SR.OTEL_PATCHED_SYMBOL=Symbol.for("opentelemetry.patched");SR.OTEL_GRAPHQL_DATA_SYMBOL=Symbol.for("opentelemetry.graphql_data")});var IPe=M(a6=>{"use strict";m();Object.defineProperty(a6,"__esModule",{value:!0});a6.OPERATION_NOT_SUPPORTED=void 0;var HOn=s6();a6.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var UPe=M(Bs=>{"use strict";m();Object.defineProperty(Bs,"__esModule",{value:!0});Bs.wrapFieldResolver=Bs.wrapFields=Bs.getSourceFromLocation=Bs.getOperation=Bs.endSpan=Bs.addSpanSource=Bs.addInputVariableAttributes=Bs.isPromise=void 0;var TR=($e(),Le(nt)),SE=gX(),tT=hX(),Jg=s6(),CPe=Object.values(SE.AllowedOperationTypes),G1t=e=>typeof e?.then=="function";Bs.isPromise=G1t;var j1t=e=>typeof e=="object"&&e!==null;function _X(e,t,n){Array.isArray(n)?n.forEach((r,o)=>{_X(e,`${t}.${o}`,r)}):n instanceof Object?Object.entries(n).forEach(([r,o])=>{_X(e,`${t}.${r}`,o)}):e.setAttribute(`${tT.AttributeNames.VARIABLES}${String(t)}`,n)}function z1t(e,t){Object.entries(t).forEach(([n,r])=>{_X(e,n,r)})}Bs.addInputVariableAttributes=z1t;function DPe(e,t,n,r,o){let i=OPe(t,n,r,o);e.setAttribute(tT.AttributeNames.SOURCE,i)}Bs.addSpanSource=DPe;function H1t(e,t,n,r,o){let i=NPe(n,o);if(i)return{field:i,spanAdded:!1};let u=t().flatResolveSpans?kPe(n):wPe(n,o);return i={span:$1t(e,t,n,r,o,u)},K1t(n,o,i),{field:i,spanAdded:!0}}function $1t(e,t,n,r,o,i){let s={[tT.AttributeNames.FIELD_NAME]:r.fieldName,[tT.AttributeNames.FIELD_PATH]:o.join("."),[tT.AttributeNames.FIELD_TYPE]:r.returnType.toString(),[tT.AttributeNames.PARENT_NAME]:r.parentType.name},u=e.startSpan(`${SE.SpanNames.RESOLVE} ${s[tT.AttributeNames.FIELD_PATH]}`,{attributes:s},i?TR.trace.setSpan(TR.context.active(),i):void 0),l=n[Jg.OTEL_GRAPHQL_DATA_SYMBOL].source,f=r.fieldNodes.find(h=>h.kind==="Field");return f&&DPe(u,l.loc,t().allowValues,f.loc?.start,f.loc?.end),u}function q1t(e,t){t&&e.recordException(t),e.end()}Bs.endSpan=q1t;function V1t(e,t){if(!(!e||!Array.isArray(e.definitions)))return t?e.definitions.filter(n=>CPe.indexOf(n?.operation)!==-1).find(n=>t===n?.name?.value):e.definitions.find(n=>CPe.indexOf(n?.operation)!==-1)}Bs.getOperation=V1t;function K1t(e,t,n){return e[Jg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]=n}function NPe(e,t){return e[Jg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]}function wPe(e,t){for(let n=t.length-1;n>0;n--){let r=NPe(e,t.slice(0,n));if(r)return r.span}return kPe(e)}function kPe(e){return e[Jg.OTEL_GRAPHQL_DATA_SYMBOL].span}function Y1t(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 J1t(e){return BPe(`
|
|
37
37
|
`,e)}function vPe(e){return BPe(" ",e)}function BPe(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}var Z1t=[SE.TokenKind.FLOAT,SE.TokenKind.STRING,SE.TokenKind.INT,SE.TokenKind.BLOCK_STRING];function OPe(e,t=!1,n,r){let o="";if(e?.startToken){let i=typeof n=="number"?n:e.start,s=typeof r=="number"?r:e.end,u=e.startToken.next,l=1;for(;u;){if(u.start<i){u=u.next,l=u?.line;continue}if(u.end>s){u=u.next,l=u?.line;continue}let f=u.value||u.kind,h="";!t&&Z1t.indexOf(u.kind)>=0&&(f="*"),u.kind===SE.TokenKind.STRING&&(f=`"${f}"`),u.kind===SE.TokenKind.EOF&&(f=""),u.line>l?(o+=J1t(u.line-l),l=u.line,h=vPe(u.column-1)):u.line===u.prev?.line&&(h=vPe(u.start-(u.prev?.end||0))),o+=h+f,u&&(u=u.next)}}return o}Bs.getSourceFromLocation=OPe;function PPe(e,t,n){if(!e||e[Jg.OTEL_PATCHED_SYMBOL])return;let r=e.getFields();e[Jg.OTEL_PATCHED_SYMBOL]=!0,Object.keys(r).forEach(o=>{let i=r[o];if(i&&(i.resolve&&(i.resolve=LPe(t,n,i.resolve)),i.type)){let s=MPe(i.type);for(let u of s)PPe(u,t,n)}})}Bs.wrapFields=PPe;function MPe(e){return"ofType"in e?MPe(e.ofType):W1t(e)?e.getTypes():X1t(e)?[e]:[]}function W1t(e){return"getTypes"in e&&typeof e.getTypes=="function"}function X1t(e){return"getFields"in e&&typeof e.getFields=="function"}var RPe=(e,t,n)=>{n&&(e.recordException(t),e.setStatus({code:TR.SpanStatusCode.ERROR,message:t.message}),e.end())},xPe=(e,t)=>{t&&e.end()};function LPe(e,t,n,r=!1){if(o[Jg.OTEL_PATCHED_SYMBOL]||typeof n!="function")return n;function o(i,s,u,l){if(!n)return;let f=t();if(f.ignoreTrivialResolveSpans&&r&&(j1t(i)||typeof i=="function")&&typeof i[l.fieldName]!="function")return n.call(this,i,s,u,l);if(!u[Jg.OTEL_GRAPHQL_DATA_SYMBOL])return n.call(this,i,s,u,l);let h=Y1t(f.mergeItems,l&&l.path),_=h.filter(v=>typeof v=="string").length,E,T=!1;if(f.depth>=0&&f.depth<_)E=wPe(u,h);else{let{field:v,spanAdded:R}=H1t(e,t,u,l,h);E=v.span,T=R}return TR.context.with(TR.trace.setSpan(TR.context.active(),E),()=>{try{let v=n.call(this,i,s,u,l);return(0,Bs.isPromise)(v)?v.then(R=>(xPe(E,T),R),R=>{throw RPe(E,R,T),R}):(xPe(E,T),v)}catch(v){throw RPe(E,v,T),v}})}return o[Jg.OTEL_PATCHED_SYMBOL]=!0,o}Bs.wrapFieldResolver=LPe});var QPe=M(bR=>{"use strict";m();Object.defineProperty(bR,"__esModule",{value:!0});bR.PACKAGE_NAME=bR.PACKAGE_VERSION=void 0;bR.PACKAGE_VERSION="0.62.0";bR.PACKAGE_NAME="@opentelemetry/instrumentation-graphql"});var jPe=M(l6=>{"use strict";m();Object.defineProperty(l6,"__esModule",{value:!0});l6.GraphQLInstrumentation=void 0;var Zg=($e(),Le(nt)),cp=ln(),TB=gX(),u6=hX(),EX=s6(),eNt=IPe(),fu=UPe(),FPe=QPe(),GPe={mergeItems:!1,depth:-1,allowValues:!1,ignoreResolveSpans:!1},c6=[">=14.0.0 <17"],yX=class extends cp.InstrumentationBase{constructor(t={}){super(FPe.PACKAGE_NAME,FPe.PACKAGE_VERSION,{...GPe,...t})}setConfig(t={}){super.setConfig({...GPe,...t})}init(){let t=new cp.InstrumentationNodeModuleDefinition("graphql",c6);return t.files.push(this._addPatchingExecute()),t.files.push(this._addPatchingParser()),t.files.push(this._addPatchingValidate()),t}_addPatchingExecute(){return new cp.InstrumentationNodeModuleFile("graphql/execution/execute.js",c6,t=>((0,cp.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 cp.InstrumentationNodeModuleFile("graphql/language/parser.js",c6,t=>((0,cp.isWrapped)(t.parse)&&this._unwrap(t,"parse"),this._wrap(t,"parse",this._patchParse()),t),t=>{t&&this._unwrap(t,"parse")})}_addPatchingValidate(){return new cp.InstrumentationNodeModuleFile("graphql/validation/validate.js",c6,t=>((0,cp.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 u=(0,fu.getOperation)(s.document,s.operationName),l=n._createExecuteSpan(u,s);return s.contextValue[EX.OTEL_GRAPHQL_DATA_SYMBOL]={source:s.document?s.document||s.document[EX.OTEL_GRAPHQL_DATA_SYMBOL]:void 0,span:l,fields:{}},Zg.context.with(Zg.trace.setSpan(Zg.context.active(),l),()=>(0,cp.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,fu.endSpan)(t,n);return}if((0,fu.isPromise)(r))r.then(i=>{if(typeof o.responseHook!="function"){(0,fu.endSpan)(t);return}this._executeResponseHook(t,i)},i=>{(0,fu.endSpan)(t,i)});else{if(typeof o.responseHook!="function"){(0,fu.endSpan)(t);return}this._executeResponseHook(t,r)}}_executeResponseHook(t,n){let{responseHook:r}=this.getConfig();r&&(0,cp.safeExecuteInTheMiddle)(()=>{r(t,n)},o=>{o&&this._diag.error("Error running response hook",o),(0,fu.endSpan)(t,void 0)},!0)}_patchParse(){let t=this;return function(r){return function(i,s){return t._parse(this,r,i,s)}}}_patchValidate(){let t=this;return function(r){return function(i,s,u,l,f){return t._validate(this,r,i,s,u,f,l)}}}_parse(t,n,r,o){let i=this.getConfig(),s=this.tracer.startSpan(TB.SpanNames.PARSE);return Zg.context.with(Zg.trace.setSpan(Zg.context.active(),s),()=>(0,cp.safeExecuteInTheMiddle)(()=>n.call(t,r,o),(u,l)=>{l&&((0,fu.getOperation)(l)?l.loc&&(0,fu.addSpanSource)(s,l.loc,i.allowValues):s.updateName(TB.SpanNames.SCHEMA_PARSE)),(0,fu.endSpan)(s,u)}))}_validate(t,n,r,o,i,s,u){let l=this.tracer.startSpan(TB.SpanNames.VALIDATE,{});return Zg.context.with(Zg.trace.setSpan(Zg.context.active(),l),()=>(0,cp.safeExecuteInTheMiddle)(()=>n.call(t,r,o,i,u,s),(f,h)=>{o.loc||l.updateName(TB.SpanNames.SCHEMA_VALIDATE),h&&h.length&&l.recordException({name:u6.AttributeNames.ERROR_VALIDATION_NAME,message:JSON.stringify(h)}),(0,fu.endSpan)(l,f)}))}_createExecuteSpan(t,n){let r=this.getConfig(),o=this.tracer.startSpan(TB.SpanNames.EXECUTE,{});if(t){let{operation:i,name:s}=t;o.setAttribute(u6.AttributeNames.OPERATION_TYPE,i);let u=s?.value;u?(o.setAttribute(u6.AttributeNames.OPERATION_NAME,u),o.updateName(`${i} ${u}`)):o.updateName(i)}else{let i=" ";n.operationName&&(i=` "${n.operationName}" `),i=eNt.OPERATION_NOT_SUPPORTED.replace("$operationName$",i),o.setAttribute(u6.AttributeNames.OPERATION_NAME,i)}return n.document?.loc&&(0,fu.addSpanSource)(o,n.document.loc,r.allowValues),n.variableValues&&r.allowValues&&(0,fu.addInputVariableAttributes)(o,n.variableValues),o}_wrapExecuteArgs(t,n,r,o,i,s,u,l,f){if(o||(o={}),o[EX.OTEL_GRAPHQL_DATA_SYMBOL]||this.getConfig().ignoreResolveSpans)return{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:s,fieldResolver:u,typeResolver:l};let h=u==null,_=u??f;return u=(0,fu.wrapFieldResolver)(this.tracer,()=>this.getConfig(),_,h),t&&((0,fu.wrapFields)(t.getQueryType(),this.tracer,()=>this.getConfig()),(0,fu.wrapFields)(t.getMutationType(),this.tracer,()=>this.getConfig())),{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:s,fieldResolver:u,typeResolver:l}}};l6.GraphQLInstrumentation=yX});var zPe=M(d6=>{"use strict";m();Object.defineProperty(d6,"__esModule",{value:!0});d6.GraphQLInstrumentation=void 0;var tNt=jPe();Object.defineProperty(d6,"GraphQLInstrumentation",{enumerable:!0,get:function(){return tNt.GraphQLInstrumentation}})});function KPe(e){return{ignoreResolveSpans:!0,ignoreTrivialResolveSpans:!0,useOperationNameForRootSpan:!0,...e}}function rNt(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 HPe,$Pe,qPe,nNt,VPe,YPe=k(()=>{m();$e();HPe=ue(zPe(),1);mt();yr();aR();$Pe="Graphql",qPe=ct($Pe,HPe.GraphQLInstrumentation,e=>{let t=KPe(e);return{...t,responseHook(n,r){Jr(n,"auto.graphql.otel.graphql"),r.errors?.length&&!Lt(n).status&&n.setStatus({code:hi.ERROR});let i=Lt(n).data,s=i["graphql.operation.type"],u=i["graphql.operation.name"];if(t.useOperationNameForRootSpan&&s){let l=_i(n),h=Lt(l).data[iR]||[],_=u?`${s} ${u}`:`${s}`;Array.isArray(h)?(h.push(_),l.setAttribute(iR,h)):typeof h=="string"?l.setAttribute(iR,[h,_]):l.setAttribute(iR,_),Lt(l).data["original-description"]||l.setAttribute("original-description",Lt(l).description),l.updateName(`${Lt(l).data["original-description"]} (${rNt(h)})`)}}}}),nNt=((e={})=>({name:$Pe,setupOnce(){qPe(KPe(e))}})),VPe=nNt});var JPe=M(p6=>{"use strict";m();Object.defineProperty(p6,"__esModule",{value:!0});p6.EVENT_LISTENERS_SET=void 0;p6.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.kafkajs.eventListenersSet")});var ZPe=M(f6=>{"use strict";m();Object.defineProperty(f6,"__esModule",{value:!0});f6.bufferTextMapGetter=void 0;f6.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 WPe=M(sr=>{"use strict";m();Object.defineProperty(sr,"__esModule",{value:!0});sr.METRIC_MESSAGING_PROCESS_DURATION=sr.METRIC_MESSAGING_CLIENT_SENT_MESSAGES=sr.METRIC_MESSAGING_CLIENT_OPERATION_DURATION=sr.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES=sr.MESSAGING_SYSTEM_VALUE_KAFKA=sr.MESSAGING_OPERATION_TYPE_VALUE_SEND=sr.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE=sr.MESSAGING_OPERATION_TYPE_VALUE_PROCESS=sr.ATTR_MESSAGING_SYSTEM=sr.ATTR_MESSAGING_OPERATION_TYPE=sr.ATTR_MESSAGING_OPERATION_NAME=sr.ATTR_MESSAGING_KAFKA_OFFSET=sr.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE=sr.ATTR_MESSAGING_KAFKA_MESSAGE_KEY=sr.ATTR_MESSAGING_DESTINATION_PARTITION_ID=sr.ATTR_MESSAGING_DESTINATION_NAME=sr.ATTR_MESSAGING_BATCH_MESSAGE_COUNT=void 0;sr.ATTR_MESSAGING_BATCH_MESSAGE_COUNT="messaging.batch.message_count";sr.ATTR_MESSAGING_DESTINATION_NAME="messaging.destination.name";sr.ATTR_MESSAGING_DESTINATION_PARTITION_ID="messaging.destination.partition.id";sr.ATTR_MESSAGING_KAFKA_MESSAGE_KEY="messaging.kafka.message.key";sr.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE="messaging.kafka.message.tombstone";sr.ATTR_MESSAGING_KAFKA_OFFSET="messaging.kafka.offset";sr.ATTR_MESSAGING_OPERATION_NAME="messaging.operation.name";sr.ATTR_MESSAGING_OPERATION_TYPE="messaging.operation.type";sr.ATTR_MESSAGING_SYSTEM="messaging.system";sr.MESSAGING_OPERATION_TYPE_VALUE_PROCESS="process";sr.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE="receive";sr.MESSAGING_OPERATION_TYPE_VALUE_SEND="send";sr.MESSAGING_SYSTEM_VALUE_KAFKA="kafka";sr.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES="messaging.client.consumed.messages";sr.METRIC_MESSAGING_CLIENT_OPERATION_DURATION="messaging.client.operation.duration";sr.METRIC_MESSAGING_CLIENT_SENT_MESSAGES="messaging.client.sent.messages";sr.METRIC_MESSAGING_PROCESS_DURATION="messaging.process.duration"});var XPe=M(IR=>{"use strict";m();Object.defineProperty(IR,"__esModule",{value:!0});IR.PACKAGE_NAME=IR.PACKAGE_VERSION=void 0;IR.PACKAGE_VERSION="0.23.0";IR.PACKAGE_NAME="@opentelemetry/instrumentation-kafkajs"});var iMe=M(A6=>{"use strict";m();Object.defineProperty(A6,"__esModule",{value:!0});A6.KafkaJsInstrumentation=void 0;var Zr=($e(),Le(nt)),lp=ln(),CR=(tr(),Le(Kr)),eMe=JPe(),tMe=ZPe(),ht=WPe(),nMe=XPe();function m6(e,t,n){return r=>{e.add(t,{...n,...r?{[CR.ATTR_ERROR_TYPE]:r}:{}})}}function rMe(e,t,n){return r=>{e.record((Date.now()-t)/1e3,{...n,...r?{[CR.ATTR_ERROR_TYPE]:r}:{}})}}var oMe=[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10],SX=class extends lp.InstrumentationBase{constructor(t={}){super(nMe.PACKAGE_NAME,nMe.PACKAGE_VERSION,t)}_updateMetricInstruments(){this._clientDuration=this.meter.createHistogram(ht.METRIC_MESSAGING_CLIENT_OPERATION_DURATION,{advice:{explicitBucketBoundaries:oMe}}),this._sentMessages=this.meter.createCounter(ht.METRIC_MESSAGING_CLIENT_SENT_MESSAGES),this._consumedMessages=this.meter.createCounter(ht.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES),this._processDuration=this.meter.createHistogram(ht.METRIC_MESSAGING_PROCESS_DURATION,{advice:{explicitBucketBoundaries:oMe}})}init(){let t=r=>{(0,lp.isWrapped)(r?.Kafka?.prototype.producer)&&this._unwrap(r.Kafka.prototype,"producer"),(0,lp.isWrapped)(r?.Kafka?.prototype.consumer)&&this._unwrap(r.Kafka.prototype,"consumer")};return new lp.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,lp.isWrapped)(i.run)&&t._unwrap(i,"run"),t._wrap(i,"run",t._getConsumerRunPatch()),t._setKafkaEventListeners(i),i}}_setKafkaEventListeners(t){t[eMe.EVENT_LISTENERS_SET]||(t.events?.REQUEST&&t.on(t.events.REQUEST,this._recordClientDurationMetric.bind(this)),t[eMe.EVENT_LISTENERS_SET]=!0)}_recordClientDurationMetric(t){let[n,r]=t.payload.broker.split(":");this._clientDuration.record(t.payload.duration/1e3,{[ht.ATTR_MESSAGING_SYSTEM]:ht.MESSAGING_SYSTEM_VALUE_KAFKA,[ht.ATTR_MESSAGING_OPERATION_NAME]:`${t.payload.apiName}`,[CR.ATTR_SERVER_ADDRESS]:n,[CR.ATTR_SERVER_PORT]:Number.parseInt(r,10)})}_getProducerPatch(){let t=this;return n=>function(...o){let i=n.apply(this,o);return(0,lp.isWrapped)(i.sendBatch)&&t._unwrap(i,"sendBatch"),t._wrap(i,"sendBatch",t._getSendBatchPatch()),(0,lp.isWrapped)(i.send)&&t._unwrap(i,"send"),t._wrap(i,"send",t._getSendPatch()),(0,lp.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,lp.isWrapped)(i.eachMessage)&&t._unwrap(i,"eachMessage"),t._wrap(i,"eachMessage",t._getConsumerEachMessagePatch())),i?.eachBatch&&((0,lp.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=Zr.propagation.extract(Zr.ROOT_CONTEXT,i.message.headers,tMe.bufferTextMapGetter),u=t._startConsumerSpan({topic:i.topic,message:i.message,operationType:ht.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,ctx:s,attributes:{[ht.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}}),l=[rMe(t._processDuration,Date.now(),{[ht.ATTR_MESSAGING_SYSTEM]:ht.MESSAGING_SYSTEM_VALUE_KAFKA,[ht.ATTR_MESSAGING_OPERATION_NAME]:"process",[ht.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[ht.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}),m6(t._consumedMessages,1,{[ht.ATTR_MESSAGING_SYSTEM]:ht.MESSAGING_SYSTEM_VALUE_KAFKA,[ht.ATTR_MESSAGING_OPERATION_NAME]:"process",[ht.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[ht.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)})],f=Zr.context.with(Zr.trace.setSpan(s,u),()=>n.apply(this,o));return t._endSpansOnPromise([u],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:ht.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE,ctx:Zr.ROOT_CONTEXT,attributes:{[ht.ATTR_MESSAGING_BATCH_MESSAGE_COUNT]:i.batch.messages.length,[ht.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}});return Zr.context.with(Zr.trace.setSpan(Zr.context.active(),s),()=>{let u=Date.now(),l=[],f=[m6(n._consumedMessages,i.batch.messages.length,{[ht.ATTR_MESSAGING_SYSTEM]:ht.MESSAGING_SYSTEM_VALUE_KAFKA,[ht.ATTR_MESSAGING_OPERATION_NAME]:"process",[ht.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[ht.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)})];i.batch.messages.forEach(_=>{let E=Zr.propagation.extract(Zr.ROOT_CONTEXT,_.headers,tMe.bufferTextMapGetter),T=Zr.trace.getSpan(E)?.spanContext(),v;T&&(v={context:T}),l.push(n._startConsumerSpan({topic:i.batch.topic,message:_,operationType:ht.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,link:v,attributes:{[ht.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}})),f.push(rMe(n._processDuration,u,{[ht.ATTR_MESSAGING_SYSTEM]:ht.MESSAGING_SYSTEM_VALUE_KAFKA,[ht.ATTR_MESSAGING_OPERATION_NAME]:"process",[ht.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[ht.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(u=>{let l=u.send;u.send=function(...T){return Zr.context.with(Zr.trace.setSpan(Zr.context.active(),i),()=>t._getSendPatch()(l).apply(this,T).catch(R=>{throw i.setStatus({code:Zr.SpanStatusCode.ERROR,message:R?.message}),i.recordException(R),R}))};let f=u.sendBatch;u.sendBatch=function(...T){return Zr.context.with(Zr.trace.setSpan(Zr.context.active(),i),()=>t._getSendBatchPatch()(f).apply(this,T).catch(R=>{throw i.setStatus({code:Zr.SpanStatusCode.ERROR,message:R?.message}),i.recordException(R),R}))};let h=u.commit;u.commit=function(...T){let v=h.apply(this,T).then(()=>{i.setStatus({code:Zr.SpanStatusCode.OK})});return t._endSpansOnPromise([i],[],v)};let _=u.abort;u.abort=function(...T){let v=_.apply(this,T);return t._endSpansOnPromise([i],[],v)}}).catch(u=>{i.setStatus({code:Zr.SpanStatusCode.ERROR,message:u?.message}),i.recordException(u),i.end()}),s}}_getSendBatchPatch(){let t=this;return n=>function(...o){let s=o[0].topicMessages||[],u=[],l=[];s.forEach(h=>{h.messages.forEach(_=>{u.push(t._startProducerSpan(h.topic,_)),l.push(m6(t._sentMessages,1,{[ht.ATTR_MESSAGING_SYSTEM]:ht.MESSAGING_SYSTEM_VALUE_KAFKA,[ht.ATTR_MESSAGING_OPERATION_NAME]:"send",[ht.ATTR_MESSAGING_DESTINATION_NAME]:h.topic,..._.partition!==void 0?{[ht.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(_.partition)}:{}}))})});let f=n.apply(this,o);return t._endSpansOnPromise(u,l,f)}}_getSendPatch(){let t=this;return n=>function(...o){let i=o[0],s=i.messages.map(f=>t._startProducerSpan(i.topic,f)),u=i.messages.map(f=>m6(t._sentMessages,1,{[ht.ATTR_MESSAGING_SYSTEM]:ht.MESSAGING_SYSTEM_VALUE_KAFKA,[ht.ATTR_MESSAGING_OPERATION_NAME]:"send",[ht.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,...f.partition!==void 0?{[ht.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(f.partition)}:{}})),l=n.apply(this,o);return t._endSpansOnPromise(s,u,l)}}_endSpansOnPromise(t,n,r){return Promise.resolve(r).then(o=>(n.forEach(i=>i()),o)).catch(o=>{let i,s=CR.ERROR_TYPE_VALUE_OTHER;throw typeof o=="string"||o===void 0?i=o:typeof o=="object"&&Object.prototype.hasOwnProperty.call(o,"message")&&(i=o.message,s=o.constructor.name),n.forEach(u=>u(s)),t.forEach(u=>{u.setAttribute(CR.ATTR_ERROR_TYPE,s),u.setStatus({code:Zr.SpanStatusCode.ERROR,message:i})}),o}).finally(()=>{t.forEach(o=>o.end())})}_startConsumerSpan({topic:t,message:n,operationType:r,ctx:o,link:i,attributes:s}){let u=r===ht.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?"poll":r,l=this.tracer.startSpan(`${u} ${t}`,{kind:r===ht.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?Zr.SpanKind.CLIENT:Zr.SpanKind.CONSUMER,attributes:{...s,[ht.ATTR_MESSAGING_SYSTEM]:ht.MESSAGING_SYSTEM_VALUE_KAFKA,[ht.ATTR_MESSAGING_DESTINATION_NAME]:t,[ht.ATTR_MESSAGING_OPERATION_TYPE]:r,[ht.ATTR_MESSAGING_OPERATION_NAME]:u,[ht.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n?.key?String(n.key):void 0,[ht.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n?.key&&n.value===null?!0:void 0,[ht.ATTR_MESSAGING_KAFKA_OFFSET]:n?.offset},links:i?[i]:[]},o),{consumerHook:f}=this.getConfig();return f&&n&&(0,lp.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:Zr.SpanKind.PRODUCER,attributes:{[ht.ATTR_MESSAGING_SYSTEM]:ht.MESSAGING_SYSTEM_VALUE_KAFKA,[ht.ATTR_MESSAGING_DESTINATION_NAME]:t,[ht.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n.key?String(n.key):void 0,[ht.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n.key&&n.value===null?!0:void 0,[ht.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:n.partition!==void 0?String(n.partition):void 0,[ht.ATTR_MESSAGING_OPERATION_NAME]:"send",[ht.ATTR_MESSAGING_OPERATION_TYPE]:ht.MESSAGING_OPERATION_TYPE_VALUE_SEND}});n.headers=n.headers??{},Zr.propagation.inject(Zr.trace.setSpan(Zr.context.active(),r),n.headers);let{producerHook:o}=this.getConfig();return o&&(0,lp.safeExecuteInTheMiddle)(()=>o(r,{topic:t,message:n}),i=>{i&&this._diag.error("producerHook error",i)},!0),r}};A6.KafkaJsInstrumentation=SX});var sMe=M(g6=>{"use strict";m();Object.defineProperty(g6,"__esModule",{value:!0});g6.KafkaJsInstrumentation=void 0;var oNt=iMe();Object.defineProperty(g6,"KafkaJsInstrumentation",{enumerable:!0,get:function(){return oNt.KafkaJsInstrumentation}})});var aMe,uMe,cMe,iNt,lMe,dMe=k(()=>{m();aMe=ue(sMe(),1);yr();uMe="Kafka",cMe=ct(uMe,()=>new aMe.KafkaJsInstrumentation({consumerHook(e){Jr(e,"auto.kafkajs.otel.consumer")},producerHook(e){Jr(e,"auto.kafkajs.otel.producer")}})),iNt=(()=>({name:uMe,setupOnce(){cMe()}})),lMe=iNt});var pMe=M(vR=>{"use strict";m();Object.defineProperty(vR,"__esModule",{value:!0});vR.PACKAGE_NAME=vR.PACKAGE_VERSION=void 0;vR.PACKAGE_VERSION="0.58.0";vR.PACKAGE_NAME="@opentelemetry/instrumentation-lru-memoizer"});var gMe=M(h6=>{"use strict";m();Object.defineProperty(h6,"__esModule",{value:!0});h6.LruMemoizerInstrumentation=void 0;var fMe=($e(),Le(nt)),mMe=ln(),AMe=pMe(),TX=class extends mMe.InstrumentationBase{constructor(t={}){super(AMe.PACKAGE_NAME,AMe.PACKAGE_VERSION,t)}init(){return[new mMe.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"?fMe.context.bind(fMe.context.active(),i):i;return o.push(s),r.apply(this,o)}};return n.sync=t.sync,n},void 0)]}};h6.LruMemoizerInstrumentation=TX});var hMe=M(_6=>{"use strict";m();Object.defineProperty(_6,"__esModule",{value:!0});_6.LruMemoizerInstrumentation=void 0;var sNt=gMe();Object.defineProperty(_6,"LruMemoizerInstrumentation",{enumerable:!0,get:function(){return sNt.LruMemoizerInstrumentation}})});var _Me,EMe,yMe,aNt,SMe,TMe=k(()=>{m();_Me=ue(hMe(),1);yr();EMe="LruMemoizer",yMe=ct(EMe,()=>new _Me.LruMemoizerInstrumentation),aNt=(()=>({name:EMe,setupOnce(){yMe()}})),SMe=aNt});var bMe=M(Qo=>{"use strict";m();Object.defineProperty(Qo,"__esModule",{value:!0});Qo.METRIC_DB_CLIENT_CONNECTIONS_USAGE=Qo.DB_SYSTEM_VALUE_MONGODB=Qo.DB_SYSTEM_NAME_VALUE_MONGODB=Qo.ATTR_NET_PEER_PORT=Qo.ATTR_NET_PEER_NAME=Qo.ATTR_DB_SYSTEM=Qo.ATTR_DB_STATEMENT=Qo.ATTR_DB_OPERATION=Qo.ATTR_DB_NAME=Qo.ATTR_DB_MONGODB_COLLECTION=Qo.ATTR_DB_CONNECTION_STRING=void 0;Qo.ATTR_DB_CONNECTION_STRING="db.connection_string";Qo.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";Qo.ATTR_DB_NAME="db.name";Qo.ATTR_DB_OPERATION="db.operation";Qo.ATTR_DB_STATEMENT="db.statement";Qo.ATTR_DB_SYSTEM="db.system";Qo.ATTR_NET_PEER_NAME="net.peer.name";Qo.ATTR_NET_PEER_PORT="net.peer.port";Qo.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb";Qo.DB_SYSTEM_VALUE_MONGODB="mongodb";Qo.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var IMe=M(bB=>{"use strict";m();Object.defineProperty(bB,"__esModule",{value:!0});bB.MongodbCommandType=void 0;var uNt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.AGGREGATE="aggregate",e.UNKNOWN="unknown"})(uNt=bB.MongodbCommandType||(bB.MongodbCommandType={}))});var CMe=M(RR=>{"use strict";m();Object.defineProperty(RR,"__esModule",{value:!0});RR.PACKAGE_NAME=RR.PACKAGE_VERSION=void 0;RR.PACKAGE_VERSION="0.67.0";RR.PACKAGE_NAME="@opentelemetry/instrumentation-mongodb"});var xMe=M(E6=>{"use strict";m();Object.defineProperty(E6,"__esModule",{value:!0});E6.MongoDBInstrumentation=void 0;var ri=($e(),Le(nt)),ar=ln(),Wg=(tr(),Le(Kr)),nd=bMe(),nT=IMe(),vMe=CMe(),RMe={requireParentSpan:!0},bX=class e extends ar.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(vMe.PACKAGE_NAME,vMe.PACKAGE_VERSION,{...RMe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,ar.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,ar.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...RMe,...t})}_updateMetricInstruments(){this._connectionsUsage=this.meter.createUpDownCounter(nd.METRIC_DB_CLIENT_CONNECTIONS_USAGE,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}_connCountAdd(t,n,r){this._connectionsUsage?.add(t,{"pool.name":n,state:r})}init(){let{v3PatchConnection:t,v3UnpatchConnection:n}=this._getV3ConnectionPatches(),{v4PatchConnect:r,v4UnpatchConnect:o}=this._getV4ConnectPatches(),{v4PatchConnectionCallback:i,v4PatchConnectionPromise:s,v4UnpatchConnection:u}=this._getV4ConnectionPatches(),{v4PatchConnectionPool:l,v4UnpatchConnectionPool:f}=this._getV4ConnectionPoolPatches(),{v4PatchSessions:h,v4UnpatchSessions:_}=this._getV4SessionsPatches();return[new ar.InstrumentationNodeModuleDefinition("mongodb",[">=3.3.0 <4"],void 0,void 0,[new ar.InstrumentationNodeModuleFile("mongodb/lib/core/wireprotocol/index.js",[">=3.3.0 <4"],t,n)]),new ar.InstrumentationNodeModuleDefinition("mongodb",[">=4.0.0 <8"],void 0,void 0,[new ar.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=4.0.0 <6.4"],i,u),new ar.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=6.4.0 <8"],s,u),new ar.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection_pool.js",[">=4.0.0 <6.4"],l,f),new ar.InstrumentationNodeModuleFile("mongodb/lib/cmap/connect.js",[">=4.0.0 <8"],r,o),new ar.InstrumentationNodeModuleFile("mongodb/lib/sessions.js",[">=4.0.0 <8"],h,_)])]}_getV3ConnectionPatches(){return{v3PatchConnection:t=>((0,ar.isWrapped)(t.insert)&&this._unwrap(t,"insert"),this._wrap(t,"insert",this._getV3PatchOperation("insert")),(0,ar.isWrapped)(t.remove)&&this._unwrap(t,"remove"),this._wrap(t,"remove",this._getV3PatchOperation("remove")),(0,ar.isWrapped)(t.update)&&this._unwrap(t,"update"),this._wrap(t,"update",this._getV3PatchOperation("update")),(0,ar.isWrapped)(t.command)&&this._unwrap(t,"command"),this._wrap(t,"command",this._getV3PatchCommand()),(0,ar.isWrapped)(t.query)&&this._unwrap(t,"query"),this._wrap(t,"query",this._getV3PatchFind()),(0,ar.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,ar.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),this._wrap(t.ServerSessionPool.prototype,"acquire",this._getV4AcquireCommand()),(0,ar.isWrapped)(t.release)&&this._unwrap(t,"release"),this._wrap(t.ServerSessionPool.prototype,"release",this._getV4ReleaseCommand()),t),v4UnpatchSessions:t=>{t!==void 0&&((0,ar.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),(0,ar.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,ar.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,ar.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=ri.context.bind(ri.context.active(),r);return t.call(this,o)}}_getV4ConnectCommand(){let t=this;return n=>function(o,i){if(n.length===1){let u=n.call(this,o);return u&&typeof u.then=="function"&&u.then(()=>t.setPoolName(o),()=>{}),u}let s=function(u,l){if(u||!l){i(u,l);return}t.setPoolName(o),i(u,l)};return n.call(this,o,s)}}_getV4ConnectionPatches(){return{v4PatchConnectionCallback:t=>((0,ar.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandCallback()),t),v4PatchConnectionPromise:t=>((0,ar.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandPromise()),t),v4UnpatchConnection:t=>{t!==void 0&&this._unwrap(t.Connection.prototype,"command")}}}_getV3PatchOperation(t){let n=this;return r=>function(i,s,u,l,f){let h=ri.trace.getSpan(ri.context.active()),_=n._checkSkipInstrumentation(h),E=typeof l=="function"?l:f;if(_||typeof E!="function"||typeof u!="object")return typeof l=="function"?r.call(this,i,s,u,l):r.call(this,i,s,u,l,f);let T=n._getV3SpanAttributes(s,i,u[0],t),v=n._spanNameFromAttrs(T),R=n.tracer.startSpan(v,{kind:ri.SpanKind.CLIENT,attributes:T}),x=n._patchEnd(R,E);return typeof l=="function"?r.call(this,i,s,u,x):r.call(this,i,s,u,l,x)}}_getV3PatchCommand(){let t=this;return n=>function(o,i,s,u,l){let f=ri.trace.getSpan(ri.context.active()),h=t._checkSkipInstrumentation(f),_=typeof u=="function"?u:l;if(h||typeof _!="function"||typeof s!="object")return typeof u=="function"?n.call(this,o,i,s,u):n.call(this,o,i,s,u,l);let E=e._getCommandType(s),T=E===nT.MongodbCommandType.UNKNOWN?void 0:E,v=t._getV3SpanAttributes(i,o,s,T),R=t._spanNameFromAttrs(v),x=t.tracer.startSpan(R,{kind:ri.SpanKind.CLIENT,attributes:v}),B=t._patchEnd(x,_);return typeof u=="function"?n.call(this,o,i,s,B):n.call(this,o,i,s,u,B)}}_getV4PatchCommandCallback(){let t=this;return n=>function(o,i,s,u){let l=ri.trace.getSpan(ri.context.active()),f=t._checkSkipInstrumentation(l),h=u,_=Object.keys(i)[0];if(typeof i!="object"||i.ismaster||i.hello)return n.call(this,o,i,s,u);let E;if(!f){let v=t._getV4SpanAttributes(this,o,i,_),R=t._spanNameFromAttrs(v);E=t.tracer.startSpan(R,{kind:ri.SpanKind.CLIENT,attributes:v})}let T=t._patchEnd(E,h,this.id,_);return n.call(this,o,i,s,T)}}_getV4PatchCommandPromise(){let t=this;return n=>function(...o){let[i,s]=o,u=ri.trace.getSpan(ri.context.active()),l=t._checkSkipInstrumentation(u),f=Object.keys(s)[0],h=()=>{};if(typeof s!="object"||s.ismaster||s.hello)return n.apply(this,o);let _;if(!l){let v=t._getV4SpanAttributes(this,i,s,f),R=t._spanNameFromAttrs(v);_=t.tracer.startSpan(R,{kind:ri.SpanKind.CLIENT,attributes:v})}let E=t._patchEnd(_,h,this.id,f),T=n.apply(this,o);return T.then(v=>E(null,v),v=>E(v)),T}}_getV3PatchFind(){let t=this;return n=>function(o,i,s,u,l,f){let h=ri.trace.getSpan(ri.context.active()),_=t._checkSkipInstrumentation(h),E=typeof l=="function"?l:f;if(_||typeof E!="function"||typeof s!="object")return typeof l=="function"?n.call(this,o,i,s,u,l):n.call(this,o,i,s,u,l,f);let T=t._getV3SpanAttributes(i,o,s,"find"),v=t._spanNameFromAttrs(T),R=t.tracer.startSpan(v,{kind:ri.SpanKind.CLIENT,attributes:T}),x=t._patchEnd(R,E);return typeof l=="function"?n.call(this,o,i,s,u,x):n.call(this,o,i,s,u,l,x)}}_getV3PatchCursor(){let t=this;return n=>function(o,i,s,u,l,f){let h=ri.trace.getSpan(ri.context.active()),_=t._checkSkipInstrumentation(h),E=typeof l=="function"?l:f;if(_||typeof E!="function")return typeof l=="function"?n.call(this,o,i,s,u,l):n.call(this,o,i,s,u,l,f);let T=t._getV3SpanAttributes(i,o,s.cmd,"getMore"),v=t._spanNameFromAttrs(T),R=t.tracer.startSpan(v,{kind:ri.SpanKind.CLIENT,attributes:T}),x=t._patchEnd(R,E);return typeof l=="function"?n.call(this,o,i,s,u,x):n.call(this,o,i,s,u,l,x)}}static _getCommandType(t){return t.createIndexes!==void 0?nT.MongodbCommandType.CREATE_INDEXES:t.findandmodify!==void 0?nT.MongodbCommandType.FIND_AND_MODIFY:t.ismaster!==void 0?nT.MongodbCommandType.IS_MASTER:t.count!==void 0?nT.MongodbCommandType.COUNT:t.aggregate!==void 0?nT.MongodbCommandType.AGGREGATE:nT.MongodbCommandType.UNKNOWN}_getV4SpanAttributes(t,n,r,o){let i,s;if(t){let l=typeof t.address=="string"?t.address.split(":"):"";l.length===2&&(i=l[0],s=l[1])}let u;return r?.documents&&r.documents[0]?u=r.documents[0]:r?.cursors?u=r.cursors:u=r,this._getSpanAttributes(n.db,n.collection,i,s,u,o)}_getV3SpanAttributes(t,n,r,o){let i,s;if(n&&n.s&&(i=n.s.options?.host??n.s.host,s=(n.s.options?.port??n.s.port)?.toString(),i==null||s==null)){let h=n.description?.address;if(h){let _=h.split(":");i=_[0],s=_[1]}}let[u,l]=t.toString().split("."),f=r?.query??r?.q??r;return this._getSpanAttributes(u,l,i,s,f,o)}_getSpanAttributes(t,n,r,o,i,s){let u={};if(this._dbSemconvStability&ar.SemconvStability.OLD&&(u[nd.ATTR_DB_SYSTEM]=nd.DB_SYSTEM_VALUE_MONGODB,u[nd.ATTR_DB_NAME]=t,u[nd.ATTR_DB_MONGODB_COLLECTION]=n,u[nd.ATTR_DB_OPERATION]=s,u[nd.ATTR_DB_CONNECTION_STRING]=`mongodb://${r}:${o}/${t}`),this._dbSemconvStability&ar.SemconvStability.STABLE&&(u[Wg.ATTR_DB_SYSTEM_NAME]=nd.DB_SYSTEM_NAME_VALUE_MONGODB,u[Wg.ATTR_DB_NAMESPACE]=t,u[Wg.ATTR_DB_OPERATION_NAME]=s,u[Wg.ATTR_DB_COLLECTION_NAME]=n),r&&o){this._netSemconvStability&ar.SemconvStability.OLD&&(u[nd.ATTR_NET_PEER_NAME]=r),this._netSemconvStability&ar.SemconvStability.STABLE&&(u[Wg.ATTR_SERVER_ADDRESS]=r);let l=parseInt(o,10);isNaN(l)||(this._netSemconvStability&ar.SemconvStability.OLD&&(u[nd.ATTR_NET_PEER_PORT]=l),this._netSemconvStability&ar.SemconvStability.STABLE&&(u[Wg.ATTR_SERVER_PORT]=l))}if(i){let{dbStatementSerializer:l}=this.getConfig(),f=typeof l=="function"?l:this._defaultDbStatementSerializer.bind(this);(0,ar.safeExecuteInTheMiddle)(()=>{let h=f(i);this._dbSemconvStability&ar.SemconvStability.OLD&&(u[nd.ATTR_DB_STATEMENT]=h),this._dbSemconvStability&ar.SemconvStability.STABLE&&(u[Wg.ATTR_DB_QUERY_TEXT]=h)},h=>{h&&this._diag.error("Error running dbStatementSerializer hook",h)},!0)}return u}_spanNameFromAttrs(t){let n;return this._dbSemconvStability&ar.SemconvStability.STABLE?n=[t[Wg.ATTR_DB_OPERATION_NAME],t[Wg.ATTR_DB_COLLECTION_NAME]].filter(r=>r).join(" ")||nd.DB_SYSTEM_NAME_VALUE_MONGODB:n=`mongodb.${t[nd.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,ar.safeExecuteInTheMiddle)(()=>{r(t,{data:n})},o=>{o&&this._diag.error("Error running response hook",o)},!0)}_patchEnd(t,n,r,o){let i=ri.context.active(),s=this,u=!1;return function(...f){if(!u){u=!0;let h=f[0];if(t){if(h instanceof Error)t.setStatus({code:ri.SpanStatusCode.ERROR,message:h.message});else{let _=f[1];s._handleExecutionResult(t,_)}t.end()}o==="endSessions"&&s._connCountAdd(-1,s._poolName,"idle")}return ri.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}};E6.MongoDBInstrumentation=bX});var DMe=M(IB=>{"use strict";m();Object.defineProperty(IB,"__esModule",{value:!0});IB.MongodbCommandType=void 0;var cNt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.UNKNOWN="unknown"})(cNt=IB.MongodbCommandType||(IB.MongodbCommandType={}))});var NMe=M(xR=>{"use strict";m();Object.defineProperty(xR,"__esModule",{value:!0});xR.MongodbCommandType=xR.MongoDBInstrumentation=void 0;var lNt=xMe();Object.defineProperty(xR,"MongoDBInstrumentation",{enumerable:!0,get:function(){return lNt.MongoDBInstrumentation}});var dNt=DMe();Object.defineProperty(xR,"MongodbCommandType",{enumerable:!0,get:function(){return dNt.MongodbCommandType}})});function pNt(e){let t=IX(e);return JSON.stringify(t)}function IX(e){if(Array.isArray(e))return e.map(t=>IX(t));if(fNt(e)){let t={};return Object.entries(e).map(([n,r])=>[n,IX(r)]).reduce((n,r)=>(ANt(r)&&(n[r[0]]=r[1]),n),t)}return"?"}function fNt(e){return typeof e=="object"&&e!==null&&!mNt(e)}function mNt(e){let t=!1;return typeof Buffer<"u"&&(t=Buffer.isBuffer(e)),t}function ANt(e){return Array.isArray(e)}var wMe,kMe,BMe,gNt,OMe,PMe=k(()=>{m();wMe=ue(NMe(),1);yr();kMe="Mongo",BMe=ct(kMe,()=>new wMe.MongoDBInstrumentation({dbStatementSerializer:pNt,responseHook(e){Jr(e,"auto.db.otel.mongo")}}));gNt=(()=>({name:kMe,setupOnce(){BMe()}})),OMe=gNt});var CX=M(ls=>{"use strict";m();Object.defineProperty(ls,"__esModule",{value:!0});ls.DB_SYSTEM_NAME_VALUE_MONGODB=ls.ATTR_NET_PEER_PORT=ls.ATTR_NET_PEER_NAME=ls.ATTR_DB_USER=ls.ATTR_DB_SYSTEM=ls.ATTR_DB_STATEMENT=ls.ATTR_DB_OPERATION=ls.ATTR_DB_NAME=ls.ATTR_DB_MONGODB_COLLECTION=void 0;ls.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";ls.ATTR_DB_NAME="db.name";ls.ATTR_DB_OPERATION="db.operation";ls.ATTR_DB_STATEMENT="db.statement";ls.ATTR_DB_SYSTEM="db.system";ls.ATTR_DB_USER="db.user";ls.ATTR_NET_PEER_NAME="net.peer.name";ls.ATTR_NET_PEER_PORT="net.peer.port";ls.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb"});var UMe=M(TE=>{"use strict";m();Object.defineProperty(TE,"__esModule",{value:!0});TE.handleCallbackResponse=TE.handlePromiseResponse=TE.getAttributesFromCollection=void 0;var MMe=($e(),Le(nt)),vB=ln(),CB=CX(),y6=(tr(),Le(Kr));function hNt(e,t,n){let r={};return t&vB.SemconvStability.OLD&&(r[CB.ATTR_DB_MONGODB_COLLECTION]=e.name,r[CB.ATTR_DB_NAME]=e.conn.name,r[CB.ATTR_DB_USER]=e.conn.user),t&vB.SemconvStability.STABLE&&(r[y6.ATTR_DB_COLLECTION_NAME]=e.name,r[y6.ATTR_DB_NAMESPACE]=e.conn.name),n&vB.SemconvStability.OLD&&(r[CB.ATTR_NET_PEER_NAME]=e.conn.host,r[CB.ATTR_NET_PEER_PORT]=e.conn.port),n&vB.SemconvStability.STABLE&&(r[y6.ATTR_SERVER_ADDRESS]=e.conn.host,r[y6.ATTR_SERVER_PORT]=e.conn.port),r}TE.getAttributesFromCollection=hNt;function LMe(e,t={}){e.recordException(t),e.setStatus({code:MMe.SpanStatusCode.ERROR,message:`${t.message} ${t.code?`
|
|
38
|
-
Mongoose Error Code: ${t.code}`:""}`})}function vX(e,t,n,r=void 0){n&&(0,vB.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&MMe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function _Nt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(vX(t,o,n,r),o)).catch(o=>{throw LMe(t,o),o}).finally(()=>t.end()):(vX(t,e,n,r),t.end(),e)}TE.handlePromiseResponse=_Nt;function ENt(e,t,n,r,o,i,s=void 0){let u=0;return o.length===2?u=1:o.length===3&&(u=2),o[u]=(l,f)=>(l?LMe(r,l):vX(r,f,i,s),r.end(),e(l,f)),t.apply(n,o)}TE.handleCallbackResponse=ENt});var QMe=M(DR=>{"use strict";m();Object.defineProperty(DR,"__esModule",{value:!0});DR.PACKAGE_NAME=DR.PACKAGE_VERSION=void 0;DR.PACKAGE_VERSION="0.60.0";DR.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var HMe=M(Zc=>{"use strict";m();Object.defineProperty(Zc,"__esModule",{value:!0});Zc.MongooseInstrumentation=Zc._ALREADY_INSTRUMENTED=Zc._STORED_PARENT_SPAN=void 0;var Os=($e(),Le(nt)),yNt=Rr(),RX=UMe(),Qa=ln(),FMe=QMe(),bE=CX(),rT=(tr(),Le(Kr)),S6=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],SNt=["remove","count","findOneAndRemove",...S6],TNt=["count","findOneAndRemove",...S6],bNt=[...S6];function GMe(e){return e?e.startsWith("6.")||e.startsWith("5.")?SNt:e.startsWith("7.")?TNt:bNt:S6}function jMe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function zMe(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Zc._STORED_PARENT_SPAN=Symbol("stored-parent-span");Zc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var xX=class extends Qa.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(FMe.PACKAGE_NAME,FMe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Qa.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Qa.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Qa.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,jMe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),zMe(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)),GMe(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=GMe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,jMe(n)&&this._unwrap(r.Model.prototype,"remove"),zMe(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&&Os.trace.getSpan(Os.context.active())===void 0)return r.apply(this,arguments);let s=this[Zc._STORED_PARENT_SPAN],u={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&Qa.SemconvStability.OLD&&(u[bE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Qa.SemconvStability.STABLE&&(u[rT.ATTR_DB_QUERY_TEXT]=h)}let f=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",u,s);return n._handleResponse(f,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[Zc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&Os.trace.getSpan(Os.context.active())===void 0)return r.apply(this,arguments);let s=this[Zc._STORED_PARENT_SPAN],u={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l(this.op,{condition:this.getFilter?.()??this._conditions,updates:this._update,options:this.getOptions?.()??this.options,fields:this._fields});n._dbSemconvStability&Qa.SemconvStability.OLD&&(u[bE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Qa.SemconvStability.STABLE&&(u[rT.ATTR_DB_QUERY_TEXT]=h)}let f=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,u,s);return n._handleResponse(f,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(s,u){if(r.getConfig().requireParentSpan&&Os.trace.getSpan(Os.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 E=h(t,l);r._dbSemconvStability&Qa.SemconvStability.OLD&&(f[bE.ATTR_DB_STATEMENT]=E),r._dbSemconvStability&Qa.SemconvStability.STABLE&&(f[rT.ATTR_DB_QUERY_TEXT]=E)}let _=r._startSpan(this.constructor.collection,this.constructor.modelName,t,f);return s instanceof Function&&(u=s,s=void 0),r._handleResponse(_,o,this,arguments,u,n)}}_patchDocumentUpdateMethods(t,n){let r=this;return o=>function(s,u,l){if(r.getConfig().requireParentSpan&&Os.trace.getSpan(Os.context.active())===void 0)return o.apply(this,arguments);let f=l,h=s,_=u;typeof s=="function"?(f=s,h=void 0,_=void 0):typeof u=="function"&&(f=u,_=void 0);let E={},T=r.getConfig().dbStatementSerializer;if(T){let x=T(t,{condition:{_id:this._id},updates:h,options:_});r._dbSemconvStability&Qa.SemconvStability.OLD&&(E[bE.ATTR_DB_STATEMENT]=x),r._dbSemconvStability&Qa.SemconvStability.STABLE&&(E[rT.ATTR_DB_QUERY_TEXT]=x)}let v=r._startSpan(this.constructor.collection,this.constructor.modelName,t,E),R=r._handleResponse(v,o,this,arguments,f,n);return R&&typeof R=="object"&&(R[Zc._ALREADY_INSTRUMENTED]=!0),R}}patchModelStatic(t,n){let r=this;return o=>function(s,u,l){if(r.getConfig().requireParentSpan&&Os.trace.getSpan(Os.context.active())===void 0)return o.apply(this,arguments);typeof u=="function"&&(l=u,u=void 0);let f={};switch(t){case"insertMany":f.documents=s;break;case"bulkWrite":f.operations=s;break;default:f.document=s;break}u!==void 0&&(f.options=u);let h={},{dbStatementSerializer:_}=r.getConfig();if(_){let T=_(t,f);r._dbSemconvStability&Qa.SemconvStability.OLD&&(h[bE.ATTR_DB_STATEMENT]=T),r._dbSemconvStability&Qa.SemconvStability.STABLE&&(h[rT.ATTR_DB_QUERY_TEXT]=T)}let E=r._startSpan(this.collection,this.modelName,t,h);return r._handleResponse(E,o,this,arguments,l,n)}}patchModelAggregate(){let t=this;return n=>function(){let o=Os.trace.getSpan(Os.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Zc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Zc._STORED_PARENT_SPAN]=Os.trace.getSpan(Os.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let s={...o,...(0,RX.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&Qa.SemconvStability.OLD&&(s[bE.ATTR_DB_OPERATION]=r,s[bE.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&Qa.SemconvStability.STABLE&&(s[rT.ATTR_DB_OPERATION_NAME]=r,s[rT.ATTR_DB_SYSTEM_NAME]=bE.DB_SYSTEM_NAME_VALUE_MONGODB);let u=this._dbSemconvStability&Qa.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(u,{kind:Os.SpanKind.CLIENT,attributes:s},i?Os.trace.setSpan(Os.context.active(),i):void 0)}_handleResponse(t,n,r,o,i,s=void 0){let u=this;if(i instanceof Function)return u._callOriginalFunction(()=>(0,RX.handleCallbackResponse)(i,n,r,t,o,u.getConfig().responseHook,s));{let l=u._callOriginalFunction(()=>n.apply(r,o));return(0,RX.handlePromiseResponse)(l,t,u.getConfig().responseHook,s)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?Os.context.with((0,yNt.suppressTracing)(Os.context.active()),t):t()}};Zc.MongooseInstrumentation=xX});var $Me=M(T6=>{"use strict";m();Object.defineProperty(T6,"__esModule",{value:!0});T6.MongooseInstrumentation=void 0;var INt=HMe();Object.defineProperty(T6,"MongooseInstrumentation",{enumerable:!0,get:function(){return INt.MongooseInstrumentation}})});var qMe,VMe,KMe,CNt,YMe,JMe=k(()=>{m();qMe=ue($Me(),1);yr();VMe="Mongoose",KMe=ct(VMe,()=>new qMe.MongooseInstrumentation({responseHook(e){Jr(e,"auto.db.otel.mongoose")}})),CNt=(()=>({name:VMe,setupOnce(){KMe()}})),YMe=CNt});var ZMe=M(ds=>{"use strict";m();Object.defineProperty(ds,"__esModule",{value:!0});ds.METRIC_DB_CLIENT_CONNECTIONS_USAGE=ds.DB_SYSTEM_VALUE_MYSQL=ds.ATTR_NET_PEER_PORT=ds.ATTR_NET_PEER_NAME=ds.ATTR_DB_USER=ds.ATTR_DB_SYSTEM=ds.ATTR_DB_STATEMENT=ds.ATTR_DB_NAME=ds.ATTR_DB_CONNECTION_STRING=void 0;ds.ATTR_DB_CONNECTION_STRING="db.connection_string";ds.ATTR_DB_NAME="db.name";ds.ATTR_DB_STATEMENT="db.statement";ds.ATTR_DB_SYSTEM="db.system";ds.ATTR_DB_USER="db.user";ds.ATTR_NET_PEER_NAME="net.peer.name";ds.ATTR_NET_PEER_PORT="net.peer.port";ds.DB_SYSTEM_VALUE_MYSQL="mysql";ds.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var WMe=M(RB=>{"use strict";m();Object.defineProperty(RB,"__esModule",{value:!0});RB.AttributeNames=void 0;var vNt;(function(e){e.MYSQL_VALUES="db.mysql.values"})(vNt=RB.AttributeNames||(RB.AttributeNames={}))});var XMe=M(mu=>{"use strict";m();Object.defineProperty(mu,"__esModule",{value:!0});mu.getPoolNameOld=mu.arrayStringifyHelper=mu.getSpanName=mu.getDbValues=mu.getDbQueryText=mu.getJDBCString=mu.getConfig=void 0;function RNt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}mu.getConfig=RNt;function xNt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}mu.getJDBCString=xNt;function DNt(e){return typeof e=="string"?e:e.sql}mu.getDbQueryText=DNt;function NNt(e,t){return DX(typeof e=="string"?t:t||e.values)}mu.getDbValues=NNt;function wNt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}mu.getSpanName=wNt;function DX(e){return e?`[${e.toString()}]`:""}mu.arrayStringifyHelper=DX;function kNt(e){let t=e.config.connectionConfig,n="";return n+=t.host?`host: '${t.host}', `:"",n+=t.port?`port: ${t.port}, `:"",n+=t.database?`database: '${t.database}', `:"",n+=t.user?`user: '${t.user}'`:"",t.user||(n=n.substring(0,n.length-2)),n.trim()}mu.getPoolNameOld=kNt});var e2e=M(NR=>{"use strict";m();Object.defineProperty(NR,"__esModule",{value:!0});NR.PACKAGE_NAME=NR.PACKAGE_VERSION=void 0;NR.PACKAGE_VERSION="0.60.0";NR.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var n2e=M(b6=>{"use strict";m();Object.defineProperty(b6,"__esModule",{value:!0});b6.MySQLInstrumentation=void 0;var Wc=($e(),Le(nt)),dp=ln(),wR=(tr(),Le(Kr)),Xg=ZMe(),BNt=WMe(),oT=XMe(),t2e=e2e(),NX=class extends dp.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(t2e.PACKAGE_NAME,t2e.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,dp.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,dp.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(Xg.METRIC_DB_CLIENT_CONNECTIONS_USAGE,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}_connCountAdd(t,n,r){this._connectionsUsageOld?.add(t,{state:r,name:n})}init(){return[new dp.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,dp.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,dp.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,dp.isWrapped)(t.createPoolCluster)&&this._unwrap(t,"createPoolCluster"),this._wrap(t,"createPoolCluster",this._patchCreatePoolCluster()),t),t=>{t!==void 0&&(this._unwrap(t,"createConnection"),this._unwrap(t,"createPool"),this._unwrap(t,"createPoolCluster"))})]}_patchCreateConnection(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),i}}}_patchCreatePool(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"end",n._patchPoolEnd(i)),n._setPoolCallbacks(i,""),i}}}_patchPoolEnd(t){return n=>{let r=this;return function(i){let s=t._allConnections.length,u=t._freeConnections.length,l=s-u,f=(0,oT.getPoolNameOld)(t);r._connCountAdd(-l,f,"used"),r._connCountAdd(-u,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 u=t._nodes;if(u){let l=typeof i=="object"?"CLUSTER::"+t._lastId:String(i),f=u[l].pool;r._setPoolCallbacks(f,i)}}}}_patchGetConnection(t){return n=>{let r=this;return function(i,s,u){if(!r._enabled)return r._unwrap(t,"getConnection"),n.apply(t,arguments);if(arguments.length===1&&typeof i=="function"){let l=r._getConnectionCallbackPatchFn(i);return n.call(t,l)}if(arguments.length===2&&typeof s=="function"){let l=r._getConnectionCallbackPatchFn(s);return n.call(t,i,l)}if(arguments.length===3&&typeof u=="function"){let l=r._getConnectionCallbackPatchFn(u);return n.call(t,i,s,l)}return n.apply(t,arguments)}}}_getConnectionCallbackPatchFn(t){let n=this,r=Wc.context.active();return function(o,i){i&&((0,dp.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&Wc.context.with(r,t,this,o,i)}}_patchQuery(t){return n=>{let r=this;return function(o,i,s){if(!r._enabled)return r._unwrap(t,"query"),n.apply(t,arguments);let u={},{host:l,port:f,database:h,user:_}=(0,oT.getConfig)(t.config),E=parseInt(f,10),T=(0,oT.getDbQueryText)(o);r._dbSemconvStability&dp.SemconvStability.OLD&&(u[Xg.ATTR_DB_SYSTEM]=Xg.DB_SYSTEM_VALUE_MYSQL,u[Xg.ATTR_DB_CONNECTION_STRING]=(0,oT.getJDBCString)(l,f,h),u[Xg.ATTR_DB_NAME]=h,u[Xg.ATTR_DB_USER]=_,u[Xg.ATTR_DB_STATEMENT]=T),r._dbSemconvStability&dp.SemconvStability.STABLE&&(u[wR.ATTR_DB_SYSTEM_NAME]=wR.DB_SYSTEM_NAME_VALUE_MYSQL,u[wR.ATTR_DB_NAMESPACE]=h,u[wR.ATTR_DB_QUERY_TEXT]=T),r._netSemconvStability&dp.SemconvStability.OLD&&(u[Xg.ATTR_NET_PEER_NAME]=l,isNaN(E)||(u[Xg.ATTR_NET_PEER_PORT]=E)),r._netSemconvStability&dp.SemconvStability.STABLE&&(u[wR.ATTR_SERVER_ADDRESS]=l,isNaN(E)||(u[wR.ATTR_SERVER_PORT]=E));let v=r.tracer.startSpan((0,oT.getSpanName)(o),{kind:Wc.SpanKind.CLIENT,attributes:u});if(r.getConfig().enhancedDatabaseReporting){let B;Array.isArray(i)?B=i:arguments[2]&&(B=[i]),v.setAttribute(BNt.AttributeNames.MYSQL_VALUES,(0,oT.getDbValues)(o,B))}let R=Array.from(arguments).findIndex(B=>typeof B=="function"),x=Wc.context.active();if(R===-1){let B=Wc.context.with(Wc.trace.setSpan(Wc.context.active(),v),()=>n.apply(t,arguments));return Wc.context.bind(x,B),B.on("error",P=>v.setStatus({code:Wc.SpanStatusCode.ERROR,message:P.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,R,r._patchCallbackQuery(v,x)),Wc.context.with(Wc.trace.setSpan(Wc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,s){return o&&t.setStatus({code:Wc.SpanStatusCode.ERROR,message:o.message}),t.end(),Wc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,oT.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")})}};b6.MySQLInstrumentation=NX});var r2e=M(I6=>{"use strict";m();Object.defineProperty(I6,"__esModule",{value:!0});I6.MySQLInstrumentation=void 0;var ONt=n2e();Object.defineProperty(I6,"MySQLInstrumentation",{enumerable:!0,get:function(){return ONt.MySQLInstrumentation}})});var o2e,i2e,s2e,PNt,a2e,u2e=k(()=>{m();o2e=ue(r2e(),1);yr();i2e="Mysql",s2e=ct(i2e,()=>new o2e.MySQLInstrumentation({})),PNt=(()=>({name:i2e,setupOnce(){s2e()}})),a2e=PNt});var wX=M(la=>{"use strict";m();Object.defineProperty(la,"__esModule",{value:!0});la.DB_SYSTEM_VALUE_MYSQL=la.ATTR_NET_PEER_PORT=la.ATTR_NET_PEER_NAME=la.ATTR_DB_USER=la.ATTR_DB_SYSTEM=la.ATTR_DB_STATEMENT=la.ATTR_DB_NAME=la.ATTR_DB_CONNECTION_STRING=void 0;la.ATTR_DB_CONNECTION_STRING="db.connection_string";la.ATTR_DB_NAME="db.name";la.ATTR_DB_STATEMENT="db.statement";la.ATTR_DB_SYSTEM="db.system";la.ATTR_DB_USER="db.user";la.ATTR_NET_PEER_NAME="net.peer.name";la.ATTR_NET_PEER_PORT="net.peer.port";la.DB_SYSTEM_VALUE_MYSQL="mysql"});var BX=M(C6=>{"use strict";m();Object.defineProperty(C6,"__esModule",{value:!0});C6.addSqlCommenterComment=void 0;var kX=($e(),Le(nt)),MNt=Rr();function LNt(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function UNt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function QNt(e,t){if(typeof t!="string"||t.length===0||LNt(t))return t;let n=new MNt.W3CTraceContextPropagator,r={};n.inject(kX.trace.setSpan(kX.ROOT_CONTEXT,e),r,kX.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(s=>{let u=UNt(r[s]);return`${s}='${u}'`}).join(",");return`${t} /*${i}*/`}C6.addSqlCommenterComment=QNt});var c2e=M(pp=>{"use strict";m();Object.defineProperty(pp,"__esModule",{value:!0});pp.getConnectionPrototypeToInstrument=pp.once=pp.getSpanName=pp.getQueryText=pp.getConnectionAttributes=void 0;var xB=wX(),v6=ln(),OX=(tr(),Le(Kr));function FNt(e,t,n){let{host:r,port:o,database:i,user:s}=GNt(e),u={};t&v6.SemconvStability.OLD&&(u[xB.ATTR_DB_CONNECTION_STRING]=jNt(r,o,i),u[xB.ATTR_DB_NAME]=i,u[xB.ATTR_DB_USER]=s),t&v6.SemconvStability.STABLE&&(u[OX.ATTR_DB_NAMESPACE]=i);let l=parseInt(o,10);return n&v6.SemconvStability.OLD&&(u[xB.ATTR_NET_PEER_NAME]=r,isNaN(l)||(u[xB.ATTR_NET_PEER_PORT]=l)),n&v6.SemconvStability.STABLE&&(u[OX.ATTR_SERVER_ADDRESS]=r,isNaN(l)||(u[OX.ATTR_SERVER_PORT]=l)),u}pp.getConnectionAttributes=FNt;function GNt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function jNt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function zNt(e,t,n,r=!1,o=HNt){let[i,s]=typeof e=="string"?[e,n]:[e.sql,$Nt(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"}}pp.getQueryText=zNt;function HNt(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function $Nt(e){return"values"in e}function qNt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}pp.getSpanName=qNt;var VNt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};pp.once=VNt;function KNt(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}pp.getConnectionPrototypeToInstrument=KNt});var l2e=M(kR=>{"use strict";m();Object.defineProperty(kR,"__esModule",{value:!0});kR.PACKAGE_NAME=kR.PACKAGE_VERSION=void 0;kR.PACKAGE_VERSION="0.60.0";kR.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var m2e=M(R6=>{"use strict";m();Object.defineProperty(R6,"__esModule",{value:!0});R6.MySQL2Instrumentation=void 0;var d2e=($e(),Le(nt)),Df=ln(),PX=wX(),p2e=BX(),BR=c2e(),f2e=l2e(),MX=(tr(),Le(Kr)),LX=[">=1.4.2 <4"],UX=class extends Df.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(f2e.PACKAGE_NAME,f2e.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Df.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Df.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){let t;function n(i){!t&&i.format&&(t=i.format)}let r=i=>{(0,Df.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,Df.isWrapped)(i.execute)&&this._unwrap(i,"execute"),this._wrap(i,"execute",this._patchQuery(t,!0))},o=i=>{this._unwrap(i,"query"),this._unwrap(i,"execute")};return[new Df.InstrumentationNodeModuleDefinition("mysql2",LX,i=>(n(i),i),()=>{},[new Df.InstrumentationNodeModuleFile("mysql2/promise.js",LX,i=>(n(i),i),()=>{}),new Df.InstrumentationNodeModuleFile("mysql2/lib/connection.js",LX,i=>{let s=(0,BR.getConnectionPrototypeToInstrument)(i);return r(s),i},i=>{if(i===void 0)return;let s=(0,BR.getConnectionPrototypeToInstrument)(i);o(s)})])]}_patchQuery(t,n){return r=>{let o=this;return function(i,s,u){let l;Array.isArray(s)?l=s:arguments[2]&&(l=[s]);let{maskStatement:f,maskStatementHook:h,responseHook:_}=o.getConfig(),E=(0,BR.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),T=(0,BR.getQueryText)(i,t,l,f,h);o._dbSemconvStability&Df.SemconvStability.OLD&&(E[PX.ATTR_DB_SYSTEM]=PX.DB_SYSTEM_VALUE_MYSQL,E[PX.ATTR_DB_STATEMENT]=T),o._dbSemconvStability&Df.SemconvStability.STABLE&&(E[MX.ATTR_DB_SYSTEM_NAME]=MX.DB_SYSTEM_NAME_VALUE_MYSQL,E[MX.ATTR_DB_QUERY_TEXT]=T);let v=o.tracer.startSpan((0,BR.getSpanName)(i),{kind:d2e.SpanKind.CLIENT,attributes:E});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,p2e.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,p2e.addSqlCommenterComment)(v,i.sql)}));let R=(0,BR.once)((x,B)=>{x?v.setStatus({code:d2e.SpanStatusCode.ERROR,message:x.message}):typeof _=="function"&&(0,Df.safeExecuteInTheMiddle)(()=>{_(v,{queryResults:B})},P=>{P&&o._diag.warn("Failed executing responseHook",P)},!0),v.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(R));let x=r.apply(this,arguments);return x.once("error",B=>{R(B)}).once("result",B=>{R(void 0,B)}),x}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(R)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(R)),r.apply(this,arguments)}}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r,o),n(...arguments)}}};R6.MySQL2Instrumentation=UX});var A2e=M(x6=>{"use strict";m();Object.defineProperty(x6,"__esModule",{value:!0});x6.MySQL2Instrumentation=void 0;var YNt=m2e();Object.defineProperty(x6,"MySQL2Instrumentation",{enumerable:!0,get:function(){return YNt.MySQL2Instrumentation}})});var g2e,h2e,_2e,JNt,E2e,y2e=k(()=>{m();g2e=ue(A2e(),1);yr();h2e="Mysql2",_2e=ct(h2e,()=>new g2e.MySQL2Instrumentation({responseHook(e){Jr(e,"auto.db.otel.mysql2")}})),JNt=(()=>({name:h2e,setupOnce(){_2e()}})),E2e=JNt});var S2e=M(Au=>{"use strict";m();Object.defineProperty(Au,"__esModule",{value:!0});Au.DB_SYSTEM_VALUE_REDIS=Au.DB_SYSTEM_NAME_VALUE_REDIS=Au.ATTR_NET_PEER_PORT=Au.ATTR_NET_PEER_NAME=Au.ATTR_DB_SYSTEM=Au.ATTR_DB_STATEMENT=Au.ATTR_DB_CONNECTION_STRING=void 0;Au.ATTR_DB_CONNECTION_STRING="db.connection_string";Au.ATTR_DB_STATEMENT="db.statement";Au.ATTR_DB_SYSTEM="db.system";Au.ATTR_NET_PEER_NAME="net.peer.name";Au.ATTR_NET_PEER_PORT="net.peer.port";Au.DB_SYSTEM_NAME_VALUE_REDIS="redis";Au.DB_SYSTEM_VALUE_REDIS="redis"});var T2e=M(D6=>{"use strict";m();Object.defineProperty(D6,"__esModule",{value:!0});D6.endSpan=void 0;var ZNt=($e(),Le(nt)),WNt=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:ZNt.SpanStatusCode.ERROR,message:t.message})),e.end()};D6.endSpan=WNt});var w6=M(N6=>{"use strict";m();Object.defineProperty(N6,"__esModule",{value:!0});N6.defaultDbStatementSerializer=void 0;var XNt=[{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}],ewt=(e,t)=>{if(Array.isArray(t)&&t.length){let n=XNt.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};N6.defaultDbStatementSerializer=ewt});var b2e=M(OR=>{"use strict";m();Object.defineProperty(OR,"__esModule",{value:!0});OR.PACKAGE_NAME=OR.PACKAGE_VERSION=void 0;OR.PACKAGE_VERSION="0.62.0";OR.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var R2e=M(k6=>{"use strict";m();Object.defineProperty(k6,"__esModule",{value:!0});k6.IORedisInstrumentation=void 0;var IE=($e(),Le(nt)),Xc=ln(),CE=(tr(),Le(Kr)),el=S2e(),I2e=ln(),DB=T2e(),twt=w6(),C2e=b2e(),v2e={requireParentSpan:!0},QX=class extends Xc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(C2e.PACKAGE_NAME,C2e.PACKAGE_VERSION,{...v2e,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Xc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Xc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...v2e,...t})}init(){return[new Xc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Xc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,Xc.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||twt.defaultDbStatementSerializer,u=IE.trace.getSpan(IE.context.active())===void 0;if(i.requireParentSpan===!0&&u)return t.apply(this,arguments);let l={},{host:f,port:h}=this.options,_=s(o.name,o.args);r._dbSemconvStability&Xc.SemconvStability.OLD&&(l[el.ATTR_DB_SYSTEM]=el.DB_SYSTEM_VALUE_REDIS,l[el.ATTR_DB_STATEMENT]=_,l[el.ATTR_DB_CONNECTION_STRING]=`redis://${f}:${h}`),r._dbSemconvStability&Xc.SemconvStability.STABLE&&(l[CE.ATTR_DB_SYSTEM_NAME]=el.DB_SYSTEM_NAME_VALUE_REDIS,l[CE.ATTR_DB_QUERY_TEXT]=_),r._netSemconvStability&Xc.SemconvStability.OLD&&(l[el.ATTR_NET_PEER_NAME]=f,l[el.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&Xc.SemconvStability.STABLE&&(l[CE.ATTR_SERVER_ADDRESS]=f,l[CE.ATTR_SERVER_PORT]=h);let E=r.tracer.startSpan(o.name,{kind:IE.SpanKind.CLIENT,attributes:l}),{requestHook:T}=i;T&&(0,I2e.safeExecuteInTheMiddle)(()=>T(E,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&IE.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),R=o.resolve;o.resolve=function(B){(0,I2e.safeExecuteInTheMiddle)(()=>i.responseHook?.(E,o.name,o.args,B),P=>{P&&IE.diag.error("ioredis instrumentation: response hook failed",P)},!0),(0,DB.endSpan)(E,null),R(B)};let x=o.reject;return o.reject=function(B){(0,DB.endSpan)(E,B),x(B)},v}catch(v){throw(0,DB.endSpan)(E,v),v}}}_traceConnection(t){let n=this;return function(){let r=IE.trace.getSpan(IE.context.active())===void 0;if(n.getConfig().requireParentSpan===!0&&r)return t.apply(this,arguments);let o={},{host:i,port:s}=this.options;n._dbSemconvStability&Xc.SemconvStability.OLD&&(o[el.ATTR_DB_SYSTEM]=el.DB_SYSTEM_VALUE_REDIS,o[el.ATTR_DB_STATEMENT]="connect",o[el.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${s}`),n._dbSemconvStability&Xc.SemconvStability.STABLE&&(o[CE.ATTR_DB_SYSTEM_NAME]=el.DB_SYSTEM_NAME_VALUE_REDIS,o[CE.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&Xc.SemconvStability.OLD&&(o[el.ATTR_NET_PEER_NAME]=i,o[el.ATTR_NET_PEER_PORT]=s),n._netSemconvStability&Xc.SemconvStability.STABLE&&(o[CE.ATTR_SERVER_ADDRESS]=i,o[CE.ATTR_SERVER_PORT]=s);let u=n.tracer.startSpan("connect",{kind:IE.SpanKind.CLIENT,attributes:o});try{let l=t.apply(this,arguments);return(0,DB.endSpan)(u,null),l}catch(l){throw(0,DB.endSpan)(u,l),l}}}};k6.IORedisInstrumentation=QX});var x2e=M(B6=>{"use strict";m();Object.defineProperty(B6,"__esModule",{value:!0});B6.IORedisInstrumentation=void 0;var nwt=R2e();Object.defineProperty(B6,"IORedisInstrumentation",{enumerable:!0,get:function(){return nwt.IORedisInstrumentation}})});var O6=M(PR=>{"use strict";m();Object.defineProperty(PR,"__esModule",{value:!0});PR.PACKAGE_NAME=PR.PACKAGE_VERSION=void 0;PR.PACKAGE_VERSION="0.62.0";PR.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var D2e=M(vE=>{"use strict";m();Object.defineProperty(vE,"__esModule",{value:!0});vE.getTracedCreateStreamTrace=vE.getTracedCreateClient=vE.endSpan=void 0;var NB=($e(),Le(nt)),rwt=(e,t)=>{t&&e.setStatus({code:NB.SpanStatusCode.ERROR,message:t.message}),e.end()};vE.endSpan=rwt;var owt=e=>function(){let n=e.apply(this,arguments);return NB.context.bind(NB.context.active(),n)};vE.getTracedCreateClient=owt;var iwt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){NB.context.bind(NB.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};vE.getTracedCreateStreamTrace=iwt});var P6=M(gu=>{"use strict";m();Object.defineProperty(gu,"__esModule",{value:!0});gu.DB_SYSTEM_VALUE_REDIS=gu.DB_SYSTEM_NAME_VALUE_REDIS=gu.ATTR_NET_PEER_PORT=gu.ATTR_NET_PEER_NAME=gu.ATTR_DB_SYSTEM=gu.ATTR_DB_STATEMENT=gu.ATTR_DB_CONNECTION_STRING=void 0;gu.ATTR_DB_CONNECTION_STRING="db.connection_string";gu.ATTR_DB_STATEMENT="db.statement";gu.ATTR_DB_SYSTEM="db.system";gu.ATTR_NET_PEER_NAME="net.peer.name";gu.ATTR_NET_PEER_PORT="net.peer.port";gu.DB_SYSTEM_NAME_VALUE_REDIS="redis";gu.DB_SYSTEM_VALUE_REDIS="redis"});var w2e=M(L6=>{"use strict";m();Object.defineProperty(L6,"__esModule",{value:!0});L6.RedisInstrumentationV2_V3=void 0;var rd=ln(),M6=D2e(),N2e=O6(),wB=($e(),Le(nt)),kB=(tr(),Le(Kr)),iT=P6(),swt=w6(),FX=class e extends rd.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(N2e.PACKAGE_NAME,N2e.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,rd.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,rd.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new rd.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,rd.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,rd.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,rd.isWrapped)(t.createClient)&&this._unwrap(t,"createClient"),this._wrap(t,"createClient",this._getPatchCreateClient()),t),t=>{t!==void 0&&(this._unwrap(t.RedisClient.prototype,"internal_send_command"),this._unwrap(t.RedisClient.prototype,"create_stream"),this._unwrap(t,"createClient"))})]}_getPatchInternalSendCommand(){let t=this;return function(r){return function(i){if(arguments.length!==1||typeof i!="object")return r.apply(this,arguments);let s=t.getConfig(),u=wB.trace.getSpan(wB.context.active())===void 0;if(s.requireParentSpan===!0&&u)return r.apply(this,arguments);let l=s?.dbStatementSerializer||swt.defaultDbStatementSerializer,f={};t._semconvStability&rd.SemconvStability.OLD&&Object.assign(f,{[iT.ATTR_DB_SYSTEM]:iT.DB_SYSTEM_VALUE_REDIS,[iT.ATTR_DB_STATEMENT]:l(i.command,i.args)}),t._semconvStability&rd.SemconvStability.STABLE&&Object.assign(f,{[kB.ATTR_DB_SYSTEM_NAME]:iT.DB_SYSTEM_NAME_VALUE_REDIS,[kB.ATTR_DB_OPERATION_NAME]:i.command,[kB.ATTR_DB_QUERY_TEXT]:l(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:wB.SpanKind.CLIENT,attributes:f});if(this.connection_options){let E={};t._semconvStability&rd.SemconvStability.OLD&&Object.assign(E,{[iT.ATTR_NET_PEER_NAME]:this.connection_options.host,[iT.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&rd.SemconvStability.STABLE&&Object.assign(E,{[kB.ATTR_SERVER_ADDRESS]:this.connection_options.host,[kB.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(E)}this.address&&t._semconvStability&rd.SemconvStability.OLD&&h.setAttribute(iT.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let _=arguments[0].callback;if(_){let E=wB.context.active();arguments[0].callback=function(v,R){if(s?.responseHook){let x=s.responseHook;(0,rd.safeExecuteInTheMiddle)(()=>{x(h,i.command,i.args,R)},B=>{B&&t._diag.error("Error executing responseHook",B)},!0)}return(0,M6.endSpan)(h,v),wB.context.with(E,_,this,...arguments)}}try{return r.apply(this,arguments)}catch(E){throw(0,M6.endSpan)(h,E),E}}}}_getPatchCreateClient(){return function(n){return(0,M6.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,M6.getTracedCreateStreamTrace)(n)}}};L6.RedisInstrumentationV2_V3=FX});var B2e=M(U6=>{"use strict";m();Object.defineProperty(U6,"__esModule",{value:!0});U6.getClientAttributes=void 0;var GX=(tr(),Le(Kr)),MR=P6(),k2e=ln();function awt(e,t,n){let r={};return n&k2e.SemconvStability.OLD&&Object.assign(r,{[MR.ATTR_DB_SYSTEM]:MR.DB_SYSTEM_VALUE_REDIS,[MR.ATTR_NET_PEER_NAME]:t?.socket?.host,[MR.ATTR_NET_PEER_PORT]:t?.socket?.port,[MR.ATTR_DB_CONNECTION_STRING]:uwt(e,t?.url)}),n&k2e.SemconvStability.STABLE&&Object.assign(r,{[GX.ATTR_DB_SYSTEM_NAME]:MR.DB_SYSTEM_NAME_VALUE_REDIS,[GX.ATTR_SERVER_ADDRESS]:t?.socket?.host,[GX.ATTR_SERVER_PORT]:t?.socket?.port}),r}U6.getClientAttributes=awt;function uwt(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 L2e=M(Q6=>{"use strict";m();Object.defineProperty(Q6,"__esModule",{value:!0});Q6.RedisInstrumentationV4_V5=void 0;var fp=($e(),Le(nt)),xo=ln(),O2e=B2e(),cwt=w6(),P2e=O6(),jX=(tr(),Le(Kr)),lwt=P6(),BB=Symbol("opentelemetry.instrumentation.redis.open_spans"),M2e=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),zX=class e extends xo.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(P2e.PACKAGE_NAME,P2e.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,xo.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,xo.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 xo.InstrumentationNodeModuleFile(`${t}/dist/lib/commander.js`,["^1.0.0"],(i,s)=>{let u=i.transformCommandArguments;if(!u)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let l=s?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,xo.isWrapped)(i?.[l])&&this._unwrap(i,l),this._wrap(i,l,this._getPatchExtendWithCommands(u)),i},i=>{(0,xo.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,xo.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new xo.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return(0,xo.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),this._wrap(s,"exec",this._getPatchMultiCommandsExec(!1)),(0,xo.isWrapped)(s?.execAsPipeline)&&this._unwrap(s,"execAsPipeline"),this._wrap(s,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,xo.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand"),this._wrap(s,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let s=i?.default?.prototype;(0,xo.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),(0,xo.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand")}),o=new xo.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return s?.multi&&((0,xo.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),this._wrap(s,"multi",this._getPatchRedisClientMulti())),s?.MULTI&&((0,xo.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),this._wrap(s,"MULTI",this._getPatchRedisClientMulti())),(0,xo.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,xo.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),(0,xo.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),(0,xo.isWrapped)(s?.sendCommand)&&this._unwrap(s,"sendCommand")});return new xo.InstrumentationNodeModuleDefinition(t,["^1.0.0","^5.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(t){let n=this;return function(o){return function(s){if(s?.BaseClass?.name!=="RedisClient")return o.apply(this,arguments);let u=s.executor;return s.executor=function(l,f){let h=t(l,f).args;return n._traceClientCommand(u,this,arguments,h)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(o){return function(){let s=o.apply(this,arguments);return typeof s?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),s):s.then(u=>{let l=this[BB];return n._endSpansWithRedisReplies(l,u,t),u}).catch(u=>{let l=this[BB];if(!l)n._diag.error("cannot find open spans to end for multi/pipeline");else{let f=u.constructor.name==="MultiErrorReply"?u.replies:new Array(l.length).fill(u);n._endSpansWithRedisReplies(l,f,t)}return Promise.reject(u)})}}}_getPatchMultiCommandsAddCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchRedisClientMulti(){return function(n){return function(){let o=n.apply(this,arguments);return o[M2e]=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,O2e.getClientAttributes)(t._diag,i,t._semconvStability),u=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:fp.SpanKind.CLIENT,attributes:s});return fp.context.with(fp.trace.setSpan(fp.context.active(),u),()=>r.apply(this)).then(f=>(u.end(),f)).catch(f=>(u.recordException(f),u.setStatus({code:fp.SpanStatusCode.ERROR,message:f.message}),u.end(),Promise.reject(f)))}}}_traceClientCommand(t,n,r,o){if(fp.trace.getSpan(fp.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let s=n.options||n[M2e],u=o[0],l=o.slice(1),f=this.getConfig().dbStatementSerializer||cwt.defaultDbStatementSerializer,h=(0,O2e.getClientAttributes)(this._diag,s,this._semconvStability);this._semconvStability&xo.SemconvStability.STABLE&&(h[jX.ATTR_DB_OPERATION_NAME]=u);try{let T=f(u,l);T!=null&&(this._semconvStability&xo.SemconvStability.OLD&&(h[lwt.ATTR_DB_STATEMENT]=T),this._semconvStability&xo.SemconvStability.STABLE&&(h[jX.ATTR_DB_QUERY_TEXT]=T))}catch(T){this._diag.error("dbStatementSerializer throw an exception",T,{commandName:u})}let _=this.tracer.startSpan(`${e.COMPONENT}-${u}`,{kind:fp.SpanKind.CLIENT,attributes:h}),E=fp.context.with(fp.trace.setSpan(fp.context.active(),_),()=>t.apply(n,r));if(typeof E?.then=="function")E.then(T=>{this._endSpanWithResponse(_,u,l,T,void 0)},T=>{this._endSpanWithResponse(_,u,l,null,T)});else{let T=E;T[BB]=T[BB]||[],T[BB].push({span:_,commandName:u,commandArgs:l})}return E}_endSpansWithRedisReplies(t,n,r=!1){if(!t)return this._diag.error("cannot find open spans to end for redis multi/pipeline");if(n.length!==t.length)return this._diag.error("number of multi command spans does not match response from redis");let o=t.map(u=>u.commandName),s=o.every(u=>u===o[0])?(r?"PIPELINE ":"MULTI ")+o[0]:r?"PIPELINE":"MULTI";for(let u=0;u<t.length;u++){let{span:l,commandArgs:f}=t[u],h=n[u],[_,E]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&xo.SemconvStability.STABLE&&l.setAttribute(jX.ATTR_DB_OPERATION_NAME,s),this._endSpanWithResponse(l,o[u],f,_,E)}}_endSpanWithResponse(t,n,r,o,i){let{responseHook:s}=this.getConfig();if(!i&&s)try{s(t,n,r,o)}catch(u){this._diag.error("responseHook throw an exception",u)}i&&(t.recordException(i),t.setStatus({code:fp.SpanStatusCode.ERROR,message:i?.message})),t.end()}};Q6.RedisInstrumentationV4_V5=zX});var F2e=M(F6=>{"use strict";m();Object.defineProperty(F6,"__esModule",{value:!0});F6.RedisInstrumentation=void 0;var dwt=ln(),U2e=O6(),pwt=w2e(),fwt=L2e(),Q2e={requireParentSpan:!1},HX=class extends dwt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...Q2e,...t};super(U2e.PACKAGE_NAME,U2e.PACKAGE_VERSION,n),this.instrumentationV2_V3=new pwt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new fwt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...Q2e,...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())}};F6.RedisInstrumentation=HX});var G2e=M(G6=>{"use strict";m();Object.defineProperty(G6,"__esModule",{value:!0});G6.RedisInstrumentation=void 0;var mwt=F2e();Object.defineProperty(G6,"RedisInstrumentation",{enumerable:!0,get:function(){return mwt.RedisInstrumentation}})});function OB(e,t){return e.includes(t.toLowerCase())}function qX(e){return OB($X,e)?"cache.get":OB(gwt,e)?"cache.put":void 0}function hwt(e,t){return t.some(n=>e.startsWith(n))}function z2e(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)?j2e(o.map(i=>n(i))):["<unknown>"],r=t[0];return OB(Awt,e)&&r!=null?n(r):j2e(t.map(o=>n(o)))}catch{return}}function H2e(e,t,n){if(!qX(e))return!1;for(let r of t)if(hwt(r,n))return!0;return!1}function $2e(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 j2e(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var Awt,$X,gwt,q2e=k(()=>{m();Awt=["get","set","setex"],$X=["get","mget"],gwt=["set","setex"]});var V2e,K2e,j6,PB,Y2e,_wt,Ewt,J2e,ywt,Z2e,W2e=k(()=>{m();V2e=ue(x2e(),1),K2e=ue(G2e(),1);mt();yr();q2e();j6="Redis",PB={},Y2e=(e,t,n,r)=>{e.setAttribute(Ut,"auto.db.otel.redis");let o=z2e(t,n),i=qX(t);if(!o||!i||!PB.cachePrefixes||!H2e(t,o,PB.cachePrefixes))return;let s=Lt(e).data["net.peer.name"],u=Lt(e).data["net.peer.port"];u&&s&&e.setAttributes({"network.peer.address":s,"network.peer.port":u});let l=$2e(r);l&&e.setAttribute(JK,l),OB($X,t)&&l!==void 0&&e.setAttribute(KK,l>0),e.setAttributes({[on]:i,[YK]:o});let f=o.join(", ");e.updateName(PB.maxCacheKeyLength?G_(f,PB.maxCacheKeyLength):f)},_wt=ct(`${j6}.IORedis`,()=>new V2e.IORedisInstrumentation({responseHook:Y2e})),Ewt=ct(`${j6}.Redis`,()=>new K2e.RedisInstrumentation({responseHook:Y2e})),J2e=Object.assign(()=>{_wt(),Ewt()},{id:j6}),ywt=((e={})=>({name:j6,setupOnce(){PB=e,J2e()}})),Z2e=ywt});var X2e=M(z6=>{"use strict";m();Object.defineProperty(z6,"__esModule",{value:!0});z6.EVENT_LISTENERS_SET=void 0;z6.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var VX=M(MB=>{"use strict";m();Object.defineProperty(MB,"__esModule",{value:!0});MB.AttributeNames=void 0;var Swt;(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"})(Swt=MB.AttributeNames||(MB.AttributeNames={}))});var KX=M(Or=>{"use strict";m();Object.defineProperty(Or,"__esModule",{value:!0});Or.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=Or.METRIC_DB_CLIENT_CONNECTION_COUNT=Or.DB_SYSTEM_VALUE_POSTGRESQL=Or.DB_CLIENT_CONNECTION_STATE_VALUE_USED=Or.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=Or.ATTR_NET_PEER_PORT=Or.ATTR_NET_PEER_NAME=Or.ATTR_DB_USER=Or.ATTR_DB_SYSTEM=Or.ATTR_DB_STATEMENT=Or.ATTR_DB_NAME=Or.ATTR_DB_CONNECTION_STRING=Or.ATTR_DB_CLIENT_CONNECTION_STATE=Or.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;Or.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";Or.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";Or.ATTR_DB_CONNECTION_STRING="db.connection_string";Or.ATTR_DB_NAME="db.name";Or.ATTR_DB_STATEMENT="db.statement";Or.ATTR_DB_SYSTEM="db.system";Or.ATTR_DB_USER="db.user";Or.ATTR_NET_PEER_NAME="net.peer.name";Or.ATTR_NET_PEER_PORT="net.peer.port";Or.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";Or.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";Or.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";Or.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";Or.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var YX=M(LB=>{"use strict";m();Object.defineProperty(LB,"__esModule",{value:!0});LB.SpanNames=void 0;var Twt;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(Twt=LB.SpanNames||(LB.SpanNames={}))});var sLe=M(ur=>{"use strict";m();Object.defineProperty(ur,"__esModule",{value:!0});ur.sanitizedErrorMessage=ur.isObjectWithTextString=ur.getErrorMessage=ur.patchClientConnectCallback=ur.patchCallbackPGPool=ur.updateCounter=ur.getPoolName=ur.patchCallback=ur.handleExecutionResult=ur.handleConfigQuery=ur.shouldSkipInstrumentation=ur.getSemanticAttributesFromPoolConnection=ur.getSemanticAttributesFromConnection=ur.getConnectionString=ur.parseAndMaskConnectionString=ur.parseNormalizedOperationName=ur.getQuerySpanName=void 0;var RE=($e(),Le(nt)),H6=VX(),mp=(tr(),Le(Kr)),Si=KX(),sT=ln(),eLe=YX();function tLe(e,t){if(!t)return eLe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:nLe(t.text);return`${eLe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}ur.getQuerySpanName=tLe;function nLe(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}ur.parseNormalizedOperationName=nLe;function rLe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}ur.parseAndMaskConnectionString=rLe;function JX(e){if("connectionString"in e&&e.connectionString)return rLe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}ur.getConnectionString=JX;function $6(e){if(Number.isInteger(e))return e}function oLe(e,t){let n={};return t&sT.SemconvStability.OLD&&(n={...n,[Si.ATTR_DB_SYSTEM]:Si.DB_SYSTEM_VALUE_POSTGRESQL,[Si.ATTR_DB_NAME]:e.database,[Si.ATTR_DB_CONNECTION_STRING]:JX(e),[Si.ATTR_DB_USER]:e.user,[Si.ATTR_NET_PEER_NAME]:e.host,[Si.ATTR_NET_PEER_PORT]:$6(e.port)}),t&sT.SemconvStability.STABLE&&(n={...n,[mp.ATTR_DB_SYSTEM_NAME]:mp.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[mp.ATTR_DB_NAMESPACE]:e.namespace,[mp.ATTR_SERVER_ADDRESS]:e.host,[mp.ATTR_SERVER_PORT]:$6(e.port)}),n}ur.getSemanticAttributesFromConnection=oLe;function bwt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[H6.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[H6.AttributeNames.MAX_CLIENT]:e.maxClient};return t&sT.SemconvStability.OLD&&(r={...r,[Si.ATTR_DB_SYSTEM]:Si.DB_SYSTEM_VALUE_POSTGRESQL,[Si.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[Si.ATTR_DB_CONNECTION_STRING]:JX(e),[Si.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[Si.ATTR_NET_PEER_PORT]:Number(n?.port)||$6(e.port),[Si.ATTR_DB_USER]:n?.username??e.user}),t&sT.SemconvStability.STABLE&&(r={...r,[mp.ATTR_DB_SYSTEM_NAME]:mp.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[mp.ATTR_DB_NAMESPACE]:e.namespace,[mp.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[mp.ATTR_SERVER_PORT]:Number(n?.port)||$6(e.port)}),r}ur.getSemanticAttributesFromPoolConnection=bwt;function Iwt(e){return e.requireParentSpan===!0&&RE.trace.getSpan(RE.context.active())===void 0}ur.shouldSkipInstrumentation=Iwt;function Cwt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,s=tLe(i,r),u=e.startSpan(s,{kind:RE.SpanKind.CLIENT,attributes:oLe(o,n)});if(!r)return u;if(r.text&&(n&sT.SemconvStability.OLD&&u.setAttribute(Si.ATTR_DB_STATEMENT,r.text),n&sT.SemconvStability.STABLE&&u.setAttribute(mp.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());u.setAttribute(H6.AttributeNames.PG_VALUES,l)}catch(l){RE.diag.error("failed to stringify ",r.values,l)}return typeof r.name=="string"&&u.setAttribute(H6.AttributeNames.PG_PLAN,r.name),u}ur.handleConfigQuery=Cwt;function iLe(e,t,n){typeof e.responseHook=="function"&&(0,sT.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&RE.diag.error("Error running response hook",r)},!0)}ur.handleExecutionResult=iLe;function vwt(e,t,n,r,o){return function(s,u){s?(Object.prototype.hasOwnProperty.call(s,"code")&&(r[mp.ATTR_ERROR_TYPE]=s.code),s instanceof Error&&t.recordException(q6(s)),t.setStatus({code:RE.SpanStatusCode.ERROR,message:s.message})):iLe(e,t,u),o(),t.end(),n.call(this,s,u)}}ur.patchCallback=vwt;function Rwt(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()}ur.getPoolName=Rwt;function xwt(e,t,n,r,o){let i=t.totalCount,s=t.waitingCount,u=t.idleCount,l=i-u;return n.add(l-o.used,{[Si.ATTR_DB_CLIENT_CONNECTION_STATE]:Si.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[Si.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(u-o.idle,{[Si.ATTR_DB_CLIENT_CONNECTION_STATE]:Si.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[Si.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(s-o.pending,{[Si.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:l,idle:u,pending:s}}ur.updateCounter=xwt;function Dwt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(q6(r)),e.setStatus({code:RE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}ur.patchCallbackPGPool=Dwt;function Nwt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(q6(r)),e.setStatus({code:RE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}ur.patchClientConnectCallback=Nwt;function wwt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}ur.getErrorMessage=wwt;function kwt(e){return typeof e=="object"&&typeof e?.text=="string"}ur.isObjectWithTextString=kwt;function q6(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}ur.sanitizedErrorMessage=q6});var aLe=M(LR=>{"use strict";m();Object.defineProperty(LR,"__esModule",{value:!0});LR.PACKAGE_NAME=LR.PACKAGE_VERSION=void 0;LR.PACKAGE_VERSION="0.66.0";LR.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var fLe=M(K6=>{"use strict";m();Object.defineProperty(K6,"__esModule",{value:!0});K6.PgInstrumentation=void 0;var tc=ln(),Wr=($e(),Le(nt)),uLe=X2e(),oi=sLe(),cLe=BX(),lLe=aLe(),dLe=YX(),V6=Rr(),Nf=(tr(),Le(Kr)),UB=KX();function UR(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var ZX=class extends tc.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(lLe.PACKAGE_NAME,lLe.PACKAGE_VERSION,t),this._semconvStability=(0,tc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(Nf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Wr.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(UB.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(UB.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS,{description:"The number of current pending requests for an open connection.",unit:"{connection}"})}init(){let t=[">=8.0.3 <9"],n=[">=2.0.0 <4"],r=new tc.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new tc.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new tc.InstrumentationNodeModuleDefinition("pg",t,u=>{let l=UR(u);return this._patchPgClient(l.Client),u},u=>{let l=UR(u);return this._unpatchPgClient(l.Client),u},[o,r]),s=new tc.InstrumentationNodeModuleDefinition("pg-pool",n,u=>{let l=UR(u);return(0,tc.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect"),this._wrap(l.prototype,"connect",this._getPoolConnectPatch()),l},u=>{let l=UR(u);(0,tc.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect")});return[i,s]}_patchPgClient(t){if(!t)return;let n=UR(t);return(0,tc.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,tc.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),this._wrap(n.prototype,"query",this._getClientQueryPatch()),this._wrap(n.prototype,"connect",this._getClientConnectPatch()),t}_unpatchPgClient(t){let n=UR(t);return(0,tc.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,tc.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(oi.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan(dLe.SpanNames.CONNECT,{kind:Wr.SpanKind.CLIENT,attributes:oi.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let l=Wr.trace.getSpan(Wr.context.active());o=oi.patchClientConnectCallback(s,o),l&&(o=Wr.context.bind(Wr.context.active(),o))}let u=Wr.context.with(Wr.trace.setSpan(Wr.context.active(),s),()=>n.call(this,o));return pLe(s,u)}}recordOperationDuration(t,n){let r={},o=[Nf.ATTR_DB_NAMESPACE,Nf.ATTR_ERROR_TYPE,Nf.ATTR_SERVER_PORT,Nf.ATTR_SERVER_ADDRESS,Nf.ATTR_DB_OPERATION_NAME];this._semconvStability&tc.SemconvStability.OLD&&o.push(UB.ATTR_DB_SYSTEM),this._semconvStability&tc.SemconvStability.STABLE&&o.push(Nf.ATTR_DB_SYSTEM_NAME),o.forEach(s=>{s in t&&(r[s]=t[s])});let i=(0,V6.hrTimeToMilliseconds)((0,V6.hrTimeDuration)(n,(0,V6.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(oi.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,V6.hrTime)(),s=o[0],u=typeof s=="string",l=oi.isObjectWithTextString(s),f=u?{text:s,values:Array.isArray(o[1])?o[1]:void 0}:l?{...s,name:s.name,text:s.text,values:s.values??(Array.isArray(o[1])?o[1]:void 0)}:void 0,h={[UB.ATTR_DB_SYSTEM]:UB.DB_SYSTEM_VALUE_POSTGRESQL,[Nf.ATTR_DB_NAMESPACE]:this.database,[Nf.ATTR_SERVER_PORT]:this.connectionParameters.port,[Nf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};f?.text&&(h[Nf.ATTR_DB_OPERATION_NAME]=oi.parseNormalizedOperationName(f?.text));let _=()=>{t.recordOperationDuration(h,i)},E=t.getConfig(),T=oi.handleConfigQuery.call(this,t.tracer,E,t._semconvStability,f);if(E.addSqlCommenterCommentToQueries&&(u?o[0]=(0,cLe.addSqlCommenterComment)(T,s):l&&!("name"in s)&&(o[0]={...s,text:(0,cLe.addSqlCommenterComment)(T,s.text)})),o.length>0){let x=Wr.trace.getSpan(Wr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=oi.patchCallback(E,T,o[o.length-1],h,_),x&&(o[o.length-1]=Wr.context.bind(Wr.context.active(),o[o.length-1]));else if(typeof f?.callback=="function"){let B=oi.patchCallback(t.getConfig(),T,f.callback,h,_);x&&(B=Wr.context.bind(Wr.context.active(),B)),o[0].callback=B}}let{requestHook:v}=E;typeof v=="function"&&f&&(0,tc.safeExecuteInTheMiddle)(()=>{let{database:x,host:B,port:P,user:G}=this.connectionParameters;v(T,{connection:{database:x,host:B,port:P,user:G},query:{text:f.text,values:f.values,name:f.name}})},x=>{x&&t._diag.error("Error running query hook",x)},!0);let R;try{R=n.apply(this,o)}catch(x){throw x instanceof Error&&T.recordException(oi.sanitizedErrorMessage(x)),T.setStatus({code:Wr.SpanStatusCode.ERROR,message:oi.getErrorMessage(x)}),T.end(),x}return R instanceof Promise?R.then(x=>new Promise(B=>{oi.handleExecutionResult(t.getConfig(),T,x),_(),T.end(),B(x)})).catch(x=>new Promise((B,P)=>{x instanceof Error&&T.recordException(oi.sanitizedErrorMessage(x)),T.setStatus({code:Wr.SpanStatusCode.ERROR,message:x.message}),_(),T.end(),P(x)})):R})}_setPoolConnectEventListeners(t){if(t[uLe.EVENT_LISTENERS_SET])return;let n=oi.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=oi.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=oi.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=oi.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=oi.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[uLe.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(oi.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan(dLe.SpanNames.POOL_CONNECT,{kind:Wr.SpanKind.CLIENT,attributes:oi.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let l=Wr.trace.getSpan(Wr.context.active());o=oi.patchCallbackPGPool(s,o),l&&(o=Wr.context.bind(Wr.context.active(),o))}let u=Wr.context.with(Wr.trace.setSpan(Wr.context.active(),s),()=>n.call(this,o));return pLe(s,u)}}};K6.PgInstrumentation=ZX;function pLe(e,t){if(!(t instanceof Promise))return t;let n=t;return Wr.context.bind(Wr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(oi.sanitizedErrorMessage(r)),e.setStatus({code:Wr.SpanStatusCode.ERROR,message:oi.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var mLe=M(QR=>{"use strict";m();Object.defineProperty(QR,"__esModule",{value:!0});QR.AttributeNames=QR.PgInstrumentation=void 0;var Bwt=fLe();Object.defineProperty(QR,"PgInstrumentation",{enumerable:!0,get:function(){return Bwt.PgInstrumentation}});var Owt=VX();Object.defineProperty(QR,"AttributeNames",{enumerable:!0,get:function(){return Owt.AttributeNames}})});var ALe,gLe,hLe,Pwt,_Le,ELe=k(()=>{m();ALe=ue(mLe(),1);yr();gLe="Postgres",hLe=ct(gLe,ALe.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Jr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),Pwt=(e=>({name:gLe,setupOnce(){hLe(e)}})),_Le=Pwt});var xE,XX,yLe,Mwt,Lwt,SLe,WX,Uwt,TLe,bLe=k(()=>{m();$e();xE=ue(ln(),1);tr();mt();yr();JS();XX="PostgresJs",yLe=[">=3.0.0 <4"],Mwt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,Lwt=Symbol.for("sentry.query.from.instrumented.sql"),SLe=ct(XX,e=>new WX({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),WX=class extends xE.InstrumentationBase{constructor(t){super("sentry-postgres-js",nr,t)}init(){let t=new xE.InstrumentationNodeModuleDefinition("postgres",yLe,n=>{try{return this._patchPostgres(n)}catch(r){return ks&&W.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new xE.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,yLe,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 ks&&W.warn("postgres module does not export a function. Skipping instrumentation."),t;let o=this,i=function(...s){let u=Reflect.construct(r,s);if(!u||typeof u!="function")return ks&&W.warn("postgres() did not return a valid instance"),u;let l=o.getConfig();return WY(u,{requireParentSpan:l.requireParentSpan,requestHook:l.requestHook})};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let s of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(s)){let u=Object.getOwnPropertyDescriptor(r,s);u&&Object.defineProperty(i,s,u)}return n?i:(Bk(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return Jt.getSpan(Xe.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute($C,r);return}let o=n?.match(Mwt);o?.[1]&&t.setAttribute($C,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[Lwt])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),s=n._sanitizeSqlQuery(i);return sa({name:s||"postgresjs.query",op:"db"},u=>{Jr(u,"auto.db.postgresjs"),u.setAttributes({[AS]:"postgres",[l7]:s});let l=n.getConfig(),{requestHook:f}=l;f&&(0,xE.safeExecuteInTheMiddle)(()=>f(u,s,void 0),E=>{E&&(u.setAttribute("sentry.hook.error","requestHook failed"),ks&&W.error(`Error in requestHook for ${XX} integration:`,E))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(E,T,v)=>{try{n._setOperationName(u,s,v?.[0]?.command),u.end()}catch(R){ks&&W.error("Error ending span in resolve callback:",R)}return Reflect.apply(E,T,v)}});let _=this.reject;this.reject=new Proxy(_,{apply:(E,T,v)=>{try{u.setStatus({code:2,message:v?.[0]?.message||"unknown_error"}),u.setAttribute(d7,v?.[0]?.code||"unknown"),u.setAttribute(p7,v?.[0]?.name||"unknown"),n._setOperationName(u,s),u.end()}catch(R){ks&&W.error("Error ending span in reject callback:",R)}return Reflect.apply(E,T,v)}});try{return r.apply(this,o)}catch(E){throw u.setStatus({code:2,message:E instanceof Error?E.message:"unknown_error"}),u.end(),E}})},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}},Uwt=(e=>({name:XX,setupOnce(){SLe(e)}})),TLe=Uwt});var ILe=M(QB=>{"use strict";m();Object.defineProperty(QB,"__esModule",{value:!0});QB.SeverityNumber=void 0;var Qwt;(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"})(Qwt=QB.SeverityNumber||(QB.SeverityNumber={}))});var J6=M(FR=>{"use strict";m();Object.defineProperty(FR,"__esModule",{value:!0});FR.NOOP_LOGGER=FR.NoopLogger=void 0;var Y6=class{emit(t){}};FR.NoopLogger=Y6;FR.NOOP_LOGGER=new Y6});var W6=M(GR=>{"use strict";m();Object.defineProperty(GR,"__esModule",{value:!0});GR.NOOP_LOGGER_PROVIDER=GR.NoopLoggerProvider=void 0;var Fwt=J6(),Z6=class{getLogger(t,n,r){return new Fwt.NoopLogger}};GR.NoopLoggerProvider=Z6;GR.NOOP_LOGGER_PROVIDER=new Z6});var tee=M(X6=>{"use strict";m();Object.defineProperty(X6,"__esModule",{value:!0});X6.ProxyLogger=void 0;var Gwt=J6(),eee=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):Gwt.NOOP_LOGGER}};X6.ProxyLogger=eee});var ree=M(eG=>{"use strict";m();Object.defineProperty(eG,"__esModule",{value:!0});eG.ProxyLoggerProvider=void 0;var jwt=W6(),zwt=tee(),nee=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new zwt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:jwt.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)}};eG.ProxyLoggerProvider=nee});var CLe=M(tG=>{"use strict";m();Object.defineProperty(tG,"__esModule",{value:!0});tG._globalThis=void 0;tG._globalThis=typeof globalThis=="object"?globalThis:global});var vLe=M(nG=>{"use strict";m();Object.defineProperty(nG,"__esModule",{value:!0});nG._globalThis=void 0;var Hwt=CLe();Object.defineProperty(nG,"_globalThis",{enumerable:!0,get:function(){return Hwt._globalThis}})});var RLe=M(rG=>{"use strict";m();Object.defineProperty(rG,"__esModule",{value:!0});rG._globalThis=void 0;var $wt=vLe();Object.defineProperty(rG,"_globalThis",{enumerable:!0,get:function(){return $wt._globalThis}})});var xLe=M(nA=>{"use strict";m();Object.defineProperty(nA,"__esModule",{value:!0});nA.API_BACKWARDS_COMPATIBILITY_VERSION=nA.makeGetter=nA._global=nA.GLOBAL_LOGS_API_KEY=void 0;var qwt=RLe();nA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");nA._global=qwt._globalThis;function Vwt(e,t,n){return r=>r===e?t:n}nA.makeGetter=Vwt;nA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var NLe=M(oG=>{"use strict";m();Object.defineProperty(oG,"__esModule",{value:!0});oG.LogsAPI=void 0;var Ap=xLe(),Kwt=W6(),DLe=ree(),oee=class e{constructor(){this._proxyLoggerProvider=new DLe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Ap._global[Ap.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Ap._global[Ap.GLOBAL_LOGS_API_KEY]=(0,Ap.makeGetter)(Ap.API_BACKWARDS_COMPATIBILITY_VERSION,t,Kwt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Ap._global[Ap.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Ap._global,Ap.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Ap._global[Ap.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new DLe.ProxyLoggerProvider}};oG.LogsAPI=oee});var iee=M(da=>{"use strict";m();Object.defineProperty(da,"__esModule",{value:!0});da.logs=da.ProxyLoggerProvider=da.ProxyLogger=da.NoopLoggerProvider=da.NOOP_LOGGER_PROVIDER=da.NoopLogger=da.NOOP_LOGGER=da.SeverityNumber=void 0;var Ywt=ILe();Object.defineProperty(da,"SeverityNumber",{enumerable:!0,get:function(){return Ywt.SeverityNumber}});var wLe=J6();Object.defineProperty(da,"NOOP_LOGGER",{enumerable:!0,get:function(){return wLe.NOOP_LOGGER}});Object.defineProperty(da,"NoopLogger",{enumerable:!0,get:function(){return wLe.NoopLogger}});var kLe=W6();Object.defineProperty(da,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return kLe.NOOP_LOGGER_PROVIDER}});Object.defineProperty(da,"NoopLoggerProvider",{enumerable:!0,get:function(){return kLe.NoopLoggerProvider}});var Jwt=tee();Object.defineProperty(da,"ProxyLogger",{enumerable:!0,get:function(){return Jwt.ProxyLogger}});var Zwt=ree();Object.defineProperty(da,"ProxyLoggerProvider",{enumerable:!0,get:function(){return Zwt.ProxyLoggerProvider}});var Wwt=NLe();da.logs=Wwt.LogsAPI.getInstance()});var BLe=M(jR=>{"use strict";m();Object.defineProperty(jR,"__esModule",{value:!0});jR.disableInstrumentations=jR.enableInstrumentations=void 0;function Xwt(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()}}jR.enableInstrumentations=Xwt;function ekt(e){e.forEach(t=>t.disable())}jR.disableInstrumentations=ekt});var MLe=M(iG=>{"use strict";m();Object.defineProperty(iG,"__esModule",{value:!0});iG.registerInstrumentations=void 0;var OLe=($e(),Le(nt)),tkt=iee(),PLe=BLe();function nkt(e){let t=e.tracerProvider||OLe.trace.getTracerProvider(),n=e.meterProvider||OLe.metrics.getMeterProvider(),r=e.loggerProvider||tkt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,PLe.enableInstrumentations)(o,t,n,r),()=>{(0,PLe.disableInstrumentations)(o)}}iG.registerInstrumentations=nkt});var $Le=M(sG=>{"use strict";m();Object.defineProperty(sG,"__esModule",{value:!0});sG.satisfies=void 0;var cee=($e(),Le(nt)),GLe=/^(?: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-]+)*))?$/,rkt=/^(?<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-]+)*))?$/,okt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function ikt(e,t,n){if(!skt(e))return cee.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=lkt(e);if(!r)return!1;let o=[],i=jLe(r,t,o,n);return i&&!n?.includePrerelease?ukt(r,o):i}sG.satisfies=ikt;function skt(e){return typeof e=="string"&&GLe.test(e)}function jLe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(see(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=wkt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!see(e,i,n,r))return!1;return!0}return see(e,t,n,r)}function see(e,t,n,r){if(t=ckt(t,r),t.includes(" "))return jLe(e,t,n,r);{let o=dkt(t);return n.push(o),akt(e,o)}}function akt(e,t){if(t.invalid)return!1;if(!t.version||uee(t.version))return!0;let n=ULe(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=ULe(r,o)}return okt[t.op]?.includes(n)}function ukt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function ckt(e,t){return e=e.trim(),e=Dkt(e,t),e=xkt(e),e=Nkt(e,t),e=e.trim(),e}function nc(e){return!e||e.toLowerCase()==="x"||e==="*"}function lkt(e){let t=e.match(GLe);if(!t){cee.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 dkt(e){if(!e)return{};let t=e.match(rkt);if(!t)return cee.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,s=r.split("."),u=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:o,prereleaseSegments:u,prereleaseSegmentCount:u?u.length:0,build:i}}function uee(e){return e==="*"||e==="x"||e==="X"}function LLe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function pkt(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 fkt(e,t){if(uee(e)||uee(t))return 0;let[n,r]=pkt(LLe(e),LLe(t));return n>r?1:n<r?-1:0}function ULe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=fkt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var zLe="[a-zA-Z0-9-]",HLe="0|[1-9]\\d*",mkt=`\\d*[a-zA-Z-]${zLe}*`,Akt="((?:<|>)?=?)",QLe=`(?:${HLe}|${mkt})`,gkt=`(?:-(${QLe}(?:\\.${QLe})*))`,FLe=`${zLe}+`,hkt=`(?:\\+(${FLe}(?:\\.${FLe})*))`,aee=`${HLe}|x|X|\\*`,FB=`[v=\\s]*(${aee})(?:\\.(${aee})(?:\\.(${aee})(?:${gkt})?${hkt}?)?)?`,_kt=`^${Akt}\\s*${FB}$`,Ekt=new RegExp(_kt),ykt=`^\\s*(${FB})\\s+-\\s+(${FB})\\s*$`,Skt=new RegExp(ykt),Tkt="(?:~>?)",bkt=`^${Tkt}${FB}$`,Ikt=new RegExp(bkt),Ckt="(?:\\^)",vkt=`^${Ckt}${FB}$`,Rkt=new RegExp(vkt);function xkt(e){let t=Ikt;return e.replace(t,(n,r,o,i,s)=>{let u;return nc(r)?u="":nc(o)?u=`>=${r}.0.0 <${+r+1}.0.0-0`:nc(i)?u=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:s?u=`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:u=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,u})}function Dkt(e,t){let n=Rkt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,u,l)=>{let f;return nc(i)?f="":nc(s)?f=`>=${i}.0.0${r} <${+i+1}.0.0-0`:nc(u)?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}.${u}-${l} <${i}.${s}.${+u+1}-0`:f=`>=${i}.${s}.${u}-${l} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${u}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?f=`>=${i}.${s}.${u}${r} <${i}.${s}.${+u+1}-0`:f=`>=${i}.${s}.${u}${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${u} <${+i+1}.0.0-0`,f})}function Nkt(e,t){let n=Ekt;return e.replace(n,(r,o,i,s,u,l)=>{let f=nc(i),h=f||nc(s),_=h||nc(u),E=_;return o==="="&&E&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&E?(h&&(s=0),u=0,o===">"?(o=">=",h?(i=+i+1,s=0,u=0):(s=+s+1,u=0)):o==="<="&&(o="<",h?i=+i+1:s=+s+1),o==="<"&&(l="-0"),r=`${o+i}.${s}.${u}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:_&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function wkt(e,t){let n=Skt;return e.replace(n,(r,o,i,s,u,l,f,h,_,E,T,v)=>(nc(i)?o="":nc(s)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:nc(u)?o=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,nc(_)?h="":nc(E)?h=`<${+_+1}.0.0-0`:nc(T)?h=`<${_}.${+E+1}.0-0`:v?h=`<=${_}.${E}.${T}-${v}`:t?.includePrerelease?h=`<${_}.${E}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var lee=M(Fa=>{"use strict";m();Object.defineProperty(Fa,"__esModule",{value:!0});Fa.massUnwrap=Fa.unwrap=Fa.massWrap=Fa.wrap=void 0;var rc=console.error.bind(console);function GB(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 kkt=(e,t,n)=>{if(!e||!e[t]){rc("no original function "+String(t)+" to wrap");return}if(!n){rc("no wrapper function"),rc(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){rc("original object and wrapper must be functions");return}let o=n(r,t);return GB(o,"__original",r),GB(o,"__unwrap",()=>{e[t]===o&&GB(e,t,r)}),GB(o,"__wrapped",!0),GB(e,t,o),o};Fa.wrap=kkt;var Bkt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{rc("must provide one or more modules to patch"),rc(new Error().stack);return}if(!(t&&Array.isArray(t))){rc("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Fa.wrap)(r,o,n)})})};Fa.massWrap=Bkt;var Okt=(e,t)=>{if(!e||!e[t]){rc("no function to unwrap."),rc(new Error().stack);return}let n=e[t];if(!n.__unwrap)rc("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Fa.unwrap=Okt;var Pkt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{rc("must provide one or more modules to patch"),rc(new Error().stack);return}if(!(t&&Array.isArray(t))){rc("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Fa.unwrap)(n,r)})})};Fa.massUnwrap=Pkt;function jB(e){e&&e.logger&&(typeof e.logger!="function"?rc("new logger isn't a function, not replacing"):rc=e.logger)}Fa.default=jB;jB.wrap=Fa.wrap;jB.massWrap=Fa.massWrap;jB.unwrap=Fa.unwrap;jB.massUnwrap=Fa.massUnwrap});var qLe=M(uG=>{"use strict";m();Object.defineProperty(uG,"__esModule",{value:!0});uG.InstrumentationAbstract=void 0;var dee=($e(),Le(nt)),Mkt=iee(),aG=lee(),pee=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=dee.diag.createComponentLogger({namespace:t}),this._tracer=dee.trace.getTracer(t,n),this._meter=dee.metrics.getMeter(t,n),this._logger=Mkt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=aG.wrap;_unwrap=aG.unwrap;_massWrap=aG.massWrap;_massUnwrap=aG.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)}}};uG.InstrumentationAbstract=pee});var VLe=M(DE=>{"use strict";m();Object.defineProperty(DE,"__esModule",{value:!0});DE.ModuleNameTrie=DE.ModuleNameSeparator=void 0;DE.ModuleNameSeparator="/";var cG=class{hooks=[];children=new Map},fee=class{_trie=new cG;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(DE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new cG,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],s=!0;for(let u of t.split(DE.ModuleNameSeparator)){let l=o.children.get(u);if(!l){s=!1;break}r||i.push(...l.hooks),o=l}return r&&s&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((u,l)=>u.insertedId-l.insertedId),i.map(({hook:u})=>u))}};DE.ModuleNameTrie=fee});var YLe=M(lG=>{"use strict";m();Object.defineProperty(lG,"__esModule",{value:!0});lG.RequireInTheMiddleSingleton=void 0;var Lkt=SS(),KLe=Fe("path"),mee=VLe(),Ukt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),Aee=class e{_moduleNameTrie=new mee.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new Lkt.Hook(null,{internals:!0},(t,n,r)=>{let o=Qkt(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 Ukt?new e:this._instance=this._instance??new e}};lG.RequireInTheMiddleSingleton=Aee;function Qkt(e){return KLe.sep!==mee.ModuleNameSeparator?e.split(KLe.sep).join(mee.ModuleNameSeparator):e}});var gee=M(NE=>{"use strict";m();Object.defineProperty(NE,"__esModule",{value:!0});NE.isWrapped=NE.safeExecuteInTheMiddleAsync=NE.safeExecuteInTheMiddle=void 0;function Fkt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}NE.safeExecuteInTheMiddle=Fkt;async function Gkt(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}}NE.safeExecuteInTheMiddleAsync=Gkt;function jkt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}NE.isWrapped=jkt});var WLe=M(dG=>{"use strict";m();Object.defineProperty(dG,"__esModule",{value:!0});dG.InstrumentationBase=void 0;var zB=Fe("path"),JLe=Fe("util"),zkt=$Le(),hee=lee(),Hkt=qLe(),$kt=YLe(),qkt=ZW(),HB=($e(),Le(nt)),Vkt=SS(),Kkt=Fe("fs"),Ykt=gee(),_ee=class extends Hkt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=$kt.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,Ykt.isWrapped)(t[n])&&this._unwrap(t,n),JLe.types.isProxy(t)){let o=(0,hee.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,hee.wrap)(t,n,r)};_unwrap=(t,n)=>JLe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,hee.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{HB.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){HB.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{HB.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){HB.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,Kkt.readFileSync)(zB.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{HB.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 ZLe(t.supportedVersions,i,t.includePrerelease)&&typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:t.name,version:t.moduleVersion,baseDir:o}),t.patch(n,t.moduleVersion)):n;let s=t.files??[],u=zB.normalize(r);return s.filter(f=>f.name===u).filter(f=>ZLe(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,u,l)=>{if(!l&&zB.isAbsolute(u)){let f=zB.parse(u);u=f.name,l=f.dir}return this._onRequire(t,s,u,l)},r=(s,u,l)=>this._onRequire(t,s,u,l),o=zB.isAbsolute(t.name)?new Vkt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new qkt.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}};dG.InstrumentationBase=_ee;function ZLe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,zkt.satisfies)(t,r,{includePrerelease:n}))}});var XLe=M(pG=>{"use strict";m();Object.defineProperty(pG,"__esModule",{value:!0});pG.normalize=void 0;var Jkt=Fe("path");Object.defineProperty(pG,"normalize",{enumerable:!0,get:function(){return Jkt.normalize}})});var eUe=M(zR=>{"use strict";m();Object.defineProperty(zR,"__esModule",{value:!0});zR.normalize=zR.InstrumentationBase=void 0;var Zkt=WLe();Object.defineProperty(zR,"InstrumentationBase",{enumerable:!0,get:function(){return Zkt.InstrumentationBase}});var Wkt=XLe();Object.defineProperty(zR,"normalize",{enumerable:!0,get:function(){return Wkt.normalize}})});var Eee=M(HR=>{"use strict";m();Object.defineProperty(HR,"__esModule",{value:!0});HR.normalize=HR.InstrumentationBase=void 0;var tUe=eUe();Object.defineProperty(HR,"InstrumentationBase",{enumerable:!0,get:function(){return tUe.InstrumentationBase}});Object.defineProperty(HR,"normalize",{enumerable:!0,get:function(){return tUe.normalize}})});var nUe=M(fG=>{"use strict";m();Object.defineProperty(fG,"__esModule",{value:!0});fG.InstrumentationNodeModuleDefinition=void 0;var yee=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||[]}};fG.InstrumentationNodeModuleDefinition=yee});var rUe=M(mG=>{"use strict";m();Object.defineProperty(mG,"__esModule",{value:!0});mG.InstrumentationNodeModuleFile=void 0;var Xkt=Eee(),See=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,Xkt.normalize)(t)}};mG.InstrumentationNodeModuleFile=See});var oUe=M(aT=>{"use strict";m();Object.defineProperty(aT,"__esModule",{value:!0});aT.semconvStabilityFromStr=aT.SemconvStability=void 0;var AG;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(AG=aT.SemconvStability||(aT.SemconvStability={}));function eBt(e,t){let n=AG.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=AG.DUPLICATE;break}else o.toLowerCase()===e&&(n=AG.STABLE);return n}aT.semconvStabilityFromStr=eBt});var sUe=M(ps=>{"use strict";m();Object.defineProperty(ps,"__esModule",{value:!0});ps.semconvStabilityFromStr=ps.SemconvStability=ps.safeExecuteInTheMiddleAsync=ps.safeExecuteInTheMiddle=ps.isWrapped=ps.InstrumentationNodeModuleFile=ps.InstrumentationNodeModuleDefinition=ps.InstrumentationBase=ps.registerInstrumentations=void 0;var tBt=MLe();Object.defineProperty(ps,"registerInstrumentations",{enumerable:!0,get:function(){return tBt.registerInstrumentations}});var nBt=Eee();Object.defineProperty(ps,"InstrumentationBase",{enumerable:!0,get:function(){return nBt.InstrumentationBase}});var rBt=nUe();Object.defineProperty(ps,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return rBt.InstrumentationNodeModuleDefinition}});var oBt=rUe();Object.defineProperty(ps,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return oBt.InstrumentationNodeModuleFile}});var Tee=gee();Object.defineProperty(ps,"isWrapped",{enumerable:!0,get:function(){return Tee.isWrapped}});Object.defineProperty(ps,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return Tee.safeExecuteInTheMiddle}});Object.defineProperty(ps,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return Tee.safeExecuteInTheMiddleAsync}});var iUe=oUe();Object.defineProperty(ps,"SemconvStability",{enumerable:!0,get:function(){return iUe.SemconvStability}});Object.defineProperty(ps,"semconvStabilityFromStr",{enumerable:!0,get:function(){return iUe.semconvStabilityFromStr}})});function aBt(){let e=$R[Iee];return e?.helper?e.helper:$R[bee]?.helper}function uBt(e){let t={helper:e};$R[Iee]=t,$R[bee]=t}function cBt(){delete $R[Iee],delete $R[bee]}function pBt(e){return e==="client"?Ao.CLIENT:Ao.INTERNAL}function cUe(e,t,n,r,o){if(lUe(t.name,o))return;let i={attributes:t.attributes,kind:pBt(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 u=n.filter(l=>l.parentId===t.id);for(let l of u)cUe(e,l,n,r,o);s.end(t.endTime)})}function aUe(e,t){return mBt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function mBt(e){return e!=null&&typeof e.then=="function"}function lUe(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var gG,iBt,sBt,bee,Iee,$R,lBt,dBt,fBt,dUe,uUe,ABt,gBt,pUe,fUe=k(()=>{m();$e();gG=ue(sUe(),1);$e();iBt={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"}},sBt=iBt.version.split(".")[0],bee="PRISMA_INSTRUMENTATION",Iee=`V${sBt}_PRISMA_INSTRUMENTATION`,$R=globalThis;lBt=process.env.PRISMA_SHOW_ALL_TRACES==="true",dBt="00-10-10-00";fBt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=Jt.getSpanContext(e??Xe.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:dBt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)cUe(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return Xe.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!lBt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(lUe(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return aUe(i,t(i,r))}return n.startActiveSpan(o,e,i=>aUe(i,t(i,r)))}};dUe={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},uUe=dUe.version,ABt=dUe.name,gBt="@prisma/client",pUe=class extends gG.InstrumentationBase{tracerProvider;constructor(e={}){super(ABt,uUe,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new gG.InstrumentationNodeModuleDefinition(gBt,[uUe])]}enable(){let e=this._config;uBt(new fBt({tracerProvider:this.tracerProvider??Jt.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){cBt()}isEnabled(){return aBt()!==void 0}}});function hBt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function AUe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function _Bt(e){return e==="client"?Ao.CLIENT:Ao.INTERNAL}var mUe,Cee,EBt,gUe,hUe=k(()=>{m();$e();fUe();mt();yr();mUe="Prisma";Cee=class extends pUe{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=AUe();hBt(t)&&(t.createEngineSpan=n=>{let r=Jt.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){ti(()=>{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=_Bt(i.kind),u=i.parent_span_id,l=i.span_id,f=i.trace_id,h=i.links?.map(E=>({context:{traceId:E.trace_id,spanId:E.span_id,traceFlags:ou.SAMPLED}})),_=Jt.setSpanContext(Xe.active(),{traceId:f,spanId:u,traceFlags:ou.SAMPLED});Xe.with(_,()=>{let E={generateTraceId:()=>f,generateSpanId:()=>l};r._idGenerator=E,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}})}};EBt=ct(mUe,e=>new Cee(e)),gUe=e=>({name:mUe,setupOnce(){EBt(e)},setup(t){AUe()&&t.on("spanStart",n=>{let r=Lt(n);r.description?.startsWith("prisma:")&&n.setAttribute(Ut,"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 _Ue=M(qR=>{"use strict";m();Object.defineProperty(qR,"__esModule",{value:!0});qR.PACKAGE_NAME=qR.PACKAGE_VERSION=void 0;qR.PACKAGE_VERSION="0.60.0";qR.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var vee=M(rA=>{"use strict";m();Object.defineProperty(rA,"__esModule",{value:!0});rA.HapiLifecycleMethodNames=rA.HapiLayerType=rA.handlerPatched=rA.HapiComponentName=void 0;rA.HapiComponentName="@hapi/hapi";rA.handlerPatched=Symbol("hapi-handler-patched");rA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};rA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var EUe=M(hG=>{"use strict";m();Object.defineProperty(hG,"__esModule",{value:!0});hG.ATTR_HTTP_METHOD=void 0;hG.ATTR_HTTP_METHOD="http.method"});var Ree=M($B=>{"use strict";m();Object.defineProperty($B,"__esModule",{value:!0});$B.AttributeNames=void 0;var yBt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(yBt=$B.AttributeNames||($B.AttributeNames={}))});var TUe=M(fs=>{"use strict";m();Object.defineProperty(fs,"__esModule",{value:!0});fs.getPluginFromInput=fs.getExtMetadata=fs.getRouteMetadata=fs.isPatchableExtMethod=fs.isDirectExtInput=fs.isLifecycleExtEventObj=fs.isLifecycleExtType=fs.getPluginName=void 0;var yUe=(tr(),Le(Kr)),SBt=EUe(),qB=vee(),wE=Ree(),SUe=ln();function TBt(e){return e.name?e.name:e.pkg.name}fs.getPluginName=TBt;var bBt=e=>typeof e=="string"&&qB.HapiLifecycleMethodNames.has(e);fs.isLifecycleExtType=bBt;var IBt=e=>{let t=e?.type;return t!==void 0&&(0,fs.isLifecycleExtType)(t)};fs.isLifecycleExtEventObj=IBt;var CBt=e=>Array.isArray(e)&&e.length<=3&&(0,fs.isLifecycleExtType)(e[0])&&typeof e[1]=="function";fs.isDirectExtInput=CBt;var vBt=e=>!Array.isArray(e);fs.isPatchableExtMethod=vBt;var RBt=(e,t,n)=>{let r={[yUe.ATTR_HTTP_ROUTE]:e.path};t&SUe.SemconvStability.OLD&&(r[SBt.ATTR_HTTP_METHOD]=e.method),t&SUe.SemconvStability.STABLE&&(r[yUe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[wE.AttributeNames.HAPI_TYPE]=qB.HapiLayerType.PLUGIN,r[wE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[wE.AttributeNames.HAPI_TYPE]=qB.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};fs.getRouteMetadata=RBt;var xBt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[wE.AttributeNames.EXT_TYPE]:e,[wE.AttributeNames.HAPI_TYPE]:qB.HapiLayerType.EXT,[wE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[wE.AttributeNames.EXT_TYPE]:e,[wE.AttributeNames.HAPI_TYPE]:qB.HapiLayerType.EXT},name:r}};fs.getExtMetadata=xBt;var DBt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;fs.getPluginFromInput=DBt});var CUe=M(_G=>{"use strict";m();Object.defineProperty(_G,"__esModule",{value:!0});_G.HapiInstrumentation=void 0;var od=($e(),Le(nt)),bUe=Rr(),VB=ln(),IUe=_Ue(),KB=vee(),eh=TUe(),xee=class extends VB.InstrumentationBase{_semconvStability;constructor(t={}){super(IUe.PACKAGE_NAME,IUe.PACKAGE_VERSION,t),this._semconvStability=(0,VB.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new VB.InstrumentationNodeModuleDefinition(KB.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,VB.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,VB.isWrapped)(n.Server)||this._wrap(n,"Server",this._getServerPatch.bind(this)),n},t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._massUnwrap([n],["server","Server"])})}_getServerPatch(t){let n=this,r=this;return function(i){let s=t.apply(this,[i]);return r._wrap(s,"route",u=>n._getServerRoutePatch.bind(n)(u)),r._wrap(s,"ext",u=>n._getServerExtPatch.bind(n)(u)),r._wrap(s,"register",n._getServerRegisterPatch.bind(n)),s}}_getServerRegisterPatch(t){let n=this;return function(o,i){if(Array.isArray(o))for(let s of o){let u=(0,eh.getPluginFromInput)(s);n._wrapRegisterHandler(u)}else{let s=(0,eh.getPluginFromInput)(o);n._wrapRegisterHandler(s)}return t.apply(this,[o,i])}}_getServerExtPatch(t,n){let r=this;return function(...i){if(Array.isArray(i[0])){let s=i[0];for(let u=0;u<s.length;u++){let l=s[u];if((0,eh.isLifecycleExtType)(l.type)){let f=l,h=r._wrapExtMethods(f.method,l.type,n);f.method=h,s[u]=f}}return t.apply(this,i)}else if((0,eh.isDirectExtInput)(i)){let s=i,u=s[1],l=r._wrapExtMethods(u,s[0],n);return t.apply(this,[s[0],l,s[2]])}else if((0,eh.isLifecycleExtEventObj)(i[0])){let s=i[0],u=r._wrapExtMethods(s.method,s.type,n);return s.method=u,t.call(this,s)}return t.apply(this,i)}}_getServerRoutePatch(t,n){let r=this;return function(o){if(Array.isArray(o))for(let i=0;i<o.length;i++){let s=r._wrapRouteHandler.call(r,o[i],n);o[i]=s}else o=r._wrapRouteHandler.call(r,o,n);return t.apply(this,[o])}}_wrapRegisterHandler(t){let n=this,r=(0,eh.getPluginName)(t),o=t.register,i=this,s=function(u,l){return i._wrap(u,"route",f=>n._getServerRoutePatch.bind(n)(f,r)),i._wrap(u,"ext",f=>n._getServerExtPatch.bind(n)(f,r)),o.call(this,u,l)};t.register=s}_wrapExtMethods(t,n,r){let o=this;if(t instanceof Array){for(let i=0;i<t.length;i++)t[i]=o._wrapExtMethods(t[i],n);return t}else if((0,eh.isPatchableExtMethod)(t))return t[KB.handlerPatched]===!0?t:(t[KB.handlerPatched]=!0,async function(...s){if(od.trace.getSpan(od.context.active())===void 0)return await t.apply(this,s);let u=(0,eh.getExtMetadata)(n,r,t.name),l=o.tracer.startSpan(u.name,{attributes:u.attributes});try{return await od.context.with(od.trace.setSpan(od.context.active(),l),t,void 0,...s)}catch(f){throw l.recordException(f),l.setStatus({code:od.SpanStatusCode.ERROR,message:f.message}),f}finally{l.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[KB.handlerPatched]===!0)return t;t[KB.handlerPatched]=!0;let o=i=>async function(...s){if(od.trace.getSpan(od.context.active())===void 0)return await i.call(this,...s);let u=(0,bUe.getRPCMetadata)(od.context.active());u?.type===bUe.RPCType.HTTP&&(u.route=t.path);let l=(0,eh.getRouteMetadata)(t,r._semconvStability,n),f=r.tracer.startSpan(l.name,{attributes:l.attributes});try{return await od.context.with(od.trace.setSpan(od.context.active(),f),()=>i.call(this,...s))}catch(h){throw f.recordException(h),f.setStatus({code:od.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 u=i(s);return typeof u.handler=="function"&&(u.handler=o(u.handler)),u}}else typeof t.options?.handler=="function"&&(t.options.handler=o(t.options.handler));return t}};_G.HapiInstrumentation=xee});var vUe=M(VR=>{"use strict";m();Object.defineProperty(VR,"__esModule",{value:!0});VR.AttributeNames=VR.HapiInstrumentation=void 0;var NBt=CUe();Object.defineProperty(VR,"HapiInstrumentation",{enumerable:!0,get:function(){return NBt.HapiInstrumentation}});var wBt=Ree();Object.defineProperty(VR,"AttributeNames",{enumerable:!0,get:function(){return wBt.AttributeNames}})});var RUe,xUe,DUe,kBt,NUe,wUe=k(()=>{m();RUe=ue(vUe(),1);yr();xUe="Hapi",DUe=ct(xUe,()=>new RUe.HapiInstrumentation),kBt=(()=>({name:xUe,setupOnce(){DUe()}})),NUe=kBt});var kE,YB,Dee=k(()=>{m();kE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},YB={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var yG,BBt,OBt,EG,kUe=k(()=>{m();$e();yG=ue(ln(),1);mt();Dee();BBt="@sentry/instrumentation-hono",OBt="0.0.1",EG=class extends yG.InstrumentationBase{constructor(t={}){super(BBt,OBt,t)}init(){return[new yG.InstrumentationNodeModuleDefinition("hono",[">=4.0.0 <5"],t=>this._patch(t))]}_patch(t){let n=this;class r extends t.Hono{constructor(...i){super(...i),n._wrap(this,"get",n._patchHandler()),n._wrap(this,"post",n._patchHandler()),n._wrap(this,"put",n._patchHandler()),n._wrap(this,"delete",n._patchHandler()),n._wrap(this,"options",n._patchHandler()),n._wrap(this,"patch",n._patchHandler()),n._wrap(this,"all",n._patchHandler()),n._wrap(this,"on",n._patchOnHandler()),n._wrap(this,"use",n._patchMiddlewareHandler())}}try{t.Hono=r}catch{return{...t,Hono:r}}return t}_patchHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let s=o.slice(1);return n.apply(this,[i,...s.map(u=>t._wrapHandler(u))])}return n.apply(this,o.map(i=>t._wrapHandler(i)))}}}_patchOnHandler(){let t=this;return function(n){return function(...o){let i=o.slice(2);return n.apply(this,[...o.slice(0,2),...i.map(s=>t._wrapHandler(s))])}}}_patchMiddlewareHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let s=o.slice(1);return n.apply(this,[i,...s.map(u=>t._wrapHandler(u))])}return n.apply(this,o.map(i=>t._wrapHandler(i)))}}}_wrapHandler(t){let n=this;return function(r,o){if(!n.isEnabled())return t.apply(this,[r,o]);let i=r.req.path,s=n.tracer.startSpan(i);return Xe.with(Jt.setSpan(Xe.active(),s),()=>n._safeExecute(()=>{let u=t.apply(this,[r,o]);if(wa(u))return u.then(l=>{let f=n._determineHandlerType(l);return s.setAttributes({[kE.HONO_TYPE]:f,[kE.HONO_NAME]:f===YB.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),l});{let l=n._determineHandlerType(u);return s.setAttributes({[kE.HONO_TYPE]:l,[kE.HONO_NAME]:l===YB.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),u}},()=>s.end(),u=>{n._handleError(s,u),s.end()}))}}_safeExecute(t,n,r){try{let o=t();return wa(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?YB.MIDDLEWARE:YB.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:hi.ERROR,message:n.message}),t.recordException(n))}}});function PBt(e){let t=Lt(e).data,n=t[kE.HONO_TYPE];if(t[on]||!n)return;e.setAttributes({[Ut]:"auto.http.otel.hono",[on]:`${n}.hono`});let r=t[kE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),xn()===ep()){ks&&W.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[Rg],i=t[gS];typeof o=="string"&&typeof i=="string"&&xn().setTransactionName(`${i} ${o}`)}var BUe,OUe,MBt,PUe,MUe=k(()=>{m();tr();mt();yr();JS();Dee();kUe();BUe="Hono";OUe=ct(BUe,()=>new EG({responseHook:e=>{PBt(e)}})),MBt=(()=>({name:BUe,setupOnce(){OUe()}})),PUe=MBt});var SG=M(JB=>{"use strict";m();Object.defineProperty(JB,"__esModule",{value:!0});JB.KoaLayerType=void 0;var LBt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(LBt=JB.KoaLayerType||(JB.KoaLayerType={}))});var LUe=M(KR=>{"use strict";m();Object.defineProperty(KR,"__esModule",{value:!0});KR.PACKAGE_NAME=KR.PACKAGE_VERSION=void 0;KR.PACKAGE_VERSION="0.62.0";KR.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var Nee=M(ZB=>{"use strict";m();Object.defineProperty(ZB,"__esModule",{value:!0});ZB.AttributeNames=void 0;var UBt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(UBt=ZB.AttributeNames||(ZB.AttributeNames={}))});var QUe=M(YR=>{"use strict";m();Object.defineProperty(YR,"__esModule",{value:!0});YR.isLayerIgnored=YR.getMiddlewareMetadata=void 0;var UUe=SG(),TG=Nee(),QBt=(tr(),Le(Kr)),FBt=(e,t,n,r)=>n?{attributes:{[TG.AttributeNames.KOA_NAME]:r?.toString(),[TG.AttributeNames.KOA_TYPE]:UUe.KoaLayerType.ROUTER,[QBt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[TG.AttributeNames.KOA_NAME]:t.name??"middleware",[TG.AttributeNames.KOA_TYPE]:UUe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};YR.getMiddlewareMetadata=FBt;var GBt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));YR.isLayerIgnored=GBt});var FUe=M(bG=>{"use strict";m();Object.defineProperty(bG,"__esModule",{value:!0});bG.kLayerPatched=void 0;bG.kLayerPatched=Symbol("koa-layer-patched")});var qUe=M(IG=>{"use strict";m();Object.defineProperty(IG,"__esModule",{value:!0});IG.KoaInstrumentation=void 0;var oA=($e(),Le(nt)),WB=ln(),GUe=SG(),jUe=LUe(),zUe=QUe(),HUe=Rr(),$Ue=FUe(),wee=class extends WB.InstrumentationBase{constructor(t={}){super(jUe.PACKAGE_NAME,jUe.PACKAGE_VERSION,t)}init(){return new WB.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,WB.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,WB.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){oA.diag.debug("Patching @koa/router dispatch");let r=t.router?.stack??[];for(let o of r){let i=o.path,s=o.stack;for(let u=0;u<s.length;u++){let l=s[u];s[u]=this._patchLayer(l,!0,i)}}return t}_patchLayer(t,n,r){let o=n?GUe.KoaLayerType.ROUTER:GUe.KoaLayerType.MIDDLEWARE;return t[$Ue.kLayerPatched]===!0||(0,zUe.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(oA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[$Ue.kLayerPatched]=!0,oA.diag.debug("patching Koa middleware layer"),async(i,s)=>{if(oA.trace.getSpan(oA.context.active())===void 0)return t(i,s);let l=(0,zUe.getMiddlewareMetadata)(i,t,n,r),f=this.tracer.startSpan(l.name,{attributes:l.attributes}),h=(0,HUe.getRPCMetadata)(oA.context.active());h?.type===HUe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:_}=this.getConfig();_&&(0,WB.safeExecuteInTheMiddle)(()=>_(f,{context:i,middlewareLayer:t,layerType:o}),T=>{T&&oA.diag.error("koa instrumentation: request hook failed",T)},!0);let E=oA.trace.setSpan(oA.context.active(),f);return oA.context.with(E,async()=>{try{return await t(i,s)}catch(T){throw f.recordException(T),T}finally{f.end()}})})}};IG.KoaInstrumentation=wee});var VUe=M(BE=>{"use strict";m();Object.defineProperty(BE,"__esModule",{value:!0});BE.KoaLayerType=BE.AttributeNames=BE.KoaInstrumentation=void 0;var jBt=qUe();Object.defineProperty(BE,"KoaInstrumentation",{enumerable:!0,get:function(){return jBt.KoaInstrumentation}});var zBt=Nee();Object.defineProperty(BE,"AttributeNames",{enumerable:!0,get:function(){return zBt.AttributeNames}});var HBt=SG();Object.defineProperty(BE,"KoaLayerType",{enumerable:!0,get:function(){return HBt.KoaLayerType}})});var KUe,YUe,JUe,$Bt,ZUe,WUe=k(()=>{m();KUe=ue(VUe(),1);tr();mt();yr();JS();YUe="Koa",JUe=ct(YUe,KUe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Jr(t,"auto.http.otel.koa");let r=Lt(t).data,o=r["koa.type"];o&&t.setAttribute(on,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),xn()===ep()){ks&&W.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let s=r[Rg],u=n.context?.request?.method?.toUpperCase()||"GET";s&&xn().setTransactionName(`${u} ${s}`)}})),$Bt=((e={})=>({name:YUe,setupOnce(){JUe(e)}})),ZUe=$Bt});var kee=M(wf=>{"use strict";m();Object.defineProperty(wf,"__esModule",{value:!0});wf.ConnectNames=wf.ConnectTypes=wf.AttributeNames=void 0;var qBt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(qBt=wf.AttributeNames||(wf.AttributeNames={}));var VBt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(VBt=wf.ConnectTypes||(wf.ConnectTypes={}));var KBt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(KBt=wf.ConnectNames||(wf.ConnectNames={}))});var XUe=M(JR=>{"use strict";m();Object.defineProperty(JR,"__esModule",{value:!0});JR.PACKAGE_NAME=JR.PACKAGE_VERSION=void 0;JR.PACKAGE_VERSION="0.57.0";JR.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var eQe=M(CG=>{"use strict";m();Object.defineProperty(CG,"__esModule",{value:!0});CG._LAYERS_STORE_PROPERTY=void 0;CG._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var tQe=M(PE=>{"use strict";m();Object.defineProperty(PE,"__esModule",{value:!0});PE.generateRoute=PE.replaceCurrentStackRoute=PE.addNewStackLayer=void 0;var YBt=($e(),Le(nt)),OE=eQe(),JBt=e=>{Array.isArray(e[OE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,OE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[OE._LAYERS_STORE_PROPERTY].push("/");let t=e[OE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[OE._LAYERS_STORE_PROPERTY].length?e[OE._LAYERS_STORE_PROPERTY].pop():YBt.diag.warn("Connect: Trying to pop the stack multiple time")}};PE.addNewStackLayer=JBt;var ZBt=(e,t)=>{t&&e[OE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};PE.replaceCurrentStackRoute=ZBt;var WBt=e=>e[OE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);PE.generateRoute=WBt});var oQe=M(ME=>{"use strict";m();Object.defineProperty(ME,"__esModule",{value:!0});ME.ConnectInstrumentation=ME.ANONYMOUS_NAME=void 0;var XBt=($e(),Le(nt)),nQe=Rr(),ZR=kee(),rQe=XUe(),vG=ln(),eOt=(tr(),Le(Kr)),Bee=tQe();ME.ANONYMOUS_NAME="anonymous";var Oee=class extends vG.InstrumentationBase{constructor(t={}){super(rQe.PACKAGE_NAME,rQe.PACKAGE_VERSION,t)}init(){return[new vG.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,vG.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,vG.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=ZR.ConnectTypes.REQUEST_HANDLER,i=ZR.ConnectNames.REQUEST_HANDLER,o=t):(r=ZR.ConnectTypes.MIDDLEWARE,i=ZR.ConnectNames.MIDDLEWARE,o=n.name||ME.ANONYMOUS_NAME);let s=`${i} - ${o}`,u={attributes:{[eOt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[ZR.AttributeNames.CONNECT_TYPE]:r,[ZR.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(s,u)}_patchMiddleware(t,n){let r=this,o=n.length===4;function i(){if(!r.isEnabled())return n.apply(this,arguments);let[s,u,l]=o?[1,2,3]:[0,1,2],f=arguments[s],h=arguments[u],_=arguments[l];(0,Bee.replaceCurrentStackRoute)(f,t);let E=(0,nQe.getRPCMetadata)(XBt.context.active());t&&E?.type===nQe.RPCType.HTTP&&(E.route=(0,Bee.generateRoute)(f));let T="";t?T=`request handler - ${t}`:T=`middleware - ${n.name||ME.ANONYMOUS_NAME}`;let v=r._startSpan(t,n);r._diag.debug("start span",T);let R=!1;function x(){R?r._diag.debug(`span ${v.name} - already finished`):(R=!0,r._diag.debug(`finishing span ${v.name}`),v.end()),h.removeListener("close",x)}return h.addListener("close",x),arguments[l]=r._patchNext(_,x),n.apply(this,arguments)}return Object.defineProperty(i,"length",{value:n.length,writable:!1,configurable:!0}),i}_patchUse(t){let n=this;return function(...r){let o=r[r.length-1],i=r[r.length-2]||"";return r[r.length-1]=n._patchMiddleware(i,o),t.apply(this,r)}}_patchHandle(t){let n=this;return function(){let[r,o]=[0,2],i=arguments[r],s=arguments[o],u=(0,Bee.addNewStackLayer)(i);return typeof s=="function"&&(arguments[o]=n._patchOut(s,u)),t.apply(this,arguments)}}_patchOut(t,n){return function(...o){return n(),Reflect.apply(t,this,o)}}};ME.ConnectInstrumentation=Oee});var sQe=M(gp=>{"use strict";m();Object.defineProperty(gp,"__esModule",{value:!0});gp.ConnectTypes=gp.ConnectNames=gp.AttributeNames=gp.ANONYMOUS_NAME=gp.ConnectInstrumentation=void 0;var iQe=oQe();Object.defineProperty(gp,"ConnectInstrumentation",{enumerable:!0,get:function(){return iQe.ConnectInstrumentation}});Object.defineProperty(gp,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return iQe.ANONYMOUS_NAME}});var Pee=kee();Object.defineProperty(gp,"AttributeNames",{enumerable:!0,get:function(){return Pee.AttributeNames}});Object.defineProperty(gp,"ConnectNames",{enumerable:!0,get:function(){return Pee.ConnectNames}});Object.defineProperty(gp,"ConnectTypes",{enumerable:!0,get:function(){return Pee.ConnectTypes}})});var aQe,uQe,cQe,tOt,lQe,dQe=k(()=>{m();aQe=ue(sQe(),1);yr();uQe="Connect",cQe=ct(uQe,()=>new aQe.ConnectInstrumentation),tOt=(()=>({name:uQe,setupOnce(){cQe()}})),lQe=tOt});var pQe=M(pa=>{"use strict";m();Object.defineProperty(pa,"__esModule",{value:!0});pa.DB_SYSTEM_VALUE_MSSQL=pa.ATTR_NET_PEER_PORT=pa.ATTR_NET_PEER_NAME=pa.ATTR_DB_USER=pa.ATTR_DB_SYSTEM=pa.ATTR_DB_STATEMENT=pa.ATTR_DB_SQL_TABLE=pa.ATTR_DB_NAME=void 0;pa.ATTR_DB_NAME="db.name";pa.ATTR_DB_SQL_TABLE="db.sql.table";pa.ATTR_DB_STATEMENT="db.statement";pa.ATTR_DB_SYSTEM="db.system";pa.ATTR_DB_USER="db.user";pa.ATTR_NET_PEER_NAME="net.peer.name";pa.ATTR_NET_PEER_PORT="net.peer.port";pa.DB_SYSTEM_VALUE_MSSQL="mssql"});var fQe=M(WR=>{"use strict";m();Object.defineProperty(WR,"__esModule",{value:!0});WR.once=WR.getSpanName=void 0;function nOt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}WR.getSpanName=nOt;var rOt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};WR.once=rOt});var mQe=M(XR=>{"use strict";m();Object.defineProperty(XR,"__esModule",{value:!0});XR.PACKAGE_NAME=XR.PACKAGE_VERSION=void 0;XR.PACKAGE_VERSION="0.33.0";XR.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var EQe=M(UE=>{"use strict";m();Object.defineProperty(UE,"__esModule",{value:!0});UE.TediousInstrumentation=UE.INJECTED_CTX=void 0;var ex=($e(),Le(nt)),oOt=Fe("events"),iA=ln(),uT=(tr(),Le(Kr)),LE=pQe(),AQe=fQe(),gQe=mQe(),_Qe=Symbol("opentelemetry.instrumentation-tedious.current-database");UE.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var hQe=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function RG(e){Object.defineProperty(this,_Qe,{value:e,writable:!0})}var Mee=class e extends iA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(gQe.PACKAGE_NAME,gQe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,iA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,iA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new iA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of hQe)(0,iA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,iA.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 hQe)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return RG.call(this,this.config?.options?.database),this.removeListener("databaseChange",RG),this.on("databaseChange",RG),this.once("end",()=>{this.removeListener("databaseChange",RG)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||ex.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,UE.INJECTED_CTX,{value:!0});let u=Buffer.from(r,"utf8");s.addParameter("opentelemetry_traceparent",n.TYPES.VarBinary,u,{length:u.length}),t.execSql(s)}catch{o()}})}_shouldInjectFor(t){return t==="execSql"||t==="execSqlBatch"||t==="callProcedure"||t==="execute"}_patchQuery(t,n){return r=>{let o=this;function i(s){if(s?.[UE.INJECTED_CTX])return r.apply(this,arguments);if(!(s instanceof oOt.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let u=0,l=0,f=()=>l++,h=()=>u++,_=this[_Qe],E=(j=>j.sqlTextOrProcedure==="sp_prepare"&&j.parametersByName?.stmt?.value?j.parametersByName.stmt.value:j.sqlTextOrProcedure)(s),T={};o._dbSemconvStability&iA.SemconvStability.OLD&&(T[LE.ATTR_DB_SYSTEM]=LE.DB_SYSTEM_VALUE_MSSQL,T[LE.ATTR_DB_NAME]=_,T[LE.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,T[LE.ATTR_DB_STATEMENT]=E,T[LE.ATTR_DB_SQL_TABLE]=s.table),o._dbSemconvStability&iA.SemconvStability.STABLE&&(T[uT.ATTR_DB_NAMESPACE]=_,T[uT.ATTR_DB_SYSTEM_NAME]=uT.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,T[uT.ATTR_DB_QUERY_TEXT]=E,T[uT.ATTR_DB_COLLECTION_NAME]=s.table),o._netSemconvStability&iA.SemconvStability.OLD&&(T[LE.ATTR_NET_PEER_NAME]=this.config?.server,T[LE.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&iA.SemconvStability.STABLE&&(T[uT.ATTR_SERVER_ADDRESS]=this.config?.server,T[uT.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,AQe.getSpanName)(t,_,E,s.table),{kind:ex.SpanKind.CLIENT,attributes:T}),R=(0,AQe.once)(j=>{s.removeListener("done",f),s.removeListener("doneInProc",f),s.removeListener("doneProc",h),s.removeListener("error",R),this.removeListener("end",R),v.setAttribute("tedious.procedure_count",u),v.setAttribute("tedious.statement_count",l),j&&v.setStatus({code:ex.SpanStatusCode.ERROR,message:j.message}),v.end()});s.on("done",f),s.on("doneInProc",f),s.on("doneProc",h),s.once("error",R),this.on("end",R),typeof s.callback=="function"?o._wrap(s,"callback",o._patchCallbackQuery(R)):o._diag.error("Expected request.callback to be a function");let x=()=>ex.context.with(ex.trace.setSpan(ex.context.active(),v),r,this,...arguments);if(!(o.getConfig().enableTraceContextPropagation&&o._shouldInjectFor(t)))return x();let G=o._buildTraceparent(v);o._injectContextInfo(this,n,G).finally(x)}return Object.defineProperty(i,"length",{value:r.length,writable:!1}),i}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r),n.apply(this,arguments)}}};UE.TediousInstrumentation=Mee});var yQe=M(xG=>{"use strict";m();Object.defineProperty(xG,"__esModule",{value:!0});xG.TediousInstrumentation=void 0;var iOt=EQe();Object.defineProperty(xG,"TediousInstrumentation",{enumerable:!0,get:function(){return iOt.TediousInstrumentation}})});var SQe,sOt,TQe,bQe,aOt,IQe,CQe=k(()=>{m();SQe=ue(yQe(),1);mt();yr();sOt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),TQe="Tedious",bQe=ct(TQe,()=>new SQe.TediousInstrumentation({})),aOt=(()=>{let e;return{name:TQe,setupOnce(){let t=bQe();e=Pk(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=Lt(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";sOt.has(i)&&n.setAttribute(Ut,"auto.db.otel.tedious")}))}}}),IQe=aOt});var vQe=M(tx=>{"use strict";m();Object.defineProperty(tx,"__esModule",{value:!0});tx.PACKAGE_NAME=tx.PACKAGE_VERSION=void 0;tx.PACKAGE_VERSION="0.57.0";tx.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var xQe=M(DG=>{"use strict";m();Object.defineProperty(DG,"__esModule",{value:!0});DG.GenericPoolInstrumentation=void 0;var nx=($e(),Le(nt)),cT=ln(),RQe=vQe(),Lee="generic-pool",Uee=class extends cT.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(RQe.PACKAGE_NAME,RQe.PACKAGE_VERSION,t)}init(){return[new cT.InstrumentationNodeModuleDefinition(Lee,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,cT.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 cT.InstrumentationNodeModuleDefinition(Lee,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,cT.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 cT.InstrumentationNodeModuleDefinition(Lee,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,cT.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=nx.context.active(),s=n.tracer.startSpan("generic-pool.acquire",{},i);return nx.context.with(nx.trace.setSpan(i,s),()=>t.call(this,...o).then(u=>(s.end(),u),u=>{throw s.recordException(u),s.end(),u}))}}_poolWrapper(t){let n=this;return function(){let o=t.apply(this,arguments);return n._wrap(o,"acquire",n._acquireWithCallbacksPatcher.bind(n)),o}}_acquireWithCallbacksPatcher(t){let n=this;return function(o,i){if(n._isDisabled)return t.call(this,o,i);let s=nx.context.active(),u=n.tracer.startSpan("generic-pool.acquire",{},s);return nx.context.with(nx.trace.setSpan(s,u),()=>{t.call(this,(l,f)=>{if(u.end(),o)return o(l,f)},i)})}}};DG.GenericPoolInstrumentation=Uee});var DQe=M(NG=>{"use strict";m();Object.defineProperty(NG,"__esModule",{value:!0});NG.GenericPoolInstrumentation=void 0;var uOt=xQe();Object.defineProperty(NG,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return uOt.GenericPoolInstrumentation}})});var NQe,wQe,kQe,cOt,BQe,OQe=k(()=>{m();NQe=ue(DQe(),1);mt();yr();wQe="GenericPool",kQe=ct(wQe,()=>new NQe.GenericPoolInstrumentation({})),cOt=(()=>{let e;return{name:wQe,setupOnce(){let t=kQe();e=Pk(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=Lt(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(Ut,"auto.db.otel.generic_pool")}))}}}),BQe=cOt});var Qee=M(sA=>{"use strict";m();Object.defineProperty(sA,"__esModule",{value:!0});sA.ATTR_NET_PEER_PORT=sA.ATTR_NET_PEER_NAME=sA.ATTR_MESSAGING_SYSTEM=sA.ATTR_MESSAGING_OPERATION=void 0;sA.ATTR_MESSAGING_OPERATION="messaging.operation";sA.ATTR_MESSAGING_SYSTEM="messaging.system";sA.ATTR_NET_PEER_NAME="net.peer.name";sA.ATTR_NET_PEER_PORT="net.peer.port"});var Fee=M(Ti=>{"use strict";m();Object.defineProperty(Ti,"__esModule",{value:!0});Ti.ATTR_MESSAGING_CONVERSATION_ID=Ti.OLD_ATTR_MESSAGING_MESSAGE_ID=Ti.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=Ti.ATTR_MESSAGING_URL=Ti.ATTR_MESSAGING_PROTOCOL_VERSION=Ti.ATTR_MESSAGING_PROTOCOL=Ti.MESSAGING_OPERATION_VALUE_PROCESS=Ti.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=Ti.ATTR_MESSAGING_DESTINATION_KIND=Ti.ATTR_MESSAGING_DESTINATION=void 0;Ti.ATTR_MESSAGING_DESTINATION="messaging.destination";Ti.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";Ti.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";Ti.MESSAGING_OPERATION_VALUE_PROCESS="process";Ti.ATTR_MESSAGING_PROTOCOL="messaging.protocol";Ti.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";Ti.ATTR_MESSAGING_URL="messaging.url";Ti.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";Ti.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";Ti.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var Gee=M(lT=>{"use strict";m();Object.defineProperty(lT,"__esModule",{value:!0});lT.DEFAULT_CONFIG=lT.EndOperation=void 0;var lOt;(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"})(lOt=lT.EndOperation||(lT.EndOperation={}));lT.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var UQe=M(bi=>{"use strict";m();Object.defineProperty(bi,"__esModule",{value:!0});bi.isConfirmChannelTracing=bi.unmarkConfirmChannelTracing=bi.markConfirmChannelTracing=bi.getConnectionAttributesFromUrl=bi.getConnectionAttributesFromServer=bi.normalizeExchange=bi.CONNECTION_ATTRIBUTES=bi.CHANNEL_CONSUME_TIMEOUT_TIMER=bi.CHANNEL_SPANS_NOT_ENDED=bi.MESSAGE_STORED_SPAN=void 0;var jee=($e(),Le(nt)),QE=ln(),wG=(tr(),Le(Kr)),XB=Qee(),kG=Fee();bi.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");bi.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");bi.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");bi.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var zee=(0,jee.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),dOt=e=>e!==""?e:"<default>";bi.normalizeExchange=dOt;var pOt=e=>e.replace(/:[^:@/]*@/,":***@"),PQe=(e,t)=>e||(t==="AMQP"?5672:5671),MQe=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},LQe=e=>e||"localhost",aA=(e,t,n,r)=>n?{[t]:n}:(jee.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),fOt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[XB.ATTR_MESSAGING_SYSTEM]:t}:{}};bi.getConnectionAttributesFromServer=fOt;var mOt=(e,t)=>{let n={[kG.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=MQe(r?.protocol);Object.assign(n,{...aA(e,kG.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=LQe(r?.hostname);t&QE.SemconvStability.OLD&&Object.assign(n,{...aA(e,XB.ATTR_NET_PEER_NAME,i,"hostname")}),t&QE.SemconvStability.STABLE&&Object.assign(n,{...aA(e,wG.ATTR_SERVER_ADDRESS,i,"hostname")});let s=PQe(r.port,o);t&QE.SemconvStability.OLD&&Object.assign(n,aA(e,XB.ATTR_NET_PEER_PORT,s,"port")),t&QE.SemconvStability.STABLE&&Object.assign(n,aA(e,wG.ATTR_SERVER_PORT,s,"port"))}else{let r=pOt(e);n[kG.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=MQe(o.protocol);Object.assign(n,{...aA(r,kG.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let s=LQe(o.hostname);t&QE.SemconvStability.OLD&&Object.assign(n,{...aA(r,XB.ATTR_NET_PEER_NAME,s,"hostname")}),t&QE.SemconvStability.STABLE&&Object.assign(n,{...aA(r,wG.ATTR_SERVER_ADDRESS,s,"hostname")});let u=PQe(o.port?parseInt(o.port):void 0,i);t&QE.SemconvStability.OLD&&Object.assign(n,aA(r,XB.ATTR_NET_PEER_PORT,u,"port")),t&QE.SemconvStability.STABLE&&Object.assign(n,aA(r,wG.ATTR_SERVER_PORT,u,"port"))}catch(o){jee.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};bi.getConnectionAttributesFromUrl=mOt;var AOt=e=>e.setValue(zee,!0);bi.markConfirmChannelTracing=AOt;var gOt=e=>e.deleteValue(zee);bi.unmarkConfirmChannelTracing=gOt;var hOt=e=>e.getValue(zee)===!0;bi.isConfirmChannelTracing=hOt});var QQe=M(rx=>{"use strict";m();Object.defineProperty(rx,"__esModule",{value:!0});rx.PACKAGE_NAME=rx.PACKAGE_VERSION=void 0;rx.PACKAGE_VERSION="0.61.0";rx.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var GQe=M(PG=>{"use strict";m();Object.defineProperty(PG,"__esModule",{value:!0});PG.AmqplibInstrumentation=void 0;var ii=($e(),Le(nt)),BG=Rr(),Dr=ln(),_Ot=Qee(),id=Fee(),oc=Gee(),Ii=UQe(),FQe=QQe(),OG=[">=0.5.5 <1"],Hee=class extends Dr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(FQe.PACKAGE_NAME,FQe.PACKAGE_VERSION,{...oc.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Dr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...oc.DEFAULT_CONFIG,...t})}init(){let t=new Dr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",OG,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new Dr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",OG,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new Dr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",OG,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new Dr.InstrumentationNodeModuleDefinition("amqplib",OG,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,Dr.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,Dr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,Dr.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,Dr.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,Dr.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,oc.EndOperation.Ack)),(0,Dr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,oc.EndOperation.Nack)),(0,Dr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,oc.EndOperation.Reject)),(0,Dr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,oc.EndOperation.AckAll)),(0,Dr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,oc.EndOperation.NackAll)),(0,Dr.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,Dr.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,Dr.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,Dr.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,Dr.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,Dr.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,Dr.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,Dr.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,Dr.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,Dr.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,Dr.isWrapped)(t.ConfirmChannel.prototype.publish)&&this._unwrap(t.ConfirmChannel.prototype,"publish"),t}getConnectPatch(t){let n=this;return function(o,i,s){return t.call(this,o,i,function(u,l){if(u==null){let f=(0,Ii.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,Ii.getConnectionAttributesFromServer)(l);l[Ii.CONNECTION_ATTRIBUTES]={...f,...h}}s.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,oc.EndOperation.ChannelClosed,void 0);let i=this[Ii.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[Ii.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,oc.EndOperation.ChannelError,void 0);return t.apply(this,arguments)}}getAckAllPatch(t,n,r){let o=this;return function(s){return o.endAllSpansOnChannel(this,t,n,s),r.apply(this,arguments)}}getAckPatch(t,n,r){let o=this;return function(s,u,l){let f=this,h=n===oc.EndOperation.Reject?u:l,_=f[Ii.CHANNEL_SPANS_NOT_ENDED]??[],E=_.findIndex(T=>T.msg===s);if(E<0)o.endConsumerSpan(s,t,n,h);else if(n!==oc.EndOperation.Reject&&u){for(let T=0;T<=E;T++)o.endConsumerSpan(_[T].msg,t,n,h);_.splice(0,E+1)}else o.endConsumerSpan(s,t,n,h),_.splice(E,1);return r.apply(this,arguments)}}getConsumePatch(t,n){let r=this;return function(i,s,u){let l=this;if(!Object.prototype.hasOwnProperty.call(l,Ii.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let _=setInterval(()=>{r.checkConsumeTimeoutOnChannel(l)},h);_.unref(),l[Ii.CHANNEL_CONSUME_TIMEOUT_TIMER]=_}l[Ii.CHANNEL_SPANS_NOT_ENDED]=[]}let f=function(h){if(!h)return s.call(this,h);let _=h.properties.headers??{},E=ii.propagation.extract(ii.ROOT_CONTEXT,_),T=h.fields?.exchange,v;if(r._config.useLinksForConsume){let P=E?ii.trace.getSpan(E)?.spanContext():void 0;E=void 0,P&&(v=[{context:P}])}let R=r.tracer.startSpan(`${i} process`,{kind:ii.SpanKind.CONSUMER,attributes:{...l?.connection?.[Ii.CONNECTION_ATTRIBUTES],[id.ATTR_MESSAGING_DESTINATION]:T,[id.ATTR_MESSAGING_DESTINATION_KIND]:id.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[id.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[_Ot.ATTR_MESSAGING_OPERATION]:id.MESSAGING_OPERATION_VALUE_PROCESS,[id.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[id.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:v},E),{consumeHook:x}=r.getConfig();x&&(0,Dr.safeExecuteInTheMiddle)(()=>x(R,{moduleVersion:t,msg:h}),P=>{P&&ii.diag.error("amqplib instrumentation: consumerHook error",P)},!0),u?.noAck||(l[Ii.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,BG.hrTime)()}),h[Ii.MESSAGE_STORED_SPAN]=R);let B=E||ii.ROOT_CONTEXT;ii.context.with(ii.trace.setSpan(B,R),()=>{s.call(this,h)}),u?.noAck&&(r.callConsumeEndHook(R,h,!1,oc.EndOperation.AutoAck),R.end())};return arguments[1]=f,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,s,u,l,f){let h=this,{span:_,modifiedOptions:E}=r.createPublishSpan(r,i,s,h,l),{publishHook:T}=r.getConfig();T&&(0,Dr.safeExecuteInTheMiddle)(()=>T(_,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:E,isConfirmChannel:!0}),B=>{B&&ii.diag.error("amqplib instrumentation: publishHook error",B)},!0);let v=function(B,P){try{f?.call(this,B,P)}finally{let{publishConfirmHook:G}=r.getConfig();G&&(0,Dr.safeExecuteInTheMiddle)(()=>G(_,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:l,isConfirmChannel:!0,confirmError:B}),j=>{j&&ii.diag.error("amqplib instrumentation: publishConfirmHook error",j)},!0),B&&_.setStatus({code:ii.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),_.end()}},R=(0,Ii.markConfirmChannelTracing)(ii.context.active()),x=[...arguments];return x[3]=E,x[4]=ii.context.bind((0,Ii.unmarkConfirmChannelTracing)(ii.trace.setSpan(R,_)),v),ii.context.with(R,n.bind(this,...x))}}getPublishPatch(t,n){let r=this;return function(i,s,u,l){if((0,Ii.isConfirmChannelTracing)(ii.context.active()))return n.apply(this,arguments);{let f=this,{span:h,modifiedOptions:_}=r.createPublishSpan(r,i,s,f,l),{publishHook:E}=r.getConfig();E&&(0,Dr.safeExecuteInTheMiddle)(()=>E(h,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:_,isConfirmChannel:!1}),R=>{R&&ii.diag.error("amqplib instrumentation: publishHook error",R)},!0);let T=[...arguments];T[3]=_;let v=n.apply(this,T);return h.end(),v}}}createPublishSpan(t,n,r,o,i){let s=(0,Ii.normalizeExchange)(n),u=t.tracer.startSpan(`publish ${s}`,{kind:ii.SpanKind.PRODUCER,attributes:{...o.connection[Ii.CONNECTION_ATTRIBUTES],[id.ATTR_MESSAGING_DESTINATION]:n,[id.ATTR_MESSAGING_DESTINATION_KIND]:id.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[id.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[id.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[id.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),l=i??{};return l.headers=l.headers??{},ii.propagation.inject(ii.trace.setSpan(ii.context.active(),u),l.headers),{span:u,modifiedOptions:l}}endConsumerSpan(t,n,r,o){let i=t[Ii.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:ii.SpanStatusCode.ERROR,message:r!==oc.EndOperation.ChannelClosed&&r!==oc.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[Ii.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[Ii.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(s=>{this.endConsumerSpan(s.msg,n,r,o)}),t[Ii.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,r,o){let{consumeEndHook:i}=this.getConfig();i&&(0,Dr.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),s=>{s&&ii.diag.error("amqplib instrumentation: consumerEndHook error",s)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,BG.hrTime)(),r=t[Ii.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let s=r[o],u=(0,BG.hrTimeDuration)(s.timeOfConsume,n);if((0,BG.hrTimeToMilliseconds)(u)<i)break;this.endConsumerSpan(s.msg,null,oc.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};PG.AmqplibInstrumentation=Hee});var zQe=M(FE=>{"use strict";m();Object.defineProperty(FE,"__esModule",{value:!0});FE.EndOperation=FE.DEFAULT_CONFIG=FE.AmqplibInstrumentation=void 0;var EOt=GQe();Object.defineProperty(FE,"AmqplibInstrumentation",{enumerable:!0,get:function(){return EOt.AmqplibInstrumentation}});var jQe=Gee();Object.defineProperty(FE,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return jQe.DEFAULT_CONFIG}});Object.defineProperty(FE,"EndOperation",{enumerable:!0,get:function(){return jQe.EndOperation}})});var HQe,$Qe,yOt,qQe,SOt,VQe,KQe=k(()=>{m();HQe=ue(zQe(),1);yr();$Qe="Amqplib",yOt={consumeEndHook:e=>{Jr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Jr(e,"auto.amqplib.otel.publisher")}},qQe=ct($Qe,()=>new HQe.AmqplibInstrumentation(yOt)),SOt=(()=>({name:$Qe,setupOnce(){qQe()}})),VQe=SOt});var eO,$ee=k(()=>{m();eO="VercelAI"});function bOt(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 IOt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(COt(t.content),vOt(t.content))}function COt(e){for(let t of e){if(!bOt(t))continue;let n=SJ(t.toolCallId);n?Vl(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"),cn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):Vl(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),cn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function vOt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&TJ(t.toolCallId)}function ROt(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 LG,TOt,YQe,MG,JQe=k(()=>{m();LG=ue(ln(),1);mt();$ee();TOt=[">=3.0.0 <7"],YQe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];MG=class e extends LG.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",nr,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new LG.InstrumentationNodeModuleDefinition("ai",TOt,this._patch.bind(this))}callWhenPatched(t){this._isPatched?t():this._callbacks.push(t)}_patch(t){this._isPatched=!0,this._callbacks.forEach(r=>r()),this._callbacks=[];let n=r=>new Proxy(r,{apply:(o,i,s)=>{let u=s[0].experimental_telemetry||{},l=u.isEnabled,f=yt(),h=f?.getIntegrationByName(eO),_=h?.options,E=h?!!f?.getOptions().sendDefaultPii:!1,{recordInputs:T,recordOutputs:v}=ROt(_,u,l,E);return s[0].experimental_telemetry={...u,isEnabled:l!==void 0?l:!0,recordInputs:T,recordOutputs:v},Cf(()=>Reflect.apply(o,i,s),R=>{R&&typeof R=="object"&&is(R,"_sentry_active_span",$c())},()=>{},R=>{IOt(R)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of YQe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=YQe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function xOt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var ZQe,DOt,WQe,XQe=k(()=>{m();mt();yr();$ee();JQe();ZQe=ct(eO,()=>new MG({}));DOt=((e={})=>{let t;return{name:eO,options:e,setupOnce(){t=ZQe()},afterAllSetup(n){e.force??xOt(n)?jF(n):t?.callWhenPatched(()=>jF(n))}}}),WQe=DOt});var QG,NOt,UG,eFe=k(()=>{m();QG=ue(ln(),1);mt();NOt=[">=4.0.0 <7"],UG=class extends QG.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",nr,t)}init(){return new QG.InstrumentationNodeModuleDefinition("openai",NOt,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(BS(lE))return Reflect.construct(r,s);let u=Reflect.construct(r,s);return $F(u,o)};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let s of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(s)){let u=Object.getOwnPropertyDescriptor(r,s);u&&Object.defineProperty(i,s,u)}try{t[n]=i}catch{Object.defineProperty(t,n,{value:i,writable:!0,configurable:!0,enumerable:!0})}if(t.default===r)try{t.default=i}catch{Object.defineProperty(t,"default",{value:i,writable:!0,configurable:!0,enumerable:!0})}return t}}});var tFe,wOt,nFe,rFe=k(()=>{m();mt();yr();eFe();tFe=ct(lE,e=>new UG(e)),wOt=((e={})=>({name:lE,setupOnce(){tFe(e)}})),nFe=wOt});var GG,kOt,FG,oFe=k(()=>{m();GG=ue(ln(),1);mt();kOt=[">=0.19.2 <1.0.0"],FG=class extends GG.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",nr,t)}init(){return new GG.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",kOt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(BS(dE))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return qF(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 iFe,BOt,sFe,aFe=k(()=>{m();mt();yr();oFe();iFe=ct(dE,e=>new FG(e)),BOt=((e={})=>({name:dE,options:e,setupOnce(){iFe(e)}})),sFe=BOt});var ox,uFe,jG,cFe=k(()=>{m();ox=ue(ln(),1);mt();uFe=[">=0.10.0 <2"],jG=class extends ox.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",nr,t)}init(){return new ox.InstrumentationNodeModuleDefinition("@google/genai",uFe,n=>this._patch(n),n=>n,[new ox.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",uFe,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(BS(pE))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return VF(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 Bk(t,"GoogleGenAI",o),t}}});var lFe,OOt,dFe,pFe=k(()=>{m();mt();yr();cFe();lFe=ct(pE,e=>new jG(e)),OOt=((e={})=>({name:pE,setupOnce(){lFe(e)}})),dFe=OOt});function POt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function MOt(e,t,n){return new Proxy(e,{apply(r,o,i){let u=i[1];(!u||typeof u!="object"||Array.isArray(u))&&(u={},i[1]=u);let l=u.callbacks,f=POt(l,t);return u.callbacks=f,Reflect.apply(r,o,i)}})}var GE,zG,HG,fFe=k(()=>{m();GE=ue(ln(),1);mt();zG=[">=0.1.0 <2.0.0"];HG=class extends GE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",nr,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 GE.InstrumentationNodeModuleDefinition(r,zG,this._patch.bind(this),o=>o,[new GE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,zG,this._patch.bind(this),o=>o)]));return t.push(new GE.InstrumentationNodeModuleDefinition("langchain",zG,this._patch.bind(this),r=>r,[new GE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",zG,this._patch.bind(this),r=>r)])),t}_patch(t){UY([lE,dE,pE]);let n=ZF(this.getConfig());return this._patchRunnableMethods(t,n),t}_patchRunnableMethods(t,n){let r=["ChatAnthropic","ChatOpenAI","ChatGoogleGenerativeAI","ChatMistralAI","ChatVertexAI","ChatGroq","ConfigurableModel"],o=t.universal_exports??t,i=Object.values(o).find(l=>typeof l=="function"&&r.includes(l.name));if(!i)return;let s=i.prototype;if(s.__sentry_patched__)return;s.__sentry_patched__=!0;let u=["invoke","stream","batch"];for(let l of u){let f=s[l];typeof f=="function"&&(s[l]=MOt(f,n))}}}});var mFe,LOt,AFe,gFe=k(()=>{m();mt();yr();fFe();mFe=ct(KF,e=>new HG(e)),LOt=((e={})=>({name:KF,setupOnce(){mFe(e)}})),AFe=LOt});var ix,hFe,$G,_Fe=k(()=>{m();ix=ue(ln(),1);mt();hFe=[">=0.0.0 <2.0.0"],$G=class extends ix.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",nr,t)}init(){return new ix.InstrumentationNodeModuleDefinition("@langchain/langgraph",hFe,this._patch.bind(this),n=>n,[new ix.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",hFe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&XF(t.StateGraph.prototype,this.getConfig()),t}}});var EFe,UOt,yFe,SFe=k(()=>{m();mt();yr();_Fe();EFe=ct(WF,e=>new $G(e)),UOt=((e={})=>({name:WF,setupOnce(){EFe(e)}})),yFe=UOt});import*as bFe from"node:net";function IFe(e,t,n,r,o){let s=()=>{},u=o.firestoreSpanCreationHook;typeof u=="function"&&(s=h=>{(0,th.safeExecuteInTheMiddle)(()=>u(h),_=>{_&&Hl.error(_?.message)},!0)});let l=new th.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>TFe(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 th.InstrumentationNodeModuleFile(h,t,_=>TFe(_,n,r,e,s),_=>CFe(_,r)));return l}function TFe(e,t,n,r,o){return CFe(e,n),t(e,"addDoc",QOt(r,o)),t(e,"getDocs",GOt(r,o)),t(e,"setDoc",jOt(r,o)),t(e,"deleteDoc",FOt(r,o)),e}function CFe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,th.isWrapped)(e[n])&&t(e,n);return e}function QOt(e,t){return function(r){return function(o,i){let s=VG(e,"addDoc",o);return t(s),qG(s,()=>r(o,i))}}}function FOt(e,t){return function(r){return function(o){let i=VG(e,"deleteDoc",o.parent||o);return t(i),qG(i,()=>r(o))}}}function GOt(e,t){return function(r){return function(o){let i=VG(e,"getDocs",o);return t(i),qG(i,()=>r(o))}}}function jOt(e,t){return function(r){return function(o,i,s){let u=VG(e,"setDoc",o.parent||o);return t(u),qG(u,()=>typeof s<"u"?r(o,i,s):r(o,i))}}}function qG(e,t){return Xe.with(Jt.setSpan(Xe.active(),e),()=>(0,th.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function VG(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:Ao.CLIENT});return HOt(r,n),r.setAttribute($C,t),r}function zOt(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(bFe.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 HOt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},s={[u7]:t.path,[c7]:n.name,[AS]:"firebase.firestore","firebase.firestore.type":t.type,"firebase.firestore.options.projectId":r.projectId,"firebase.firestore.options.appId":r.appId,"firebase.firestore.options.messagingSenderId":r.messagingSenderId,"firebase.firestore.options.storageBucket":r.storageBucket},{address:u,port:l}=zOt(i);u&&(s[h7]=u),l&&(s[_7]=l),e.setAttributes(s)}var th,vFe=k(()=>{m();$e();th=ue(ln(),1);tr()});function RFe(e,t,n,r,o){let i=()=>{},s=()=>{},u=o.functions?.errorHook,l=o.functions?.requestHook,f=o.functions?.responseHook;typeof f=="function"&&(s=(E,T)=>{(0,nh.safeExecuteInTheMiddle)(()=>f(E,T),v=>{v&&Hl.error(v?.message)},!0)}),typeof l=="function"&&(i=E=>{(0,nh.safeExecuteInTheMiddle)(()=>l(E),T=>{T&&Hl.error(T?.message)},!0)});let h=new nh.InstrumentationNodeModuleDefinition("firebase-functions",t);return[{name:"firebase-functions/lib/v2/providers/https.js",triggerType:"function"},{name:"firebase-functions/lib/v2/providers/firestore.js",triggerType:"firestore"},{name:"firebase-functions/lib/v2/providers/scheduler.js",triggerType:"scheduler"},{name:"firebase-functions/lib/v2/storage.js",triggerType:"storage"}].forEach(({name:E,triggerType:T})=>{h.files.push(new nh.InstrumentationNodeModuleFile(E,t,v=>$Ot(v,n,r,e,{requestHook:i,responseHook:s,errorHook:u},T),v=>xFe(v,r)))}),h}function ic(e,t,n){return function(o){return function(...i){let s=typeof i[0]=="function"?i[0]:i[1],u=typeof i[0]=="function"?void 0:i[0];if(!s)return o.call(this,...i);let l=async function(...f){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",_=e.startSpan(`firebase.function.${n}`,{kind:Ao.SERVER}),E={"faas.name":h,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(E["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(E["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),_.setAttributes(E),t?.requestHook?.(_),Xe.with(Jt.setSpan(Xe.active(),_),async()=>{let T,v;try{v=await s.apply(this,f)}catch(R){T=R}if(t?.responseHook?.(_,T),T&&_.recordException(T),_.end(),T)throw await t?.errorHook?.(_,T),T;return v})};return u?o.call(this,u,l):o.call(this,l)}}}function $Ot(e,t,n,r,o,i){switch(xFe(e,n),i){case"function":t(e,"onRequest",ic(r,o,"http.request")),t(e,"onCall",ic(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",ic(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",ic(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",ic(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",ic(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",ic(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",ic(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",ic(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",ic(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",ic(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",ic(r,o,"storage.object.finalized")),t(e,"onObjectArchived",ic(r,o,"storage.object.archived")),t(e,"onObjectDeleted",ic(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",ic(r,o,"storage.object.metadataUpdated"));break}return e}function xFe(e,t){let n=["onSchedule","onRequest","onCall","onObjectFinalized","onObjectArchived","onObjectDeleted","onObjectMetadataUpdated","onDocumentCreated","onDocumentUpdated","onDocumentDeleted","onDocumentWritten","onDocumentCreatedWithAuthContext","onDocumentUpdatedWithAuthContext","onDocumentDeletedWithAuthContext","onDocumentWrittenWithAuthContext"];for(let r of n)(0,nh.isWrapped)(e[r])&&t(e,r);return e}var nh,DFe=k(()=>{m();$e();nh=ue(ln(),1)});var wFe,NFe,qOt,VOt,KG,kFe=k(()=>{m();wFe=ue(ln(),1);mt();vFe();DFe();NFe={},qOt=[">=3.0.0 <5"],VOt=[">=6.0.0 <7"],KG=class extends wFe.InstrumentationBase{constructor(t=NFe){super("@sentry/instrumentation-firebase",nr,t)}setConfig(t={}){super.setConfig({...NFe,...t})}init(){let t=[];return t.push(IFe(this.tracer,qOt,this._wrap,this._unwrap,this.getConfig())),t.push(RFe(this.tracer,VOt,this._wrap,this._unwrap,this.getConfig())),t}}});var BFe,KOt,OFe,YOt,PFe,MFe=k(()=>{m();mt();yr();kFe();BFe="Firebase",KOt={firestoreSpanCreationHook:e=>{Jr(e,"auto.firebase.otel.firestore"),e.setAttribute(on,"db.query")},functions:{requestHook:e=>{Jr(e,"auto.firebase.otel.functions"),e.setAttribute(on,"http.request")},errorHook:async(e,t)=>{t&&(cn(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await Dv(2e3))}}},OFe=ct(BFe,()=>new KG(KOt)),YOt=(()=>({name:BFe,setupOnce(){OFe()}})),PFe=YOt});function LFe(){return[FBe(),yPe(),VPe(),PUe(),OMe(),YMe(),a2e(),E2e(),Z2e(),_Le(),gUe(),NUe(),ZUe(),lQe(),IQe(),BQe(),lMe(),VQe(),SMe(),AFe(),yFe(),WQe(),nFe(),sFe(),dFe(),TLe(),PFe()]}var UFe=k(()=>{m();KQe();aFe();dQe();GBe();bPe();MFe();OQe();pFe();YPe();wUe();MUe();dMe();WUe();gFe();SFe();TMe();PMe();JMe();u2e();y2e();rFe();ELe();bLe();hUe();W2e();CQe();XQe()});function FFe(e,t={}){e.getOptions().debug&&XZ();let[n,r]=JOt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function JOt(e,t={}){let n=new QFe.BasicTracerProvider({sampler:new i3(e),resource:(0,YG.defaultResource)().merge((0,YG.resourceFromAttributes)({[E7]:"node",[a7]:"sentry",[y7]:nr})),forceFlushTimeoutMillis:500,spanProcessors:[new o3({timeout:ZOt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});Jt.setGlobalTracerProvider(n),Af.setGlobalPropagator(new r3);let r=new a3;return Xe.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function ZOt(e){if(e!=null){if(e>qee)return ks&&W.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${qee}`),qee;if(e<=0||Number.isNaN(e)){ks&&W.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var YG,QFe,qee,GFe=k(()=>{m();$e();YG=ue(pZ(),1),QFe=ue(UZ(),1);tr();mt();yr();aR();JS();qee=1e6});function jFe(){return m3().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(gBe(),CBe())}function zFe(e){return[...jFe(),...Fi(e)?LFe():[]]}function Vee(e={}){return WOt(e,zFe)}function WOt(e={},t){OS(e,"node");let n=CW({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(FFe(n,{spanProcessors:e.openTelemetrySpanProcessors}),A3()),n}var HFe=k(()=>{m();mt();yr();hBe();vBe();UFe();GFe()});var sx=k(()=>{m();HFe();mt();yr()});function Hr(){return XOt}function hu(){return $Fe}function qFe(){return ePt}var XOt,$Fe,ePt,sc=k(()=>{"use strict";m();XOt="prod",$Fe="0.1.249",ePt=`@loredotlink/cli/${$Fe}`});function iPt(e=""){if(!rPt.test(e))return e!==e.toLowerCase()}function KFe(e,t){let n=t??oPt,r=[];if(!e||typeof e!="string")return r;let o="",i,s;for(let u of e){let l=n.includes(u);if(l===!0){r.push(o),o="",i=void 0;continue}let f=iPt(u);if(s===!1){if(i===!1&&f===!0){r.push(o),o=u,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+u,i=f;continue}}o+=u,i=f,s=l}return r.push(o),r}function sPt(e){return e?e[0].toUpperCase()+e.slice(1):""}function aPt(e){return e?e[0].toLowerCase()+e.slice(1):""}function uPt(e,t){return e?(Array.isArray(e)?e:KFe(e)).map(n=>sPt(t?.normalize?n.toLowerCase():n)).join(""):""}function nO(e,t){return aPt(uPt(e||"",t))}function JG(e,t){return e?(Array.isArray(e)?e:KFe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function YFe(e){return JG(e||"","_")}var rPt,oPt,JFe=k(()=>{m();rPt=/\d/,oPt=["-","_","/","."]});import{parseArgs as cPt}from"node:util";function ej(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function Yee(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 vX(e,t,n,r=void 0){n&&(0,vB.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&MMe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function _Nt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(vX(t,o,n,r),o)).catch(o=>{throw LMe(t,o),o}).finally(()=>t.end()):(vX(t,e,n,r),t.end(),e)}TE.handlePromiseResponse=_Nt;function ENt(e,t,n,r,o,i,s=void 0){let u=0;return o.length===2?u=1:o.length===3&&(u=2),o[u]=(l,f)=>(l?LMe(r,l):vX(r,f,i,s),r.end(),e(l,f)),t.apply(n,o)}TE.handleCallbackResponse=ENt});var QMe=M(DR=>{"use strict";m();Object.defineProperty(DR,"__esModule",{value:!0});DR.PACKAGE_NAME=DR.PACKAGE_VERSION=void 0;DR.PACKAGE_VERSION="0.60.0";DR.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var HMe=M(Zc=>{"use strict";m();Object.defineProperty(Zc,"__esModule",{value:!0});Zc.MongooseInstrumentation=Zc._ALREADY_INSTRUMENTED=Zc._STORED_PARENT_SPAN=void 0;var Os=($e(),Le(nt)),yNt=Rr(),RX=UMe(),Qa=ln(),FMe=QMe(),bE=CX(),rT=(tr(),Le(Kr)),S6=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],SNt=["remove","count","findOneAndRemove",...S6],TNt=["count","findOneAndRemove",...S6],bNt=[...S6];function GMe(e){return e?e.startsWith("6.")||e.startsWith("5.")?SNt:e.startsWith("7.")?TNt:bNt:S6}function jMe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function zMe(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Zc._STORED_PARENT_SPAN=Symbol("stored-parent-span");Zc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var xX=class extends Qa.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(FMe.PACKAGE_NAME,FMe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Qa.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Qa.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Qa.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,jMe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),zMe(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)),GMe(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=GMe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,jMe(n)&&this._unwrap(r.Model.prototype,"remove"),zMe(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&&Os.trace.getSpan(Os.context.active())===void 0)return r.apply(this,arguments);let s=this[Zc._STORED_PARENT_SPAN],u={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&Qa.SemconvStability.OLD&&(u[bE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Qa.SemconvStability.STABLE&&(u[rT.ATTR_DB_QUERY_TEXT]=h)}let f=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",u,s);return n._handleResponse(f,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[Zc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&Os.trace.getSpan(Os.context.active())===void 0)return r.apply(this,arguments);let s=this[Zc._STORED_PARENT_SPAN],u={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l(this.op,{condition:this.getFilter?.()??this._conditions,updates:this._update,options:this.getOptions?.()??this.options,fields:this._fields});n._dbSemconvStability&Qa.SemconvStability.OLD&&(u[bE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Qa.SemconvStability.STABLE&&(u[rT.ATTR_DB_QUERY_TEXT]=h)}let f=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,u,s);return n._handleResponse(f,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(s,u){if(r.getConfig().requireParentSpan&&Os.trace.getSpan(Os.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 E=h(t,l);r._dbSemconvStability&Qa.SemconvStability.OLD&&(f[bE.ATTR_DB_STATEMENT]=E),r._dbSemconvStability&Qa.SemconvStability.STABLE&&(f[rT.ATTR_DB_QUERY_TEXT]=E)}let _=r._startSpan(this.constructor.collection,this.constructor.modelName,t,f);return s instanceof Function&&(u=s,s=void 0),r._handleResponse(_,o,this,arguments,u,n)}}_patchDocumentUpdateMethods(t,n){let r=this;return o=>function(s,u,l){if(r.getConfig().requireParentSpan&&Os.trace.getSpan(Os.context.active())===void 0)return o.apply(this,arguments);let f=l,h=s,_=u;typeof s=="function"?(f=s,h=void 0,_=void 0):typeof u=="function"&&(f=u,_=void 0);let E={},T=r.getConfig().dbStatementSerializer;if(T){let x=T(t,{condition:{_id:this._id},updates:h,options:_});r._dbSemconvStability&Qa.SemconvStability.OLD&&(E[bE.ATTR_DB_STATEMENT]=x),r._dbSemconvStability&Qa.SemconvStability.STABLE&&(E[rT.ATTR_DB_QUERY_TEXT]=x)}let v=r._startSpan(this.constructor.collection,this.constructor.modelName,t,E),R=r._handleResponse(v,o,this,arguments,f,n);return R&&typeof R=="object"&&(R[Zc._ALREADY_INSTRUMENTED]=!0),R}}patchModelStatic(t,n){let r=this;return o=>function(s,u,l){if(r.getConfig().requireParentSpan&&Os.trace.getSpan(Os.context.active())===void 0)return o.apply(this,arguments);typeof u=="function"&&(l=u,u=void 0);let f={};switch(t){case"insertMany":f.documents=s;break;case"bulkWrite":f.operations=s;break;default:f.document=s;break}u!==void 0&&(f.options=u);let h={},{dbStatementSerializer:_}=r.getConfig();if(_){let T=_(t,f);r._dbSemconvStability&Qa.SemconvStability.OLD&&(h[bE.ATTR_DB_STATEMENT]=T),r._dbSemconvStability&Qa.SemconvStability.STABLE&&(h[rT.ATTR_DB_QUERY_TEXT]=T)}let E=r._startSpan(this.collection,this.modelName,t,h);return r._handleResponse(E,o,this,arguments,l,n)}}patchModelAggregate(){let t=this;return n=>function(){let o=Os.trace.getSpan(Os.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Zc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Zc._STORED_PARENT_SPAN]=Os.trace.getSpan(Os.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let s={...o,...(0,RX.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&Qa.SemconvStability.OLD&&(s[bE.ATTR_DB_OPERATION]=r,s[bE.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&Qa.SemconvStability.STABLE&&(s[rT.ATTR_DB_OPERATION_NAME]=r,s[rT.ATTR_DB_SYSTEM_NAME]=bE.DB_SYSTEM_NAME_VALUE_MONGODB);let u=this._dbSemconvStability&Qa.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(u,{kind:Os.SpanKind.CLIENT,attributes:s},i?Os.trace.setSpan(Os.context.active(),i):void 0)}_handleResponse(t,n,r,o,i,s=void 0){let u=this;if(i instanceof Function)return u._callOriginalFunction(()=>(0,RX.handleCallbackResponse)(i,n,r,t,o,u.getConfig().responseHook,s));{let l=u._callOriginalFunction(()=>n.apply(r,o));return(0,RX.handlePromiseResponse)(l,t,u.getConfig().responseHook,s)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?Os.context.with((0,yNt.suppressTracing)(Os.context.active()),t):t()}};Zc.MongooseInstrumentation=xX});var $Me=M(T6=>{"use strict";m();Object.defineProperty(T6,"__esModule",{value:!0});T6.MongooseInstrumentation=void 0;var INt=HMe();Object.defineProperty(T6,"MongooseInstrumentation",{enumerable:!0,get:function(){return INt.MongooseInstrumentation}})});var qMe,VMe,KMe,CNt,YMe,JMe=k(()=>{m();qMe=ue($Me(),1);yr();VMe="Mongoose",KMe=ct(VMe,()=>new qMe.MongooseInstrumentation({responseHook(e){Jr(e,"auto.db.otel.mongoose")}})),CNt=(()=>({name:VMe,setupOnce(){KMe()}})),YMe=CNt});var ZMe=M(ds=>{"use strict";m();Object.defineProperty(ds,"__esModule",{value:!0});ds.METRIC_DB_CLIENT_CONNECTIONS_USAGE=ds.DB_SYSTEM_VALUE_MYSQL=ds.ATTR_NET_PEER_PORT=ds.ATTR_NET_PEER_NAME=ds.ATTR_DB_USER=ds.ATTR_DB_SYSTEM=ds.ATTR_DB_STATEMENT=ds.ATTR_DB_NAME=ds.ATTR_DB_CONNECTION_STRING=void 0;ds.ATTR_DB_CONNECTION_STRING="db.connection_string";ds.ATTR_DB_NAME="db.name";ds.ATTR_DB_STATEMENT="db.statement";ds.ATTR_DB_SYSTEM="db.system";ds.ATTR_DB_USER="db.user";ds.ATTR_NET_PEER_NAME="net.peer.name";ds.ATTR_NET_PEER_PORT="net.peer.port";ds.DB_SYSTEM_VALUE_MYSQL="mysql";ds.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var WMe=M(RB=>{"use strict";m();Object.defineProperty(RB,"__esModule",{value:!0});RB.AttributeNames=void 0;var vNt;(function(e){e.MYSQL_VALUES="db.mysql.values"})(vNt=RB.AttributeNames||(RB.AttributeNames={}))});var XMe=M(mu=>{"use strict";m();Object.defineProperty(mu,"__esModule",{value:!0});mu.getPoolNameOld=mu.arrayStringifyHelper=mu.getSpanName=mu.getDbValues=mu.getDbQueryText=mu.getJDBCString=mu.getConfig=void 0;function RNt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}mu.getConfig=RNt;function xNt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}mu.getJDBCString=xNt;function DNt(e){return typeof e=="string"?e:e.sql}mu.getDbQueryText=DNt;function NNt(e,t){return DX(typeof e=="string"?t:t||e.values)}mu.getDbValues=NNt;function wNt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}mu.getSpanName=wNt;function DX(e){return e?`[${e.toString()}]`:""}mu.arrayStringifyHelper=DX;function kNt(e){let t=e.config.connectionConfig,n="";return n+=t.host?`host: '${t.host}', `:"",n+=t.port?`port: ${t.port}, `:"",n+=t.database?`database: '${t.database}', `:"",n+=t.user?`user: '${t.user}'`:"",t.user||(n=n.substring(0,n.length-2)),n.trim()}mu.getPoolNameOld=kNt});var e2e=M(NR=>{"use strict";m();Object.defineProperty(NR,"__esModule",{value:!0});NR.PACKAGE_NAME=NR.PACKAGE_VERSION=void 0;NR.PACKAGE_VERSION="0.60.0";NR.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var n2e=M(b6=>{"use strict";m();Object.defineProperty(b6,"__esModule",{value:!0});b6.MySQLInstrumentation=void 0;var Wc=($e(),Le(nt)),dp=ln(),wR=(tr(),Le(Kr)),Xg=ZMe(),BNt=WMe(),oT=XMe(),t2e=e2e(),NX=class extends dp.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(t2e.PACKAGE_NAME,t2e.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,dp.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,dp.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(Xg.METRIC_DB_CLIENT_CONNECTIONS_USAGE,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}_connCountAdd(t,n,r){this._connectionsUsageOld?.add(t,{state:r,name:n})}init(){return[new dp.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,dp.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,dp.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,dp.isWrapped)(t.createPoolCluster)&&this._unwrap(t,"createPoolCluster"),this._wrap(t,"createPoolCluster",this._patchCreatePoolCluster()),t),t=>{t!==void 0&&(this._unwrap(t,"createConnection"),this._unwrap(t,"createPool"),this._unwrap(t,"createPoolCluster"))})]}_patchCreateConnection(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),i}}}_patchCreatePool(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"end",n._patchPoolEnd(i)),n._setPoolCallbacks(i,""),i}}}_patchPoolEnd(t){return n=>{let r=this;return function(i){let s=t._allConnections.length,u=t._freeConnections.length,l=s-u,f=(0,oT.getPoolNameOld)(t);r._connCountAdd(-l,f,"used"),r._connCountAdd(-u,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 u=t._nodes;if(u){let l=typeof i=="object"?"CLUSTER::"+t._lastId:String(i),f=u[l].pool;r._setPoolCallbacks(f,i)}}}}_patchGetConnection(t){return n=>{let r=this;return function(i,s,u){if(!r._enabled)return r._unwrap(t,"getConnection"),n.apply(t,arguments);if(arguments.length===1&&typeof i=="function"){let l=r._getConnectionCallbackPatchFn(i);return n.call(t,l)}if(arguments.length===2&&typeof s=="function"){let l=r._getConnectionCallbackPatchFn(s);return n.call(t,i,l)}if(arguments.length===3&&typeof u=="function"){let l=r._getConnectionCallbackPatchFn(u);return n.call(t,i,s,l)}return n.apply(t,arguments)}}}_getConnectionCallbackPatchFn(t){let n=this,r=Wc.context.active();return function(o,i){i&&((0,dp.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&Wc.context.with(r,t,this,o,i)}}_patchQuery(t){return n=>{let r=this;return function(o,i,s){if(!r._enabled)return r._unwrap(t,"query"),n.apply(t,arguments);let u={},{host:l,port:f,database:h,user:_}=(0,oT.getConfig)(t.config),E=parseInt(f,10),T=(0,oT.getDbQueryText)(o);r._dbSemconvStability&dp.SemconvStability.OLD&&(u[Xg.ATTR_DB_SYSTEM]=Xg.DB_SYSTEM_VALUE_MYSQL,u[Xg.ATTR_DB_CONNECTION_STRING]=(0,oT.getJDBCString)(l,f,h),u[Xg.ATTR_DB_NAME]=h,u[Xg.ATTR_DB_USER]=_,u[Xg.ATTR_DB_STATEMENT]=T),r._dbSemconvStability&dp.SemconvStability.STABLE&&(u[wR.ATTR_DB_SYSTEM_NAME]=wR.DB_SYSTEM_NAME_VALUE_MYSQL,u[wR.ATTR_DB_NAMESPACE]=h,u[wR.ATTR_DB_QUERY_TEXT]=T),r._netSemconvStability&dp.SemconvStability.OLD&&(u[Xg.ATTR_NET_PEER_NAME]=l,isNaN(E)||(u[Xg.ATTR_NET_PEER_PORT]=E)),r._netSemconvStability&dp.SemconvStability.STABLE&&(u[wR.ATTR_SERVER_ADDRESS]=l,isNaN(E)||(u[wR.ATTR_SERVER_PORT]=E));let v=r.tracer.startSpan((0,oT.getSpanName)(o),{kind:Wc.SpanKind.CLIENT,attributes:u});if(r.getConfig().enhancedDatabaseReporting){let B;Array.isArray(i)?B=i:arguments[2]&&(B=[i]),v.setAttribute(BNt.AttributeNames.MYSQL_VALUES,(0,oT.getDbValues)(o,B))}let R=Array.from(arguments).findIndex(B=>typeof B=="function"),x=Wc.context.active();if(R===-1){let B=Wc.context.with(Wc.trace.setSpan(Wc.context.active(),v),()=>n.apply(t,arguments));return Wc.context.bind(x,B),B.on("error",P=>v.setStatus({code:Wc.SpanStatusCode.ERROR,message:P.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,R,r._patchCallbackQuery(v,x)),Wc.context.with(Wc.trace.setSpan(Wc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,s){return o&&t.setStatus({code:Wc.SpanStatusCode.ERROR,message:o.message}),t.end(),Wc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,oT.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")})}};b6.MySQLInstrumentation=NX});var r2e=M(I6=>{"use strict";m();Object.defineProperty(I6,"__esModule",{value:!0});I6.MySQLInstrumentation=void 0;var ONt=n2e();Object.defineProperty(I6,"MySQLInstrumentation",{enumerable:!0,get:function(){return ONt.MySQLInstrumentation}})});var o2e,i2e,s2e,PNt,a2e,u2e=k(()=>{m();o2e=ue(r2e(),1);yr();i2e="Mysql",s2e=ct(i2e,()=>new o2e.MySQLInstrumentation({})),PNt=(()=>({name:i2e,setupOnce(){s2e()}})),a2e=PNt});var wX=M(la=>{"use strict";m();Object.defineProperty(la,"__esModule",{value:!0});la.DB_SYSTEM_VALUE_MYSQL=la.ATTR_NET_PEER_PORT=la.ATTR_NET_PEER_NAME=la.ATTR_DB_USER=la.ATTR_DB_SYSTEM=la.ATTR_DB_STATEMENT=la.ATTR_DB_NAME=la.ATTR_DB_CONNECTION_STRING=void 0;la.ATTR_DB_CONNECTION_STRING="db.connection_string";la.ATTR_DB_NAME="db.name";la.ATTR_DB_STATEMENT="db.statement";la.ATTR_DB_SYSTEM="db.system";la.ATTR_DB_USER="db.user";la.ATTR_NET_PEER_NAME="net.peer.name";la.ATTR_NET_PEER_PORT="net.peer.port";la.DB_SYSTEM_VALUE_MYSQL="mysql"});var BX=M(C6=>{"use strict";m();Object.defineProperty(C6,"__esModule",{value:!0});C6.addSqlCommenterComment=void 0;var kX=($e(),Le(nt)),MNt=Rr();function LNt(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function UNt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function QNt(e,t){if(typeof t!="string"||t.length===0||LNt(t))return t;let n=new MNt.W3CTraceContextPropagator,r={};n.inject(kX.trace.setSpan(kX.ROOT_CONTEXT,e),r,kX.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(s=>{let u=UNt(r[s]);return`${s}='${u}'`}).join(",");return`${t} /*${i}*/`}C6.addSqlCommenterComment=QNt});var c2e=M(pp=>{"use strict";m();Object.defineProperty(pp,"__esModule",{value:!0});pp.getConnectionPrototypeToInstrument=pp.once=pp.getSpanName=pp.getQueryText=pp.getConnectionAttributes=void 0;var xB=wX(),v6=ln(),OX=(tr(),Le(Kr));function FNt(e,t,n){let{host:r,port:o,database:i,user:s}=GNt(e),u={};t&v6.SemconvStability.OLD&&(u[xB.ATTR_DB_CONNECTION_STRING]=jNt(r,o,i),u[xB.ATTR_DB_NAME]=i,u[xB.ATTR_DB_USER]=s),t&v6.SemconvStability.STABLE&&(u[OX.ATTR_DB_NAMESPACE]=i);let l=parseInt(o,10);return n&v6.SemconvStability.OLD&&(u[xB.ATTR_NET_PEER_NAME]=r,isNaN(l)||(u[xB.ATTR_NET_PEER_PORT]=l)),n&v6.SemconvStability.STABLE&&(u[OX.ATTR_SERVER_ADDRESS]=r,isNaN(l)||(u[OX.ATTR_SERVER_PORT]=l)),u}pp.getConnectionAttributes=FNt;function GNt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function jNt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function zNt(e,t,n,r=!1,o=HNt){let[i,s]=typeof e=="string"?[e,n]:[e.sql,$Nt(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"}}pp.getQueryText=zNt;function HNt(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function $Nt(e){return"values"in e}function qNt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}pp.getSpanName=qNt;var VNt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};pp.once=VNt;function KNt(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}pp.getConnectionPrototypeToInstrument=KNt});var l2e=M(kR=>{"use strict";m();Object.defineProperty(kR,"__esModule",{value:!0});kR.PACKAGE_NAME=kR.PACKAGE_VERSION=void 0;kR.PACKAGE_VERSION="0.60.0";kR.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var m2e=M(R6=>{"use strict";m();Object.defineProperty(R6,"__esModule",{value:!0});R6.MySQL2Instrumentation=void 0;var d2e=($e(),Le(nt)),Df=ln(),PX=wX(),p2e=BX(),BR=c2e(),f2e=l2e(),MX=(tr(),Le(Kr)),LX=[">=1.4.2 <4"],UX=class extends Df.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(f2e.PACKAGE_NAME,f2e.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Df.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Df.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){let t;function n(i){!t&&i.format&&(t=i.format)}let r=i=>{(0,Df.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,Df.isWrapped)(i.execute)&&this._unwrap(i,"execute"),this._wrap(i,"execute",this._patchQuery(t,!0))},o=i=>{this._unwrap(i,"query"),this._unwrap(i,"execute")};return[new Df.InstrumentationNodeModuleDefinition("mysql2",LX,i=>(n(i),i),()=>{},[new Df.InstrumentationNodeModuleFile("mysql2/promise.js",LX,i=>(n(i),i),()=>{}),new Df.InstrumentationNodeModuleFile("mysql2/lib/connection.js",LX,i=>{let s=(0,BR.getConnectionPrototypeToInstrument)(i);return r(s),i},i=>{if(i===void 0)return;let s=(0,BR.getConnectionPrototypeToInstrument)(i);o(s)})])]}_patchQuery(t,n){return r=>{let o=this;return function(i,s,u){let l;Array.isArray(s)?l=s:arguments[2]&&(l=[s]);let{maskStatement:f,maskStatementHook:h,responseHook:_}=o.getConfig(),E=(0,BR.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),T=(0,BR.getQueryText)(i,t,l,f,h);o._dbSemconvStability&Df.SemconvStability.OLD&&(E[PX.ATTR_DB_SYSTEM]=PX.DB_SYSTEM_VALUE_MYSQL,E[PX.ATTR_DB_STATEMENT]=T),o._dbSemconvStability&Df.SemconvStability.STABLE&&(E[MX.ATTR_DB_SYSTEM_NAME]=MX.DB_SYSTEM_NAME_VALUE_MYSQL,E[MX.ATTR_DB_QUERY_TEXT]=T);let v=o.tracer.startSpan((0,BR.getSpanName)(i),{kind:d2e.SpanKind.CLIENT,attributes:E});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,p2e.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,p2e.addSqlCommenterComment)(v,i.sql)}));let R=(0,BR.once)((x,B)=>{x?v.setStatus({code:d2e.SpanStatusCode.ERROR,message:x.message}):typeof _=="function"&&(0,Df.safeExecuteInTheMiddle)(()=>{_(v,{queryResults:B})},P=>{P&&o._diag.warn("Failed executing responseHook",P)},!0),v.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(R));let x=r.apply(this,arguments);return x.once("error",B=>{R(B)}).once("result",B=>{R(void 0,B)}),x}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(R)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(R)),r.apply(this,arguments)}}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r,o),n(...arguments)}}};R6.MySQL2Instrumentation=UX});var A2e=M(x6=>{"use strict";m();Object.defineProperty(x6,"__esModule",{value:!0});x6.MySQL2Instrumentation=void 0;var YNt=m2e();Object.defineProperty(x6,"MySQL2Instrumentation",{enumerable:!0,get:function(){return YNt.MySQL2Instrumentation}})});var g2e,h2e,_2e,JNt,E2e,y2e=k(()=>{m();g2e=ue(A2e(),1);yr();h2e="Mysql2",_2e=ct(h2e,()=>new g2e.MySQL2Instrumentation({responseHook(e){Jr(e,"auto.db.otel.mysql2")}})),JNt=(()=>({name:h2e,setupOnce(){_2e()}})),E2e=JNt});var S2e=M(Au=>{"use strict";m();Object.defineProperty(Au,"__esModule",{value:!0});Au.DB_SYSTEM_VALUE_REDIS=Au.DB_SYSTEM_NAME_VALUE_REDIS=Au.ATTR_NET_PEER_PORT=Au.ATTR_NET_PEER_NAME=Au.ATTR_DB_SYSTEM=Au.ATTR_DB_STATEMENT=Au.ATTR_DB_CONNECTION_STRING=void 0;Au.ATTR_DB_CONNECTION_STRING="db.connection_string";Au.ATTR_DB_STATEMENT="db.statement";Au.ATTR_DB_SYSTEM="db.system";Au.ATTR_NET_PEER_NAME="net.peer.name";Au.ATTR_NET_PEER_PORT="net.peer.port";Au.DB_SYSTEM_NAME_VALUE_REDIS="redis";Au.DB_SYSTEM_VALUE_REDIS="redis"});var T2e=M(D6=>{"use strict";m();Object.defineProperty(D6,"__esModule",{value:!0});D6.endSpan=void 0;var ZNt=($e(),Le(nt)),WNt=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:ZNt.SpanStatusCode.ERROR,message:t.message})),e.end()};D6.endSpan=WNt});var w6=M(N6=>{"use strict";m();Object.defineProperty(N6,"__esModule",{value:!0});N6.defaultDbStatementSerializer=void 0;var XNt=[{regex:/^ECHO/i,args:0},{regex:/^(GETSET|LPUSH|MSET|PFA|PSETEX|PUBLISH|RPUSH|SADD|SET|SPUBLISH|XADD|ZADD)/i,args:1},{regex:/^(HSET|HMSET|LSET|LINSERT)/i,args:2},{regex:/^(ACL|CONFIG)/i,args:1},{regex:/^(BIT|B[LRZ]|CLIENT|CLUSTER|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}],ewt=(e,t)=>{if(Array.isArray(t)&&t.length){let n=XNt.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};N6.defaultDbStatementSerializer=ewt});var b2e=M(OR=>{"use strict";m();Object.defineProperty(OR,"__esModule",{value:!0});OR.PACKAGE_NAME=OR.PACKAGE_VERSION=void 0;OR.PACKAGE_VERSION="0.62.0";OR.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var R2e=M(k6=>{"use strict";m();Object.defineProperty(k6,"__esModule",{value:!0});k6.IORedisInstrumentation=void 0;var IE=($e(),Le(nt)),Xc=ln(),CE=(tr(),Le(Kr)),el=S2e(),I2e=ln(),DB=T2e(),twt=w6(),C2e=b2e(),v2e={requireParentSpan:!0},QX=class extends Xc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(C2e.PACKAGE_NAME,C2e.PACKAGE_VERSION,{...v2e,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Xc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Xc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...v2e,...t})}init(){return[new Xc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Xc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,Xc.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||twt.defaultDbStatementSerializer,u=IE.trace.getSpan(IE.context.active())===void 0;if(i.requireParentSpan===!0&&u)return t.apply(this,arguments);let l={},{host:f,port:h}=this.options,_=s(o.name,o.args);r._dbSemconvStability&Xc.SemconvStability.OLD&&(l[el.ATTR_DB_SYSTEM]=el.DB_SYSTEM_VALUE_REDIS,l[el.ATTR_DB_STATEMENT]=_,l[el.ATTR_DB_CONNECTION_STRING]=`redis://${f}:${h}`),r._dbSemconvStability&Xc.SemconvStability.STABLE&&(l[CE.ATTR_DB_SYSTEM_NAME]=el.DB_SYSTEM_NAME_VALUE_REDIS,l[CE.ATTR_DB_QUERY_TEXT]=_),r._netSemconvStability&Xc.SemconvStability.OLD&&(l[el.ATTR_NET_PEER_NAME]=f,l[el.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&Xc.SemconvStability.STABLE&&(l[CE.ATTR_SERVER_ADDRESS]=f,l[CE.ATTR_SERVER_PORT]=h);let E=r.tracer.startSpan(o.name,{kind:IE.SpanKind.CLIENT,attributes:l}),{requestHook:T}=i;T&&(0,I2e.safeExecuteInTheMiddle)(()=>T(E,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&IE.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),R=o.resolve;o.resolve=function(B){(0,I2e.safeExecuteInTheMiddle)(()=>i.responseHook?.(E,o.name,o.args,B),P=>{P&&IE.diag.error("ioredis instrumentation: response hook failed",P)},!0),(0,DB.endSpan)(E,null),R(B)};let x=o.reject;return o.reject=function(B){(0,DB.endSpan)(E,B),x(B)},v}catch(v){throw(0,DB.endSpan)(E,v),v}}}_traceConnection(t){let n=this;return function(){let r=IE.trace.getSpan(IE.context.active())===void 0;if(n.getConfig().requireParentSpan===!0&&r)return t.apply(this,arguments);let o={},{host:i,port:s}=this.options;n._dbSemconvStability&Xc.SemconvStability.OLD&&(o[el.ATTR_DB_SYSTEM]=el.DB_SYSTEM_VALUE_REDIS,o[el.ATTR_DB_STATEMENT]="connect",o[el.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${s}`),n._dbSemconvStability&Xc.SemconvStability.STABLE&&(o[CE.ATTR_DB_SYSTEM_NAME]=el.DB_SYSTEM_NAME_VALUE_REDIS,o[CE.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&Xc.SemconvStability.OLD&&(o[el.ATTR_NET_PEER_NAME]=i,o[el.ATTR_NET_PEER_PORT]=s),n._netSemconvStability&Xc.SemconvStability.STABLE&&(o[CE.ATTR_SERVER_ADDRESS]=i,o[CE.ATTR_SERVER_PORT]=s);let u=n.tracer.startSpan("connect",{kind:IE.SpanKind.CLIENT,attributes:o});try{let l=t.apply(this,arguments);return(0,DB.endSpan)(u,null),l}catch(l){throw(0,DB.endSpan)(u,l),l}}}};k6.IORedisInstrumentation=QX});var x2e=M(B6=>{"use strict";m();Object.defineProperty(B6,"__esModule",{value:!0});B6.IORedisInstrumentation=void 0;var nwt=R2e();Object.defineProperty(B6,"IORedisInstrumentation",{enumerable:!0,get:function(){return nwt.IORedisInstrumentation}})});var O6=M(PR=>{"use strict";m();Object.defineProperty(PR,"__esModule",{value:!0});PR.PACKAGE_NAME=PR.PACKAGE_VERSION=void 0;PR.PACKAGE_VERSION="0.62.0";PR.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var D2e=M(vE=>{"use strict";m();Object.defineProperty(vE,"__esModule",{value:!0});vE.getTracedCreateStreamTrace=vE.getTracedCreateClient=vE.endSpan=void 0;var NB=($e(),Le(nt)),rwt=(e,t)=>{t&&e.setStatus({code:NB.SpanStatusCode.ERROR,message:t.message}),e.end()};vE.endSpan=rwt;var owt=e=>function(){let n=e.apply(this,arguments);return NB.context.bind(NB.context.active(),n)};vE.getTracedCreateClient=owt;var iwt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){NB.context.bind(NB.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};vE.getTracedCreateStreamTrace=iwt});var P6=M(gu=>{"use strict";m();Object.defineProperty(gu,"__esModule",{value:!0});gu.DB_SYSTEM_VALUE_REDIS=gu.DB_SYSTEM_NAME_VALUE_REDIS=gu.ATTR_NET_PEER_PORT=gu.ATTR_NET_PEER_NAME=gu.ATTR_DB_SYSTEM=gu.ATTR_DB_STATEMENT=gu.ATTR_DB_CONNECTION_STRING=void 0;gu.ATTR_DB_CONNECTION_STRING="db.connection_string";gu.ATTR_DB_STATEMENT="db.statement";gu.ATTR_DB_SYSTEM="db.system";gu.ATTR_NET_PEER_NAME="net.peer.name";gu.ATTR_NET_PEER_PORT="net.peer.port";gu.DB_SYSTEM_NAME_VALUE_REDIS="redis";gu.DB_SYSTEM_VALUE_REDIS="redis"});var w2e=M(L6=>{"use strict";m();Object.defineProperty(L6,"__esModule",{value:!0});L6.RedisInstrumentationV2_V3=void 0;var rd=ln(),M6=D2e(),N2e=O6(),wB=($e(),Le(nt)),kB=(tr(),Le(Kr)),iT=P6(),swt=w6(),FX=class e extends rd.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(N2e.PACKAGE_NAME,N2e.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,rd.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,rd.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new rd.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,rd.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,rd.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,rd.isWrapped)(t.createClient)&&this._unwrap(t,"createClient"),this._wrap(t,"createClient",this._getPatchCreateClient()),t),t=>{t!==void 0&&(this._unwrap(t.RedisClient.prototype,"internal_send_command"),this._unwrap(t.RedisClient.prototype,"create_stream"),this._unwrap(t,"createClient"))})]}_getPatchInternalSendCommand(){let t=this;return function(r){return function(i){if(arguments.length!==1||typeof i!="object")return r.apply(this,arguments);let s=t.getConfig(),u=wB.trace.getSpan(wB.context.active())===void 0;if(s.requireParentSpan===!0&&u)return r.apply(this,arguments);let l=s?.dbStatementSerializer||swt.defaultDbStatementSerializer,f={};t._semconvStability&rd.SemconvStability.OLD&&Object.assign(f,{[iT.ATTR_DB_SYSTEM]:iT.DB_SYSTEM_VALUE_REDIS,[iT.ATTR_DB_STATEMENT]:l(i.command,i.args)}),t._semconvStability&rd.SemconvStability.STABLE&&Object.assign(f,{[kB.ATTR_DB_SYSTEM_NAME]:iT.DB_SYSTEM_NAME_VALUE_REDIS,[kB.ATTR_DB_OPERATION_NAME]:i.command,[kB.ATTR_DB_QUERY_TEXT]:l(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:wB.SpanKind.CLIENT,attributes:f});if(this.connection_options){let E={};t._semconvStability&rd.SemconvStability.OLD&&Object.assign(E,{[iT.ATTR_NET_PEER_NAME]:this.connection_options.host,[iT.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&rd.SemconvStability.STABLE&&Object.assign(E,{[kB.ATTR_SERVER_ADDRESS]:this.connection_options.host,[kB.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(E)}this.address&&t._semconvStability&rd.SemconvStability.OLD&&h.setAttribute(iT.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let _=arguments[0].callback;if(_){let E=wB.context.active();arguments[0].callback=function(v,R){if(s?.responseHook){let x=s.responseHook;(0,rd.safeExecuteInTheMiddle)(()=>{x(h,i.command,i.args,R)},B=>{B&&t._diag.error("Error executing responseHook",B)},!0)}return(0,M6.endSpan)(h,v),wB.context.with(E,_,this,...arguments)}}try{return r.apply(this,arguments)}catch(E){throw(0,M6.endSpan)(h,E),E}}}}_getPatchCreateClient(){return function(n){return(0,M6.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,M6.getTracedCreateStreamTrace)(n)}}};L6.RedisInstrumentationV2_V3=FX});var B2e=M(U6=>{"use strict";m();Object.defineProperty(U6,"__esModule",{value:!0});U6.getClientAttributes=void 0;var GX=(tr(),Le(Kr)),MR=P6(),k2e=ln();function awt(e,t,n){let r={};return n&k2e.SemconvStability.OLD&&Object.assign(r,{[MR.ATTR_DB_SYSTEM]:MR.DB_SYSTEM_VALUE_REDIS,[MR.ATTR_NET_PEER_NAME]:t?.socket?.host,[MR.ATTR_NET_PEER_PORT]:t?.socket?.port,[MR.ATTR_DB_CONNECTION_STRING]:uwt(e,t?.url)}),n&k2e.SemconvStability.STABLE&&Object.assign(r,{[GX.ATTR_DB_SYSTEM_NAME]:MR.DB_SYSTEM_NAME_VALUE_REDIS,[GX.ATTR_SERVER_ADDRESS]:t?.socket?.host,[GX.ATTR_SERVER_PORT]:t?.socket?.port}),r}U6.getClientAttributes=awt;function uwt(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 L2e=M(Q6=>{"use strict";m();Object.defineProperty(Q6,"__esModule",{value:!0});Q6.RedisInstrumentationV4_V5=void 0;var fp=($e(),Le(nt)),xo=ln(),O2e=B2e(),cwt=w6(),P2e=O6(),jX=(tr(),Le(Kr)),lwt=P6(),BB=Symbol("opentelemetry.instrumentation.redis.open_spans"),M2e=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),zX=class e extends xo.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(P2e.PACKAGE_NAME,P2e.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,xo.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,xo.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 xo.InstrumentationNodeModuleFile(`${t}/dist/lib/commander.js`,["^1.0.0"],(i,s)=>{let u=i.transformCommandArguments;if(!u)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let l=s?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,xo.isWrapped)(i?.[l])&&this._unwrap(i,l),this._wrap(i,l,this._getPatchExtendWithCommands(u)),i},i=>{(0,xo.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,xo.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new xo.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return(0,xo.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),this._wrap(s,"exec",this._getPatchMultiCommandsExec(!1)),(0,xo.isWrapped)(s?.execAsPipeline)&&this._unwrap(s,"execAsPipeline"),this._wrap(s,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,xo.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand"),this._wrap(s,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let s=i?.default?.prototype;(0,xo.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),(0,xo.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand")}),o=new xo.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return s?.multi&&((0,xo.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),this._wrap(s,"multi",this._getPatchRedisClientMulti())),s?.MULTI&&((0,xo.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),this._wrap(s,"MULTI",this._getPatchRedisClientMulti())),(0,xo.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,xo.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),(0,xo.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),(0,xo.isWrapped)(s?.sendCommand)&&this._unwrap(s,"sendCommand")});return new xo.InstrumentationNodeModuleDefinition(t,["^1.0.0","^5.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(t){let n=this;return function(o){return function(s){if(s?.BaseClass?.name!=="RedisClient")return o.apply(this,arguments);let u=s.executor;return s.executor=function(l,f){let h=t(l,f).args;return n._traceClientCommand(u,this,arguments,h)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(o){return function(){let s=o.apply(this,arguments);return typeof s?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),s):s.then(u=>{let l=this[BB];return n._endSpansWithRedisReplies(l,u,t),u}).catch(u=>{let l=this[BB];if(!l)n._diag.error("cannot find open spans to end for multi/pipeline");else{let f=u.constructor.name==="MultiErrorReply"?u.replies:new Array(l.length).fill(u);n._endSpansWithRedisReplies(l,f,t)}return Promise.reject(u)})}}}_getPatchMultiCommandsAddCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchRedisClientMulti(){return function(n){return function(){let o=n.apply(this,arguments);return o[M2e]=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,O2e.getClientAttributes)(t._diag,i,t._semconvStability),u=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:fp.SpanKind.CLIENT,attributes:s});return fp.context.with(fp.trace.setSpan(fp.context.active(),u),()=>r.apply(this)).then(f=>(u.end(),f)).catch(f=>(u.recordException(f),u.setStatus({code:fp.SpanStatusCode.ERROR,message:f.message}),u.end(),Promise.reject(f)))}}}_traceClientCommand(t,n,r,o){if(fp.trace.getSpan(fp.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let s=n.options||n[M2e],u=o[0],l=o.slice(1),f=this.getConfig().dbStatementSerializer||cwt.defaultDbStatementSerializer,h=(0,O2e.getClientAttributes)(this._diag,s,this._semconvStability);this._semconvStability&xo.SemconvStability.STABLE&&(h[jX.ATTR_DB_OPERATION_NAME]=u);try{let T=f(u,l);T!=null&&(this._semconvStability&xo.SemconvStability.OLD&&(h[lwt.ATTR_DB_STATEMENT]=T),this._semconvStability&xo.SemconvStability.STABLE&&(h[jX.ATTR_DB_QUERY_TEXT]=T))}catch(T){this._diag.error("dbStatementSerializer throw an exception",T,{commandName:u})}let _=this.tracer.startSpan(`${e.COMPONENT}-${u}`,{kind:fp.SpanKind.CLIENT,attributes:h}),E=fp.context.with(fp.trace.setSpan(fp.context.active(),_),()=>t.apply(n,r));if(typeof E?.then=="function")E.then(T=>{this._endSpanWithResponse(_,u,l,T,void 0)},T=>{this._endSpanWithResponse(_,u,l,null,T)});else{let T=E;T[BB]=T[BB]||[],T[BB].push({span:_,commandName:u,commandArgs:l})}return E}_endSpansWithRedisReplies(t,n,r=!1){if(!t)return this._diag.error("cannot find open spans to end for redis multi/pipeline");if(n.length!==t.length)return this._diag.error("number of multi command spans does not match response from redis");let o=t.map(u=>u.commandName),s=o.every(u=>u===o[0])?(r?"PIPELINE ":"MULTI ")+o[0]:r?"PIPELINE":"MULTI";for(let u=0;u<t.length;u++){let{span:l,commandArgs:f}=t[u],h=n[u],[_,E]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&xo.SemconvStability.STABLE&&l.setAttribute(jX.ATTR_DB_OPERATION_NAME,s),this._endSpanWithResponse(l,o[u],f,_,E)}}_endSpanWithResponse(t,n,r,o,i){let{responseHook:s}=this.getConfig();if(!i&&s)try{s(t,n,r,o)}catch(u){this._diag.error("responseHook throw an exception",u)}i&&(t.recordException(i),t.setStatus({code:fp.SpanStatusCode.ERROR,message:i?.message})),t.end()}};Q6.RedisInstrumentationV4_V5=zX});var F2e=M(F6=>{"use strict";m();Object.defineProperty(F6,"__esModule",{value:!0});F6.RedisInstrumentation=void 0;var dwt=ln(),U2e=O6(),pwt=w2e(),fwt=L2e(),Q2e={requireParentSpan:!1},HX=class extends dwt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...Q2e,...t};super(U2e.PACKAGE_NAME,U2e.PACKAGE_VERSION,n),this.instrumentationV2_V3=new pwt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new fwt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...Q2e,...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())}};F6.RedisInstrumentation=HX});var G2e=M(G6=>{"use strict";m();Object.defineProperty(G6,"__esModule",{value:!0});G6.RedisInstrumentation=void 0;var mwt=F2e();Object.defineProperty(G6,"RedisInstrumentation",{enumerable:!0,get:function(){return mwt.RedisInstrumentation}})});function OB(e,t){return e.includes(t.toLowerCase())}function qX(e){return OB($X,e)?"cache.get":OB(gwt,e)?"cache.put":void 0}function hwt(e,t){return t.some(n=>e.startsWith(n))}function z2e(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)?j2e(o.map(i=>n(i))):["<unknown>"],r=t[0];return OB(Awt,e)&&r!=null?n(r):j2e(t.map(o=>n(o)))}catch{return}}function H2e(e,t,n){if(!qX(e))return!1;for(let r of t)if(hwt(r,n))return!0;return!1}function $2e(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 j2e(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var Awt,$X,gwt,q2e=k(()=>{m();Awt=["get","set","setex"],$X=["get","mget"],gwt=["set","setex"]});var V2e,K2e,j6,PB,Y2e,_wt,Ewt,J2e,ywt,Z2e,W2e=k(()=>{m();V2e=ue(x2e(),1),K2e=ue(G2e(),1);mt();yr();q2e();j6="Redis",PB={},Y2e=(e,t,n,r)=>{e.setAttribute(Ut,"auto.db.otel.redis");let o=z2e(t,n),i=qX(t);if(!o||!i||!PB.cachePrefixes||!H2e(t,o,PB.cachePrefixes))return;let s=Lt(e).data["net.peer.name"],u=Lt(e).data["net.peer.port"];u&&s&&e.setAttributes({"network.peer.address":s,"network.peer.port":u});let l=$2e(r);l&&e.setAttribute(JK,l),OB($X,t)&&l!==void 0&&e.setAttribute(KK,l>0),e.setAttributes({[on]:i,[YK]:o});let f=o.join(", ");e.updateName(PB.maxCacheKeyLength?G_(f,PB.maxCacheKeyLength):f)},_wt=ct(`${j6}.IORedis`,()=>new V2e.IORedisInstrumentation({responseHook:Y2e})),Ewt=ct(`${j6}.Redis`,()=>new K2e.RedisInstrumentation({responseHook:Y2e})),J2e=Object.assign(()=>{_wt(),Ewt()},{id:j6}),ywt=((e={})=>({name:j6,setupOnce(){PB=e,J2e()}})),Z2e=ywt});var X2e=M(z6=>{"use strict";m();Object.defineProperty(z6,"__esModule",{value:!0});z6.EVENT_LISTENERS_SET=void 0;z6.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var VX=M(MB=>{"use strict";m();Object.defineProperty(MB,"__esModule",{value:!0});MB.AttributeNames=void 0;var Swt;(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"})(Swt=MB.AttributeNames||(MB.AttributeNames={}))});var KX=M(Or=>{"use strict";m();Object.defineProperty(Or,"__esModule",{value:!0});Or.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=Or.METRIC_DB_CLIENT_CONNECTION_COUNT=Or.DB_SYSTEM_VALUE_POSTGRESQL=Or.DB_CLIENT_CONNECTION_STATE_VALUE_USED=Or.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=Or.ATTR_NET_PEER_PORT=Or.ATTR_NET_PEER_NAME=Or.ATTR_DB_USER=Or.ATTR_DB_SYSTEM=Or.ATTR_DB_STATEMENT=Or.ATTR_DB_NAME=Or.ATTR_DB_CONNECTION_STRING=Or.ATTR_DB_CLIENT_CONNECTION_STATE=Or.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;Or.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";Or.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";Or.ATTR_DB_CONNECTION_STRING="db.connection_string";Or.ATTR_DB_NAME="db.name";Or.ATTR_DB_STATEMENT="db.statement";Or.ATTR_DB_SYSTEM="db.system";Or.ATTR_DB_USER="db.user";Or.ATTR_NET_PEER_NAME="net.peer.name";Or.ATTR_NET_PEER_PORT="net.peer.port";Or.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";Or.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";Or.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";Or.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";Or.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var YX=M(LB=>{"use strict";m();Object.defineProperty(LB,"__esModule",{value:!0});LB.SpanNames=void 0;var Twt;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(Twt=LB.SpanNames||(LB.SpanNames={}))});var sLe=M(ur=>{"use strict";m();Object.defineProperty(ur,"__esModule",{value:!0});ur.sanitizedErrorMessage=ur.isObjectWithTextString=ur.getErrorMessage=ur.patchClientConnectCallback=ur.patchCallbackPGPool=ur.updateCounter=ur.getPoolName=ur.patchCallback=ur.handleExecutionResult=ur.handleConfigQuery=ur.shouldSkipInstrumentation=ur.getSemanticAttributesFromPoolConnection=ur.getSemanticAttributesFromConnection=ur.getConnectionString=ur.parseAndMaskConnectionString=ur.parseNormalizedOperationName=ur.getQuerySpanName=void 0;var RE=($e(),Le(nt)),H6=VX(),mp=(tr(),Le(Kr)),Si=KX(),sT=ln(),eLe=YX();function tLe(e,t){if(!t)return eLe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:nLe(t.text);return`${eLe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}ur.getQuerySpanName=tLe;function nLe(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}ur.parseNormalizedOperationName=nLe;function rLe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}ur.parseAndMaskConnectionString=rLe;function JX(e){if("connectionString"in e&&e.connectionString)return rLe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}ur.getConnectionString=JX;function $6(e){if(Number.isInteger(e))return e}function oLe(e,t){let n={};return t&sT.SemconvStability.OLD&&(n={...n,[Si.ATTR_DB_SYSTEM]:Si.DB_SYSTEM_VALUE_POSTGRESQL,[Si.ATTR_DB_NAME]:e.database,[Si.ATTR_DB_CONNECTION_STRING]:JX(e),[Si.ATTR_DB_USER]:e.user,[Si.ATTR_NET_PEER_NAME]:e.host,[Si.ATTR_NET_PEER_PORT]:$6(e.port)}),t&sT.SemconvStability.STABLE&&(n={...n,[mp.ATTR_DB_SYSTEM_NAME]:mp.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[mp.ATTR_DB_NAMESPACE]:e.namespace,[mp.ATTR_SERVER_ADDRESS]:e.host,[mp.ATTR_SERVER_PORT]:$6(e.port)}),n}ur.getSemanticAttributesFromConnection=oLe;function bwt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[H6.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[H6.AttributeNames.MAX_CLIENT]:e.maxClient};return t&sT.SemconvStability.OLD&&(r={...r,[Si.ATTR_DB_SYSTEM]:Si.DB_SYSTEM_VALUE_POSTGRESQL,[Si.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[Si.ATTR_DB_CONNECTION_STRING]:JX(e),[Si.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[Si.ATTR_NET_PEER_PORT]:Number(n?.port)||$6(e.port),[Si.ATTR_DB_USER]:n?.username??e.user}),t&sT.SemconvStability.STABLE&&(r={...r,[mp.ATTR_DB_SYSTEM_NAME]:mp.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[mp.ATTR_DB_NAMESPACE]:e.namespace,[mp.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[mp.ATTR_SERVER_PORT]:Number(n?.port)||$6(e.port)}),r}ur.getSemanticAttributesFromPoolConnection=bwt;function Iwt(e){return e.requireParentSpan===!0&&RE.trace.getSpan(RE.context.active())===void 0}ur.shouldSkipInstrumentation=Iwt;function Cwt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,s=tLe(i,r),u=e.startSpan(s,{kind:RE.SpanKind.CLIENT,attributes:oLe(o,n)});if(!r)return u;if(r.text&&(n&sT.SemconvStability.OLD&&u.setAttribute(Si.ATTR_DB_STATEMENT,r.text),n&sT.SemconvStability.STABLE&&u.setAttribute(mp.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());u.setAttribute(H6.AttributeNames.PG_VALUES,l)}catch(l){RE.diag.error("failed to stringify ",r.values,l)}return typeof r.name=="string"&&u.setAttribute(H6.AttributeNames.PG_PLAN,r.name),u}ur.handleConfigQuery=Cwt;function iLe(e,t,n){typeof e.responseHook=="function"&&(0,sT.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&RE.diag.error("Error running response hook",r)},!0)}ur.handleExecutionResult=iLe;function vwt(e,t,n,r,o){return function(s,u){s?(Object.prototype.hasOwnProperty.call(s,"code")&&(r[mp.ATTR_ERROR_TYPE]=s.code),s instanceof Error&&t.recordException(q6(s)),t.setStatus({code:RE.SpanStatusCode.ERROR,message:s.message})):iLe(e,t,u),o(),t.end(),n.call(this,s,u)}}ur.patchCallback=vwt;function Rwt(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()}ur.getPoolName=Rwt;function xwt(e,t,n,r,o){let i=t.totalCount,s=t.waitingCount,u=t.idleCount,l=i-u;return n.add(l-o.used,{[Si.ATTR_DB_CLIENT_CONNECTION_STATE]:Si.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[Si.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(u-o.idle,{[Si.ATTR_DB_CLIENT_CONNECTION_STATE]:Si.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[Si.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(s-o.pending,{[Si.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:l,idle:u,pending:s}}ur.updateCounter=xwt;function Dwt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(q6(r)),e.setStatus({code:RE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}ur.patchCallbackPGPool=Dwt;function Nwt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(q6(r)),e.setStatus({code:RE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}ur.patchClientConnectCallback=Nwt;function wwt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}ur.getErrorMessage=wwt;function kwt(e){return typeof e=="object"&&typeof e?.text=="string"}ur.isObjectWithTextString=kwt;function q6(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}ur.sanitizedErrorMessage=q6});var aLe=M(LR=>{"use strict";m();Object.defineProperty(LR,"__esModule",{value:!0});LR.PACKAGE_NAME=LR.PACKAGE_VERSION=void 0;LR.PACKAGE_VERSION="0.66.0";LR.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var fLe=M(K6=>{"use strict";m();Object.defineProperty(K6,"__esModule",{value:!0});K6.PgInstrumentation=void 0;var tc=ln(),Wr=($e(),Le(nt)),uLe=X2e(),oi=sLe(),cLe=BX(),lLe=aLe(),dLe=YX(),V6=Rr(),Nf=(tr(),Le(Kr)),UB=KX();function UR(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var ZX=class extends tc.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(lLe.PACKAGE_NAME,lLe.PACKAGE_VERSION,t),this._semconvStability=(0,tc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(Nf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Wr.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(UB.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(UB.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS,{description:"The number of current pending requests for an open connection.",unit:"{connection}"})}init(){let t=[">=8.0.3 <9"],n=[">=2.0.0 <4"],r=new tc.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new tc.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new tc.InstrumentationNodeModuleDefinition("pg",t,u=>{let l=UR(u);return this._patchPgClient(l.Client),u},u=>{let l=UR(u);return this._unpatchPgClient(l.Client),u},[o,r]),s=new tc.InstrumentationNodeModuleDefinition("pg-pool",n,u=>{let l=UR(u);return(0,tc.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect"),this._wrap(l.prototype,"connect",this._getPoolConnectPatch()),l},u=>{let l=UR(u);(0,tc.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect")});return[i,s]}_patchPgClient(t){if(!t)return;let n=UR(t);return(0,tc.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,tc.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),this._wrap(n.prototype,"query",this._getClientQueryPatch()),this._wrap(n.prototype,"connect",this._getClientConnectPatch()),t}_unpatchPgClient(t){let n=UR(t);return(0,tc.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,tc.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(oi.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan(dLe.SpanNames.CONNECT,{kind:Wr.SpanKind.CLIENT,attributes:oi.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let l=Wr.trace.getSpan(Wr.context.active());o=oi.patchClientConnectCallback(s,o),l&&(o=Wr.context.bind(Wr.context.active(),o))}let u=Wr.context.with(Wr.trace.setSpan(Wr.context.active(),s),()=>n.call(this,o));return pLe(s,u)}}recordOperationDuration(t,n){let r={},o=[Nf.ATTR_DB_NAMESPACE,Nf.ATTR_ERROR_TYPE,Nf.ATTR_SERVER_PORT,Nf.ATTR_SERVER_ADDRESS,Nf.ATTR_DB_OPERATION_NAME];this._semconvStability&tc.SemconvStability.OLD&&o.push(UB.ATTR_DB_SYSTEM),this._semconvStability&tc.SemconvStability.STABLE&&o.push(Nf.ATTR_DB_SYSTEM_NAME),o.forEach(s=>{s in t&&(r[s]=t[s])});let i=(0,V6.hrTimeToMilliseconds)((0,V6.hrTimeDuration)(n,(0,V6.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(oi.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,V6.hrTime)(),s=o[0],u=typeof s=="string",l=oi.isObjectWithTextString(s),f=u?{text:s,values:Array.isArray(o[1])?o[1]:void 0}:l?{...s,name:s.name,text:s.text,values:s.values??(Array.isArray(o[1])?o[1]:void 0)}:void 0,h={[UB.ATTR_DB_SYSTEM]:UB.DB_SYSTEM_VALUE_POSTGRESQL,[Nf.ATTR_DB_NAMESPACE]:this.database,[Nf.ATTR_SERVER_PORT]:this.connectionParameters.port,[Nf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};f?.text&&(h[Nf.ATTR_DB_OPERATION_NAME]=oi.parseNormalizedOperationName(f?.text));let _=()=>{t.recordOperationDuration(h,i)},E=t.getConfig(),T=oi.handleConfigQuery.call(this,t.tracer,E,t._semconvStability,f);if(E.addSqlCommenterCommentToQueries&&(u?o[0]=(0,cLe.addSqlCommenterComment)(T,s):l&&!("name"in s)&&(o[0]={...s,text:(0,cLe.addSqlCommenterComment)(T,s.text)})),o.length>0){let x=Wr.trace.getSpan(Wr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=oi.patchCallback(E,T,o[o.length-1],h,_),x&&(o[o.length-1]=Wr.context.bind(Wr.context.active(),o[o.length-1]));else if(typeof f?.callback=="function"){let B=oi.patchCallback(t.getConfig(),T,f.callback,h,_);x&&(B=Wr.context.bind(Wr.context.active(),B)),o[0].callback=B}}let{requestHook:v}=E;typeof v=="function"&&f&&(0,tc.safeExecuteInTheMiddle)(()=>{let{database:x,host:B,port:P,user:G}=this.connectionParameters;v(T,{connection:{database:x,host:B,port:P,user:G},query:{text:f.text,values:f.values,name:f.name}})},x=>{x&&t._diag.error("Error running query hook",x)},!0);let R;try{R=n.apply(this,o)}catch(x){throw x instanceof Error&&T.recordException(oi.sanitizedErrorMessage(x)),T.setStatus({code:Wr.SpanStatusCode.ERROR,message:oi.getErrorMessage(x)}),T.end(),x}return R instanceof Promise?R.then(x=>new Promise(B=>{oi.handleExecutionResult(t.getConfig(),T,x),_(),T.end(),B(x)})).catch(x=>new Promise((B,P)=>{x instanceof Error&&T.recordException(oi.sanitizedErrorMessage(x)),T.setStatus({code:Wr.SpanStatusCode.ERROR,message:x.message}),_(),T.end(),P(x)})):R})}_setPoolConnectEventListeners(t){if(t[uLe.EVENT_LISTENERS_SET])return;let n=oi.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=oi.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=oi.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=oi.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=oi.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[uLe.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(oi.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan(dLe.SpanNames.POOL_CONNECT,{kind:Wr.SpanKind.CLIENT,attributes:oi.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let l=Wr.trace.getSpan(Wr.context.active());o=oi.patchCallbackPGPool(s,o),l&&(o=Wr.context.bind(Wr.context.active(),o))}let u=Wr.context.with(Wr.trace.setSpan(Wr.context.active(),s),()=>n.call(this,o));return pLe(s,u)}}};K6.PgInstrumentation=ZX;function pLe(e,t){if(!(t instanceof Promise))return t;let n=t;return Wr.context.bind(Wr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(oi.sanitizedErrorMessage(r)),e.setStatus({code:Wr.SpanStatusCode.ERROR,message:oi.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var mLe=M(QR=>{"use strict";m();Object.defineProperty(QR,"__esModule",{value:!0});QR.AttributeNames=QR.PgInstrumentation=void 0;var Bwt=fLe();Object.defineProperty(QR,"PgInstrumentation",{enumerable:!0,get:function(){return Bwt.PgInstrumentation}});var Owt=VX();Object.defineProperty(QR,"AttributeNames",{enumerable:!0,get:function(){return Owt.AttributeNames}})});var ALe,gLe,hLe,Pwt,_Le,ELe=k(()=>{m();ALe=ue(mLe(),1);yr();gLe="Postgres",hLe=ct(gLe,ALe.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Jr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),Pwt=(e=>({name:gLe,setupOnce(){hLe(e)}})),_Le=Pwt});var xE,XX,yLe,Mwt,Lwt,SLe,WX,Uwt,TLe,bLe=k(()=>{m();$e();xE=ue(ln(),1);tr();mt();yr();JS();XX="PostgresJs",yLe=[">=3.0.0 <4"],Mwt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,Lwt=Symbol.for("sentry.query.from.instrumented.sql"),SLe=ct(XX,e=>new WX({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),WX=class extends xE.InstrumentationBase{constructor(t){super("sentry-postgres-js",nr,t)}init(){let t=new xE.InstrumentationNodeModuleDefinition("postgres",yLe,n=>{try{return this._patchPostgres(n)}catch(r){return ks&&W.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new xE.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,yLe,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 ks&&W.warn("postgres module does not export a function. Skipping instrumentation."),t;let o=this,i=function(...s){let u=Reflect.construct(r,s);if(!u||typeof u!="function")return ks&&W.warn("postgres() did not return a valid instance"),u;let l=o.getConfig();return WY(u,{requireParentSpan:l.requireParentSpan,requestHook:l.requestHook})};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let s of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(s)){let u=Object.getOwnPropertyDescriptor(r,s);u&&Object.defineProperty(i,s,u)}return n?i:(Bk(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return Jt.getSpan(Xe.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute($C,r);return}let o=n?.match(Mwt);o?.[1]&&t.setAttribute($C,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[Lwt])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),s=n._sanitizeSqlQuery(i);return sa({name:s||"postgresjs.query",op:"db"},u=>{Jr(u,"auto.db.postgresjs"),u.setAttributes({[AS]:"postgres",[l7]:s});let l=n.getConfig(),{requestHook:f}=l;f&&(0,xE.safeExecuteInTheMiddle)(()=>f(u,s,void 0),E=>{E&&(u.setAttribute("sentry.hook.error","requestHook failed"),ks&&W.error(`Error in requestHook for ${XX} integration:`,E))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(E,T,v)=>{try{n._setOperationName(u,s,v?.[0]?.command),u.end()}catch(R){ks&&W.error("Error ending span in resolve callback:",R)}return Reflect.apply(E,T,v)}});let _=this.reject;this.reject=new Proxy(_,{apply:(E,T,v)=>{try{u.setStatus({code:2,message:v?.[0]?.message||"unknown_error"}),u.setAttribute(d7,v?.[0]?.code||"unknown"),u.setAttribute(p7,v?.[0]?.name||"unknown"),n._setOperationName(u,s),u.end()}catch(R){ks&&W.error("Error ending span in reject callback:",R)}return Reflect.apply(E,T,v)}});try{return r.apply(this,o)}catch(E){throw u.setStatus({code:2,message:E instanceof Error?E.message:"unknown_error"}),u.end(),E}})},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}},Uwt=(e=>({name:XX,setupOnce(){SLe(e)}})),TLe=Uwt});var ILe=M(QB=>{"use strict";m();Object.defineProperty(QB,"__esModule",{value:!0});QB.SeverityNumber=void 0;var Qwt;(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"})(Qwt=QB.SeverityNumber||(QB.SeverityNumber={}))});var J6=M(FR=>{"use strict";m();Object.defineProperty(FR,"__esModule",{value:!0});FR.NOOP_LOGGER=FR.NoopLogger=void 0;var Y6=class{emit(t){}};FR.NoopLogger=Y6;FR.NOOP_LOGGER=new Y6});var W6=M(GR=>{"use strict";m();Object.defineProperty(GR,"__esModule",{value:!0});GR.NOOP_LOGGER_PROVIDER=GR.NoopLoggerProvider=void 0;var Fwt=J6(),Z6=class{getLogger(t,n,r){return new Fwt.NoopLogger}};GR.NoopLoggerProvider=Z6;GR.NOOP_LOGGER_PROVIDER=new Z6});var tee=M(X6=>{"use strict";m();Object.defineProperty(X6,"__esModule",{value:!0});X6.ProxyLogger=void 0;var Gwt=J6(),eee=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):Gwt.NOOP_LOGGER}};X6.ProxyLogger=eee});var ree=M(eG=>{"use strict";m();Object.defineProperty(eG,"__esModule",{value:!0});eG.ProxyLoggerProvider=void 0;var jwt=W6(),zwt=tee(),nee=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new zwt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:jwt.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)}};eG.ProxyLoggerProvider=nee});var CLe=M(tG=>{"use strict";m();Object.defineProperty(tG,"__esModule",{value:!0});tG._globalThis=void 0;tG._globalThis=typeof globalThis=="object"?globalThis:global});var vLe=M(nG=>{"use strict";m();Object.defineProperty(nG,"__esModule",{value:!0});nG._globalThis=void 0;var Hwt=CLe();Object.defineProperty(nG,"_globalThis",{enumerable:!0,get:function(){return Hwt._globalThis}})});var RLe=M(rG=>{"use strict";m();Object.defineProperty(rG,"__esModule",{value:!0});rG._globalThis=void 0;var $wt=vLe();Object.defineProperty(rG,"_globalThis",{enumerable:!0,get:function(){return $wt._globalThis}})});var xLe=M(nA=>{"use strict";m();Object.defineProperty(nA,"__esModule",{value:!0});nA.API_BACKWARDS_COMPATIBILITY_VERSION=nA.makeGetter=nA._global=nA.GLOBAL_LOGS_API_KEY=void 0;var qwt=RLe();nA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");nA._global=qwt._globalThis;function Vwt(e,t,n){return r=>r===e?t:n}nA.makeGetter=Vwt;nA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var NLe=M(oG=>{"use strict";m();Object.defineProperty(oG,"__esModule",{value:!0});oG.LogsAPI=void 0;var Ap=xLe(),Kwt=W6(),DLe=ree(),oee=class e{constructor(){this._proxyLoggerProvider=new DLe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Ap._global[Ap.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Ap._global[Ap.GLOBAL_LOGS_API_KEY]=(0,Ap.makeGetter)(Ap.API_BACKWARDS_COMPATIBILITY_VERSION,t,Kwt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Ap._global[Ap.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Ap._global,Ap.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Ap._global[Ap.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new DLe.ProxyLoggerProvider}};oG.LogsAPI=oee});var iee=M(da=>{"use strict";m();Object.defineProperty(da,"__esModule",{value:!0});da.logs=da.ProxyLoggerProvider=da.ProxyLogger=da.NoopLoggerProvider=da.NOOP_LOGGER_PROVIDER=da.NoopLogger=da.NOOP_LOGGER=da.SeverityNumber=void 0;var Ywt=ILe();Object.defineProperty(da,"SeverityNumber",{enumerable:!0,get:function(){return Ywt.SeverityNumber}});var wLe=J6();Object.defineProperty(da,"NOOP_LOGGER",{enumerable:!0,get:function(){return wLe.NOOP_LOGGER}});Object.defineProperty(da,"NoopLogger",{enumerable:!0,get:function(){return wLe.NoopLogger}});var kLe=W6();Object.defineProperty(da,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return kLe.NOOP_LOGGER_PROVIDER}});Object.defineProperty(da,"NoopLoggerProvider",{enumerable:!0,get:function(){return kLe.NoopLoggerProvider}});var Jwt=tee();Object.defineProperty(da,"ProxyLogger",{enumerable:!0,get:function(){return Jwt.ProxyLogger}});var Zwt=ree();Object.defineProperty(da,"ProxyLoggerProvider",{enumerable:!0,get:function(){return Zwt.ProxyLoggerProvider}});var Wwt=NLe();da.logs=Wwt.LogsAPI.getInstance()});var BLe=M(jR=>{"use strict";m();Object.defineProperty(jR,"__esModule",{value:!0});jR.disableInstrumentations=jR.enableInstrumentations=void 0;function Xwt(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()}}jR.enableInstrumentations=Xwt;function ekt(e){e.forEach(t=>t.disable())}jR.disableInstrumentations=ekt});var MLe=M(iG=>{"use strict";m();Object.defineProperty(iG,"__esModule",{value:!0});iG.registerInstrumentations=void 0;var OLe=($e(),Le(nt)),tkt=iee(),PLe=BLe();function nkt(e){let t=e.tracerProvider||OLe.trace.getTracerProvider(),n=e.meterProvider||OLe.metrics.getMeterProvider(),r=e.loggerProvider||tkt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,PLe.enableInstrumentations)(o,t,n,r),()=>{(0,PLe.disableInstrumentations)(o)}}iG.registerInstrumentations=nkt});var $Le=M(sG=>{"use strict";m();Object.defineProperty(sG,"__esModule",{value:!0});sG.satisfies=void 0;var cee=($e(),Le(nt)),GLe=/^(?: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-]+)*))?$/,rkt=/^(?<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-]+)*))?$/,okt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function ikt(e,t,n){if(!skt(e))return cee.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=lkt(e);if(!r)return!1;let o=[],i=jLe(r,t,o,n);return i&&!n?.includePrerelease?ukt(r,o):i}sG.satisfies=ikt;function skt(e){return typeof e=="string"&&GLe.test(e)}function jLe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(see(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=wkt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!see(e,i,n,r))return!1;return!0}return see(e,t,n,r)}function see(e,t,n,r){if(t=ckt(t,r),t.includes(" "))return jLe(e,t,n,r);{let o=dkt(t);return n.push(o),akt(e,o)}}function akt(e,t){if(t.invalid)return!1;if(!t.version||uee(t.version))return!0;let n=ULe(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=ULe(r,o)}return okt[t.op]?.includes(n)}function ukt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function ckt(e,t){return e=e.trim(),e=Dkt(e,t),e=xkt(e),e=Nkt(e,t),e=e.trim(),e}function nc(e){return!e||e.toLowerCase()==="x"||e==="*"}function lkt(e){let t=e.match(GLe);if(!t){cee.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 dkt(e){if(!e)return{};let t=e.match(rkt);if(!t)return cee.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,s=r.split("."),u=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:o,prereleaseSegments:u,prereleaseSegmentCount:u?u.length:0,build:i}}function uee(e){return e==="*"||e==="x"||e==="X"}function LLe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function pkt(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 fkt(e,t){if(uee(e)||uee(t))return 0;let[n,r]=pkt(LLe(e),LLe(t));return n>r?1:n<r?-1:0}function ULe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=fkt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var zLe="[a-zA-Z0-9-]",HLe="0|[1-9]\\d*",mkt=`\\d*[a-zA-Z-]${zLe}*`,Akt="((?:<|>)?=?)",QLe=`(?:${HLe}|${mkt})`,gkt=`(?:-(${QLe}(?:\\.${QLe})*))`,FLe=`${zLe}+`,hkt=`(?:\\+(${FLe}(?:\\.${FLe})*))`,aee=`${HLe}|x|X|\\*`,FB=`[v=\\s]*(${aee})(?:\\.(${aee})(?:\\.(${aee})(?:${gkt})?${hkt}?)?)?`,_kt=`^${Akt}\\s*${FB}$`,Ekt=new RegExp(_kt),ykt=`^\\s*(${FB})\\s+-\\s+(${FB})\\s*$`,Skt=new RegExp(ykt),Tkt="(?:~>?)",bkt=`^${Tkt}${FB}$`,Ikt=new RegExp(bkt),Ckt="(?:\\^)",vkt=`^${Ckt}${FB}$`,Rkt=new RegExp(vkt);function xkt(e){let t=Ikt;return e.replace(t,(n,r,o,i,s)=>{let u;return nc(r)?u="":nc(o)?u=`>=${r}.0.0 <${+r+1}.0.0-0`:nc(i)?u=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:s?u=`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:u=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,u})}function Dkt(e,t){let n=Rkt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,u,l)=>{let f;return nc(i)?f="":nc(s)?f=`>=${i}.0.0${r} <${+i+1}.0.0-0`:nc(u)?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}.${u}-${l} <${i}.${s}.${+u+1}-0`:f=`>=${i}.${s}.${u}-${l} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${u}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?f=`>=${i}.${s}.${u}${r} <${i}.${s}.${+u+1}-0`:f=`>=${i}.${s}.${u}${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${u} <${+i+1}.0.0-0`,f})}function Nkt(e,t){let n=Ekt;return e.replace(n,(r,o,i,s,u,l)=>{let f=nc(i),h=f||nc(s),_=h||nc(u),E=_;return o==="="&&E&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&E?(h&&(s=0),u=0,o===">"?(o=">=",h?(i=+i+1,s=0,u=0):(s=+s+1,u=0)):o==="<="&&(o="<",h?i=+i+1:s=+s+1),o==="<"&&(l="-0"),r=`${o+i}.${s}.${u}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:_&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function wkt(e,t){let n=Skt;return e.replace(n,(r,o,i,s,u,l,f,h,_,E,T,v)=>(nc(i)?o="":nc(s)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:nc(u)?o=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,nc(_)?h="":nc(E)?h=`<${+_+1}.0.0-0`:nc(T)?h=`<${_}.${+E+1}.0-0`:v?h=`<=${_}.${E}.${T}-${v}`:t?.includePrerelease?h=`<${_}.${E}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var lee=M(Fa=>{"use strict";m();Object.defineProperty(Fa,"__esModule",{value:!0});Fa.massUnwrap=Fa.unwrap=Fa.massWrap=Fa.wrap=void 0;var rc=console.error.bind(console);function GB(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 kkt=(e,t,n)=>{if(!e||!e[t]){rc("no original function "+String(t)+" to wrap");return}if(!n){rc("no wrapper function"),rc(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){rc("original object and wrapper must be functions");return}let o=n(r,t);return GB(o,"__original",r),GB(o,"__unwrap",()=>{e[t]===o&&GB(e,t,r)}),GB(o,"__wrapped",!0),GB(e,t,o),o};Fa.wrap=kkt;var Bkt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{rc("must provide one or more modules to patch"),rc(new Error().stack);return}if(!(t&&Array.isArray(t))){rc("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Fa.wrap)(r,o,n)})})};Fa.massWrap=Bkt;var Okt=(e,t)=>{if(!e||!e[t]){rc("no function to unwrap."),rc(new Error().stack);return}let n=e[t];if(!n.__unwrap)rc("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Fa.unwrap=Okt;var Pkt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{rc("must provide one or more modules to patch"),rc(new Error().stack);return}if(!(t&&Array.isArray(t))){rc("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Fa.unwrap)(n,r)})})};Fa.massUnwrap=Pkt;function jB(e){e&&e.logger&&(typeof e.logger!="function"?rc("new logger isn't a function, not replacing"):rc=e.logger)}Fa.default=jB;jB.wrap=Fa.wrap;jB.massWrap=Fa.massWrap;jB.unwrap=Fa.unwrap;jB.massUnwrap=Fa.massUnwrap});var qLe=M(uG=>{"use strict";m();Object.defineProperty(uG,"__esModule",{value:!0});uG.InstrumentationAbstract=void 0;var dee=($e(),Le(nt)),Mkt=iee(),aG=lee(),pee=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=dee.diag.createComponentLogger({namespace:t}),this._tracer=dee.trace.getTracer(t,n),this._meter=dee.metrics.getMeter(t,n),this._logger=Mkt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=aG.wrap;_unwrap=aG.unwrap;_massWrap=aG.massWrap;_massUnwrap=aG.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)}}};uG.InstrumentationAbstract=pee});var VLe=M(DE=>{"use strict";m();Object.defineProperty(DE,"__esModule",{value:!0});DE.ModuleNameTrie=DE.ModuleNameSeparator=void 0;DE.ModuleNameSeparator="/";var cG=class{hooks=[];children=new Map},fee=class{_trie=new cG;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(DE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new cG,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],s=!0;for(let u of t.split(DE.ModuleNameSeparator)){let l=o.children.get(u);if(!l){s=!1;break}r||i.push(...l.hooks),o=l}return r&&s&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((u,l)=>u.insertedId-l.insertedId),i.map(({hook:u})=>u))}};DE.ModuleNameTrie=fee});var YLe=M(lG=>{"use strict";m();Object.defineProperty(lG,"__esModule",{value:!0});lG.RequireInTheMiddleSingleton=void 0;var Lkt=SS(),KLe=Fe("path"),mee=VLe(),Ukt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),Aee=class e{_moduleNameTrie=new mee.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new Lkt.Hook(null,{internals:!0},(t,n,r)=>{let o=Qkt(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 Ukt?new e:this._instance=this._instance??new e}};lG.RequireInTheMiddleSingleton=Aee;function Qkt(e){return KLe.sep!==mee.ModuleNameSeparator?e.split(KLe.sep).join(mee.ModuleNameSeparator):e}});var gee=M(NE=>{"use strict";m();Object.defineProperty(NE,"__esModule",{value:!0});NE.isWrapped=NE.safeExecuteInTheMiddleAsync=NE.safeExecuteInTheMiddle=void 0;function Fkt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}NE.safeExecuteInTheMiddle=Fkt;async function Gkt(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}}NE.safeExecuteInTheMiddleAsync=Gkt;function jkt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}NE.isWrapped=jkt});var WLe=M(dG=>{"use strict";m();Object.defineProperty(dG,"__esModule",{value:!0});dG.InstrumentationBase=void 0;var zB=Fe("path"),JLe=Fe("util"),zkt=$Le(),hee=lee(),Hkt=qLe(),$kt=YLe(),qkt=ZW(),HB=($e(),Le(nt)),Vkt=SS(),Kkt=Fe("fs"),Ykt=gee(),_ee=class extends Hkt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=$kt.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,Ykt.isWrapped)(t[n])&&this._unwrap(t,n),JLe.types.isProxy(t)){let o=(0,hee.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,hee.wrap)(t,n,r)};_unwrap=(t,n)=>JLe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,hee.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{HB.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){HB.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{HB.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){HB.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,Kkt.readFileSync)(zB.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{HB.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 ZLe(t.supportedVersions,i,t.includePrerelease)&&typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:t.name,version:t.moduleVersion,baseDir:o}),t.patch(n,t.moduleVersion)):n;let s=t.files??[],u=zB.normalize(r);return s.filter(f=>f.name===u).filter(f=>ZLe(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,u,l)=>{if(!l&&zB.isAbsolute(u)){let f=zB.parse(u);u=f.name,l=f.dir}return this._onRequire(t,s,u,l)},r=(s,u,l)=>this._onRequire(t,s,u,l),o=zB.isAbsolute(t.name)?new Vkt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new qkt.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}};dG.InstrumentationBase=_ee;function ZLe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,zkt.satisfies)(t,r,{includePrerelease:n}))}});var XLe=M(pG=>{"use strict";m();Object.defineProperty(pG,"__esModule",{value:!0});pG.normalize=void 0;var Jkt=Fe("path");Object.defineProperty(pG,"normalize",{enumerable:!0,get:function(){return Jkt.normalize}})});var eUe=M(zR=>{"use strict";m();Object.defineProperty(zR,"__esModule",{value:!0});zR.normalize=zR.InstrumentationBase=void 0;var Zkt=WLe();Object.defineProperty(zR,"InstrumentationBase",{enumerable:!0,get:function(){return Zkt.InstrumentationBase}});var Wkt=XLe();Object.defineProperty(zR,"normalize",{enumerable:!0,get:function(){return Wkt.normalize}})});var Eee=M(HR=>{"use strict";m();Object.defineProperty(HR,"__esModule",{value:!0});HR.normalize=HR.InstrumentationBase=void 0;var tUe=eUe();Object.defineProperty(HR,"InstrumentationBase",{enumerable:!0,get:function(){return tUe.InstrumentationBase}});Object.defineProperty(HR,"normalize",{enumerable:!0,get:function(){return tUe.normalize}})});var nUe=M(fG=>{"use strict";m();Object.defineProperty(fG,"__esModule",{value:!0});fG.InstrumentationNodeModuleDefinition=void 0;var yee=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||[]}};fG.InstrumentationNodeModuleDefinition=yee});var rUe=M(mG=>{"use strict";m();Object.defineProperty(mG,"__esModule",{value:!0});mG.InstrumentationNodeModuleFile=void 0;var Xkt=Eee(),See=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,Xkt.normalize)(t)}};mG.InstrumentationNodeModuleFile=See});var oUe=M(aT=>{"use strict";m();Object.defineProperty(aT,"__esModule",{value:!0});aT.semconvStabilityFromStr=aT.SemconvStability=void 0;var AG;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(AG=aT.SemconvStability||(aT.SemconvStability={}));function eBt(e,t){let n=AG.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=AG.DUPLICATE;break}else o.toLowerCase()===e&&(n=AG.STABLE);return n}aT.semconvStabilityFromStr=eBt});var sUe=M(ps=>{"use strict";m();Object.defineProperty(ps,"__esModule",{value:!0});ps.semconvStabilityFromStr=ps.SemconvStability=ps.safeExecuteInTheMiddleAsync=ps.safeExecuteInTheMiddle=ps.isWrapped=ps.InstrumentationNodeModuleFile=ps.InstrumentationNodeModuleDefinition=ps.InstrumentationBase=ps.registerInstrumentations=void 0;var tBt=MLe();Object.defineProperty(ps,"registerInstrumentations",{enumerable:!0,get:function(){return tBt.registerInstrumentations}});var nBt=Eee();Object.defineProperty(ps,"InstrumentationBase",{enumerable:!0,get:function(){return nBt.InstrumentationBase}});var rBt=nUe();Object.defineProperty(ps,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return rBt.InstrumentationNodeModuleDefinition}});var oBt=rUe();Object.defineProperty(ps,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return oBt.InstrumentationNodeModuleFile}});var Tee=gee();Object.defineProperty(ps,"isWrapped",{enumerable:!0,get:function(){return Tee.isWrapped}});Object.defineProperty(ps,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return Tee.safeExecuteInTheMiddle}});Object.defineProperty(ps,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return Tee.safeExecuteInTheMiddleAsync}});var iUe=oUe();Object.defineProperty(ps,"SemconvStability",{enumerable:!0,get:function(){return iUe.SemconvStability}});Object.defineProperty(ps,"semconvStabilityFromStr",{enumerable:!0,get:function(){return iUe.semconvStabilityFromStr}})});function aBt(){let e=$R[Iee];return e?.helper?e.helper:$R[bee]?.helper}function uBt(e){let t={helper:e};$R[Iee]=t,$R[bee]=t}function cBt(){delete $R[Iee],delete $R[bee]}function pBt(e){return e==="client"?Ao.CLIENT:Ao.INTERNAL}function cUe(e,t,n,r,o){if(lUe(t.name,o))return;let i={attributes:t.attributes,kind:pBt(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 u=n.filter(l=>l.parentId===t.id);for(let l of u)cUe(e,l,n,r,o);s.end(t.endTime)})}function aUe(e,t){return mBt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function mBt(e){return e!=null&&typeof e.then=="function"}function lUe(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var gG,iBt,sBt,bee,Iee,$R,lBt,dBt,fBt,dUe,uUe,ABt,gBt,pUe,fUe=k(()=>{m();$e();gG=ue(sUe(),1);$e();iBt={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"}},sBt=iBt.version.split(".")[0],bee="PRISMA_INSTRUMENTATION",Iee=`V${sBt}_PRISMA_INSTRUMENTATION`,$R=globalThis;lBt=process.env.PRISMA_SHOW_ALL_TRACES==="true",dBt="00-10-10-00";fBt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=Jt.getSpanContext(e??Xe.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:dBt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)cUe(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return Xe.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!lBt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(lUe(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return aUe(i,t(i,r))}return n.startActiveSpan(o,e,i=>aUe(i,t(i,r)))}};dUe={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},uUe=dUe.version,ABt=dUe.name,gBt="@prisma/client",pUe=class extends gG.InstrumentationBase{tracerProvider;constructor(e={}){super(ABt,uUe,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new gG.InstrumentationNodeModuleDefinition(gBt,[uUe])]}enable(){let e=this._config;uBt(new fBt({tracerProvider:this.tracerProvider??Jt.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){cBt()}isEnabled(){return aBt()!==void 0}}});function hBt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function AUe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function _Bt(e){return e==="client"?Ao.CLIENT:Ao.INTERNAL}var mUe,Cee,EBt,gUe,hUe=k(()=>{m();$e();fUe();mt();yr();mUe="Prisma";Cee=class extends pUe{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=AUe();hBt(t)&&(t.createEngineSpan=n=>{let r=Jt.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){ti(()=>{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=_Bt(i.kind),u=i.parent_span_id,l=i.span_id,f=i.trace_id,h=i.links?.map(E=>({context:{traceId:E.trace_id,spanId:E.span_id,traceFlags:ou.SAMPLED}})),_=Jt.setSpanContext(Xe.active(),{traceId:f,spanId:u,traceFlags:ou.SAMPLED});Xe.with(_,()=>{let E={generateTraceId:()=>f,generateSpanId:()=>l};r._idGenerator=E,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}})}};EBt=ct(mUe,e=>new Cee(e)),gUe=e=>({name:mUe,setupOnce(){EBt(e)},setup(t){AUe()&&t.on("spanStart",n=>{let r=Lt(n);r.description?.startsWith("prisma:")&&n.setAttribute(Ut,"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 _Ue=M(qR=>{"use strict";m();Object.defineProperty(qR,"__esModule",{value:!0});qR.PACKAGE_NAME=qR.PACKAGE_VERSION=void 0;qR.PACKAGE_VERSION="0.60.0";qR.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var vee=M(rA=>{"use strict";m();Object.defineProperty(rA,"__esModule",{value:!0});rA.HapiLifecycleMethodNames=rA.HapiLayerType=rA.handlerPatched=rA.HapiComponentName=void 0;rA.HapiComponentName="@hapi/hapi";rA.handlerPatched=Symbol("hapi-handler-patched");rA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};rA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var EUe=M(hG=>{"use strict";m();Object.defineProperty(hG,"__esModule",{value:!0});hG.ATTR_HTTP_METHOD=void 0;hG.ATTR_HTTP_METHOD="http.method"});var Ree=M($B=>{"use strict";m();Object.defineProperty($B,"__esModule",{value:!0});$B.AttributeNames=void 0;var yBt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(yBt=$B.AttributeNames||($B.AttributeNames={}))});var TUe=M(fs=>{"use strict";m();Object.defineProperty(fs,"__esModule",{value:!0});fs.getPluginFromInput=fs.getExtMetadata=fs.getRouteMetadata=fs.isPatchableExtMethod=fs.isDirectExtInput=fs.isLifecycleExtEventObj=fs.isLifecycleExtType=fs.getPluginName=void 0;var yUe=(tr(),Le(Kr)),SBt=EUe(),qB=vee(),wE=Ree(),SUe=ln();function TBt(e){return e.name?e.name:e.pkg.name}fs.getPluginName=TBt;var bBt=e=>typeof e=="string"&&qB.HapiLifecycleMethodNames.has(e);fs.isLifecycleExtType=bBt;var IBt=e=>{let t=e?.type;return t!==void 0&&(0,fs.isLifecycleExtType)(t)};fs.isLifecycleExtEventObj=IBt;var CBt=e=>Array.isArray(e)&&e.length<=3&&(0,fs.isLifecycleExtType)(e[0])&&typeof e[1]=="function";fs.isDirectExtInput=CBt;var vBt=e=>!Array.isArray(e);fs.isPatchableExtMethod=vBt;var RBt=(e,t,n)=>{let r={[yUe.ATTR_HTTP_ROUTE]:e.path};t&SUe.SemconvStability.OLD&&(r[SBt.ATTR_HTTP_METHOD]=e.method),t&SUe.SemconvStability.STABLE&&(r[yUe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[wE.AttributeNames.HAPI_TYPE]=qB.HapiLayerType.PLUGIN,r[wE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[wE.AttributeNames.HAPI_TYPE]=qB.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};fs.getRouteMetadata=RBt;var xBt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[wE.AttributeNames.EXT_TYPE]:e,[wE.AttributeNames.HAPI_TYPE]:qB.HapiLayerType.EXT,[wE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[wE.AttributeNames.EXT_TYPE]:e,[wE.AttributeNames.HAPI_TYPE]:qB.HapiLayerType.EXT},name:r}};fs.getExtMetadata=xBt;var DBt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;fs.getPluginFromInput=DBt});var CUe=M(_G=>{"use strict";m();Object.defineProperty(_G,"__esModule",{value:!0});_G.HapiInstrumentation=void 0;var od=($e(),Le(nt)),bUe=Rr(),VB=ln(),IUe=_Ue(),KB=vee(),eh=TUe(),xee=class extends VB.InstrumentationBase{_semconvStability;constructor(t={}){super(IUe.PACKAGE_NAME,IUe.PACKAGE_VERSION,t),this._semconvStability=(0,VB.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new VB.InstrumentationNodeModuleDefinition(KB.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,VB.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,VB.isWrapped)(n.Server)||this._wrap(n,"Server",this._getServerPatch.bind(this)),n},t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._massUnwrap([n],["server","Server"])})}_getServerPatch(t){let n=this,r=this;return function(i){let s=t.apply(this,[i]);return r._wrap(s,"route",u=>n._getServerRoutePatch.bind(n)(u)),r._wrap(s,"ext",u=>n._getServerExtPatch.bind(n)(u)),r._wrap(s,"register",n._getServerRegisterPatch.bind(n)),s}}_getServerRegisterPatch(t){let n=this;return function(o,i){if(Array.isArray(o))for(let s of o){let u=(0,eh.getPluginFromInput)(s);n._wrapRegisterHandler(u)}else{let s=(0,eh.getPluginFromInput)(o);n._wrapRegisterHandler(s)}return t.apply(this,[o,i])}}_getServerExtPatch(t,n){let r=this;return function(...i){if(Array.isArray(i[0])){let s=i[0];for(let u=0;u<s.length;u++){let l=s[u];if((0,eh.isLifecycleExtType)(l.type)){let f=l,h=r._wrapExtMethods(f.method,l.type,n);f.method=h,s[u]=f}}return t.apply(this,i)}else if((0,eh.isDirectExtInput)(i)){let s=i,u=s[1],l=r._wrapExtMethods(u,s[0],n);return t.apply(this,[s[0],l,s[2]])}else if((0,eh.isLifecycleExtEventObj)(i[0])){let s=i[0],u=r._wrapExtMethods(s.method,s.type,n);return s.method=u,t.call(this,s)}return t.apply(this,i)}}_getServerRoutePatch(t,n){let r=this;return function(o){if(Array.isArray(o))for(let i=0;i<o.length;i++){let s=r._wrapRouteHandler.call(r,o[i],n);o[i]=s}else o=r._wrapRouteHandler.call(r,o,n);return t.apply(this,[o])}}_wrapRegisterHandler(t){let n=this,r=(0,eh.getPluginName)(t),o=t.register,i=this,s=function(u,l){return i._wrap(u,"route",f=>n._getServerRoutePatch.bind(n)(f,r)),i._wrap(u,"ext",f=>n._getServerExtPatch.bind(n)(f,r)),o.call(this,u,l)};t.register=s}_wrapExtMethods(t,n,r){let o=this;if(t instanceof Array){for(let i=0;i<t.length;i++)t[i]=o._wrapExtMethods(t[i],n);return t}else if((0,eh.isPatchableExtMethod)(t))return t[KB.handlerPatched]===!0?t:(t[KB.handlerPatched]=!0,async function(...s){if(od.trace.getSpan(od.context.active())===void 0)return await t.apply(this,s);let u=(0,eh.getExtMetadata)(n,r,t.name),l=o.tracer.startSpan(u.name,{attributes:u.attributes});try{return await od.context.with(od.trace.setSpan(od.context.active(),l),t,void 0,...s)}catch(f){throw l.recordException(f),l.setStatus({code:od.SpanStatusCode.ERROR,message:f.message}),f}finally{l.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[KB.handlerPatched]===!0)return t;t[KB.handlerPatched]=!0;let o=i=>async function(...s){if(od.trace.getSpan(od.context.active())===void 0)return await i.call(this,...s);let u=(0,bUe.getRPCMetadata)(od.context.active());u?.type===bUe.RPCType.HTTP&&(u.route=t.path);let l=(0,eh.getRouteMetadata)(t,r._semconvStability,n),f=r.tracer.startSpan(l.name,{attributes:l.attributes});try{return await od.context.with(od.trace.setSpan(od.context.active(),f),()=>i.call(this,...s))}catch(h){throw f.recordException(h),f.setStatus({code:od.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 u=i(s);return typeof u.handler=="function"&&(u.handler=o(u.handler)),u}}else typeof t.options?.handler=="function"&&(t.options.handler=o(t.options.handler));return t}};_G.HapiInstrumentation=xee});var vUe=M(VR=>{"use strict";m();Object.defineProperty(VR,"__esModule",{value:!0});VR.AttributeNames=VR.HapiInstrumentation=void 0;var NBt=CUe();Object.defineProperty(VR,"HapiInstrumentation",{enumerable:!0,get:function(){return NBt.HapiInstrumentation}});var wBt=Ree();Object.defineProperty(VR,"AttributeNames",{enumerable:!0,get:function(){return wBt.AttributeNames}})});var RUe,xUe,DUe,kBt,NUe,wUe=k(()=>{m();RUe=ue(vUe(),1);yr();xUe="Hapi",DUe=ct(xUe,()=>new RUe.HapiInstrumentation),kBt=(()=>({name:xUe,setupOnce(){DUe()}})),NUe=kBt});var kE,YB,Dee=k(()=>{m();kE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},YB={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var yG,BBt,OBt,EG,kUe=k(()=>{m();$e();yG=ue(ln(),1);mt();Dee();BBt="@sentry/instrumentation-hono",OBt="0.0.1",EG=class extends yG.InstrumentationBase{constructor(t={}){super(BBt,OBt,t)}init(){return[new yG.InstrumentationNodeModuleDefinition("hono",[">=4.0.0 <5"],t=>this._patch(t))]}_patch(t){let n=this;class r extends t.Hono{constructor(...i){super(...i),n._wrap(this,"get",n._patchHandler()),n._wrap(this,"post",n._patchHandler()),n._wrap(this,"put",n._patchHandler()),n._wrap(this,"delete",n._patchHandler()),n._wrap(this,"options",n._patchHandler()),n._wrap(this,"patch",n._patchHandler()),n._wrap(this,"all",n._patchHandler()),n._wrap(this,"on",n._patchOnHandler()),n._wrap(this,"use",n._patchMiddlewareHandler())}}try{t.Hono=r}catch{return{...t,Hono:r}}return t}_patchHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let s=o.slice(1);return n.apply(this,[i,...s.map(u=>t._wrapHandler(u))])}return n.apply(this,o.map(i=>t._wrapHandler(i)))}}}_patchOnHandler(){let t=this;return function(n){return function(...o){let i=o.slice(2);return n.apply(this,[...o.slice(0,2),...i.map(s=>t._wrapHandler(s))])}}}_patchMiddlewareHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let s=o.slice(1);return n.apply(this,[i,...s.map(u=>t._wrapHandler(u))])}return n.apply(this,o.map(i=>t._wrapHandler(i)))}}}_wrapHandler(t){let n=this;return function(r,o){if(!n.isEnabled())return t.apply(this,[r,o]);let i=r.req.path,s=n.tracer.startSpan(i);return Xe.with(Jt.setSpan(Xe.active(),s),()=>n._safeExecute(()=>{let u=t.apply(this,[r,o]);if(wa(u))return u.then(l=>{let f=n._determineHandlerType(l);return s.setAttributes({[kE.HONO_TYPE]:f,[kE.HONO_NAME]:f===YB.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),l});{let l=n._determineHandlerType(u);return s.setAttributes({[kE.HONO_TYPE]:l,[kE.HONO_NAME]:l===YB.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),u}},()=>s.end(),u=>{n._handleError(s,u),s.end()}))}}_safeExecute(t,n,r){try{let o=t();return wa(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?YB.MIDDLEWARE:YB.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:hi.ERROR,message:n.message}),t.recordException(n))}}});function PBt(e){let t=Lt(e).data,n=t[kE.HONO_TYPE];if(t[on]||!n)return;e.setAttributes({[Ut]:"auto.http.otel.hono",[on]:`${n}.hono`});let r=t[kE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),xn()===ep()){ks&&W.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[Rg],i=t[gS];typeof o=="string"&&typeof i=="string"&&xn().setTransactionName(`${i} ${o}`)}var BUe,OUe,MBt,PUe,MUe=k(()=>{m();tr();mt();yr();JS();Dee();kUe();BUe="Hono";OUe=ct(BUe,()=>new EG({responseHook:e=>{PBt(e)}})),MBt=(()=>({name:BUe,setupOnce(){OUe()}})),PUe=MBt});var SG=M(JB=>{"use strict";m();Object.defineProperty(JB,"__esModule",{value:!0});JB.KoaLayerType=void 0;var LBt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(LBt=JB.KoaLayerType||(JB.KoaLayerType={}))});var LUe=M(KR=>{"use strict";m();Object.defineProperty(KR,"__esModule",{value:!0});KR.PACKAGE_NAME=KR.PACKAGE_VERSION=void 0;KR.PACKAGE_VERSION="0.62.0";KR.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var Nee=M(ZB=>{"use strict";m();Object.defineProperty(ZB,"__esModule",{value:!0});ZB.AttributeNames=void 0;var UBt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(UBt=ZB.AttributeNames||(ZB.AttributeNames={}))});var QUe=M(YR=>{"use strict";m();Object.defineProperty(YR,"__esModule",{value:!0});YR.isLayerIgnored=YR.getMiddlewareMetadata=void 0;var UUe=SG(),TG=Nee(),QBt=(tr(),Le(Kr)),FBt=(e,t,n,r)=>n?{attributes:{[TG.AttributeNames.KOA_NAME]:r?.toString(),[TG.AttributeNames.KOA_TYPE]:UUe.KoaLayerType.ROUTER,[QBt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[TG.AttributeNames.KOA_NAME]:t.name??"middleware",[TG.AttributeNames.KOA_TYPE]:UUe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};YR.getMiddlewareMetadata=FBt;var GBt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));YR.isLayerIgnored=GBt});var FUe=M(bG=>{"use strict";m();Object.defineProperty(bG,"__esModule",{value:!0});bG.kLayerPatched=void 0;bG.kLayerPatched=Symbol("koa-layer-patched")});var qUe=M(IG=>{"use strict";m();Object.defineProperty(IG,"__esModule",{value:!0});IG.KoaInstrumentation=void 0;var oA=($e(),Le(nt)),WB=ln(),GUe=SG(),jUe=LUe(),zUe=QUe(),HUe=Rr(),$Ue=FUe(),wee=class extends WB.InstrumentationBase{constructor(t={}){super(jUe.PACKAGE_NAME,jUe.PACKAGE_VERSION,t)}init(){return new WB.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,WB.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,WB.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){oA.diag.debug("Patching @koa/router dispatch");let r=t.router?.stack??[];for(let o of r){let i=o.path,s=o.stack;for(let u=0;u<s.length;u++){let l=s[u];s[u]=this._patchLayer(l,!0,i)}}return t}_patchLayer(t,n,r){let o=n?GUe.KoaLayerType.ROUTER:GUe.KoaLayerType.MIDDLEWARE;return t[$Ue.kLayerPatched]===!0||(0,zUe.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(oA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[$Ue.kLayerPatched]=!0,oA.diag.debug("patching Koa middleware layer"),async(i,s)=>{if(oA.trace.getSpan(oA.context.active())===void 0)return t(i,s);let l=(0,zUe.getMiddlewareMetadata)(i,t,n,r),f=this.tracer.startSpan(l.name,{attributes:l.attributes}),h=(0,HUe.getRPCMetadata)(oA.context.active());h?.type===HUe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:_}=this.getConfig();_&&(0,WB.safeExecuteInTheMiddle)(()=>_(f,{context:i,middlewareLayer:t,layerType:o}),T=>{T&&oA.diag.error("koa instrumentation: request hook failed",T)},!0);let E=oA.trace.setSpan(oA.context.active(),f);return oA.context.with(E,async()=>{try{return await t(i,s)}catch(T){throw f.recordException(T),T}finally{f.end()}})})}};IG.KoaInstrumentation=wee});var VUe=M(BE=>{"use strict";m();Object.defineProperty(BE,"__esModule",{value:!0});BE.KoaLayerType=BE.AttributeNames=BE.KoaInstrumentation=void 0;var jBt=qUe();Object.defineProperty(BE,"KoaInstrumentation",{enumerable:!0,get:function(){return jBt.KoaInstrumentation}});var zBt=Nee();Object.defineProperty(BE,"AttributeNames",{enumerable:!0,get:function(){return zBt.AttributeNames}});var HBt=SG();Object.defineProperty(BE,"KoaLayerType",{enumerable:!0,get:function(){return HBt.KoaLayerType}})});var KUe,YUe,JUe,$Bt,ZUe,WUe=k(()=>{m();KUe=ue(VUe(),1);tr();mt();yr();JS();YUe="Koa",JUe=ct(YUe,KUe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Jr(t,"auto.http.otel.koa");let r=Lt(t).data,o=r["koa.type"];o&&t.setAttribute(on,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),xn()===ep()){ks&&W.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let s=r[Rg],u=n.context?.request?.method?.toUpperCase()||"GET";s&&xn().setTransactionName(`${u} ${s}`)}})),$Bt=((e={})=>({name:YUe,setupOnce(){JUe(e)}})),ZUe=$Bt});var kee=M(wf=>{"use strict";m();Object.defineProperty(wf,"__esModule",{value:!0});wf.ConnectNames=wf.ConnectTypes=wf.AttributeNames=void 0;var qBt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(qBt=wf.AttributeNames||(wf.AttributeNames={}));var VBt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(VBt=wf.ConnectTypes||(wf.ConnectTypes={}));var KBt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(KBt=wf.ConnectNames||(wf.ConnectNames={}))});var XUe=M(JR=>{"use strict";m();Object.defineProperty(JR,"__esModule",{value:!0});JR.PACKAGE_NAME=JR.PACKAGE_VERSION=void 0;JR.PACKAGE_VERSION="0.57.0";JR.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var eQe=M(CG=>{"use strict";m();Object.defineProperty(CG,"__esModule",{value:!0});CG._LAYERS_STORE_PROPERTY=void 0;CG._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var tQe=M(PE=>{"use strict";m();Object.defineProperty(PE,"__esModule",{value:!0});PE.generateRoute=PE.replaceCurrentStackRoute=PE.addNewStackLayer=void 0;var YBt=($e(),Le(nt)),OE=eQe(),JBt=e=>{Array.isArray(e[OE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,OE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[OE._LAYERS_STORE_PROPERTY].push("/");let t=e[OE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[OE._LAYERS_STORE_PROPERTY].length?e[OE._LAYERS_STORE_PROPERTY].pop():YBt.diag.warn("Connect: Trying to pop the stack multiple time")}};PE.addNewStackLayer=JBt;var ZBt=(e,t)=>{t&&e[OE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};PE.replaceCurrentStackRoute=ZBt;var WBt=e=>e[OE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);PE.generateRoute=WBt});var oQe=M(ME=>{"use strict";m();Object.defineProperty(ME,"__esModule",{value:!0});ME.ConnectInstrumentation=ME.ANONYMOUS_NAME=void 0;var XBt=($e(),Le(nt)),nQe=Rr(),ZR=kee(),rQe=XUe(),vG=ln(),eOt=(tr(),Le(Kr)),Bee=tQe();ME.ANONYMOUS_NAME="anonymous";var Oee=class extends vG.InstrumentationBase{constructor(t={}){super(rQe.PACKAGE_NAME,rQe.PACKAGE_VERSION,t)}init(){return[new vG.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,vG.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,vG.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=ZR.ConnectTypes.REQUEST_HANDLER,i=ZR.ConnectNames.REQUEST_HANDLER,o=t):(r=ZR.ConnectTypes.MIDDLEWARE,i=ZR.ConnectNames.MIDDLEWARE,o=n.name||ME.ANONYMOUS_NAME);let s=`${i} - ${o}`,u={attributes:{[eOt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[ZR.AttributeNames.CONNECT_TYPE]:r,[ZR.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(s,u)}_patchMiddleware(t,n){let r=this,o=n.length===4;function i(){if(!r.isEnabled())return n.apply(this,arguments);let[s,u,l]=o?[1,2,3]:[0,1,2],f=arguments[s],h=arguments[u],_=arguments[l];(0,Bee.replaceCurrentStackRoute)(f,t);let E=(0,nQe.getRPCMetadata)(XBt.context.active());t&&E?.type===nQe.RPCType.HTTP&&(E.route=(0,Bee.generateRoute)(f));let T="";t?T=`request handler - ${t}`:T=`middleware - ${n.name||ME.ANONYMOUS_NAME}`;let v=r._startSpan(t,n);r._diag.debug("start span",T);let R=!1;function x(){R?r._diag.debug(`span ${v.name} - already finished`):(R=!0,r._diag.debug(`finishing span ${v.name}`),v.end()),h.removeListener("close",x)}return h.addListener("close",x),arguments[l]=r._patchNext(_,x),n.apply(this,arguments)}return Object.defineProperty(i,"length",{value:n.length,writable:!1,configurable:!0}),i}_patchUse(t){let n=this;return function(...r){let o=r[r.length-1],i=r[r.length-2]||"";return r[r.length-1]=n._patchMiddleware(i,o),t.apply(this,r)}}_patchHandle(t){let n=this;return function(){let[r,o]=[0,2],i=arguments[r],s=arguments[o],u=(0,Bee.addNewStackLayer)(i);return typeof s=="function"&&(arguments[o]=n._patchOut(s,u)),t.apply(this,arguments)}}_patchOut(t,n){return function(...o){return n(),Reflect.apply(t,this,o)}}};ME.ConnectInstrumentation=Oee});var sQe=M(gp=>{"use strict";m();Object.defineProperty(gp,"__esModule",{value:!0});gp.ConnectTypes=gp.ConnectNames=gp.AttributeNames=gp.ANONYMOUS_NAME=gp.ConnectInstrumentation=void 0;var iQe=oQe();Object.defineProperty(gp,"ConnectInstrumentation",{enumerable:!0,get:function(){return iQe.ConnectInstrumentation}});Object.defineProperty(gp,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return iQe.ANONYMOUS_NAME}});var Pee=kee();Object.defineProperty(gp,"AttributeNames",{enumerable:!0,get:function(){return Pee.AttributeNames}});Object.defineProperty(gp,"ConnectNames",{enumerable:!0,get:function(){return Pee.ConnectNames}});Object.defineProperty(gp,"ConnectTypes",{enumerable:!0,get:function(){return Pee.ConnectTypes}})});var aQe,uQe,cQe,tOt,lQe,dQe=k(()=>{m();aQe=ue(sQe(),1);yr();uQe="Connect",cQe=ct(uQe,()=>new aQe.ConnectInstrumentation),tOt=(()=>({name:uQe,setupOnce(){cQe()}})),lQe=tOt});var pQe=M(pa=>{"use strict";m();Object.defineProperty(pa,"__esModule",{value:!0});pa.DB_SYSTEM_VALUE_MSSQL=pa.ATTR_NET_PEER_PORT=pa.ATTR_NET_PEER_NAME=pa.ATTR_DB_USER=pa.ATTR_DB_SYSTEM=pa.ATTR_DB_STATEMENT=pa.ATTR_DB_SQL_TABLE=pa.ATTR_DB_NAME=void 0;pa.ATTR_DB_NAME="db.name";pa.ATTR_DB_SQL_TABLE="db.sql.table";pa.ATTR_DB_STATEMENT="db.statement";pa.ATTR_DB_SYSTEM="db.system";pa.ATTR_DB_USER="db.user";pa.ATTR_NET_PEER_NAME="net.peer.name";pa.ATTR_NET_PEER_PORT="net.peer.port";pa.DB_SYSTEM_VALUE_MSSQL="mssql"});var fQe=M(WR=>{"use strict";m();Object.defineProperty(WR,"__esModule",{value:!0});WR.once=WR.getSpanName=void 0;function nOt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}WR.getSpanName=nOt;var rOt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};WR.once=rOt});var mQe=M(XR=>{"use strict";m();Object.defineProperty(XR,"__esModule",{value:!0});XR.PACKAGE_NAME=XR.PACKAGE_VERSION=void 0;XR.PACKAGE_VERSION="0.33.0";XR.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var EQe=M(UE=>{"use strict";m();Object.defineProperty(UE,"__esModule",{value:!0});UE.TediousInstrumentation=UE.INJECTED_CTX=void 0;var ex=($e(),Le(nt)),oOt=Fe("events"),iA=ln(),uT=(tr(),Le(Kr)),LE=pQe(),AQe=fQe(),gQe=mQe(),_Qe=Symbol("opentelemetry.instrumentation-tedious.current-database");UE.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var hQe=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function RG(e){Object.defineProperty(this,_Qe,{value:e,writable:!0})}var Mee=class e extends iA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(gQe.PACKAGE_NAME,gQe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,iA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,iA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new iA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of hQe)(0,iA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,iA.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 hQe)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return RG.call(this,this.config?.options?.database),this.removeListener("databaseChange",RG),this.on("databaseChange",RG),this.once("end",()=>{this.removeListener("databaseChange",RG)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||ex.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,UE.INJECTED_CTX,{value:!0});let u=Buffer.from(r,"utf8");s.addParameter("opentelemetry_traceparent",n.TYPES.VarBinary,u,{length:u.length}),t.execSql(s)}catch{o()}})}_shouldInjectFor(t){return t==="execSql"||t==="execSqlBatch"||t==="callProcedure"||t==="execute"}_patchQuery(t,n){return r=>{let o=this;function i(s){if(s?.[UE.INJECTED_CTX])return r.apply(this,arguments);if(!(s instanceof oOt.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let u=0,l=0,f=()=>l++,h=()=>u++,_=this[_Qe],E=(j=>j.sqlTextOrProcedure==="sp_prepare"&&j.parametersByName?.stmt?.value?j.parametersByName.stmt.value:j.sqlTextOrProcedure)(s),T={};o._dbSemconvStability&iA.SemconvStability.OLD&&(T[LE.ATTR_DB_SYSTEM]=LE.DB_SYSTEM_VALUE_MSSQL,T[LE.ATTR_DB_NAME]=_,T[LE.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,T[LE.ATTR_DB_STATEMENT]=E,T[LE.ATTR_DB_SQL_TABLE]=s.table),o._dbSemconvStability&iA.SemconvStability.STABLE&&(T[uT.ATTR_DB_NAMESPACE]=_,T[uT.ATTR_DB_SYSTEM_NAME]=uT.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,T[uT.ATTR_DB_QUERY_TEXT]=E,T[uT.ATTR_DB_COLLECTION_NAME]=s.table),o._netSemconvStability&iA.SemconvStability.OLD&&(T[LE.ATTR_NET_PEER_NAME]=this.config?.server,T[LE.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&iA.SemconvStability.STABLE&&(T[uT.ATTR_SERVER_ADDRESS]=this.config?.server,T[uT.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,AQe.getSpanName)(t,_,E,s.table),{kind:ex.SpanKind.CLIENT,attributes:T}),R=(0,AQe.once)(j=>{s.removeListener("done",f),s.removeListener("doneInProc",f),s.removeListener("doneProc",h),s.removeListener("error",R),this.removeListener("end",R),v.setAttribute("tedious.procedure_count",u),v.setAttribute("tedious.statement_count",l),j&&v.setStatus({code:ex.SpanStatusCode.ERROR,message:j.message}),v.end()});s.on("done",f),s.on("doneInProc",f),s.on("doneProc",h),s.once("error",R),this.on("end",R),typeof s.callback=="function"?o._wrap(s,"callback",o._patchCallbackQuery(R)):o._diag.error("Expected request.callback to be a function");let x=()=>ex.context.with(ex.trace.setSpan(ex.context.active(),v),r,this,...arguments);if(!(o.getConfig().enableTraceContextPropagation&&o._shouldInjectFor(t)))return x();let G=o._buildTraceparent(v);o._injectContextInfo(this,n,G).finally(x)}return Object.defineProperty(i,"length",{value:r.length,writable:!1}),i}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r),n.apply(this,arguments)}}};UE.TediousInstrumentation=Mee});var yQe=M(xG=>{"use strict";m();Object.defineProperty(xG,"__esModule",{value:!0});xG.TediousInstrumentation=void 0;var iOt=EQe();Object.defineProperty(xG,"TediousInstrumentation",{enumerable:!0,get:function(){return iOt.TediousInstrumentation}})});var SQe,sOt,TQe,bQe,aOt,IQe,CQe=k(()=>{m();SQe=ue(yQe(),1);mt();yr();sOt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),TQe="Tedious",bQe=ct(TQe,()=>new SQe.TediousInstrumentation({})),aOt=(()=>{let e;return{name:TQe,setupOnce(){let t=bQe();e=Pk(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=Lt(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";sOt.has(i)&&n.setAttribute(Ut,"auto.db.otel.tedious")}))}}}),IQe=aOt});var vQe=M(tx=>{"use strict";m();Object.defineProperty(tx,"__esModule",{value:!0});tx.PACKAGE_NAME=tx.PACKAGE_VERSION=void 0;tx.PACKAGE_VERSION="0.57.0";tx.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var xQe=M(DG=>{"use strict";m();Object.defineProperty(DG,"__esModule",{value:!0});DG.GenericPoolInstrumentation=void 0;var nx=($e(),Le(nt)),cT=ln(),RQe=vQe(),Lee="generic-pool",Uee=class extends cT.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(RQe.PACKAGE_NAME,RQe.PACKAGE_VERSION,t)}init(){return[new cT.InstrumentationNodeModuleDefinition(Lee,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,cT.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 cT.InstrumentationNodeModuleDefinition(Lee,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,cT.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 cT.InstrumentationNodeModuleDefinition(Lee,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,cT.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=nx.context.active(),s=n.tracer.startSpan("generic-pool.acquire",{},i);return nx.context.with(nx.trace.setSpan(i,s),()=>t.call(this,...o).then(u=>(s.end(),u),u=>{throw s.recordException(u),s.end(),u}))}}_poolWrapper(t){let n=this;return function(){let o=t.apply(this,arguments);return n._wrap(o,"acquire",n._acquireWithCallbacksPatcher.bind(n)),o}}_acquireWithCallbacksPatcher(t){let n=this;return function(o,i){if(n._isDisabled)return t.call(this,o,i);let s=nx.context.active(),u=n.tracer.startSpan("generic-pool.acquire",{},s);return nx.context.with(nx.trace.setSpan(s,u),()=>{t.call(this,(l,f)=>{if(u.end(),o)return o(l,f)},i)})}}};DG.GenericPoolInstrumentation=Uee});var DQe=M(NG=>{"use strict";m();Object.defineProperty(NG,"__esModule",{value:!0});NG.GenericPoolInstrumentation=void 0;var uOt=xQe();Object.defineProperty(NG,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return uOt.GenericPoolInstrumentation}})});var NQe,wQe,kQe,cOt,BQe,OQe=k(()=>{m();NQe=ue(DQe(),1);mt();yr();wQe="GenericPool",kQe=ct(wQe,()=>new NQe.GenericPoolInstrumentation({})),cOt=(()=>{let e;return{name:wQe,setupOnce(){let t=kQe();e=Pk(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=Lt(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(Ut,"auto.db.otel.generic_pool")}))}}}),BQe=cOt});var Qee=M(sA=>{"use strict";m();Object.defineProperty(sA,"__esModule",{value:!0});sA.ATTR_NET_PEER_PORT=sA.ATTR_NET_PEER_NAME=sA.ATTR_MESSAGING_SYSTEM=sA.ATTR_MESSAGING_OPERATION=void 0;sA.ATTR_MESSAGING_OPERATION="messaging.operation";sA.ATTR_MESSAGING_SYSTEM="messaging.system";sA.ATTR_NET_PEER_NAME="net.peer.name";sA.ATTR_NET_PEER_PORT="net.peer.port"});var Fee=M(Ti=>{"use strict";m();Object.defineProperty(Ti,"__esModule",{value:!0});Ti.ATTR_MESSAGING_CONVERSATION_ID=Ti.OLD_ATTR_MESSAGING_MESSAGE_ID=Ti.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=Ti.ATTR_MESSAGING_URL=Ti.ATTR_MESSAGING_PROTOCOL_VERSION=Ti.ATTR_MESSAGING_PROTOCOL=Ti.MESSAGING_OPERATION_VALUE_PROCESS=Ti.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=Ti.ATTR_MESSAGING_DESTINATION_KIND=Ti.ATTR_MESSAGING_DESTINATION=void 0;Ti.ATTR_MESSAGING_DESTINATION="messaging.destination";Ti.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";Ti.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";Ti.MESSAGING_OPERATION_VALUE_PROCESS="process";Ti.ATTR_MESSAGING_PROTOCOL="messaging.protocol";Ti.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";Ti.ATTR_MESSAGING_URL="messaging.url";Ti.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";Ti.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";Ti.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var Gee=M(lT=>{"use strict";m();Object.defineProperty(lT,"__esModule",{value:!0});lT.DEFAULT_CONFIG=lT.EndOperation=void 0;var lOt;(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"})(lOt=lT.EndOperation||(lT.EndOperation={}));lT.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var UQe=M(bi=>{"use strict";m();Object.defineProperty(bi,"__esModule",{value:!0});bi.isConfirmChannelTracing=bi.unmarkConfirmChannelTracing=bi.markConfirmChannelTracing=bi.getConnectionAttributesFromUrl=bi.getConnectionAttributesFromServer=bi.normalizeExchange=bi.CONNECTION_ATTRIBUTES=bi.CHANNEL_CONSUME_TIMEOUT_TIMER=bi.CHANNEL_SPANS_NOT_ENDED=bi.MESSAGE_STORED_SPAN=void 0;var jee=($e(),Le(nt)),QE=ln(),wG=(tr(),Le(Kr)),XB=Qee(),kG=Fee();bi.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");bi.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");bi.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");bi.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var zee=(0,jee.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),dOt=e=>e!==""?e:"<default>";bi.normalizeExchange=dOt;var pOt=e=>e.replace(/:[^:@/]*@/,":***@"),PQe=(e,t)=>e||(t==="AMQP"?5672:5671),MQe=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},LQe=e=>e||"localhost",aA=(e,t,n,r)=>n?{[t]:n}:(jee.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),fOt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[XB.ATTR_MESSAGING_SYSTEM]:t}:{}};bi.getConnectionAttributesFromServer=fOt;var mOt=(e,t)=>{let n={[kG.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=MQe(r?.protocol);Object.assign(n,{...aA(e,kG.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=LQe(r?.hostname);t&QE.SemconvStability.OLD&&Object.assign(n,{...aA(e,XB.ATTR_NET_PEER_NAME,i,"hostname")}),t&QE.SemconvStability.STABLE&&Object.assign(n,{...aA(e,wG.ATTR_SERVER_ADDRESS,i,"hostname")});let s=PQe(r.port,o);t&QE.SemconvStability.OLD&&Object.assign(n,aA(e,XB.ATTR_NET_PEER_PORT,s,"port")),t&QE.SemconvStability.STABLE&&Object.assign(n,aA(e,wG.ATTR_SERVER_PORT,s,"port"))}else{let r=pOt(e);n[kG.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=MQe(o.protocol);Object.assign(n,{...aA(r,kG.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let s=LQe(o.hostname);t&QE.SemconvStability.OLD&&Object.assign(n,{...aA(r,XB.ATTR_NET_PEER_NAME,s,"hostname")}),t&QE.SemconvStability.STABLE&&Object.assign(n,{...aA(r,wG.ATTR_SERVER_ADDRESS,s,"hostname")});let u=PQe(o.port?parseInt(o.port):void 0,i);t&QE.SemconvStability.OLD&&Object.assign(n,aA(r,XB.ATTR_NET_PEER_PORT,u,"port")),t&QE.SemconvStability.STABLE&&Object.assign(n,aA(r,wG.ATTR_SERVER_PORT,u,"port"))}catch(o){jee.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};bi.getConnectionAttributesFromUrl=mOt;var AOt=e=>e.setValue(zee,!0);bi.markConfirmChannelTracing=AOt;var gOt=e=>e.deleteValue(zee);bi.unmarkConfirmChannelTracing=gOt;var hOt=e=>e.getValue(zee)===!0;bi.isConfirmChannelTracing=hOt});var QQe=M(rx=>{"use strict";m();Object.defineProperty(rx,"__esModule",{value:!0});rx.PACKAGE_NAME=rx.PACKAGE_VERSION=void 0;rx.PACKAGE_VERSION="0.61.0";rx.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var GQe=M(PG=>{"use strict";m();Object.defineProperty(PG,"__esModule",{value:!0});PG.AmqplibInstrumentation=void 0;var ii=($e(),Le(nt)),BG=Rr(),Dr=ln(),_Ot=Qee(),id=Fee(),oc=Gee(),Ii=UQe(),FQe=QQe(),OG=[">=0.5.5 <1"],Hee=class extends Dr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(FQe.PACKAGE_NAME,FQe.PACKAGE_VERSION,{...oc.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Dr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...oc.DEFAULT_CONFIG,...t})}init(){let t=new Dr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",OG,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new Dr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",OG,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new Dr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",OG,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new Dr.InstrumentationNodeModuleDefinition("amqplib",OG,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,Dr.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,Dr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,Dr.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,Dr.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,Dr.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,oc.EndOperation.Ack)),(0,Dr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,oc.EndOperation.Nack)),(0,Dr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,oc.EndOperation.Reject)),(0,Dr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,oc.EndOperation.AckAll)),(0,Dr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,oc.EndOperation.NackAll)),(0,Dr.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,Dr.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,Dr.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,Dr.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,Dr.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,Dr.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,Dr.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,Dr.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,Dr.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,Dr.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,Dr.isWrapped)(t.ConfirmChannel.prototype.publish)&&this._unwrap(t.ConfirmChannel.prototype,"publish"),t}getConnectPatch(t){let n=this;return function(o,i,s){return t.call(this,o,i,function(u,l){if(u==null){let f=(0,Ii.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,Ii.getConnectionAttributesFromServer)(l);l[Ii.CONNECTION_ATTRIBUTES]={...f,...h}}s.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,oc.EndOperation.ChannelClosed,void 0);let i=this[Ii.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[Ii.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,oc.EndOperation.ChannelError,void 0);return t.apply(this,arguments)}}getAckAllPatch(t,n,r){let o=this;return function(s){return o.endAllSpansOnChannel(this,t,n,s),r.apply(this,arguments)}}getAckPatch(t,n,r){let o=this;return function(s,u,l){let f=this,h=n===oc.EndOperation.Reject?u:l,_=f[Ii.CHANNEL_SPANS_NOT_ENDED]??[],E=_.findIndex(T=>T.msg===s);if(E<0)o.endConsumerSpan(s,t,n,h);else if(n!==oc.EndOperation.Reject&&u){for(let T=0;T<=E;T++)o.endConsumerSpan(_[T].msg,t,n,h);_.splice(0,E+1)}else o.endConsumerSpan(s,t,n,h),_.splice(E,1);return r.apply(this,arguments)}}getConsumePatch(t,n){let r=this;return function(i,s,u){let l=this;if(!Object.prototype.hasOwnProperty.call(l,Ii.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let _=setInterval(()=>{r.checkConsumeTimeoutOnChannel(l)},h);_.unref(),l[Ii.CHANNEL_CONSUME_TIMEOUT_TIMER]=_}l[Ii.CHANNEL_SPANS_NOT_ENDED]=[]}let f=function(h){if(!h)return s.call(this,h);let _=h.properties.headers??{},E=ii.propagation.extract(ii.ROOT_CONTEXT,_),T=h.fields?.exchange,v;if(r._config.useLinksForConsume){let P=E?ii.trace.getSpan(E)?.spanContext():void 0;E=void 0,P&&(v=[{context:P}])}let R=r.tracer.startSpan(`${i} process`,{kind:ii.SpanKind.CONSUMER,attributes:{...l?.connection?.[Ii.CONNECTION_ATTRIBUTES],[id.ATTR_MESSAGING_DESTINATION]:T,[id.ATTR_MESSAGING_DESTINATION_KIND]:id.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[id.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[_Ot.ATTR_MESSAGING_OPERATION]:id.MESSAGING_OPERATION_VALUE_PROCESS,[id.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[id.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:v},E),{consumeHook:x}=r.getConfig();x&&(0,Dr.safeExecuteInTheMiddle)(()=>x(R,{moduleVersion:t,msg:h}),P=>{P&&ii.diag.error("amqplib instrumentation: consumerHook error",P)},!0),u?.noAck||(l[Ii.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,BG.hrTime)()}),h[Ii.MESSAGE_STORED_SPAN]=R);let B=E||ii.ROOT_CONTEXT;ii.context.with(ii.trace.setSpan(B,R),()=>{s.call(this,h)}),u?.noAck&&(r.callConsumeEndHook(R,h,!1,oc.EndOperation.AutoAck),R.end())};return arguments[1]=f,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,s,u,l,f){let h=this,{span:_,modifiedOptions:E}=r.createPublishSpan(r,i,s,h,l),{publishHook:T}=r.getConfig();T&&(0,Dr.safeExecuteInTheMiddle)(()=>T(_,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:E,isConfirmChannel:!0}),B=>{B&&ii.diag.error("amqplib instrumentation: publishHook error",B)},!0);let v=function(B,P){try{f?.call(this,B,P)}finally{let{publishConfirmHook:G}=r.getConfig();G&&(0,Dr.safeExecuteInTheMiddle)(()=>G(_,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:l,isConfirmChannel:!0,confirmError:B}),j=>{j&&ii.diag.error("amqplib instrumentation: publishConfirmHook error",j)},!0),B&&_.setStatus({code:ii.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),_.end()}},R=(0,Ii.markConfirmChannelTracing)(ii.context.active()),x=[...arguments];return x[3]=E,x[4]=ii.context.bind((0,Ii.unmarkConfirmChannelTracing)(ii.trace.setSpan(R,_)),v),ii.context.with(R,n.bind(this,...x))}}getPublishPatch(t,n){let r=this;return function(i,s,u,l){if((0,Ii.isConfirmChannelTracing)(ii.context.active()))return n.apply(this,arguments);{let f=this,{span:h,modifiedOptions:_}=r.createPublishSpan(r,i,s,f,l),{publishHook:E}=r.getConfig();E&&(0,Dr.safeExecuteInTheMiddle)(()=>E(h,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:_,isConfirmChannel:!1}),R=>{R&&ii.diag.error("amqplib instrumentation: publishHook error",R)},!0);let T=[...arguments];T[3]=_;let v=n.apply(this,T);return h.end(),v}}}createPublishSpan(t,n,r,o,i){let s=(0,Ii.normalizeExchange)(n),u=t.tracer.startSpan(`publish ${s}`,{kind:ii.SpanKind.PRODUCER,attributes:{...o.connection[Ii.CONNECTION_ATTRIBUTES],[id.ATTR_MESSAGING_DESTINATION]:n,[id.ATTR_MESSAGING_DESTINATION_KIND]:id.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[id.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[id.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[id.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),l=i??{};return l.headers=l.headers??{},ii.propagation.inject(ii.trace.setSpan(ii.context.active(),u),l.headers),{span:u,modifiedOptions:l}}endConsumerSpan(t,n,r,o){let i=t[Ii.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:ii.SpanStatusCode.ERROR,message:r!==oc.EndOperation.ChannelClosed&&r!==oc.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[Ii.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[Ii.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(s=>{this.endConsumerSpan(s.msg,n,r,o)}),t[Ii.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,r,o){let{consumeEndHook:i}=this.getConfig();i&&(0,Dr.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),s=>{s&&ii.diag.error("amqplib instrumentation: consumerEndHook error",s)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,BG.hrTime)(),r=t[Ii.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let s=r[o],u=(0,BG.hrTimeDuration)(s.timeOfConsume,n);if((0,BG.hrTimeToMilliseconds)(u)<i)break;this.endConsumerSpan(s.msg,null,oc.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};PG.AmqplibInstrumentation=Hee});var zQe=M(FE=>{"use strict";m();Object.defineProperty(FE,"__esModule",{value:!0});FE.EndOperation=FE.DEFAULT_CONFIG=FE.AmqplibInstrumentation=void 0;var EOt=GQe();Object.defineProperty(FE,"AmqplibInstrumentation",{enumerable:!0,get:function(){return EOt.AmqplibInstrumentation}});var jQe=Gee();Object.defineProperty(FE,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return jQe.DEFAULT_CONFIG}});Object.defineProperty(FE,"EndOperation",{enumerable:!0,get:function(){return jQe.EndOperation}})});var HQe,$Qe,yOt,qQe,SOt,VQe,KQe=k(()=>{m();HQe=ue(zQe(),1);yr();$Qe="Amqplib",yOt={consumeEndHook:e=>{Jr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Jr(e,"auto.amqplib.otel.publisher")}},qQe=ct($Qe,()=>new HQe.AmqplibInstrumentation(yOt)),SOt=(()=>({name:$Qe,setupOnce(){qQe()}})),VQe=SOt});var eO,$ee=k(()=>{m();eO="VercelAI"});function bOt(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 IOt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(COt(t.content),vOt(t.content))}function COt(e){for(let t of e){if(!bOt(t))continue;let n=SJ(t.toolCallId);n?Vl(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"),cn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):Vl(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),cn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function vOt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&TJ(t.toolCallId)}function ROt(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 LG,TOt,YQe,MG,JQe=k(()=>{m();LG=ue(ln(),1);mt();$ee();TOt=[">=3.0.0 <7"],YQe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];MG=class e extends LG.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",nr,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new LG.InstrumentationNodeModuleDefinition("ai",TOt,this._patch.bind(this))}callWhenPatched(t){this._isPatched?t():this._callbacks.push(t)}_patch(t){this._isPatched=!0,this._callbacks.forEach(r=>r()),this._callbacks=[];let n=r=>new Proxy(r,{apply:(o,i,s)=>{let u=s[0].experimental_telemetry||{},l=u.isEnabled,f=yt(),h=f?.getIntegrationByName(eO),_=h?.options,E=h?!!f?.getOptions().sendDefaultPii:!1,{recordInputs:T,recordOutputs:v}=ROt(_,u,l,E);return s[0].experimental_telemetry={...u,isEnabled:l!==void 0?l:!0,recordInputs:T,recordOutputs:v},Cf(()=>Reflect.apply(o,i,s),R=>{R&&typeof R=="object"&&is(R,"_sentry_active_span",$c())},()=>{},R=>{IOt(R)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of YQe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=YQe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function xOt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var ZQe,DOt,WQe,XQe=k(()=>{m();mt();yr();$ee();JQe();ZQe=ct(eO,()=>new MG({}));DOt=((e={})=>{let t;return{name:eO,options:e,setupOnce(){t=ZQe()},afterAllSetup(n){e.force??xOt(n)?jF(n):t?.callWhenPatched(()=>jF(n))}}}),WQe=DOt});var QG,NOt,UG,eFe=k(()=>{m();QG=ue(ln(),1);mt();NOt=[">=4.0.0 <7"],UG=class extends QG.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",nr,t)}init(){return new QG.InstrumentationNodeModuleDefinition("openai",NOt,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(BS(lE))return Reflect.construct(r,s);let u=Reflect.construct(r,s);return $F(u,o)};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let s of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(s)){let u=Object.getOwnPropertyDescriptor(r,s);u&&Object.defineProperty(i,s,u)}try{t[n]=i}catch{Object.defineProperty(t,n,{value:i,writable:!0,configurable:!0,enumerable:!0})}if(t.default===r)try{t.default=i}catch{Object.defineProperty(t,"default",{value:i,writable:!0,configurable:!0,enumerable:!0})}return t}}});var tFe,wOt,nFe,rFe=k(()=>{m();mt();yr();eFe();tFe=ct(lE,e=>new UG(e)),wOt=((e={})=>({name:lE,setupOnce(){tFe(e)}})),nFe=wOt});var GG,kOt,FG,oFe=k(()=>{m();GG=ue(ln(),1);mt();kOt=[">=0.19.2 <1.0.0"],FG=class extends GG.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",nr,t)}init(){return new GG.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",kOt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(BS(dE))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return qF(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 iFe,BOt,sFe,aFe=k(()=>{m();mt();yr();oFe();iFe=ct(dE,e=>new FG(e)),BOt=((e={})=>({name:dE,options:e,setupOnce(){iFe(e)}})),sFe=BOt});var ox,uFe,jG,cFe=k(()=>{m();ox=ue(ln(),1);mt();uFe=[">=0.10.0 <2"],jG=class extends ox.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",nr,t)}init(){return new ox.InstrumentationNodeModuleDefinition("@google/genai",uFe,n=>this._patch(n),n=>n,[new ox.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",uFe,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(BS(pE))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return VF(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 Bk(t,"GoogleGenAI",o),t}}});var lFe,OOt,dFe,pFe=k(()=>{m();mt();yr();cFe();lFe=ct(pE,e=>new jG(e)),OOt=((e={})=>({name:pE,setupOnce(){lFe(e)}})),dFe=OOt});function POt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function MOt(e,t,n){return new Proxy(e,{apply(r,o,i){let u=i[1];(!u||typeof u!="object"||Array.isArray(u))&&(u={},i[1]=u);let l=u.callbacks,f=POt(l,t);return u.callbacks=f,Reflect.apply(r,o,i)}})}var GE,zG,HG,fFe=k(()=>{m();GE=ue(ln(),1);mt();zG=[">=0.1.0 <2.0.0"];HG=class extends GE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",nr,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 GE.InstrumentationNodeModuleDefinition(r,zG,this._patch.bind(this),o=>o,[new GE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,zG,this._patch.bind(this),o=>o)]));return t.push(new GE.InstrumentationNodeModuleDefinition("langchain",zG,this._patch.bind(this),r=>r,[new GE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",zG,this._patch.bind(this),r=>r)])),t}_patch(t){UY([lE,dE,pE]);let n=ZF(this.getConfig());return this._patchRunnableMethods(t,n),t}_patchRunnableMethods(t,n){let r=["ChatAnthropic","ChatOpenAI","ChatGoogleGenerativeAI","ChatMistralAI","ChatVertexAI","ChatGroq","ConfigurableModel"],o=t.universal_exports??t,i=Object.values(o).find(l=>typeof l=="function"&&r.includes(l.name));if(!i)return;let s=i.prototype;if(s.__sentry_patched__)return;s.__sentry_patched__=!0;let u=["invoke","stream","batch"];for(let l of u){let f=s[l];typeof f=="function"&&(s[l]=MOt(f,n))}}}});var mFe,LOt,AFe,gFe=k(()=>{m();mt();yr();fFe();mFe=ct(KF,e=>new HG(e)),LOt=((e={})=>({name:KF,setupOnce(){mFe(e)}})),AFe=LOt});var ix,hFe,$G,_Fe=k(()=>{m();ix=ue(ln(),1);mt();hFe=[">=0.0.0 <2.0.0"],$G=class extends ix.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",nr,t)}init(){return new ix.InstrumentationNodeModuleDefinition("@langchain/langgraph",hFe,this._patch.bind(this),n=>n,[new ix.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",hFe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&XF(t.StateGraph.prototype,this.getConfig()),t}}});var EFe,UOt,yFe,SFe=k(()=>{m();mt();yr();_Fe();EFe=ct(WF,e=>new $G(e)),UOt=((e={})=>({name:WF,setupOnce(){EFe(e)}})),yFe=UOt});import*as bFe from"node:net";function IFe(e,t,n,r,o){let s=()=>{},u=o.firestoreSpanCreationHook;typeof u=="function"&&(s=h=>{(0,th.safeExecuteInTheMiddle)(()=>u(h),_=>{_&&Hl.error(_?.message)},!0)});let l=new th.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>TFe(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 th.InstrumentationNodeModuleFile(h,t,_=>TFe(_,n,r,e,s),_=>CFe(_,r)));return l}function TFe(e,t,n,r,o){return CFe(e,n),t(e,"addDoc",QOt(r,o)),t(e,"getDocs",GOt(r,o)),t(e,"setDoc",jOt(r,o)),t(e,"deleteDoc",FOt(r,o)),e}function CFe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,th.isWrapped)(e[n])&&t(e,n);return e}function QOt(e,t){return function(r){return function(o,i){let s=VG(e,"addDoc",o);return t(s),qG(s,()=>r(o,i))}}}function FOt(e,t){return function(r){return function(o){let i=VG(e,"deleteDoc",o.parent||o);return t(i),qG(i,()=>r(o))}}}function GOt(e,t){return function(r){return function(o){let i=VG(e,"getDocs",o);return t(i),qG(i,()=>r(o))}}}function jOt(e,t){return function(r){return function(o,i,s){let u=VG(e,"setDoc",o.parent||o);return t(u),qG(u,()=>typeof s<"u"?r(o,i,s):r(o,i))}}}function qG(e,t){return Xe.with(Jt.setSpan(Xe.active(),e),()=>(0,th.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function VG(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:Ao.CLIENT});return HOt(r,n),r.setAttribute($C,t),r}function zOt(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(bFe.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 HOt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},s={[u7]:t.path,[c7]:n.name,[AS]:"firebase.firestore","firebase.firestore.type":t.type,"firebase.firestore.options.projectId":r.projectId,"firebase.firestore.options.appId":r.appId,"firebase.firestore.options.messagingSenderId":r.messagingSenderId,"firebase.firestore.options.storageBucket":r.storageBucket},{address:u,port:l}=zOt(i);u&&(s[h7]=u),l&&(s[_7]=l),e.setAttributes(s)}var th,vFe=k(()=>{m();$e();th=ue(ln(),1);tr()});function RFe(e,t,n,r,o){let i=()=>{},s=()=>{},u=o.functions?.errorHook,l=o.functions?.requestHook,f=o.functions?.responseHook;typeof f=="function"&&(s=(E,T)=>{(0,nh.safeExecuteInTheMiddle)(()=>f(E,T),v=>{v&&Hl.error(v?.message)},!0)}),typeof l=="function"&&(i=E=>{(0,nh.safeExecuteInTheMiddle)(()=>l(E),T=>{T&&Hl.error(T?.message)},!0)});let h=new nh.InstrumentationNodeModuleDefinition("firebase-functions",t);return[{name:"firebase-functions/lib/v2/providers/https.js",triggerType:"function"},{name:"firebase-functions/lib/v2/providers/firestore.js",triggerType:"firestore"},{name:"firebase-functions/lib/v2/providers/scheduler.js",triggerType:"scheduler"},{name:"firebase-functions/lib/v2/storage.js",triggerType:"storage"}].forEach(({name:E,triggerType:T})=>{h.files.push(new nh.InstrumentationNodeModuleFile(E,t,v=>$Ot(v,n,r,e,{requestHook:i,responseHook:s,errorHook:u},T),v=>xFe(v,r)))}),h}function ic(e,t,n){return function(o){return function(...i){let s=typeof i[0]=="function"?i[0]:i[1],u=typeof i[0]=="function"?void 0:i[0];if(!s)return o.call(this,...i);let l=async function(...f){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",_=e.startSpan(`firebase.function.${n}`,{kind:Ao.SERVER}),E={"faas.name":h,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(E["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(E["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),_.setAttributes(E),t?.requestHook?.(_),Xe.with(Jt.setSpan(Xe.active(),_),async()=>{let T,v;try{v=await s.apply(this,f)}catch(R){T=R}if(t?.responseHook?.(_,T),T&&_.recordException(T),_.end(),T)throw await t?.errorHook?.(_,T),T;return v})};return u?o.call(this,u,l):o.call(this,l)}}}function $Ot(e,t,n,r,o,i){switch(xFe(e,n),i){case"function":t(e,"onRequest",ic(r,o,"http.request")),t(e,"onCall",ic(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",ic(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",ic(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",ic(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",ic(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",ic(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",ic(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",ic(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",ic(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",ic(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",ic(r,o,"storage.object.finalized")),t(e,"onObjectArchived",ic(r,o,"storage.object.archived")),t(e,"onObjectDeleted",ic(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",ic(r,o,"storage.object.metadataUpdated"));break}return e}function xFe(e,t){let n=["onSchedule","onRequest","onCall","onObjectFinalized","onObjectArchived","onObjectDeleted","onObjectMetadataUpdated","onDocumentCreated","onDocumentUpdated","onDocumentDeleted","onDocumentWritten","onDocumentCreatedWithAuthContext","onDocumentUpdatedWithAuthContext","onDocumentDeletedWithAuthContext","onDocumentWrittenWithAuthContext"];for(let r of n)(0,nh.isWrapped)(e[r])&&t(e,r);return e}var nh,DFe=k(()=>{m();$e();nh=ue(ln(),1)});var wFe,NFe,qOt,VOt,KG,kFe=k(()=>{m();wFe=ue(ln(),1);mt();vFe();DFe();NFe={},qOt=[">=3.0.0 <5"],VOt=[">=6.0.0 <7"],KG=class extends wFe.InstrumentationBase{constructor(t=NFe){super("@sentry/instrumentation-firebase",nr,t)}setConfig(t={}){super.setConfig({...NFe,...t})}init(){let t=[];return t.push(IFe(this.tracer,qOt,this._wrap,this._unwrap,this.getConfig())),t.push(RFe(this.tracer,VOt,this._wrap,this._unwrap,this.getConfig())),t}}});var BFe,KOt,OFe,YOt,PFe,MFe=k(()=>{m();mt();yr();kFe();BFe="Firebase",KOt={firestoreSpanCreationHook:e=>{Jr(e,"auto.firebase.otel.firestore"),e.setAttribute(on,"db.query")},functions:{requestHook:e=>{Jr(e,"auto.firebase.otel.functions"),e.setAttribute(on,"http.request")},errorHook:async(e,t)=>{t&&(cn(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await Dv(2e3))}}},OFe=ct(BFe,()=>new KG(KOt)),YOt=(()=>({name:BFe,setupOnce(){OFe()}})),PFe=YOt});function LFe(){return[FBe(),yPe(),VPe(),PUe(),OMe(),YMe(),a2e(),E2e(),Z2e(),_Le(),gUe(),NUe(),ZUe(),lQe(),IQe(),BQe(),lMe(),VQe(),SMe(),AFe(),yFe(),WQe(),nFe(),sFe(),dFe(),TLe(),PFe()]}var UFe=k(()=>{m();KQe();aFe();dQe();GBe();bPe();MFe();OQe();pFe();YPe();wUe();MUe();dMe();WUe();gFe();SFe();TMe();PMe();JMe();u2e();y2e();rFe();ELe();bLe();hUe();W2e();CQe();XQe()});function FFe(e,t={}){e.getOptions().debug&&XZ();let[n,r]=JOt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function JOt(e,t={}){let n=new QFe.BasicTracerProvider({sampler:new i3(e),resource:(0,YG.defaultResource)().merge((0,YG.resourceFromAttributes)({[E7]:"node",[a7]:"sentry",[y7]:nr})),forceFlushTimeoutMillis:500,spanProcessors:[new o3({timeout:ZOt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});Jt.setGlobalTracerProvider(n),Af.setGlobalPropagator(new r3);let r=new a3;return Xe.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function ZOt(e){if(e!=null){if(e>qee)return ks&&W.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${qee}`),qee;if(e<=0||Number.isNaN(e)){ks&&W.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var YG,QFe,qee,GFe=k(()=>{m();$e();YG=ue(pZ(),1),QFe=ue(UZ(),1);tr();mt();yr();aR();JS();qee=1e6});function jFe(){return m3().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(gBe(),CBe())}function zFe(e){return[...jFe(),...Fi(e)?LFe():[]]}function Vee(e={}){return WOt(e,zFe)}function WOt(e={},t){OS(e,"node");let n=CW({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(FFe(n,{spanProcessors:e.openTelemetrySpanProcessors}),A3()),n}var HFe=k(()=>{m();mt();yr();hBe();vBe();UFe();GFe()});var sx=k(()=>{m();HFe();mt();yr()});function Hr(){return XOt}function hu(){return $Fe}function qFe(){return ePt}var XOt,$Fe,ePt,sc=k(()=>{"use strict";m();XOt="prod",$Fe="0.1.250",ePt=`@loredotlink/cli/${$Fe}`});function iPt(e=""){if(!rPt.test(e))return e!==e.toLowerCase()}function KFe(e,t){let n=t??oPt,r=[];if(!e||typeof e!="string")return r;let o="",i,s;for(let u of e){let l=n.includes(u);if(l===!0){r.push(o),o="",i=void 0;continue}let f=iPt(u);if(s===!1){if(i===!1&&f===!0){r.push(o),o=u,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+u,i=f;continue}}o+=u,i=f,s=l}return r.push(o),r}function sPt(e){return e?e[0].toUpperCase()+e.slice(1):""}function aPt(e){return e?e[0].toLowerCase()+e.slice(1):""}function uPt(e,t){return e?(Array.isArray(e)?e:KFe(e)).map(n=>sPt(t?.normalize?n.toLowerCase():n)).join(""):""}function nO(e,t){return aPt(uPt(e||"",t))}function JG(e,t){return e?(Array.isArray(e)?e:KFe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function YFe(e){return JG(e||"","_")}var rPt,oPt,JFe=k(()=>{m();rPt=/\d/,oPt=["-","_","/","."]});import{parseArgs as cPt}from"node:util";function ej(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function Yee(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 sd(e){return typeof e=="function"?e():e}function lPt(e=[],t={}){let n=new Set(t.boolean||[]),r=new Set(t.string||[]),o=t.alias||{},i=t.default||{},s=new Map,u=new Map;for(let[x,B]of Object.entries(o)){let P=B;for(let G of P)s.set(x,G),u.has(G)||u.set(G,[]),u.get(G).push(x),s.set(G,x),u.has(x)||u.set(x,[]),u.get(x).push(G)}let l={};function f(x){if(n.has(x))return"boolean";let B=u.get(x)||[];for(let P of B)if(n.has(P))return"boolean";return"string"}function h(x){if(r.has(x))return!0;let B=u.get(x)||[];for(let P of B)if(r.has(P))return!0;return!1}let _=new Set([...n,...r,...Object.keys(o),...Object.values(o).flat(),...Object.keys(i)]);for(let x of _)l[x]||(l[x]={type:f(x),default:i[x]});for(let[x,B]of s.entries())x.length===1&&l[B]&&!l[B].short&&(l[B].short=x);let E=[],T={};for(let x=0;x<e.length;x++){let B=e[x];if(B==="--"){E.push(...e.slice(x));break}if(B.startsWith("--no-")){let P=B.slice(5);T[P]=!0;continue}E.push(B)}let v;try{v=cPt({args:E,options:Object.keys(l).length>0?l:void 0,allowPositionals:!0,strict:!1})}catch{v={values:{},positionals:E}}let R={_:[]};R._=v.positionals;for(let[x,B]of Object.entries(v.values)){let P=B;f(x)==="boolean"&&typeof B=="string"?P=B!=="false":h(x)&&typeof B=="boolean"&&(P=""),R[x]=P}for(let[x]of Object.entries(T)){R[x]=!1;let B=s.get(x);B&&(R[B]=!1);let P=u.get(x);if(P)for(let G of P)R[G]=!1}for(let[x,B]of s.entries())R[x]!==void 0&&R[B]===void 0&&(R[B]=R[x]),R[B]!==void 0&&R[x]===void 0&&(R[x]=R[B]),R[x]!==R[B]&&i[B]===R[B]&&(R[B]=R[x]);return R}function pPt(e,t){let n={boolean:[],string:[],alias:{},default:{}},r=XFe(t);for(let u of r){if(u.type==="positional")continue;u.type==="string"||u.type==="enum"?n.string.push(u.name):u.type==="boolean"&&n.boolean.push(u.name),u.default!==void 0&&(n.default[u.name]=u.default),u.alias&&(n.alias[u.name]=u.alias);let l=nO(u.name),f=JG(u.name);if(l!==u.name||f!==u.name){let h=ej(n.alias[u.name]||[]);l!==u.name&&!h.includes(l)&&h.push(l),f!==u.name&&!h.includes(f)&&h.push(f),h.length>0&&(n.alias[u.name]=h)}}let o=lPt(e,n),[...i]=o._,s=new Proxy(o,{get(u,l){return u[l]??u[nO(l)]??u[JG(l)]}});for(let[,u]of r.entries())if(u.type==="positional"){let l=i.shift();if(l!==void 0)s[u.name]=l;else{if(u.default===void 0&&u.required!==!1)throw new dT(`Missing required positional argument: ${u.name.toUpperCase()}`,"EARG");s[u.name]=u.default}}else if(u.type==="enum"){let l=s[u.name],f=u.options||[];if(l!==void 0&&f.length>0&&!f.includes(l))throw new dT(`Invalid value for argument: ${kf(`--${u.name}`)} (${kf(l)}). Expected one of: ${f.map(h=>kf(h)).join(", ")}.`,"EARG")}else if(u.required&&s[u.name]===void 0)throw new dT(`Missing required argument: --${u.name}`,"EARG");return s}function XFe(e){let t=[];for(let[n,r]of Object.entries(e||{}))t.push({...r,name:n,alias:ej(r.alias)});return t}async function fPt(e){return Promise.all(e.map(t=>sd(t)))}async function pT(e,t){let n=await sd(e.args||{}),r=pPt(t.rawArgs,n),o={rawArgs:t.rawArgs,args:r,data:t.data,cmd:e},i=await fPt(e.plugins??[]),s,u;try{for(let h of i)await h.setup?.(o);typeof e.setup=="function"&&await e.setup(o);let f=await sd(e.subCommands);if(f&&Object.keys(f).length>0){let h=mPt(t.rawArgs,n),_=t.rawArgs[h];if(_){let E=await ZFe(f,_);if(!E)throw new dT(`Unknown command ${kf(_)}`,"E_UNKNOWN_COMMAND");await pT(E,{rawArgs:t.rawArgs.slice(h+1)})}else{let E=await sd(e.default);if(E){if(e.run)throw new dT("Cannot specify both 'run' and 'default' on the same command.","E_DEFAULT_CONFLICT");let T=await ZFe(f,E);if(!T)throw new dT(`Default sub command ${kf(E)} not found in subCommands.`,"E_UNKNOWN_COMMAND");await pT(T,{rawArgs:t.rawArgs})}else if(!e.run)throw new dT("No command specified.","E_NO_COMMAND")}}typeof e.run=="function"&&(s=await e.run(o))}catch(f){u=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(u)throw u;if(l.length===1)throw l[0];if(l.length>1)throw new Error("Multiple cleanup errors",{cause:l});return{result:s}}async function ZFe(e,t){if(t in e)return sd(e[t]);for(let n of Object.values(e)){let r=await sd(n),o=await sd(r?.meta);if(o?.alias&&ej(o.alias).includes(t))return r}}function mPt(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(r==="--")return-1;if(r.startsWith("-")){!r.includes("=")&&APt(r,t)&&n++;continue}return n}return-1}function APt(e,t){let n=e.replace(/^-{1,2}/,""),r=nO(n);for(let[o,i]of Object.entries(t))if(!(i.type!=="string"&&i.type!=="enum")&&(r===nO(o)||(Array.isArray(i.alias)?i.alias:i.alias?[i.alias]:[]).includes(n)))return!0;return!1}async function Zee(e,t){let n=await sd(e.meta||{}),r=XFe(await sd(e.args||{})),o=await sd(t?.meta||{}),i=`${o.name?`${o.name} `:""}`+(n.name||process.argv[1]),s=[],u=[],l=[],f=[];for(let T of r)if(T.type==="positional"){let v=T.name.toUpperCase(),R=T.required!==!1&&T.default===void 0;u.push([kf(v+Jee(T)),WFe(T,R)]),f.push(R?`<${v}>`:`[${v}]`)}else{let v=T.required===!0&&T.default===void 0,R=[...(T.alias||[]).map(x=>`-${x}`),`--${T.name}`].join(", ")+Jee(T);if(s.push([kf(R),WFe(T,v)]),T.type==="boolean"&&(T.default===!0||T.negativeDescription)&&!gPt.test(T.name)){let x=[...(T.alias||[]).map(B=>`--no-${B}`),`--no-${T.name}`].join(", ");s.push([kf(x),[T.negativeDescription,v?XG("(Required)"):""].filter(Boolean).join(" ")])}v&&f.push(`--${T.name}`+Jee(T))}if(e.subCommands){let T=[],v=await sd(e.subCommands);for(let[R,x]of Object.entries(v)){let B=await sd((await sd(x))?.meta);if(B?.hidden)continue;let P=ej(B?.alias),G=[R,...P].join(", ");l.push([kf(G),B?.description||""]),T.push(R,...P)}f.push(T.join("|"))}let h=[],_=n.version||o.version;h.push(XG(`${n.description} (${i+(_?` v${_}`:"")})`),"");let E=s.length>0||u.length>0;return h.push(`${WG(ZG("USAGE"))} ${kf(`${i}${E?" [OPTIONS]":""} ${f.join(" ")}`)}`,""),u.length>0&&(h.push(WG(ZG("ARGUMENTS")),""),h.push(Yee(u," ")),h.push("")),s.length>0&&(h.push(WG(ZG("OPTIONS")),""),h.push(Yee(s," ")),h.push("")),l.length>0&&(h.push(WG(ZG("COMMANDS")),""),h.push(Yee(l," ")),h.push("",`Use ${kf(`${i} <command> --help`)} for more information about a command.`)),h.filter(T=>typeof T=="string").join(`
|
|
40
40
|
`)}function Jee(e){let t=e.valueHint?`=<${e.valueHint}>`:"",n=t||`=<${YFe(e.name)}>`;return!e.type||e.type==="positional"||e.type==="boolean"?t:e.type==="enum"&&e.options?.length?`=<${e.options.join("|")}>`:n}function WFe(e,t){let n=t?XG("(Required)"):"",r=e.default===void 0?"":XG(`(Default: ${e.default})`);return[e.description,n,r].filter(Boolean).join(" ")}var dT,dPt,tj,ZG,kf,XG,WG,gPt,Wee=k(()=>{m();JFe();dT=class extends Error{code;constructor(e,t){super(e),this.name="CLIError",this.code=t}};dPt=(()=>{let e=globalThis.process?.env??{};return e.NO_COLOR==="1"||e.TERM==="dumb"||e.TEST||e.CI})(),tj=(e,t=39)=>n=>dPt?n:`\x1B[${e}m${n}\x1B[${t}m`,ZG=tj(1,22),kf=tj(36),XG=tj(90),WG=tj(4,24);gPt=/^no[-A-Z]/});var ax,Xee,ete,nj=k(()=>{"use strict";m();ax="team_credit_2026_06",Xee=Object.freeze({[ax]:{planVersion:ax,grantPerSeatMillicents:20*1e5,seatPriceMillicents:20*1e5,markupPct:10,rollover:!1,onEmptyPool:"hard_stop"}}),ete=(e=ax)=>Xee[e]??Xee[ax]});var rj,hPt,tte=k(()=>{"use strict";m();nj();rj={creatorMonthlyPriceId:"STRIPE_PRICE_CREATOR_MONTHLY",teamSeatPriceId:"STRIPE_PRICE_TEAM_SEAT_MONTHLY",tokenMeteredPriceId:"STRIPE_PRICE_TOKEN_METERED"},hPt={...rj,tokenMeterId:"STRIPE_TOKEN_METER_ID"}});var nte,_Pt,EPt,t4e,X3n,rte=k(()=>{"use strict";m();nj();tte();nte=["free","creator","team"],_Pt=typeof process<"u"&&process.env?.NODE_ENV!=="production",EPt={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:{review:!1}},{tier:"creator",subjectType:"user",name:"Creator",description:"For builders who share a lot.",price:29,isFeatured:!0,priceId:_Pt?"price_1TP9BSKwvRM43sh64waIrvjj":"price_1TPA2gKwvRM43sh6Kp4ZCpJZ",features:[{name:"Everything in Free"}],entitlements:{review:!1}},{tier:"team",subjectType:"organization",name:"Team",description:"Org-wide thread sharing plus the review surface. Each seat grants a pooled $20/mo of AI credits.",price:ete().seatPriceMillicents/1e5,minSeats:2,priceId:`env.${rj.teamSeatPriceId}`,features:[{name:"Everything in Creator"},{name:"Minimum 2 seats"},{name:"Review feature (beta)"}],entitlements:{review:!0}}]}},t4e=EPt.stripe.plans,X3n=Object.freeze(Object.fromEntries(t4e.map(e=>[e.tier,e])))});var n4e=k(()=>{"use strict";m();rte();rte();nj();tte()});function SPt(e){s4e=e}function ij(){return s4e}function dt(e,t){let n=sj({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,ij(),rO].filter(r=>!!r)});e.common.issues.push(n)}function Dn(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,u)=>s.code!=="invalid_type"?{message:u.defaultError}:typeof u.data>"u"?{message:r??u.defaultError}:{message:n??u.defaultError},description:o}}function kPt(e,t){return!!((t==="v4"||!t)&&DPt.test(e)||(t==="v6"||!t)&&NPt.test(e))}function BPt(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 ux(e){if(e instanceof yu){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=Bf.create(ux(r))}return new yu({...e._def,shape:()=>t})}else return e instanceof oh?new oh({...e._def,type:ux(e.element)}):e instanceof Bf?Bf.create(ux(e.unwrap())):e instanceof ih?ih.create(ux(e.unwrap())):e instanceof uA?uA.create(e.items.map(t=>ux(t))):e}function lte(e,t){let n=jE(e),r=jE(t);if(e===t)return{valid:!0,data:e};if(n===ut.object&&r===ut.object){let o=br.objectKeys(t),i=br.objectKeys(e).filter(u=>o.indexOf(u)!==-1),s={...e,...t};for(let u of i){let l=lte(e[u],t[u]);if(!l.valid)return{valid:!1};s[u]=l.data}return{valid:!0,data:s}}else if(n===ut.array&&r===ut.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i<e.length;i++){let s=e[i],u=t[i],l=lte(s,u);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ut.date&&r===ut.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function u4e(e,t){return new bT({values:e,typeName:en.ZodEnum,...Dn(t)})}var br,ate,ut,jE,Ye,yPt,tl,rO,s4e,sj,TPt,Eu,Sn,a4e,ac,ute,cte,oO,aj,Ft,_p,r4e,Nn,bPt,IPt,CPt,vPt,RPt,xPt,DPt,NPt,wPt,zE,fT,mT,AT,gT,cx,hT,_T,HE,rh,Of,lx,oh,yu,ET,oj,uj,yT,uA,cj,dx,px,lj,ST,TT,bT,IT,$E,ad,Bf,ih,CT,fx,mx,OPt,dj,iO,Ax,c4e,PPt,en,MPt,l4e,d4e,LPt,UPt,p4e,QPt,FPt,GPt,jPt,zPt,HPt,$Pt,qPt,VPt,KPt,YPt,JPt,ZPt,WPt,XPt,eMt,tMt,nMt,rMt,oMt,iMt,sMt,aMt,uMt,o4e,cMt,lMt,dMt,pMt,fMt,mMt,AMt,gMt,hMt,_u,_Mt,ite,EMt,hp,dte,D6n,N6n,w6n,f4e,yMt,SMt,TMt,bMt,m4e,A4e,g4e,ste,Su,IMt,CMt,vMt,RMt,pte,fte,mte,xMt,i4e,DMt,NMt,wMt,kMt,Ate,cA=k(()=>{m();(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{let i={};for(let s of o)i[s]=s;return i},e.getValidEnumValues=o=>{let i=e.objectKeys(o).filter(u=>typeof o[o[u]]!="number"),s={};for(let u of i)s[u]=o[u];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(let s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(br||(br={}));(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(ate||(ate={}));ut=br.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),jE=e=>{switch(typeof e){case"undefined":return ut.undefined;case"string":return ut.string;case"number":return isNaN(e)?ut.nan:ut.number;case"boolean":return ut.boolean;case"function":return ut.function;case"bigint":return ut.bigint;case"symbol":return ut.symbol;case"object":return Array.isArray(e)?ut.array:e===null?ut.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ut.promise:typeof Map<"u"&&e instanceof Map?ut.map:typeof Set<"u"&&e instanceof Set?ut.set:typeof Date<"u"&&e instanceof Date?ut.date:ut.object;default:return ut.unknown}},Ye=br.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"]),yPt=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),tl=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let u=r,l=0;for(;l<s.path.length;){let f=s.path[l];l===s.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(s))):u[f]=u[f]||{_errors:[]},u=u[f],l++}}};return o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,br.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()}};tl.create=e=>new tl(e);rO=(e,t)=>{let n;switch(e.code){case Ye.invalid_type:e.received===ut.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ye.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,br.jsonStringifyReplacer)}`;break;case Ye.unrecognized_keys:n=`Unrecognized key(s) in object: ${br.joinValues(e.keys,", ")}`;break;case Ye.invalid_union:n="Invalid input";break;case Ye.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${br.joinValues(e.options)}`;break;case Ye.invalid_enum_value:n=`Invalid enum value. Expected ${br.joinValues(e.options)}, received '${e.received}'`;break;case Ye.invalid_arguments:n="Invalid function arguments";break;case Ye.invalid_return_type:n="Invalid function return type";break;case Ye.invalid_date:n="Invalid date";break;case Ye.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}"`:br.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ye.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 Ye.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 Ye.custom:n="Invalid input";break;case Ye.invalid_intersection_types:n="Intersection results could not be merged";break;case Ye.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ye.not_finite:n="Number must be finite";break;default:n=t.defaultError,br.assertNever(e)}return{message:n}},s4e=rO;sj=e=>{let{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i},u="",l=r.filter(f=>!!f).slice().reverse();for(let f of l)u=f(s,{data:t,defaultError:u}).message;return{...o,path:i,message:o.message||u}},TPt=[];Eu=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){let r=[];for(let o of n){if(o.status==="aborted")return Sn;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 Sn;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}}},Sn=Object.freeze({status:"aborted"}),a4e=e=>({status:"dirty",value:e}),ac=e=>({status:"valid",value:e}),ute=e=>e.status==="aborted",cte=e=>e.status==="dirty",oO=e=>e.status==="valid",aj=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})(Ft||(Ft={}));_p=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}},r4e=(e,t)=>{if(oO(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 tl(e.common.issues);return this._error=n,this._error}}};Nn=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 jE(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:jE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Eu,ctx:{common:t.parent.common,data:t.data,parsedType:jE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(aj(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:jE(t)},i=this._parseSync({data:t,path:o.path,parent:o});return r4e(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:jE(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(aj(o)?o:Promise.resolve(o));return r4e(r,i)}refine(t,n){let r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{let s=t(o),u=()=>i.addIssue({code:Ye.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(u(),!1)):s?!0:(u(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new ad({schema:this,typeName:en.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Bf.create(this,this._def)}nullable(){return ih.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return oh.create(this,this._def)}promise(){return $E.create(this,this._def)}or(t){return ET.create([this,t],this._def)}and(t){return yT.create(this,t,this._def)}transform(t){return new ad({...Dn(this._def),schema:this,typeName:en.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new CT({...Dn(this._def),innerType:this,defaultValue:n,typeName:en.ZodDefault})}brand(){return new dj({typeName:en.ZodBranded,type:this,...Dn(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new fx({...Dn(this._def),innerType:this,catchValue:n,typeName:en.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return iO.create(this,t)}readonly(){return Ax.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},bPt=/^c[^\s-]{8,}$/i,IPt=/^[a-z][a-z0-9]*$/,CPt=/[0-9A-HJKMNP-TV-Z]{26}/,vPt=/^[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,RPt=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,xPt=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),DPt=/^(((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}))$/,NPt=/^(([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})))$/,wPt=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$");zE=class e extends Nn{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(o=>t.test(o),{validation:n,code:Ye.invalid_string,...Ft.errToObj(r)}),this.nonempty=t=>this.min(1,Ft.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)!==ut.string){let i=this._getOrReturnCtx(t);return dt(i,{code:Ye.invalid_type,expected:ut.string,received:i.parsedType}),Sn}let r=new Eu,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),dt(o,{code:Ye.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),dt(o,{code:Ye.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,u=t.data.length<i.value;(s||u)&&(o=this._getOrReturnCtx(t,o),s?dt(o,{code:Ye.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):u&&dt(o,{code:Ye.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")RPt.test(t.data)||(o=this._getOrReturnCtx(t,o),dt(o,{validation:"email",code:Ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")xPt.test(t.data)||(o=this._getOrReturnCtx(t,o),dt(o,{validation:"emoji",code:Ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")vPt.test(t.data)||(o=this._getOrReturnCtx(t,o),dt(o,{validation:"uuid",code:Ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")bPt.test(t.data)||(o=this._getOrReturnCtx(t,o),dt(o,{validation:"cuid",code:Ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")IPt.test(t.data)||(o=this._getOrReturnCtx(t,o),dt(o,{validation:"cuid2",code:Ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")CPt.test(t.data)||(o=this._getOrReturnCtx(t,o),dt(o,{validation:"ulid",code:Ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),dt(o,{validation:"url",code:Ye.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),dt(o,{validation:"regex",code:Ye.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),dt(o,{code:Ye.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),dt(o,{code:Ye.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),dt(o,{code:Ye.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?wPt(i).test(t.data)||(o=this._getOrReturnCtx(t,o),dt(o,{code:Ye.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="ip"?kPt(t.data,i.version)||(o=this._getOrReturnCtx(t,o),dt(o,{validation:"ip",code:Ye.invalid_string,message:i.message}),r.dirty()):br.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",...Ft.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ft.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ft.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ft.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ft.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ft.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ft.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ft.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,...Ft.errToObj(t?.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ft.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Ft.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ft.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ft.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ft.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ft.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ft.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}};zE.create=e=>{var t;return new zE({checks:[],typeName:en.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Dn(e)})};fT=class e extends Nn{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)!==ut.number){let i=this._getOrReturnCtx(t);return dt(i,{code:Ye.invalid_type,expected:ut.number,received:i.parsedType}),Sn}let r,o=new Eu;for(let i of this._def.checks)i.kind==="int"?br.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),dt(r,{code:Ye.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),dt(r,{code:Ye.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),dt(r,{code:Ye.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?BPt(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),dt(r,{code:Ye.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),dt(r,{code:Ye.not_finite,message:i.message}),o.dirty()):br.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ft.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ft.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ft.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ft.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ft.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ft.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ft.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ft.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ft.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ft.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ft.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ft.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ft.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ft.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"&&br.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)}};fT.create=e=>new fT({checks:[],typeName:en.ZodNumber,coerce:e?.coerce||!1,...Dn(e)});mT=class e extends Nn{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)!==ut.bigint){let i=this._getOrReturnCtx(t);return dt(i,{code:Ye.invalid_type,expected:ut.bigint,received:i.parsedType}),Sn}let r,o=new Eu;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),dt(r,{code:Ye.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),dt(r,{code:Ye.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),dt(r,{code:Ye.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):br.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ft.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ft.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ft.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ft.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ft.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:Ft.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ft.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ft.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ft.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ft.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}};mT.create=e=>{var t;return new mT({checks:[],typeName:en.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Dn(e)})};AT=class extends Nn{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ut.boolean){let r=this._getOrReturnCtx(t);return dt(r,{code:Ye.invalid_type,expected:ut.boolean,received:r.parsedType}),Sn}return ac(t.data)}};AT.create=e=>new AT({typeName:en.ZodBoolean,coerce:e?.coerce||!1,...Dn(e)});gT=class e extends Nn{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ut.date){let i=this._getOrReturnCtx(t);return dt(i,{code:Ye.invalid_type,expected:ut.date,received:i.parsedType}),Sn}if(isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return dt(i,{code:Ye.invalid_date}),Sn}let r=new Eu,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),dt(o,{code:Ye.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),dt(o,{code:Ye.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):br.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:Ft.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ft.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}};gT.create=e=>new gT({checks:[],coerce:e?.coerce||!1,typeName:en.ZodDate,...Dn(e)});cx=class extends Nn{_parse(t){if(this._getType(t)!==ut.symbol){let r=this._getOrReturnCtx(t);return dt(r,{code:Ye.invalid_type,expected:ut.symbol,received:r.parsedType}),Sn}return ac(t.data)}};cx.create=e=>new cx({typeName:en.ZodSymbol,...Dn(e)});hT=class extends Nn{_parse(t){if(this._getType(t)!==ut.undefined){let r=this._getOrReturnCtx(t);return dt(r,{code:Ye.invalid_type,expected:ut.undefined,received:r.parsedType}),Sn}return ac(t.data)}};hT.create=e=>new hT({typeName:en.ZodUndefined,...Dn(e)});_T=class extends Nn{_parse(t){if(this._getType(t)!==ut.null){let r=this._getOrReturnCtx(t);return dt(r,{code:Ye.invalid_type,expected:ut.null,received:r.parsedType}),Sn}return ac(t.data)}};_T.create=e=>new _T({typeName:en.ZodNull,...Dn(e)});HE=class extends Nn{constructor(){super(...arguments),this._any=!0}_parse(t){return ac(t.data)}};HE.create=e=>new HE({typeName:en.ZodAny,...Dn(e)});rh=class extends Nn{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ac(t.data)}};rh.create=e=>new rh({typeName:en.ZodUnknown,...Dn(e)});Of=class extends Nn{_parse(t){let n=this._getOrReturnCtx(t);return dt(n,{code:Ye.invalid_type,expected:ut.never,received:n.parsedType}),Sn}};Of.create=e=>new Of({typeName:en.ZodNever,...Dn(e)});lx=class extends Nn{_parse(t){if(this._getType(t)!==ut.undefined){let r=this._getOrReturnCtx(t);return dt(r,{code:Ye.invalid_type,expected:ut.void,received:r.parsedType}),Sn}return ac(t.data)}};lx.create=e=>new lx({typeName:en.ZodVoid,...Dn(e)});oh=class e extends Nn{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ut.array)return dt(n,{code:Ye.invalid_type,expected:ut.array,received:n.parsedType}),Sn;if(o.exactLength!==null){let s=n.data.length>o.exactLength.value,u=n.data.length<o.exactLength.value;(s||u)&&(dt(n,{code:s?Ye.too_big:Ye.too_small,minimum:u?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(dt(n,{code:Ye.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&&(dt(n,{code:Ye.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,u)=>o.type._parseAsync(new _p(n,s,n.path,u)))).then(s=>Eu.mergeArray(r,s));let i=[...n.data].map((s,u)=>o.type._parseSync(new _p(n,s,n.path,u)));return Eu.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:Ft.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:Ft.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:Ft.toString(n)}})}nonempty(t){return this.min(1,t)}};oh.create=(e,t)=>new oh({type:e,minLength:null,maxLength:null,exactLength:null,typeName:en.ZodArray,...Dn(t)});yu=class e extends Nn{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=br.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ut.object){let f=this._getOrReturnCtx(t);return dt(f,{code:Ye.invalid_type,expected:ut.object,received:f.parsedType}),Sn}let{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),u=[];if(!(this._def.catchall instanceof Of&&this._def.unknownKeys==="strip"))for(let f in o.data)s.includes(f)||u.push(f);let l=[];for(let f of s){let h=i[f],_=o.data[f];l.push({key:{status:"valid",value:f},value:h._parse(new _p(o,_,o.path,f)),alwaysSet:f in o.data})}if(this._def.catchall instanceof Of){let f=this._def.unknownKeys;if(f==="passthrough")for(let h of u)l.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(f==="strict")u.length>0&&(dt(o,{code:Ye.unrecognized_keys,keys:u}),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 u){let _=o.data[h];l.push({key:{status:"valid",value:h},value:f._parse(new _p(o,_,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let f=[];for(let h of l){let _=await h.key;f.push({key:_,value:await h.value,alwaysSet:h.alwaysSet})}return f}).then(f=>Eu.mergeObjectSync(r,f)):Eu.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Ft.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,s,u;let l=(s=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(u=Ft.errToObj(t).message)!==null&&u!==void 0?u:l}:{message:l}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:en.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};return br.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 br.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new e({...this._def,shape:()=>n})}deepPartial(){return ux(this)}partial(t){let n={};return br.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 br.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Bf;)i=i._def.innerType;n[r]=i}}),new e({...this._def,shape:()=>n})}keyof(){return u4e(br.objectKeys(this.shape))}};yu.create=(e,t)=>new yu({shape:()=>e,unknownKeys:"strip",catchall:Of.create(),typeName:en.ZodObject,...Dn(t)});yu.strictCreate=(e,t)=>new yu({shape:()=>e,unknownKeys:"strict",catchall:Of.create(),typeName:en.ZodObject,...Dn(t)});yu.lazycreate=(e,t)=>new yu({shape:e,unknownKeys:"strip",catchall:Of.create(),typeName:en.ZodObject,...Dn(t)});ET=class extends Nn{_parse(t){let{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(let u of i)if(u.result.status==="valid")return u.result;for(let u of i)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;let s=i.map(u=>new tl(u.ctx.common.issues));return dt(n,{code:Ye.invalid_union,unionErrors:s}),Sn}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 u=s.map(l=>new tl(l));return dt(n,{code:Ye.invalid_union,unionErrors:u}),Sn}}get options(){return this._def.options}};ET.create=(e,t)=>new ET({options:e,typeName:en.ZodUnion,...Dn(t)});oj=e=>e instanceof ST?oj(e.schema):e instanceof ad?oj(e.innerType()):e instanceof TT?[e.value]:e instanceof bT?e.options:e instanceof IT?Object.keys(e.enum):e instanceof CT?oj(e._def.innerType):e instanceof hT?[void 0]:e instanceof _T?[null]:null,uj=class e extends Nn{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ut.object)return dt(n,{code:Ye.invalid_type,expected:ut.object,received:n.parsedType}),Sn;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}):(dt(n,{code:Ye.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Sn)}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=oj(i.shape[t]);if(!s)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let u of s){if(o.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);o.set(u,i)}}return new e({typeName:en.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Dn(r)})}};yT=class extends Nn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(ute(i)||ute(s))return Sn;let u=lte(i.value,s.value);return u.valid?((cte(i)||cte(s))&&n.dirty(),{status:n.value,value:u.data}):(dt(r,{code:Ye.invalid_intersection_types}),Sn)};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}))}};yT.create=(e,t,n)=>new yT({left:e,right:t,typeName:en.ZodIntersection,...Dn(n)});uA=class e extends Nn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ut.array)return dt(r,{code:Ye.invalid_type,expected:ut.array,received:r.parsedType}),Sn;if(r.data.length<this._def.items.length)return dt(r,{code:Ye.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Sn;!this._def.rest&&r.data.length>this._def.items.length&&(dt(r,{code:Ye.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((s,u)=>{let l=this._def.items[u]||this._def.rest;return l?l._parse(new _p(r,s,r.path,u)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>Eu.mergeArray(n,s)):Eu.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};uA.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new uA({items:e,typeName:en.ZodTuple,rest:null,...Dn(t)})};cj=class e extends Nn{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!==ut.object)return dt(r,{code:Ye.invalid_type,expected:ut.object,received:r.parsedType}),Sn;let o=[],i=this._def.keyType,s=this._def.valueType;for(let u in r.data)o.push({key:i._parse(new _p(r,u,r.path,u)),value:s._parse(new _p(r,r.data[u],r.path,u))});return r.common.async?Eu.mergeObjectAsync(n,o):Eu.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Nn?new e({keyType:t,valueType:n,typeName:en.ZodRecord,...Dn(r)}):new e({keyType:zE.create(),valueType:t,typeName:en.ZodRecord,...Dn(n)})}},dx=class extends Nn{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!==ut.map)return dt(r,{code:Ye.invalid_type,expected:ut.map,received:r.parsedType}),Sn;let o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([u,l],f)=>({key:o._parse(new _p(r,u,r.path,[f,"key"])),value:i._parse(new _p(r,l,r.path,[f,"value"]))}));if(r.common.async){let u=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 Sn;(f.status==="dirty"||h.status==="dirty")&&n.dirty(),u.set(f.value,h.value)}return{status:n.value,value:u}})}else{let u=new Map;for(let l of s){let f=l.key,h=l.value;if(f.status==="aborted"||h.status==="aborted")return Sn;(f.status==="dirty"||h.status==="dirty")&&n.dirty(),u.set(f.value,h.value)}return{status:n.value,value:u}}}};dx.create=(e,t,n)=>new dx({valueType:t,keyType:e,typeName:en.ZodMap,...Dn(n)});px=class e extends Nn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ut.set)return dt(r,{code:Ye.invalid_type,expected:ut.set,received:r.parsedType}),Sn;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(dt(r,{code:Ye.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&&(dt(r,{code:Ye.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 Sn;h.status==="dirty"&&n.dirty(),f.add(h.value)}return{status:n.value,value:f}}let u=[...r.data.values()].map((l,f)=>i._parse(new _p(r,l,r.path,f)));return r.common.async?Promise.all(u).then(l=>s(l)):s(u)}min(t,n){return new e({...this._def,minSize:{value:t,message:Ft.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:Ft.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};px.create=(e,t)=>new px({valueType:e,minSize:null,maxSize:null,typeName:en.ZodSet,...Dn(t)});lj=class e extends Nn{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ut.function)return dt(n,{code:Ye.invalid_type,expected:ut.function,received:n.parsedType}),Sn;function r(u,l){return sj({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ij(),rO].filter(f=>!!f),issueData:{code:Ye.invalid_arguments,argumentsError:l}})}function o(u,l){return sj({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ij(),rO].filter(f=>!!f),issueData:{code:Ye.invalid_return_type,returnTypeError:l}})}let i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof $E){let u=this;return ac(async function(...l){let f=new tl([]),h=await u._def.args.parseAsync(l,i).catch(T=>{throw f.addIssue(r(l,T)),f}),_=await Reflect.apply(s,this,h);return await u._def.returns._def.type.parseAsync(_,i).catch(T=>{throw f.addIssue(o(_,T)),f})})}else{let u=this;return ac(function(...l){let f=u._def.args.safeParse(l,i);if(!f.success)throw new tl([r(l,f.error)]);let h=Reflect.apply(s,this,f.data),_=u._def.returns.safeParse(h,i);if(!_.success)throw new tl([o(h,_.error)]);return _.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:uA.create(t).rest(rh.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new e({args:t||uA.create([]).rest(rh.create()),returns:n||rh.create(),typeName:en.ZodFunction,...Dn(r)})}},ST=class extends Nn{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})}};ST.create=(e,t)=>new ST({getter:e,typeName:en.ZodLazy,...Dn(t)});TT=class extends Nn{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return dt(n,{received:n.data,code:Ye.invalid_literal,expected:this._def.value}),Sn}return{status:"valid",value:t.data}}get value(){return this._def.value}};TT.create=(e,t)=>new TT({value:e,typeName:en.ZodLiteral,...Dn(t)});bT=class e extends Nn{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),r=this._def.values;return dt(n,{expected:br.joinValues(r),received:n.parsedType,code:Ye.invalid_type}),Sn}if(this._def.values.indexOf(t.data)===-1){let n=this._getOrReturnCtx(t),r=this._def.values;return dt(n,{received:n.data,code:Ye.invalid_enum_value,options:r}),Sn}return ac(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t){return e.create(t)}exclude(t){return e.create(this.options.filter(n=>!t.includes(n)))}};bT.create=u4e;IT=class extends Nn{_parse(t){let n=br.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ut.string&&r.parsedType!==ut.number){let o=br.objectValues(n);return dt(r,{expected:br.joinValues(o),received:r.parsedType,code:Ye.invalid_type}),Sn}if(n.indexOf(t.data)===-1){let o=br.objectValues(n);return dt(r,{received:r.data,code:Ye.invalid_enum_value,options:o}),Sn}return ac(t.data)}get enum(){return this._def.values}};IT.create=(e,t)=>new IT({values:e,typeName:en.ZodNativeEnum,...Dn(t)});$E=class extends Nn{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ut.promise&&n.common.async===!1)return dt(n,{code:Ye.invalid_type,expected:ut.promise,received:n.parsedType}),Sn;let r=n.parsedType===ut.promise?n.data:Promise.resolve(n.data);return ac(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};$E.create=(e,t)=>new $E({type:e,typeName:en.ZodPromise,...Dn(t)});ad=class extends Nn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===en.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=>{dt(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let s=o.transform(r.data,i);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(s).then(u=>this._def.schema._parseAsync({data:u,path:r.path,parent:r})):this._def.schema._parseSync({data:s,path:r.path,parent:r})}if(o.type==="refinement"){let s=u=>{let l=o.refinement(u,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){let u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?Sn:(u.status==="dirty"&&n.dirty(),s(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?Sn:(u.status==="dirty"&&n.dirty(),s(u.value).then(()=>({status:n.value,value:u.value}))))}if(o.type==="transform")if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!oO(s))return s;let u=o.transform(s.value,i);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>oO(s)?Promise.resolve(o.transform(s.value,i)).then(u=>({status:n.value,value:u})):s);br.assertNever(o)}};ad.create=(e,t,n)=>new ad({schema:e,typeName:en.ZodEffects,effect:t,...Dn(n)});ad.createWithPreprocess=(e,t,n)=>new ad({schema:t,effect:{type:"preprocess",transform:e},typeName:en.ZodEffects,...Dn(n)});Bf=class extends Nn{_parse(t){return this._getType(t)===ut.undefined?ac(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Bf.create=(e,t)=>new Bf({innerType:e,typeName:en.ZodOptional,...Dn(t)});ih=class extends Nn{_parse(t){return this._getType(t)===ut.null?ac(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};ih.create=(e,t)=>new ih({innerType:e,typeName:en.ZodNullable,...Dn(t)});CT=class extends Nn{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return n.parsedType===ut.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};CT.create=(e,t)=>new CT({innerType:e,typeName:en.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Dn(t)});fx=class extends Nn{_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 aj(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new tl(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new tl(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};fx.create=(e,t)=>new fx({innerType:e,typeName:en.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Dn(t)});mx=class extends Nn{_parse(t){if(this._getType(t)!==ut.nan){let r=this._getOrReturnCtx(t);return dt(r,{code:Ye.invalid_type,expected:ut.nan,received:r.parsedType}),Sn}return{status:"valid",value:t.data}}};mx.create=e=>new mx({typeName:en.ZodNaN,...Dn(e)});OPt=Symbol("zod_brand"),dj=class extends Nn{_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}},iO=class e extends Nn{_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"?Sn:i.status==="dirty"?(n.dirty(),a4e(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"?Sn: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:en.ZodPipeline})}},Ax=class extends Nn{_parse(t){let n=this._def.innerType._parse(t);return oO(n)&&(n.value=Object.freeze(n.value)),n}};Ax.create=(e,t)=>new Ax({innerType:e,typeName:en.ZodReadonly,...Dn(t)});c4e=(e,t={},n)=>e?HE.create().superRefine((r,o)=>{var i,s;if(!e(r)){let u=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(s=(i=u.fatal)!==null&&i!==void 0?i:n)!==null&&s!==void 0?s:!0,f=typeof u=="string"?{message:u}:u;o.addIssue({code:"custom",...f,fatal:l})}}):HE.create(),PPt={object:yu.lazycreate};(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(en||(en={}));MPt=(e,t={message:`Input not instance of ${e.name}`})=>c4e(n=>n instanceof e,t),l4e=zE.create,d4e=fT.create,LPt=mx.create,UPt=mT.create,p4e=AT.create,QPt=gT.create,FPt=cx.create,GPt=hT.create,jPt=_T.create,zPt=HE.create,HPt=rh.create,$Pt=Of.create,qPt=lx.create,VPt=oh.create,KPt=yu.create,YPt=yu.strictCreate,JPt=ET.create,ZPt=uj.create,WPt=yT.create,XPt=uA.create,eMt=cj.create,tMt=dx.create,nMt=px.create,rMt=lj.create,oMt=ST.create,iMt=TT.create,sMt=bT.create,aMt=IT.create,uMt=$E.create,o4e=ad.create,cMt=Bf.create,lMt=ih.create,dMt=ad.createWithPreprocess,pMt=iO.create,fMt=()=>l4e().optional(),mMt=()=>d4e().optional(),AMt=()=>p4e().optional(),gMt={string:(e=>zE.create({...e,coerce:!0})),number:(e=>fT.create({...e,coerce:!0})),boolean:(e=>AT.create({...e,coerce:!0})),bigint:(e=>mT.create({...e,coerce:!0})),date:(e=>gT.create({...e,coerce:!0}))},hMt=Sn,_u=Object.freeze({__proto__:null,defaultErrorMap:rO,setErrorMap:SPt,getErrorMap:ij,makeIssue:sj,EMPTY_PATH:TPt,addIssueToContext:dt,ParseStatus:Eu,INVALID:Sn,DIRTY:a4e,OK:ac,isAborted:ute,isDirty:cte,isValid:oO,isAsync:aj,get util(){return br},get objectUtil(){return ate},ZodParsedType:ut,getParsedType:jE,ZodType:Nn,ZodString:zE,ZodNumber:fT,ZodBigInt:mT,ZodBoolean:AT,ZodDate:gT,ZodSymbol:cx,ZodUndefined:hT,ZodNull:_T,ZodAny:HE,ZodUnknown:rh,ZodNever:Of,ZodVoid:lx,ZodArray:oh,ZodObject:yu,ZodUnion:ET,ZodDiscriminatedUnion:uj,ZodIntersection:yT,ZodTuple:uA,ZodRecord:cj,ZodMap:dx,ZodSet:px,ZodFunction:lj,ZodLazy:ST,ZodLiteral:TT,ZodEnum:bT,ZodNativeEnum:IT,ZodPromise:$E,ZodEffects:ad,ZodTransformer:ad,ZodOptional:Bf,ZodNullable:ih,ZodDefault:CT,ZodCatch:fx,ZodNaN:mx,BRAND:OPt,ZodBranded:dj,ZodPipeline:iO,ZodReadonly:Ax,custom:c4e,Schema:Nn,ZodSchema:Nn,late:PPt,get ZodFirstPartyTypeKind(){return en},coerce:gMt,any:zPt,array:VPt,bigint:UPt,boolean:p4e,date:QPt,discriminatedUnion:ZPt,effect:o4e,enum:sMt,function:rMt,instanceof:MPt,intersection:WPt,lazy:oMt,literal:iMt,map:tMt,nan:LPt,nativeEnum:aMt,never:$Pt,null:jPt,nullable:lMt,number:d4e,object:KPt,oboolean:AMt,onumber:mMt,optional:cMt,ostring:fMt,pipeline:pMt,preprocess:dMt,promise:uMt,record:eMt,set:nMt,strictObject:YPt,string:l4e,symbol:FPt,transformer:o4e,tuple:XPt,undefined:GPt,union:JPt,unknown:HPt,void:qPt,NEVER:hMt,ZodIssueCode:Ye,quotelessJson:yPt,ZodError:tl}),_Mt=e=>typeof e?.safeParse=="function",ite=e=>typeof e?.passthrough=="function",EMt=(e,t)=>ite(e)?ite(t)?e.merge(t):e:ite(t)?t:Object.assign({},e,t),hp=_u.object({name:_u.literal("ZodError"),issues:_u.array(_u.object({path:_u.array(_u.union([_u.string(),_u.number()])),message:_u.string().optional(),code:_u.nativeEnum(_u.ZodIssueCode)}).catchall(_u.any()))}),dte=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}},D6n=_u.object({message:_u.literal("Request validation failed"),pathParameterErrors:hp.nullable(),headerErrors:hp.nullable(),queryParameterErrors:hp.nullable(),bodyErrors:hp.nullable()}),N6n=_u.object({pathParameterErrors:hp.nullable(),headerErrors:hp.nullable(),queryParameterErrors:hp.nullable(),bodyErrors:hp.nullable()}),w6n=_u.object({paramsResult:hp.nullable(),headersResult:hp.nullable(),queryResult:hp.nullable(),bodyResult:hp.nullable()}),f4e="zod-ts-rest-polyfill",yMt=e=>{if(!e)return!1;let t=e?.["~standard"];return t?t.version===1&&typeof t.validate=="function":!1},SMt=e=>yMt(e)?e:_Mt(e)?(Object.assign(e,{"~standard":{vendor:f4e,version:1,validate:r=>{let o=e.safeParse(r);return o.success?{value:o.data}:{issues:o.error.issues}}}}),e):null,TMt=(e,t)=>e?t?e instanceof yu&&t instanceof yu?EMt(e,t):{...e,...t}:e:t,bMt=(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===f4e?{error:new tl(r.issues)}:{error:new dte(r.issues)}:n&&typeof e=="object"&&r.value?{value:{...e,...r.value}}:{value:r.value}},m4e=Symbol("ContractNoBody"),A4e=e=>"method"in e&&"path"in e,g4e=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>{var o,i,s;return A4e(r)?[n,{...r,path:t?.pathPrefix?t.pathPrefix+r.path:r.path,headers:TMt(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,g4e(r,t)]})),ste=Symbol("ContractPlainType"),Su=()=>({router:(e,t)=>g4e(e,t),query:e=>e,mutation:e=>e,responses:e=>e,response:()=>ste,body:()=>ste,type:()=>ste,otherResponse:({contentType:e,body:t})=>({contentType:e,body:t}),noBody:()=>m4e}),IMt=({path:e,params:t})=>{let n=t;return e.replace(/\/?:([^/?]+)\??/g,(r,o)=>n[o]?`${r.startsWith("/")?"/":""}${n[o]}`:"")},CMt=(e,t=!1)=>{let n=t?vMt(e):RMt(e);return n?.length>0?"?"+n:""},vMt=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("&"):"",RMt=e=>e?Object.keys(e).flatMap(t=>pte(t,e[t])).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(n)}`).join("&"):"",pte=(e,t)=>Array.isArray(t)?t.flatMap((n,r)=>pte(`${e}[${r}]`,n)):t instanceof Date?[[`${e}`,t.toISOString()]]:t===null?[[`${e}`,""]]:t===void 0?[]:typeof t=="object"?Object.keys(t).flatMap(n=>pte(`${e}[${n}]`,t[n])):[[`${e}`,`${t}`]],fte=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}},mte=async({route:e,path:t,method:n,headers:r,body:o,validateResponse:i,fetchOptions:s})=>{let u=await fetch(t,{...s,method:n,headers:r,body:o}),l=u.headers.get("content-type");if(l?.includes("application/")&&l?.includes("json")){let f=e.responses[u.status],h={status:u.status,body:f===m4e?void 0:await u.json(),headers:u.headers},_=SMt(f);if(_&&(i??e.validateResponseOnClient)){let E=bMt(h.body,_);if(E.error)throw E.error;return{...h,body:E.value}}return h}return l?.includes("text/")?{status:u.status,body:await u.text(),headers:u.headers}:{status:u.status,body:await u.blob(),headers:u.headers}},xMt=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},i4e=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>[t.toLowerCase(),n])),DMt=e=>{let{path:t,clientArgs:n,route:r,body:o,query:i,extraInputArgs:s,headers:u,fetchOptions:l}=e,f=n.api||mte,h=n.baseHeaders&&Object.fromEntries(Object.entries(n.baseHeaders).map(([T,v])=>typeof v=="function"?[T,v(e)]:[T,v])),_={...h&&i4e(h),...i4e(u)};Object.keys(_).forEach(T=>{_[T]===void 0&&delete _[T]});let E={route:r,path:t,method:r.method,headers:_,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"?E={...E,contentType:"multipart/form-data",body:o instanceof FormData?o:xMt(o)}:"contentType"in r&&r.contentType==="application/x-www-form-urlencoded"?E={...E,contentType:"application/x-www-form-urlencoded",headers:{"content-type":"application/x-www-form-urlencoded",...E.headers},body:typeof o=="string"?o:new URLSearchParams(o)}:o!=null&&(E={...E,contentType:"application/json",headers:{"content-type":"application/json",...E.headers},body:JSON.stringify(o)})),f({...E,...s})},NMt=(e,t,n)=>{let{query:r,params:o,body:i,headers:s,extraHeaders:u,overrideClientOptions:l,fetchOptions:f,cache:h,next:_,...E}=n||{},T={...t,...l},v=typeof o=="object"?Object.fromEntries(Object.entries(o).map(([x,B])=>[x,String(B)])):{};return{path:wMt(r,T.baseUrl,v,e,!!T.jsonQuery),clientArgs:T,route:e,body:i,query:r,extraInputArgs:E,fetchOptions:{...h&&{cache:h},..._&&{next:_},...f},headers:{...u,...s}}},wMt=(e,t,n,r,o)=>{let i=IMt({path:r.path,params:n}),s=CMt(e,o);return t.endsWith("/")&&i.startsWith("/")?`${t}${i.substring(1)}${s}`:`${t}${i}${s}`},kMt=(e,t)=>{let n=Object.keys(e.responses);return async r=>{let o=NMt(e,t,r),i=await DMt(o);if(!t.throwOnUnknownStatus||n.includes(i.status.toString()))return i;throw new fte(i,n)}},Ate=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>A4e(r)?[n,kMt(r,t)]:[n,Ate(r,t)]))});function se(e,t,n){function r(u,l){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:l,constr:s,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,l);let f=s.prototype,h=Object.keys(f);for(let _=0;_<h.length;_++){let E=h[_];E in u||(u[E]=f[E].bind(u))}}let o=n?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(u){var l;let f=n?.Parent?new i:this;r(f,u),(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:u=>n?.Parent&&u instanceof n.Parent?!0:u?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}function Ci(e){return e&&Object.assign(vT,e),vT}var h4e,gte,hte,Pf,qE,vT,RT=k(()=>{m();gte=Object.freeze({status:"aborted"});hte=Symbol("zod_brand"),Pf=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},qE=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(h4e=globalThis).__zod_globalConfig??(h4e.__zod_globalConfig={});vT=globalThis.__zod_globalConfig});var Ue={};Xs(Ue,{BIGINT_FORMAT_RANGES:()=>Rte,Class:()=>Ete,NUMBER_FORMAT_RANGES:()=>vte,aborted:()=>JE,allowsEval:()=>Tte,assert:()=>LMt,assertEqual:()=>BMt,assertIs:()=>PMt,assertNever:()=>MMt,assertNotEqual:()=>OMt,assignProp:()=>KE,base64ToUint8Array:()=>E4e,base64urlToUint8Array:()=>e2t,cached:()=>hx,captureStackTrace:()=>fj,cleanEnum:()=>XMt,cleanRegex:()=>uO,clone:()=>uc,cloneDef:()=>QMt,createTransparentProxy:()=>$Mt,defineLazy:()=>Hn,esc:()=>pj,escapeRegex:()=>Ep,explicitlyAborted:()=>xte,extend:()=>KMt,finalizeIssue:()=>cc,floatSafeRemainder:()=>yte,getElementAtPath:()=>FMt,getEnumValues:()=>aO,getLengthableOrigin:()=>dO,getParsedType:()=>HMt,getSizableOrigin:()=>lO,hexToUint8Array:()=>n2t,isObject:()=>xT,isPlainObject:()=>YE,issue:()=>_x,joinValues:()=>pe,jsonStringifyReplacer:()=>gx,merge:()=>JMt,mergeDefs:()=>sh,normalizeParams:()=>Ve,nullish:()=>VE,numKeys:()=>zMt,objectClone:()=>UMt,omit:()=>VMt,optionalKeys:()=>Cte,parsedType:()=>Pe,partial:()=>ZMt,pick:()=>qMt,prefixIssues:()=>nl,primitiveTypes:()=>Ite,promiseAllObject:()=>GMt,propertyKeyTypes:()=>cO,randomString:()=>jMt,required:()=>WMt,safeExtend:()=>YMt,shallowClone:()=>bte,slugify:()=>Ste,stringifyPrimitive:()=>Oe,uint8ArrayToBase64:()=>y4e,uint8ArrayToBase64url:()=>t2t,uint8ArrayToHex:()=>r2t,unwrapMessage:()=>sO});function BMt(e){return e}function OMt(e){return e}function PMt(e){}function MMt(e){throw new Error("Unexpected value in exhaustive check")}function LMt(e){}function aO(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 pe(e,t="|"){return e.map(n=>Oe(n)).join(t)}function gx(e,t){return typeof t=="bigint"?t.toString():t}function hx(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 uO(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function yte(e,t){let n=e/t,r=Math.round(n),o=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}function Hn(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==_4e)return r===void 0&&(r=_4e,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function UMt(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function KE(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function sh(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function QMt(e){return sh(e._zod.def)}function FMt(e,t){return t?t.reduce((n,r)=>n?.[r],e):e}function GMt(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 jMt(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function pj(e){return JSON.stringify(e)}function Ste(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function xT(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function YE(e){if(xT(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(xT(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function bte(e){return YE(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function zMt(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function Ep(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function uc(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Ve(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 $Mt(e){let t;return new Proxy({},{get(n,r,o){return t??(t=e()),Reflect.get(t,r,o)},set(n,r,o,i){return t??(t=e()),Reflect.set(t,r,o,i)},has(n,r){return t??(t=e()),Reflect.has(t,r)},deleteProperty(n,r){return t??(t=e()),Reflect.deleteProperty(t,r)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,o){return t??(t=e()),Reflect.defineProperty(t,r,o)}})}function Oe(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Cte(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function qMt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=sh(e._zod.def,{get shape(){let s={};for(let u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(s[u]=n.shape[u])}return KE(this,"shape",s),s},checks:[]});return uc(e,i)}function VMt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=sh(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete s[u]}return KE(this,"shape",s),s},checks:[]});return uc(e,i)}function KMt(e,t){if(!YE(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let o=sh(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return KE(this,"shape",i),i}});return uc(e,o)}function YMt(e,t){if(!YE(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=sh(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return KE(this,"shape",r),r}});return uc(e,n)}function JMt(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=sh(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return KE(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return uc(e,n)}function ZMt(e,t,n){let o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=sh(t._zod.def,{get shape(){let u=t._zod.def.shape,l={...u};if(n)for(let f in n){if(!(f in u))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(l[f]=e?new e({type:"optional",innerType:u[f]}):u[f])}else for(let f in u)l[f]=e?new e({type:"optional",innerType:u[f]}):u[f];return KE(this,"shape",l),l},checks:[]});return uc(t,s)}function WMt(e,t,n){let r=sh(t._zod.def,{get shape(){let o=t._zod.def.shape,i={...o};if(n)for(let s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(let s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return KE(this,"shape",i),i}});return uc(t,r)}function JE(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 xte(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 nl(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function sO(e){return typeof e=="string"?e:e?.message}function cc(e,t,n){let r=e.message?e.message:sO(e.inst?._zod.def?.error?.(e))??sO(t?.error?.(e))??sO(n.customError?.(e))??sO(n.localeError?.(e))??"Invalid input",{inst:o,continue:i,input:s,...u}=e;return u.path??(u.path=[]),u.message=r,t?.reportInput&&(u.input=s),u}function lO(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function dO(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Pe(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function _x(...e){let[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function XMt(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function E4e(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 y4e(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function e2t(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return E4e(t+n)}function t2t(e){return y4e(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function n2t(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 r2t(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var _4e,fj,Tte,HMt,cO,Ite,vte,Rte,Ete,Tt=k(()=>{m();RT();_4e=Symbol("evaluating");fj="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};Tte=hx(()=>{if(vT.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});HMt=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}`)}},cO=new Set(["string","number","symbol"]),Ite=new Set(["string","number","bigint","boolean","symbol","undefined"]);vte={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]},Rte={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};Ete=class{constructor(...t){}}});function fO(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 mO(e,t=n=>n.message){let n={_errors:[]},r=(o,i=[])=>{for(let s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(u=>r({issues:u},[...i,...s.path]));else if(s.code==="invalid_key")r({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")r({issues:s.issues},[...i,...s.path]);else{let u=[...i,...s.path];if(u.length===0)n._errors.push(t(s));else{let l=n,f=0;for(;f<u.length;){let h=u[f];f===u.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 Dte(e,t=n=>n.message){let n={errors:[]},r=(o,i=[])=>{var s,u;for(let l of o.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(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,_=0;for(;_<f.length;){let E=f[_],T=_===f.length-1;typeof E=="string"?(h.properties??(h.properties={}),(s=h.properties)[E]??(s[E]={errors:[]}),h=h.properties[E]):(h.items??(h.items=[]),(u=h.items)[E]??(u[E]={errors:[]}),h=h.items[E]),T&&h.errors.push(t(l)),_++}}};return r(e),n}function T4e(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 Nte(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 ${T4e(r.path)}`);return t.join(`
|
|
41
41
|
`)}var S4e,pO,rl,wte=k(()=>{m();RT();Tt();S4e=(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,gx,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},pO=se("$ZodError",S4e),rl=se("$ZodError",S4e,{Parent:Error})});var Ex,mj,yx,Aj,Sx,kte,Tx,Bte,gj,i2t,hj,s2t,_j,a2t,Ej,u2t,yj,c2t,Sj,l2t,Tj,d2t,bj,p2t,Ote=k(()=>{m();RT();wte();Tt();Ex=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 Pf;if(s.issues.length){let u=new(o?.Err??e)(s.issues.map(l=>cc(l,i,Ci())));throw fj(u,o?.callee),u}return s.value},mj=Ex(rl),yx=e=>async(t,n,r,o)=>{let i=r?{...r,async:!0}:{async:!0},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let u=new(o?.Err??e)(s.issues.map(l=>cc(l,i,Ci())));throw fj(u,o?.callee),u}return s.value},Aj=yx(rl),Sx=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 Pf;return i.issues.length?{success:!1,error:new(e??pO)(i.issues.map(s=>cc(s,o,Ci())))}:{success:!0,data:i.value}},kte=Sx(rl),Tx=e=>async(t,n,r)=>{let o=r?{...r,async:!0}:{async:!0},i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>cc(s,o,Ci())))}:{success:!0,data:i.value}},Bte=Tx(rl),gj=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return Ex(e)(t,n,o)},i2t=gj(rl),hj=e=>(t,n,r)=>Ex(e)(t,n,r),s2t=hj(rl),_j=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return yx(e)(t,n,o)},a2t=_j(rl),Ej=e=>async(t,n,r)=>yx(e)(t,n,r),u2t=Ej(rl),yj=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return Sx(e)(t,n,o)},c2t=yj(rl),Sj=e=>(t,n,r)=>Sx(e)(t,n,r),l2t=Sj(rl),Tj=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return Tx(e)(t,n,o)},d2t=Tj(rl),bj=e=>async(t,n,r)=>Tx(e)(t,n,r),p2t=bj(rl)});var ud={};Xs(ud,{base64:()=>Jte,base64url:()=>Ij,bigint:()=>rne,boolean:()=>ine,browserEmail:()=>y2t,cidrv4:()=>Kte,cidrv6:()=>Yte,cuid:()=>Pte,cuid2:()=>Mte,date:()=>Xte,datetime:()=>tne,domain:()=>b2t,duration:()=>Gte,e164:()=>Wte,email:()=>zte,emoji:()=>Hte,extendedDuration:()=>f2t,guid:()=>jte,hex:()=>I2t,hostname:()=>T2t,html5Email:()=>h2t,httpProtocol:()=>Zte,idnEmail:()=>E2t,integer:()=>one,ipv4:()=>$te,ipv6:()=>qte,ksuid:()=>Qte,lowercase:()=>une,mac:()=>Vte,md5_base64:()=>v2t,md5_base64url:()=>R2t,md5_hex:()=>C2t,nanoid:()=>Fte,null:()=>sne,number:()=>Cj,rfc5322Email:()=>_2t,sha1_base64:()=>D2t,sha1_base64url:()=>N2t,sha1_hex:()=>x2t,sha256_base64:()=>k2t,sha256_base64url:()=>B2t,sha256_hex:()=>w2t,sha384_base64:()=>P2t,sha384_base64url:()=>M2t,sha384_hex:()=>O2t,sha512_base64:()=>U2t,sha512_base64url:()=>Q2t,sha512_hex:()=>L2t,string:()=>nne,time:()=>ene,ulid:()=>Lte,undefined:()=>ane,unicodeEmail:()=>b4e,uppercase:()=>cne,uuid:()=>DT,uuid4:()=>m2t,uuid6:()=>A2t,uuid7:()=>g2t,xid:()=>Ute});function Hte(){return new RegExp(S2t,"u")}function C4e(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 ene(e){return new RegExp(`^${C4e(e)}$`)}function tne(e){let t=C4e({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(`^${I4e}T(?:${r})$`)}function AO(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function gO(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Pte,Mte,Lte,Ute,Qte,Fte,Gte,f2t,jte,DT,m2t,A2t,g2t,zte,h2t,_2t,b4e,E2t,y2t,S2t,$te,qte,Vte,Kte,Yte,Jte,Ij,T2t,b2t,Zte,Wte,I4e,Xte,nne,rne,one,Cj,ine,sne,ane,une,cne,I2t,C2t,v2t,R2t,x2t,D2t,N2t,w2t,k2t,B2t,O2t,P2t,M2t,L2t,U2t,Q2t,vj=k(()=>{m();Tt();Pte=/^[cC][0-9a-z]{6,}$/,Mte=/^[0-9a-z]+$/,Lte=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ute=/^[0-9a-vA-V]{20}$/,Qte=/^[A-Za-z0-9]{27}$/,Fte=/^[a-zA-Z0-9_-]{21}$/,Gte=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,f2t=/^[-+]?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)?)??$/,jte=/^([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})$/,DT=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)$/,m2t=DT(4),A2t=DT(6),g2t=DT(7),zte=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,h2t=/^[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])?)*$/,_2t=/^(([^<>()\[\]\\.,;:\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,}))$/,b4e=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,E2t=b4e,y2t=/^[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])?)*$/,S2t="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";$te=/^(?:(?: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])$/,qte=/^(([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}|:))$/,Vte=e=>{let t=Ep(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Kte=/^((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])$/,Yte=/^(([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])$/,Jte=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ij=/^[A-Za-z0-9_-]*$/,T2t=/^(?=.{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])?)*\.?$/,b2t=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Zte=/^https?$/,Wte=/^\+[1-9]\d{6,14}$/,I4e="(?:(?:\\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])))",Xte=new RegExp(`^${I4e}$`);nne=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},rne=/^-?\d+n?$/,one=/^-?\d+$/,Cj=/^-?\d+(?:\.\d+)?$/,ine=/^(?:true|false)$/i,sne=/^null$/i,ane=/^undefined$/i,une=/^[^A-Z]*$/,cne=/^[^a-z]*$/,I2t=/^[0-9a-fA-F]*$/;C2t=/^[0-9a-fA-F]{32}$/,v2t=AO(22,"=="),R2t=gO(22),x2t=/^[0-9a-fA-F]{40}$/,D2t=AO(27,"="),N2t=gO(27),w2t=/^[0-9a-fA-F]{64}$/,k2t=AO(43,"="),B2t=gO(43),O2t=/^[0-9a-fA-F]{96}$/,P2t=AO(64,""),M2t=gO(64),L2t=/^[0-9a-fA-F]{128}$/,U2t=AO(86,"=="),Q2t=gO(86)});function v4e(e,t,n){e.issues.length&&t.issues.push(...nl(n,e.issues))}var oo,R4e,Rj,xj,lne,dne,pne,fne,mne,Ane,gne,hne,_ne,bx,Ene,yne,Sne,Tne,bne,Ine,Cne,vne,Rne,Dj=k(()=>{m();RT();vj();Tt();oo=se("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),R4e={number:"number",bigint:"bigint",object:"date"},Rj=se("$ZodCheckLessThan",(e,t)=>{oo.init(e,t);let n=R4e[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})}}),xj=se("$ZodCheckGreaterThan",(e,t)=>{oo.init(e,t);let n=R4e[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})}}),lne=se("$ZodCheckMultipleOf",(e,t)=>{oo.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):yte(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})}}),dne=se("$ZodCheckNumberFormat",(e,t)=>{oo.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[o,i]=vte[t.format];e._zod.onattach.push(s=>{let u=s._zod.bag;u.format=t.format,u.minimum=o,u.maximum=i,n&&(u.pattern=one)}),e._zod.check=s=>{let u=s.value;if(n){if(!Number.isInteger(u)){s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?s.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):s.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}u<o&&s.issues.push({origin:"number",input:u,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),u>i&&s.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),pne=se("$ZodCheckBigIntFormat",(e,t)=>{oo.init(e,t);let[n,r]=Rte[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})}}),fne=se("$ZodCheckMaxSize",(e,t)=>{var n;oo.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:lO(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),mne=se("$ZodCheckMinSize",(e,t)=>{var n;oo.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:lO(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Ane=se("$ZodCheckSizeEquals",(e,t)=>{var n;oo.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:lO(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})}}),gne=se("$ZodCheckMaxLength",(e,t)=>{var n;oo.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=dO(o);r.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),hne=se("$ZodCheckMinLength",(e,t)=>{var n;oo.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=dO(o);r.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),_ne=se("$ZodCheckLengthEquals",(e,t)=>{var n;oo.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=dO(o),u=i>t.length;r.issues.push({origin:s,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),bx=se("$ZodCheckStringFormat",(e,t)=>{var n,r;oo.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=()=>{})}),Ene=se("$ZodCheckRegex",(e,t)=>{bx.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})}}),yne=se("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=une),bx.init(e,t)}),Sne=se("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=cne),bx.init(e,t)}),Tne=se("$ZodCheckIncludes",(e,t)=>{oo.init(e,t);let n=Ep(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})}}),bne=se("$ZodCheckStartsWith",(e,t)=>{oo.init(e,t);let n=new RegExp(`^${Ep(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})}}),Ine=se("$ZodCheckEndsWith",(e,t)=>{oo.init(e,t);let n=new RegExp(`.*${Ep(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})}});Cne=se("$ZodCheckProperty",(e,t)=>{oo.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=>v4e(o,n,t.property));v4e(r,n,t.property)}}),vne=se("$ZodCheckMimeType",(e,t)=>{oo.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})}}),Rne=se("$ZodCheckOverwrite",(e,t)=>{oo.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}})});var hO,xne=k(()=>{m();hO=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 vX(e,t,n,r=void 0){n&&(0,vB.safe
|
|
|
101
101
|
|
|
102
102
|
`)}T.write("payload.value = newResult;"),T.write("return payload;");let P=T.compile();return(G,j)=>P(E,G,j)},i,s=xT,u=!vT.jitless,f=u&&Tte.value,h=t.catchall,_;e._zod.parse=(E,T)=>{_??(_=r.value);let v=E.value;return s(v)?u&&f&&T?.async===!1&&T.jitless!==!0?(i||(i=o(t.shape)),E=i(E,T),h?q4e([],v,E,T,_,e):E):n(E,T):(E.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),E)}});EO=se("$ZodUnion",(e,t)=>{dn.init(e,t),Hn(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),Hn(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),Hn(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),Hn(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=>uO(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 u of t.options){let l=u._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(u=>N4e(u,r,e,o)):N4e(s,r,e,o)}});gre=se("$ZodXor",(e,t)=>{EO.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 u of t.options){let l=u._zod.run({value:r.value,issues:[]},o);l instanceof Promise?(s.push(l),i=!0):s.push(l)}return i?Promise.all(s).then(u=>w4e(u,r,e,o)):w4e(s,r,e,o)}}),hre=se("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,EO.init(e,t);let n=e._zod.parse;Hn(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[u,l]of Object.entries(s)){o[u]||(o[u]=new Set);for(let f of l)o[u].add(f)}}return o});let r=hx(()=>{let o=t.options,i=new Map;for(let s of o){let u=s._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let l of u){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(!xT(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;let u=r.value.get(s?.[t.discriminator]);return u?u._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)}}),_re=se("$ZodIntersection",(e,t)=>{dn.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])=>k4e(n,l,f)):k4e(n,i,s)}});Mj=se("$ZodTuple",(e,t)=>{dn.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=[],u=B4e(n,"optin"),l=B4e(n,"optout");if(!t.rest){if(i.length<u)return r.issues.push({code:"too_small",minimum:u,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 _=n[h]._zod.run({value:i[h],issues:[]},o);_ instanceof Promise?s.push(_.then(E=>{f[h]=E})):f[h]=_}if(t.rest){let h=n.length-1,_=i.slice(n.length);for(let E of _){h++;let T=t.rest._zod.run({value:E,issues:[]},o);T instanceof Promise?s.push(T.then(v=>O4e(v,r,h))):O4e(T,r,h)}}return s.length?Promise.all(s).then(()=>P4e(f,r,n,i,l)):P4e(f,r,n,i,l)}});Ere=se("$ZodRecord",(e,t)=>{dn.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;if(!YE(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 u=new Set;for(let f of s)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){u.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(T=>cc(T,r,Ci())),input:f,path:[f],inst:e});continue}let _=h.value,E=t.valueType._zod.run({value:o[f],issues:[]},r);E instanceof Promise?i.push(E.then(T=>{T.issues.length&&n.issues.push(...nl(f,T.issues)),n.value[_]=T.value})):(E.issues.length&&n.issues.push(...nl(f,E.issues)),n.value[_]=E.value)}let l;for(let f in o)u.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 u of Reflect.ownKeys(o)){if(u==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,u))continue;let l=t.keyType._zod.run({value:u,issues:[]},r);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&Cj.test(u)&&l.issues.length){let _=t.keyType._zod.run({value:Number(u),issues:[]},r);if(_ instanceof Promise)throw new Error("Async schemas not supported in object keys currently");_.issues.length===0&&(l=_)}if(l.issues.length){t.mode==="loose"?n.value[u]=o[u]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(_=>cc(_,r,Ci())),input:u,path:[u],inst:e});continue}let h=t.valueType._zod.run({value:o[u],issues:[]},r);h instanceof Promise?i.push(h.then(_=>{_.issues.length&&n.issues.push(...nl(u,_.issues)),n.value[l.value]=_.value})):(h.issues.length&&n.issues.push(...nl(u,h.issues)),n.value[l.value]=h.value)}}return i.length?Promise.all(i).then(()=>n):n}}),yre=se("$ZodMap",(e,t)=>{dn.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,u]of o){let l=t.keyType._zod.run({value:s,issues:[]},r),f=t.valueType._zod.run({value:u,issues:[]},r);l instanceof Promise||f instanceof Promise?i.push(Promise.all([l,f]).then(([h,_])=>{M4e(h,_,n,s,o,e,r)})):M4e(l,f,n,s,o,e,r)}return i.length?Promise.all(i).then(()=>n):n}});Sre=se("$ZodSet",(e,t)=>{dn.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 u=t.valueType._zod.run({value:s,issues:[]},r);u instanceof Promise?i.push(u.then(l=>L4e(l,n))):L4e(u,n)}return i.length?Promise.all(i).then(()=>n):n}});Tre=se("$ZodEnum",(e,t)=>{dn.init(e,t);let n=aO(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>cO.has(typeof o)).map(o=>typeof o=="string"?Ep(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}}),bre=se("$ZodLiteral",(e,t)=>{if(dn.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"?Ep(r):r?Ep(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}}),Ire=se("$ZodFile",(e,t)=>{dn.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}}),Cre=se("$ZodTransform",(e,t)=>{dn.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new qE(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 Pf;return n.value=o,n.fallback=!0,n}});Lj=se("$ZodOptional",(e,t)=>{dn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Hn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Hn(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${uO(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=>U4e(s,o)):U4e(i,o)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),vre=se("$ZodExactOptional",(e,t)=>{Lj.init(e,t),Hn(e._zod,"values",()=>t.innerType._zod.values),Hn(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),Rre=se("$ZodNullable",(e,t)=>{dn.init(e,t),Hn(e._zod,"optin",()=>t.innerType._zod.optin),Hn(e._zod,"optout",()=>t.innerType._zod.optout),Hn(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${uO(n.source)}|null)$`):void 0}),Hn(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)}),xre=se("$ZodDefault",(e,t)=>{dn.init(e,t),e._zod.optin="optional",Hn(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=>Q4e(i,t)):Q4e(o,t)}});Dre=se("$ZodPrefault",(e,t)=>{dn.init(e,t),e._zod.optin="optional",Hn(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))}),Nre=se("$ZodNonOptional",(e,t)=>{dn.init(e,t),Hn(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=>F4e(i,e)):F4e(o,e)}});wre=se("$ZodSuccess",(e,t)=>{dn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new qE("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)}}),kre=se("$ZodCatch",(e,t)=>{dn.init(e,t),e._zod.optin="optional",Hn(e._zod,"optout",()=>t.innerType._zod.optout),Hn(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=>cc(s,r,Ci()))},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=>cc(i,r,Ci()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),Bre=se("$ZodNaN",(e,t)=>{dn.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)}),Uj=se("$ZodPipe",(e,t)=>{dn.init(e,t),Hn(e._zod,"values",()=>t.in._zod.values),Hn(e._zod,"optin",()=>t.in._zod.optin),Hn(e._zod,"optout",()=>t.out._zod.optout),Hn(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=>Nj(s,t.in,r)):Nj(i,t.in,r)}let o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>Nj(i,t.out,r)):Nj(o,t.out,r)}});yO=se("$ZodCodec",(e,t)=>{dn.init(e,t),Hn(e._zod,"values",()=>t.in._zod.values),Hn(e._zod,"optin",()=>t.in._zod.optin),Hn(e._zod,"optout",()=>t.out._zod.optout),Hn(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=>wj(s,t,r)):wj(i,t,r)}else{let i=t.out._zod.run(n,r);return i instanceof Promise?i.then(s=>wj(s,t,r)):wj(i,t,r)}}});Ore=se("$ZodPreprocess",(e,t)=>{Uj.init(e,t)}),Pre=se("$ZodReadonly",(e,t)=>{dn.init(e,t),Hn(e._zod,"propValues",()=>t.innerType._zod.propValues),Hn(e._zod,"values",()=>t.innerType._zod.values),Hn(e._zod,"optin",()=>t.innerType?._zod?.optin),Hn(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(G4e):G4e(o)}});Mre=se("$ZodTemplateLiteral",(e,t)=>{dn.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||Ite.has(typeof r))n.push(Ep(`${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)}),Lre=se("$ZodFunction",(e,t)=>(dn.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?mj(e._def.input,r):r,i=Reflect.apply(n,this,o);return e._def.output?mj(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 Aj(e._def.input,r):r,i=await Reflect.apply(n,this,o);return e._def.output?await Aj(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 Mj({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)),Ure=se("$ZodPromise",(e,t)=>{dn.init(e,t),e._zod.parse=(n,r)=>Promise.resolve(n.value).then(o=>t.innerType._zod.run({value:o,issues:[]},r))}),Qre=se("$ZodLazy",(e,t)=>{dn.init(e,t),Hn(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),Hn(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Hn(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Hn(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Hn(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),Fre=se("$ZodCustom",(e,t)=>{oo.init(e,t),dn.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=>j4e(i,n,r,e));j4e(o,n,r,e)}})});function K4e(){return{localeError:G2t()}}var G2t,Y4e=k(()=>{m();Tt();G2t=()=>{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=Pe(o.input),u=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 ${u}`:`\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 ${u}`}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 ${Oe(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: ${pe(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":""}: ${pe(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 J4e(){return{localeError:j2t()}}var j2t,Z4e=k(()=>{m();Tt();j2t=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${o.expected}, daxil olan ${u}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${u}`}case"invalid_value":return o.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${Oe(o.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${pe(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":""}: ${pe(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 W4e(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 X4e(){return{localeError:z2t()}}var z2t,e3e=k(()=>{m();Tt();z2t=()=>{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=Pe(o.input),u=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 ${u}`:`\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 ${u}`}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 ${Oe(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 ${pe(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s){let u=Number(o.maximum),l=W4e(u,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 u=Number(o.minimum),l=W4e(u,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"}: ${pe(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 t3e(){return{localeError:H2t()}}var H2t,n3e=k(()=>{m();Tt();H2t=()=>{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=Pe(o.input),u=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 ${u}`:`\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 ${u}`}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 ${Oe(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 ${pe(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":""}: ${pe(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 r3e(){return{localeError:$2t()}}var $2t,o3e=k(()=>{m();Tt();$2t=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${o.expected}, s'ha rebut ${u}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${u}`}case"invalid_value":return o.values.length===1?`Valor inv\xE0lid: s'esperava ${Oe(o.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${pe(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":""}: ${pe(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 i3e(){return{localeError:q2t()}}var q2t,s3e=k(()=>{m();Tt();q2t=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${o.expected}, obdr\u017Eeno ${u}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${u}`}case"invalid_value":return o.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${Oe(o.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${pe(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: ${pe(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 a3e(){return{localeError:V2t()}}var V2t,u3e=k(()=>{m();Tt();V2t=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ugyldigt input: forventede instanceof ${o.expected}, fik ${u}`:`Ugyldigt input: forventede ${i}, fik ${u}`}case"invalid_value":return o.values.length===1?`Ugyldig v\xE6rdi: forventede ${Oe(o.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${pe(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin),u=r[o.origin]??o.origin;return s?`For stor: forventede ${u??"value"} ${s.verb} ${i} ${o.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${u??"value"} havde ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin),u=r[o.origin]??o.origin;return s?`For lille: forventede ${u} ${s.verb} ${i} ${o.minimum.toString()} ${s.unit}`:`For lille: forventede ${u} 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"}: ${pe(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 c3e(){return{localeError:K2t()}}var K2t,l3e=k(()=>{m();Tt();K2t=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${o.expected}, erhalten ${u}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${u}`}case"invalid_value":return o.values.length===1?`Ung\xFCltige Eingabe: erwartet ${Oe(o.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${pe(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"}: ${pe(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 d3e(){return{localeError:Y2t()}}var Y2t,p3e=k(()=>{m();Tt();Y2t=()=>{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=Pe(o.input),u=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 ${u}`:`\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 ${u}`}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 ${Oe(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 ${pe(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"}: ${pe(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 Qj(){return{localeError:J2t()}}var J2t,jre=k(()=>{m();Tt();J2t=()=>{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=Pe(o.input),u=r[s]??s;return`Invalid input: expected ${i}, received ${u}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${Oe(o.values[0])}`:`Invalid option: expected one of ${pe(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":""}: ${pe(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 f3e(){return{localeError:Z2t()}}var Z2t,m3e=k(()=>{m();Tt();Z2t=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${o.expected}, ricevi\u011Dis ${u}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${u}`}case"invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${Oe(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${pe(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":""}: ${pe(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 A3e(){return{localeError:W2t()}}var W2t,g3e=k(()=>{m();Tt();W2t=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${o.expected}, recibido ${u}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${u}`}case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: se esperaba ${Oe(o.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${pe(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin),u=r[o.origin]??o.origin;return s?`Demasiado grande: se esperaba que ${u??"valor"} tuviera ${i}${o.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${u??"valor"} fuera ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin),u=r[o.origin]??o.origin;return s?`Demasiado peque\xF1o: se esperaba que ${u} tuviera ${i}${o.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${u} 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":""}: ${pe(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 h3e(){return{localeError:X2t()}}var X2t,_3e=k(()=>{m();Tt();X2t=()=>{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=Pe(o.input),u=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 ${u} \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 ${u} \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 ${Oe(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 ${pe(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: ${pe(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 E3e(){return{localeError:eLt()}}var eLt,y3e=k(()=>{m();Tt();eLt=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Virheellinen tyyppi: odotettiin instanceof ${o.expected}, oli ${u}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${u}`}case"invalid_value":return o.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${Oe(o.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${pe(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"}: ${pe(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 S3e(){return{localeError:tLt()}}var tLt,T3e=k(()=>{m();Tt();tLt=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : instanceof ${o.expected} attendu, ${u} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${u} re\xE7u`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : ${Oe(o.values[0])} attendu`:`Option invalide : une valeur parmi ${pe(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":""} : ${pe(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 b3e(){return{localeError:nLt()}}var nLt,I3e=k(()=>{m();Tt();nLt=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : attendu instanceof ${o.expected}, re\xE7u ${u}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${u}`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : attendu ${Oe(o.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${pe(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":""} : ${pe(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 C3e(){return{localeError:rLt()}}var rLt,v3e=k(()=>{m();Tt();rLt=()=>{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,u={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,_=l[h??""]??r(h),E=Pe(f.input),T=l[E]??e[E]?.label??E;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 ${T}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${_}, \u05D4\u05EA\u05E7\u05D1\u05DC ${T}`}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 ${Oe(f.values[0])}`;let h=f.values.map(T=>Oe(T));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 _=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 ${_}`}case"too_big":{let h=s(f.origin),_=o(f.origin??"value");if(f.origin==="string")return`${h?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${_} \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: ${_} \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",R=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: ${_} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${R}`.trim()}let E=f.inclusive?"<=":"<",T=i(f.origin??"value");return h?.unit?`${h.longLabel} \u05DE\u05D3\u05D9: ${_} ${T} ${E}${f.maximum.toString()} ${h.unit}`:`${h?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${_} ${T} ${E}${f.maximum.toString()}`}case"too_small":{let h=s(f.origin),_=o(f.origin??"value");if(f.origin==="string")return`${h?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${_} \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: ${_} \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 x=(f.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${_} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${x}`}let R=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: ${_} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${R}`.trim()}let E=f.inclusive?">=":">",T=i(f.origin??"value");return h?.unit?`${h.shortLabel} \u05DE\u05D3\u05D9: ${_} ${T} ${E}${f.minimum.toString()} ${h.unit}`:`${h?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${_} ${T} ${E}${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 _=u[h.format],E=_?.label??h.format,v=(_?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${E} \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"}: ${pe(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 R3e(){return{localeError:oLt()}}var oLt,x3e=k(()=>{m();Tt();oLt=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${o.expected}, a primljeno je ${u}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${u}`}case"invalid_value":return o.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${Oe(o.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${pe(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin),u=r[o.origin]??o.origin;return s?`Preveliko: o\u010Dekivano da ${u??"vrijednost"} ima ${i}${o.maximum.toString()} ${s.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${u??"vrijednost"} bude ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin),u=r[o.origin]??o.origin;return s?`Premalo: o\u010Dekivano da ${u} ima ${i}${o.minimum.toString()} ${s.unit}`:`Premalo: o\u010Dekivano da ${u} 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"}: ${pe(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 D3e(){return{localeError:iLt()}}var iLt,N3e=k(()=>{m();Tt();iLt=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${o.expected}, a kapott \xE9rt\xE9k ${u}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${u}`}case"invalid_value":return o.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${Oe(o.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${pe(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":""}: ${pe(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 w3e(e,t,n){return Math.abs(e)===1?t:n}function Ix(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 k3e(){return{localeError:sLt()}}var sLt,B3e=k(()=>{m();Tt();sLt=()=>{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=Pe(o.input),u=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 ${u}`:`\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 ${u}`}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 ${Oe(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 ${pe(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s){let u=Number(o.maximum),l=w3e(u,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 ${Ix(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 ${Ix(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 u=Number(o.minimum),l=w3e(u,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 ${Ix(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 ${Ix(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":""}. ${pe(o.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Ix(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 ${Ix(o.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}}});function O3e(){return{localeError:aLt()}}var aLt,P3e=k(()=>{m();Tt();aLt=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Input tidak valid: diharapkan instanceof ${o.expected}, diterima ${u}`:`Input tidak valid: diharapkan ${i}, diterima ${u}`}case"invalid_value":return o.values.length===1?`Input tidak valid: diharapkan ${Oe(o.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${pe(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":""}: ${pe(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 M3e(){return{localeError:uLt()}}var uLt,L3e=k(()=>{m();Tt();uLt=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${u} \xFEar sem \xE1 a\xF0 vera instanceof ${o.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${u} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return o.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${Oe(o.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${pe(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"}: ${pe(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 U3e(){return{localeError:cLt()}}var cLt,Q3e=k(()=>{m();Tt();cLt=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Input non valido: atteso instanceof ${o.expected}, ricevuto ${u}`:`Input non valido: atteso ${i}, ricevuto ${u}`}case"invalid_value":return o.values.length===1?`Input non valido: atteso ${Oe(o.values[0])}`:`Opzione non valida: atteso uno tra ${pe(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"}: ${pe(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 F3e(){return{localeError:lLt()}}var lLt,G3e=k(()=>{m();Tt();lLt=()=>{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=Pe(o.input),u=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${u}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${u}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return o.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${Oe(o.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${pe(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":""}: ${pe(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 j3e(){return{localeError:dLt()}}var dLt,z3e=k(()=>{m();Tt();dLt=()=>{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=Pe(o.input),u=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 ${u}`:`\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 ${u}`}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 ${Oe(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 ${pe(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"}: ${pe(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 Fj(){return{localeError:pLt()}}var pLt,zre=k(()=>{m();Tt();pLt=()=>{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=Pe(o.input),u=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 ${u}`:`\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 ${u}`}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 ${Oe(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 ${pe(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 ${pe(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 H3e(){return Fj()}var $3e=k(()=>{m();zre()});function q3e(){return{localeError:fLt()}}var fLt,V3e=k(()=>{m();Tt();fLt=()=>{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=Pe(o.input),u=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 ${u}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${u}\uC785\uB2C8\uB2E4`}case"invalid_value":return o.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${Oe(o.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${pe(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",u=t(o.origin),l=u?.unit??"\uC694\uC18C";return u?`${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",u=t(o.origin),l=u?.unit??"\uC694\uC18C";return u?`${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: ${pe(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 K3e(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 Y3e(){return{localeError:mLt()}}var SO,mLt,J3e=k(()=>{m();Tt();SO=e=>e.charAt(0).toUpperCase()+e.slice(1);mLt=()=>{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,u){let l=e[o]??null;return l===null?l:{unit:l.unit[i],verb:l.verb[u][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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Gautas tipas ${u}, o tik\u0117tasi - instanceof ${o.expected}`:`Gautas tipas ${u}, o tik\u0117tasi - ${i}`}case"invalid_value":return o.values.length===1?`Privalo b\u016Bti ${Oe(o.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${pe(o.values,"|")} pasirinkim\u0173`;case"too_big":{let i=r[o.origin]??o.origin,s=t(o.origin,K3e(Number(o.maximum)),o.inclusive??!1,"smaller");if(s?.verb)return`${SO(i??o.origin??"reik\u0161m\u0117")} ${s.verb} ${o.maximum.toString()} ${s.unit??"element\u0173"}`;let u=o.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${SO(i??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${u} ${o.maximum.toString()} ${s?.unit}`}case"too_small":{let i=r[o.origin]??o.origin,s=t(o.origin,K3e(Number(o.minimum)),o.inclusive??!1,"bigger");if(s?.verb)return`${SO(i??o.origin??"reik\u0161m\u0117")} ${s.verb} ${o.minimum.toString()} ${s.unit??"element\u0173"}`;let u=o.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${SO(i??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${u} ${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"}: ${pe(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`${SO(i??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function Z3e(){return{localeError:ALt()}}var ALt,W3e=k(()=>{m();Tt();ALt=()=>{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=Pe(o.input),u=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 ${u}`:`\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 ${u}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${Oe(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 ${pe(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"}: ${pe(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 X3e(){return{localeError:gLt()}}var gLt,e6e=k(()=>{m();Tt();gLt=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Input tidak sah: dijangka instanceof ${o.expected}, diterima ${u}`:`Input tidak sah: dijangka ${i}, diterima ${u}`}case"invalid_value":return o.values.length===1?`Input tidak sah: dijangka ${Oe(o.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${pe(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: ${pe(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 t6e(){return{localeError:hLt()}}var hLt,n6e=k(()=>{m();Tt();hLt=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ongeldige invoer: verwacht instanceof ${o.expected}, ontving ${u}`:`Ongeldige invoer: verwacht ${i}, ontving ${u}`}case"invalid_value":return o.values.length===1?`Ongeldige invoer: verwacht ${Oe(o.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${pe(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin),u=o.origin==="date"?"laat":o.origin==="string"?"lang":"groot";return s?`Te ${u}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${u}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} is`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin),u=o.origin==="date"?"vroeg":o.origin==="string"?"kort":"klein";return s?`Te ${u}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${u}: 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":""}: ${pe(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 r6e(){return{localeError:_Lt()}}var _Lt,o6e=k(()=>{m();Tt();_Lt=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ugyldig input: forventet instanceof ${o.expected}, fikk ${u}`:`Ugyldig input: forventet ${i}, fikk ${u}`}case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventet ${Oe(o.values[0])}`:`Ugyldig valg: forventet en av ${pe(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"}: ${pe(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 i6e(){return{localeError:ELt()}}var ELt,s6e=k(()=>{m();Tt();ELt=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`F\xE2sit giren: umulan instanceof ${o.expected}, al\u0131nan ${u}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${u}`}case"invalid_value":return o.values.length===1?`F\xE2sit giren: umulan ${Oe(o.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${pe(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":""}: ${pe(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 a6e(){return{localeError:yLt()}}var yLt,u6e=k(()=>{m();Tt();yLt=()=>{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=Pe(o.input),u=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 ${u} \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 ${u} \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 ${Oe(o.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${pe(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"}: ${pe(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 c6e(){return{localeError:SLt()}}var SLt,l6e=k(()=>{m();Tt();SLt=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${o.expected}, otrzymano ${u}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${u}`}case"invalid_value":return o.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${Oe(o.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${pe(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":""}: ${pe(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 d6e(){return{localeError:TLt()}}var TLt,p6e=k(()=>{m();Tt();TLt=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Tipo inv\xE1lido: esperado instanceof ${o.expected}, recebido ${u}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${u}`}case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: esperado ${Oe(o.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${pe(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":""}: ${pe(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 f6e(){return{localeError:bLt()}}var bLt,m6e=k(()=>{m();Tt();bLt=()=>{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=Pe(o.input),u=r[s]??s;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${u}`}case"invalid_value":return o.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${Oe(o.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${pe(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: ${pe(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 A6e(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 g6e(){return{localeError:ILt()}}var ILt,h6e=k(()=>{m();Tt();ILt=()=>{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=Pe(o.input),u=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 ${u}`:`\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 ${u}`}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 ${Oe(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 ${pe(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s){let u=Number(o.maximum),l=A6e(u,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 u=Number(o.minimum),l=A6e(u,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":""}: ${pe(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 _6e(){return{localeError:CLt()}}var CLt,E6e=k(()=>{m();Tt();CLt=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${o.expected}, prejeto ${u}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${u}`}case"invalid_value":return o.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${Oe(o.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${pe(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"}: ${pe(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 y6e(){return{localeError:vLt()}}var vLt,S6e=k(()=>{m();Tt();vLt=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${o.expected}, fick ${u}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${u}`}case"invalid_value":return o.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${Oe(o.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${pe(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"}: ${pe(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 T6e(){return{localeError:RLt()}}var RLt,b6e=k(()=>{m();Tt();RLt=()=>{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=Pe(o.input),u=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 ${u}`:`\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 ${u}`}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 ${Oe(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 ${pe(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":""}: ${pe(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 I6e(){return{localeError:xLt()}}var xLt,C6e=k(()=>{m();Tt();xLt=()=>{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=Pe(o.input),u=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 ${u}`:`\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 ${u}`}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 ${Oe(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 ${pe(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: ${pe(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 v6e(){return{localeError:DLt()}}var DLt,R6e=k(()=>{m();Tt();DLt=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${o.expected}, al\u0131nan ${u}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${u}`}case"invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${Oe(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${pe(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":""}: ${pe(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 Gj(){return{localeError:NLt()}}var NLt,Hre=k(()=>{m();Tt();NLt=()=>{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=Pe(o.input),u=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 ${u}`:`\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 ${u}`}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 ${Oe(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 ${pe(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":""}: ${pe(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 x6e(){return Gj()}var D6e=k(()=>{m();Hre()});function N6e(){return{localeError:wLt()}}var wLt,w6e=k(()=>{m();Tt();wLt=()=>{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=Pe(o.input),u=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 ${u} \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 ${u} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return o.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${Oe(o.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${pe(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":""}: ${pe(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 k6e(){return{localeError:kLt()}}var kLt,B6e=k(()=>{m();Tt();kLt=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${o.expected}, qabul qilingan ${u}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${u}`}case"invalid_value":return o.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${Oe(o.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${pe(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":""}: ${pe(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 O6e(){return{localeError:BLt()}}var BLt,P6e=k(()=>{m();Tt();BLt=()=>{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=Pe(o.input),u=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 ${u}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${u}`}case"invalid_value":return o.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${Oe(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 ${pe(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: ${pe(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 M6e(){return{localeError:OLt()}}var OLt,L6e=k(()=>{m();Tt();OLt=()=>{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=Pe(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${o.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${u}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${u}`}case"invalid_value":return o.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${Oe(o.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${pe(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): ${pe(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 U6e(){return{localeError:PLt()}}var PLt,Q6e=k(()=>{m();Tt();PLt=()=>{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=Pe(o.input),u=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 ${u}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${u}`}case"invalid_value":return o.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${Oe(o.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${pe(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${pe(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 F6e(){return{localeError:MLt()}}var MLt,G6e=k(()=>{m();Tt();MLt=()=>{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=Pe(o.input),u=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 ${u}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${u}`}case"invalid_value":return o.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${Oe(o.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${pe(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: ${pe(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 TO={};Xs(TO,{ar:()=>K4e,az:()=>J4e,be:()=>X4e,bg:()=>t3e,ca:()=>r3e,cs:()=>i3e,da:()=>a3e,de:()=>c3e,el:()=>d3e,en:()=>Qj,eo:()=>f3e,es:()=>A3e,fa:()=>h3e,fi:()=>E3e,fr:()=>S3e,frCA:()=>b3e,he:()=>C3e,hr:()=>R3e,hu:()=>D3e,hy:()=>k3e,id:()=>O3e,is:()=>M3e,it:()=>U3e,ja:()=>F3e,ka:()=>j3e,kh:()=>H3e,km:()=>Fj,ko:()=>q3e,lt:()=>Y3e,mk:()=>Z3e,ms:()=>X3e,nl:()=>t6e,no:()=>r6e,ota:()=>i6e,pl:()=>c6e,ps:()=>a6e,pt:()=>d6e,ro:()=>f6e,ru:()=>g6e,sl:()=>_6e,sv:()=>y6e,ta:()=>T6e,th:()=>I6e,tr:()=>v6e,ua:()=>x6e,uk:()=>Gj,ur:()=>N6e,uz:()=>k6e,vi:()=>O6e,yo:()=>F6e,zhCN:()=>M6e,zhTW:()=>U6e});var $re=k(()=>{m();Y4e();Z4e();e3e();n3e();o3e();s3e();u3e();l3e();p3e();jre();m3e();g3e();_3e();y3e();T3e();I3e();v3e();x3e();N3e();B3e();P3e();L3e();Q3e();G3e();z3e();$3e();zre();V3e();J3e();W3e();e6e();n6e();o6e();s6e();u6e();l6e();p6e();m6e();h6e();E6e();S6e();b6e();C6e();R6e();D6e();Hre();w6e();B6e();P6e();L6e();Q6e();G6e()});function zj(){return new jj}var j6e,qre,Vre,jj,Ga,bO=k(()=>{m();qre=Symbol("ZodOutput"),Vre=Symbol("ZodInput"),jj=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)}};(j6e=globalThis).__zod_globalRegistry??(j6e.__zod_globalRegistry=zj());Ga=globalThis.__zod_globalRegistry});function Kre(e,t){return new e({type:"string",...Ve(t)})}function Yre(e,t){return new e({type:"string",coerce:!0,...Ve(t)})}function Hj(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ve(t)})}function IO(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ve(t)})}function $j(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ve(t)})}function qj(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ve(t)})}function Vj(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ve(t)})}function Kj(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ve(t)})}function CO(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ve(t)})}function Yj(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ve(t)})}function Jj(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ve(t)})}function Zj(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ve(t)})}function Wj(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ve(t)})}function Xj(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ve(t)})}function ez(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ve(t)})}function tz(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ve(t)})}function nz(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ve(t)})}function rz(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ve(t)})}function Jre(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...Ve(t)})}function oz(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ve(t)})}function iz(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ve(t)})}function sz(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ve(t)})}function az(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ve(t)})}function uz(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ve(t)})}function cz(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ve(t)})}function Wre(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ve(t)})}function Xre(e,t){return new e({type:"string",format:"date",check:"string_format",...Ve(t)})}function eoe(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ve(t)})}function toe(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ve(t)})}function noe(e,t){return new e({type:"number",checks:[],...Ve(t)})}function roe(e,t){return new e({type:"number",coerce:!0,checks:[],...Ve(t)})}function ooe(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Ve(t)})}function ioe(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...Ve(t)})}function soe(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...Ve(t)})}function aoe(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...Ve(t)})}function uoe(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...Ve(t)})}function coe(e,t){return new e({type:"boolean",...Ve(t)})}function loe(e,t){return new e({type:"boolean",coerce:!0,...Ve(t)})}function doe(e,t){return new e({type:"bigint",...Ve(t)})}function poe(e,t){return new e({type:"bigint",coerce:!0,...Ve(t)})}function foe(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...Ve(t)})}function moe(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...Ve(t)})}function Aoe(e,t){return new e({type:"symbol",...Ve(t)})}function goe(e,t){return new e({type:"undefined",...Ve(t)})}function hoe(e,t){return new e({type:"null",...Ve(t)})}function _oe(e){return new e({type:"any"})}function Eoe(e){return new e({type:"unknown"})}function yoe(e,t){return new e({type:"never",...Ve(t)})}function Soe(e,t){return new e({type:"void",...Ve(t)})}function Toe(e,t){return new e({type:"date",...Ve(t)})}function boe(e,t){return new e({type:"date",coerce:!0,...Ve(t)})}function Ioe(e,t){return new e({type:"nan",...Ve(t)})}function lA(e,t){return new Rj({check:"less_than",...Ve(t),value:e,inclusive:!1})}function cd(e,t){return new Rj({check:"less_than",...Ve(t),value:e,inclusive:!0})}function dA(e,t){return new xj({check:"greater_than",...Ve(t),value:e,inclusive:!1})}function lc(e,t){return new xj({check:"greater_than",...Ve(t),value:e,inclusive:!0})}function lz(e){return dA(0,e)}function dz(e){return lA(0,e)}function pz(e){return cd(0,e)}function fz(e){return lc(0,e)}function ZE(e,t){return new lne({check:"multiple_of",...Ve(t),value:e})}function WE(e,t){return new fne({check:"max_size",...Ve(t),maximum:e})}function pA(e,t){return new mne({check:"min_size",...Ve(t),minimum:e})}function wT(e,t){return new Ane({check:"size_equals",...Ve(t),size:e})}function kT(e,t){return new gne({check:"max_length",...Ve(t),maximum:e})}function ah(e,t){return new hne({check:"min_length",...Ve(t),minimum:e})}function BT(e,t){return new _ne({check:"length_equals",...Ve(t),length:e})}function Cx(e,t){return new Ene({check:"string_format",format:"regex",...Ve(t),pattern:e})}function vx(e){return new yne({check:"string_format",format:"lowercase",...Ve(e)})}function Rx(e){return new Sne({check:"string_format",format:"uppercase",...Ve(e)})}function xx(e,t){return new Tne({check:"string_format",format:"includes",...Ve(t),includes:e})}function Dx(e,t){return new bne({check:"string_format",format:"starts_with",...Ve(t),prefix:e})}function Nx(e,t){return new Ine({check:"string_format",format:"ends_with",...Ve(t),suffix:e})}function mz(e,t,n){return new Cne({check:"property",property:e,schema:t,...Ve(n)})}function wx(e,t){return new vne({check:"mime_type",mime:e,...Ve(t)})}function Mf(e){return new Rne({check:"overwrite",tx:e})}function kx(e){return Mf(t=>t.normalize(e))}function Bx(){return Mf(e=>e.trim())}function Ox(){return Mf(e=>e.toLowerCase())}function Px(){return Mf(e=>e.toUpperCase())}function Mx(){return Mf(e=>Ste(e))}function Coe(e,t,n){return new e({type:"array",element:t,...Ve(n)})}function ULt(e,t,n){return new e({type:"union",options:t,...Ve(n)})}function QLt(e,t,n){return new e({type:"union",options:t,inclusive:!1,...Ve(n)})}function FLt(e,t,n,r){return new e({type:"union",options:n,discriminator:t,...Ve(r)})}function GLt(e,t,n){return new e({type:"intersection",left:t,right:n})}function jLt(e,t,n,r){let o=n instanceof dn,i=o?r:n,s=o?n:null;return new e({type:"tuple",items:t,rest:s,...Ve(i)})}function zLt(e,t,n,r){return new e({type:"record",keyType:t,valueType:n,...Ve(r)})}function HLt(e,t,n,r){return new e({type:"map",keyType:t,valueType:n,...Ve(r)})}function $Lt(e,t,n){return new e({type:"set",valueType:t,...Ve(n)})}function qLt(e,t,n){let r=Array.isArray(t)?Object.fromEntries(t.map(o=>[o,o])):t;return new e({type:"enum",entries:r,...Ve(n)})}function VLt(e,t,n){return new e({type:"enum",entries:t,...Ve(n)})}function KLt(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...Ve(n)})}function voe(e,t){return new e({type:"file",...Ve(t)})}function YLt(e,t){return new e({type:"transform",transform:t})}function JLt(e,t){return new e({type:"optional",innerType:t})}function ZLt(e,t){return new e({type:"nullable",innerType:t})}function WLt(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():bte(n)}})}function XLt(e,t,n){return new e({type:"nonoptional",innerType:t,...Ve(n)})}function eUt(e,t){return new e({type:"success",innerType:t})}function tUt(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function nUt(e,t,n){return new e({type:"pipe",in:t,out:n})}function rUt(e,t){return new e({type:"readonly",innerType:t})}function oUt(e,t,n){return new e({type:"template_literal",parts:t,...Ve(n)})}function iUt(e,t){return new e({type:"lazy",getter:t})}function sUt(e,t){return new e({type:"promise",innerType:t})}function Roe(e,t,n){let r=Ve(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function xoe(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Ve(n)})}function Doe(e,t){let n=z6e(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(_x(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(_x(i))}},e(r.value,r)),t);return n}function z6e(e,t){let n=new oo({check:"custom",...Ve(t)});return n._zod.check=e,n}function Noe(e){let t=new oo({check:"describe"});return t._zod.onattach=[n=>{let r=Ga.get(n)??{};Ga.add(n,{...r,description:e})}],t._zod.check=()=>{},t}function woe(e){let t=new oo({check:"meta"});return t._zod.onattach=[n=>{let r=Ga.get(n)??{};Ga.add(n,{...r,...e})}],t._zod.check=()=>{},t}function koe(e,t){let n=Ve(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(T=>typeof T=="string"?T.toLowerCase():T),o=o.map(T=>typeof T=="string"?T.toLowerCase():T));let i=new Set(r),s=new Set(o),u=e.Codec??yO,l=e.Boolean??_O,f=e.String??NT,h=new f({type:"string",error:n.error}),_=new l({type:"boolean",error:n.error}),E=new u({type:"pipe",in:h,out:_,transform:((T,v)=>{let R=T;return n.case!=="sensitive"&&(R=R.toLowerCase()),i.has(R)?!0:s.has(R)?!1:(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:v.value,inst:E,continue:!1}),{})}),reverseTransform:((T,v)=>T===!0?r[0]||"true":o[0]||"false"),error:n.error});return E}function Lx(e,t,n,r={}){let o=Ve(r),i={...Ve(r),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:u=>n.test(u),...o};return n instanceof RegExp&&(i.pattern=n),new e(i)}var Zre,H6e=k(()=>{m();Dj();bO();Gre();Tt();Zre={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function XE(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??Ga,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 Pr(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 u=e._zod.toJSONSchema?.();if(u)s.schema=u;else{let h={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,h);else{let E=s.schema,T=t.processors[o.type];if(!T)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);T(e,t,E,h)}let _=e._zod.parent;_&&(s.ref||(s.ref=_),Pr(_,t,h),t.seen.get(_).isParent=!0)}let l=t.metadataRegistry.get(e);return l&&Object.assign(s.schema,l),t.io==="input"&&dc(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 ey(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 u=e.metadataRegistry.get(s[0])?.id;if(u){let l=r.get(u);if(l&&l!==s[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(u,s[0])}}let o=s=>{let u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let _=e.external.registry.get(s[0])?.id,E=e.external.uri??(v=>v);if(_)return{ref:E(_)};let T=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=T,{defId:T,ref:`${E("__shared")}#/${u}/${T}`}}if(s[1]===n)return{ref:"#"};let f=`#/${u}/`,h=s[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:f+h}},i=s=>{if(s[1].schema.$ref)return;let u=s[1],{ref:l,defId:f}=o(s);u.def={...u.schema},f&&(u.defId=f);let h=u.schema;for(let _ in h)delete h[_];h.$ref=l};if(e.cycles==="throw")for(let s of e.seen.entries()){let u=s[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.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 u=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(u.cycle){i(s);continue}if(u.count>1&&e.reused==="ref"){i(s);continue}}}function ty(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=u=>{let l=e.seen.get(u);if(l.ref===null)return;let f=l.def??l.schema,h={...f},_=l.ref;if(l.ref=null,_){r(_);let T=e.seen.get(_),v=T.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),u._zod.parent===_)for(let x in f)x==="$ref"||x==="allOf"||x in h||delete f[x];if(v.$ref&&T.def)for(let x in f)x==="$ref"||x==="allOf"||x in T.def&&JSON.stringify(f[x])===JSON.stringify(T.def[x])&&delete f[x]}let E=u._zod.parent;if(E&&E!==_){r(E);let T=e.seen.get(E);if(T?.schema.$ref&&(f.$ref=T.schema.$ref,T.def))for(let v in f)v==="$ref"||v==="allOf"||v in T.def&&JSON.stringify(f[v])===JSON.stringify(T.def[v])&&delete f[v]}e.override({zodSchema:u,jsonSchema:f,path:l.path??[]})};for(let u of[...e.seen.entries()].reverse())r(u[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 u=e.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(u)}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 u of e.seen.entries()){let l=u[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 u=JSON.parse(JSON.stringify(o));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ux(t,"input",e.processors),output:Ux(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function dc(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 dc(r.element,n);if(r.type==="set")return dc(r.valueType,n);if(r.type==="lazy")return dc(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 dc(r.innerType,n);if(r.type==="intersection")return dc(r.left,n)||dc(r.right,n);if(r.type==="record"||r.type==="map")return dc(r.keyType,n)||dc(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:dc(r.in,n)||dc(r.out,n);if(r.type==="object"){for(let o in r.shape)if(dc(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(let o of r.options)if(dc(o,n))return!0;return!1}if(r.type==="tuple"){for(let o of r.items)if(dc(o,n))return!0;return!!(r.rest&&dc(r.rest,n))}return!1}var Boe,Ux,vO=k(()=>{m();bO();Boe=(e,t={})=>n=>{let r=XE({...n,processors:t});return Pr(e,r),ey(r,e),ty(r,e)},Ux=(e,t,n={})=>r=>{let{libraryOptions:o,target:i}=r??{},s=XE({...o??{},target:i,io:t,processors:n});return Pr(e,s),ey(s,e),ty(s,e)}});function _z(e,t){if("_idmap"in e){let r=e,o=XE({...t,processors:Az}),i={};for(let l of r._idmap.entries()){let[f,h]=l;Pr(h,o)}let s={},u={registry:r,uri:t?.uri,defs:i};o.external=u;for(let l of r._idmap.entries()){let[f,h]=l;ey(o,h),s[f]=ty(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=XE({...t,processors:Az});return Pr(e,n),ey(n,e),ty(n,e)}var aUt,Ooe,Poe,Moe,Loe,Uoe,Qoe,Foe,Goe,joe,zoe,Hoe,$oe,qoe,Voe,Koe,Yoe,Joe,Zoe,Woe,Xoe,eie,tie,nie,rie,oie,gz,iie,sie,aie,uie,cie,lie,die,pie,fie,mie,Aie,hz,gie,Az,RO=k(()=>{m();vO();Tt();aUt={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ooe=(e,t,n,r)=>{let o=n;o.type="string";let{minimum:i,maximum:s,format:u,patterns:l,contentEncoding:f}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),u&&(o.format=aUt[u]??u,o.format===""&&delete o.format,u==="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(_=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:_.source}))])}},Poe=(e,t,n,r)=>{let o=n,{minimum:i,maximum:s,format:u,multipleOf:l,exclusiveMaximum:f,exclusiveMinimum:h}=e._zod.bag;typeof u=="string"&&u.includes("int")?o.type="integer":o.type="number";let _=typeof h=="number"&&h>=(i??Number.NEGATIVE_INFINITY),E=typeof f=="number"&&f<=(s??Number.POSITIVE_INFINITY),T=t.target==="draft-04"||t.target==="openapi-3.0";_?T?(o.minimum=h,o.exclusiveMinimum=!0):o.exclusiveMinimum=h:typeof i=="number"&&(o.minimum=i),E?T?(o.maximum=f,o.exclusiveMaximum=!0):o.exclusiveMaximum=f:typeof s=="number"&&(o.maximum=s),typeof l=="number"&&(o.multipleOf=l)},Moe=(e,t,n,r)=>{n.type="boolean"},Loe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Uoe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Qoe=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Foe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Goe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},joe=(e,t,n,r)=>{n.not={}},zoe=(e,t,n,r)=>{},Hoe=(e,t,n,r)=>{},$oe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},qoe=(e,t,n,r)=>{let o=e._zod.def,i=aO(o.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},Voe=(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},Koe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Yoe=(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},Joe=(e,t,n,r)=>{let o=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:u,mime:l}=e._zod.bag;s!==void 0&&(i.minLength=s),u!==void 0&&(i.maxLength=u),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)},Zoe=(e,t,n,r)=>{n.type="boolean"},Woe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Xoe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},eie=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},tie=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},nie=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},rie=(e,t,n,r)=>{let o=n,i=e._zod.def,{minimum:s,maximum:u}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof u=="number"&&(o.maxItems=u),o.type="array",o.items=Pr(i.element,t,{...r,path:[...r.path,"items"]})},oie=(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]=Pr(s[f],t,{...r,path:[...r.path,"properties",f]});let u=new Set(Object.keys(s)),l=new Set([...u].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=Pr(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},gz=(e,t,n,r)=>{let o=e._zod.def,i=o.inclusive===!1,s=o.options.map((u,l)=>Pr(u,t,{...r,path:[...r.path,i?"oneOf":"anyOf",l]}));i?n.oneOf=s:n.anyOf=s},iie=(e,t,n,r)=>{let o=e._zod.def,i=Pr(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=Pr(o.right,t,{...r,path:[...r.path,"allOf",1]}),u=f=>"allOf"in f&&Object.keys(f).length===1,l=[...u(i)?i.allOf:[i],...u(s)?s.allOf:[s]];n.allOf=l},sie=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=i.items.map((E,T)=>Pr(E,t,{...r,path:[...r.path,s,T]})),f=i.rest?Pr(i.rest,t,{...r,path:[...r.path,u,...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:_}=e._zod.bag;typeof h=="number"&&(o.minItems=h),typeof _=="number"&&(o.maxItems=_)},aie=(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=Pr(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(let _ of l)o.patternProperties[_.source]=h}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=Pr(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=Pr(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});let f=s._zod.values;if(f){let h=[...f].filter(_=>typeof _=="string"||typeof _=="number");h.length>0&&(o.required=h)}},uie=(e,t,n,r)=>{let o=e._zod.def,i=Pr(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"}]},cie=(e,t,n,r)=>{let o=e._zod.def;Pr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},lie=(e,t,n,r)=>{let o=e._zod.def;Pr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},die=(e,t,n,r)=>{let o=e._zod.def;Pr(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)))},pie=(e,t,n,r)=>{let o=e._zod.def;Pr(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},fie=(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;Pr(s,t,r);let u=t.seen.get(e);u.ref=s},mie=(e,t,n,r)=>{let o=e._zod.def;Pr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},Aie=(e,t,n,r)=>{let o=e._zod.def;Pr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},hz=(e,t,n,r)=>{let o=e._zod.def;Pr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},gie=(e,t,n,r)=>{let o=e._zod.innerType;Pr(o,t,r);let i=t.seen.get(e);i.ref=o},Az={string:Ooe,number:Poe,boolean:Moe,bigint:Loe,symbol:Uoe,null:Qoe,undefined:Foe,void:Goe,never:joe,any:zoe,unknown:Hoe,date:$oe,enum:qoe,literal:Voe,nan:Koe,template_literal:Yoe,file:Joe,success:Zoe,custom:Woe,function:Xoe,transform:eie,map:tie,set:nie,array:rie,object:oie,union:gz,intersection:iie,tuple:sie,record:aie,nullable:uie,nonoptional:cie,default:lie,prefault:die,catch:pie,pipe:fie,readonly:mie,promise:Aie,optional:hz,lazy:gie}});var Ez,$6e=k(()=>{m();RO();vO();Ez=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=XE({processors:Az,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 Pr(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)),ey(this.ctx,t);let r=ty(this.ctx,t),{"~standard":o,...i}=r;return i}}});var q6e={};var V6e=k(()=>{m()});var uh={};Xs(uh,{$ZodAny:()=>cre,$ZodArray:()=>mre,$ZodAsyncError:()=>Pf,$ZodBase64:()=>Xne,$ZodBase64URL:()=>ere,$ZodBigInt:()=>Pj,$ZodBigIntFormat:()=>ire,$ZodBoolean:()=>_O,$ZodCIDRv4:()=>Jne,$ZodCIDRv6:()=>Zne,$ZodCUID:()=>Une,$ZodCUID2:()=>Qne,$ZodCatch:()=>kre,$ZodCheck:()=>oo,$ZodCheckBigIntFormat:()=>pne,$ZodCheckEndsWith:()=>Ine,$ZodCheckGreaterThan:()=>xj,$ZodCheckIncludes:()=>Tne,$ZodCheckLengthEquals:()=>_ne,$ZodCheckLessThan:()=>Rj,$ZodCheckLowerCase:()=>yne,$ZodCheckMaxLength:()=>gne,$ZodCheckMaxSize:()=>fne,$ZodCheckMimeType:()=>vne,$ZodCheckMinLength:()=>hne,$ZodCheckMinSize:()=>mne,$ZodCheckMultipleOf:()=>lne,$ZodCheckNumberFormat:()=>dne,$ZodCheckOverwrite:()=>Rne,$ZodCheckProperty:()=>Cne,$ZodCheckRegex:()=>Ene,$ZodCheckSizeEquals:()=>Ane,$ZodCheckStartsWith:()=>bne,$ZodCheckStringFormat:()=>bx,$ZodCheckUpperCase:()=>Sne,$ZodCodec:()=>yO,$ZodCustom:()=>Fre,$ZodCustomStringFormat:()=>rre,$ZodDate:()=>fre,$ZodDefault:()=>xre,$ZodDiscriminatedUnion:()=>hre,$ZodE164:()=>tre,$ZodEmail:()=>One,$ZodEmoji:()=>Mne,$ZodEncodeError:()=>qE,$ZodEnum:()=>Tre,$ZodError:()=>pO,$ZodExactOptional:()=>vre,$ZodFile:()=>Ire,$ZodFunction:()=>Lre,$ZodGUID:()=>kne,$ZodIPv4:()=>Vne,$ZodIPv6:()=>Kne,$ZodISODate:()=>Hne,$ZodISODateTime:()=>zne,$ZodISODuration:()=>qne,$ZodISOTime:()=>$ne,$ZodIntersection:()=>_re,$ZodJWT:()=>nre,$ZodKSUID:()=>jne,$ZodLazy:()=>Qre,$ZodLiteral:()=>bre,$ZodMAC:()=>Yne,$ZodMap:()=>yre,$ZodNaN:()=>Bre,$ZodNanoID:()=>Lne,$ZodNever:()=>dre,$ZodNonOptional:()=>Nre,$ZodNull:()=>ure,$ZodNullable:()=>Rre,$ZodNumber:()=>Oj,$ZodNumberFormat:()=>ore,$ZodObject:()=>V4e,$ZodObjectJIT:()=>Are,$ZodOptional:()=>Lj,$ZodPipe:()=>Uj,$ZodPrefault:()=>Dre,$ZodPreprocess:()=>Ore,$ZodPromise:()=>Ure,$ZodReadonly:()=>Pre,$ZodRealError:()=>rl,$ZodRecord:()=>Ere,$ZodRegistry:()=>jj,$ZodSet:()=>Sre,$ZodString:()=>NT,$ZodStringFormat:()=>Xr,$ZodSuccess:()=>wre,$ZodSymbol:()=>sre,$ZodTemplateLiteral:()=>Mre,$ZodTransform:()=>Cre,$ZodTuple:()=>Mj,$ZodType:()=>dn,$ZodULID:()=>Fne,$ZodURL:()=>Pne,$ZodUUID:()=>Bne,$ZodUndefined:()=>are,$ZodUnion:()=>EO,$ZodUnknown:()=>lre,$ZodVoid:()=>pre,$ZodXID:()=>Gne,$ZodXor:()=>gre,$brand:()=>hte,$constructor:()=>se,$input:()=>Vre,$output:()=>qre,Doc:()=>hO,JSONSchema:()=>q6e,JSONSchemaGenerator:()=>Ez,NEVER:()=>gte,TimePrecision:()=>Zre,_any:()=>_oe,_array:()=>Coe,_base64:()=>sz,_base64url:()=>az,_bigint:()=>doe,_boolean:()=>coe,_catch:()=>tUt,_check:()=>z6e,_cidrv4:()=>oz,_cidrv6:()=>iz,_coercedBigint:()=>poe,_coercedBoolean:()=>loe,_coercedDate:()=>boe,_coercedNumber:()=>roe,_coercedString:()=>Yre,_cuid:()=>Zj,_cuid2:()=>Wj,_custom:()=>Roe,_date:()=>Toe,_decode:()=>hj,_decodeAsync:()=>Ej,_default:()=>WLt,_discriminatedUnion:()=>FLt,_e164:()=>uz,_email:()=>Hj,_emoji:()=>Yj,_encode:()=>gj,_encodeAsync:()=>_j,_endsWith:()=>Nx,_enum:()=>qLt,_file:()=>voe,_float32:()=>ioe,_float64:()=>soe,_gt:()=>dA,_gte:()=>lc,_guid:()=>IO,_includes:()=>xx,_int:()=>ooe,_int32:()=>aoe,_int64:()=>foe,_intersection:()=>GLt,_ipv4:()=>nz,_ipv6:()=>rz,_isoDate:()=>Xre,_isoDateTime:()=>Wre,_isoDuration:()=>toe,_isoTime:()=>eoe,_jwt:()=>cz,_ksuid:()=>tz,_lazy:()=>iUt,_length:()=>BT,_literal:()=>KLt,_lowercase:()=>vx,_lt:()=>lA,_lte:()=>cd,_mac:()=>Jre,_map:()=>HLt,_max:()=>cd,_maxLength:()=>kT,_maxSize:()=>WE,_mime:()=>wx,_min:()=>lc,_minLength:()=>ah,_minSize:()=>pA,_multipleOf:()=>ZE,_nan:()=>Ioe,_nanoid:()=>Jj,_nativeEnum:()=>VLt,_negative:()=>dz,_never:()=>yoe,_nonnegative:()=>fz,_nonoptional:()=>XLt,_nonpositive:()=>pz,_normalize:()=>kx,_null:()=>hoe,_nullable:()=>ZLt,_number:()=>noe,_optional:()=>JLt,_overwrite:()=>Mf,_parse:()=>Ex,_parseAsync:()=>yx,_pipe:()=>nUt,_positive:()=>lz,_promise:()=>sUt,_property:()=>mz,_readonly:()=>rUt,_record:()=>zLt,_refine:()=>xoe,_regex:()=>Cx,_safeDecode:()=>Sj,_safeDecodeAsync:()=>bj,_safeEncode:()=>yj,_safeEncodeAsync:()=>Tj,_safeParse:()=>Sx,_safeParseAsync:()=>Tx,_set:()=>$Lt,_size:()=>wT,_slugify:()=>Mx,_startsWith:()=>Dx,_string:()=>Kre,_stringFormat:()=>Lx,_stringbool:()=>koe,_success:()=>eUt,_superRefine:()=>Doe,_symbol:()=>Aoe,_templateLiteral:()=>oUt,_toLowerCase:()=>Ox,_toUpperCase:()=>Px,_transform:()=>YLt,_trim:()=>Bx,_tuple:()=>jLt,_uint32:()=>uoe,_uint64:()=>moe,_ulid:()=>Xj,_undefined:()=>goe,_union:()=>ULt,_unknown:()=>Eoe,_uppercase:()=>Rx,_url:()=>CO,_uuid:()=>$j,_uuidv4:()=>qj,_uuidv6:()=>Vj,_uuidv7:()=>Kj,_void:()=>Soe,_xid:()=>ez,_xor:()=>QLt,clone:()=>uc,config:()=>Ci,createStandardJSONSchemaMethod:()=>Ux,createToJSONSchemaMethod:()=>Boe,decode:()=>s2t,decodeAsync:()=>u2t,describe:()=>Noe,encode:()=>i2t,encodeAsync:()=>a2t,extractDefs:()=>ey,finalize:()=>ty,flattenError:()=>fO,formatError:()=>mO,globalConfig:()=>vT,globalRegistry:()=>Ga,initializeContext:()=>XE,isValidBase64:()=>Wne,isValidBase64URL:()=>z4e,isValidJWT:()=>H4e,locales:()=>TO,meta:()=>woe,parse:()=>mj,parseAsync:()=>Aj,prettifyError:()=>Nte,process:()=>Pr,regexes:()=>ud,registry:()=>zj,safeDecode:()=>l2t,safeDecodeAsync:()=>p2t,safeEncode:()=>c2t,safeEncodeAsync:()=>d2t,safeParse:()=>kte,safeParseAsync:()=>Bte,toDotPath:()=>T4e,toJSONSchema:()=>_z,treeifyError:()=>Dte,util:()=>Ue,version:()=>Dne});var ld=k(()=>{m();RT();Ote();wte();Gre();Dj();Nne();Tt();vj();$re();bO();xne();H6e();vO();RO();$6e();V6e()});var yz={};Xs(yz,{endsWith:()=>Nx,gt:()=>dA,gte:()=>lc,includes:()=>xx,length:()=>BT,lowercase:()=>vx,lt:()=>lA,lte:()=>cd,maxLength:()=>kT,maxSize:()=>WE,mime:()=>wx,minLength:()=>ah,minSize:()=>pA,multipleOf:()=>ZE,negative:()=>dz,nonnegative:()=>fz,nonpositive:()=>pz,normalize:()=>kx,overwrite:()=>Mf,positive:()=>lz,property:()=>mz,regex:()=>Cx,size:()=>wT,slugify:()=>Mx,startsWith:()=>Dx,toLowerCase:()=>Ox,toUpperCase:()=>Px,trim:()=>Bx,uppercase:()=>Rx});var Sz=k(()=>{m();ld()});var Qx={};Xs(Qx,{ZodISODate:()=>bz,ZodISODateTime:()=>Tz,ZodISODuration:()=>Cz,ZodISOTime:()=>Iz,date:()=>_ie,datetime:()=>hie,duration:()=>yie,time:()=>Eie});function hie(e){return Wre(Tz,e)}function _ie(e){return Xre(bz,e)}function Eie(e){return eoe(Iz,e)}function yie(e){return toe(Cz,e)}var Tz,bz,Iz,Cz,xO=k(()=>{m();ld();NO();Tz=se("ZodISODateTime",(e,t)=>{zne.init(e,t),eo.init(e,t)});bz=se("ZodISODate",(e,t)=>{Hne.init(e,t),eo.init(e,t)});Iz=se("ZodISOTime",(e,t)=>{$ne.init(e,t),eo.init(e,t)});Cz=se("ZodISODuration",(e,t)=>{qne.init(e,t),eo.init(e,t)})});var K6e,cUt,ol,Sie=k(()=>{m();ld();ld();Tt();K6e=(e,t)=>{pO.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>mO(e,n)},flatten:{value:n=>fO(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,gx,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,gx,2)}},isEmpty:{get(){return e.issues.length===0}}})},cUt=se("ZodError",K6e),ol=se("ZodError",K6e,{Parent:Error})});var Tie,bie,Iie,Cie,vie,Rie,xie,Die,Nie,wie,kie,Bie,Oie=k(()=>{m();ld();Sie();Tie=Ex(ol),bie=yx(ol),Iie=Sx(ol),Cie=Tx(ol),vie=gj(ol),Rie=hj(ol),xie=_j(ol),Die=Ej(ol),Nie=yj(ol),wie=Sj(ol),kie=Tj(ol),Bie=bj(ol)});var DO={};Xs(DO,{ZodAny:()=>jie,ZodArray:()=>qie,ZodBase64:()=>Gz,ZodBase64URL:()=>jz,ZodBigInt:()=>qx,ZodBigIntFormat:()=>$z,ZodBoolean:()=>$x,ZodCIDRv4:()=>Qz,ZodCIDRv6:()=>Fz,ZodCUID:()=>kz,ZodCUID2:()=>Bz,ZodCatch:()=>mse,ZodCodec:()=>jO,ZodCustom:()=>zO,ZodCustomStringFormat:()=>zx,ZodDate:()=>LO,ZodDefault:()=>use,ZodDiscriminatedUnion:()=>Kie,ZodE164:()=>zz,ZodEmail:()=>Dz,ZodEmoji:()=>Nz,ZodEnum:()=>Gx,ZodExactOptional:()=>ise,ZodFile:()=>rse,ZodFunction:()=>Ise,ZodGUID:()=>kO,ZodIPv4:()=>Lz,ZodIPv6:()=>Uz,ZodIntersection:()=>Yie,ZodJWT:()=>Hz,ZodKSUID:()=>Mz,ZodLazy:()=>Sse,ZodLiteral:()=>nse,ZodMAC:()=>Pie,ZodMap:()=>ese,ZodNaN:()=>gse,ZodNanoID:()=>wz,ZodNever:()=>Hie,ZodNonOptional:()=>Zz,ZodNull:()=>Fie,ZodNullable:()=>ase,ZodNumber:()=>Hx,ZodNumberFormat:()=>PT,ZodObject:()=>QO,ZodOptional:()=>Jz,ZodPipe:()=>GO,ZodPrefault:()=>lse,ZodPreprocess:()=>hse,ZodPromise:()=>bse,ZodReadonly:()=>_se,ZodRecord:()=>Fx,ZodSet:()=>tse,ZodString:()=>jx,ZodStringFormat:()=>eo,ZodSuccess:()=>fse,ZodSymbol:()=>Uie,ZodTemplateLiteral:()=>yse,ZodTransform:()=>ose,ZodTuple:()=>Zie,ZodType:()=>wn,ZodULID:()=>Oz,ZodURL:()=>MO,ZodUUID:()=>fA,ZodUndefined:()=>Qie,ZodUnion:()=>FO,ZodUnknown:()=>zie,ZodVoid:()=>$ie,ZodXID:()=>Pz,ZodXor:()=>Vie,_ZodString:()=>xz,_default:()=>cse,_function:()=>nje,any:()=>BGe,array:()=>UO,base64:()=>gGe,base64url:()=>hGe,bigint:()=>xGe,boolean:()=>Lie,catch:()=>Ase,check:()=>rje,cidrv4:()=>mGe,cidrv6:()=>AGe,codec:()=>WGe,cuid:()=>sGe,cuid2:()=>aGe,custom:()=>oje,date:()=>PGe,describe:()=>ije,discriminatedUnion:()=>GGe,e164:()=>_Ge,email:()=>J6e,emoji:()=>oGe,enum:()=>Kz,exactOptional:()=>sse,file:()=>KGe,float32:()=>IGe,float64:()=>CGe,function:()=>nje,guid:()=>Z6e,hash:()=>bGe,hex:()=>TGe,hostname:()=>SGe,httpUrl:()=>rGe,instanceof:()=>aje,int:()=>vz,int32:()=>vGe,int64:()=>DGe,intersection:()=>Jie,invertCodec:()=>XGe,ipv4:()=>dGe,ipv6:()=>fGe,json:()=>cje,jwt:()=>EGe,keyof:()=>MGe,ksuid:()=>lGe,lazy:()=>Tse,literal:()=>VGe,looseObject:()=>QGe,looseRecord:()=>zGe,mac:()=>pGe,map:()=>HGe,meta:()=>sje,nan:()=>ZGe,nanoid:()=>iGe,nativeEnum:()=>qGe,never:()=>qz,nonoptional:()=>pse,null:()=>Gie,nullable:()=>OO,nullish:()=>YGe,number:()=>Mie,object:()=>LGe,optional:()=>BO,partialRecord:()=>jGe,pipe:()=>Rz,prefault:()=>dse,preprocess:()=>lje,promise:()=>tje,readonly:()=>Ese,record:()=>Xie,refine:()=>Cse,set:()=>$Ge,strictObject:()=>UGe,string:()=>wO,stringFormat:()=>yGe,stringbool:()=>uje,success:()=>JGe,superRefine:()=>vse,symbol:()=>wGe,templateLiteral:()=>eje,transform:()=>Yz,tuple:()=>Wie,uint32:()=>RGe,uint64:()=>NGe,ulid:()=>uGe,undefined:()=>kGe,union:()=>Vz,unknown:()=>OT,url:()=>nGe,uuid:()=>W6e,uuidv4:()=>X6e,uuidv6:()=>eGe,uuidv7:()=>tGe,void:()=>OGe,xid:()=>cGe,xor:()=>FGe});function PO(e,t,n){let r=Object.getPrototypeOf(e),o=Y6e.get(r);if(o||(o=new Set,Y6e.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 u=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:u}),u},set(u){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:u})}})}}}function wO(e){return Kre(jx,e)}function J6e(e){return Hj(Dz,e)}function Z6e(e){return IO(kO,e)}function W6e(e){return $j(fA,e)}function X6e(e){return qj(fA,e)}function eGe(e){return Vj(fA,e)}function tGe(e){return Kj(fA,e)}function nGe(e){return CO(MO,e)}function rGe(e){return CO(MO,{protocol:ud.httpProtocol,hostname:ud.domain,...Ue.normalizeParams(e)})}function oGe(e){return Yj(Nz,e)}function iGe(e){return Jj(wz,e)}function sGe(e){return Zj(kz,e)}function aGe(e){return Wj(Bz,e)}function uGe(e){return Xj(Oz,e)}function cGe(e){return ez(Pz,e)}function lGe(e){return tz(Mz,e)}function dGe(e){return nz(Lz,e)}function pGe(e){return Jre(Pie,e)}function fGe(e){return rz(Uz,e)}function mGe(e){return oz(Qz,e)}function AGe(e){return iz(Fz,e)}function gGe(e){return sz(Gz,e)}function hGe(e){return az(jz,e)}function _Ge(e){return uz(zz,e)}function EGe(e){return cz(Hz,e)}function yGe(e,t,n={}){return Lx(zx,e,t,n)}function SGe(e){return Lx(zx,"hostname",ud.hostname,e)}function TGe(e){return Lx(zx,"hex",ud.hex,e)}function bGe(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,o=ud[r];if(!o)throw new Error(`Unrecognized hash format: ${r}`);return Lx(zx,r,o,t)}function Mie(e){return noe(Hx,e)}function vz(e){return ooe(PT,e)}function IGe(e){return ioe(PT,e)}function CGe(e){return soe(PT,e)}function vGe(e){return aoe(PT,e)}function RGe(e){return uoe(PT,e)}function Lie(e){return coe($x,e)}function xGe(e){return doe(qx,e)}function DGe(e){return foe($z,e)}function NGe(e){return moe($z,e)}function wGe(e){return Aoe(Uie,e)}function kGe(e){return goe(Qie,e)}function Gie(e){return hoe(Fie,e)}function BGe(){return _oe(jie)}function OT(){return Eoe(zie)}function qz(e){return yoe(Hie,e)}function OGe(e){return Soe($ie,e)}function PGe(e){return Toe(LO,e)}function UO(e,t){return Coe(qie,e,t)}function MGe(e){let t=e._zod.def.shape;return Kz(Object.keys(t))}function LGe(e,t){let n={type:"object",shape:e??{},...Ue.normalizeParams(t)};return new QO(n)}function UGe(e,t){return new QO({type:"object",shape:e,catchall:qz(),...Ue.normalizeParams(t)})}function QGe(e,t){return new QO({type:"object",shape:e,catchall:OT(),...Ue.normalizeParams(t)})}function Vz(e,t){return new FO({type:"union",options:e,...Ue.normalizeParams(t)})}function FGe(e,t){return new Vie({type:"union",options:e,inclusive:!1,...Ue.normalizeParams(t)})}function GGe(e,t,n){return new Kie({type:"union",options:t,discriminator:e,...Ue.normalizeParams(n)})}function Jie(e,t){return new Yie({type:"intersection",left:e,right:t})}function Wie(e,t,n){let r=t instanceof dn,o=r?n:t,i=r?t:null;return new Zie({type:"tuple",items:e,rest:i,...Ue.normalizeParams(o)})}function Xie(e,t,n){return!t||!t._zod?new Fx({type:"record",keyType:wO(),valueType:e,...Ue.normalizeParams(t)}):new Fx({type:"record",keyType:e,valueType:t,...Ue.normalizeParams(n)})}function jGe(e,t,n){let r=uc(e);return r._zod.values=void 0,new Fx({type:"record",keyType:r,valueType:t,...Ue.normalizeParams(n)})}function zGe(e,t,n){return new Fx({type:"record",keyType:e,valueType:t,mode:"loose",...Ue.normalizeParams(n)})}function HGe(e,t,n){return new ese({type:"map",keyType:e,valueType:t,...Ue.normalizeParams(n)})}function $Ge(e,t){return new tse({type:"set",valueType:e,...Ue.normalizeParams(t)})}function Kz(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Gx({type:"enum",entries:n,...Ue.normalizeParams(t)})}function qGe(e,t){return new Gx({type:"enum",entries:e,...Ue.normalizeParams(t)})}function VGe(e,t){return new nse({type:"literal",values:Array.isArray(e)?e:[e],...Ue.normalizeParams(t)})}function KGe(e){return voe(rse,e)}function Yz(e){return new ose({type:"transform",transform:e})}function BO(e){return new Jz({type:"optional",innerType:e})}function sse(e){return new ise({type:"optional",innerType:e})}function OO(e){return new ase({type:"nullable",innerType:e})}function YGe(e){return BO(OO(e))}function cse(e,t){return new use({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ue.shallowClone(t)}})}function dse(e,t){return new lse({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ue.shallowClone(t)}})}function pse(e,t){return new Zz({type:"nonoptional",innerType:e,...Ue.normalizeParams(t)})}function JGe(e){return new fse({type:"success",innerType:e})}function Ase(e,t){return new mse({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function ZGe(e){return Ioe(gse,e)}function Rz(e,t){return new GO({type:"pipe",in:e,out:t})}function WGe(e,t,n){return new jO({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function XGe(e){let t=e._zod.def;return new jO({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function Ese(e){return new _se({type:"readonly",innerType:e})}function eje(e,t){return new yse({type:"template_literal",parts:e,...Ue.normalizeParams(t)})}function Tse(e){return new Sse({type:"lazy",getter:e})}function tje(e){return new bse({type:"promise",innerType:e})}function nje(e){return new Ise({type:"function",input:Array.isArray(e?.input)?Wie(e?.input):e?.input??UO(OT()),output:e?.output??OT()})}function rje(e){let t=new oo({check:"custom"});return t._zod.check=e,t}function oje(e,t){return Roe(zO,e??(()=>!0),t)}function Cse(e,t={}){return xoe(zO,e,t)}function vse(e,t){return Doe(e,t)}function aje(e,t={}){let n=new zO({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Ue.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 cje(e){let t=Tse(()=>Vz([wO(e),Mie(),Lie(),Gie(),UO(t),Xie(wO(),t)]));return t}function lje(e,t){return new hse({type:"pipe",in:Yz(e),out:t})}var Y6e,wn,xz,jx,eo,Dz,kO,fA,MO,Nz,wz,kz,Bz,Oz,Pz,Mz,Lz,Pie,Uz,Qz,Fz,Gz,jz,zz,Hz,zx,Hx,PT,$x,qx,$z,Uie,Qie,Fie,jie,zie,Hie,$ie,LO,qie,QO,FO,Vie,Kie,Yie,Zie,Fx,ese,tse,Gx,nse,rse,ose,Jz,ise,ase,use,lse,Zz,fse,mse,gse,GO,jO,hse,_se,yse,Sse,bse,Ise,zO,ije,sje,uje,NO=k(()=>{m();ld();ld();RO();vO();Sz();xO();Oie();Y6e=new WeakMap;wn=se("ZodType",(e,t)=>(dn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ux(e,"input"),output:Ux(e,"output")}}),e.toJSONSchema=Boe(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>Tie(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Iie(e,n,r),e.parseAsync=async(n,r)=>bie(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Cie(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>vie(e,n,r),e.decode=(n,r)=>Rie(e,n,r),e.encodeAsync=async(n,r)=>xie(e,n,r),e.decodeAsync=async(n,r)=>Die(e,n,r),e.safeEncode=(n,r)=>Nie(e,n,r),e.safeDecode=(n,r)=>wie(e,n,r),e.safeEncodeAsync=async(n,r)=>kie(e,n,r),e.safeDecodeAsync=async(n,r)=>Bie(e,n,r),PO(e,"ZodType",{check(...n){let r=this.def;return this.clone(Ue.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 uc(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(Cse(n,r))},superRefine(n,r){return this.check(vse(n,r))},overwrite(n){return this.check(Mf(n))},optional(){return BO(this)},exactOptional(){return sse(this)},nullable(){return OO(this)},nullish(){return BO(OO(this))},nonoptional(n){return pse(this,n)},array(){return UO(this)},or(n){return Vz([this,n])},and(n){return Jie(this,n)},transform(n){return Rz(this,Yz(n))},default(n){return cse(this,n)},prefault(n){return dse(this,n)},catch(n){return Ase(this,n)},pipe(n){return Rz(this,n)},readonly(){return Ese(this)},describe(n){let r=this.clone();return Ga.add(r,{description:n}),r},meta(...n){if(n.length===0)return Ga.get(this);let r=this.clone();return Ga.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 Ga.get(e)?.description},configurable:!0}),e)),xz=se("_ZodString",(e,t)=>{NT.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Ooe(e,r,o,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,PO(e,"_ZodString",{regex(...r){return this.check(Cx(...r))},includes(...r){return this.check(xx(...r))},startsWith(...r){return this.check(Dx(...r))},endsWith(...r){return this.check(Nx(...r))},min(...r){return this.check(ah(...r))},max(...r){return this.check(kT(...r))},length(...r){return this.check(BT(...r))},nonempty(...r){return this.check(ah(1,...r))},lowercase(r){return this.check(vx(r))},uppercase(r){return this.check(Rx(r))},trim(){return this.check(Bx())},normalize(...r){return this.check(kx(...r))},toLowerCase(){return this.check(Ox())},toUpperCase(){return this.check(Px())},slugify(){return this.check(Mx())}})}),jx=se("ZodString",(e,t)=>{NT.init(e,t),xz.init(e,t),e.email=n=>e.check(Hj(Dz,n)),e.url=n=>e.check(CO(MO,n)),e.jwt=n=>e.check(cz(Hz,n)),e.emoji=n=>e.check(Yj(Nz,n)),e.guid=n=>e.check(IO(kO,n)),e.uuid=n=>e.check($j(fA,n)),e.uuidv4=n=>e.check(qj(fA,n)),e.uuidv6=n=>e.check(Vj(fA,n)),e.uuidv7=n=>e.check(Kj(fA,n)),e.nanoid=n=>e.check(Jj(wz,n)),e.guid=n=>e.check(IO(kO,n)),e.cuid=n=>e.check(Zj(kz,n)),e.cuid2=n=>e.check(Wj(Bz,n)),e.ulid=n=>e.check(Xj(Oz,n)),e.base64=n=>e.check(sz(Gz,n)),e.base64url=n=>e.check(az(jz,n)),e.xid=n=>e.check(ez(Pz,n)),e.ksuid=n=>e.check(tz(Mz,n)),e.ipv4=n=>e.check(nz(Lz,n)),e.ipv6=n=>e.check(rz(Uz,n)),e.cidrv4=n=>e.check(oz(Qz,n)),e.cidrv6=n=>e.check(iz(Fz,n)),e.e164=n=>e.check(uz(zz,n)),e.datetime=n=>e.check(hie(n)),e.date=n=>e.check(_ie(n)),e.time=n=>e.check(Eie(n)),e.duration=n=>e.check(yie(n))});eo=se("ZodStringFormat",(e,t)=>{Xr.init(e,t),xz.init(e,t)}),Dz=se("ZodEmail",(e,t)=>{One.init(e,t),eo.init(e,t)});kO=se("ZodGUID",(e,t)=>{kne.init(e,t),eo.init(e,t)});fA=se("ZodUUID",(e,t)=>{Bne.init(e,t),eo.init(e,t)});MO=se("ZodURL",(e,t)=>{Pne.init(e,t),eo.init(e,t)});Nz=se("ZodEmoji",(e,t)=>{Mne.init(e,t),eo.init(e,t)});wz=se("ZodNanoID",(e,t)=>{Lne.init(e,t),eo.init(e,t)});kz=se("ZodCUID",(e,t)=>{Une.init(e,t),eo.init(e,t)});Bz=se("ZodCUID2",(e,t)=>{Qne.init(e,t),eo.init(e,t)});Oz=se("ZodULID",(e,t)=>{Fne.init(e,t),eo.init(e,t)});Pz=se("ZodXID",(e,t)=>{Gne.init(e,t),eo.init(e,t)});Mz=se("ZodKSUID",(e,t)=>{jne.init(e,t),eo.init(e,t)});Lz=se("ZodIPv4",(e,t)=>{Vne.init(e,t),eo.init(e,t)});Pie=se("ZodMAC",(e,t)=>{Yne.init(e,t),eo.init(e,t)});Uz=se("ZodIPv6",(e,t)=>{Kne.init(e,t),eo.init(e,t)});Qz=se("ZodCIDRv4",(e,t)=>{Jne.init(e,t),eo.init(e,t)});Fz=se("ZodCIDRv6",(e,t)=>{Zne.init(e,t),eo.init(e,t)});Gz=se("ZodBase64",(e,t)=>{Xne.init(e,t),eo.init(e,t)});jz=se("ZodBase64URL",(e,t)=>{ere.init(e,t),eo.init(e,t)});zz=se("ZodE164",(e,t)=>{tre.init(e,t),eo.init(e,t)});Hz=se("ZodJWT",(e,t)=>{nre.init(e,t),eo.init(e,t)});zx=se("ZodCustomStringFormat",(e,t)=>{rre.init(e,t),eo.init(e,t)});Hx=se("ZodNumber",(e,t)=>{Oj.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Poe(e,r,o,i),PO(e,"ZodNumber",{gt(r,o){return this.check(dA(r,o))},gte(r,o){return this.check(lc(r,o))},min(r,o){return this.check(lc(r,o))},lt(r,o){return this.check(lA(r,o))},lte(r,o){return this.check(cd(r,o))},max(r,o){return this.check(cd(r,o))},int(r){return this.check(vz(r))},safe(r){return this.check(vz(r))},positive(r){return this.check(dA(0,r))},nonnegative(r){return this.check(lc(0,r))},negative(r){return this.check(lA(0,r))},nonpositive(r){return this.check(cd(0,r))},multipleOf(r,o){return this.check(ZE(r,o))},step(r,o){return this.check(ZE(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});PT=se("ZodNumberFormat",(e,t)=>{ore.init(e,t),Hx.init(e,t)});$x=se("ZodBoolean",(e,t)=>{_O.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Moe(e,n,r,o)});qx=se("ZodBigInt",(e,t)=>{Pj.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Loe(e,r,o,i),e.gte=(r,o)=>e.check(lc(r,o)),e.min=(r,o)=>e.check(lc(r,o)),e.gt=(r,o)=>e.check(dA(r,o)),e.gte=(r,o)=>e.check(lc(r,o)),e.min=(r,o)=>e.check(lc(r,o)),e.lt=(r,o)=>e.check(lA(r,o)),e.lte=(r,o)=>e.check(cd(r,o)),e.max=(r,o)=>e.check(cd(r,o)),e.positive=r=>e.check(dA(BigInt(0),r)),e.negative=r=>e.check(lA(BigInt(0),r)),e.nonpositive=r=>e.check(cd(BigInt(0),r)),e.nonnegative=r=>e.check(lc(BigInt(0),r)),e.multipleOf=(r,o)=>e.check(ZE(r,o));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});$z=se("ZodBigIntFormat",(e,t)=>{ire.init(e,t),qx.init(e,t)});Uie=se("ZodSymbol",(e,t)=>{sre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Uoe(e,n,r,o)});Qie=se("ZodUndefined",(e,t)=>{are.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Foe(e,n,r,o)});Fie=se("ZodNull",(e,t)=>{ure.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Qoe(e,n,r,o)});jie=se("ZodAny",(e,t)=>{cre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>zoe(e,n,r,o)});zie=se("ZodUnknown",(e,t)=>{lre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Hoe(e,n,r,o)});Hie=se("ZodNever",(e,t)=>{dre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>joe(e,n,r,o)});$ie=se("ZodVoid",(e,t)=>{pre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Goe(e,n,r,o)});LO=se("ZodDate",(e,t)=>{fre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>$oe(e,r,o,i),e.min=(r,o)=>e.check(lc(r,o)),e.max=(r,o)=>e.check(cd(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});qie=se("ZodArray",(e,t)=>{mre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rie(e,n,r,o),e.element=t.element,PO(e,"ZodArray",{min(n,r){return this.check(ah(n,r))},nonempty(n){return this.check(ah(1,n))},max(n,r){return this.check(kT(n,r))},length(n,r){return this.check(BT(n,r))},unwrap(){return this.element}})});QO=se("ZodObject",(e,t)=>{Are.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>oie(e,n,r,o),Ue.defineLazy(e,"shape",()=>t.shape),PO(e,"ZodObject",{keyof(){return Kz(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:OT()})},loose(){return this.clone({...this._zod.def,catchall:OT()})},strict(){return this.clone({...this._zod.def,catchall:qz()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Ue.extend(this,n)},safeExtend(n){return Ue.safeExtend(this,n)},merge(n){return Ue.merge(this,n)},pick(n){return Ue.pick(this,n)},omit(n){return Ue.omit(this,n)},partial(...n){return Ue.partial(Jz,this,n[0])},required(...n){return Ue.required(Zz,this,n[0])}})});FO=se("ZodUnion",(e,t)=>{EO.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gz(e,n,r,o),e.options=t.options});Vie=se("ZodXor",(e,t)=>{FO.init(e,t),gre.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gz(e,n,r,o),e.options=t.options});Kie=se("ZodDiscriminatedUnion",(e,t)=>{FO.init(e,t),hre.init(e,t)});Yie=se("ZodIntersection",(e,t)=>{_re.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>iie(e,n,r,o)});Zie=se("ZodTuple",(e,t)=>{Mj.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>sie(e,n,r,o),e.rest=n=>e.clone({...e._zod.def,rest:n})});Fx=se("ZodRecord",(e,t)=>{Ere.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>aie(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});ese=se("ZodMap",(e,t)=>{yre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>tie(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(pA(...n)),e.nonempty=n=>e.check(pA(1,n)),e.max=(...n)=>e.check(WE(...n)),e.size=(...n)=>e.check(wT(...n))});tse=se("ZodSet",(e,t)=>{Sre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>nie(e,n,r,o),e.min=(...n)=>e.check(pA(...n)),e.nonempty=n=>e.check(pA(1,n)),e.max=(...n)=>e.check(WE(...n)),e.size=(...n)=>e.check(wT(...n))});Gx=se("ZodEnum",(e,t)=>{Tre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>qoe(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 Gx({...t,checks:[],...Ue.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 Gx({...t,checks:[],...Ue.normalizeParams(o),entries:i})}});nse=se("ZodLiteral",(e,t)=>{bre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Voe(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]}})});rse=se("ZodFile",(e,t)=>{Ire.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Joe(e,n,r,o),e.min=(n,r)=>e.check(pA(n,r)),e.max=(n,r)=>e.check(WE(n,r)),e.mime=(n,r)=>e.check(wx(Array.isArray(n)?n:[n],r))});ose=se("ZodTransform",(e,t)=>{Cre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>eie(e,n,r,o),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new qE(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ue.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(Ue.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)}});Jz=se("ZodOptional",(e,t)=>{Lj.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hz(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});ise=se("ZodExactOptional",(e,t)=>{vre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hz(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});ase=se("ZodNullable",(e,t)=>{Rre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>uie(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});use=se("ZodDefault",(e,t)=>{xre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>lie(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});lse=se("ZodPrefault",(e,t)=>{Dre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>die(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Zz=se("ZodNonOptional",(e,t)=>{Nre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cie(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});fse=se("ZodSuccess",(e,t)=>{wre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Zoe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});mse=se("ZodCatch",(e,t)=>{kre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>pie(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});gse=se("ZodNaN",(e,t)=>{Bre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Koe(e,n,r,o)});GO=se("ZodPipe",(e,t)=>{Uj.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>fie(e,n,r,o),e.in=t.in,e.out=t.out});jO=se("ZodCodec",(e,t)=>{GO.init(e,t),yO.init(e,t)});hse=se("ZodPreprocess",(e,t)=>{GO.init(e,t),Ore.init(e,t)}),_se=se("ZodReadonly",(e,t)=>{Pre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>mie(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});yse=se("ZodTemplateLiteral",(e,t)=>{Mre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Yoe(e,n,r,o)});Sse=se("ZodLazy",(e,t)=>{Qre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gie(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});bse=se("ZodPromise",(e,t)=>{Ure.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Aie(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Ise=se("ZodFunction",(e,t)=>{Lre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xoe(e,n,r,o)});zO=se("ZodCustom",(e,t)=>{Fre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Woe(e,n,r,o)});ije=Noe,sje=woe;uje=(...e)=>koe({Codec:jO,Boolean:$x,String:jx},...e)});function pUt(e){Ci({customError:e})}function fUt(){return Ci().customError}var dUt,Rse,dje=k(()=>{m();ld();dUt={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"};Rse||(Rse={})});function AUt(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 gUt(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 pje(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return et.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 et.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=gUt(o,t),s=Tu(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 et.null();if(o.length===0)return et.never();if(o.length===1)return et.literal(o[0]);if(o.every(s=>typeof s=="string"))return et.enum(o);let i=o.map(s=>et.literal(s));return i.length<2?i[0]:et.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return et.literal(e.const);let n=e.type;if(Array.isArray(n)){let o=n.map(i=>{let s={...e,type:i};return pje(s,t)});return o.length===0?et.never():o.length===1?o[0]:et.union(o)}if(!n)return et.any();let r;switch(n){case"string":{let o=et.string();if(e.format){let i=e.format;i==="email"?o=o.check(et.email()):i==="uri"||i==="uri-reference"?o=o.check(et.url()):i==="uuid"||i==="guid"?o=o.check(et.uuid()):i==="date-time"?o=o.check(et.iso.datetime()):i==="date"?o=o.check(et.iso.date()):i==="time"?o=o.check(et.iso.time()):i==="duration"?o=o.check(et.iso.duration()):i==="ipv4"?o=o.check(et.ipv4()):i==="ipv6"?o=o.check(et.ipv6()):i==="mac"?o=o.check(et.mac()):i==="cidr"?o=o.check(et.cidrv4()):i==="cidr-v6"?o=o.check(et.cidrv6()):i==="base64"?o=o.check(et.base64()):i==="base64url"?o=o.check(et.base64url()):i==="e164"?o=o.check(et.e164()):i==="jwt"?o=o.check(et.jwt()):i==="emoji"?o=o.check(et.emoji()):i==="nanoid"?o=o.check(et.nanoid()):i==="cuid"?o=o.check(et.cuid()):i==="cuid2"?o=o.check(et.cuid2()):i==="ulid"?o=o.check(et.ulid()):i==="xid"?o=o.check(et.xid()):i==="ksuid"&&(o=o.check(et.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"?et.number().int():et.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=et.boolean();break}case"null":{r=et.null();break}case"object":{let o={},i=e.properties||{},s=new Set(e.required||[]);for(let[l,f]of Object.entries(i)){let h=Tu(f,t);o[l]=s.has(l)?h:h.optional()}if(e.propertyNames){let l=Tu(e.propertyNames,t),f=e.additionalProperties&&typeof e.additionalProperties=="object"?Tu(e.additionalProperties,t):et.any();if(Object.keys(o).length===0){r=et.record(l,f);break}let h=et.object(o).passthrough(),_=et.looseRecord(l,f);r=et.intersection(h,_);break}if(e.patternProperties){let l=e.patternProperties,f=Object.keys(l),h=[];for(let E of f){let T=Tu(l[E],t),v=et.string().regex(new RegExp(E));h.push(et.looseRecord(v,T))}let _=[];if(Object.keys(o).length>0&&_.push(et.object(o).passthrough()),_.push(...h),_.length===0)r=et.object({}).passthrough();else if(_.length===1)r=_[0];else{let E=et.intersection(_[0],_[1]);for(let T=2;T<_.length;T++)E=et.intersection(E,_[T]);r=E}break}let u=et.object(o);e.additionalProperties===!1?r=u.strict():typeof e.additionalProperties=="object"?r=u.catchall(Tu(e.additionalProperties,t)):r=u.passthrough();break}case"array":{let o=e.prefixItems,i=e.items;if(o&&Array.isArray(o)){let s=o.map(l=>Tu(l,t)),u=i&&typeof i=="object"&&!Array.isArray(i)?Tu(i,t):void 0;u?r=et.tuple(s).rest(u):r=et.tuple(s),typeof e.minItems=="number"&&(r=r.check(et.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(et.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(l=>Tu(l,t)),u=e.additionalItems&&typeof e.additionalItems=="object"?Tu(e.additionalItems,t):void 0;u?r=et.tuple(s).rest(u):r=et.tuple(s),typeof e.minItems=="number"&&(r=r.check(et.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(et.maxLength(e.maxItems)))}else if(i!==void 0){let s=Tu(i,t),u=et.array(s);typeof e.minItems=="number"&&(u=u.min(e.minItems)),typeof e.maxItems=="number"&&(u=u.max(e.maxItems)),r=u}else r=et.array(et.any());break}default:throw new Error(`Unsupported type: ${n}`)}return r}function Tu(e,t){if(typeof e=="boolean")return e?et.any():et.never();let n=pje(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let u=e.anyOf.map(f=>Tu(f,t)),l=et.union(u);n=r?et.intersection(n,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let u=e.oneOf.map(f=>Tu(f,t)),l=et.xor(u);n=r?et.intersection(n,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:et.any();else{let u=r?n:Tu(e.allOf[0],t),l=r?0:1;for(let f=l;f<e.allOf.length;f++)u=et.intersection(u,Tu(e.allOf[f],t));n=u}e.nullable===!0&&t.version==="openapi-3.0"&&(n=et.nullable(n)),e.readOnly===!0&&(n=et.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let u of i)u in e&&(o[u]=e[u]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let u of s)u in e&&(o[u]=e[u]);for(let u of Object.keys(e))mUt.has(u)||(o[u]=e[u]);return Object.keys(o).length>0&&t.registry.add(n,o),e.description&&(n=n.describe(e.description)),n}function fje(e,t){if(typeof e=="boolean")return e?et.any():et.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=AUt(n,t?.defaultTarget),o=n.$defs||n.definitions||{},i={version:r,defs:o,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Ga};return Tu(n,i)}var et,mUt,mje=k(()=>{m();bO();Sz();xO();NO();et={...DO,...yz,iso:Qx},mUt=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 xse={};Xs(xse,{bigint:()=>yUt,boolean:()=>EUt,date:()=>SUt,number:()=>_Ut,string:()=>hUt});function hUt(e){return Yre(jx,e)}function _Ut(e){return roe(Hx,e)}function EUt(e){return loe($x,e)}function yUt(e){return poe(qx,e)}function SUt(e){return boe(LO,e)}var Aje=k(()=>{m();ld();NO()});var p={};Xs(p,{$brand:()=>hte,$input:()=>Vre,$output:()=>qre,NEVER:()=>gte,TimePrecision:()=>Zre,ZodAny:()=>jie,ZodArray:()=>qie,ZodBase64:()=>Gz,ZodBase64URL:()=>jz,ZodBigInt:()=>qx,ZodBigIntFormat:()=>$z,ZodBoolean:()=>$x,ZodCIDRv4:()=>Qz,ZodCIDRv6:()=>Fz,ZodCUID:()=>kz,ZodCUID2:()=>Bz,ZodCatch:()=>mse,ZodCodec:()=>jO,ZodCustom:()=>zO,ZodCustomStringFormat:()=>zx,ZodDate:()=>LO,ZodDefault:()=>use,ZodDiscriminatedUnion:()=>Kie,ZodE164:()=>zz,ZodEmail:()=>Dz,ZodEmoji:()=>Nz,ZodEnum:()=>Gx,ZodError:()=>cUt,ZodExactOptional:()=>ise,ZodFile:()=>rse,ZodFirstPartyTypeKind:()=>Rse,ZodFunction:()=>Ise,ZodGUID:()=>kO,ZodIPv4:()=>Lz,ZodIPv6:()=>Uz,ZodISODate:()=>bz,ZodISODateTime:()=>Tz,ZodISODuration:()=>Cz,ZodISOTime:()=>Iz,ZodIntersection:()=>Yie,ZodIssueCode:()=>dUt,ZodJWT:()=>Hz,ZodKSUID:()=>Mz,ZodLazy:()=>Sse,ZodLiteral:()=>nse,ZodMAC:()=>Pie,ZodMap:()=>ese,ZodNaN:()=>gse,ZodNanoID:()=>wz,ZodNever:()=>Hie,ZodNonOptional:()=>Zz,ZodNull:()=>Fie,ZodNullable:()=>ase,ZodNumber:()=>Hx,ZodNumberFormat:()=>PT,ZodObject:()=>QO,ZodOptional:()=>Jz,ZodPipe:()=>GO,ZodPrefault:()=>lse,ZodPreprocess:()=>hse,ZodPromise:()=>bse,ZodReadonly:()=>_se,ZodRealError:()=>ol,ZodRecord:()=>Fx,ZodSet:()=>tse,ZodString:()=>jx,ZodStringFormat:()=>eo,ZodSuccess:()=>fse,ZodSymbol:()=>Uie,ZodTemplateLiteral:()=>yse,ZodTransform:()=>ose,ZodTuple:()=>Zie,ZodType:()=>wn,ZodULID:()=>Oz,ZodURL:()=>MO,ZodUUID:()=>fA,ZodUndefined:()=>Qie,ZodUnion:()=>FO,ZodUnknown:()=>zie,ZodVoid:()=>$ie,ZodXID:()=>Pz,ZodXor:()=>Vie,_ZodString:()=>xz,_default:()=>cse,_function:()=>nje,any:()=>BGe,array:()=>UO,base64:()=>gGe,base64url:()=>hGe,bigint:()=>xGe,boolean:()=>Lie,catch:()=>Ase,check:()=>rje,cidrv4:()=>mGe,cidrv6:()=>AGe,clone:()=>uc,codec:()=>WGe,coerce:()=>xse,config:()=>Ci,core:()=>uh,cuid:()=>sGe,cuid2:()=>aGe,custom:()=>oje,date:()=>PGe,decode:()=>Rie,decodeAsync:()=>Die,describe:()=>ije,discriminatedUnion:()=>GGe,e164:()=>_Ge,email:()=>J6e,emoji:()=>oGe,encode:()=>vie,encodeAsync:()=>xie,endsWith:()=>Nx,enum:()=>Kz,exactOptional:()=>sse,file:()=>KGe,flattenError:()=>fO,float32:()=>IGe,float64:()=>CGe,formatError:()=>mO,fromJSONSchema:()=>fje,function:()=>nje,getErrorMap:()=>fUt,globalRegistry:()=>Ga,gt:()=>dA,gte:()=>lc,guid:()=>Z6e,hash:()=>bGe,hex:()=>TGe,hostname:()=>SGe,httpUrl:()=>rGe,includes:()=>xx,instanceof:()=>aje,int:()=>vz,int32:()=>vGe,int64:()=>DGe,intersection:()=>Jie,invertCodec:()=>XGe,ipv4:()=>dGe,ipv6:()=>fGe,iso:()=>Qx,json:()=>cje,jwt:()=>EGe,keyof:()=>MGe,ksuid:()=>lGe,lazy:()=>Tse,length:()=>BT,literal:()=>VGe,locales:()=>TO,looseObject:()=>QGe,looseRecord:()=>zGe,lowercase:()=>vx,lt:()=>lA,lte:()=>cd,mac:()=>pGe,map:()=>HGe,maxLength:()=>kT,maxSize:()=>WE,meta:()=>sje,mime:()=>wx,minLength:()=>ah,minSize:()=>pA,multipleOf:()=>ZE,nan:()=>ZGe,nanoid:()=>iGe,nativeEnum:()=>qGe,negative:()=>dz,never:()=>qz,nonnegative:()=>fz,nonoptional:()=>pse,nonpositive:()=>pz,normalize:()=>kx,null:()=>Gie,nullable:()=>OO,nullish:()=>YGe,number:()=>Mie,object:()=>LGe,optional:()=>BO,overwrite:()=>Mf,parse:()=>Tie,parseAsync:()=>bie,partialRecord:()=>jGe,pipe:()=>Rz,positive:()=>lz,prefault:()=>dse,preprocess:()=>lje,prettifyError:()=>Nte,promise:()=>tje,property:()=>mz,readonly:()=>Ese,record:()=>Xie,refine:()=>Cse,regex:()=>Cx,regexes:()=>ud,registry:()=>zj,safeDecode:()=>wie,safeDecodeAsync:()=>Bie,safeEncode:()=>Nie,safeEncodeAsync:()=>kie,safeParse:()=>Iie,safeParseAsync:()=>Cie,set:()=>$Ge,setErrorMap:()=>pUt,size:()=>wT,slugify:()=>Mx,startsWith:()=>Dx,strictObject:()=>UGe,string:()=>wO,stringFormat:()=>yGe,stringbool:()=>uje,success:()=>JGe,superRefine:()=>vse,symbol:()=>wGe,templateLiteral:()=>eje,toJSONSchema:()=>_z,toLowerCase:()=>Ox,toUpperCase:()=>Px,transform:()=>Yz,treeifyError:()=>Dte,trim:()=>Bx,tuple:()=>Wie,uint32:()=>RGe,uint64:()=>NGe,ulid:()=>uGe,undefined:()=>kGe,union:()=>Vz,unknown:()=>OT,uppercase:()=>Rx,url:()=>nGe,util:()=>Ue,uuid:()=>W6e,uuidv4:()=>X6e,uuidv6:()=>eGe,uuidv7:()=>tGe,void:()=>OGe,xid:()=>cGe,xor:()=>FGe});var Dse=k(()=>{m();ld();NO();Sz();Sie();Oie();dje();ld();jre();ld();RO();mje();$re();xO();xO();Aje();Ci(Qj())});var pc=k(()=>{m();Dse();Dse()});var TUt,bu,Nse,MT,Wz,bUt,Xz,gje,hje,wse,IUt,CUt,vUt,RUt,xUt,DUt,NUt,_je,eH=k(()=>{"use strict";m();cA();pc();TUt=Su(),bu=p.object({message:p.string()}),Nse=p.record(p.string(),p.unknown()),MT=p.string().regex(/^doc_[0-9A-Za-z]{22}$/),Wz=p.string().regex(/^proj_[0-9A-Za-z]{22}$/),bUt=["active","archived"],Xz=p.enum(bUt),gje=p.object({id:p.string().min(1),display_name:p.string().min(1)}),hje=p.object({id:Wz,name:p.string().min(1)}),wse=p.object({id:MT,title:p.string().min(1),status:Xz,author:gje,project:hje.nullable(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable()}),IUt=p.object({type:p.literal("list"),list_type:p.literal("doc"),objects:p.array(wse)}),CUt=p.object({project_id:Wz.optional(),status:Xz.optional()}),vUt=p.object({title:p.string().trim().min(1).max(300).optional(),prosemirror_json:Nse.optional(),project_id:Wz.nullable().optional()}),RUt=p.object({id:MT,created_at:p.string().datetime()}),xUt=p.object({title:p.string().trim().min(1).max(300).optional(),prosemirror_json:Nse.optional(),project_id:Wz.nullable().optional(),status:Xz.optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),DUt=p.object({id:MT,updated_at:p.string().datetime()}),NUt=p.object({id:MT,title:p.string().min(1),prosemirror_json:Nse,status:Xz,author:gje,project:hje.nullable(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable()}),_je=TUt.router({listDocs:{method:"GET",path:"/docs",headers:p.object({authorization:p.string().min(1).optional()}),query:CUt,responses:{200:IUt,401:bu,403:bu},summary:"List docs in the authenticated user\u2019s organization. Optional project_id filter scopes to a single project."},createDoc:{method:"POST",path:"/docs",headers:p.object({authorization:p.string().min(1).optional()}),body:vUt,responses:{201:RUt,401:bu,403:bu,404:bu,422:bu},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:p.object({docId:MT}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:NUt,401:bu,403:bu,404:bu},summary:"Get a doc by id with its rich-text body and parent project (if any)"},updateDoc:{method:"PATCH",path:"/docs/:docId",pathParams:p.object({docId:MT}),headers:p.object({authorization:p.string().min(1).optional()}),body:xUt,responses:{200:DUt,401:bu,403:bu,404:bu,422:bu},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:p.object({docId:MT}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.object({}),401:bu,403:bu,404:bu},summary:"Hard-delete a doc and any mention references it owns"}})});var wUt,Lf,i8n,s8n,kUt,a8n,BUt,Vx,tH=k(()=>{"use strict";m();pc();wUt=["person","foot_gun"],Lf=p.enum(wUt),i8n=p.enum(["authored","commented","edited","mentioned"]),s8n=p.enum(["observed_in","reaffirmed_in"]),kUt=["primary"],a8n=p.enum(kUt),BUt=["supports","supersedes"],Vx=p.enum(BUt)});var OUt,kse=k(()=>{"use strict";m();pc();OUt=p.object({user_id:p.string().nullable()})});var PUt,Bse=k(()=>{"use strict";m();pc();PUt=p.object({typical_phrasings:p.array(p.string()).default([])})});var Ose=k(()=>{"use strict";m();tH();kse();Bse();tH();kse();Bse()});var MUt,zi,dd,LUt,yje,Sje,UUt,Eje,LT,QUt,FUt,GUt,jUt,zUt,Tje,Pse=k(()=>{"use strict";m();cA();pc();Ose();MUt=Su(),zi=p.object({message:p.string()}),dd=p.string().regex(/^ent_[0-9A-Za-z]{22}$/),LUt=["active","archived"],yje=p.enum(LUt),Sje=p.object({id:dd,kind:Lf,slug:p.string(),name:p.string(),blurb:p.string().nullable(),status:yje,lifecycle:p.string().nullable(),human_edited_at:p.string().datetime().nullable(),last_active_at:p.string().datetime(),created_at:p.string().datetime(),updated_at:p.string().datetime()}),UUt=p.object({thread_id:p.string(),thread_title:p.string(),role:p.string(),score:p.number().nullable(),added_at:p.string().datetime(),added_by:p.object({id:p.string(),display_name:p.string()})}),Eje=p.object({entity_id:dd,name:p.string(),slug:p.string(),kind:Lf,edge_kind:Vx}),LT=Sje.extend({payload:p.record(p.string(),p.unknown()),attachments:p.array(UUt),edges:p.object({outgoing:p.array(Eje),incoming:p.array(Eje)})}),QUt=p.object({type:p.literal("list"),list_type:p.literal("entities"),has_more:p.boolean(),objects:p.array(Sje)}),FUt=p.object({kind:Lf.optional().describe("Filter to a single entity kind"),status:yje.optional().describe("Filter by entity status"),after:dd.optional().describe("Cursor: return entities after this id"),before:dd.optional().describe("Cursor: return entities before this id")}),GUt=p.object({name:p.string().min(1).optional().describe("New display name for the entity"),blurb:p.string().nullable().optional().describe("New blurb; null clears it"),payload:p.record(p.string(),p.unknown()).optional().describe("Replacement payload for the entity")}),jUt=p.object({thread_id:p.string().min(1).describe("Id of the thread to attach"),role:p.string().min(1).describe("Role of the thread relative to the entity"),score:p.number().min(0).max(1).nullable().optional().describe("Optional relevance score in [0, 1]")}),zUt=p.object({to_id:dd.describe("Id of the target entity for the edge"),kind:Vx.describe("Kind of edge to create")}),Tje=MUt.router({listEntities:{method:"GET",path:"/entities",headers:p.object({authorization:p.string().min(1).optional()}),query:FUt,responses:{200:QUt,401:zi},summary:"List entities in the authenticated user\u2019s organization"},getEntity:{method:"GET",path:"/entities/:entityId",pathParams:p.object({entityId:dd.describe("Id of the entity to fetch")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:LT,401:zi,404:zi},summary:"Get an entity with its payload, attachments, and edges"},patchEntity:{method:"PATCH",path:"/entities/:entityId",pathParams:p.object({entityId:dd.describe("Id of the entity to update")}),headers:p.object({authorization:p.string().min(1).optional()}),body:GUt,responses:{200:LT,401:zi,403:zi,404:zi},summary:"Update an entity\u2019s name, blurb, or payload"},archiveEntity:{method:"POST",path:"/entities/:entityId/archive",pathParams:p.object({entityId:dd.describe("Id of the entity to archive")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}),responses:{200:LT,401:zi,403:zi,404:zi},summary:"Archive an entity"},attachEntityThread:{method:"POST",path:"/entities/:entityId/threads",pathParams:p.object({entityId:dd.describe("Id of the entity to attach a thread to")}),headers:p.object({authorization:p.string().min(1).optional()}),body:jUt,responses:{200:LT,401:zi,403:zi,404:zi},summary:"Attach a thread to an entity"},detachEntityThread:{method:"DELETE",path:"/entities/:entityId/threads/:threadId",pathParams:p.object({entityId:dd.describe("Id of the entity to detach a thread from"),threadId:p.string().min(1).describe("Id of the thread to detach")}),headers:p.object({authorization:p.string().min(1).optional()}),query:p.object({role:p.string().min(1).describe("Role of the thread membership to remove")}),responses:{200:LT,401:zi,403:zi,404:zi},summary:"Detach a thread from an entity"},addEntityEdge:{method:"POST",path:"/entities/:entityId/edges",pathParams:p.object({entityId:dd.describe("Id of the source entity for the edge")}),headers:p.object({authorization:p.string().min(1).optional()}),body:zUt,responses:{200:LT,401:zi,403:zi,404:zi},summary:"Add an edge from this entity to another entity"},removeEntityEdge:{method:"DELETE",path:"/entities/:entityId/edges/:toId/:kind",pathParams:p.object({entityId:dd.describe("Id of the source entity for the edge"),toId:dd.describe("Id of the target entity for the edge"),kind:Vx.describe("Kind of edge to remove")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:LT,401:zi,403:zi,404:zi},summary:"Remove an edge from this entity to another entity"}})});var HUt,$Ut,fa,bje,qUt,VUt,KUt,YUt,Ije,JUt,ZUt,Cje,Mse=k(()=>{"use strict";m();cA();pc();HUt=Su(),$Ut=p.object({type:p.literal("list"),list_type:p.literal("thread"),has_more:p.boolean(),objects:p.array(p.unknown())}),fa=p.object({message:p.string()}),bje=p.object({thread_id:p.string().min(1),is_favorited:p.boolean(),favorited_at:p.string().datetime().nullable()}),qUt=p.object({before:p.string().min(1).max(64).optional()}),VUt=p.object({id:p.string().min(1),display_name:p.string().min(1)}),KUt=p.object({block_id:p.string().min(1),thread_id:p.string().min(1),thread_title:p.string(),thread_visibility:p.enum(["private","workspace","public"]),author:VUt,preview:p.string(),prompted_at:p.string().datetime().nullable(),favorited_at:p.string().datetime()}),YUt=p.object({type:p.literal("list"),list_type:p.literal("favorite_prompt"),has_more:p.boolean(),objects:p.array(KUt)}),Ije=p.object({block_id:p.string().min(1),thread_id:p.string().min(1).nullable(),is_favorited:p.boolean(),favorited_at:p.string().datetime().nullable()}),JUt=p.object({before:p.string().min(1).max(64).optional()}),ZUt=p.object({block_ids:p.array(p.string().min(1))}),Cje=HUt.router({addThreadFavorite:{method:"POST",path:"/threads/:id/favorite",pathParams:p.object({id:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{201:bje,401:fa,403:fa,404:fa},summary:"Bookmark a thread for the authenticated user. Idempotent \u2014 re-favoriting returns the existing membership."},removeThreadFavorite:{method:"DELETE",path:"/threads/:id/favorite",pathParams:p.object({id:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:bje,401:fa,403:fa,404:fa},summary:"Remove a thread bookmark for the authenticated user (no-op if absent)."},listFavoriteThreads:{method:"GET",path:"/favorites/threads",headers:p.object({authorization:p.string().min(1).optional()}),query:qUt,responses:{200:$Ut,401:fa,403:fa},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:p.object({id:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{201:Ije,401:fa,403:fa,404:fa,409:fa},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:p.object({id:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:Ije,401:fa,404:fa},summary:"Remove a prompt bookmark for the authenticated user (no-op if absent)."},listFavoritePrompts:{method:"GET",path:"/favorites/prompts",headers:p.object({authorization:p.string().min(1).optional()}),query:JUt,responses:{200:YUt,401:fa},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:p.object({id:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:ZUt,401:fa,403:fa,404:fa},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 WUt,nH,XUt,rH,eQt,tQt,nQt,rQt,oQt,iQt,sQt,aQt,vje,Lse=k(()=>{"use strict";m();cA();pc();WUt=Su(),nH=p.object({message:p.string()}),XUt=["thread","plan","doc","user"],rH=p.enum(XUt),eQt=["doc","project"],tQt=p.enum(eQt),nQt=p.object({kind:rH,id:p.string().min(1),title:p.string().min(1),href:p.string().min(1)}),rQt=p.object({type:p.literal("list"),list_type:p.literal("mention"),objects:p.array(nQt)}),oQt=p.object({q:p.string().trim().min(1).max(50),kinds:p.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(p.array(rH).optional())}),iQt=p.object({source_kind:tQt,source_id:p.string().min(1),source_title:p.string().min(1),source_href:p.string().min(1),target_kind:rH,target_id:p.string().min(1),created_at:p.string().datetime()}),sQt=p.object({type:p.literal("list"),list_type:p.literal("backlink"),objects:p.array(iQt)}),aQt=p.object({target_kind:rH,target_id:p.string().min(1).max(64)}),vje=WUt.router({searchMentions:{method:"GET",path:"/mentions/search",headers:p.object({authorization:p.string().min(1).optional()}),query:oQt,responses:{200:rQt,401:nH,422:nH},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:p.object({authorization:p.string().min(1).optional()}),query:aQt,responses:{200:sQt,401:nH,403:nH},summary:"List every doc/project body in the caller\u2019s organization that mentions the given target. Newest-first."}})});var uQt,Mr,Use,il,cQt,HO,Qse,Rje,lQt,dQt,pQt,fQt,mQt,AQt,gQt,hQt,_Qt,EQt,yQt,SQt,TQt,bQt,IQt,xje,Fse=k(()=>{"use strict";m();cA();pc();eH();uQt=Su(),Mr=p.object({message:p.string()}),Use=p.record(p.string(),p.unknown()),il=p.string().regex(/^proj_[0-9A-Za-z]{22}$/),cQt=["active","archived"],HO=p.enum(cQt),Qse=p.object({id:p.string().min(1),display_name:p.string().min(1)}),Rje=p.object({thread_id:p.string().min(1),title:p.string().min(1),added_at:p.string().datetime(),added_by:Qse}),lQt=p.object({id:il,name:p.string().min(1),status:HO,author:Qse,thread_count:p.number().int().nonnegative(),doc_count:p.number().int().nonnegative(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable()}),dQt=p.object({type:p.literal("list"),list_type:p.literal("project"),objects:p.array(lQt)}),pQt=p.object({status:HO.optional()}),fQt=p.object({name:p.string().trim().min(1).max(200),prosemirror_json:Use.optional()}),mQt=p.object({id:il,created_at:p.string().datetime()}),AQt=p.object({name:p.string().trim().min(1).max(200).optional(),prosemirror_json:Use.optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),gQt=p.object({id:il,updated_at:p.string().datetime()}),hQt=p.object({archived:p.boolean()}),_Qt=p.object({id:il,status:HO,archived_at:p.string().datetime().nullable()}),EQt=p.object({id:il,name:p.string().min(1),prosemirror_json:Use,status:HO,author:Qse,summary:p.string().nullable(),summary_at:p.string().datetime().nullable(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable(),threads:p.array(Rje),docs:p.array(wse)}),yQt=p.object({id:il,summary:p.string(),summary_at:p.string().datetime()}),SQt=p.object({thread_id:p.string().min(1).max(64)}),TQt=Rje,bQt=p.object({id:il,name:p.string().min(1),status:HO}),IQt=p.object({type:p.literal("list"),list_type:p.literal("thread_project"),objects:p.array(bQt)}),xje=uQt.router({listProjects:{method:"GET",path:"/projects",headers:p.object({authorization:p.string().min(1).optional()}),query:pQt,responses:{200:dQt,401:Mr},summary:"List projects in the authenticated user\u2019s organization"},createProject:{method:"POST",path:"/projects",headers:p.object({authorization:p.string().min(1).optional()}),body:fQt,responses:{201:mQt,401:Mr,422:Mr},summary:"Create a new project in the authenticated user\u2019s organization"},getProject:{method:"GET",path:"/projects/:projectId",pathParams:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:EQt,401:Mr,403:Mr,404:Mr},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:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),body:AQt,responses:{200:gQt,401:Mr,403:Mr,404:Mr,422:Mr},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:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),body:hQt,responses:{200:_Qt,401:Mr,403:Mr,404:Mr},summary:"Archive (soft-delete) or unarchive a project"},synthesizeProject:{method:"POST",path:"/projects/:projectId/summary",pathParams:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:yQt,401:Mr,403:Mr,404:Mr,409:Mr,503:Mr},summary:"Generate (or refresh) the project\u2019s one-paragraph summary from its pinned threads. Persists to projects.summary."},addProjectThread:{method:"POST",path:"/projects/:projectId/threads",pathParams:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),body:SQt,responses:{201:TQt,401:Mr,403:Mr,404:Mr,409:Mr,422:Mr},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:p.object({projectId:il,threadId:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.object({}),401:Mr,403:Mr,404:Mr},summary:"Remove a thread membership from a project"},listThreadProjects:{method:"GET",path:"/threads/:threadId/projects",pathParams:p.object({threadId:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:IQt,401:Mr},summary:"List the projects a thread belongs to that are visible to the viewer (org/author scope). Returns an empty list when there are none."},deleteProject:{method:"DELETE",path:"/projects/:projectId",pathParams:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.object({}),401:Mr,403:Mr,404:Mr},summary:"Permanently delete a project. Thread memberships and tasks are removed (FK cascade); child docs are detached (project_id set null)."}})});var CQt,$n,sl,Nje,vQt,oH,iH,RQt,xQt,DQt,Dje,NQt,wQt,wje,kQt,BQt,OQt,PQt,MQt,LQt,UQt,QQt,FQt,GQt,jQt,zQt,HQt,$Qt,qQt,VQt,KQt,YQt,JQt,ZQt,kje,Gse=k(()=>{"use strict";m();cA();pc();CQt=Su(),$n=p.object({message:p.string()}),sl=p.string().regex(/^reg_[0-9A-Za-z]{22}$/),Nje=p.string().min(1).max(64),vQt=["active","quiet","dormant","archived"],oH=p.enum(vQt),iH=p.object({id:p.string().min(1),display_name:p.string().min(1),avatar_url:p.string().nullable().optional()}),RQt=p.object({id:p.string().min(1),display_name:p.string().min(1),thread_count:p.number().int().positive()}),xQt=["asked","requested","decided","corrected","shared","requirement"],DQt=p.enum(xQt),Dje=p.object({id:p.string().min(1),kind:DQt,summary:p.string(),thread_id:p.string().min(1),thread_title:p.string(),created_at:p.string().datetime()}),NQt=p.object({decided_14d:p.number().int().nonnegative(),asked_14d:p.number().int().nonnegative()}),wQt=p.object({id:sl,name:p.string().min(1),overlap_score:p.number().min(0).max(1)}),wje=p.object({thread_id:p.string().min(1),title:p.string().min(1),is_primary:p.boolean(),added_at:p.string().datetime(),added_by:iH}),kQt=p.object({id:sl,name:p.string().min(1),blurb:p.string().nullable(),status:oH,thread_count:p.number().int().nonnegative(),contributor_count:p.number().int().nonnegative(),comment_count:p.number().int().nonnegative(),contributors_preview:p.array(iH).max(3),top_filepath:p.string().nullable(),last_active_at:p.string().datetime(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable()}),BQt=p.object({type:p.literal("list"),list_type:p.literal("region"),objects:p.array(kQt)}),OQt=p.object({status:oH.optional()}),PQt=p.object({name:p.string().trim().min(1).max(200),blurb:p.string().trim().max(2e3).optional()}),MQt=p.object({id:sl,created_at:p.string().datetime()}),LQt=p.object({name:p.string().trim().min(1).max(200).optional(),blurb:p.string().trim().max(2e3).nullable().optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),UQt=p.object({id:sl,updated_at:p.string().datetime()}),QQt=p.object({archived:p.boolean()}),FQt=p.object({id:sl,status:oH,archived_at:p.string().datetime().nullable()}),GQt=p.object({id:sl,name:p.string().min(1),blurb:p.string().nullable(),status:oH,created_by:iH,thread_count:p.number().int().nonnegative(),last_active_at:p.string().datetime(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable(),synthesized_status:p.string().nullable(),synthesized_status_at:p.string().datetime().nullable(),threads:p.array(wje),contributors:p.array(RQt),decisions:p.object({decided:p.array(Dje),open:p.array(Dje)}),velocity:NQt,cited_by_active_regions:p.array(wQt)}),jQt=p.object({id:sl,synthesized_status:p.string(),synthesized_status_at:p.string().datetime()}),zQt=p.object({regions_created:p.number().int().nonnegative(),llm_dispatched:p.boolean()}),HQt=p.object({promoted_to_active:p.number().int().nonnegative(),demoted_to_quiet:p.number().int().nonnegative(),demoted_to_dormant:p.number().int().nonnegative()}),$Qt=p.object({thread_id:p.string().min(1),region_id:sl,region_name:p.string().min(1),score:p.number().min(0).max(1),signal:p.enum(["file","embedding","combined"])}),qQt=p.object({thread_ids:p.array(p.string().min(1)).min(1).max(50)}),VQt=p.object({type:p.literal("list"),list_type:p.literal("region_suggestion"),objects:p.array($Qt)}),KQt=p.object({thread_id:p.string().min(1),title:p.string(),created_at:p.string().datetime(),author:iH,user_message_count:p.number().int().nonnegative(),comment_count:p.number().int().nonnegative()}),YQt=p.object({type:p.literal("list"),list_type:p.literal("unfiled_thread"),objects:p.array(KQt)}),JQt=p.object({thread_id:Nje}),ZQt=wje,kje=CQt.router({listRegions:{method:"GET",path:"/regions",headers:p.object({authorization:p.string().min(1).optional()}),query:OQt,responses:{200:BQt,401:$n,403:$n},summary:"List regions in the authenticated user\u2019s organization"},createRegion:{method:"POST",path:"/regions",headers:p.object({authorization:p.string().min(1).optional()}),body:PQt,responses:{201:MQt,401:$n,403:$n,409:$n,422:$n},summary:"Create a new region in the authenticated user\u2019s organization"},getRegion:{method:"GET",path:"/regions/:regionId",pathParams:p.object({regionId:sl}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:GQt,401:$n,403:$n,404:$n},summary:"Get a region with its attached threads and rolled-up contributors"},updateRegion:{method:"PATCH",path:"/regions/:regionId",pathParams:p.object({regionId:sl}),headers:p.object({authorization:p.string().min(1).optional()}),body:LQt,responses:{200:UQt,401:$n,403:$n,404:$n,409:$n,422:$n},summary:"Rename a region or update its blurb"},archiveRegion:{method:"POST",path:"/regions/:regionId/archive",pathParams:p.object({regionId:sl}),headers:p.object({authorization:p.string().min(1).optional()}),body:QQt,responses:{200:FQt,401:$n,403:$n,404:$n},summary:"Archive or unarchive a region"},addRegionThread:{method:"POST",path:"/regions/:regionId/threads",pathParams:p.object({regionId:sl}),headers:p.object({authorization:p.string().min(1).optional()}),body:JQt,responses:{201:ZQt,401:$n,403:$n,404:$n,409:$n,422:$n},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:p.object({authorization:p.string().min(1).optional()}),body:qQt,responses:{200:VQt,401:$n,403:$n,422:$n},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:p.object({authorization:p.string().min(1).optional()}),query:p.object({days:p.coerce.number().int().positive().max(180).optional()}),responses:{200:YQt,401:$n,403:$n},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:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:HQt,401:$n,403:$n},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:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:zQt,401:$n,403:$n},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:p.object({regionId:sl}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:jQt,401:$n,403:$n,404:$n,409:$n,503:$n},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:p.object({regionId:sl,threadId:Nje}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.object({}),401:$n,403:$n,404:$n},summary:"Remove a thread membership from a region"}})});var WQt,Bje,XQt,eFt,tFt,nFt,rFt,Oje,jse=k(()=>{"use strict";m();cA();pc();WQt=Su(),Bje=p.object({message:p.string()}),XQt=p.object({id:p.string().min(1),title:p.string(),href:p.string().min(1),author_display_name:p.string().nullable(),author_handle:p.string().nullable()}),eFt=p.object({name:p.string().min(1),usage_count:p.number().int().nonnegative(),href:p.string().min(1)}),tFt=p.object({id:p.string().min(1),display_name:p.string(),handle:p.string().nullable(),avatar_url:p.string().nullable(),href:p.string().min(1)}),nFt=p.object({type:p.literal("global_search"),threads:p.array(XQt),skills:p.array(eFt),people:p.array(tFt)}),rFt=p.object({q:p.string().trim().min(1).max(80)}),Oje=WQt.router({globalSearch:{method:"GET",path:"/search",headers:p.object({authorization:p.string().min(1).optional()}),query:rFt,responses:{200:nFt,401:Bje,422:Bje},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 X8n,e$n,t$n,Do,oFt,iFt,sFt,aFt,zse,n$n,Pje=k(()=>{"use strict";m();pc();tH();Kx();X8n=p.enum(["thread","org","user","public"]),e$n=p.discriminatedUnion("kind",[p.object({kind:p.literal("thread"),id:p.string().min(1)}),p.object({kind:p.literal("org"),id:p.string().min(1)}),p.object({kind:p.literal("user"),id:p.string().min(1)}),p.object({kind:p.literal("public"),id:p.string().min(1)})]),t$n=p.enum(["thread.created","thread.completed","thread.block.appended","thread.comment.created","thread.comment.updated","thread.comment.deleted","thread.vote.cast","thread.vote.cleared","thread.participant.joined","thread.participant.left","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"]),Do=p.object({id:p.string().min(1),subjects:p.array(p.string().min(1)).min(1),actor_user_id:p.string().min(1).nullable(),created_at:p.string().datetime()}),oFt=p.object({thread_id:p.string().min(1),title:p.string(),author_id:p.string().min(1),created_at:p.string().datetime()}),iFt=p.enum(["user","assistant","tool","progress","system"]),sFt=p.enum(["claude_global","agents_global","claude_project","agents_project"]),aFt=p.enum(["private","workspace","public"]),zse=p.object({skill_id:p.string().min(1),name:p.string().min(1),root_kind:sFt,version:p.number().int().positive(),content_hash:p.string().startsWith("md5:")}),n$n=p.discriminatedUnion("type",[Do.extend({type:p.literal("thread.created"),payload:oFt}),Do.extend({type:p.literal("thread.completed"),payload:p.object({thread_id:p.string().min(1),completed_at:p.string().datetime()})}),Do.extend({type:p.literal("thread.block.appended"),payload:p.object({thread_id:p.string().min(1),block_id:p.string().min(1),block_type:iFt,excerpt:p.string().nullable()})}),Do.extend({type:p.literal("thread.comment.created"),payload:p.object({comment:p.lazy(()=>mA)})}),Do.extend({type:p.literal("thread.comment.updated"),payload:p.object({comment:p.lazy(()=>mA)})}),Do.extend({type:p.literal("thread.comment.deleted"),payload:p.object({thread_id:p.string().min(1),comment_id:p.string().min(1)})}),Do.extend({type:p.literal("thread.vote.cast"),payload:p.object({thread_id:p.string().min(1),vote_count:p.number().int().nonnegative()})}),Do.extend({type:p.literal("thread.vote.cleared"),payload:p.object({thread_id:p.string().min(1),vote_count:p.number().int().nonnegative()})}),Do.extend({type:p.literal("thread.participant.joined"),payload:p.object({thread_id:p.string().min(1),participant_user_id:p.string().min(1),role:p.enum(["owner","member"])})}),Do.extend({type:p.literal("thread.participant.left"),payload:p.object({thread_id:p.string().min(1),participant_user_id:p.string().min(1)})}),Do.extend({type:p.literal("user.followed"),payload:p.object({followee_id:p.string().min(1),followee_handle:p.string().nullable(),followee_display_name:p.string().nullable()})}),Do.extend({type:p.literal("user.joined"),payload:p.object({organization_id:p.string().min(1).nullable(),organization_name:p.string().nullable()})}),Do.extend({type:p.literal("user.presence"),payload:p.object({status:p.literal("online")})}),Do.extend({type:p.literal("entity.created"),payload:p.object({entity_id:p.string().min(1),kind:Lf,slug:p.string().min(1),name:p.string().min(1)})}),Do.extend({type:p.literal("entity.updated"),payload:p.object({entity_id:p.string().min(1),kind:Lf,changed_fields:p.array(p.string()).min(1),actor:p.enum(["agent","human"])})}),Do.extend({type:p.literal("entity.archived"),payload:p.object({entity_id:p.string().min(1),kind:Lf})}),Do.extend({type:p.literal("entity.thread_attached"),payload:p.object({entity_id:p.string().min(1),kind:Lf,thread_id:p.string().min(1),role:p.string().min(1),score:p.number().nullable()})}),Do.extend({type:p.literal("entity.thread_detached"),payload:p.object({entity_id:p.string().min(1),kind:Lf,thread_id:p.string().min(1),role:p.string().min(1)})}),Do.extend({type:p.literal("entity.linked"),payload:p.object({from_id:p.string().min(1),to_id:p.string().min(1),edge_kind:Vx})}),Do.extend({type:p.literal("entity.superseded"),payload:p.object({superseding_id:p.string().min(1),supersedes_id:p.string().min(1)})}),Do.extend({type:p.literal("skill.published"),payload:zse.extend({visibility:aFt})}),Do.extend({type:p.literal("skill.version.accepted"),payload:zse}),Do.extend({type:p.literal("skill.version.proposed"),payload:zse.extend({owner_user_id:p.string().min(1),proposer_user_id:p.string().min(1)})}),Do.extend({type:p.literal("skill.version.rejected"),payload:p.object({skill_id:p.string().min(1),version:p.number().int().positive(),reviewer_user_id:p.string().min(1),proposer_user_id:p.string().min(1)})}),Do.extend({type:p.literal("skill.installation.deleted"),payload:p.object({skill_id:p.string().min(1),installation_id:p.string().min(1),user_id:p.string().min(1)})})])});var Kje,uFt,cFt,A$n,lFt,dFt,g$n,z,pFt,Yje,Jje,Zje,fFt,mFt,AFt,Mje,gFt,hFt,Wje,_Ft,EFt,yFt,SFt,TFt,bFt,IFt,CFt,Xje,vFt,RFt,xFt,DFt,eze,uH,NFt,wFt,kFt,BFt,OFt,PFt,MFt,LFt,UFt,QFt,FFt,GFt,jFt,zFt,HFt,$Ft,Vse,tze,qFt,VFt,KFt,YFt,nze,JFt,ZFt,WFt,XFt,e4t,t4t,Uf,n4t,r4t,o4t,i4t,s4t,Jx,ch,a4t,u4t,rze,Kse,h$n,Hse,c4t,l4t,cH,d4t,oze,ize,p4t,$O,Yse,Lje,f4t,sze,Uje,m4t,A4t,mA,g4t,h4t,_4t,E4t,y4t,S4t,_$n,T4t,b4t,I4t,C4t,Jse,aze,v4t,R4t,x4t,D4t,N4t,w4t,uze,k4t,B4t,O4t,P4t,M4t,L4t,U4t,$se,Q4t,F4t,G4t,j4t,Zse,Wse,z4t,H4t,$4t,q4t,qO,V4t,K4t,Y4t,J4t,Z4t,W4t,X4t,e3t,t3t,n3t,r3t,o3t,i3t,s3t,Qje,a3t,u3t,c3t,l3t,d3t,p3t,f3t,m3t,A3t,g3t,h3t,VO,_3t,cze,E3t,y3t,S3t,T3t,b3t,I3t,Fje,C3t,v3t,R3t,lH,x3t,D3t,N3t,lze,w3t,k3t,B3t,O3t,P3t,M3t,L3t,U3t,Q3t,Gje,F3t,jje,G3t,j3t,z3t,H3t,$3t,q3t,V3t,K3t,Y3t,J3t,Z3t,dze,W3t,X3t,e6t,t6t,n6t,r6t,pze,o6t,i6t,s6t,a6t,fze,mze,u6t,c6t,l6t,d6t,zje,p6t,f6t,m6t,A6t,sH,g6t,h6t,_6t,E6t,y6t,S6t,T6t,b6t,I6t,C6t,v6t,R6t,x6t,Yx,Aze,qse,D6t,N6t,w6t,k6t,B6t,Hje,aH,O6t,$je,P6t,M6t,L6t,U6t,Q6t,F6t,G6t,j6t,z6t,H6t,$6t,q6t,V6t,K6t,Y6t,ny,qje,J6t,Z6t,W6t,X6t,eGt,tGt,nGt,rGt,oGt,iGt,sGt,aGt,uGt,cGt,lGt,dGt,pGt,fGt,mGt,AGt,gGt,Vje,hGt,gze,_Gt,EGt,yGt,SGt,TGt,dH,Kx=k(()=>{"use strict";m();n4e();cA();pc();eH();Pse();Mse();Lse();Fse();Gse();jse();Pje();Ose();Fse();Gse();Pse();eH();Lse();Mse();jse();Kje=30*1024*1024,uFt=Su(),cFt=["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"],A$n=new Set(cFt),lFt=p.object({id:p.string().uuid(),role:p.enum(["user","assistant"]),content:p.string().min(1),timestamp:p.string().datetime()}),dFt=p.object({id:p.string().uuid(),title:p.string().min(1),author:p.string().min(1),authorAvatar:p.string().min(1).max(4),model:p.string().min(1),turnCount:p.number().int().nonnegative(),createdAt:p.string().datetime(),preview:p.string()}),g$n=dFt.extend({messages:p.array(lFt)}),z=p.object({message:p.string()}),pFt=/^[a-zA-Z0-9_-]{2,32}$/,Yje=p.string().regex(pFt,"Handle must be 2\u201332 characters: letters, numbers, dashes, or underscores."),Jje=p.enum(["friend","events","twitter","linkedin","hacker_news","reddit","discord","youtube","google","ai_search","other"]),Zje=p.object({id:p.string(),first_name:p.string().min(1),last_name:p.string().min(1),display_name:p.string().min(1),handle:p.string().nullable(),bio:p.string().max(280).nullable(),avatar_url:p.string().nullable(),banner_url:p.string().nullable(),share_new_threads_to_workspace:p.boolean(),experimental_features_enabled:p.boolean(),onboarded_at:p.string().nullable(),attribution_source:Jje.nullable(),attribution_source_detail:p.string().nullable()}),fFt=p.object({email:p.string().nullable(),name:p.string().nullable(),handle:p.string().nullable(),created_at:p.string(),onboarded_at:p.string().nullable(),is_admin:p.boolean(),referred_by_user_id:p.string().nullable(),plan_tier:p.enum(["free","creator","team"]),organization_id:p.string().nullable(),signup_source:p.enum(["referral","organic"]),first_upload_at:p.string().nullable(),first_share_at:p.string().nullable(),first_cli_auth_at:p.string().nullable(),first_plugin_activated_at:p.string().nullable(),first_plugin_agent:p.string().nullable()}),mFt=p.object({group_key:p.string().min(1),properties:p.object({name:p.string(),plan_tier:p.enum(["free","creator","team"]),seat_count:p.number().int().nonnegative(),created_at:p.string(),email_domains:p.array(p.string()),default_thread_visibility:p.string(),member_count:p.number().int().nonnegative().nullable()})}),AFt=p.object({authProviderUserId:p.string().min(1).optional(),authProviderOrganizationId:p.string().min(1).optional(),org_name:p.string().min(1).optional(),workspaceOrganizationIds:p.array(p.string().min(1)).optional(),organizations:p.array(p.object({id:p.string().min(1),authProviderOrganizationId:p.string().min(1).optional(),name:p.string().min(1)})),emailAddress:p.string().email(),name:p.string().nullable(),user:Zje,is_admin:p.boolean(),is_new_signup:p.boolean(),posthog:p.object({user_properties:fFt,organization:mFt.nullable()})}),Mje=p.object({workos_client_id:p.string().min(1),workos_api_origin:p.string().url()}),gFt=p.object({share_new_threads_to_workspace:p.boolean().optional(),experimental_features_enabled:p.boolean().optional(),onboarded_at:p.union([p.literal("now"),p.null()]).optional(),attribution_source:Jje.nullable().optional(),attribution_source_detail:p.string().max(280).nullable().optional(),display_name:p.string().min(1).max(120).optional(),handle:Yje.optional(),bio:p.string().max(280).nullable().optional(),avatar_storage_url:p.string().min(1).nullable().optional(),banner_storage_url:p.string().min(1).nullable().optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),hFt=p.object({id:p.string(),display_name:p.string(),handle:p.string().nullable(),avatar_url:p.string().nullable(),visible_thread_count:p.number().int().nonnegative(),last_active_at:p.string().datetime().nullable(),product_last_seen_at:p.string().datetime().nullable()}),Wje=p.object({id:p.string().min(1),display_name:p.string().min(1),handle:p.string().nullable(),bio:p.string().max(280).nullable(),avatar_url:p.string().nullable(),banner_url:p.string().nullable(),organization_name:p.string().min(1).nullable(),created_at:p.string().min(1),visible_thread_count:p.number().int().nonnegative(),follower_count:p.number().int().nonnegative(),following_count:p.number().int().nonnegative(),published_project_count:p.number().int().nonnegative(),is_following:p.boolean(),is_self:p.boolean()}),_Ft=p.object({type:p.literal("list"),list_type:p.literal("organization_member"),objects:p.array(hFt)}),EFt=p.object({email_address:p.string().email()}),yFt=p.object({email_address:p.string().email(),invitation_id:p.string().min(1)}),SFt=p.object({organization_id:p.string().min(1),organization_name:p.string().min(1),domain:p.string().min(1),created:p.boolean()}),TFt=p.object({location:p.string().trim().min(1),contact:p.string().trim().email()}),bFt=p.object({name:p.string().trim().min(1).max(100).describe("Sender's name"),email:p.string().trim().email().max(200).describe("Reply-to email"),message:p.string().trim().min(1).max(5e3).describe("Message body"),company:p.string().max(200).optional()}),IFt=p.object({ok:p.boolean()}),CFt=p.object({location:p.string().min(1),contact:p.string().email(),created_at:p.string().datetime()}),Xje=p.enum(["general","bug","feature_request","question"]),vFt=p.object({type:Xje,message:p.string().trim().min(1).max(5e3)}),RFt=p.object({id:p.string().min(1),type:Xje,message:p.string().min(1),created_at:p.string().datetime()}),xFt=p.object({path_glob:p.string().min(1),name:p.string().min(1),description:p.string().min(1)}),DFt=p.object({repo_origin_path:p.string().min(1),building_blocks:p.array(xFt)}),eze=p.string().regex(/^th_[0-9A-Za-z]{22}$/),uH=p.string().regex(/^tb_[0-9A-Za-z]{22}$/),NFt=p.object({id:eze,author:p.object({id:p.string().min(1),display_name:p.string().min(1)}),title:p.string().min(1),excerpt:p.string(),created_at:p.string().datetime(),repo_origin_path:p.string().min(1),latest_revision_id:uH,revision_count:p.number().int().positive()}),wFt=p.object({id:p.string().min(1),display_name:p.string().min(1)}),kFt=p.object({id:p.string().min(1),author_id:p.string().min(1).nullable(),author:wFt.nullable(),created_at:p.string().datetime(),deleted_at:p.string().datetime().nullable(),content:p.string().min(1)}),BFt=p.object({id:p.string().min(1),thread_block_id:p.string().min(1),created_at:p.string().datetime(),resolved_at:p.string().datetime().nullable(),comments:p.array(kFt)}),OFt=p.object({thread_block_id:uH,from_position:p.number().int().positive(),to_position:p.number().int().positive(),selected_text:p.string().min(1),content:p.string().trim().min(1)}),PFt=p.object({id:p.string().min(1)}),MFt=p.object({content:p.string().trim().min(1)}),LFt=p.object({id:p.string().min(1)}),UFt=p.object({content:p.string().trim().min(1)}),QFt=p.object({id:p.string().min(1)}),FFt=p.object({content:p.string().trim().min(1)}),GFt=p.object({id:p.string().min(1)}),jFt=p.object({resolved:p.boolean()}),zFt=p.object({id:p.string().min(1),resolved_at:p.string().datetime().nullable()}),HFt=p.object({resolved:p.boolean()}),$Ft=p.object({id:p.string().min(1),resolved_at:p.string().datetime().nullable()}),Vse=p.record(p.string(),p.unknown()),tze=p.object({id:uH,body:p.string().nullable(),created_at:p.string().datetime(),prosemirror_json:Vse.nullable(),comment_threads:p.array(BFt)}),qFt=tze.extend({body:p.string(),prosemirror_json:Vse}),VFt=p.object({id:eze,created_at:p.string().datetime(),repo_origin_path:p.string().min(1),author:p.object({id:p.string().min(1),display_name:p.string().min(1)}),latest_revision_id:uH,revision_count:p.number().int().positive(),revisions:p.array(tze)}),KFt=p.object({type:p.literal("list"),list_type:p.literal("plan"),has_more:p.boolean(),objects:p.array(NFt)}),YFt=p.object({before:p.string().min(1).optional(),after:p.string().min(1).optional(),author_id:p.string().min(1).optional(),repo_origin_path:p.string().min(1).optional()}),nze=p.object({id:p.string().min(1),organization_id:p.string().min(1).nullable(),created_at:p.string().min(1),repo_origin_path:p.string().min(1),path_glob:p.string().min(1),name:p.string().min(1),description:p.string().min(1)}),JFt=p.array(nze),ZFt=p.object({type:p.literal("list"),list_type:p.literal("building_block"),has_more:p.boolean(),objects:p.array(nze)}),WFt=p.object({repo_origin_path:p.string().min(1),before:p.string().min(1).optional(),after:p.string().min(1).optional()}),XFt=p.enum(["thread","building_block"]),e4t=p.object({repo_origin_path:p.string().min(1),sources:p.array(XFt).nonempty()}),t4t=p.object({type:p.literal("list"),list_type:p.literal("repository"),has_more:p.boolean(),objects:p.array(e4t)}),Uf=p.enum(["claudeCode","codex","amp","lore","cursor","cowork","unspecified"]),n4t=p.enum(["claudeCode","codex","amp","cursor","cowork","unspecified"]),r4t=p.object({uploads:p.array(p.string()),outputs:p.array(p.string())}),o4t=p.object({connected:p.boolean(),last_upload_at:p.string().nullable(),harnesses:p.array(Uf)}),i4t=["transcript","plan"],s4t=p.enum(i4t),Jx=p.enum(["private","workspace","public"]),ch=p.enum(["claude_global","agents_global","claude_project","agents_project"]),a4t=p.object({name:p.string().min(1),description:p.string().nullable(),root_kind:ch,file_path:p.string().min(1),also_seen_at:p.array(p.string().min(1)),skill_id:p.string().min(1).optional(),local_content_hash:p.string().startsWith("md5:").optional()}),u4t=p.object({skill_id:p.string().min(1),name:p.string().min(1),description:p.string().nullable(),file_path:p.string().min(1),manifest_path:p.string().min(1)}),rze=p.object({type:p.literal("local_skill_scanner_output"),skills:p.record(p.string(),p.array(a4t)),cowork_skills:p.record(p.string(),p.array(u4t))}),Kse=p.enum(["accepted","proposed","rejected","superseded"]),h$n=p.enum(["initial_publish","owner_update","subscriber_update"]),Hse=p.object({md5:p.string().min(1).describe("Raw hex MD5 used to verify uploaded SKILL.md bytes"),name:p.string().min(1).describe("Skill directory/name, e.g. code-review"),filename:p.string().min(1).describe("Upload object filename, usually <name>/SKILL.md").optional(),description:p.string().nullable().describe("Optional skill description extracted from frontmatter").optional(),root_kind:ch.describe("Local root kind where this skill file came from"),base_version:p.number().int().positive().describe("Installed base version for local edits").optional()}),c4t=p.discriminatedUnion("sync_action",[Hse.extend({sync_action:p.literal("initial_publish").describe("Publish a local skill without an existing server skill ID"),skill_id:p.never().optional()}),Hse.extend({sync_action:p.literal("owner_update").describe("Publish an accepted update to an owned skill"),skill_id:p.string().min(1).describe("Existing skill ID for owner updates")}),Hse.extend({sync_action:p.literal("subscriber_update").describe("Propose an update to an installed workspace skill"),skill_id:p.string().min(1).describe("Existing skill ID for subscriber update proposals")})]),l4t=p.object({md5:p.string().min(1),harness:n4t,filename:p.string().min(1).optional(),repo_origin_path:p.string().min(1).optional(),harness_internal_id:p.string().min(1).optional(),file_type:s4t.optional(),artifact_metadata:r4t.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"}),cH=p.object({id:p.string().min(1),display_name:p.string().min(1),avatar_url:p.string().nullable()}),d4t=p.object({id:p.string().min(1),display_name:p.string().min(1)}),oze=p.object({id:p.string().min(1),author_id:p.string().min(1).nullable(),author:d4t.nullable(),created_at:p.string().datetime(),deleted_at:p.string().datetime().nullable(),content:p.string().min(1)}),ize=p.object({id:p.string().min(1),thread_block_id:p.string().min(1),created_at:p.string().datetime(),resolved_at:p.string().datetime().nullable()}),p4t=ize.extend({comments:p.array(oze)}),$O=p.object({id:p.string().min(1),type:p.string().min(1),index_in_thread:p.number().int().nonnegative(),isCritiqued:p.boolean(),comment_threads:p.array(p4t).optional()}).passthrough(),Yse=p.object({type:p.literal("list"),list_type:p.literal("thread_block"),has_more:p.boolean(),objects:p.array($O)}),Lje=$O.extend({type:p.literal("plan"),prosemirror_json:Vse,thread_file_id:p.string().min(1)}),f4t=p.union([p.literal(-1),p.literal(1)]),sze=p.union([p.literal(-1),p.literal(0),p.literal(1)]),Uje=p.object({score:p.number().int(),up_count:p.number().int().nonnegative(),down_count:p.number().int().nonnegative(),viewer_vote:sze}),m4t=p.object({value:f4t}),A4t=p.object({id:p.string().min(1),display_name:p.string().min(1),avatar_url:p.string().nullable()}),mA=p.object({id:p.string().min(1),thread_id:p.string().min(1),author_id:p.string().min(1).nullable(),author:A4t.nullable(),parent_comment_id:p.string().min(1).nullable(),content:p.string(),created_at:p.string().datetime(),updated_at:p.string().datetime(),deleted_at:p.string().datetime().nullable()}),g4t=p.object({type:p.literal("list"),list_type:p.literal("thread_comment"),objects:p.array(mA)}),h4t=p.object({content:p.string().trim().min(1).max(4e3),parent_comment_id:p.string().min(1).optional()}),_4t=mA,E4t=p.object({content:p.string().trim().min(1).max(4e3)}),y4t=mA,S4t=mA,_$n=p.discriminatedUnion("kind",[p.object({kind:p.literal("created"),thread_id:p.string().min(1),actor_user_id:p.string().min(1),version:p.number(),comment:mA}),p.object({kind:p.literal("updated"),thread_id:p.string().min(1),actor_user_id:p.string().min(1),version:p.number(),comment:mA}),p.object({kind:p.literal("deleted"),thread_id:p.string().min(1),actor_user_id:p.string().min(1),version:p.number(),comment:mA})]),T4t=p.enum(["pending","generating","ready","failed"]),b4t=p.enum(["pending","generating","ready","failed"]),I4t=p.enum(["pending","placeholder","ai","user","command","harness"]),C4t=p.enum(["pending","generating","ready","failed"]),Jse=p.enum(["pending","generating","ready","failed","disabled"]),aze=p.enum(["pending","generating","ready","failed"]),v4t=p.object({title:p.string().min(1),body:p.string().min(1),files:p.array(p.string()).optional()}),R4t=p.object({status:Jse,url:p.string().nullable(),url_expires_at:p.string().nullable(),generated_at:p.string().nullable(),model:p.string().nullable()}),x4t=p.object({status:aze,steps:p.array(v4t),generated_at:p.string().nullable()}),D4t=p.object({cover:R4t,how_to:x4t}),N4t=p.object({id:p.string().min(1),title:p.string().min(1),author:p.object({id:p.string().min(1),display_name:p.string(),handle:p.string().nullable(),avatar_url:p.string().nullable()}),cover:p.object({url:p.string(),url_expires_at:p.string()}),started_at:p.string(),cover_generated_at:p.string()}),w4t=p.object({type:p.literal("list"),list_type:p.literal("card_feed_item"),has_more:p.boolean(),objects:p.array(N4t)}),uze=p.enum(["asked","requested","decided","corrected","shared","requirement"]),k4t=p.object({id:p.string().min(1),kind:uze,summary:p.string().min(1),block_id:p.string().min(1)}),B4t=p.object({block_id:p.string().min(1),status:C4t,generated_at:p.string().nullable()}),O4t=p.object({type:p.literal("list"),list_type:p.literal("thread_decision"),objects:p.array(k4t),block_statuses:p.array(B4t)}),P4t=p.object({forker_intent:p.string().min(1).max(2e3).describe("What the forking user wants to do next with this session")}),M4t=p.object({source_thread_id:p.string().min(1),forker_intent:p.string(),source_distilled:p.string().min(1).describe("Intent-conditioned handoff summary of the source thread for a new agent")}),L4t=p.object({question:p.string().trim().min(1).max(2e3).describe("Question to answer from visible Lore thread decisions and titles")}),U4t=p.object({id:p.string().min(1),kind:uze,summary:p.string().min(1),block_id:p.string().min(1)}),$se=p.object({thread_id:p.string().min(1),title:p.string().min(1),summary:p.string().nullable(),started_at:p.string().datetime(),score:p.number(),matched_by:p.enum(["summary","decision","thread"]),decisions:p.array(U4t)}),Q4t=p.object({id:p.string().min(1),kind:p.enum(["agent","tool","retrieval","answer","sources"]),title:p.string().min(1),status:p.enum(["completed"]),summary:p.string().min(1),duration_ms:p.number().nonnegative().optional(),metadata:p.object({retrieved_decisions:p.number().int().nonnegative().optional(),returned_sources:p.number().int().nonnegative().optional(),cited_sources:p.number().int().nonnegative().optional(),matched_sources:p.array($se).optional(),searched_query:p.string().min(1).optional(),since:p.string().min(1).optional(),until:p.string().min(1).optional(),thread_id:p.string().min(1).optional(),thread_ids:p.array(p.string().min(1)).optional(),question:p.string().min(1).optional()}).optional()}),F4t=p.object({steps:p.array(Q4t)}),G4t=p.object({answer:p.string(),sources:p.array($se),matched_sources:p.array($se).describe("Threads matched by the vector decision search before citation filtering"),searched_query:p.string().describe("String embedded for the vector decision search"),trace:F4t.optional()}),j4t=/^[a-zA-Z0-9_.:-]{1,64}$/,Zse=p.record(p.string().regex(j4t,"Metadata keys must be 1\u201364 characters: letters, numbers, underscore, dot, colon, or dash."),p.string().max(512,"Metadata values must be at most 512 characters.")).refine(e=>Object.keys(e).length<=20,{message:"Upload metadata may contain at most 20 keys."}).refine(e=>new TextEncoder().encode(JSON.stringify(e)).byteLength<=4096,{message:"Upload metadata JSON must be at most 4 KB."}),Wse=p.object({id:p.string().min(1),name:p.string().min(1),organization_id:p.string().min(1),key_prefix:p.string().min(1),key_last_four:p.string().length(4),default_visibility:p.literal("workspace"),created_at:p.string().datetime(),last_used_at:p.string().datetime().nullable(),revoked_at:p.string().datetime().nullable()}),z4t=p.object({type:p.literal("list"),list_type:p.literal("upload_api_key"),has_more:p.literal(!1),objects:p.array(Wse)}),H4t=p.object({name:p.string().trim().min(1).max(200).describe("Human-readable Upload API key name"),organization_id:p.string().min(1).optional().describe("Workspace organization id. Defaults to the authenticated active organization."),default_visibility:p.literal("workspace").optional().describe("Default visibility for uploaded threads. Only workspace is supported in this build.")}),$4t=Wse.extend({raw_key:p.string().min(1)}),q4t=p.object({organization_id:p.string().min(1).optional().describe("Workspace organization id. Defaults to the authenticated active organization.")}),qO=p.object({id:p.string().min(1),thread_file_id:p.string().min(1),organization_id:p.string().min(1).nullable(),upload_api_key_id:p.string().min(1).nullable(),upload_metadata:Zse,deleted_at:p.string().datetime().nullable(),author:cH,repo:p.string().min(1),title:p.string().min(1),started_at:p.string().min(1),last_activity_at:p.string().datetime().nullable(),blocks:Yse,user_message_count:p.number().int().nonnegative(),files_touched:p.array(p.string()),skills_invoked:p.array(p.string()),slash_commands_invoked:p.array(p.string()),harness:Uf,transcript_parsing_state:p.enum(["pending","parsed","too_large_to_parse","failed"]),visibility:p.enum(["private","workspace","public"]),has_plan:p.boolean().optional(),summary:p.string().nullable(),summary_status:T4t,summary_generated_at:p.string().nullable(),title_status:b4t,title_generated_at:p.string().nullable(),title_source:I4t,score:p.number().int(),up_count:p.number().int().nonnegative(),down_count:p.number().int().nonnegative(),viewer_vote:sze,comment_count:p.number().int().nonnegative(),is_favorited:p.boolean(),card:D4t}),V4t=p.object({storage_url:p.string().min(1)}),K4t=p.object({storage_url:p.string().min(1)}),Y4t=p.object({storage_url:p.string(),harness:Uf,thread:qO.nullable()}),J4t=p.object({status:p.literal("complete"),thread_files:p.array(Y4t),skill_files:p.array(p.object({storage_url:p.string(),skill:p.object({id:p.string(),name:p.string(),version:p.number().int().positive(),latest_version:p.number().int().positive(),visibility:Jx,root_kind:ch,version_status:Kse.optional(),content_hash:p.string()}).nullable()})).optional()}),Z4t=p.object({id:p.string(),presigned_url:p.string().nullable(),presigned_url_expires_at:p.string().nullable(),storage_url:p.string(),harness:Uf,expected_md5:p.string(),error:p.string().nullable(),thread:qO.nullable()}),W4t=p.object({id:p.string(),presigned_url:p.string().nullable(),presigned_url_expires_at:p.string().nullable(),storage_url:p.string(),expected_md5:p.string(),name:p.string(),error:p.string().nullable()}),X4t=p.object({id:p.string(),substrate:p.enum(["s3","filesystem"]),status:p.enum(["incomplete","locked_for_parsing","complete","error"]),thread_files:p.array(Z4t),skill_files:p.array(W4t).optional()}),e3t=p.object({query:p.string().min(1).describe("Natural-language description of the block or block range to highlight")}),t3t=p.object({thread_id:p.string(),url:p.string().url(),start_block_id:p.string().nullable(),end_block_id:p.string().nullable(),matched:p.boolean()}),n3t=p.object({}),r3t=p.object({thread_id:p.string().min(1)}),o3t=p.object({visibility:p.enum(["private","workspace","public"]).optional(),title:p.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"}),i3t=p.discriminatedUnion("visibility",[p.object({visibility:p.literal("private")}),p.object({visibility:p.literal("workspace")}),p.object({visibility:p.literal("public"),title:p.string().min(1),author_display_name:p.string().min(1),author_avatar_url:p.string().nullable(),first_user_message:p.string().nullable(),summary:p.string().nullable(),started_at:p.string().min(1),harness:Uf,cover_url:p.string().nullable()})]),s3t=p.object({id:p.string().min(1),upload_api_key_id:p.string().min(1).nullable(),upload_metadata:Zse,author:cH,repo:p.string().min(1),title:p.string().min(1),started_at:p.string().min(1),last_activity_at:p.string().datetime().nullable(),blocks:Yse,user_message_count:p.number().int().nonnegative(),comment_count:p.number().int().nonnegative(),files_touched:p.array(p.string()),skills_invoked:p.array(p.string()),harness:Uf,visibility:p.enum(["private","workspace","public"]),has_plan:p.boolean().optional(),is_favorited:p.boolean(),participants:p.array(p.object({id:p.string().min(1),display_name:p.string(),avatar_url:p.string().nullable()})).optional()}),Qje=p.object({type:p.literal("list"),list_type:p.literal("thread"),has_more:p.boolean(),objects:p.array(s3t)}),a3t=p.enum(["recent","popular"]),u3t=p.enum(["everyone","following"]),c3t=qO,l3t=p.object({type:p.literal("list"),list_type:p.literal("discover_thread"),has_more:p.boolean(),objects:p.array(c3t)}),d3t=p.object({before:p.string().min(1).optional(),after:p.string().min(1).optional(),sort:a3t.optional(),scope:u3t.optional(),harness:Uf.optional(),search:p.string().max(200).optional()}),p3t=p.object({thread_count:p.number().int().nonnegative(),author_count:p.number().int().nonnegative(),organization_count:p.number().int().nonnegative(),harness_breakdown:p.record(p.string(),p.number().int().nonnegative()).refine(e=>Object.keys(e).every(t=>Uf.safeParse(t).success),"Harness breakdown keys must be known harness values")}),f3t=p.object({id:p.string(),status:p.enum(["incomplete","locked_for_parsing","complete","error"]),created_at:p.string(),thread_count:p.number().int().nonnegative(),skill_count:p.number().int().nonnegative().default(0),thread_ids:p.array(p.string()).default([])}),m3t=p.object({type:p.literal("list"),list_type:p.literal("upload_session"),objects:p.array(f3t)}),A3t=p.object({before:p.string().min(1).optional(),after:p.string().min(1).optional()}),g3t=p.object({before:p.string().min(1).optional(),after:p.string().min(1).optional(),author_ids:p.string().min(1).optional(),upload_api_key_ids:p.string().min(1).optional().describe("Comma-separated Upload API key ids to filter by."),upload_metadata:p.string().min(1).optional().describe("URL-encoded JSON object of exact-match upload metadata filters."),created_at:p.string().min(1).optional(),filepath_prefixes:p.string().min(1).optional(),decision_kinds:p.string().min(1).optional().describe("Comma-separated decision kinds (asked, requested, decided, corrected, shared, requirement); returns threads with at least one matching decision."),q:p.string().trim().min(1).max(200).optional()}),h3t=p.object({path:p.string().min(1),start_offset:p.number().int().nonnegative(),end_offset:p.number().int().positive()}),VO=p.object({id:p.string(),display_name:p.string(),avatar_url:p.string().nullable()}),_3t=p.object({before:p.string().min(1).optional().describe("Skill ID cursor. Returns skills newer than this cursor in descending created_at order."),after:p.string().min(1).optional().describe("Skill ID cursor. Returns skills older than this cursor in descending created_at order.")}),cze=p.object({id:p.string(),name:p.string(),description:p.string().nullable(),visibility:Jx,root_kind:ch,latest_version:p.number().int().nonnegative().nullable(),content_hash:p.string().nullable(),has_content:p.boolean(),owner:VO.nullable(),usage_count:p.number().int().nonnegative(),author_count:p.number().int().nonnegative(),first_used_at:p.string().nullable(),last_used_at:p.string().nullable()}),E3t=p.object({type:p.literal("list"),list_type:p.literal("skill"),has_more:p.boolean(),objects:p.array(cze)}),y3t=p.object({skill_ids:p.string().optional().describe("Comma-separated local Lore skill IDs, e.g. sk_...,sk_..."),content_hashes:p.string().optional().describe("Comma-separated local SKILL.md content hashes, e.g. md5:...,md5:...")}),S3t=cze.pick({id:!0,name:!0,description:!0,visibility:!0,root_kind:!0,latest_version:!0,content_hash:!0,has_content:!0,owner:!0}),T3t=p.object({type:p.literal("local_skill_reconciliation"),objects:p.array(S3t)}),b3t=p.object({id:p.string(),title:p.string(),visibility:p.enum(["private","workspace","public"]),started_at:p.string(),author:cH,skills_invoked:p.array(p.string())}),I3t=p.object({version:p.number().int().positive().describe("Version timestamp for this SKILL.md body"),content_hash:p.string().describe("Content-addressed skill body hash, prefixed by hash type"),status:Kse.describe("Review status for this skill version"),created_at:p.string().describe("ISO-8601 timestamp when this version was uploaded"),created_by:VO.nullable().describe("User who uploaded/proposed this version, when known"),reviewed_at:p.string().nullable().describe("ISO-8601 timestamp when the owner reviewed this version"),reviewed_by:VO.nullable().describe("Owner who approved or rejected this version"),rejection_reason:p.string().nullable().describe("Owner-provided rejection reason for rejected versions")}),Fje=p.object({id:p.string(),name:p.string(),description:p.string().nullable(),visibility:Jx,root_kind:ch,latest_version:p.number().int().nonnegative().nullable(),content_hash:p.string().nullable(),owner:VO.nullable(),usage_count:p.number().int().nonnegative(),author_count:p.number().int().nonnegative(),first_used_at:p.string().nullable(),last_used_at:p.string().nullable(),versions:p.array(I3t),threads:p.array(b3t),share_token:p.string().nullable()}),C3t=p.object({visibility:Jx}),v3t=p.object({type:p.literal("shared_skill_preview"),id:p.string(),name:p.string(),description:p.string().nullable(),root_kind:ch,owner:VO.nullable(),latest_version:p.number().int().nonnegative().nullable(),has_content:p.boolean(),viewer_can_install:p.boolean()}),R3t=p.enum(["cowork","native"]),lH=p.enum(["upload","output"]),x3t=p.enum(["private","workspace","public"]),D3t=p.object({id:p.string(),display_name:p.string(),avatar_url:p.string().nullable()}),N3t=p.object({scope:p.enum(["mine","workspace"]).optional().describe("`mine` (default) returns artifacts you authored; `workspace` returns all visible artifacts in your org."),thread_id:p.string().optional().describe("Restrict to artifacts produced by a single thread, e.g. th_..."),author_ids:p.string().optional().describe("Comma-separated user IDs to filter by author, e.g. user_...,user_..."),before:p.string().min(1).optional().describe("Artifact ID cursor. Returns artifacts newer than this cursor in descending created_at order."),after:p.string().min(1).optional().describe("Artifact ID cursor. Returns artifacts older than this cursor in descending created_at order.")}),lze=p.object({id:p.string(),thread_id:p.string(),thread_title:p.string(),source:R3t,kind:lH,file_name:p.string(),mime_type:p.string().nullable(),size_in_bytes:p.number().int().nonnegative().nullable(),content_hash:p.string().nullable(),visibility:x3t,owner:D3t.nullable(),created_at:p.string(),updated_at:p.string()}),w3t=p.object({type:p.literal("list"),list_type:p.literal("artifact"),has_more:p.boolean(),objects:p.array(lze)}),k3t=lze.extend({download_url:p.string().describe("Presigned, time-limited URL to download the artifact bytes."),download_url_expires_at:p.string().describe("ISO-8601 expiry for download_url.")}),B3t=p.object({kind:lH,file_name:p.string(),md5:p.string(),size_in_bytes:p.number().int().nonnegative(),content_type:p.string().nullable().optional()}),O3t=p.object({harness:p.string().describe("Harness of the source session, e.g. cowork"),harness_internal_id:p.string().describe("Source session id (threads.harness_internal_id)"),artifact_files:p.array(B3t).min(1)}),P3t=p.object({thread_id:p.string(),artifact_files:p.array(p.object({kind:lH,file_name:p.string(),presigned_url:p.string().nullable(),storage_url:p.string()}))}),M3t=p.object({harness:p.string(),harness_internal_id:p.string(),artifacts:p.array(p.object({kind:lH,file_name:p.string(),storage_url:p.string(),md5:p.string(),size_in_bytes:p.number().int().nonnegative(),content_type:p.string().nullable().optional()})).min(1)}),L3t=p.object({thread_id:p.string(),created:p.number().int().nonnegative().describe("Number of artifact rows created or updated.")}),U3t=p.object({id:p.string(),name:p.string(),visibility:Jx,root_kind:ch,latest_version:p.number().int().nonnegative(),content_hash:p.string()}),Q3t=p.object({installation_id:p.string(),already_registered:p.boolean(),body_md_url:p.string(),skill:U3t}),Gje=p.object({id:p.string(),skill_id:p.string(),installed_version:p.number().int().nonnegative().nullable(),already_registered:p.boolean().optional()}),F3t=p.object({installed_version:p.number().int().nonnegative().describe("Accepted skill version that was successfully written locally")}),jje=p.object({id:p.string(),name:p.string(),version:p.number().int().positive(),latest_version:p.number().int().positive(),visibility:Jx,root_kind:ch,version_status:Kse,content_hash:p.string()}),G3t=p.object({id:p.string(),unpublished:p.literal(!0)}),j3t=p.object({reason:p.string().optional().describe("Optional owner-provided reason for rejecting the proposed version")}),z3t=p.object({id:p.string(),skill_id:p.string(),name:p.string(),description:p.string().nullable(),root_kind:ch,latest_version:p.number().int().nonnegative(),latest_content_hash:p.string(),installed_version:p.number().int().nonnegative().nullable()}),H3t=p.object({type:p.literal("list"),list_type:p.literal("skill_installation_sync"),has_more:p.boolean(),objects:p.array(z3t)}),$3t=p.object({path:p.string().min(1),text:p.string().max(64e3)}),q3t=p.enum(["text_edit","redact","delete_block"]),V3t=p.object({id:p.string(),thread_block_id:p.string(),editor:p.object({id:p.string(),display_name:p.string()}),kind:q3t,path:p.string().nullable(),previous_text:p.string().nullable(),new_text:p.string().nullable(),created_at:p.string()}),K3t=p.object({type:p.literal("list"),list_type:p.literal("thread_block_edit"),objects:p.array(V3t)}),Y3t=p.object({organization_count:p.number().int().nonnegative(),user_count:p.number().int().nonnegative(),thread_count:p.number().int().nonnegative(),thread_count_last_24h:p.number().int().nonnegative(),user_count_last_24h:p.number().int().nonnegative()}),J3t=p.object({id:p.string(),name:p.string(),email_domains:p.array(p.string()),member_count:p.number().int().nonnegative(),thread_count:p.number().int().nonnegative(),default_thread_visibility:p.enum(["private","workspace","public"]),created_at:p.string()}),Z3t=p.object({type:p.literal("list"),list_type:p.literal("admin_organization"),objects:p.array(J3t)}),dze=p.object({id:p.string(),name:p.string()}),W3t=p.object({id:p.string(),display_name:p.string(),workos_id:p.string(),thread_count:p.number().int().nonnegative(),onboarded_at:p.string().nullable(),created_at:p.string(),organizations:p.array(dze)}),X3t=p.object({q:p.string().trim().min(1).max(120).optional()}),e6t=p.object({follower_id:p.string().min(1),followee_id:p.string().min(1)}),t6t=p.object({follower_id:p.string().min(1),followee_id:p.string().min(1),is_following:p.literal(!0)}),n6t=p.object({skill_id:p.string().min(1),deleted:p.object({skills:p.number().int().nonnegative(),versions:p.number().int().nonnegative(),files:p.number().int().nonnegative(),installations:p.number().int().nonnegative()}),cli_command:p.string().min(1)}),r6t=p.object({type:p.literal("list"),list_type:p.literal("admin_user"),objects:p.array(W3t)}),pze=p.object({id:p.string(),title:p.string(),started_at:p.string(),created_at:p.string(),deleted_at:p.string().nullable(),visibility:p.enum(["private","workspace","public"]),harness:Uf,harness_internal_id:p.string(),thread_file_id:p.string(),transcript_parsing_state:p.enum(["pending","parsed","too_large_to_parse","failed"]),author:cH,organization:dze.nullable()}),o6t=p.object({id:p.string(),content_type:p.enum(["transcript","plan"]),harness:Uf,harness_internal_id:p.string(),expected_md5:p.string(),size_in_bytes:p.number().int().nonnegative().nullable(),created_at:p.string()}),i6t=p.object({thread:pze,latest_transcript_file:o6t.nullable()}),s6t=p.object({type:p.literal("list"),list_type:p.literal("admin_thread"),has_more:p.boolean(),objects:p.array(pze)}),a6t=p.object({before:p.string().min(1).optional(),after:p.string().min(1).optional()}),fze=p.enum(["new","replied","dismissed"]),mze=p.object({id:p.string(),tweet_id:p.string(),author_handle:p.string(),author_name:p.string(),author_followers:p.number().int().nonnegative(),text:p.string(),url:p.string().url(),tweet_created_at:p.string(),like_count:p.number().int().nonnegative(),retweet_count:p.number().int().nonnegative(),reply_count:p.number().int().nonnegative(),matched_query:p.string(),relevance_score:p.number().int().nullable(),relevance_reason:p.string().nullable(),status:fze,collected_at:p.string()}),u6t=p.object({type:p.literal("list"),list_type:p.literal("admin_tweet_lead"),objects:p.array(mze)}),c6t=p.object({status:fze}),l6t=p.object({thread_id:p.string().min(1).optional().describe("Lore thread id, e.g. th_xxx."),thread_file_id:p.string().min(1).optional().describe("Thread file id, e.g. tf_xxx."),harness:Uf.optional().describe("Harness name, e.g. claudeCode."),harness_internal_id:p.string().min(1).optional().describe("Harness-native session id.")}),d6t=p.object({thread_id:p.string().min(1),thread_file_id:p.string().min(1),event_name:p.literal("lore/thread-files.parse.requested")}),zje=p.object({token:p.string().min(1),thread_id:p.string().min(1)}),p6t=p.object({visitor:p.string().min(1).max(64).optional()}),f6t=p.object({user_id:p.string(),display_name:p.string(),shares_sent:p.number().int().nonnegative(),unique_viewers:p.number().int().nonnegative(),attributed_signups:p.number().int().nonnegative()}),m6t=p.object({window_days:p.number().int().positive(),shares_sent:p.number().int().nonnegative(),unique_viewers:p.number().int().nonnegative(),attributed_signups:p.number().int().nonnegative(),active_sharers:p.number().int().nonnegative(),k_factor:p.number().nullable(),shares_sent_sparkline:p.array(p.number().int().nonnegative()),top_sharers:p.array(f6t)}),A6t=p.object({windows:p.array(m6t)}),sH=p.object({period:p.string(),active:p.number().int().nonnegative()}),g6t=p.object({daily:p.array(sH),weekly:p.array(sH),monthly:p.array(sH),allTime:p.array(sH)}),h6t=p.object({quoted_text:p.string().min(1),comment:p.string().nullable(),type:p.enum(["comment","highlight:trapdoor"])}),_6t=ize,E6t=oze.extend({comment_thread_id:p.string().min(1)}),y6t=p.object({markdown:p.string().min(1)}),S6t=p.object({storage_url:p.string().min(1),thread_file_id:p.string().min(1),parsed_plan_block:Lje,critiqued_plan_block:Lje,annotations:p.array(h6t),comment_threads:p.array(_6t),comments:p.array(E6t)}),T6t=p.object({key:p.string().min(1),label:p.string().min(1),description:p.string().optional(),type:p.enum(["text","textarea","url","email"]),required:p.boolean(),defaultValue:p.string()}),b6t=p.object({id:p.string().min(1),name:p.string().min(1),description:p.string().min(1),deliveryTrigger:p.string().min(1),fields:p.array(T6t),availableFormats:p.array(p.enum(["html","text"]))}),I6t=p.object({templates:p.array(b6t)}),C6t=p.object({values:p.record(p.string(),p.string())}),v6t=p.object({subject:p.string().min(1),html:p.string().optional(),text:p.string().optional()}),R6t=p.object({to:p.string().email().describe("Recipient email address."),values:p.record(p.string(),p.string())}),x6t=p.object({id:p.string().min(1)}),Yx=p.enum(nte),Aze=p.object({review:p.boolean()}),qse=p.object({subject_type:p.enum(["user","organization"]),subject_id:p.string().min(1),effective_plan:Yx,admin_override:Yx.nullable(),stripe_subscription_status:p.string().nullable(),cancel_at_period_end:p.boolean(),current_period_end:p.string().nullable(),seat_quantity:p.number().int().positive(),member_count:p.number().int().nonnegative().nullable(),features:Aze}),D6t=p.object({effective_plan:Yx,features:Aze,user:qse,organization:qse.nullable(),is_billing_admin:p.boolean()}),N6t=p.object({plan:p.enum(["creator","team"]),seat_quantity:p.number().int().positive().optional()}),w6t=p.object({checkout_url:p.string().min(1)}),k6t=p.object({portal_url:p.string().min(1)}),B6t=p.object({seat_quantity:p.number().int().positive()}),Hje=p.object({plan:Yx.nullable()}),aH=p.object({subject_type:p.enum(["user","organization"]),subject_id:p.string().min(1),label:p.string().min(1),effective_plan:Yx,admin_override:Yx.nullable(),stripe_subscription_status:p.string().nullable(),seat_quantity:p.number().int().positive()}),O6t=p.object({users:p.array(aH),organizations:p.array(aH)}),$je=p.object({pool_balance_millicents:p.number().int(),period_end:p.string().nullable(),auto_recharge_enabled:p.boolean(),trigger_threshold_millicents:p.number().int().nonnegative(),topup_amount_millicents:p.number().int().positive().nullable()}),P6t=p.object({auto_recharge_enabled:p.boolean().optional(),trigger_threshold_millicents:p.number().int().nonnegative().optional(),topup_amount_millicents:p.number().int().min(2e6).nullable().optional()}),M6t=p.object({amount_millicents:p.number().int().min(2e6),idempotency_key:p.string().min(1).max(255).optional()}),L6t=p.object({pool_balance_millicents:p.number().int()}),U6t=p.object({subject_id:p.string().min(1),label:p.string(),current_balance_millicents:p.number().int(),period_start:p.string().nullable(),period_end:p.string().nullable(),granted_millicents:p.number().int().nonnegative(),used_millicents:p.number().int().nonnegative(),raw_cogs_millicents:p.number().int().nonnegative(),breakage_millicents:p.number().int().nonnegative(),overage_millicents:p.number().int().nonnegative(),utilization_pct:p.number().nullable(),margin_pct:p.number().nullable()}),Q6t=p.object({pools:p.array(U6t),rollup:p.object({team_count:p.number().int().nonnegative(),granted_millicents:p.number().int().nonnegative(),used_millicents:p.number().int().nonnegative(),raw_cogs_millicents:p.number().int().nonnegative(),breakage_millicents:p.number().int().nonnegative(),overage_millicents:p.number().int().nonnegative(),blended_margin_pct:p.number().nullable(),avg_utilization_pct:p.number().nullable()})}),F6t=p.object({id:p.string().min(1),display_name:p.string().min(1),handle:p.string().nullable(),avatar_url:p.string().nullable()}),G6t=p.object({thread_id:p.string().min(1),title:p.string().min(1),author:F6t,last_active_at:p.string().datetime(),last_block_excerpt:p.string().nullable(),last_block_kind:p.string().min(1).nullable(),is_streaming:p.boolean()}),j6t=p.object({type:p.literal("list"),list_type:p.literal("live_thread"),objects:p.array(G6t)}),z6t=p.object({thread_id:p.string().min(1)}),H6t=p.object({thread_id:p.string().min(1),last_seen_at:p.string().datetime(),started_at:p.string().datetime()}),$6t=p.object({user_id:p.string().min(1),organization_id:p.string().min(1).nullable(),last_seen_at:p.string().datetime(),started_at:p.string().datetime()}),q6t=p.object({upload_completed:p.boolean().optional().describe("When true, also bump last_upload_at \u2014 the daemon completed an upload pass.")}),V6t=p.object({last_seen_at:p.string().datetime(),last_upload_at:p.string().datetime().nullable(),started_at:p.string().datetime()}),K6t=p.object({follower_id:p.string().min(1),followee_id:p.string().min(1),is_following:p.literal(!0),follower_count:p.number().int().nonnegative()}),Y6t=p.object({follower_id:p.string().min(1),followee_id:p.string().min(1),is_following:p.literal(!1),follower_count:p.number().int().nonnegative()}),ny=p.object({id:p.string().min(1),display_name:p.string().min(1),handle:p.string().nullable(),avatar_url:p.string().nullable(),bio:p.string().max(280).nullable(),is_following:p.boolean(),is_self:p.boolean()}),qje=p.object({type:p.literal("list"),list_type:p.literal("user_follow"),objects:p.array(ny)}),J6t=ny.extend({mutuals:p.array(ny),mutual_count:p.number().int().nonnegative()}),Z6t=p.object({type:p.literal("list"),list_type:p.literal("follow_suggestion"),objects:p.array(J6t)}),W6t=ny.extend({referred_at:p.string().min(1)}),X6t=p.object({type:p.literal("list"),list_type:p.literal("referral"),count:p.number().int().nonnegative(),recent:p.array(W6t)}),eGt=p.object({date:p.string().regex(/^\d{4}-\d{2}-\d{2}$/),referred:p.number().int().nonnegative(),total:p.number().int().nonnegative()}),tGt=p.object({inviter:ny,organization_name:p.string().nullable(),referred_count:p.number().int().positive(),latest_referred_at:p.string().min(1)}),nGt=p.object({inviter:ny,referee:ny,attributed_at:p.string().min(1)}),rGt=p.object({total_referred_signups:p.number().int().nonnegative(),active_inviters:p.number().int().nonnegative(),referred_signups_last_30d:p.number().int().nonnegative(),total_signups_last_30d:p.number().int().nonnegative(),daily_counts:p.array(eGt),top_inviters:p.array(tGt),recent_attributions:p.array(nGt)}),oGt=p.object({source:p.string().min(1),signups:p.number().int().nonnegative()}),iGt=p.object({sources:p.array(oGt),total_with_source:p.number().int().nonnegative(),total_without_source:p.number().int().nonnegative()}),sGt=p.object({date:p.string().regex(/^\d{4}-\d{2}-\d{2}$/),count:p.number().int().nonnegative()}),aGt=p.object({window_start:p.string().datetime(),window_end:p.string().datetime(),total_contributions:p.number().int().nonnegative(),days_active:p.number().int().nonnegative(),daily_average:p.number().nonnegative(),current_streak_days:p.number().int().nonnegative(),days:p.array(sGt)}),uGt=p.object({type:p.literal("thread_created"),occurred_at:p.string().datetime(),id:p.string().min(1),thread:p.object({id:p.string().min(1),title:p.string(),visibility:p.enum(["private","workspace","public"])})}),cGt=p.object({type:p.literal("thread_updated"),occurred_at:p.string().datetime(),id:p.string().min(1),thread:p.object({id:p.string().min(1),title:p.string(),visibility:p.enum(["private","workspace","public"])})}),lGt=p.object({type:p.literal("comment_posted"),occurred_at:p.string().datetime(),id:p.string().min(1),comment_excerpt:p.string(),thread:p.object({id:p.string().min(1),title:p.string(),visibility:p.enum(["private","workspace","public"])})}),dGt=p.object({type:p.literal("project_published"),occurred_at:p.string().datetime(),id:p.string().min(1),project:p.object({id:p.string().min(1),name:p.string().min(1)})}),pGt=p.object({type:p.literal("user_followed"),occurred_at:p.string().datetime(),id:p.string().min(1),followee:ny}),fGt=p.discriminatedUnion("type",[uGt,cGt,lGt,dGt,pGt]),mGt=p.object({type:p.literal("list"),list_type:p.literal("user_activity"),objects:p.array(fGt)}),AGt=p.object({id:p.string().min(1),name:p.string().min(1),excerpt:p.string(),published_at:p.string().datetime(),updated_at:p.string().datetime()}),gGt=p.object({type:p.literal("list"),list_type:p.literal("profile_published_project"),objects:p.array(AGt)}),Vje=p.object({id:p.string().min(1),published_at:p.string().datetime().nullable()}),hGt=p.enum(["avatar","banner"]),gze=p.enum(["image/png","image/jpeg","image/webp","image/gif"]),_Gt=p.object({kind:hGt,content_type:gze,base64_data:p.string().min(1)}),EGt=p.object({substrate:p.enum(["s3","filesystem"]),storage_url:p.string().min(1)}),yGt=p.object({content_type:gze,base64_data:p.string().min(1)}),SGt=p.object({cover_status:Jse,cover_url:p.string().min(1),cover_url_expires_at:p.string().min(1),cover_generated_at:p.string().min(1)}),TGt=Wje,dH=uFt.router({health:{method:"GET",path:"/health",responses:{200:p.object({status:p.literal("ok")})},summary:"Health check"},getDeepHealth:{method:"GET",path:"/health/deep",responses:{200:p.object({status:p.enum(["ok","degraded"]),environment:p.string(),checks:p.object({database:p.object({ok:p.boolean(),latencyMs:p.number().int().nonnegative().optional(),error:p.string().optional()}),migrations:p.object({ok:p.boolean(),appliedCount:p.number().int().nonnegative(),pendingCount:p.number().int().nonnegative(),latestApplied:p.string().optional(),pending:p.array(p.string())}),storage:p.object({ok:p.boolean(),bucket:p.string().optional(),error:p.string().optional()})})}),503:p.object({status:p.literal("down"),environment:p.string(),error:p.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:p.object({authorization:p.string().min(1).optional(),"x-lore-referral-token":p.string().min(1).max(16).optional(),"x-lore-invited-by-user-id":p.string().min(1).max(40).optional(),"user-agent":p.string().min(1).max(1024).optional()}),responses:{200:AFt,401:z,500:z,502:z},summary:"Validate a WorkOS Bearer token and return member plus user fields"},getCliAuthConfig:{method:"GET",path:"/cli-auth/config",responses:{200:Mje,503:z},summary:"Return public WorkOS CLI Auth configuration for the Lore CLI"},getDesktopAuthConfig:{method:"GET",path:"/desktop-auth/config",responses:{200:Mje,503:z},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:p.object({authorization:p.string().min(1).optional()}),responses:{200:o4t,401:z},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:p.object({authorization:p.string().min(1).optional()}),body:z6t,responses:{200:H6t,401:z,403:z,404:z,422:z},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:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:$6t,401:z},summary:"Record (or refresh) an authenticated Lore web-app presence heartbeat for the current user. Browser clients call this while the product is open."},recordCliHeartbeat:{method:"POST",path:"/users/me/cli-heartbeat",headers:p.object({authorization:p.string().min(1).optional()}),body:q6t,responses:{200:V6t,401:z},summary:"Record a liveness heartbeat for the authenticated user's CLI watch daemon. Idempotent; the daemon calls this ~every 60s and on each completed upload (upload_completed:true). Daemon-internal \u2014 not a `lore` subcommand."},listLiveThreads:{method:"GET",path:"/threads/live",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:j6t,401:z,403:z},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:p.object({authorization:p.string().min(1).optional()}),query:g3t,responses:{200:Qje,401:z},summary:"List threads visible to the authenticated user"},createThread:{method:"POST",path:"/threads",headers:p.object({authorization:p.string().min(1).optional()}),body:n3t,responses:{201:r3t,401:z},summary:"Create an empty Lore-native thread for the authenticated user"},getThread:{method:"GET",path:"/threads/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:qO,404:z},summary:"Load a visible thread by id"},getSimilarThreads:{method:"GET",path:"/threads/:id/similar",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:Qje,404:z,409:z},summary:"List the top 20 visible threads with the closest summary embedding"},resolveThreadShareHighlight:{method:"POST",path:"/threads/:id/share-highlight",pathParams:p.object({id:p.string().min(1).describe("Thread id to share")}),headers:p.object({authorization:p.string().min(1).optional()}),body:e3t,responses:{200:t3t,401:z,404:z,409:z},summary:"Resolve a natural-language share highlight to a canonical /thread URL with block anchors"},askThreads:{method:"POST",path:"/threads/ask",headers:p.object({authorization:p.string().min(1).optional()}),body:L4t,responses:{200:G4t,401:z},summary:"Answer a question from the top 20 visible decision matches, grouped back into threads"},forkThread:{method:"POST",path:"/threads/:id/fork",pathParams:p.object({id:p.string().min(1).describe("Thread id or stable harness lookup id to fork")}),headers:p.object({authorization:p.string().min(1).optional()}),body:P4t,responses:{200:M4t,403:z,404:z},summary:"Generate a distilled source handoff for continuing a visible coding-assistant session"},listThreadBlocks:{method:"GET",path:"/threads/:id/blocks",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),query:A3t,responses:{200:Yse,401:z},summary:"List blocks for a visible thread"},createThreadBlockCommentThread:{method:"POST",path:"/threads/:threadId/blocks/:blockId/comment-threads",pathParams:p.object({threadId:p.string().min(1),blockId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:MFt,responses:{201:LFt,401:z,404:z},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:p.object({threadId:p.string().min(1),blockId:p.string().min(1),commentThreadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:FFt,responses:{201:GFt,401:z,404:z,409:z},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:p.object({threadId:p.string().min(1),blockId:p.string().min(1),commentThreadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:HFt,responses:{200:$Ft,401:z,404:z},summary:"Resolve or reopen a block-level comment thread on a visible thread block"},listSkills:{method:"GET",path:"/skills",headers:p.object({authorization:p.string().min(1).optional()}),query:_3t,responses:{200:E3t,401:z},summary:"List visible workspace skills"},reconcileLocalSkills:{method:"GET",path:"/skills/reconcile-local",headers:p.object({authorization:p.string().min(1).optional()}),query:y3t,responses:{200:T3t,401:z},summary:"Reconcile scanned local skills with visible server-side skills by ID or content hash"},getSkillDetail:{method:"GET",path:"/skills/:id",pathParams:p.object({id:p.string().min(1).describe("Stable skill ID, e.g. sk_...")}),query:p.object({include_unpublished:p.coerce.boolean().optional().describe("Allow the owner to load a soft-unpublished skill for republishing.")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:Fje,401:z,404:z},summary:"Get visible skill details by stable skill ID"},getSharedSkill:{method:"GET",path:"/skills/share/:token",pathParams:p.object({token:p.string().min(1).describe("Public share slug from a /skills/s/:token link.")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:v3t,404:z},summary:"Public no-login preview of a skill shared by link (install requires auth)"},setSkillVisibility:{method:"PATCH",path:"/skills/:id/visibility",pathParams:p.object({id:p.string().min(1).describe("Stable skill ID, e.g. sk_...")}),headers:p.object({authorization:p.string().min(1).optional()}),body:C3t,responses:{200:Fje,401:z,403:z,404:z},summary:"Set a skill's visibility (owner only); minting a share link when set to public"},listArtifacts:{method:"GET",path:"/artifacts",headers:p.object({authorization:p.string().min(1).optional()}),query:N3t,responses:{200:w3t,401:z},summary:"List visible artifacts (files produced by Cowork or native threads)"},getArtifactDetail:{method:"GET",path:"/artifacts/:id",pathParams:p.object({id:p.string().min(1).describe("Stable artifact ID, e.g. art_...")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:k3t,401:z,404:z},summary:"Get a visible artifact with a presigned download URL"},presignBackfillArtifacts:{method:"POST",path:"/artifacts/backfill/presign",headers:p.object({authorization:p.string().min(1).optional()}),body:O3t,responses:{200:P3t,401:z,404:z},summary:"Presign artifact-byte uploads for an existing session thread (backfill)"},commitBackfillArtifacts:{method:"POST",path:"/artifacts/backfill/commit",headers:p.object({authorization:p.string().min(1).optional()}),body:M3t,responses:{200:L3t,401:z,404:z},summary:"Promote backfilled artifact bytes into artifact rows"},getSkillRaw:{method:"GET",path:"/skills/:id/raw",pathParams:p.object({id:p.string().min(1).describe("Stable skill ID, e.g. sk_...")}),query:p.object({version:p.coerce.number().int().positive().optional().describe("Version timestamp to download. Defaults to latest accepted version.")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:p.string(),401:z,403:z,404:z},summary:"Raw SKILL.md body for a skill (download / install path)"},installSkill:{method:"POST",path:"/skills/:id/installations",pathParams:p.object({id:p.string().min(1).describe("Workspace skill ID to install")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:Q3t,401:z,403:z,404:z},summary:"Register the current user as an installer of a visible skill"},uninstallSkill:{method:"DELETE",path:"/skills/:id/installation",pathParams:p.object({id:p.string().min(1).describe("Workspace skill ID to uninstall")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:Gje,401:z},summary:"Unregister the current user installation for a skill (idempotent)"},unpublishSkill:{method:"DELETE",path:"/skills/:id",pathParams:p.object({id:p.string().min(1).describe("Workspace skill ID to unpublish")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:G3t,401:z,403:z,404:z},summary:"Unpublish an owned workspace skill and remove it from the team catalog"},updateSkillInstallation:{method:"PATCH",path:"/skills/installations/:id",pathParams:p.object({id:p.string().min(1).describe("Stable skill installation ID, e.g. ski_...")}),headers:p.object({authorization:p.string().min(1).optional()}),body:F3t,responses:{200:Gje,401:z,404:z,422:z},summary:"Record the accepted skill version installed by the current user"},listSkillInstallationSync:{method:"GET",path:"/skills/installations/sync",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:H3t,401:z},summary:"List installed skills with latest accepted version metadata"},approveSkillVersion:{method:"POST",path:"/skills/:id/versions/:version/approve",pathParams:p.object({id:p.string().min(1).describe("Workspace skill ID"),version:p.coerce.number().int().positive().describe("Proposed version timestamp to approve")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:jje,400:z,401:z,403:z,404:z},summary:"Approve a proposed skill version and make it latest accepted"},rejectSkillVersion:{method:"POST",path:"/skills/:id/versions/:version/reject",pathParams:p.object({id:p.string().min(1).describe("Workspace skill ID"),version:p.coerce.number().int().positive().describe("Proposed version timestamp to reject")}),headers:p.object({authorization:p.string().min(1).optional()}),body:j3t.optional(),responses:{200:jje,400:z,401:z,403:z,404:z},summary:"Reject a proposed skill version with an optional owner reason"},redactThreadBlock:{method:"POST",path:"/threads/:threadId/blocks/:blockId/redactions",pathParams:p.object({threadId:p.string().min(1),blockId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:h3t,responses:{200:$O,401:z,403:z,404:z,422:z},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:p.object({threadId:p.string().min(1),blockId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:$3t,responses:{200:$O,401:z,403:z,404:z,422:z},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:p.object({threadId:p.string().min(1),blockId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:$O,401:z,403:z,404:z,409:z,422:z},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:p.object({threadId:p.string().min(1),blockId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:K3t,401:z,404:z},summary:"List edits made to a thread block (visible to anyone who can see the thread)"},listThreadDecisions:{method:"GET",path:"/threads/:id/decisions",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:O4t,401:z,404:z},summary:"List AI-extracted user decisions for a thread, in chronological order"},updateThread:{method:"PATCH",path:"/threads/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:o3t,responses:{200:qO,401:z,403:z,404:z},summary:"Update thread visibility (author only)"},deleteThread:{method:"DELETE",path:"/threads/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.null(),401:z,403:z,404:z},summary:"Soft-delete a thread (author only)"},generateThreadCard:{method:"POST",path:"/threads/:id/card/generate",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:p.object({cover_status:Jse,how_to_status:aze}),401:z,403:z,404:z,429:z.extend({retry_after_seconds:p.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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:yGt,responses:{200:SGt,401:z,403:z,404:z,413:z,422:z},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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:m4t,responses:{200:Uje,401:z,403:z,404:z,422:z},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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:Uje,401:z,404:z},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:p.object({threadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:g4t,403:z,404:z},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:p.object({threadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:h4t,responses:{201:_4t,401:z,403:z,404:z,422:z},summary:"Post a top-level or reply comment on a public thread."},updateThreadComment:{method:"PATCH",path:"/threads/:threadId/comments/:commentId",pathParams:p.object({threadId:p.string().min(1),commentId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:E4t,responses:{200:y4t,401:z,403:z,404:z,422:z},summary:"Edit your own thread comment (author only; rejects edits to soft-deleted rows)."},deleteThreadComment:{method:"DELETE",path:"/threads/:threadId/comments/:commentId",pathParams:p.object({threadId:p.string().min(1),commentId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:S4t,401:z,403:z,404:z},summary:"Soft-delete your own thread comment (author only). Idempotent."},getThreadPreview:{method:"GET",path:"/threads/:id/preview",pathParams:p.object({id:p.string().min(1)}),responses:{200:i3t,404:z},summary:"Unauthenticated, visibility-redacted metadata for OG / social preview consumers"},getUser:{method:"GET",path:"/users/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:Wje,404:z},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:p.object({authorization:p.string().min(1).optional()}),body:gFt,responses:{200:Zje,401:z,409:z,422:z},summary:"Update the authenticated user profile"},getUserByHandle:{method:"GET",path:"/users/by-handle/:handle",pathParams:p.object({handle:Yje}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:TGt,404:z},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:p.object({authorization:p.string().min(1)}),responses:{200:X6t,401:z},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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),query:p.object({limit:p.coerce.number().int().positive().max(100).optional()}),responses:{200:mGt,404:z},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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:aGt,404:z},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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:qje,404:z},summary:"List the users following a given user."},listUserFollowing:{method:"GET",path:"/users/:id/following",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:qje,404:z},summary:"List the users a given user is following."},listFollowSuggestions:{method:"GET",path:"/users/:id/follow-suggestions",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:Z6t,404:z},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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:K6t,401:z,404:z,409:z,422:z},summary:"Follow another user. Idempotent \u2014 repeating the call is a no-op."},unfollowUser:{method:"DELETE",path:"/users/:id/follow",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:Y6t,401:z,404:z},summary:"Unfollow a user. Idempotent \u2014 repeating the call is a no-op."},listProfilePublishedProjects:{method:"GET",path:"/users/:id/projects",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:gGt,404:z},summary:"Projects the user has published to their public profile."},publishProject:{method:"POST",path:"/projects/:id/publish",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:Vje,401:z,403:z,404:z},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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:Vje,401:z,403:z,404:z},summary:"Remove a project from the author's public profile."},uploadProfileImage:{method:"POST",path:"/users/me/profile-image",headers:p.object({authorization:p.string().min(1).optional()}),body:_Gt,responses:{200:EGt,401:z,413:z,422:z},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:p.object({authorization:p.string().min(1).optional()}),responses:{200:_Ft,401:z},summary:"List members of the authenticated user\u2019s organization"},createOrganizationInvite:{method:"POST",path:"/organization/invites",headers:p.object({authorization:p.string().min(1).optional()}),body:EFt,responses:{201:yFt,401:z,403:z,409:z,422:z},summary:"Invite a teammate to the authenticated user\u2019s workspace via WorkOS AuthKit"},ensureWorkOSOrganization:{method:"POST",path:"/organization/workos/ensure",headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:SFt,401:z,422:z,503:z},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:p.object({authorization:p.string().min(1).optional()}),responses:{200:t4t,401:z,403:z},summary:"List repositories known to the authenticated user\u2019s organization across threads and building blocks"},createBuildingBlockSnapshots:{method:"POST",path:"/building_blocks",headers:p.object({authorization:p.string().min(1).optional()}),body:DFt,responses:{201:JFt,401:z,403:z},summary:"Create building block snapshots for the authenticated user\u2019s organization"},getPlan:{method:"GET",path:"/plans/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:VFt,401:z,403:z,404:z},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:p.object({id:p.string().min(1),revisionId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:qFt,401:z,403:z,404:z},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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:OFt,responses:{201:PFt,401:z,403:z,404:z,422:z},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:p.object({id:p.string().min(1),threadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:UFt,responses:{201:QFt,401:z,403:z,404:z,409:z},summary:"Reply to an inline comment thread on a thread-backed plan container"},updatePlanCommentThread:{method:"PATCH",path:"/plans/:id/comment-threads/:threadId",pathParams:p.object({id:p.string().min(1),threadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:jFt,responses:{200:zFt,401:z,403:z,404:z},summary:"Resolve or reopen an inline comment thread on a thread-backed plan container"},listPlans:{method:"GET",path:"/plans",headers:p.object({authorization:p.string().min(1).optional()}),query:YFt,responses:{200:KFt,401:z,403:z},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:p.object({authorization:p.string().min(1).optional()}),query:WFt,responses:{200:ZFt,401:z,403:z},summary:"List building block snapshots for the authenticated user\u2019s organization and repo origin path"},listUploadSessions:{method:"GET",path:"/upload_sessions",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:m3t,401:z},summary:"List recent upload sessions for the authenticated user"},listUploadApiKeys:{method:"GET",path:"/upload_api_keys",headers:p.object({authorization:p.string().min(1).optional()}),query:q4t,responses:{200:z4t,401:z,403:z},summary:"List Upload API keys owned by the authenticated user in a workspace"},createUploadApiKey:{method:"POST",path:"/upload_api_keys",headers:p.object({authorization:p.string().min(1).optional()}),body:H4t,responses:{201:$4t,400:z,401:z,403:z},summary:"Create an Upload API key and return the raw key exactly once"},revokeUploadApiKey:{method:"POST",path:"/upload_api_keys/:id/revoke",pathParams:p.object({id:p.string().min(1).describe("Upload API key id")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:Wse,401:z,403:z,404:z},summary:"Revoke an Upload API key owned by the authenticated user"},createUploadSession:{method:"POST",path:"/upload_sessions",headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({thread_files:p.array(l4t).optional(),skill_files:p.array(c4t).optional(),upload_metadata:Zse.optional()}),responses:{201:X4t,400:z,401:z},summary:"Create an upload session with presigned URLs for file uploads"},completeUploadSession:{method:"POST",path:"/upload_sessions/:id/complete",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({thread_files:p.array(V4t).optional(),skill_files:p.array(K4t).optional()}),responses:{200:J4t,400:z,401:z,403:z,404:z,409:z,422:z},summary:"Complete an upload session after files have been uploaded to storage"},adminStats:{method:"GET",path:"/admin/stats",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:Y3t,401:z,403:z},summary:"Cross-org operational counts. Tanagram admins only."},adminListOrganizations:{method:"GET",path:"/admin/organizations",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:Z3t,401:z,403:z},summary:"List every organization with member and thread counts. Tanagram admins only."},adminListUsers:{method:"GET",path:"/admin/users",query:X3t,headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:r6t,401:z,403:z},summary:"List every user with their org memberships and thread count. Tanagram admins only."},adminListThreads:{method:"GET",path:"/admin/threads",headers:p.object({authorization:p.string().min(1).optional()}),query:a6t,responses:{200:s6t,401:z,403:z},summary:"List live threads across every organization. Tanagram admins only."},adminListTweetLeads:{method:"GET",path:"/admin/tweet-leads",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:u6t,401:z,403:z},summary:"List unreplied tweet leads from the last 24h, ranked by relevance. Tanagram admins only."},adminUpdateTweetLead:{method:"PATCH",path:"/admin/tweet-leads/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:c6t,responses:{200:mze,401:z,403:z,404:z},summary:"Update a tweet lead status (replied/dismissed/new). Tanagram admins only."},adminLookupThread:{method:"GET",path:"/admin/threads/lookup",headers:p.object({authorization:p.string().min(1).optional()}),query:l6t,responses:{200:i6t,400:z,401:z,403:z,404:z},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:p.object({authorization:p.string().min(1).optional()}),body:e6t,responses:{200:t6t,401:z,403:z,404:z,422:z},summary:"Force follower->followee edge. Admin-only and non-destructive."},adminHardDeleteThread:{method:"DELETE",path:"/admin/threads/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.null(),401:z,403:z,404:z},summary:"Permanently remove a thread. Tanagram admins only."},adminDeleteSkill:{method:"DELETE",path:"/admin/skills/:id",pathParams:p.object({id:p.string().min(1).describe("Workspace skill ID, e.g. sk_...")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:n6t,401:z,403:z,404:z},summary:"Permanently remove a skill and its sync records. Tanagram admins only."},adminReparseThreadFile:{method:"POST",path:"/admin/thread-files/:id/reparse",pathParams:p.object({id:p.string().min(1).describe("Thread file id, e.g. tf_xxx.")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:d6t,401:z,403:z,404:z},summary:"Re-enqueue parsing for a thread file. Tanagram admins only."},listCardFeed:{method:"GET",path:"/cards/feed",query:p.object({limit:p.coerce.number().int().min(1).max(48).optional()}),responses:{200:w4t},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:p.object({authorization:p.string().min(1).optional()}),query:d3t,responses:{200:l3t},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:p3t},summary:"Unauthenticated rollup of public-thread counts for the Discover header."},createWaitlistEntry:{method:"POST",path:"/waitlist_entries",body:TFt,responses:{201:CFt,409:z},summary:"Create an unauthenticated waitlist entry keyed by (location, contact)."},submitContactMessage:{method:"POST",path:"/contact",body:bFt,responses:{200:IFt,429:z,503:z},summary:"Submit a contact-form message from the marketing site; emails the Lore team."},createFeedback:{method:"POST",path:"/feedback",headers:p.object({authorization:p.string().min(1).optional()}),body:vFt,responses:{201:RFt,401:z,422:z,429:z},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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{201:zje,401:z,403:z,404:z,409:z},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:p.object({token:p.string().min(1).max(16)}),headers:p.object({authorization:p.string().min(1).optional()}),query:p6t,responses:{200:zje,404:z},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:p.object({authorization:p.string().min(1).optional()}),responses:{200:A6t,401:z,403:z},summary:"Share-link k-factor, funnel, sparkline, and top sharers by window. Tanagram admins only."},adminActiveUsers:{method:"GET",path:"/admin/active-users",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:g6t,401:z,403:z},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:p.object({authorization:p.string().min(1).optional()}),responses:{200:rGt,401:z,403:z},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:p.object({authorization:p.string().min(1).optional()}),responses:{200:iGt,401:z,403:z},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:p.object({authorization:p.string().min(1).optional()}),body:y6t,responses:{200:S6t,401:z,403:z,409:z},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:p.object({authorization:p.string().min(1).optional()}),responses:{200:I6t,401:z,403:z},summary:"List transactional email templates and their editable preview fields. Tanagram admins only."},adminPreviewEmailTemplate:{method:"POST",path:"/admin/email-templates/:id/preview",pathParams:p.object({id:p.string().min(1).describe("Email template id.")}),headers:p.object({authorization:p.string().min(1).optional()}),body:C6t,responses:{200:v6t,400:z,401:z,403:z,404:z},summary:"Render a transactional email template with supplied values. Tanagram admins only."},adminSendEmailTemplate:{method:"POST",path:"/admin/email-templates/:id/send",pathParams:p.object({id:p.string().min(1).describe("Email template id.")}),headers:p.object({authorization:p.string().min(1).optional()}),body:R6t,responses:{200:x6t,400:z,401:z,403:z,404:z,503:z},summary:"Send a transactional email template through Resend. Tanagram admins only."},getBillingState:{method:"GET",path:"/billing/state",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:D6t,401:z},summary:"Resolve the caller's plan, features, seat count, and any admin override."},createBillingCheckout:{method:"POST",path:"/billing/checkout",headers:p.object({authorization:p.string().min(1).optional()}),body:N6t,responses:{200:w6t,400:z,401:z,403:z,503:z},summary:"Start a Stripe Checkout session for Creator ($29/mo) or Team ($19/seat/mo, min 2)."},createBillingPortal:{method:"POST",path:"/billing/portal",headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({subject_type:p.enum(["user","organization"]).default("user")}).optional(),responses:{200:k6t,401:z,404:z,503:z},summary:"Open the Stripe customer portal so the subject can manage their subscription."},updateTeamSeats:{method:"PATCH",path:"/billing/team-seats",headers:p.object({authorization:p.string().min(1).optional()}),body:B6t,responses:{200:qse,400:z,401:z,403:z,404:z,503:z},summary:"Adjust the caller-organization's Team seat quantity (admin of that org only)."},getCreditSettings:{method:"GET",path:"/billing/credits/settings",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:$je,400:z,401:z,403:z,503:z},summary:"Get the caller-organization's credit pool balance + auto-recharge settings."},updateCreditSettings:{method:"PUT",path:"/billing/credits/settings",headers:p.object({authorization:p.string().min(1).optional()}),body:P6t,responses:{200:$je,400:z,401:z,403:z,503:z},summary:"Update the caller-organization's auto-recharge settings (billing admin only)."},createCreditTopUp:{method:"POST",path:"/billing/credits/topup",headers:p.object({authorization:p.string().min(1).optional()}),body:M6t,responses:{200:L6t,400:z,401:z,403:z,503:z},summary:"Manually top up the caller-organization's credit pool by charging the saved card."},adminListBilling:{method:"GET",path:"/admin/billing",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:O6t,401:z,403:z},summary:"List every user and org with current plan + override for the admin panel."},adminListCreditPools:{method:"GET",path:"/admin/billing/credits",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:Q6t,401:z,403:z},summary:"Per-team credit-pool utilization, blended margin, breakage, and overage."},adminSetUserPlanOverride:{method:"PUT",path:"/admin/billing/users/:id/override",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:Hje,responses:{200:aH,401:z,403:z,404:z},summary:"Admin override for a user's plan tier. Null clears the override."},adminSetOrganizationPlanOverride:{method:"PUT",path:"/admin/billing/organizations/:id/override",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:Hje,responses:{200:aH,401:z,403:z,404:z},summary:"Admin override for an organization's plan tier. Null clears the override."},projects:xje,regions:kje,entities:Tje,docs:_je,mentions:vje,favorites:Cje,search:Oje},{pathPrefix:"/api"})});import{AsyncLocalStorage as bGt}from"node:async_hooks";import lh from"node:fs/promises";import _ze from"node:path";function RGt(e){return _ze.join(e,"tokens-refresh.lock")}async function KO(e,t,n={}){let r=hze.getStore();if(r?.has(e))return t();let o=n.waitMs??IGt,i=n.staleMs??CGt,s=n.now??Date.now,u=n.sleep??(v=>new Promise(R=>setTimeout(R,v))),l=RGt(e),f=_ze.join(l,"owner"),h=`${process.pid}:${Date.now()}:${Math.random().toString(36).slice(2)}`,_=s(),E=!1;for(;!E;)try{await lh.mkdir(e,{recursive:!0,mode:448}),await lh.chmod(e,448).catch(()=>{}),await lh.mkdir(l,{mode:448});try{await lh.writeFile(f,h,{mode:384})}catch(v){throw await lh.rm(l,{recursive:!0,force:!0}),v}E=!0}catch(v){if(!xGt(v))throw v;if(await DGt(l,i,s)){await lh.rm(l,{recursive:!0,force:!0});continue}if(s()-_>=o)throw new Error(`Timed out waiting for OAuth token refresh lock at ${l}`);await u(Math.min(vGt,o))}let T=new Set(r??[]);T.add(e);try{return await hze.run(T,t)}finally{await NGt(l,f,h)}}function Eze(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function xGt(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="EEXIST"}async function DGt(e,t,n){try{let r=await lh.stat(e);return n()-r.mtimeMs>=t}catch(r){if(Eze(r))return!1;throw r}}async function NGt(e,t,n){try{if(await lh.readFile(t,"utf8")!==n)return}catch(r){if(!Eze(r))throw r}await lh.rm(e,{recursive:!0,force:!0})}var hze,IGt,CGt,vGt,O$n,P$n,M$n,L$n,U$n,Q$n,pH,Xse=k(()=>{"use strict";m();pc();hze=new bGt,IGt=3e4,CGt=6e4,vGt=100,O$n=process.env.LORE_PLUGIN_AUTHKIT_CLIENT_ID?.trim()||process.env.PLUGIN_AUTHKIT_CLIENT_ID?.trim()||"client_01KRSDB9SR20N7MB0D9MPS05Q6",P$n=process.env.LORE_CLI_AUTHKIT_CLIENT_ID?.trim()||process.env.CLI_AUTHKIT_CLIENT_ID?.trim()||"client_01KV6K8BBANC2J3998K4DG9840",M$n=p.object({resource:p.string(),endpoints:p.object({audience:p.string(),deviceAuthorizationEndpoint:p.string(),tokenEndpoint:p.string(),authorizationEndpoint:p.string()}),fetchedAt:p.number(),prmEtag:p.string().optional()}),L$n=p.object({resource:p.string().min(1,"`resource` must be a non-empty string"),authorization_servers:p.array(p.string())}),U$n=p.object({issuer:p.string().min(1,"`issuer` must be a non-empty string"),token_endpoint:p.string().min(1,"`token_endpoint` must be a non-empty string"),authorization_endpoint:p.string().optional()}),Q$n=p.object({access_token:p.string().min(1),refresh_token:p.string().min(1),expires_in:p.number().int().positive(),token_type:p.string().min(1),scope:p.string().optional()}),pH=class extends Error{constructor(){super("OAuth refresh token is invalid or expired"),this.name="OAuthInvalidGrantError"}}});import yp from"node:fs";import wGt from"node:path";function eae(e){return wGt.join(e,"tokens.json")}function kGt(e){return`${e}.tmp.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}`}function Tze(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function BGt(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=Sze.safeParse(n);if(!o.success)throw new Error(`tokens file at ${t} failed schema validation: ${o.error.message}`);return o.data}let r=fH.safeParse(n);if(!r.success)throw new Error(`tokens file at ${t} failed schema validation: ${r.error.message}`);return MGt(r.data)}function OGt(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 PGt(e){let t=OGt(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 MGt(e){let t={};return PGt(e)&&(t.plugin=e),{version:2,clients:t}}function LGt(e){return JSON.stringify(Sze.parse(e))}function tae(e){let t=eae(e),n;try{n=yp.readFileSync(t,"utf8")}catch(r){if(Tze(r))return null;throw r}return BGt(n,t)}function bze(e,t){let n=eae(e);yp.mkdirSync(e,{recursive:!0,mode:448}),yp.chmodSync(e,448);let r=kGt(n),o=LGt(t),i;try{i=yp.openSync(r,"w",384),yp.writeSync(i,o),yp.fchmodSync(i,384),yp.fsyncSync(i),yp.closeSync(i),i=void 0,yp.renameSync(r,n)}catch(s){if(i!==void 0)try{yp.closeSync(i)}catch{}try{yp.unlinkSync(r)}catch{}throw s}}function Zx(e,t){return tae(e)?.clients[t]??null}function UGt(e){try{return tae(e)??{version:2,clients:{}}}catch{return{version:2,clients:{}}}}function yze(e){try{yp.rmSync(eae(e))}catch(t){if(!Tze(t))throw t}}function mH(e,t,n){let r=UGt(e);r.clients[t]=fH.parse(n),bze(e,r)}function nae(e,t){let n;try{n=tae(e)}catch{yze(e);return}if(!(!n||!(t in n.clients))){if(delete n.clients[t],Object.keys(n.clients).length===0){yze(e);return}bze(e,n)}}var fH,Sze,rae=k(()=>{"use strict";m();pc();Xse();fH=p.object({access_token:p.string(),refresh_token:p.string(),expires_at:p.number().int(),scope:p.string().default("")}),Sze=p.object({version:p.literal(2),clients:p.record(p.string(),fH).default({})})});import QGt from"node:fs";import Cze from"node:os";import vze from"node:path";function FGt(e=Cze.homedir()){return vze.join(e,"Library","Application Support","tanagram","lore","tokens.json")}function Rze(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 Ize(e){try{QGt.rmSync(e)}catch(t){if(!(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ENOENT"))throw t}}function AH(e,t=Cze.homedir()){for(let n of GGt)Ize(vze.join(e,n));Ize(FGt(t))}var GGt,xze=k(()=>{"use strict";m();rae();GGt=["token","refresh_token"]});var YO=k(()=>{"use strict";m();rae();xze();Xse()});import UT from"node:fs";import Wx from"node:path";function gH(e){return e.toISOString().slice(0,10)}function Dze(e){let t=Wx.basename(e);return t.endsWith(".log.txt")?t.slice(0,-8):t.replace(/\.txt$/,"")}function HGt(e,t){let n=Wx.dirname(e),r=Dze(e),o=Wx.join(n,`${r}.${t}.txt`);for(let i=1;UT.existsSync(o);i++)o=Wx.join(n,`${r}.${t}.${i}.txt`);return o}function $Gt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function qGt(e,t){let n=new Date(e.getTime());return n.setUTCDate(n.getUTCDate()-t),gH(n)}function VGt(e,t,n){let r=Wx.dirname(e),o=Dze(e),i=new RegExp(`^${$Gt(o)}\\.(\\d{4}-\\d{2}-\\d{2})(?:\\.\\d+)?\\.txt$`),s=qGt(t,n),u;try{u=UT.readdirSync(r)}catch{return}for(let l of u){let f=i.exec(l);if(!(!f||f[1]>=s))try{UT.rmSync(Wx.join(r,l),{force:!0})}catch{}}}function hH(e,t,n){let r=Buffer.byteLength(t);n.rotateIfNeeded(e,r),UT.appendFileSync(e,t),n.recordWrite(r)}var jGt,zGt,Xx,oae=k(()=>{"use strict";m();jGt=50*1024*1024,zGt=30;Xx=class{liveFile=null;liveLogBytes=null;currentPeriod=null;maxBytes;retentionDays;now;constructor(t={}){this.maxBytes=t.maxBytes??jGt,this.retentionDays=t.retentionDays??zGt,this.now=t.now??(()=>new Date)}rotateIfNeeded(t,n){if(this.liveFile!==t&&(this.liveFile=t,this.liveLogBytes=null,this.currentPeriod=null),this.currentPeriod===null)try{let u=UT.statSync(t);this.liveLogBytes=u.size,this.currentPeriod=gH(u.mtime)}catch{this.liveLogBytes=0,this.currentPeriod=gH(this.now())}let r=this.now(),o=gH(r),i=this.currentPeriod!==o,s=(this.liveLogBytes??0)+n>this.maxBytes;if((i||s)&&(this.liveLogBytes??0)>0)try{UT.renameSync(t,HGt(t,this.currentPeriod??o)),VGt(t,r,this.retentionDays),this.liveLogBytes=0,this.currentPeriod=o;return}catch{try{this.liveLogBytes=UT.statSync(t).size}catch{this.liveLogBytes=0}return}this.currentPeriod=o}recordWrite(t){this.liveLogBytes=(this.liveLogBytes??0)+t}}});import{execFileSync as KGt}from"node:child_process";import{createHash as YGt}from"node:crypto";import JO from"node:os";import Ps from"node:path";function Xn(){if(Hr()==="dev"){let t=process.env.LORE_DEV_STATE_DIR?.trim();if(t)return Ps.resolve(t.replace(/^~(?=$|\/)/,JO.homedir()));let n=JGt();if(n)return Ps.join(JO.homedir(),`.lore-dev-${n}`)}let e=Hr()==="dev"?".lore-dev":".lore";return Ps.join(JO.homedir(),e)}function JGt(){let e=Nze(process.env.LORE_DEV_STACK_NAME??"");if(e)return e;let t=ZGt();return[Nze(t.split(/[\\/]/).pop()||"lore"),WGt(t)].filter(Boolean).join("-").slice(0,63)}function ZGt(){try{return KGt("git",["rev-parse","--show-toplevel"],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch{return Ps.resolve(process.cwd(),"../..")}}function WGt(e){return YGt("sha1").update(e).digest("hex").slice(0,8)}function Nze(e){return e.toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,63)}function Sp(){return Ps.join(Xn(),XGt())}function XGt(){return process.env.LORE_LOG_FILE_NAME?.trim()||"cli.log.txt"}function ZO(){return Ps.join(Xn(),"upload.log.txt")}function wze(){return Ps.join(Xn(),"upload-daemon.lock")}function iae(){return Ps.join(Xn(),"sync_state.json")}function sae(){return Ps.join(Xn(),"upload_queue_state.json")}function QT(){return Ps.join(Xn(),"upload_filters.json")}function _H(){return Ps.join(Xn(),"upload_dirs.json")}function WO(){return Ps.join(Xn(),"status.json")}function eD(){return Ps.join(Xn(),"daemon_status.json")}function tD(){return Ps.join(Xn(),"quarantine")}function FT(){return Ps.join(Xn(),"install_source.json")}function dh(){return Ps.join(Xn(),"skill_sync_state.json")}function GT(){return Ps.join(Xn(),"bin","lore")}function ry(){let e=Hr();return e==="prod"?"ai.tanagram.lore":`ai.tanagram.lore.${e}`}function aae(){return`${ry()}.skill-sync`}function nD(){return Ps.join(JO.homedir(),"Library","LaunchAgents",`${ry()}.plist`)}function uae(){return Ps.join(JO.homedir(),"Library","LaunchAgents",`${aae()}.plist`)}var Lr=k(()=>{"use strict";m();sc()});import Oze from"node:fs";function tjt(){let e=Xn();kze!==e&&(Oze.mkdirSync(e,{recursive:!0}),kze=e)}function njt(e){let t=typeof e=="string"?e:JSON.stringify(e);return/[\s"=]/.test(t)?JSON.stringify(t):t}function rjt(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 u=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(u.cycle){i(s);continue}if(u.count>1&&e.reused==="ref"){i(s);continue}}}function ty(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=u=>{let l=e.seen.get(u);if(l.ref===null)return;let f=l.def??l.schema,h={...f},_=l.ref;if(l.ref=null,_){r(_);let T=e.seen.get(_),v=T.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),u._zod.parent===_)for(let x in f)x==="$ref"||x==="allOf"||x in h||delete f[x];if(v.$ref&&T.def)for(let x in f)x==="$ref"||x==="allOf"||x in T.def&&JSON.stringify(f[x])===JSON.stringify(T.def[x])&&delete f[x]}let E=u._zod.parent;if(E&&E!==_){r(E);let T=e.seen.get(E);if(T?.schema.$ref&&(f.$ref=T.schema.$ref,T.def))for(let v in f)v==="$ref"||v==="allOf"||v in T.def&&JSON.stringify(f[v])===JSON.stringify(T.def[v])&&delete f[v]}e.override({zodSchema:u,jsonSchema:f,path:l.path??[]})};for(let u of[...e.seen.entries()].reverse())r(u[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 u=e.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(u)}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 u of e.seen.entries()){let l=u[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 u=JSON.parse(JSON.stringify(o));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ux(t,"input",e.processors),output:Ux(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function dc(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 dc(r.element,n);if(r.type==="set")return dc(r.valueType,n);if(r.type==="lazy")return dc(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 dc(r.innerType,n);if(r.type==="intersection")return dc(r.left,n)||dc(r.right,n);if(r.type==="record"||r.type==="map")return dc(r.keyType,n)||dc(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:dc(r.in,n)||dc(r.out,n);if(r.type==="object"){for(let o in r.shape)if(dc(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(let o of r.options)if(dc(o,n))return!0;return!1}if(r.type==="tuple"){for(let o of r.items)if(dc(o,n))return!0;return!!(r.rest&&dc(r.rest,n))}return!1}var Boe,Ux,vO=k(()=>{m();bO();Boe=(e,t={})=>n=>{let r=XE({...n,processors:t});return Pr(e,r),ey(r,e),ty(r,e)},Ux=(e,t,n={})=>r=>{let{libraryOptions:o,target:i}=r??{},s=XE({...o??{},target:i,io:t,processors:n});return Pr(e,s),ey(s,e),ty(s,e)}});function _z(e,t){if("_idmap"in e){let r=e,o=XE({...t,processors:Az}),i={};for(let l of r._idmap.entries()){let[f,h]=l;Pr(h,o)}let s={},u={registry:r,uri:t?.uri,defs:i};o.external=u;for(let l of r._idmap.entries()){let[f,h]=l;ey(o,h),s[f]=ty(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=XE({...t,processors:Az});return Pr(e,n),ey(n,e),ty(n,e)}var aUt,Ooe,Poe,Moe,Loe,Uoe,Qoe,Foe,Goe,joe,zoe,Hoe,$oe,qoe,Voe,Koe,Yoe,Joe,Zoe,Woe,Xoe,eie,tie,nie,rie,oie,gz,iie,sie,aie,uie,cie,lie,die,pie,fie,mie,Aie,hz,gie,Az,RO=k(()=>{m();vO();Tt();aUt={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ooe=(e,t,n,r)=>{let o=n;o.type="string";let{minimum:i,maximum:s,format:u,patterns:l,contentEncoding:f}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),u&&(o.format=aUt[u]??u,o.format===""&&delete o.format,u==="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(_=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:_.source}))])}},Poe=(e,t,n,r)=>{let o=n,{minimum:i,maximum:s,format:u,multipleOf:l,exclusiveMaximum:f,exclusiveMinimum:h}=e._zod.bag;typeof u=="string"&&u.includes("int")?o.type="integer":o.type="number";let _=typeof h=="number"&&h>=(i??Number.NEGATIVE_INFINITY),E=typeof f=="number"&&f<=(s??Number.POSITIVE_INFINITY),T=t.target==="draft-04"||t.target==="openapi-3.0";_?T?(o.minimum=h,o.exclusiveMinimum=!0):o.exclusiveMinimum=h:typeof i=="number"&&(o.minimum=i),E?T?(o.maximum=f,o.exclusiveMaximum=!0):o.exclusiveMaximum=f:typeof s=="number"&&(o.maximum=s),typeof l=="number"&&(o.multipleOf=l)},Moe=(e,t,n,r)=>{n.type="boolean"},Loe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Uoe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Qoe=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Foe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Goe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},joe=(e,t,n,r)=>{n.not={}},zoe=(e,t,n,r)=>{},Hoe=(e,t,n,r)=>{},$oe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},qoe=(e,t,n,r)=>{let o=e._zod.def,i=aO(o.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},Voe=(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},Koe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Yoe=(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},Joe=(e,t,n,r)=>{let o=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:u,mime:l}=e._zod.bag;s!==void 0&&(i.minLength=s),u!==void 0&&(i.maxLength=u),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)},Zoe=(e,t,n,r)=>{n.type="boolean"},Woe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Xoe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},eie=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},tie=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},nie=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},rie=(e,t,n,r)=>{let o=n,i=e._zod.def,{minimum:s,maximum:u}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof u=="number"&&(o.maxItems=u),o.type="array",o.items=Pr(i.element,t,{...r,path:[...r.path,"items"]})},oie=(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]=Pr(s[f],t,{...r,path:[...r.path,"properties",f]});let u=new Set(Object.keys(s)),l=new Set([...u].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=Pr(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},gz=(e,t,n,r)=>{let o=e._zod.def,i=o.inclusive===!1,s=o.options.map((u,l)=>Pr(u,t,{...r,path:[...r.path,i?"oneOf":"anyOf",l]}));i?n.oneOf=s:n.anyOf=s},iie=(e,t,n,r)=>{let o=e._zod.def,i=Pr(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=Pr(o.right,t,{...r,path:[...r.path,"allOf",1]}),u=f=>"allOf"in f&&Object.keys(f).length===1,l=[...u(i)?i.allOf:[i],...u(s)?s.allOf:[s]];n.allOf=l},sie=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=i.items.map((E,T)=>Pr(E,t,{...r,path:[...r.path,s,T]})),f=i.rest?Pr(i.rest,t,{...r,path:[...r.path,u,...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:_}=e._zod.bag;typeof h=="number"&&(o.minItems=h),typeof _=="number"&&(o.maxItems=_)},aie=(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=Pr(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(let _ of l)o.patternProperties[_.source]=h}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=Pr(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=Pr(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});let f=s._zod.values;if(f){let h=[...f].filter(_=>typeof _=="string"||typeof _=="number");h.length>0&&(o.required=h)}},uie=(e,t,n,r)=>{let o=e._zod.def,i=Pr(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"}]},cie=(e,t,n,r)=>{let o=e._zod.def;Pr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},lie=(e,t,n,r)=>{let o=e._zod.def;Pr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},die=(e,t,n,r)=>{let o=e._zod.def;Pr(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)))},pie=(e,t,n,r)=>{let o=e._zod.def;Pr(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},fie=(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;Pr(s,t,r);let u=t.seen.get(e);u.ref=s},mie=(e,t,n,r)=>{let o=e._zod.def;Pr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},Aie=(e,t,n,r)=>{let o=e._zod.def;Pr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},hz=(e,t,n,r)=>{let o=e._zod.def;Pr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},gie=(e,t,n,r)=>{let o=e._zod.innerType;Pr(o,t,r);let i=t.seen.get(e);i.ref=o},Az={string:Ooe,number:Poe,boolean:Moe,bigint:Loe,symbol:Uoe,null:Qoe,undefined:Foe,void:Goe,never:joe,any:zoe,unknown:Hoe,date:$oe,enum:qoe,literal:Voe,nan:Koe,template_literal:Yoe,file:Joe,success:Zoe,custom:Woe,function:Xoe,transform:eie,map:tie,set:nie,array:rie,object:oie,union:gz,intersection:iie,tuple:sie,record:aie,nullable:uie,nonoptional:cie,default:lie,prefault:die,catch:pie,pipe:fie,readonly:mie,promise:Aie,optional:hz,lazy:gie}});var Ez,$6e=k(()=>{m();RO();vO();Ez=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=XE({processors:Az,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 Pr(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)),ey(this.ctx,t);let r=ty(this.ctx,t),{"~standard":o,...i}=r;return i}}});var q6e={};var V6e=k(()=>{m()});var uh={};Xs(uh,{$ZodAny:()=>cre,$ZodArray:()=>mre,$ZodAsyncError:()=>Pf,$ZodBase64:()=>Xne,$ZodBase64URL:()=>ere,$ZodBigInt:()=>Pj,$ZodBigIntFormat:()=>ire,$ZodBoolean:()=>_O,$ZodCIDRv4:()=>Jne,$ZodCIDRv6:()=>Zne,$ZodCUID:()=>Une,$ZodCUID2:()=>Qne,$ZodCatch:()=>kre,$ZodCheck:()=>oo,$ZodCheckBigIntFormat:()=>pne,$ZodCheckEndsWith:()=>Ine,$ZodCheckGreaterThan:()=>xj,$ZodCheckIncludes:()=>Tne,$ZodCheckLengthEquals:()=>_ne,$ZodCheckLessThan:()=>Rj,$ZodCheckLowerCase:()=>yne,$ZodCheckMaxLength:()=>gne,$ZodCheckMaxSize:()=>fne,$ZodCheckMimeType:()=>vne,$ZodCheckMinLength:()=>hne,$ZodCheckMinSize:()=>mne,$ZodCheckMultipleOf:()=>lne,$ZodCheckNumberFormat:()=>dne,$ZodCheckOverwrite:()=>Rne,$ZodCheckProperty:()=>Cne,$ZodCheckRegex:()=>Ene,$ZodCheckSizeEquals:()=>Ane,$ZodCheckStartsWith:()=>bne,$ZodCheckStringFormat:()=>bx,$ZodCheckUpperCase:()=>Sne,$ZodCodec:()=>yO,$ZodCustom:()=>Fre,$ZodCustomStringFormat:()=>rre,$ZodDate:()=>fre,$ZodDefault:()=>xre,$ZodDiscriminatedUnion:()=>hre,$ZodE164:()=>tre,$ZodEmail:()=>One,$ZodEmoji:()=>Mne,$ZodEncodeError:()=>qE,$ZodEnum:()=>Tre,$ZodError:()=>pO,$ZodExactOptional:()=>vre,$ZodFile:()=>Ire,$ZodFunction:()=>Lre,$ZodGUID:()=>kne,$ZodIPv4:()=>Vne,$ZodIPv6:()=>Kne,$ZodISODate:()=>Hne,$ZodISODateTime:()=>zne,$ZodISODuration:()=>qne,$ZodISOTime:()=>$ne,$ZodIntersection:()=>_re,$ZodJWT:()=>nre,$ZodKSUID:()=>jne,$ZodLazy:()=>Qre,$ZodLiteral:()=>bre,$ZodMAC:()=>Yne,$ZodMap:()=>yre,$ZodNaN:()=>Bre,$ZodNanoID:()=>Lne,$ZodNever:()=>dre,$ZodNonOptional:()=>Nre,$ZodNull:()=>ure,$ZodNullable:()=>Rre,$ZodNumber:()=>Oj,$ZodNumberFormat:()=>ore,$ZodObject:()=>V4e,$ZodObjectJIT:()=>Are,$ZodOptional:()=>Lj,$ZodPipe:()=>Uj,$ZodPrefault:()=>Dre,$ZodPreprocess:()=>Ore,$ZodPromise:()=>Ure,$ZodReadonly:()=>Pre,$ZodRealError:()=>rl,$ZodRecord:()=>Ere,$ZodRegistry:()=>jj,$ZodSet:()=>Sre,$ZodString:()=>NT,$ZodStringFormat:()=>Xr,$ZodSuccess:()=>wre,$ZodSymbol:()=>sre,$ZodTemplateLiteral:()=>Mre,$ZodTransform:()=>Cre,$ZodTuple:()=>Mj,$ZodType:()=>dn,$ZodULID:()=>Fne,$ZodURL:()=>Pne,$ZodUUID:()=>Bne,$ZodUndefined:()=>are,$ZodUnion:()=>EO,$ZodUnknown:()=>lre,$ZodVoid:()=>pre,$ZodXID:()=>Gne,$ZodXor:()=>gre,$brand:()=>hte,$constructor:()=>se,$input:()=>Vre,$output:()=>qre,Doc:()=>hO,JSONSchema:()=>q6e,JSONSchemaGenerator:()=>Ez,NEVER:()=>gte,TimePrecision:()=>Zre,_any:()=>_oe,_array:()=>Coe,_base64:()=>sz,_base64url:()=>az,_bigint:()=>doe,_boolean:()=>coe,_catch:()=>tUt,_check:()=>z6e,_cidrv4:()=>oz,_cidrv6:()=>iz,_coercedBigint:()=>poe,_coercedBoolean:()=>loe,_coercedDate:()=>boe,_coercedNumber:()=>roe,_coercedString:()=>Yre,_cuid:()=>Zj,_cuid2:()=>Wj,_custom:()=>Roe,_date:()=>Toe,_decode:()=>hj,_decodeAsync:()=>Ej,_default:()=>WLt,_discriminatedUnion:()=>FLt,_e164:()=>uz,_email:()=>Hj,_emoji:()=>Yj,_encode:()=>gj,_encodeAsync:()=>_j,_endsWith:()=>Nx,_enum:()=>qLt,_file:()=>voe,_float32:()=>ioe,_float64:()=>soe,_gt:()=>dA,_gte:()=>lc,_guid:()=>IO,_includes:()=>xx,_int:()=>ooe,_int32:()=>aoe,_int64:()=>foe,_intersection:()=>GLt,_ipv4:()=>nz,_ipv6:()=>rz,_isoDate:()=>Xre,_isoDateTime:()=>Wre,_isoDuration:()=>toe,_isoTime:()=>eoe,_jwt:()=>cz,_ksuid:()=>tz,_lazy:()=>iUt,_length:()=>BT,_literal:()=>KLt,_lowercase:()=>vx,_lt:()=>lA,_lte:()=>cd,_mac:()=>Jre,_map:()=>HLt,_max:()=>cd,_maxLength:()=>kT,_maxSize:()=>WE,_mime:()=>wx,_min:()=>lc,_minLength:()=>ah,_minSize:()=>pA,_multipleOf:()=>ZE,_nan:()=>Ioe,_nanoid:()=>Jj,_nativeEnum:()=>VLt,_negative:()=>dz,_never:()=>yoe,_nonnegative:()=>fz,_nonoptional:()=>XLt,_nonpositive:()=>pz,_normalize:()=>kx,_null:()=>hoe,_nullable:()=>ZLt,_number:()=>noe,_optional:()=>JLt,_overwrite:()=>Mf,_parse:()=>Ex,_parseAsync:()=>yx,_pipe:()=>nUt,_positive:()=>lz,_promise:()=>sUt,_property:()=>mz,_readonly:()=>rUt,_record:()=>zLt,_refine:()=>xoe,_regex:()=>Cx,_safeDecode:()=>Sj,_safeDecodeAsync:()=>bj,_safeEncode:()=>yj,_safeEncodeAsync:()=>Tj,_safeParse:()=>Sx,_safeParseAsync:()=>Tx,_set:()=>$Lt,_size:()=>wT,_slugify:()=>Mx,_startsWith:()=>Dx,_string:()=>Kre,_stringFormat:()=>Lx,_stringbool:()=>koe,_success:()=>eUt,_superRefine:()=>Doe,_symbol:()=>Aoe,_templateLiteral:()=>oUt,_toLowerCase:()=>Ox,_toUpperCase:()=>Px,_transform:()=>YLt,_trim:()=>Bx,_tuple:()=>jLt,_uint32:()=>uoe,_uint64:()=>moe,_ulid:()=>Xj,_undefined:()=>goe,_union:()=>ULt,_unknown:()=>Eoe,_uppercase:()=>Rx,_url:()=>CO,_uuid:()=>$j,_uuidv4:()=>qj,_uuidv6:()=>Vj,_uuidv7:()=>Kj,_void:()=>Soe,_xid:()=>ez,_xor:()=>QLt,clone:()=>uc,config:()=>Ci,createStandardJSONSchemaMethod:()=>Ux,createToJSONSchemaMethod:()=>Boe,decode:()=>s2t,decodeAsync:()=>u2t,describe:()=>Noe,encode:()=>i2t,encodeAsync:()=>a2t,extractDefs:()=>ey,finalize:()=>ty,flattenError:()=>fO,formatError:()=>mO,globalConfig:()=>vT,globalRegistry:()=>Ga,initializeContext:()=>XE,isValidBase64:()=>Wne,isValidBase64URL:()=>z4e,isValidJWT:()=>H4e,locales:()=>TO,meta:()=>woe,parse:()=>mj,parseAsync:()=>Aj,prettifyError:()=>Nte,process:()=>Pr,regexes:()=>ud,registry:()=>zj,safeDecode:()=>l2t,safeDecodeAsync:()=>p2t,safeEncode:()=>c2t,safeEncodeAsync:()=>d2t,safeParse:()=>kte,safeParseAsync:()=>Bte,toDotPath:()=>T4e,toJSONSchema:()=>_z,treeifyError:()=>Dte,util:()=>Ue,version:()=>Dne});var ld=k(()=>{m();RT();Ote();wte();Gre();Dj();Nne();Tt();vj();$re();bO();xne();H6e();vO();RO();$6e();V6e()});var yz={};Xs(yz,{endsWith:()=>Nx,gt:()=>dA,gte:()=>lc,includes:()=>xx,length:()=>BT,lowercase:()=>vx,lt:()=>lA,lte:()=>cd,maxLength:()=>kT,maxSize:()=>WE,mime:()=>wx,minLength:()=>ah,minSize:()=>pA,multipleOf:()=>ZE,negative:()=>dz,nonnegative:()=>fz,nonpositive:()=>pz,normalize:()=>kx,overwrite:()=>Mf,positive:()=>lz,property:()=>mz,regex:()=>Cx,size:()=>wT,slugify:()=>Mx,startsWith:()=>Dx,toLowerCase:()=>Ox,toUpperCase:()=>Px,trim:()=>Bx,uppercase:()=>Rx});var Sz=k(()=>{m();ld()});var Qx={};Xs(Qx,{ZodISODate:()=>bz,ZodISODateTime:()=>Tz,ZodISODuration:()=>Cz,ZodISOTime:()=>Iz,date:()=>_ie,datetime:()=>hie,duration:()=>yie,time:()=>Eie});function hie(e){return Wre(Tz,e)}function _ie(e){return Xre(bz,e)}function Eie(e){return eoe(Iz,e)}function yie(e){return toe(Cz,e)}var Tz,bz,Iz,Cz,xO=k(()=>{m();ld();NO();Tz=se("ZodISODateTime",(e,t)=>{zne.init(e,t),eo.init(e,t)});bz=se("ZodISODate",(e,t)=>{Hne.init(e,t),eo.init(e,t)});Iz=se("ZodISOTime",(e,t)=>{$ne.init(e,t),eo.init(e,t)});Cz=se("ZodISODuration",(e,t)=>{qne.init(e,t),eo.init(e,t)})});var K6e,cUt,ol,Sie=k(()=>{m();ld();ld();Tt();K6e=(e,t)=>{pO.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>mO(e,n)},flatten:{value:n=>fO(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,gx,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,gx,2)}},isEmpty:{get(){return e.issues.length===0}}})},cUt=se("ZodError",K6e),ol=se("ZodError",K6e,{Parent:Error})});var Tie,bie,Iie,Cie,vie,Rie,xie,Die,Nie,wie,kie,Bie,Oie=k(()=>{m();ld();Sie();Tie=Ex(ol),bie=yx(ol),Iie=Sx(ol),Cie=Tx(ol),vie=gj(ol),Rie=hj(ol),xie=_j(ol),Die=Ej(ol),Nie=yj(ol),wie=Sj(ol),kie=Tj(ol),Bie=bj(ol)});var DO={};Xs(DO,{ZodAny:()=>jie,ZodArray:()=>qie,ZodBase64:()=>Gz,ZodBase64URL:()=>jz,ZodBigInt:()=>qx,ZodBigIntFormat:()=>$z,ZodBoolean:()=>$x,ZodCIDRv4:()=>Qz,ZodCIDRv6:()=>Fz,ZodCUID:()=>kz,ZodCUID2:()=>Bz,ZodCatch:()=>mse,ZodCodec:()=>jO,ZodCustom:()=>zO,ZodCustomStringFormat:()=>zx,ZodDate:()=>LO,ZodDefault:()=>use,ZodDiscriminatedUnion:()=>Kie,ZodE164:()=>zz,ZodEmail:()=>Dz,ZodEmoji:()=>Nz,ZodEnum:()=>Gx,ZodExactOptional:()=>ise,ZodFile:()=>rse,ZodFunction:()=>Ise,ZodGUID:()=>kO,ZodIPv4:()=>Lz,ZodIPv6:()=>Uz,ZodIntersection:()=>Yie,ZodJWT:()=>Hz,ZodKSUID:()=>Mz,ZodLazy:()=>Sse,ZodLiteral:()=>nse,ZodMAC:()=>Pie,ZodMap:()=>ese,ZodNaN:()=>gse,ZodNanoID:()=>wz,ZodNever:()=>Hie,ZodNonOptional:()=>Zz,ZodNull:()=>Fie,ZodNullable:()=>ase,ZodNumber:()=>Hx,ZodNumberFormat:()=>PT,ZodObject:()=>QO,ZodOptional:()=>Jz,ZodPipe:()=>GO,ZodPrefault:()=>lse,ZodPreprocess:()=>hse,ZodPromise:()=>bse,ZodReadonly:()=>_se,ZodRecord:()=>Fx,ZodSet:()=>tse,ZodString:()=>jx,ZodStringFormat:()=>eo,ZodSuccess:()=>fse,ZodSymbol:()=>Uie,ZodTemplateLiteral:()=>yse,ZodTransform:()=>ose,ZodTuple:()=>Zie,ZodType:()=>wn,ZodULID:()=>Oz,ZodURL:()=>MO,ZodUUID:()=>fA,ZodUndefined:()=>Qie,ZodUnion:()=>FO,ZodUnknown:()=>zie,ZodVoid:()=>$ie,ZodXID:()=>Pz,ZodXor:()=>Vie,_ZodString:()=>xz,_default:()=>cse,_function:()=>nje,any:()=>BGe,array:()=>UO,base64:()=>gGe,base64url:()=>hGe,bigint:()=>xGe,boolean:()=>Lie,catch:()=>Ase,check:()=>rje,cidrv4:()=>mGe,cidrv6:()=>AGe,codec:()=>WGe,cuid:()=>sGe,cuid2:()=>aGe,custom:()=>oje,date:()=>PGe,describe:()=>ije,discriminatedUnion:()=>GGe,e164:()=>_Ge,email:()=>J6e,emoji:()=>oGe,enum:()=>Kz,exactOptional:()=>sse,file:()=>KGe,float32:()=>IGe,float64:()=>CGe,function:()=>nje,guid:()=>Z6e,hash:()=>bGe,hex:()=>TGe,hostname:()=>SGe,httpUrl:()=>rGe,instanceof:()=>aje,int:()=>vz,int32:()=>vGe,int64:()=>DGe,intersection:()=>Jie,invertCodec:()=>XGe,ipv4:()=>dGe,ipv6:()=>fGe,json:()=>cje,jwt:()=>EGe,keyof:()=>MGe,ksuid:()=>lGe,lazy:()=>Tse,literal:()=>VGe,looseObject:()=>QGe,looseRecord:()=>zGe,mac:()=>pGe,map:()=>HGe,meta:()=>sje,nan:()=>ZGe,nanoid:()=>iGe,nativeEnum:()=>qGe,never:()=>qz,nonoptional:()=>pse,null:()=>Gie,nullable:()=>OO,nullish:()=>YGe,number:()=>Mie,object:()=>LGe,optional:()=>BO,partialRecord:()=>jGe,pipe:()=>Rz,prefault:()=>dse,preprocess:()=>lje,promise:()=>tje,readonly:()=>Ese,record:()=>Xie,refine:()=>Cse,set:()=>$Ge,strictObject:()=>UGe,string:()=>wO,stringFormat:()=>yGe,stringbool:()=>uje,success:()=>JGe,superRefine:()=>vse,symbol:()=>wGe,templateLiteral:()=>eje,transform:()=>Yz,tuple:()=>Wie,uint32:()=>RGe,uint64:()=>NGe,ulid:()=>uGe,undefined:()=>kGe,union:()=>Vz,unknown:()=>OT,url:()=>nGe,uuid:()=>W6e,uuidv4:()=>X6e,uuidv6:()=>eGe,uuidv7:()=>tGe,void:()=>OGe,xid:()=>cGe,xor:()=>FGe});function PO(e,t,n){let r=Object.getPrototypeOf(e),o=Y6e.get(r);if(o||(o=new Set,Y6e.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 u=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:u}),u},set(u){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:u})}})}}}function wO(e){return Kre(jx,e)}function J6e(e){return Hj(Dz,e)}function Z6e(e){return IO(kO,e)}function W6e(e){return $j(fA,e)}function X6e(e){return qj(fA,e)}function eGe(e){return Vj(fA,e)}function tGe(e){return Kj(fA,e)}function nGe(e){return CO(MO,e)}function rGe(e){return CO(MO,{protocol:ud.httpProtocol,hostname:ud.domain,...Ue.normalizeParams(e)})}function oGe(e){return Yj(Nz,e)}function iGe(e){return Jj(wz,e)}function sGe(e){return Zj(kz,e)}function aGe(e){return Wj(Bz,e)}function uGe(e){return Xj(Oz,e)}function cGe(e){return ez(Pz,e)}function lGe(e){return tz(Mz,e)}function dGe(e){return nz(Lz,e)}function pGe(e){return Jre(Pie,e)}function fGe(e){return rz(Uz,e)}function mGe(e){return oz(Qz,e)}function AGe(e){return iz(Fz,e)}function gGe(e){return sz(Gz,e)}function hGe(e){return az(jz,e)}function _Ge(e){return uz(zz,e)}function EGe(e){return cz(Hz,e)}function yGe(e,t,n={}){return Lx(zx,e,t,n)}function SGe(e){return Lx(zx,"hostname",ud.hostname,e)}function TGe(e){return Lx(zx,"hex",ud.hex,e)}function bGe(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,o=ud[r];if(!o)throw new Error(`Unrecognized hash format: ${r}`);return Lx(zx,r,o,t)}function Mie(e){return noe(Hx,e)}function vz(e){return ooe(PT,e)}function IGe(e){return ioe(PT,e)}function CGe(e){return soe(PT,e)}function vGe(e){return aoe(PT,e)}function RGe(e){return uoe(PT,e)}function Lie(e){return coe($x,e)}function xGe(e){return doe(qx,e)}function DGe(e){return foe($z,e)}function NGe(e){return moe($z,e)}function wGe(e){return Aoe(Uie,e)}function kGe(e){return goe(Qie,e)}function Gie(e){return hoe(Fie,e)}function BGe(){return _oe(jie)}function OT(){return Eoe(zie)}function qz(e){return yoe(Hie,e)}function OGe(e){return Soe($ie,e)}function PGe(e){return Toe(LO,e)}function UO(e,t){return Coe(qie,e,t)}function MGe(e){let t=e._zod.def.shape;return Kz(Object.keys(t))}function LGe(e,t){let n={type:"object",shape:e??{},...Ue.normalizeParams(t)};return new QO(n)}function UGe(e,t){return new QO({type:"object",shape:e,catchall:qz(),...Ue.normalizeParams(t)})}function QGe(e,t){return new QO({type:"object",shape:e,catchall:OT(),...Ue.normalizeParams(t)})}function Vz(e,t){return new FO({type:"union",options:e,...Ue.normalizeParams(t)})}function FGe(e,t){return new Vie({type:"union",options:e,inclusive:!1,...Ue.normalizeParams(t)})}function GGe(e,t,n){return new Kie({type:"union",options:t,discriminator:e,...Ue.normalizeParams(n)})}function Jie(e,t){return new Yie({type:"intersection",left:e,right:t})}function Wie(e,t,n){let r=t instanceof dn,o=r?n:t,i=r?t:null;return new Zie({type:"tuple",items:e,rest:i,...Ue.normalizeParams(o)})}function Xie(e,t,n){return!t||!t._zod?new Fx({type:"record",keyType:wO(),valueType:e,...Ue.normalizeParams(t)}):new Fx({type:"record",keyType:e,valueType:t,...Ue.normalizeParams(n)})}function jGe(e,t,n){let r=uc(e);return r._zod.values=void 0,new Fx({type:"record",keyType:r,valueType:t,...Ue.normalizeParams(n)})}function zGe(e,t,n){return new Fx({type:"record",keyType:e,valueType:t,mode:"loose",...Ue.normalizeParams(n)})}function HGe(e,t,n){return new ese({type:"map",keyType:e,valueType:t,...Ue.normalizeParams(n)})}function $Ge(e,t){return new tse({type:"set",valueType:e,...Ue.normalizeParams(t)})}function Kz(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Gx({type:"enum",entries:n,...Ue.normalizeParams(t)})}function qGe(e,t){return new Gx({type:"enum",entries:e,...Ue.normalizeParams(t)})}function VGe(e,t){return new nse({type:"literal",values:Array.isArray(e)?e:[e],...Ue.normalizeParams(t)})}function KGe(e){return voe(rse,e)}function Yz(e){return new ose({type:"transform",transform:e})}function BO(e){return new Jz({type:"optional",innerType:e})}function sse(e){return new ise({type:"optional",innerType:e})}function OO(e){return new ase({type:"nullable",innerType:e})}function YGe(e){return BO(OO(e))}function cse(e,t){return new use({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ue.shallowClone(t)}})}function dse(e,t){return new lse({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ue.shallowClone(t)}})}function pse(e,t){return new Zz({type:"nonoptional",innerType:e,...Ue.normalizeParams(t)})}function JGe(e){return new fse({type:"success",innerType:e})}function Ase(e,t){return new mse({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function ZGe(e){return Ioe(gse,e)}function Rz(e,t){return new GO({type:"pipe",in:e,out:t})}function WGe(e,t,n){return new jO({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function XGe(e){let t=e._zod.def;return new jO({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function Ese(e){return new _se({type:"readonly",innerType:e})}function eje(e,t){return new yse({type:"template_literal",parts:e,...Ue.normalizeParams(t)})}function Tse(e){return new Sse({type:"lazy",getter:e})}function tje(e){return new bse({type:"promise",innerType:e})}function nje(e){return new Ise({type:"function",input:Array.isArray(e?.input)?Wie(e?.input):e?.input??UO(OT()),output:e?.output??OT()})}function rje(e){let t=new oo({check:"custom"});return t._zod.check=e,t}function oje(e,t){return Roe(zO,e??(()=>!0),t)}function Cse(e,t={}){return xoe(zO,e,t)}function vse(e,t){return Doe(e,t)}function aje(e,t={}){let n=new zO({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Ue.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 cje(e){let t=Tse(()=>Vz([wO(e),Mie(),Lie(),Gie(),UO(t),Xie(wO(),t)]));return t}function lje(e,t){return new hse({type:"pipe",in:Yz(e),out:t})}var Y6e,wn,xz,jx,eo,Dz,kO,fA,MO,Nz,wz,kz,Bz,Oz,Pz,Mz,Lz,Pie,Uz,Qz,Fz,Gz,jz,zz,Hz,zx,Hx,PT,$x,qx,$z,Uie,Qie,Fie,jie,zie,Hie,$ie,LO,qie,QO,FO,Vie,Kie,Yie,Zie,Fx,ese,tse,Gx,nse,rse,ose,Jz,ise,ase,use,lse,Zz,fse,mse,gse,GO,jO,hse,_se,yse,Sse,bse,Ise,zO,ije,sje,uje,NO=k(()=>{m();ld();ld();RO();vO();Sz();xO();Oie();Y6e=new WeakMap;wn=se("ZodType",(e,t)=>(dn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ux(e,"input"),output:Ux(e,"output")}}),e.toJSONSchema=Boe(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>Tie(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Iie(e,n,r),e.parseAsync=async(n,r)=>bie(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Cie(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>vie(e,n,r),e.decode=(n,r)=>Rie(e,n,r),e.encodeAsync=async(n,r)=>xie(e,n,r),e.decodeAsync=async(n,r)=>Die(e,n,r),e.safeEncode=(n,r)=>Nie(e,n,r),e.safeDecode=(n,r)=>wie(e,n,r),e.safeEncodeAsync=async(n,r)=>kie(e,n,r),e.safeDecodeAsync=async(n,r)=>Bie(e,n,r),PO(e,"ZodType",{check(...n){let r=this.def;return this.clone(Ue.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 uc(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(Cse(n,r))},superRefine(n,r){return this.check(vse(n,r))},overwrite(n){return this.check(Mf(n))},optional(){return BO(this)},exactOptional(){return sse(this)},nullable(){return OO(this)},nullish(){return BO(OO(this))},nonoptional(n){return pse(this,n)},array(){return UO(this)},or(n){return Vz([this,n])},and(n){return Jie(this,n)},transform(n){return Rz(this,Yz(n))},default(n){return cse(this,n)},prefault(n){return dse(this,n)},catch(n){return Ase(this,n)},pipe(n){return Rz(this,n)},readonly(){return Ese(this)},describe(n){let r=this.clone();return Ga.add(r,{description:n}),r},meta(...n){if(n.length===0)return Ga.get(this);let r=this.clone();return Ga.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 Ga.get(e)?.description},configurable:!0}),e)),xz=se("_ZodString",(e,t)=>{NT.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Ooe(e,r,o,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,PO(e,"_ZodString",{regex(...r){return this.check(Cx(...r))},includes(...r){return this.check(xx(...r))},startsWith(...r){return this.check(Dx(...r))},endsWith(...r){return this.check(Nx(...r))},min(...r){return this.check(ah(...r))},max(...r){return this.check(kT(...r))},length(...r){return this.check(BT(...r))},nonempty(...r){return this.check(ah(1,...r))},lowercase(r){return this.check(vx(r))},uppercase(r){return this.check(Rx(r))},trim(){return this.check(Bx())},normalize(...r){return this.check(kx(...r))},toLowerCase(){return this.check(Ox())},toUpperCase(){return this.check(Px())},slugify(){return this.check(Mx())}})}),jx=se("ZodString",(e,t)=>{NT.init(e,t),xz.init(e,t),e.email=n=>e.check(Hj(Dz,n)),e.url=n=>e.check(CO(MO,n)),e.jwt=n=>e.check(cz(Hz,n)),e.emoji=n=>e.check(Yj(Nz,n)),e.guid=n=>e.check(IO(kO,n)),e.uuid=n=>e.check($j(fA,n)),e.uuidv4=n=>e.check(qj(fA,n)),e.uuidv6=n=>e.check(Vj(fA,n)),e.uuidv7=n=>e.check(Kj(fA,n)),e.nanoid=n=>e.check(Jj(wz,n)),e.guid=n=>e.check(IO(kO,n)),e.cuid=n=>e.check(Zj(kz,n)),e.cuid2=n=>e.check(Wj(Bz,n)),e.ulid=n=>e.check(Xj(Oz,n)),e.base64=n=>e.check(sz(Gz,n)),e.base64url=n=>e.check(az(jz,n)),e.xid=n=>e.check(ez(Pz,n)),e.ksuid=n=>e.check(tz(Mz,n)),e.ipv4=n=>e.check(nz(Lz,n)),e.ipv6=n=>e.check(rz(Uz,n)),e.cidrv4=n=>e.check(oz(Qz,n)),e.cidrv6=n=>e.check(iz(Fz,n)),e.e164=n=>e.check(uz(zz,n)),e.datetime=n=>e.check(hie(n)),e.date=n=>e.check(_ie(n)),e.time=n=>e.check(Eie(n)),e.duration=n=>e.check(yie(n))});eo=se("ZodStringFormat",(e,t)=>{Xr.init(e,t),xz.init(e,t)}),Dz=se("ZodEmail",(e,t)=>{One.init(e,t),eo.init(e,t)});kO=se("ZodGUID",(e,t)=>{kne.init(e,t),eo.init(e,t)});fA=se("ZodUUID",(e,t)=>{Bne.init(e,t),eo.init(e,t)});MO=se("ZodURL",(e,t)=>{Pne.init(e,t),eo.init(e,t)});Nz=se("ZodEmoji",(e,t)=>{Mne.init(e,t),eo.init(e,t)});wz=se("ZodNanoID",(e,t)=>{Lne.init(e,t),eo.init(e,t)});kz=se("ZodCUID",(e,t)=>{Une.init(e,t),eo.init(e,t)});Bz=se("ZodCUID2",(e,t)=>{Qne.init(e,t),eo.init(e,t)});Oz=se("ZodULID",(e,t)=>{Fne.init(e,t),eo.init(e,t)});Pz=se("ZodXID",(e,t)=>{Gne.init(e,t),eo.init(e,t)});Mz=se("ZodKSUID",(e,t)=>{jne.init(e,t),eo.init(e,t)});Lz=se("ZodIPv4",(e,t)=>{Vne.init(e,t),eo.init(e,t)});Pie=se("ZodMAC",(e,t)=>{Yne.init(e,t),eo.init(e,t)});Uz=se("ZodIPv6",(e,t)=>{Kne.init(e,t),eo.init(e,t)});Qz=se("ZodCIDRv4",(e,t)=>{Jne.init(e,t),eo.init(e,t)});Fz=se("ZodCIDRv6",(e,t)=>{Zne.init(e,t),eo.init(e,t)});Gz=se("ZodBase64",(e,t)=>{Xne.init(e,t),eo.init(e,t)});jz=se("ZodBase64URL",(e,t)=>{ere.init(e,t),eo.init(e,t)});zz=se("ZodE164",(e,t)=>{tre.init(e,t),eo.init(e,t)});Hz=se("ZodJWT",(e,t)=>{nre.init(e,t),eo.init(e,t)});zx=se("ZodCustomStringFormat",(e,t)=>{rre.init(e,t),eo.init(e,t)});Hx=se("ZodNumber",(e,t)=>{Oj.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Poe(e,r,o,i),PO(e,"ZodNumber",{gt(r,o){return this.check(dA(r,o))},gte(r,o){return this.check(lc(r,o))},min(r,o){return this.check(lc(r,o))},lt(r,o){return this.check(lA(r,o))},lte(r,o){return this.check(cd(r,o))},max(r,o){return this.check(cd(r,o))},int(r){return this.check(vz(r))},safe(r){return this.check(vz(r))},positive(r){return this.check(dA(0,r))},nonnegative(r){return this.check(lc(0,r))},negative(r){return this.check(lA(0,r))},nonpositive(r){return this.check(cd(0,r))},multipleOf(r,o){return this.check(ZE(r,o))},step(r,o){return this.check(ZE(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});PT=se("ZodNumberFormat",(e,t)=>{ore.init(e,t),Hx.init(e,t)});$x=se("ZodBoolean",(e,t)=>{_O.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Moe(e,n,r,o)});qx=se("ZodBigInt",(e,t)=>{Pj.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Loe(e,r,o,i),e.gte=(r,o)=>e.check(lc(r,o)),e.min=(r,o)=>e.check(lc(r,o)),e.gt=(r,o)=>e.check(dA(r,o)),e.gte=(r,o)=>e.check(lc(r,o)),e.min=(r,o)=>e.check(lc(r,o)),e.lt=(r,o)=>e.check(lA(r,o)),e.lte=(r,o)=>e.check(cd(r,o)),e.max=(r,o)=>e.check(cd(r,o)),e.positive=r=>e.check(dA(BigInt(0),r)),e.negative=r=>e.check(lA(BigInt(0),r)),e.nonpositive=r=>e.check(cd(BigInt(0),r)),e.nonnegative=r=>e.check(lc(BigInt(0),r)),e.multipleOf=(r,o)=>e.check(ZE(r,o));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});$z=se("ZodBigIntFormat",(e,t)=>{ire.init(e,t),qx.init(e,t)});Uie=se("ZodSymbol",(e,t)=>{sre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Uoe(e,n,r,o)});Qie=se("ZodUndefined",(e,t)=>{are.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Foe(e,n,r,o)});Fie=se("ZodNull",(e,t)=>{ure.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Qoe(e,n,r,o)});jie=se("ZodAny",(e,t)=>{cre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>zoe(e,n,r,o)});zie=se("ZodUnknown",(e,t)=>{lre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Hoe(e,n,r,o)});Hie=se("ZodNever",(e,t)=>{dre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>joe(e,n,r,o)});$ie=se("ZodVoid",(e,t)=>{pre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Goe(e,n,r,o)});LO=se("ZodDate",(e,t)=>{fre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>$oe(e,r,o,i),e.min=(r,o)=>e.check(lc(r,o)),e.max=(r,o)=>e.check(cd(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});qie=se("ZodArray",(e,t)=>{mre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rie(e,n,r,o),e.element=t.element,PO(e,"ZodArray",{min(n,r){return this.check(ah(n,r))},nonempty(n){return this.check(ah(1,n))},max(n,r){return this.check(kT(n,r))},length(n,r){return this.check(BT(n,r))},unwrap(){return this.element}})});QO=se("ZodObject",(e,t)=>{Are.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>oie(e,n,r,o),Ue.defineLazy(e,"shape",()=>t.shape),PO(e,"ZodObject",{keyof(){return Kz(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:OT()})},loose(){return this.clone({...this._zod.def,catchall:OT()})},strict(){return this.clone({...this._zod.def,catchall:qz()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Ue.extend(this,n)},safeExtend(n){return Ue.safeExtend(this,n)},merge(n){return Ue.merge(this,n)},pick(n){return Ue.pick(this,n)},omit(n){return Ue.omit(this,n)},partial(...n){return Ue.partial(Jz,this,n[0])},required(...n){return Ue.required(Zz,this,n[0])}})});FO=se("ZodUnion",(e,t)=>{EO.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gz(e,n,r,o),e.options=t.options});Vie=se("ZodXor",(e,t)=>{FO.init(e,t),gre.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gz(e,n,r,o),e.options=t.options});Kie=se("ZodDiscriminatedUnion",(e,t)=>{FO.init(e,t),hre.init(e,t)});Yie=se("ZodIntersection",(e,t)=>{_re.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>iie(e,n,r,o)});Zie=se("ZodTuple",(e,t)=>{Mj.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>sie(e,n,r,o),e.rest=n=>e.clone({...e._zod.def,rest:n})});Fx=se("ZodRecord",(e,t)=>{Ere.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>aie(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});ese=se("ZodMap",(e,t)=>{yre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>tie(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(pA(...n)),e.nonempty=n=>e.check(pA(1,n)),e.max=(...n)=>e.check(WE(...n)),e.size=(...n)=>e.check(wT(...n))});tse=se("ZodSet",(e,t)=>{Sre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>nie(e,n,r,o),e.min=(...n)=>e.check(pA(...n)),e.nonempty=n=>e.check(pA(1,n)),e.max=(...n)=>e.check(WE(...n)),e.size=(...n)=>e.check(wT(...n))});Gx=se("ZodEnum",(e,t)=>{Tre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>qoe(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 Gx({...t,checks:[],...Ue.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 Gx({...t,checks:[],...Ue.normalizeParams(o),entries:i})}});nse=se("ZodLiteral",(e,t)=>{bre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Voe(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]}})});rse=se("ZodFile",(e,t)=>{Ire.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Joe(e,n,r,o),e.min=(n,r)=>e.check(pA(n,r)),e.max=(n,r)=>e.check(WE(n,r)),e.mime=(n,r)=>e.check(wx(Array.isArray(n)?n:[n],r))});ose=se("ZodTransform",(e,t)=>{Cre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>eie(e,n,r,o),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new qE(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ue.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(Ue.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)}});Jz=se("ZodOptional",(e,t)=>{Lj.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hz(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});ise=se("ZodExactOptional",(e,t)=>{vre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hz(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});ase=se("ZodNullable",(e,t)=>{Rre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>uie(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});use=se("ZodDefault",(e,t)=>{xre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>lie(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});lse=se("ZodPrefault",(e,t)=>{Dre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>die(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Zz=se("ZodNonOptional",(e,t)=>{Nre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cie(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});fse=se("ZodSuccess",(e,t)=>{wre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Zoe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});mse=se("ZodCatch",(e,t)=>{kre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>pie(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});gse=se("ZodNaN",(e,t)=>{Bre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Koe(e,n,r,o)});GO=se("ZodPipe",(e,t)=>{Uj.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>fie(e,n,r,o),e.in=t.in,e.out=t.out});jO=se("ZodCodec",(e,t)=>{GO.init(e,t),yO.init(e,t)});hse=se("ZodPreprocess",(e,t)=>{GO.init(e,t),Ore.init(e,t)}),_se=se("ZodReadonly",(e,t)=>{Pre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>mie(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});yse=se("ZodTemplateLiteral",(e,t)=>{Mre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Yoe(e,n,r,o)});Sse=se("ZodLazy",(e,t)=>{Qre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gie(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});bse=se("ZodPromise",(e,t)=>{Ure.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Aie(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Ise=se("ZodFunction",(e,t)=>{Lre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xoe(e,n,r,o)});zO=se("ZodCustom",(e,t)=>{Fre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Woe(e,n,r,o)});ije=Noe,sje=woe;uje=(...e)=>koe({Codec:jO,Boolean:$x,String:jx},...e)});function pUt(e){Ci({customError:e})}function fUt(){return Ci().customError}var dUt,Rse,dje=k(()=>{m();ld();dUt={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"};Rse||(Rse={})});function AUt(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 gUt(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 pje(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return et.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 et.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=gUt(o,t),s=Tu(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 et.null();if(o.length===0)return et.never();if(o.length===1)return et.literal(o[0]);if(o.every(s=>typeof s=="string"))return et.enum(o);let i=o.map(s=>et.literal(s));return i.length<2?i[0]:et.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return et.literal(e.const);let n=e.type;if(Array.isArray(n)){let o=n.map(i=>{let s={...e,type:i};return pje(s,t)});return o.length===0?et.never():o.length===1?o[0]:et.union(o)}if(!n)return et.any();let r;switch(n){case"string":{let o=et.string();if(e.format){let i=e.format;i==="email"?o=o.check(et.email()):i==="uri"||i==="uri-reference"?o=o.check(et.url()):i==="uuid"||i==="guid"?o=o.check(et.uuid()):i==="date-time"?o=o.check(et.iso.datetime()):i==="date"?o=o.check(et.iso.date()):i==="time"?o=o.check(et.iso.time()):i==="duration"?o=o.check(et.iso.duration()):i==="ipv4"?o=o.check(et.ipv4()):i==="ipv6"?o=o.check(et.ipv6()):i==="mac"?o=o.check(et.mac()):i==="cidr"?o=o.check(et.cidrv4()):i==="cidr-v6"?o=o.check(et.cidrv6()):i==="base64"?o=o.check(et.base64()):i==="base64url"?o=o.check(et.base64url()):i==="e164"?o=o.check(et.e164()):i==="jwt"?o=o.check(et.jwt()):i==="emoji"?o=o.check(et.emoji()):i==="nanoid"?o=o.check(et.nanoid()):i==="cuid"?o=o.check(et.cuid()):i==="cuid2"?o=o.check(et.cuid2()):i==="ulid"?o=o.check(et.ulid()):i==="xid"?o=o.check(et.xid()):i==="ksuid"&&(o=o.check(et.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"?et.number().int():et.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=et.boolean();break}case"null":{r=et.null();break}case"object":{let o={},i=e.properties||{},s=new Set(e.required||[]);for(let[l,f]of Object.entries(i)){let h=Tu(f,t);o[l]=s.has(l)?h:h.optional()}if(e.propertyNames){let l=Tu(e.propertyNames,t),f=e.additionalProperties&&typeof e.additionalProperties=="object"?Tu(e.additionalProperties,t):et.any();if(Object.keys(o).length===0){r=et.record(l,f);break}let h=et.object(o).passthrough(),_=et.looseRecord(l,f);r=et.intersection(h,_);break}if(e.patternProperties){let l=e.patternProperties,f=Object.keys(l),h=[];for(let E of f){let T=Tu(l[E],t),v=et.string().regex(new RegExp(E));h.push(et.looseRecord(v,T))}let _=[];if(Object.keys(o).length>0&&_.push(et.object(o).passthrough()),_.push(...h),_.length===0)r=et.object({}).passthrough();else if(_.length===1)r=_[0];else{let E=et.intersection(_[0],_[1]);for(let T=2;T<_.length;T++)E=et.intersection(E,_[T]);r=E}break}let u=et.object(o);e.additionalProperties===!1?r=u.strict():typeof e.additionalProperties=="object"?r=u.catchall(Tu(e.additionalProperties,t)):r=u.passthrough();break}case"array":{let o=e.prefixItems,i=e.items;if(o&&Array.isArray(o)){let s=o.map(l=>Tu(l,t)),u=i&&typeof i=="object"&&!Array.isArray(i)?Tu(i,t):void 0;u?r=et.tuple(s).rest(u):r=et.tuple(s),typeof e.minItems=="number"&&(r=r.check(et.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(et.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(l=>Tu(l,t)),u=e.additionalItems&&typeof e.additionalItems=="object"?Tu(e.additionalItems,t):void 0;u?r=et.tuple(s).rest(u):r=et.tuple(s),typeof e.minItems=="number"&&(r=r.check(et.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(et.maxLength(e.maxItems)))}else if(i!==void 0){let s=Tu(i,t),u=et.array(s);typeof e.minItems=="number"&&(u=u.min(e.minItems)),typeof e.maxItems=="number"&&(u=u.max(e.maxItems)),r=u}else r=et.array(et.any());break}default:throw new Error(`Unsupported type: ${n}`)}return r}function Tu(e,t){if(typeof e=="boolean")return e?et.any():et.never();let n=pje(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let u=e.anyOf.map(f=>Tu(f,t)),l=et.union(u);n=r?et.intersection(n,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let u=e.oneOf.map(f=>Tu(f,t)),l=et.xor(u);n=r?et.intersection(n,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:et.any();else{let u=r?n:Tu(e.allOf[0],t),l=r?0:1;for(let f=l;f<e.allOf.length;f++)u=et.intersection(u,Tu(e.allOf[f],t));n=u}e.nullable===!0&&t.version==="openapi-3.0"&&(n=et.nullable(n)),e.readOnly===!0&&(n=et.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let u of i)u in e&&(o[u]=e[u]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let u of s)u in e&&(o[u]=e[u]);for(let u of Object.keys(e))mUt.has(u)||(o[u]=e[u]);return Object.keys(o).length>0&&t.registry.add(n,o),e.description&&(n=n.describe(e.description)),n}function fje(e,t){if(typeof e=="boolean")return e?et.any():et.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=AUt(n,t?.defaultTarget),o=n.$defs||n.definitions||{},i={version:r,defs:o,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Ga};return Tu(n,i)}var et,mUt,mje=k(()=>{m();bO();Sz();xO();NO();et={...DO,...yz,iso:Qx},mUt=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 xse={};Xs(xse,{bigint:()=>yUt,boolean:()=>EUt,date:()=>SUt,number:()=>_Ut,string:()=>hUt});function hUt(e){return Yre(jx,e)}function _Ut(e){return roe(Hx,e)}function EUt(e){return loe($x,e)}function yUt(e){return poe(qx,e)}function SUt(e){return boe(LO,e)}var Aje=k(()=>{m();ld();NO()});var p={};Xs(p,{$brand:()=>hte,$input:()=>Vre,$output:()=>qre,NEVER:()=>gte,TimePrecision:()=>Zre,ZodAny:()=>jie,ZodArray:()=>qie,ZodBase64:()=>Gz,ZodBase64URL:()=>jz,ZodBigInt:()=>qx,ZodBigIntFormat:()=>$z,ZodBoolean:()=>$x,ZodCIDRv4:()=>Qz,ZodCIDRv6:()=>Fz,ZodCUID:()=>kz,ZodCUID2:()=>Bz,ZodCatch:()=>mse,ZodCodec:()=>jO,ZodCustom:()=>zO,ZodCustomStringFormat:()=>zx,ZodDate:()=>LO,ZodDefault:()=>use,ZodDiscriminatedUnion:()=>Kie,ZodE164:()=>zz,ZodEmail:()=>Dz,ZodEmoji:()=>Nz,ZodEnum:()=>Gx,ZodError:()=>cUt,ZodExactOptional:()=>ise,ZodFile:()=>rse,ZodFirstPartyTypeKind:()=>Rse,ZodFunction:()=>Ise,ZodGUID:()=>kO,ZodIPv4:()=>Lz,ZodIPv6:()=>Uz,ZodISODate:()=>bz,ZodISODateTime:()=>Tz,ZodISODuration:()=>Cz,ZodISOTime:()=>Iz,ZodIntersection:()=>Yie,ZodIssueCode:()=>dUt,ZodJWT:()=>Hz,ZodKSUID:()=>Mz,ZodLazy:()=>Sse,ZodLiteral:()=>nse,ZodMAC:()=>Pie,ZodMap:()=>ese,ZodNaN:()=>gse,ZodNanoID:()=>wz,ZodNever:()=>Hie,ZodNonOptional:()=>Zz,ZodNull:()=>Fie,ZodNullable:()=>ase,ZodNumber:()=>Hx,ZodNumberFormat:()=>PT,ZodObject:()=>QO,ZodOptional:()=>Jz,ZodPipe:()=>GO,ZodPrefault:()=>lse,ZodPreprocess:()=>hse,ZodPromise:()=>bse,ZodReadonly:()=>_se,ZodRealError:()=>ol,ZodRecord:()=>Fx,ZodSet:()=>tse,ZodString:()=>jx,ZodStringFormat:()=>eo,ZodSuccess:()=>fse,ZodSymbol:()=>Uie,ZodTemplateLiteral:()=>yse,ZodTransform:()=>ose,ZodTuple:()=>Zie,ZodType:()=>wn,ZodULID:()=>Oz,ZodURL:()=>MO,ZodUUID:()=>fA,ZodUndefined:()=>Qie,ZodUnion:()=>FO,ZodUnknown:()=>zie,ZodVoid:()=>$ie,ZodXID:()=>Pz,ZodXor:()=>Vie,_ZodString:()=>xz,_default:()=>cse,_function:()=>nje,any:()=>BGe,array:()=>UO,base64:()=>gGe,base64url:()=>hGe,bigint:()=>xGe,boolean:()=>Lie,catch:()=>Ase,check:()=>rje,cidrv4:()=>mGe,cidrv6:()=>AGe,clone:()=>uc,codec:()=>WGe,coerce:()=>xse,config:()=>Ci,core:()=>uh,cuid:()=>sGe,cuid2:()=>aGe,custom:()=>oje,date:()=>PGe,decode:()=>Rie,decodeAsync:()=>Die,describe:()=>ije,discriminatedUnion:()=>GGe,e164:()=>_Ge,email:()=>J6e,emoji:()=>oGe,encode:()=>vie,encodeAsync:()=>xie,endsWith:()=>Nx,enum:()=>Kz,exactOptional:()=>sse,file:()=>KGe,flattenError:()=>fO,float32:()=>IGe,float64:()=>CGe,formatError:()=>mO,fromJSONSchema:()=>fje,function:()=>nje,getErrorMap:()=>fUt,globalRegistry:()=>Ga,gt:()=>dA,gte:()=>lc,guid:()=>Z6e,hash:()=>bGe,hex:()=>TGe,hostname:()=>SGe,httpUrl:()=>rGe,includes:()=>xx,instanceof:()=>aje,int:()=>vz,int32:()=>vGe,int64:()=>DGe,intersection:()=>Jie,invertCodec:()=>XGe,ipv4:()=>dGe,ipv6:()=>fGe,iso:()=>Qx,json:()=>cje,jwt:()=>EGe,keyof:()=>MGe,ksuid:()=>lGe,lazy:()=>Tse,length:()=>BT,literal:()=>VGe,locales:()=>TO,looseObject:()=>QGe,looseRecord:()=>zGe,lowercase:()=>vx,lt:()=>lA,lte:()=>cd,mac:()=>pGe,map:()=>HGe,maxLength:()=>kT,maxSize:()=>WE,meta:()=>sje,mime:()=>wx,minLength:()=>ah,minSize:()=>pA,multipleOf:()=>ZE,nan:()=>ZGe,nanoid:()=>iGe,nativeEnum:()=>qGe,negative:()=>dz,never:()=>qz,nonnegative:()=>fz,nonoptional:()=>pse,nonpositive:()=>pz,normalize:()=>kx,null:()=>Gie,nullable:()=>OO,nullish:()=>YGe,number:()=>Mie,object:()=>LGe,optional:()=>BO,overwrite:()=>Mf,parse:()=>Tie,parseAsync:()=>bie,partialRecord:()=>jGe,pipe:()=>Rz,positive:()=>lz,prefault:()=>dse,preprocess:()=>lje,prettifyError:()=>Nte,promise:()=>tje,property:()=>mz,readonly:()=>Ese,record:()=>Xie,refine:()=>Cse,regex:()=>Cx,regexes:()=>ud,registry:()=>zj,safeDecode:()=>wie,safeDecodeAsync:()=>Bie,safeEncode:()=>Nie,safeEncodeAsync:()=>kie,safeParse:()=>Iie,safeParseAsync:()=>Cie,set:()=>$Ge,setErrorMap:()=>pUt,size:()=>wT,slugify:()=>Mx,startsWith:()=>Dx,strictObject:()=>UGe,string:()=>wO,stringFormat:()=>yGe,stringbool:()=>uje,success:()=>JGe,superRefine:()=>vse,symbol:()=>wGe,templateLiteral:()=>eje,toJSONSchema:()=>_z,toLowerCase:()=>Ox,toUpperCase:()=>Px,transform:()=>Yz,treeifyError:()=>Dte,trim:()=>Bx,tuple:()=>Wie,uint32:()=>RGe,uint64:()=>NGe,ulid:()=>uGe,undefined:()=>kGe,union:()=>Vz,unknown:()=>OT,uppercase:()=>Rx,url:()=>nGe,util:()=>Ue,uuid:()=>W6e,uuidv4:()=>X6e,uuidv6:()=>eGe,uuidv7:()=>tGe,void:()=>OGe,xid:()=>cGe,xor:()=>FGe});var Dse=k(()=>{m();ld();NO();Sz();Sie();Oie();dje();ld();jre();ld();RO();mje();$re();xO();xO();Aje();Ci(Qj())});var pc=k(()=>{m();Dse();Dse()});var TUt,bu,Nse,MT,Wz,bUt,Xz,gje,hje,wse,IUt,CUt,vUt,RUt,xUt,DUt,NUt,_je,eH=k(()=>{"use strict";m();cA();pc();TUt=Su(),bu=p.object({message:p.string()}),Nse=p.record(p.string(),p.unknown()),MT=p.string().regex(/^doc_[0-9A-Za-z]{22}$/),Wz=p.string().regex(/^proj_[0-9A-Za-z]{22}$/),bUt=["active","archived"],Xz=p.enum(bUt),gje=p.object({id:p.string().min(1),display_name:p.string().min(1)}),hje=p.object({id:Wz,name:p.string().min(1)}),wse=p.object({id:MT,title:p.string().min(1),status:Xz,author:gje,project:hje.nullable(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable()}),IUt=p.object({type:p.literal("list"),list_type:p.literal("doc"),objects:p.array(wse)}),CUt=p.object({project_id:Wz.optional(),status:Xz.optional()}),vUt=p.object({title:p.string().trim().min(1).max(300).optional(),prosemirror_json:Nse.optional(),project_id:Wz.nullable().optional()}),RUt=p.object({id:MT,created_at:p.string().datetime()}),xUt=p.object({title:p.string().trim().min(1).max(300).optional(),prosemirror_json:Nse.optional(),project_id:Wz.nullable().optional(),status:Xz.optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),DUt=p.object({id:MT,updated_at:p.string().datetime()}),NUt=p.object({id:MT,title:p.string().min(1),prosemirror_json:Nse,status:Xz,author:gje,project:hje.nullable(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable()}),_je=TUt.router({listDocs:{method:"GET",path:"/docs",headers:p.object({authorization:p.string().min(1).optional()}),query:CUt,responses:{200:IUt,401:bu,403:bu},summary:"List docs in the authenticated user\u2019s organization. Optional project_id filter scopes to a single project."},createDoc:{method:"POST",path:"/docs",headers:p.object({authorization:p.string().min(1).optional()}),body:vUt,responses:{201:RUt,401:bu,403:bu,404:bu,422:bu},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:p.object({docId:MT}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:NUt,401:bu,403:bu,404:bu},summary:"Get a doc by id with its rich-text body and parent project (if any)"},updateDoc:{method:"PATCH",path:"/docs/:docId",pathParams:p.object({docId:MT}),headers:p.object({authorization:p.string().min(1).optional()}),body:xUt,responses:{200:DUt,401:bu,403:bu,404:bu,422:bu},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:p.object({docId:MT}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.object({}),401:bu,403:bu,404:bu},summary:"Hard-delete a doc and any mention references it owns"}})});var wUt,Lf,i8n,s8n,kUt,a8n,BUt,Vx,tH=k(()=>{"use strict";m();pc();wUt=["person","foot_gun"],Lf=p.enum(wUt),i8n=p.enum(["authored","commented","edited","mentioned"]),s8n=p.enum(["observed_in","reaffirmed_in"]),kUt=["primary"],a8n=p.enum(kUt),BUt=["supports","supersedes"],Vx=p.enum(BUt)});var OUt,kse=k(()=>{"use strict";m();pc();OUt=p.object({user_id:p.string().nullable()})});var PUt,Bse=k(()=>{"use strict";m();pc();PUt=p.object({typical_phrasings:p.array(p.string()).default([])})});var Ose=k(()=>{"use strict";m();tH();kse();Bse();tH();kse();Bse()});var MUt,zi,dd,LUt,yje,Sje,UUt,Eje,LT,QUt,FUt,GUt,jUt,zUt,Tje,Pse=k(()=>{"use strict";m();cA();pc();Ose();MUt=Su(),zi=p.object({message:p.string()}),dd=p.string().regex(/^ent_[0-9A-Za-z]{22}$/),LUt=["active","archived"],yje=p.enum(LUt),Sje=p.object({id:dd,kind:Lf,slug:p.string(),name:p.string(),blurb:p.string().nullable(),status:yje,lifecycle:p.string().nullable(),human_edited_at:p.string().datetime().nullable(),last_active_at:p.string().datetime(),created_at:p.string().datetime(),updated_at:p.string().datetime()}),UUt=p.object({thread_id:p.string(),thread_title:p.string(),role:p.string(),score:p.number().nullable(),added_at:p.string().datetime(),added_by:p.object({id:p.string(),display_name:p.string()})}),Eje=p.object({entity_id:dd,name:p.string(),slug:p.string(),kind:Lf,edge_kind:Vx}),LT=Sje.extend({payload:p.record(p.string(),p.unknown()),attachments:p.array(UUt),edges:p.object({outgoing:p.array(Eje),incoming:p.array(Eje)})}),QUt=p.object({type:p.literal("list"),list_type:p.literal("entities"),has_more:p.boolean(),objects:p.array(Sje)}),FUt=p.object({kind:Lf.optional().describe("Filter to a single entity kind"),status:yje.optional().describe("Filter by entity status"),after:dd.optional().describe("Cursor: return entities after this id"),before:dd.optional().describe("Cursor: return entities before this id")}),GUt=p.object({name:p.string().min(1).optional().describe("New display name for the entity"),blurb:p.string().nullable().optional().describe("New blurb; null clears it"),payload:p.record(p.string(),p.unknown()).optional().describe("Replacement payload for the entity")}),jUt=p.object({thread_id:p.string().min(1).describe("Id of the thread to attach"),role:p.string().min(1).describe("Role of the thread relative to the entity"),score:p.number().min(0).max(1).nullable().optional().describe("Optional relevance score in [0, 1]")}),zUt=p.object({to_id:dd.describe("Id of the target entity for the edge"),kind:Vx.describe("Kind of edge to create")}),Tje=MUt.router({listEntities:{method:"GET",path:"/entities",headers:p.object({authorization:p.string().min(1).optional()}),query:FUt,responses:{200:QUt,401:zi},summary:"List entities in the authenticated user\u2019s organization"},getEntity:{method:"GET",path:"/entities/:entityId",pathParams:p.object({entityId:dd.describe("Id of the entity to fetch")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:LT,401:zi,404:zi},summary:"Get an entity with its payload, attachments, and edges"},patchEntity:{method:"PATCH",path:"/entities/:entityId",pathParams:p.object({entityId:dd.describe("Id of the entity to update")}),headers:p.object({authorization:p.string().min(1).optional()}),body:GUt,responses:{200:LT,401:zi,403:zi,404:zi},summary:"Update an entity\u2019s name, blurb, or payload"},archiveEntity:{method:"POST",path:"/entities/:entityId/archive",pathParams:p.object({entityId:dd.describe("Id of the entity to archive")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}),responses:{200:LT,401:zi,403:zi,404:zi},summary:"Archive an entity"},attachEntityThread:{method:"POST",path:"/entities/:entityId/threads",pathParams:p.object({entityId:dd.describe("Id of the entity to attach a thread to")}),headers:p.object({authorization:p.string().min(1).optional()}),body:jUt,responses:{200:LT,401:zi,403:zi,404:zi},summary:"Attach a thread to an entity"},detachEntityThread:{method:"DELETE",path:"/entities/:entityId/threads/:threadId",pathParams:p.object({entityId:dd.describe("Id of the entity to detach a thread from"),threadId:p.string().min(1).describe("Id of the thread to detach")}),headers:p.object({authorization:p.string().min(1).optional()}),query:p.object({role:p.string().min(1).describe("Role of the thread membership to remove")}),responses:{200:LT,401:zi,403:zi,404:zi},summary:"Detach a thread from an entity"},addEntityEdge:{method:"POST",path:"/entities/:entityId/edges",pathParams:p.object({entityId:dd.describe("Id of the source entity for the edge")}),headers:p.object({authorization:p.string().min(1).optional()}),body:zUt,responses:{200:LT,401:zi,403:zi,404:zi},summary:"Add an edge from this entity to another entity"},removeEntityEdge:{method:"DELETE",path:"/entities/:entityId/edges/:toId/:kind",pathParams:p.object({entityId:dd.describe("Id of the source entity for the edge"),toId:dd.describe("Id of the target entity for the edge"),kind:Vx.describe("Kind of edge to remove")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:LT,401:zi,403:zi,404:zi},summary:"Remove an edge from this entity to another entity"}})});var HUt,$Ut,fa,bje,qUt,VUt,KUt,YUt,Ije,JUt,ZUt,Cje,Mse=k(()=>{"use strict";m();cA();pc();HUt=Su(),$Ut=p.object({type:p.literal("list"),list_type:p.literal("thread"),has_more:p.boolean(),objects:p.array(p.unknown())}),fa=p.object({message:p.string()}),bje=p.object({thread_id:p.string().min(1),is_favorited:p.boolean(),favorited_at:p.string().datetime().nullable()}),qUt=p.object({before:p.string().min(1).max(64).optional()}),VUt=p.object({id:p.string().min(1),display_name:p.string().min(1)}),KUt=p.object({block_id:p.string().min(1),thread_id:p.string().min(1),thread_title:p.string(),thread_visibility:p.enum(["private","workspace","public"]),author:VUt,preview:p.string(),prompted_at:p.string().datetime().nullable(),favorited_at:p.string().datetime()}),YUt=p.object({type:p.literal("list"),list_type:p.literal("favorite_prompt"),has_more:p.boolean(),objects:p.array(KUt)}),Ije=p.object({block_id:p.string().min(1),thread_id:p.string().min(1).nullable(),is_favorited:p.boolean(),favorited_at:p.string().datetime().nullable()}),JUt=p.object({before:p.string().min(1).max(64).optional()}),ZUt=p.object({block_ids:p.array(p.string().min(1))}),Cje=HUt.router({addThreadFavorite:{method:"POST",path:"/threads/:id/favorite",pathParams:p.object({id:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{201:bje,401:fa,403:fa,404:fa},summary:"Bookmark a thread for the authenticated user. Idempotent \u2014 re-favoriting returns the existing membership."},removeThreadFavorite:{method:"DELETE",path:"/threads/:id/favorite",pathParams:p.object({id:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:bje,401:fa,403:fa,404:fa},summary:"Remove a thread bookmark for the authenticated user (no-op if absent)."},listFavoriteThreads:{method:"GET",path:"/favorites/threads",headers:p.object({authorization:p.string().min(1).optional()}),query:qUt,responses:{200:$Ut,401:fa,403:fa},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:p.object({id:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{201:Ije,401:fa,403:fa,404:fa,409:fa},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:p.object({id:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:Ije,401:fa,404:fa},summary:"Remove a prompt bookmark for the authenticated user (no-op if absent)."},listFavoritePrompts:{method:"GET",path:"/favorites/prompts",headers:p.object({authorization:p.string().min(1).optional()}),query:JUt,responses:{200:YUt,401:fa},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:p.object({id:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:ZUt,401:fa,403:fa,404:fa},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 WUt,nH,XUt,rH,eQt,tQt,nQt,rQt,oQt,iQt,sQt,aQt,vje,Lse=k(()=>{"use strict";m();cA();pc();WUt=Su(),nH=p.object({message:p.string()}),XUt=["thread","plan","doc","user"],rH=p.enum(XUt),eQt=["doc","project"],tQt=p.enum(eQt),nQt=p.object({kind:rH,id:p.string().min(1),title:p.string().min(1),href:p.string().min(1)}),rQt=p.object({type:p.literal("list"),list_type:p.literal("mention"),objects:p.array(nQt)}),oQt=p.object({q:p.string().trim().min(1).max(50),kinds:p.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(p.array(rH).optional())}),iQt=p.object({source_kind:tQt,source_id:p.string().min(1),source_title:p.string().min(1),source_href:p.string().min(1),target_kind:rH,target_id:p.string().min(1),created_at:p.string().datetime()}),sQt=p.object({type:p.literal("list"),list_type:p.literal("backlink"),objects:p.array(iQt)}),aQt=p.object({target_kind:rH,target_id:p.string().min(1).max(64)}),vje=WUt.router({searchMentions:{method:"GET",path:"/mentions/search",headers:p.object({authorization:p.string().min(1).optional()}),query:oQt,responses:{200:rQt,401:nH,422:nH},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:p.object({authorization:p.string().min(1).optional()}),query:aQt,responses:{200:sQt,401:nH,403:nH},summary:"List every doc/project body in the caller\u2019s organization that mentions the given target. Newest-first."}})});var uQt,Mr,Use,il,cQt,HO,Qse,Rje,lQt,dQt,pQt,fQt,mQt,AQt,gQt,hQt,_Qt,EQt,yQt,SQt,TQt,bQt,IQt,xje,Fse=k(()=>{"use strict";m();cA();pc();eH();uQt=Su(),Mr=p.object({message:p.string()}),Use=p.record(p.string(),p.unknown()),il=p.string().regex(/^proj_[0-9A-Za-z]{22}$/),cQt=["active","archived"],HO=p.enum(cQt),Qse=p.object({id:p.string().min(1),display_name:p.string().min(1)}),Rje=p.object({thread_id:p.string().min(1),title:p.string().min(1),added_at:p.string().datetime(),added_by:Qse}),lQt=p.object({id:il,name:p.string().min(1),status:HO,author:Qse,thread_count:p.number().int().nonnegative(),doc_count:p.number().int().nonnegative(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable()}),dQt=p.object({type:p.literal("list"),list_type:p.literal("project"),objects:p.array(lQt)}),pQt=p.object({status:HO.optional()}),fQt=p.object({name:p.string().trim().min(1).max(200),prosemirror_json:Use.optional()}),mQt=p.object({id:il,created_at:p.string().datetime()}),AQt=p.object({name:p.string().trim().min(1).max(200).optional(),prosemirror_json:Use.optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),gQt=p.object({id:il,updated_at:p.string().datetime()}),hQt=p.object({archived:p.boolean()}),_Qt=p.object({id:il,status:HO,archived_at:p.string().datetime().nullable()}),EQt=p.object({id:il,name:p.string().min(1),prosemirror_json:Use,status:HO,author:Qse,summary:p.string().nullable(),summary_at:p.string().datetime().nullable(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable(),threads:p.array(Rje),docs:p.array(wse)}),yQt=p.object({id:il,summary:p.string(),summary_at:p.string().datetime()}),SQt=p.object({thread_id:p.string().min(1).max(64)}),TQt=Rje,bQt=p.object({id:il,name:p.string().min(1),status:HO}),IQt=p.object({type:p.literal("list"),list_type:p.literal("thread_project"),objects:p.array(bQt)}),xje=uQt.router({listProjects:{method:"GET",path:"/projects",headers:p.object({authorization:p.string().min(1).optional()}),query:pQt,responses:{200:dQt,401:Mr},summary:"List projects in the authenticated user\u2019s organization"},createProject:{method:"POST",path:"/projects",headers:p.object({authorization:p.string().min(1).optional()}),body:fQt,responses:{201:mQt,401:Mr,422:Mr},summary:"Create a new project in the authenticated user\u2019s organization"},getProject:{method:"GET",path:"/projects/:projectId",pathParams:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:EQt,401:Mr,403:Mr,404:Mr},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:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),body:AQt,responses:{200:gQt,401:Mr,403:Mr,404:Mr,422:Mr},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:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),body:hQt,responses:{200:_Qt,401:Mr,403:Mr,404:Mr},summary:"Archive (soft-delete) or unarchive a project"},synthesizeProject:{method:"POST",path:"/projects/:projectId/summary",pathParams:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:yQt,401:Mr,403:Mr,404:Mr,409:Mr,503:Mr},summary:"Generate (or refresh) the project\u2019s one-paragraph summary from its pinned threads. Persists to projects.summary."},addProjectThread:{method:"POST",path:"/projects/:projectId/threads",pathParams:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),body:SQt,responses:{201:TQt,401:Mr,403:Mr,404:Mr,409:Mr,422:Mr},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:p.object({projectId:il,threadId:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.object({}),401:Mr,403:Mr,404:Mr},summary:"Remove a thread membership from a project"},listThreadProjects:{method:"GET",path:"/threads/:threadId/projects",pathParams:p.object({threadId:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:IQt,401:Mr},summary:"List the projects a thread belongs to that are visible to the viewer (org/author scope). Returns an empty list when there are none."},deleteProject:{method:"DELETE",path:"/projects/:projectId",pathParams:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.object({}),401:Mr,403:Mr,404:Mr},summary:"Permanently delete a project. Thread memberships and tasks are removed (FK cascade); child docs are detached (project_id set null)."}})});var CQt,$n,sl,Nje,vQt,oH,iH,RQt,xQt,DQt,Dje,NQt,wQt,wje,kQt,BQt,OQt,PQt,MQt,LQt,UQt,QQt,FQt,GQt,jQt,zQt,HQt,$Qt,qQt,VQt,KQt,YQt,JQt,ZQt,kje,Gse=k(()=>{"use strict";m();cA();pc();CQt=Su(),$n=p.object({message:p.string()}),sl=p.string().regex(/^reg_[0-9A-Za-z]{22}$/),Nje=p.string().min(1).max(64),vQt=["active","quiet","dormant","archived"],oH=p.enum(vQt),iH=p.object({id:p.string().min(1),display_name:p.string().min(1),avatar_url:p.string().nullable().optional()}),RQt=p.object({id:p.string().min(1),display_name:p.string().min(1),thread_count:p.number().int().positive()}),xQt=["asked","requested","decided","corrected","shared","requirement"],DQt=p.enum(xQt),Dje=p.object({id:p.string().min(1),kind:DQt,summary:p.string(),thread_id:p.string().min(1),thread_title:p.string(),created_at:p.string().datetime()}),NQt=p.object({decided_14d:p.number().int().nonnegative(),asked_14d:p.number().int().nonnegative()}),wQt=p.object({id:sl,name:p.string().min(1),overlap_score:p.number().min(0).max(1)}),wje=p.object({thread_id:p.string().min(1),title:p.string().min(1),is_primary:p.boolean(),added_at:p.string().datetime(),added_by:iH}),kQt=p.object({id:sl,name:p.string().min(1),blurb:p.string().nullable(),status:oH,thread_count:p.number().int().nonnegative(),contributor_count:p.number().int().nonnegative(),comment_count:p.number().int().nonnegative(),contributors_preview:p.array(iH).max(3),top_filepath:p.string().nullable(),last_active_at:p.string().datetime(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable()}),BQt=p.object({type:p.literal("list"),list_type:p.literal("region"),objects:p.array(kQt)}),OQt=p.object({status:oH.optional()}),PQt=p.object({name:p.string().trim().min(1).max(200),blurb:p.string().trim().max(2e3).optional()}),MQt=p.object({id:sl,created_at:p.string().datetime()}),LQt=p.object({name:p.string().trim().min(1).max(200).optional(),blurb:p.string().trim().max(2e3).nullable().optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),UQt=p.object({id:sl,updated_at:p.string().datetime()}),QQt=p.object({archived:p.boolean()}),FQt=p.object({id:sl,status:oH,archived_at:p.string().datetime().nullable()}),GQt=p.object({id:sl,name:p.string().min(1),blurb:p.string().nullable(),status:oH,created_by:iH,thread_count:p.number().int().nonnegative(),last_active_at:p.string().datetime(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable(),synthesized_status:p.string().nullable(),synthesized_status_at:p.string().datetime().nullable(),threads:p.array(wje),contributors:p.array(RQt),decisions:p.object({decided:p.array(Dje),open:p.array(Dje)}),velocity:NQt,cited_by_active_regions:p.array(wQt)}),jQt=p.object({id:sl,synthesized_status:p.string(),synthesized_status_at:p.string().datetime()}),zQt=p.object({regions_created:p.number().int().nonnegative(),llm_dispatched:p.boolean()}),HQt=p.object({promoted_to_active:p.number().int().nonnegative(),demoted_to_quiet:p.number().int().nonnegative(),demoted_to_dormant:p.number().int().nonnegative()}),$Qt=p.object({thread_id:p.string().min(1),region_id:sl,region_name:p.string().min(1),score:p.number().min(0).max(1),signal:p.enum(["file","embedding","combined"])}),qQt=p.object({thread_ids:p.array(p.string().min(1)).min(1).max(50)}),VQt=p.object({type:p.literal("list"),list_type:p.literal("region_suggestion"),objects:p.array($Qt)}),KQt=p.object({thread_id:p.string().min(1),title:p.string(),created_at:p.string().datetime(),author:iH,user_message_count:p.number().int().nonnegative(),comment_count:p.number().int().nonnegative()}),YQt=p.object({type:p.literal("list"),list_type:p.literal("unfiled_thread"),objects:p.array(KQt)}),JQt=p.object({thread_id:Nje}),ZQt=wje,kje=CQt.router({listRegions:{method:"GET",path:"/regions",headers:p.object({authorization:p.string().min(1).optional()}),query:OQt,responses:{200:BQt,401:$n,403:$n},summary:"List regions in the authenticated user\u2019s organization"},createRegion:{method:"POST",path:"/regions",headers:p.object({authorization:p.string().min(1).optional()}),body:PQt,responses:{201:MQt,401:$n,403:$n,409:$n,422:$n},summary:"Create a new region in the authenticated user\u2019s organization"},getRegion:{method:"GET",path:"/regions/:regionId",pathParams:p.object({regionId:sl}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:GQt,401:$n,403:$n,404:$n},summary:"Get a region with its attached threads and rolled-up contributors"},updateRegion:{method:"PATCH",path:"/regions/:regionId",pathParams:p.object({regionId:sl}),headers:p.object({authorization:p.string().min(1).optional()}),body:LQt,responses:{200:UQt,401:$n,403:$n,404:$n,409:$n,422:$n},summary:"Rename a region or update its blurb"},archiveRegion:{method:"POST",path:"/regions/:regionId/archive",pathParams:p.object({regionId:sl}),headers:p.object({authorization:p.string().min(1).optional()}),body:QQt,responses:{200:FQt,401:$n,403:$n,404:$n},summary:"Archive or unarchive a region"},addRegionThread:{method:"POST",path:"/regions/:regionId/threads",pathParams:p.object({regionId:sl}),headers:p.object({authorization:p.string().min(1).optional()}),body:JQt,responses:{201:ZQt,401:$n,403:$n,404:$n,409:$n,422:$n},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:p.object({authorization:p.string().min(1).optional()}),body:qQt,responses:{200:VQt,401:$n,403:$n,422:$n},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:p.object({authorization:p.string().min(1).optional()}),query:p.object({days:p.coerce.number().int().positive().max(180).optional()}),responses:{200:YQt,401:$n,403:$n},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:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:HQt,401:$n,403:$n},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:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:zQt,401:$n,403:$n},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:p.object({regionId:sl}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:jQt,401:$n,403:$n,404:$n,409:$n,503:$n},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:p.object({regionId:sl,threadId:Nje}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.object({}),401:$n,403:$n,404:$n},summary:"Remove a thread membership from a region"}})});var WQt,Bje,XQt,eFt,tFt,nFt,rFt,Oje,jse=k(()=>{"use strict";m();cA();pc();WQt=Su(),Bje=p.object({message:p.string()}),XQt=p.object({id:p.string().min(1),title:p.string(),href:p.string().min(1),author_display_name:p.string().nullable(),author_handle:p.string().nullable()}),eFt=p.object({name:p.string().min(1),usage_count:p.number().int().nonnegative(),href:p.string().min(1)}),tFt=p.object({id:p.string().min(1),display_name:p.string(),handle:p.string().nullable(),avatar_url:p.string().nullable(),href:p.string().min(1)}),nFt=p.object({type:p.literal("global_search"),threads:p.array(XQt),skills:p.array(eFt),people:p.array(tFt)}),rFt=p.object({q:p.string().trim().min(1).max(80)}),Oje=WQt.router({globalSearch:{method:"GET",path:"/search",headers:p.object({authorization:p.string().min(1).optional()}),query:rFt,responses:{200:nFt,401:Bje,422:Bje},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 X8n,e$n,t$n,Do,oFt,iFt,sFt,aFt,zse,n$n,Pje=k(()=>{"use strict";m();pc();tH();Kx();X8n=p.enum(["thread","org","user","public"]),e$n=p.discriminatedUnion("kind",[p.object({kind:p.literal("thread"),id:p.string().min(1)}),p.object({kind:p.literal("org"),id:p.string().min(1)}),p.object({kind:p.literal("user"),id:p.string().min(1)}),p.object({kind:p.literal("public"),id:p.string().min(1)})]),t$n=p.enum(["thread.created","thread.completed","thread.block.appended","thread.comment.created","thread.comment.updated","thread.comment.deleted","thread.vote.cast","thread.vote.cleared","thread.participant.joined","thread.participant.left","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"]),Do=p.object({id:p.string().min(1),subjects:p.array(p.string().min(1)).min(1),actor_user_id:p.string().min(1).nullable(),created_at:p.string().datetime()}),oFt=p.object({thread_id:p.string().min(1),title:p.string(),author_id:p.string().min(1),created_at:p.string().datetime()}),iFt=p.enum(["user","assistant","tool","progress","system"]),sFt=p.enum(["claude_global","agents_global","claude_project","agents_project"]),aFt=p.enum(["private","workspace","public"]),zse=p.object({skill_id:p.string().min(1),name:p.string().min(1),root_kind:sFt,version:p.number().int().positive(),content_hash:p.string().startsWith("md5:")}),n$n=p.discriminatedUnion("type",[Do.extend({type:p.literal("thread.created"),payload:oFt}),Do.extend({type:p.literal("thread.completed"),payload:p.object({thread_id:p.string().min(1),completed_at:p.string().datetime()})}),Do.extend({type:p.literal("thread.block.appended"),payload:p.object({thread_id:p.string().min(1),block_id:p.string().min(1),block_type:iFt,excerpt:p.string().nullable()})}),Do.extend({type:p.literal("thread.comment.created"),payload:p.object({comment:p.lazy(()=>mA)})}),Do.extend({type:p.literal("thread.comment.updated"),payload:p.object({comment:p.lazy(()=>mA)})}),Do.extend({type:p.literal("thread.comment.deleted"),payload:p.object({thread_id:p.string().min(1),comment_id:p.string().min(1)})}),Do.extend({type:p.literal("thread.vote.cast"),payload:p.object({thread_id:p.string().min(1),vote_count:p.number().int().nonnegative()})}),Do.extend({type:p.literal("thread.vote.cleared"),payload:p.object({thread_id:p.string().min(1),vote_count:p.number().int().nonnegative()})}),Do.extend({type:p.literal("thread.participant.joined"),payload:p.object({thread_id:p.string().min(1),participant_user_id:p.string().min(1),role:p.enum(["owner","member"])})}),Do.extend({type:p.literal("thread.participant.left"),payload:p.object({thread_id:p.string().min(1),participant_user_id:p.string().min(1)})}),Do.extend({type:p.literal("user.followed"),payload:p.object({followee_id:p.string().min(1),followee_handle:p.string().nullable(),followee_display_name:p.string().nullable()})}),Do.extend({type:p.literal("user.joined"),payload:p.object({organization_id:p.string().min(1).nullable(),organization_name:p.string().nullable()})}),Do.extend({type:p.literal("user.presence"),payload:p.object({status:p.literal("online")})}),Do.extend({type:p.literal("entity.created"),payload:p.object({entity_id:p.string().min(1),kind:Lf,slug:p.string().min(1),name:p.string().min(1)})}),Do.extend({type:p.literal("entity.updated"),payload:p.object({entity_id:p.string().min(1),kind:Lf,changed_fields:p.array(p.string()).min(1),actor:p.enum(["agent","human"])})}),Do.extend({type:p.literal("entity.archived"),payload:p.object({entity_id:p.string().min(1),kind:Lf})}),Do.extend({type:p.literal("entity.thread_attached"),payload:p.object({entity_id:p.string().min(1),kind:Lf,thread_id:p.string().min(1),role:p.string().min(1),score:p.number().nullable()})}),Do.extend({type:p.literal("entity.thread_detached"),payload:p.object({entity_id:p.string().min(1),kind:Lf,thread_id:p.string().min(1),role:p.string().min(1)})}),Do.extend({type:p.literal("entity.linked"),payload:p.object({from_id:p.string().min(1),to_id:p.string().min(1),edge_kind:Vx})}),Do.extend({type:p.literal("entity.superseded"),payload:p.object({superseding_id:p.string().min(1),supersedes_id:p.string().min(1)})}),Do.extend({type:p.literal("skill.published"),payload:zse.extend({visibility:aFt})}),Do.extend({type:p.literal("skill.version.accepted"),payload:zse}),Do.extend({type:p.literal("skill.version.proposed"),payload:zse.extend({owner_user_id:p.string().min(1),proposer_user_id:p.string().min(1)})}),Do.extend({type:p.literal("skill.version.rejected"),payload:p.object({skill_id:p.string().min(1),version:p.number().int().positive(),reviewer_user_id:p.string().min(1),proposer_user_id:p.string().min(1)})}),Do.extend({type:p.literal("skill.installation.deleted"),payload:p.object({skill_id:p.string().min(1),installation_id:p.string().min(1),user_id:p.string().min(1)})})])});var Kje,uFt,cFt,A$n,lFt,dFt,g$n,z,pFt,Yje,Jje,Zje,fFt,mFt,AFt,Mje,gFt,hFt,Wje,_Ft,EFt,yFt,SFt,TFt,bFt,IFt,CFt,Xje,vFt,RFt,xFt,DFt,eze,uH,NFt,wFt,kFt,BFt,OFt,PFt,MFt,LFt,UFt,QFt,FFt,GFt,jFt,zFt,HFt,$Ft,Vse,tze,qFt,VFt,KFt,YFt,nze,JFt,ZFt,WFt,XFt,e4t,t4t,Uf,n4t,r4t,o4t,i4t,s4t,Jx,ch,a4t,u4t,rze,Kse,h$n,Hse,c4t,l4t,cH,d4t,oze,ize,p4t,$O,Yse,Lje,f4t,sze,Uje,m4t,A4t,mA,g4t,h4t,_4t,E4t,y4t,S4t,_$n,T4t,b4t,I4t,C4t,Jse,aze,v4t,R4t,x4t,D4t,N4t,w4t,uze,k4t,B4t,O4t,P4t,M4t,L4t,U4t,$se,Q4t,F4t,G4t,j4t,Zse,Wse,z4t,H4t,$4t,q4t,qO,V4t,K4t,Y4t,J4t,Z4t,W4t,X4t,e3t,t3t,n3t,r3t,o3t,i3t,s3t,Qje,a3t,u3t,c3t,l3t,d3t,p3t,f3t,m3t,A3t,g3t,h3t,VO,_3t,cze,E3t,y3t,S3t,T3t,b3t,I3t,Fje,C3t,v3t,R3t,lH,x3t,D3t,N3t,lze,w3t,k3t,B3t,O3t,P3t,M3t,L3t,U3t,Q3t,Gje,F3t,jje,G3t,j3t,z3t,H3t,$3t,q3t,V3t,K3t,Y3t,J3t,Z3t,dze,W3t,X3t,e6t,t6t,n6t,r6t,pze,o6t,i6t,s6t,a6t,fze,mze,u6t,c6t,l6t,d6t,zje,p6t,f6t,m6t,A6t,sH,g6t,h6t,_6t,E6t,y6t,S6t,T6t,b6t,I6t,C6t,v6t,R6t,x6t,Yx,Aze,qse,D6t,N6t,w6t,k6t,B6t,Hje,aH,O6t,$je,P6t,M6t,L6t,U6t,Q6t,F6t,G6t,j6t,z6t,H6t,$6t,q6t,V6t,K6t,Y6t,ny,qje,J6t,Z6t,W6t,X6t,eGt,tGt,nGt,rGt,oGt,iGt,sGt,aGt,uGt,cGt,lGt,dGt,pGt,fGt,mGt,AGt,gGt,Vje,hGt,gze,_Gt,EGt,yGt,SGt,TGt,dH,Kx=k(()=>{"use strict";m();n4e();cA();pc();eH();Pse();Mse();Lse();Fse();Gse();jse();Pje();Ose();Fse();Gse();Pse();eH();Lse();Mse();jse();Kje=30*1024*1024,uFt=Su(),cFt=["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"],A$n=new Set(cFt),lFt=p.object({id:p.string().uuid(),role:p.enum(["user","assistant"]),content:p.string().min(1),timestamp:p.string().datetime()}),dFt=p.object({id:p.string().uuid(),title:p.string().min(1),author:p.string().min(1),authorAvatar:p.string().min(1).max(4),model:p.string().min(1),turnCount:p.number().int().nonnegative(),createdAt:p.string().datetime(),preview:p.string()}),g$n=dFt.extend({messages:p.array(lFt)}),z=p.object({message:p.string()}),pFt=/^[a-zA-Z0-9_-]{2,32}$/,Yje=p.string().regex(pFt,"Handle must be 2\u201332 characters: letters, numbers, dashes, or underscores."),Jje=p.enum(["friend","events","twitter","linkedin","hacker_news","reddit","discord","youtube","google","ai_search","other"]),Zje=p.object({id:p.string(),first_name:p.string().min(1),last_name:p.string().min(1),display_name:p.string().min(1),handle:p.string().nullable(),bio:p.string().max(280).nullable(),avatar_url:p.string().nullable(),banner_url:p.string().nullable(),share_new_threads_to_workspace:p.boolean(),experimental_features_enabled:p.boolean(),onboarded_at:p.string().nullable(),attribution_source:Jje.nullable(),attribution_source_detail:p.string().nullable()}),fFt=p.object({email:p.string().nullable(),name:p.string().nullable(),handle:p.string().nullable(),created_at:p.string(),onboarded_at:p.string().nullable(),is_admin:p.boolean(),referred_by_user_id:p.string().nullable(),plan_tier:p.enum(["free","creator","team"]),organization_id:p.string().nullable(),signup_source:p.enum(["referral","organic"]),first_upload_at:p.string().nullable(),first_share_at:p.string().nullable(),first_cli_auth_at:p.string().nullable(),first_plugin_activated_at:p.string().nullable(),first_plugin_agent:p.string().nullable()}),mFt=p.object({group_key:p.string().min(1),properties:p.object({name:p.string(),plan_tier:p.enum(["free","creator","team"]),seat_count:p.number().int().nonnegative(),created_at:p.string(),email_domains:p.array(p.string()),default_thread_visibility:p.string(),member_count:p.number().int().nonnegative().nullable()})}),AFt=p.object({authProviderUserId:p.string().min(1).optional(),authProviderOrganizationId:p.string().min(1).optional(),org_name:p.string().min(1).optional(),workspaceOrganizationIds:p.array(p.string().min(1)).optional(),organizations:p.array(p.object({id:p.string().min(1),authProviderOrganizationId:p.string().min(1).optional(),name:p.string().min(1)})),emailAddress:p.string().email(),name:p.string().nullable(),user:Zje,is_admin:p.boolean(),is_new_signup:p.boolean(),posthog:p.object({user_properties:fFt,organization:mFt.nullable()})}),Mje=p.object({workos_client_id:p.string().min(1),workos_api_origin:p.string().url()}),gFt=p.object({share_new_threads_to_workspace:p.boolean().optional(),experimental_features_enabled:p.boolean().optional(),onboarded_at:p.union([p.literal("now"),p.null()]).optional(),attribution_source:Jje.nullable().optional(),attribution_source_detail:p.string().max(280).nullable().optional(),display_name:p.string().min(1).max(120).optional(),handle:Yje.optional(),bio:p.string().max(280).nullable().optional(),avatar_storage_url:p.string().min(1).nullable().optional(),banner_storage_url:p.string().min(1).nullable().optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),hFt=p.object({id:p.string(),display_name:p.string(),handle:p.string().nullable(),avatar_url:p.string().nullable(),visible_thread_count:p.number().int().nonnegative(),last_active_at:p.string().datetime().nullable(),product_last_seen_at:p.string().datetime().nullable()}),Wje=p.object({id:p.string().min(1),display_name:p.string().min(1),handle:p.string().nullable(),bio:p.string().max(280).nullable(),avatar_url:p.string().nullable(),banner_url:p.string().nullable(),organization_name:p.string().min(1).nullable(),created_at:p.string().min(1),visible_thread_count:p.number().int().nonnegative(),follower_count:p.number().int().nonnegative(),following_count:p.number().int().nonnegative(),published_project_count:p.number().int().nonnegative(),is_following:p.boolean(),is_self:p.boolean()}),_Ft=p.object({type:p.literal("list"),list_type:p.literal("organization_member"),objects:p.array(hFt)}),EFt=p.object({email_address:p.string().email()}),yFt=p.object({email_address:p.string().email(),invitation_id:p.string().min(1)}),SFt=p.object({organization_id:p.string().min(1),organization_name:p.string().min(1),domain:p.string().min(1),created:p.boolean()}),TFt=p.object({location:p.string().trim().min(1),contact:p.string().trim().email()}),bFt=p.object({name:p.string().trim().min(1).max(100).describe("Sender's name"),email:p.string().trim().email().max(200).describe("Reply-to email"),message:p.string().trim().min(1).max(5e3).describe("Message body"),company:p.string().max(200).optional()}),IFt=p.object({ok:p.boolean()}),CFt=p.object({location:p.string().min(1),contact:p.string().email(),created_at:p.string().datetime()}),Xje=p.enum(["general","bug","feature_request","question"]),vFt=p.object({type:Xje,message:p.string().trim().min(1).max(5e3)}),RFt=p.object({id:p.string().min(1),type:Xje,message:p.string().min(1),created_at:p.string().datetime()}),xFt=p.object({path_glob:p.string().min(1),name:p.string().min(1),description:p.string().min(1)}),DFt=p.object({repo_origin_path:p.string().min(1),building_blocks:p.array(xFt)}),eze=p.string().regex(/^th_[0-9A-Za-z]{22}$/),uH=p.string().regex(/^tb_[0-9A-Za-z]{22}$/),NFt=p.object({id:eze,author:p.object({id:p.string().min(1),display_name:p.string().min(1)}),title:p.string().min(1),excerpt:p.string(),created_at:p.string().datetime(),repo_origin_path:p.string().min(1),latest_revision_id:uH,revision_count:p.number().int().positive()}),wFt=p.object({id:p.string().min(1),display_name:p.string().min(1)}),kFt=p.object({id:p.string().min(1),author_id:p.string().min(1).nullable(),author:wFt.nullable(),created_at:p.string().datetime(),deleted_at:p.string().datetime().nullable(),content:p.string().min(1)}),BFt=p.object({id:p.string().min(1),thread_block_id:p.string().min(1),created_at:p.string().datetime(),resolved_at:p.string().datetime().nullable(),comments:p.array(kFt)}),OFt=p.object({thread_block_id:uH,from_position:p.number().int().positive(),to_position:p.number().int().positive(),selected_text:p.string().min(1),content:p.string().trim().min(1)}),PFt=p.object({id:p.string().min(1)}),MFt=p.object({content:p.string().trim().min(1)}),LFt=p.object({id:p.string().min(1)}),UFt=p.object({content:p.string().trim().min(1)}),QFt=p.object({id:p.string().min(1)}),FFt=p.object({content:p.string().trim().min(1)}),GFt=p.object({id:p.string().min(1)}),jFt=p.object({resolved:p.boolean()}),zFt=p.object({id:p.string().min(1),resolved_at:p.string().datetime().nullable()}),HFt=p.object({resolved:p.boolean()}),$Ft=p.object({id:p.string().min(1),resolved_at:p.string().datetime().nullable()}),Vse=p.record(p.string(),p.unknown()),tze=p.object({id:uH,body:p.string().nullable(),created_at:p.string().datetime(),prosemirror_json:Vse.nullable(),comment_threads:p.array(BFt)}),qFt=tze.extend({body:p.string(),prosemirror_json:Vse}),VFt=p.object({id:eze,created_at:p.string().datetime(),repo_origin_path:p.string().min(1),author:p.object({id:p.string().min(1),display_name:p.string().min(1)}),latest_revision_id:uH,revision_count:p.number().int().positive(),revisions:p.array(tze)}),KFt=p.object({type:p.literal("list"),list_type:p.literal("plan"),has_more:p.boolean(),objects:p.array(NFt)}),YFt=p.object({before:p.string().min(1).optional(),after:p.string().min(1).optional(),author_id:p.string().min(1).optional(),repo_origin_path:p.string().min(1).optional()}),nze=p.object({id:p.string().min(1),organization_id:p.string().min(1).nullable(),created_at:p.string().min(1),repo_origin_path:p.string().min(1),path_glob:p.string().min(1),name:p.string().min(1),description:p.string().min(1)}),JFt=p.array(nze),ZFt=p.object({type:p.literal("list"),list_type:p.literal("building_block"),has_more:p.boolean(),objects:p.array(nze)}),WFt=p.object({repo_origin_path:p.string().min(1),before:p.string().min(1).optional(),after:p.string().min(1).optional()}),XFt=p.enum(["thread","building_block"]),e4t=p.object({repo_origin_path:p.string().min(1),sources:p.array(XFt).nonempty()}),t4t=p.object({type:p.literal("list"),list_type:p.literal("repository"),has_more:p.boolean(),objects:p.array(e4t)}),Uf=p.enum(["claudeCode","codex","amp","lore","cursor","cowork","unspecified"]),n4t=p.enum(["claudeCode","codex","amp","cursor","cowork","unspecified"]),r4t=p.object({uploads:p.array(p.string()),outputs:p.array(p.string())}),o4t=p.object({connected:p.boolean(),last_upload_at:p.string().nullable(),harnesses:p.array(Uf)}),i4t=["transcript","plan"],s4t=p.enum(i4t),Jx=p.enum(["private","workspace","public"]),ch=p.enum(["claude_global","agents_global","claude_project","agents_project"]),a4t=p.object({name:p.string().min(1),description:p.string().nullable(),root_kind:ch,file_path:p.string().min(1),also_seen_at:p.array(p.string().min(1)),skill_id:p.string().min(1).optional(),local_content_hash:p.string().startsWith("md5:").optional()}),u4t=p.object({skill_id:p.string().min(1),name:p.string().min(1),description:p.string().nullable(),file_path:p.string().min(1),manifest_path:p.string().min(1)}),rze=p.object({type:p.literal("local_skill_scanner_output"),skills:p.record(p.string(),p.array(a4t)),cowork_skills:p.record(p.string(),p.array(u4t))}),Kse=p.enum(["accepted","proposed","rejected","superseded"]),h$n=p.enum(["initial_publish","owner_update","subscriber_update"]),Hse=p.object({md5:p.string().min(1).describe("Raw hex MD5 used to verify uploaded SKILL.md bytes"),name:p.string().min(1).describe("Skill directory/name, e.g. code-review"),filename:p.string().min(1).describe("Upload object filename, usually <name>/SKILL.md").optional(),description:p.string().nullable().describe("Optional skill description extracted from frontmatter").optional(),root_kind:ch.describe("Local root kind where this skill file came from"),base_version:p.number().int().positive().describe("Installed base version for local edits").optional()}),c4t=p.discriminatedUnion("sync_action",[Hse.extend({sync_action:p.literal("initial_publish").describe("Publish a local skill without an existing server skill ID"),skill_id:p.never().optional()}),Hse.extend({sync_action:p.literal("owner_update").describe("Publish an accepted update to an owned skill"),skill_id:p.string().min(1).describe("Existing skill ID for owner updates")}),Hse.extend({sync_action:p.literal("subscriber_update").describe("Propose an update to an installed workspace skill"),skill_id:p.string().min(1).describe("Existing skill ID for subscriber update proposals")})]),l4t=p.object({md5:p.string().min(1),harness:n4t,filename:p.string().min(1).optional(),repo_origin_path:p.string().min(1).optional(),harness_internal_id:p.string().min(1).optional(),file_type:s4t.optional(),artifact_metadata:r4t.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"}),cH=p.object({id:p.string().min(1),display_name:p.string().min(1),avatar_url:p.string().nullable()}),d4t=p.object({id:p.string().min(1),display_name:p.string().min(1)}),oze=p.object({id:p.string().min(1),author_id:p.string().min(1).nullable(),author:d4t.nullable(),created_at:p.string().datetime(),deleted_at:p.string().datetime().nullable(),content:p.string().min(1)}),ize=p.object({id:p.string().min(1),thread_block_id:p.string().min(1),created_at:p.string().datetime(),resolved_at:p.string().datetime().nullable()}),p4t=ize.extend({comments:p.array(oze)}),$O=p.object({id:p.string().min(1),type:p.string().min(1),index_in_thread:p.number().int().nonnegative(),isCritiqued:p.boolean(),comment_threads:p.array(p4t).optional()}).passthrough(),Yse=p.object({type:p.literal("list"),list_type:p.literal("thread_block"),has_more:p.boolean(),objects:p.array($O)}),Lje=$O.extend({type:p.literal("plan"),prosemirror_json:Vse,thread_file_id:p.string().min(1)}),f4t=p.union([p.literal(-1),p.literal(1)]),sze=p.union([p.literal(-1),p.literal(0),p.literal(1)]),Uje=p.object({score:p.number().int(),up_count:p.number().int().nonnegative(),down_count:p.number().int().nonnegative(),viewer_vote:sze}),m4t=p.object({value:f4t}),A4t=p.object({id:p.string().min(1),display_name:p.string().min(1),avatar_url:p.string().nullable()}),mA=p.object({id:p.string().min(1),thread_id:p.string().min(1),author_id:p.string().min(1).nullable(),author:A4t.nullable(),parent_comment_id:p.string().min(1).nullable(),content:p.string(),created_at:p.string().datetime(),updated_at:p.string().datetime(),deleted_at:p.string().datetime().nullable()}),g4t=p.object({type:p.literal("list"),list_type:p.literal("thread_comment"),objects:p.array(mA)}),h4t=p.object({content:p.string().trim().min(1).max(4e3),parent_comment_id:p.string().min(1).optional()}),_4t=mA,E4t=p.object({content:p.string().trim().min(1).max(4e3)}),y4t=mA,S4t=mA,_$n=p.discriminatedUnion("kind",[p.object({kind:p.literal("created"),thread_id:p.string().min(1),actor_user_id:p.string().min(1),version:p.number(),comment:mA}),p.object({kind:p.literal("updated"),thread_id:p.string().min(1),actor_user_id:p.string().min(1),version:p.number(),comment:mA}),p.object({kind:p.literal("deleted"),thread_id:p.string().min(1),actor_user_id:p.string().min(1),version:p.number(),comment:mA})]),T4t=p.enum(["pending","generating","ready","failed"]),b4t=p.enum(["pending","generating","ready","failed"]),I4t=p.enum(["pending","placeholder","ai","user","command","harness"]),C4t=p.enum(["pending","generating","ready","failed"]),Jse=p.enum(["pending","generating","ready","failed","disabled"]),aze=p.enum(["pending","generating","ready","failed"]),v4t=p.object({title:p.string().min(1),body:p.string().min(1),files:p.array(p.string()).optional()}),R4t=p.object({status:Jse,url:p.string().nullable(),url_expires_at:p.string().nullable(),generated_at:p.string().nullable(),model:p.string().nullable()}),x4t=p.object({status:aze,steps:p.array(v4t),generated_at:p.string().nullable()}),D4t=p.object({cover:R4t,how_to:x4t}),N4t=p.object({id:p.string().min(1),title:p.string().min(1),author:p.object({id:p.string().min(1),display_name:p.string(),handle:p.string().nullable(),avatar_url:p.string().nullable()}),cover:p.object({url:p.string(),url_expires_at:p.string()}),started_at:p.string(),cover_generated_at:p.string()}),w4t=p.object({type:p.literal("list"),list_type:p.literal("card_feed_item"),has_more:p.boolean(),objects:p.array(N4t)}),uze=p.enum(["asked","requested","decided","corrected","shared","requirement"]),k4t=p.object({id:p.string().min(1),kind:uze,summary:p.string().min(1),block_id:p.string().min(1)}),B4t=p.object({block_id:p.string().min(1),status:C4t,generated_at:p.string().nullable()}),O4t=p.object({type:p.literal("list"),list_type:p.literal("thread_decision"),objects:p.array(k4t),block_statuses:p.array(B4t)}),P4t=p.object({forker_intent:p.string().min(1).max(2e3).describe("What the forking user wants to do next with this session")}),M4t=p.object({source_thread_id:p.string().min(1),forker_intent:p.string(),source_distilled:p.string().min(1).describe("Intent-conditioned handoff summary of the source thread for a new agent")}),L4t=p.object({question:p.string().trim().min(1).max(2e3).describe("Question to answer from visible Lore thread decisions and titles")}),U4t=p.object({id:p.string().min(1),kind:uze,summary:p.string().min(1),block_id:p.string().min(1)}),$se=p.object({thread_id:p.string().min(1),title:p.string().min(1),summary:p.string().nullable(),started_at:p.string().datetime(),score:p.number(),matched_by:p.enum(["summary","decision","thread"]),decisions:p.array(U4t)}),Q4t=p.object({id:p.string().min(1),kind:p.enum(["agent","tool","retrieval","answer","sources"]),title:p.string().min(1),status:p.enum(["completed"]),summary:p.string().min(1),duration_ms:p.number().nonnegative().optional(),metadata:p.object({retrieved_decisions:p.number().int().nonnegative().optional(),returned_sources:p.number().int().nonnegative().optional(),cited_sources:p.number().int().nonnegative().optional(),matched_sources:p.array($se).optional(),searched_query:p.string().min(1).optional(),since:p.string().min(1).optional(),until:p.string().min(1).optional(),thread_id:p.string().min(1).optional(),thread_ids:p.array(p.string().min(1)).optional(),question:p.string().min(1).optional()}).optional()}),F4t=p.object({steps:p.array(Q4t)}),G4t=p.object({answer:p.string(),sources:p.array($se),matched_sources:p.array($se).describe("Threads matched by the vector decision search before citation filtering"),searched_query:p.string().describe("String embedded for the vector decision search"),trace:F4t.optional()}),j4t=/^[a-zA-Z0-9_.:-]{1,64}$/,Zse=p.record(p.string().regex(j4t,"Metadata keys must be 1\u201364 characters: letters, numbers, underscore, dot, colon, or dash."),p.string().max(512,"Metadata values must be at most 512 characters.")).refine(e=>Object.keys(e).length<=20,{message:"Upload metadata may contain at most 20 keys."}).refine(e=>new TextEncoder().encode(JSON.stringify(e)).byteLength<=4096,{message:"Upload metadata JSON must be at most 4 KB."}),Wse=p.object({id:p.string().min(1),name:p.string().min(1),organization_id:p.string().min(1),key_prefix:p.string().min(1),key_last_four:p.string().length(4),default_visibility:p.literal("workspace"),created_at:p.string().datetime(),last_used_at:p.string().datetime().nullable(),revoked_at:p.string().datetime().nullable()}),z4t=p.object({type:p.literal("list"),list_type:p.literal("upload_api_key"),has_more:p.literal(!1),objects:p.array(Wse)}),H4t=p.object({name:p.string().trim().min(1).max(200).describe("Human-readable Upload API key name"),organization_id:p.string().min(1).optional().describe("Workspace organization id. Defaults to the authenticated active organization."),default_visibility:p.literal("workspace").optional().describe("Default visibility for uploaded threads. Only workspace is supported in this build.")}),$4t=Wse.extend({raw_key:p.string().min(1)}),q4t=p.object({organization_id:p.string().min(1).optional().describe("Workspace organization id. Defaults to the authenticated active organization.")}),qO=p.object({id:p.string().min(1),thread_file_id:p.string().min(1),organization_id:p.string().min(1).nullable(),upload_api_key_id:p.string().min(1).nullable(),upload_metadata:Zse,deleted_at:p.string().datetime().nullable(),author:cH,repo:p.string().min(1),title:p.string().min(1),started_at:p.string().min(1),last_activity_at:p.string().datetime().nullable(),blocks:Yse,user_message_count:p.number().int().nonnegative(),files_touched:p.array(p.string()),skills_invoked:p.array(p.string()),slash_commands_invoked:p.array(p.string()),harness:Uf,transcript_parsing_state:p.enum(["pending","parsed","too_large_to_parse","failed"]),visibility:p.enum(["private","workspace","public"]),has_plan:p.boolean().optional(),summary:p.string().nullable(),summary_status:T4t,summary_generated_at:p.string().nullable(),title_status:b4t,title_generated_at:p.string().nullable(),title_source:I4t,score:p.number().int(),up_count:p.number().int().nonnegative(),down_count:p.number().int().nonnegative(),viewer_vote:sze,comment_count:p.number().int().nonnegative(),is_favorited:p.boolean(),card:D4t}),V4t=p.object({storage_url:p.string().min(1)}),K4t=p.object({storage_url:p.string().min(1)}),Y4t=p.object({storage_url:p.string(),harness:Uf,thread:qO.nullable()}),J4t=p.object({status:p.literal("complete"),thread_files:p.array(Y4t),skill_files:p.array(p.object({storage_url:p.string(),skill:p.object({id:p.string(),name:p.string(),version:p.number().int().positive(),latest_version:p.number().int().positive(),visibility:Jx,root_kind:ch,version_status:Kse.optional(),content_hash:p.string()}).nullable()})).optional()}),Z4t=p.object({id:p.string(),presigned_url:p.string().nullable(),presigned_url_expires_at:p.string().nullable(),storage_url:p.string(),harness:Uf,expected_md5:p.string(),error:p.string().nullable(),thread:qO.nullable()}),W4t=p.object({id:p.string(),presigned_url:p.string().nullable(),presigned_url_expires_at:p.string().nullable(),storage_url:p.string(),expected_md5:p.string(),name:p.string(),error:p.string().nullable()}),X4t=p.object({id:p.string(),substrate:p.enum(["s3","filesystem"]),status:p.enum(["incomplete","locked_for_parsing","complete","error"]),thread_files:p.array(Z4t),skill_files:p.array(W4t).optional()}),e3t=p.object({query:p.string().min(1).describe("Natural-language description of the block or block range to highlight")}),t3t=p.object({thread_id:p.string(),url:p.string().url(),start_block_id:p.string().nullable(),end_block_id:p.string().nullable(),matched:p.boolean()}),n3t=p.object({}),r3t=p.object({thread_id:p.string().min(1)}),o3t=p.object({visibility:p.enum(["private","workspace","public"]).optional(),title:p.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"}),i3t=p.discriminatedUnion("visibility",[p.object({visibility:p.literal("private")}),p.object({visibility:p.literal("workspace")}),p.object({visibility:p.literal("public"),title:p.string().min(1),author_display_name:p.string().min(1),author_avatar_url:p.string().nullable(),first_user_message:p.string().nullable(),summary:p.string().nullable(),started_at:p.string().min(1),harness:Uf,cover_url:p.string().nullable()})]),s3t=p.object({id:p.string().min(1),upload_api_key_id:p.string().min(1).nullable(),upload_metadata:Zse,author:cH,repo:p.string().min(1),title:p.string().min(1),started_at:p.string().min(1),last_activity_at:p.string().datetime().nullable(),blocks:Yse,user_message_count:p.number().int().nonnegative(),comment_count:p.number().int().nonnegative(),files_touched:p.array(p.string()),skills_invoked:p.array(p.string()),harness:Uf,visibility:p.enum(["private","workspace","public"]),has_plan:p.boolean().optional(),is_favorited:p.boolean(),participants:p.array(p.object({id:p.string().min(1),display_name:p.string(),avatar_url:p.string().nullable()})).optional()}),Qje=p.object({type:p.literal("list"),list_type:p.literal("thread"),has_more:p.boolean(),objects:p.array(s3t)}),a3t=p.enum(["recent","popular"]),u3t=p.enum(["everyone","following"]),c3t=qO,l3t=p.object({type:p.literal("list"),list_type:p.literal("discover_thread"),has_more:p.boolean(),objects:p.array(c3t)}),d3t=p.object({before:p.string().min(1).optional(),after:p.string().min(1).optional(),sort:a3t.optional(),scope:u3t.optional(),harness:Uf.optional(),search:p.string().max(200).optional()}),p3t=p.object({thread_count:p.number().int().nonnegative(),author_count:p.number().int().nonnegative(),organization_count:p.number().int().nonnegative(),harness_breakdown:p.record(p.string(),p.number().int().nonnegative()).refine(e=>Object.keys(e).every(t=>Uf.safeParse(t).success),"Harness breakdown keys must be known harness values")}),f3t=p.object({id:p.string(),status:p.enum(["incomplete","locked_for_parsing","complete","error"]),created_at:p.string(),thread_count:p.number().int().nonnegative(),skill_count:p.number().int().nonnegative().default(0),thread_ids:p.array(p.string()).default([])}),m3t=p.object({type:p.literal("list"),list_type:p.literal("upload_session"),objects:p.array(f3t)}),A3t=p.object({before:p.string().min(1).optional(),after:p.string().min(1).optional()}),g3t=p.object({before:p.string().min(1).optional(),after:p.string().min(1).optional(),author_ids:p.string().min(1).optional(),upload_api_key_ids:p.string().min(1).optional().describe("Comma-separated Upload API key ids to filter by."),upload_metadata:p.string().min(1).optional().describe("URL-encoded JSON object of exact-match upload metadata filters."),created_at:p.string().min(1).optional(),filepath_prefixes:p.string().min(1).optional(),decision_kinds:p.string().min(1).optional().describe("Comma-separated decision kinds (asked, requested, decided, corrected, shared, requirement); returns threads with at least one matching decision."),q:p.string().trim().min(1).max(200).optional()}),h3t=p.object({path:p.string().min(1),start_offset:p.number().int().nonnegative(),end_offset:p.number().int().positive()}),VO=p.object({id:p.string(),display_name:p.string(),avatar_url:p.string().nullable()}),_3t=p.object({before:p.string().min(1).optional().describe("Skill ID cursor. Returns skills newer than this cursor in descending created_at order."),after:p.string().min(1).optional().describe("Skill ID cursor. Returns skills older than this cursor in descending created_at order.")}),cze=p.object({id:p.string(),name:p.string(),description:p.string().nullable(),visibility:Jx,root_kind:ch,latest_version:p.number().int().nonnegative().nullable(),content_hash:p.string().nullable(),has_content:p.boolean(),owner:VO.nullable(),usage_count:p.number().int().nonnegative(),author_count:p.number().int().nonnegative(),first_used_at:p.string().nullable(),last_used_at:p.string().nullable()}),E3t=p.object({type:p.literal("list"),list_type:p.literal("skill"),has_more:p.boolean(),objects:p.array(cze)}),y3t=p.object({skill_ids:p.string().optional().describe("Comma-separated local Lore skill IDs, e.g. sk_...,sk_..."),content_hashes:p.string().optional().describe("Comma-separated local SKILL.md content hashes, e.g. md5:...,md5:...")}),S3t=cze.pick({id:!0,name:!0,description:!0,visibility:!0,root_kind:!0,latest_version:!0,content_hash:!0,has_content:!0,owner:!0}),T3t=p.object({type:p.literal("local_skill_reconciliation"),objects:p.array(S3t)}),b3t=p.object({id:p.string(),title:p.string(),visibility:p.enum(["private","workspace","public"]),started_at:p.string(),author:cH,skills_invoked:p.array(p.string())}),I3t=p.object({version:p.number().int().positive().describe("Version timestamp for this SKILL.md body"),content_hash:p.string().describe("Content-addressed skill body hash, prefixed by hash type"),status:Kse.describe("Review status for this skill version"),created_at:p.string().describe("ISO-8601 timestamp when this version was uploaded"),created_by:VO.nullable().describe("User who uploaded/proposed this version, when known"),reviewed_at:p.string().nullable().describe("ISO-8601 timestamp when the owner reviewed this version"),reviewed_by:VO.nullable().describe("Owner who approved or rejected this version"),rejection_reason:p.string().nullable().describe("Owner-provided rejection reason for rejected versions")}),Fje=p.object({id:p.string(),name:p.string(),description:p.string().nullable(),visibility:Jx,root_kind:ch,latest_version:p.number().int().nonnegative().nullable(),content_hash:p.string().nullable(),owner:VO.nullable(),usage_count:p.number().int().nonnegative(),author_count:p.number().int().nonnegative(),first_used_at:p.string().nullable(),last_used_at:p.string().nullable(),versions:p.array(I3t),threads:p.array(b3t),share_token:p.string().nullable()}),C3t=p.object({visibility:Jx}),v3t=p.object({type:p.literal("shared_skill_preview"),id:p.string(),name:p.string(),description:p.string().nullable(),root_kind:ch,owner:VO.nullable(),latest_version:p.number().int().nonnegative().nullable(),has_content:p.boolean(),viewer_can_install:p.boolean()}),R3t=p.enum(["cowork","native"]),lH=p.enum(["upload","output"]),x3t=p.enum(["private","workspace","public"]),D3t=p.object({id:p.string(),display_name:p.string(),avatar_url:p.string().nullable()}),N3t=p.object({scope:p.enum(["mine","workspace"]).optional().describe("`mine` (default) returns artifacts you authored; `workspace` returns all visible artifacts in your org."),thread_id:p.string().optional().describe("Restrict to artifacts produced by a single thread, e.g. th_..."),author_ids:p.string().optional().describe("Comma-separated user IDs to filter by author, e.g. user_...,user_..."),before:p.string().min(1).optional().describe("Artifact ID cursor. Returns artifacts newer than this cursor in descending created_at order."),after:p.string().min(1).optional().describe("Artifact ID cursor. Returns artifacts older than this cursor in descending created_at order.")}),lze=p.object({id:p.string(),thread_id:p.string(),thread_title:p.string(),source:R3t,kind:lH,file_name:p.string(),mime_type:p.string().nullable(),size_in_bytes:p.number().int().nonnegative().nullable(),content_hash:p.string().nullable(),visibility:x3t,owner:D3t.nullable(),created_at:p.string(),updated_at:p.string()}),w3t=p.object({type:p.literal("list"),list_type:p.literal("artifact"),has_more:p.boolean(),objects:p.array(lze)}),k3t=lze.extend({download_url:p.string().describe("Presigned, time-limited URL to download the artifact bytes."),download_url_expires_at:p.string().describe("ISO-8601 expiry for download_url.")}),B3t=p.object({kind:lH,file_name:p.string(),md5:p.string(),size_in_bytes:p.number().int().nonnegative(),content_type:p.string().nullable().optional()}),O3t=p.object({harness:p.string().describe("Harness of the source session, e.g. cowork"),harness_internal_id:p.string().describe("Source session id (threads.harness_internal_id)"),artifact_files:p.array(B3t).min(1)}),P3t=p.object({thread_id:p.string(),artifact_files:p.array(p.object({kind:lH,file_name:p.string(),presigned_url:p.string().nullable(),storage_url:p.string()}))}),M3t=p.object({harness:p.string(),harness_internal_id:p.string(),artifacts:p.array(p.object({kind:lH,file_name:p.string(),storage_url:p.string(),md5:p.string(),size_in_bytes:p.number().int().nonnegative(),content_type:p.string().nullable().optional()})).min(1)}),L3t=p.object({thread_id:p.string(),created:p.number().int().nonnegative().describe("Number of artifact rows created or updated.")}),U3t=p.object({id:p.string(),name:p.string(),visibility:Jx,root_kind:ch,latest_version:p.number().int().nonnegative(),content_hash:p.string()}),Q3t=p.object({installation_id:p.string(),already_registered:p.boolean(),body_md_url:p.string(),skill:U3t}),Gje=p.object({id:p.string(),skill_id:p.string(),installed_version:p.number().int().nonnegative().nullable(),already_registered:p.boolean().optional()}),F3t=p.object({installed_version:p.number().int().nonnegative().describe("Accepted skill version that was successfully written locally")}),jje=p.object({id:p.string(),name:p.string(),version:p.number().int().positive(),latest_version:p.number().int().positive(),visibility:Jx,root_kind:ch,version_status:Kse,content_hash:p.string()}),G3t=p.object({id:p.string(),unpublished:p.literal(!0)}),j3t=p.object({reason:p.string().optional().describe("Optional owner-provided reason for rejecting the proposed version")}),z3t=p.object({id:p.string(),skill_id:p.string(),name:p.string(),description:p.string().nullable(),root_kind:ch,latest_version:p.number().int().nonnegative(),latest_content_hash:p.string(),installed_version:p.number().int().nonnegative().nullable()}),H3t=p.object({type:p.literal("list"),list_type:p.literal("skill_installation_sync"),has_more:p.boolean(),objects:p.array(z3t)}),$3t=p.object({path:p.string().min(1),text:p.string().max(64e3)}),q3t=p.enum(["text_edit","redact","delete_block"]),V3t=p.object({id:p.string(),thread_block_id:p.string(),editor:p.object({id:p.string(),display_name:p.string()}),kind:q3t,path:p.string().nullable(),previous_text:p.string().nullable(),new_text:p.string().nullable(),created_at:p.string()}),K3t=p.object({type:p.literal("list"),list_type:p.literal("thread_block_edit"),objects:p.array(V3t)}),Y3t=p.object({organization_count:p.number().int().nonnegative(),user_count:p.number().int().nonnegative(),thread_count:p.number().int().nonnegative(),thread_count_last_24h:p.number().int().nonnegative(),user_count_last_24h:p.number().int().nonnegative()}),J3t=p.object({id:p.string(),name:p.string(),email_domains:p.array(p.string()),member_count:p.number().int().nonnegative(),thread_count:p.number().int().nonnegative(),default_thread_visibility:p.enum(["private","workspace","public"]),created_at:p.string()}),Z3t=p.object({type:p.literal("list"),list_type:p.literal("admin_organization"),objects:p.array(J3t)}),dze=p.object({id:p.string(),name:p.string()}),W3t=p.object({id:p.string(),display_name:p.string(),workos_id:p.string(),thread_count:p.number().int().nonnegative(),onboarded_at:p.string().nullable(),created_at:p.string(),organizations:p.array(dze)}),X3t=p.object({q:p.string().trim().min(1).max(120).optional()}),e6t=p.object({follower_id:p.string().min(1),followee_id:p.string().min(1)}),t6t=p.object({follower_id:p.string().min(1),followee_id:p.string().min(1),is_following:p.literal(!0)}),n6t=p.object({skill_id:p.string().min(1),deleted:p.object({skills:p.number().int().nonnegative(),versions:p.number().int().nonnegative(),files:p.number().int().nonnegative(),installations:p.number().int().nonnegative()}),cli_command:p.string().min(1)}),r6t=p.object({type:p.literal("list"),list_type:p.literal("admin_user"),objects:p.array(W3t)}),pze=p.object({id:p.string(),title:p.string(),started_at:p.string(),created_at:p.string(),deleted_at:p.string().nullable(),visibility:p.enum(["private","workspace","public"]),harness:Uf,harness_internal_id:p.string(),thread_file_id:p.string(),transcript_parsing_state:p.enum(["pending","parsed","too_large_to_parse","failed"]),author:cH,organization:dze.nullable()}),o6t=p.object({id:p.string(),content_type:p.enum(["transcript","plan"]),harness:Uf,harness_internal_id:p.string(),expected_md5:p.string(),size_in_bytes:p.number().int().nonnegative().nullable(),created_at:p.string()}),i6t=p.object({thread:pze,latest_transcript_file:o6t.nullable()}),s6t=p.object({type:p.literal("list"),list_type:p.literal("admin_thread"),has_more:p.boolean(),objects:p.array(pze)}),a6t=p.object({before:p.string().min(1).optional(),after:p.string().min(1).optional()}),fze=p.enum(["new","replied","dismissed"]),mze=p.object({id:p.string(),tweet_id:p.string(),author_handle:p.string(),author_name:p.string(),author_followers:p.number().int().nonnegative(),text:p.string(),url:p.string().url(),tweet_created_at:p.string(),like_count:p.number().int().nonnegative(),retweet_count:p.number().int().nonnegative(),reply_count:p.number().int().nonnegative(),matched_query:p.string(),relevance_score:p.number().int().nullable(),relevance_reason:p.string().nullable(),status:fze,collected_at:p.string()}),u6t=p.object({type:p.literal("list"),list_type:p.literal("admin_tweet_lead"),objects:p.array(mze)}),c6t=p.object({status:fze}),l6t=p.object({thread_id:p.string().min(1).optional().describe("Lore thread id, e.g. th_xxx."),thread_file_id:p.string().min(1).optional().describe("Thread file id, e.g. tf_xxx."),harness:Uf.optional().describe("Harness name, e.g. claudeCode."),harness_internal_id:p.string().min(1).optional().describe("Harness-native session id.")}),d6t=p.object({thread_id:p.string().min(1),thread_file_id:p.string().min(1),event_name:p.literal("lore/thread-files.parse.requested")}),zje=p.object({token:p.string().min(1),thread_id:p.string().min(1)}),p6t=p.object({visitor:p.string().min(1).max(64).optional()}),f6t=p.object({user_id:p.string(),display_name:p.string(),shares_sent:p.number().int().nonnegative(),unique_viewers:p.number().int().nonnegative(),attributed_signups:p.number().int().nonnegative()}),m6t=p.object({window_days:p.number().int().positive(),shares_sent:p.number().int().nonnegative(),unique_viewers:p.number().int().nonnegative(),attributed_signups:p.number().int().nonnegative(),active_sharers:p.number().int().nonnegative(),k_factor:p.number().nullable(),shares_sent_sparkline:p.array(p.number().int().nonnegative()),top_sharers:p.array(f6t)}),A6t=p.object({windows:p.array(m6t)}),sH=p.object({period:p.string(),active:p.number().int().nonnegative()}),g6t=p.object({daily:p.array(sH),weekly:p.array(sH),monthly:p.array(sH),allTime:p.array(sH)}),h6t=p.object({quoted_text:p.string().min(1),comment:p.string().nullable(),type:p.enum(["comment","highlight:trapdoor"])}),_6t=ize,E6t=oze.extend({comment_thread_id:p.string().min(1)}),y6t=p.object({markdown:p.string().min(1)}),S6t=p.object({storage_url:p.string().min(1),thread_file_id:p.string().min(1),parsed_plan_block:Lje,critiqued_plan_block:Lje,annotations:p.array(h6t),comment_threads:p.array(_6t),comments:p.array(E6t)}),T6t=p.object({key:p.string().min(1),label:p.string().min(1),description:p.string().optional(),type:p.enum(["text","textarea","url","email"]),required:p.boolean(),defaultValue:p.string()}),b6t=p.object({id:p.string().min(1),name:p.string().min(1),description:p.string().min(1),deliveryTrigger:p.string().min(1),fields:p.array(T6t),availableFormats:p.array(p.enum(["html","text"]))}),I6t=p.object({templates:p.array(b6t)}),C6t=p.object({values:p.record(p.string(),p.string())}),v6t=p.object({subject:p.string().min(1),html:p.string().optional(),text:p.string().optional()}),R6t=p.object({to:p.string().email().describe("Recipient email address."),values:p.record(p.string(),p.string())}),x6t=p.object({id:p.string().min(1)}),Yx=p.enum(nte),Aze=p.object({review:p.boolean()}),qse=p.object({subject_type:p.enum(["user","organization"]),subject_id:p.string().min(1),effective_plan:Yx,admin_override:Yx.nullable(),stripe_subscription_status:p.string().nullable(),cancel_at_period_end:p.boolean(),current_period_end:p.string().nullable(),seat_quantity:p.number().int().positive(),member_count:p.number().int().nonnegative().nullable(),features:Aze}),D6t=p.object({effective_plan:Yx,features:Aze,user:qse,organization:qse.nullable(),is_billing_admin:p.boolean()}),N6t=p.object({plan:p.enum(["creator","team"]),seat_quantity:p.number().int().positive().optional()}),w6t=p.object({checkout_url:p.string().min(1)}),k6t=p.object({portal_url:p.string().min(1)}),B6t=p.object({seat_quantity:p.number().int().positive()}),Hje=p.object({plan:Yx.nullable()}),aH=p.object({subject_type:p.enum(["user","organization"]),subject_id:p.string().min(1),label:p.string().min(1),effective_plan:Yx,admin_override:Yx.nullable(),stripe_subscription_status:p.string().nullable(),seat_quantity:p.number().int().positive()}),O6t=p.object({users:p.array(aH),organizations:p.array(aH)}),$je=p.object({pool_balance_millicents:p.number().int(),period_end:p.string().nullable(),auto_recharge_enabled:p.boolean(),trigger_threshold_millicents:p.number().int().nonnegative(),topup_amount_millicents:p.number().int().positive().nullable()}),P6t=p.object({auto_recharge_enabled:p.boolean().optional(),trigger_threshold_millicents:p.number().int().nonnegative().optional(),topup_amount_millicents:p.number().int().min(2e6).nullable().optional()}),M6t=p.object({amount_millicents:p.number().int().min(2e6),idempotency_key:p.string().min(1).max(255).optional()}),L6t=p.object({pool_balance_millicents:p.number().int()}),U6t=p.object({subject_id:p.string().min(1),label:p.string(),current_balance_millicents:p.number().int(),period_start:p.string().nullable(),period_end:p.string().nullable(),granted_millicents:p.number().int().nonnegative(),used_millicents:p.number().int().nonnegative(),raw_cogs_millicents:p.number().int().nonnegative(),breakage_millicents:p.number().int().nonnegative(),overage_millicents:p.number().int().nonnegative(),utilization_pct:p.number().nullable(),margin_pct:p.number().nullable()}),Q6t=p.object({pools:p.array(U6t),rollup:p.object({team_count:p.number().int().nonnegative(),granted_millicents:p.number().int().nonnegative(),used_millicents:p.number().int().nonnegative(),raw_cogs_millicents:p.number().int().nonnegative(),breakage_millicents:p.number().int().nonnegative(),overage_millicents:p.number().int().nonnegative(),blended_margin_pct:p.number().nullable(),avg_utilization_pct:p.number().nullable()})}),F6t=p.object({id:p.string().min(1),display_name:p.string().min(1),handle:p.string().nullable(),avatar_url:p.string().nullable()}),G6t=p.object({thread_id:p.string().min(1),title:p.string().min(1),author:F6t,last_active_at:p.string().datetime(),last_block_excerpt:p.string().nullable(),last_block_kind:p.string().min(1).nullable(),is_streaming:p.boolean()}),j6t=p.object({type:p.literal("list"),list_type:p.literal("live_thread"),objects:p.array(G6t)}),z6t=p.object({thread_id:p.string().min(1)}),H6t=p.object({thread_id:p.string().min(1),last_seen_at:p.string().datetime(),started_at:p.string().datetime()}),$6t=p.object({user_id:p.string().min(1),organization_id:p.string().min(1).nullable(),last_seen_at:p.string().datetime(),started_at:p.string().datetime()}),q6t=p.object({upload_completed:p.boolean().optional().describe("When true, also bump last_upload_at \u2014 the daemon completed an upload pass."),source:p.enum(["desktop"]).optional().describe("Surface hosting the watch daemon. The desktop app sends 'desktop' so its background liveness is recorded as daily product activity; standalone CLI daemons omit it.")}),V6t=p.object({last_seen_at:p.string().datetime(),last_upload_at:p.string().datetime().nullable(),started_at:p.string().datetime()}),K6t=p.object({follower_id:p.string().min(1),followee_id:p.string().min(1),is_following:p.literal(!0),follower_count:p.number().int().nonnegative()}),Y6t=p.object({follower_id:p.string().min(1),followee_id:p.string().min(1),is_following:p.literal(!1),follower_count:p.number().int().nonnegative()}),ny=p.object({id:p.string().min(1),display_name:p.string().min(1),handle:p.string().nullable(),avatar_url:p.string().nullable(),bio:p.string().max(280).nullable(),is_following:p.boolean(),is_self:p.boolean()}),qje=p.object({type:p.literal("list"),list_type:p.literal("user_follow"),objects:p.array(ny)}),J6t=ny.extend({mutuals:p.array(ny),mutual_count:p.number().int().nonnegative()}),Z6t=p.object({type:p.literal("list"),list_type:p.literal("follow_suggestion"),objects:p.array(J6t)}),W6t=ny.extend({referred_at:p.string().min(1)}),X6t=p.object({type:p.literal("list"),list_type:p.literal("referral"),count:p.number().int().nonnegative(),recent:p.array(W6t)}),eGt=p.object({date:p.string().regex(/^\d{4}-\d{2}-\d{2}$/),referred:p.number().int().nonnegative(),total:p.number().int().nonnegative()}),tGt=p.object({inviter:ny,organization_name:p.string().nullable(),referred_count:p.number().int().positive(),latest_referred_at:p.string().min(1)}),nGt=p.object({inviter:ny,referee:ny,attributed_at:p.string().min(1)}),rGt=p.object({total_referred_signups:p.number().int().nonnegative(),active_inviters:p.number().int().nonnegative(),referred_signups_last_30d:p.number().int().nonnegative(),total_signups_last_30d:p.number().int().nonnegative(),daily_counts:p.array(eGt),top_inviters:p.array(tGt),recent_attributions:p.array(nGt)}),oGt=p.object({source:p.string().min(1),signups:p.number().int().nonnegative()}),iGt=p.object({sources:p.array(oGt),total_with_source:p.number().int().nonnegative(),total_without_source:p.number().int().nonnegative()}),sGt=p.object({date:p.string().regex(/^\d{4}-\d{2}-\d{2}$/),count:p.number().int().nonnegative()}),aGt=p.object({window_start:p.string().datetime(),window_end:p.string().datetime(),total_contributions:p.number().int().nonnegative(),days_active:p.number().int().nonnegative(),daily_average:p.number().nonnegative(),current_streak_days:p.number().int().nonnegative(),days:p.array(sGt)}),uGt=p.object({type:p.literal("thread_created"),occurred_at:p.string().datetime(),id:p.string().min(1),thread:p.object({id:p.string().min(1),title:p.string(),visibility:p.enum(["private","workspace","public"])})}),cGt=p.object({type:p.literal("thread_updated"),occurred_at:p.string().datetime(),id:p.string().min(1),thread:p.object({id:p.string().min(1),title:p.string(),visibility:p.enum(["private","workspace","public"])})}),lGt=p.object({type:p.literal("comment_posted"),occurred_at:p.string().datetime(),id:p.string().min(1),comment_excerpt:p.string(),thread:p.object({id:p.string().min(1),title:p.string(),visibility:p.enum(["private","workspace","public"])})}),dGt=p.object({type:p.literal("project_published"),occurred_at:p.string().datetime(),id:p.string().min(1),project:p.object({id:p.string().min(1),name:p.string().min(1)})}),pGt=p.object({type:p.literal("user_followed"),occurred_at:p.string().datetime(),id:p.string().min(1),followee:ny}),fGt=p.discriminatedUnion("type",[uGt,cGt,lGt,dGt,pGt]),mGt=p.object({type:p.literal("list"),list_type:p.literal("user_activity"),objects:p.array(fGt)}),AGt=p.object({id:p.string().min(1),name:p.string().min(1),excerpt:p.string(),published_at:p.string().datetime(),updated_at:p.string().datetime()}),gGt=p.object({type:p.literal("list"),list_type:p.literal("profile_published_project"),objects:p.array(AGt)}),Vje=p.object({id:p.string().min(1),published_at:p.string().datetime().nullable()}),hGt=p.enum(["avatar","banner"]),gze=p.enum(["image/png","image/jpeg","image/webp","image/gif"]),_Gt=p.object({kind:hGt,content_type:gze,base64_data:p.string().min(1)}),EGt=p.object({substrate:p.enum(["s3","filesystem"]),storage_url:p.string().min(1)}),yGt=p.object({content_type:gze,base64_data:p.string().min(1)}),SGt=p.object({cover_status:Jse,cover_url:p.string().min(1),cover_url_expires_at:p.string().min(1),cover_generated_at:p.string().min(1)}),TGt=Wje,dH=uFt.router({health:{method:"GET",path:"/health",responses:{200:p.object({status:p.literal("ok")})},summary:"Health check"},getDeepHealth:{method:"GET",path:"/health/deep",responses:{200:p.object({status:p.enum(["ok","degraded"]),environment:p.string(),checks:p.object({database:p.object({ok:p.boolean(),latencyMs:p.number().int().nonnegative().optional(),error:p.string().optional()}),migrations:p.object({ok:p.boolean(),appliedCount:p.number().int().nonnegative(),pendingCount:p.number().int().nonnegative(),latestApplied:p.string().optional(),pending:p.array(p.string())}),storage:p.object({ok:p.boolean(),bucket:p.string().optional(),error:p.string().optional()})})}),503:p.object({status:p.literal("down"),environment:p.string(),error:p.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:p.object({authorization:p.string().min(1).optional(),"x-lore-referral-token":p.string().min(1).max(16).optional(),"x-lore-invited-by-user-id":p.string().min(1).max(40).optional(),"user-agent":p.string().min(1).max(1024).optional()}),responses:{200:AFt,401:z,500:z,502:z},summary:"Validate a WorkOS Bearer token and return member plus user fields"},getCliAuthConfig:{method:"GET",path:"/cli-auth/config",responses:{200:Mje,503:z},summary:"Return public WorkOS CLI Auth configuration for the Lore CLI"},getDesktopAuthConfig:{method:"GET",path:"/desktop-auth/config",responses:{200:Mje,503:z},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:p.object({authorization:p.string().min(1).optional()}),responses:{200:o4t,401:z},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:p.object({authorization:p.string().min(1).optional()}),body:z6t,responses:{200:H6t,401:z,403:z,404:z,422:z},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:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:$6t,401:z},summary:"Record (or refresh) an authenticated Lore web-app presence heartbeat for the current user. Browser clients call this while the product is open."},recordCliHeartbeat:{method:"POST",path:"/users/me/cli-heartbeat",headers:p.object({authorization:p.string().min(1).optional()}),body:q6t,responses:{200:V6t,401:z},summary:"Record a liveness heartbeat for the authenticated user's CLI watch daemon. Idempotent; the daemon calls this ~every 60s and on each completed upload (upload_completed:true). Daemon-internal \u2014 not a `lore` subcommand."},listLiveThreads:{method:"GET",path:"/threads/live",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:j6t,401:z,403:z},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:p.object({authorization:p.string().min(1).optional()}),query:g3t,responses:{200:Qje,401:z},summary:"List threads visible to the authenticated user"},createThread:{method:"POST",path:"/threads",headers:p.object({authorization:p.string().min(1).optional()}),body:n3t,responses:{201:r3t,401:z},summary:"Create an empty Lore-native thread for the authenticated user"},getThread:{method:"GET",path:"/threads/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:qO,404:z},summary:"Load a visible thread by id"},getSimilarThreads:{method:"GET",path:"/threads/:id/similar",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:Qje,404:z,409:z},summary:"List the top 20 visible threads with the closest summary embedding"},resolveThreadShareHighlight:{method:"POST",path:"/threads/:id/share-highlight",pathParams:p.object({id:p.string().min(1).describe("Thread id to share")}),headers:p.object({authorization:p.string().min(1).optional()}),body:e3t,responses:{200:t3t,401:z,404:z,409:z},summary:"Resolve a natural-language share highlight to a canonical /thread URL with block anchors"},askThreads:{method:"POST",path:"/threads/ask",headers:p.object({authorization:p.string().min(1).optional()}),body:L4t,responses:{200:G4t,401:z},summary:"Answer a question from the top 20 visible decision matches, grouped back into threads"},forkThread:{method:"POST",path:"/threads/:id/fork",pathParams:p.object({id:p.string().min(1).describe("Thread id or stable harness lookup id to fork")}),headers:p.object({authorization:p.string().min(1).optional()}),body:P4t,responses:{200:M4t,403:z,404:z},summary:"Generate a distilled source handoff for continuing a visible coding-assistant session"},listThreadBlocks:{method:"GET",path:"/threads/:id/blocks",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),query:A3t,responses:{200:Yse,401:z},summary:"List blocks for a visible thread"},createThreadBlockCommentThread:{method:"POST",path:"/threads/:threadId/blocks/:blockId/comment-threads",pathParams:p.object({threadId:p.string().min(1),blockId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:MFt,responses:{201:LFt,401:z,404:z},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:p.object({threadId:p.string().min(1),blockId:p.string().min(1),commentThreadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:FFt,responses:{201:GFt,401:z,404:z,409:z},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:p.object({threadId:p.string().min(1),blockId:p.string().min(1),commentThreadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:HFt,responses:{200:$Ft,401:z,404:z},summary:"Resolve or reopen a block-level comment thread on a visible thread block"},listSkills:{method:"GET",path:"/skills",headers:p.object({authorization:p.string().min(1).optional()}),query:_3t,responses:{200:E3t,401:z},summary:"List visible workspace skills"},reconcileLocalSkills:{method:"GET",path:"/skills/reconcile-local",headers:p.object({authorization:p.string().min(1).optional()}),query:y3t,responses:{200:T3t,401:z},summary:"Reconcile scanned local skills with visible server-side skills by ID or content hash"},getSkillDetail:{method:"GET",path:"/skills/:id",pathParams:p.object({id:p.string().min(1).describe("Stable skill ID, e.g. sk_...")}),query:p.object({include_unpublished:p.coerce.boolean().optional().describe("Allow the owner to load a soft-unpublished skill for republishing.")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:Fje,401:z,404:z},summary:"Get visible skill details by stable skill ID"},getSharedSkill:{method:"GET",path:"/skills/share/:token",pathParams:p.object({token:p.string().min(1).describe("Public share slug from a /skills/s/:token link.")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:v3t,404:z},summary:"Public no-login preview of a skill shared by link (install requires auth)"},setSkillVisibility:{method:"PATCH",path:"/skills/:id/visibility",pathParams:p.object({id:p.string().min(1).describe("Stable skill ID, e.g. sk_...")}),headers:p.object({authorization:p.string().min(1).optional()}),body:C3t,responses:{200:Fje,401:z,403:z,404:z},summary:"Set a skill's visibility (owner only); minting a share link when set to public"},listArtifacts:{method:"GET",path:"/artifacts",headers:p.object({authorization:p.string().min(1).optional()}),query:N3t,responses:{200:w3t,401:z},summary:"List visible artifacts (files produced by Cowork or native threads)"},getArtifactDetail:{method:"GET",path:"/artifacts/:id",pathParams:p.object({id:p.string().min(1).describe("Stable artifact ID, e.g. art_...")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:k3t,401:z,404:z},summary:"Get a visible artifact with a presigned download URL"},presignBackfillArtifacts:{method:"POST",path:"/artifacts/backfill/presign",headers:p.object({authorization:p.string().min(1).optional()}),body:O3t,responses:{200:P3t,401:z,404:z},summary:"Presign artifact-byte uploads for an existing session thread (backfill)"},commitBackfillArtifacts:{method:"POST",path:"/artifacts/backfill/commit",headers:p.object({authorization:p.string().min(1).optional()}),body:M3t,responses:{200:L3t,401:z,404:z},summary:"Promote backfilled artifact bytes into artifact rows"},getSkillRaw:{method:"GET",path:"/skills/:id/raw",pathParams:p.object({id:p.string().min(1).describe("Stable skill ID, e.g. sk_...")}),query:p.object({version:p.coerce.number().int().positive().optional().describe("Version timestamp to download. Defaults to latest accepted version.")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:p.string(),401:z,403:z,404:z},summary:"Raw SKILL.md body for a skill (download / install path)"},installSkill:{method:"POST",path:"/skills/:id/installations",pathParams:p.object({id:p.string().min(1).describe("Workspace skill ID to install")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:Q3t,401:z,403:z,404:z},summary:"Register the current user as an installer of a visible skill"},uninstallSkill:{method:"DELETE",path:"/skills/:id/installation",pathParams:p.object({id:p.string().min(1).describe("Workspace skill ID to uninstall")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:Gje,401:z},summary:"Unregister the current user installation for a skill (idempotent)"},unpublishSkill:{method:"DELETE",path:"/skills/:id",pathParams:p.object({id:p.string().min(1).describe("Workspace skill ID to unpublish")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:G3t,401:z,403:z,404:z},summary:"Unpublish an owned workspace skill and remove it from the team catalog"},updateSkillInstallation:{method:"PATCH",path:"/skills/installations/:id",pathParams:p.object({id:p.string().min(1).describe("Stable skill installation ID, e.g. ski_...")}),headers:p.object({authorization:p.string().min(1).optional()}),body:F3t,responses:{200:Gje,401:z,404:z,422:z},summary:"Record the accepted skill version installed by the current user"},listSkillInstallationSync:{method:"GET",path:"/skills/installations/sync",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:H3t,401:z},summary:"List installed skills with latest accepted version metadata"},approveSkillVersion:{method:"POST",path:"/skills/:id/versions/:version/approve",pathParams:p.object({id:p.string().min(1).describe("Workspace skill ID"),version:p.coerce.number().int().positive().describe("Proposed version timestamp to approve")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:jje,400:z,401:z,403:z,404:z},summary:"Approve a proposed skill version and make it latest accepted"},rejectSkillVersion:{method:"POST",path:"/skills/:id/versions/:version/reject",pathParams:p.object({id:p.string().min(1).describe("Workspace skill ID"),version:p.coerce.number().int().positive().describe("Proposed version timestamp to reject")}),headers:p.object({authorization:p.string().min(1).optional()}),body:j3t.optional(),responses:{200:jje,400:z,401:z,403:z,404:z},summary:"Reject a proposed skill version with an optional owner reason"},redactThreadBlock:{method:"POST",path:"/threads/:threadId/blocks/:blockId/redactions",pathParams:p.object({threadId:p.string().min(1),blockId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:h3t,responses:{200:$O,401:z,403:z,404:z,422:z},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:p.object({threadId:p.string().min(1),blockId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:$3t,responses:{200:$O,401:z,403:z,404:z,422:z},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:p.object({threadId:p.string().min(1),blockId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:$O,401:z,403:z,404:z,409:z,422:z},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:p.object({threadId:p.string().min(1),blockId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:K3t,401:z,404:z},summary:"List edits made to a thread block (visible to anyone who can see the thread)"},listThreadDecisions:{method:"GET",path:"/threads/:id/decisions",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:O4t,401:z,404:z},summary:"List AI-extracted user decisions for a thread, in chronological order"},updateThread:{method:"PATCH",path:"/threads/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:o3t,responses:{200:qO,401:z,403:z,404:z},summary:"Update thread visibility (author only)"},deleteThread:{method:"DELETE",path:"/threads/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.null(),401:z,403:z,404:z},summary:"Soft-delete a thread (author only)"},generateThreadCard:{method:"POST",path:"/threads/:id/card/generate",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:p.object({cover_status:Jse,how_to_status:aze}),401:z,403:z,404:z,429:z.extend({retry_after_seconds:p.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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:yGt,responses:{200:SGt,401:z,403:z,404:z,413:z,422:z},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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:m4t,responses:{200:Uje,401:z,403:z,404:z,422:z},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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:Uje,401:z,404:z},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:p.object({threadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:g4t,403:z,404:z},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:p.object({threadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:h4t,responses:{201:_4t,401:z,403:z,404:z,422:z},summary:"Post a top-level or reply comment on a public thread."},updateThreadComment:{method:"PATCH",path:"/threads/:threadId/comments/:commentId",pathParams:p.object({threadId:p.string().min(1),commentId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:E4t,responses:{200:y4t,401:z,403:z,404:z,422:z},summary:"Edit your own thread comment (author only; rejects edits to soft-deleted rows)."},deleteThreadComment:{method:"DELETE",path:"/threads/:threadId/comments/:commentId",pathParams:p.object({threadId:p.string().min(1),commentId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:S4t,401:z,403:z,404:z},summary:"Soft-delete your own thread comment (author only). Idempotent."},getThreadPreview:{method:"GET",path:"/threads/:id/preview",pathParams:p.object({id:p.string().min(1)}),responses:{200:i3t,404:z},summary:"Unauthenticated, visibility-redacted metadata for OG / social preview consumers"},getUser:{method:"GET",path:"/users/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:Wje,404:z},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:p.object({authorization:p.string().min(1).optional()}),body:gFt,responses:{200:Zje,401:z,409:z,422:z},summary:"Update the authenticated user profile"},getUserByHandle:{method:"GET",path:"/users/by-handle/:handle",pathParams:p.object({handle:Yje}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:TGt,404:z},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:p.object({authorization:p.string().min(1)}),responses:{200:X6t,401:z},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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),query:p.object({limit:p.coerce.number().int().positive().max(100).optional()}),responses:{200:mGt,404:z},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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:aGt,404:z},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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:qje,404:z},summary:"List the users following a given user."},listUserFollowing:{method:"GET",path:"/users/:id/following",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:qje,404:z},summary:"List the users a given user is following."},listFollowSuggestions:{method:"GET",path:"/users/:id/follow-suggestions",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:Z6t,404:z},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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:K6t,401:z,404:z,409:z,422:z},summary:"Follow another user. Idempotent \u2014 repeating the call is a no-op."},unfollowUser:{method:"DELETE",path:"/users/:id/follow",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:Y6t,401:z,404:z},summary:"Unfollow a user. Idempotent \u2014 repeating the call is a no-op."},listProfilePublishedProjects:{method:"GET",path:"/users/:id/projects",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:gGt,404:z},summary:"Projects the user has published to their public profile."},publishProject:{method:"POST",path:"/projects/:id/publish",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:Vje,401:z,403:z,404:z},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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:Vje,401:z,403:z,404:z},summary:"Remove a project from the author's public profile."},uploadProfileImage:{method:"POST",path:"/users/me/profile-image",headers:p.object({authorization:p.string().min(1).optional()}),body:_Gt,responses:{200:EGt,401:z,413:z,422:z},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:p.object({authorization:p.string().min(1).optional()}),responses:{200:_Ft,401:z},summary:"List members of the authenticated user\u2019s organization"},createOrganizationInvite:{method:"POST",path:"/organization/invites",headers:p.object({authorization:p.string().min(1).optional()}),body:EFt,responses:{201:yFt,401:z,403:z,409:z,422:z},summary:"Invite a teammate to the authenticated user\u2019s workspace via WorkOS AuthKit"},ensureWorkOSOrganization:{method:"POST",path:"/organization/workos/ensure",headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:SFt,401:z,422:z,503:z},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:p.object({authorization:p.string().min(1).optional()}),responses:{200:t4t,401:z,403:z},summary:"List repositories known to the authenticated user\u2019s organization across threads and building blocks"},createBuildingBlockSnapshots:{method:"POST",path:"/building_blocks",headers:p.object({authorization:p.string().min(1).optional()}),body:DFt,responses:{201:JFt,401:z,403:z},summary:"Create building block snapshots for the authenticated user\u2019s organization"},getPlan:{method:"GET",path:"/plans/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:VFt,401:z,403:z,404:z},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:p.object({id:p.string().min(1),revisionId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:qFt,401:z,403:z,404:z},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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:OFt,responses:{201:PFt,401:z,403:z,404:z,422:z},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:p.object({id:p.string().min(1),threadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:UFt,responses:{201:QFt,401:z,403:z,404:z,409:z},summary:"Reply to an inline comment thread on a thread-backed plan container"},updatePlanCommentThread:{method:"PATCH",path:"/plans/:id/comment-threads/:threadId",pathParams:p.object({id:p.string().min(1),threadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:jFt,responses:{200:zFt,401:z,403:z,404:z},summary:"Resolve or reopen an inline comment thread on a thread-backed plan container"},listPlans:{method:"GET",path:"/plans",headers:p.object({authorization:p.string().min(1).optional()}),query:YFt,responses:{200:KFt,401:z,403:z},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:p.object({authorization:p.string().min(1).optional()}),query:WFt,responses:{200:ZFt,401:z,403:z},summary:"List building block snapshots for the authenticated user\u2019s organization and repo origin path"},listUploadSessions:{method:"GET",path:"/upload_sessions",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:m3t,401:z},summary:"List recent upload sessions for the authenticated user"},listUploadApiKeys:{method:"GET",path:"/upload_api_keys",headers:p.object({authorization:p.string().min(1).optional()}),query:q4t,responses:{200:z4t,401:z,403:z},summary:"List Upload API keys owned by the authenticated user in a workspace"},createUploadApiKey:{method:"POST",path:"/upload_api_keys",headers:p.object({authorization:p.string().min(1).optional()}),body:H4t,responses:{201:$4t,400:z,401:z,403:z},summary:"Create an Upload API key and return the raw key exactly once"},revokeUploadApiKey:{method:"POST",path:"/upload_api_keys/:id/revoke",pathParams:p.object({id:p.string().min(1).describe("Upload API key id")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:Wse,401:z,403:z,404:z},summary:"Revoke an Upload API key owned by the authenticated user"},createUploadSession:{method:"POST",path:"/upload_sessions",headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({thread_files:p.array(l4t).optional(),skill_files:p.array(c4t).optional(),upload_metadata:Zse.optional()}),responses:{201:X4t,400:z,401:z},summary:"Create an upload session with presigned URLs for file uploads"},completeUploadSession:{method:"POST",path:"/upload_sessions/:id/complete",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({thread_files:p.array(V4t).optional(),skill_files:p.array(K4t).optional()}),responses:{200:J4t,400:z,401:z,403:z,404:z,409:z,422:z},summary:"Complete an upload session after files have been uploaded to storage"},adminStats:{method:"GET",path:"/admin/stats",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:Y3t,401:z,403:z},summary:"Cross-org operational counts. Tanagram admins only."},adminListOrganizations:{method:"GET",path:"/admin/organizations",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:Z3t,401:z,403:z},summary:"List every organization with member and thread counts. Tanagram admins only."},adminListUsers:{method:"GET",path:"/admin/users",query:X3t,headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:r6t,401:z,403:z},summary:"List every user with their org memberships and thread count. Tanagram admins only."},adminListThreads:{method:"GET",path:"/admin/threads",headers:p.object({authorization:p.string().min(1).optional()}),query:a6t,responses:{200:s6t,401:z,403:z},summary:"List live threads across every organization. Tanagram admins only."},adminListTweetLeads:{method:"GET",path:"/admin/tweet-leads",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:u6t,401:z,403:z},summary:"List unreplied tweet leads from the last 24h, ranked by relevance. Tanagram admins only."},adminUpdateTweetLead:{method:"PATCH",path:"/admin/tweet-leads/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:c6t,responses:{200:mze,401:z,403:z,404:z},summary:"Update a tweet lead status (replied/dismissed/new). Tanagram admins only."},adminLookupThread:{method:"GET",path:"/admin/threads/lookup",headers:p.object({authorization:p.string().min(1).optional()}),query:l6t,responses:{200:i6t,400:z,401:z,403:z,404:z},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:p.object({authorization:p.string().min(1).optional()}),body:e6t,responses:{200:t6t,401:z,403:z,404:z,422:z},summary:"Force follower->followee edge. Admin-only and non-destructive."},adminHardDeleteThread:{method:"DELETE",path:"/admin/threads/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.null(),401:z,403:z,404:z},summary:"Permanently remove a thread. Tanagram admins only."},adminDeleteSkill:{method:"DELETE",path:"/admin/skills/:id",pathParams:p.object({id:p.string().min(1).describe("Workspace skill ID, e.g. sk_...")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:n6t,401:z,403:z,404:z},summary:"Permanently remove a skill and its sync records. Tanagram admins only."},adminReparseThreadFile:{method:"POST",path:"/admin/thread-files/:id/reparse",pathParams:p.object({id:p.string().min(1).describe("Thread file id, e.g. tf_xxx.")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:d6t,401:z,403:z,404:z},summary:"Re-enqueue parsing for a thread file. Tanagram admins only."},listCardFeed:{method:"GET",path:"/cards/feed",query:p.object({limit:p.coerce.number().int().min(1).max(48).optional()}),responses:{200:w4t},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:p.object({authorization:p.string().min(1).optional()}),query:d3t,responses:{200:l3t},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:p3t},summary:"Unauthenticated rollup of public-thread counts for the Discover header."},createWaitlistEntry:{method:"POST",path:"/waitlist_entries",body:TFt,responses:{201:CFt,409:z},summary:"Create an unauthenticated waitlist entry keyed by (location, contact)."},submitContactMessage:{method:"POST",path:"/contact",body:bFt,responses:{200:IFt,429:z,503:z},summary:"Submit a contact-form message from the marketing site; emails the Lore team."},createFeedback:{method:"POST",path:"/feedback",headers:p.object({authorization:p.string().min(1).optional()}),body:vFt,responses:{201:RFt,401:z,422:z,429:z},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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{201:zje,401:z,403:z,404:z,409:z},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:p.object({token:p.string().min(1).max(16)}),headers:p.object({authorization:p.string().min(1).optional()}),query:p6t,responses:{200:zje,404:z},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:p.object({authorization:p.string().min(1).optional()}),responses:{200:A6t,401:z,403:z},summary:"Share-link k-factor, funnel, sparkline, and top sharers by window. Tanagram admins only."},adminActiveUsers:{method:"GET",path:"/admin/active-users",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:g6t,401:z,403:z},summary:"DAU/WAU/MAU/all-time active-user buckets \u2014 distinct users with product usage: CLI/plugin publishes and web writes + presence on the thread-event spine, plus desktop-app daily activity touches (user_activity_daily); auth/token issuance excluded. Tanagram admins only."},adminReferrals:{method:"GET",path:"/admin/referrals",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:rGt,401:z,403:z},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:p.object({authorization:p.string().min(1).optional()}),responses:{200:iGt,401:z,403:z},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:p.object({authorization:p.string().min(1).optional()}),body:y6t,responses:{200:S6t,401:z,403:z,409:z},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:p.object({authorization:p.string().min(1).optional()}),responses:{200:I6t,401:z,403:z},summary:"List transactional email templates and their editable preview fields. Tanagram admins only."},adminPreviewEmailTemplate:{method:"POST",path:"/admin/email-templates/:id/preview",pathParams:p.object({id:p.string().min(1).describe("Email template id.")}),headers:p.object({authorization:p.string().min(1).optional()}),body:C6t,responses:{200:v6t,400:z,401:z,403:z,404:z},summary:"Render a transactional email template with supplied values. Tanagram admins only."},adminSendEmailTemplate:{method:"POST",path:"/admin/email-templates/:id/send",pathParams:p.object({id:p.string().min(1).describe("Email template id.")}),headers:p.object({authorization:p.string().min(1).optional()}),body:R6t,responses:{200:x6t,400:z,401:z,403:z,404:z,503:z},summary:"Send a transactional email template through Resend. Tanagram admins only."},getBillingState:{method:"GET",path:"/billing/state",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:D6t,401:z},summary:"Resolve the caller's plan, features, seat count, and any admin override."},createBillingCheckout:{method:"POST",path:"/billing/checkout",headers:p.object({authorization:p.string().min(1).optional()}),body:N6t,responses:{200:w6t,400:z,401:z,403:z,503:z},summary:"Start a Stripe Checkout session for Creator ($29/mo) or Team ($19/seat/mo, min 2)."},createBillingPortal:{method:"POST",path:"/billing/portal",headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({subject_type:p.enum(["user","organization"]).default("user")}).optional(),responses:{200:k6t,401:z,404:z,503:z},summary:"Open the Stripe customer portal so the subject can manage their subscription."},updateTeamSeats:{method:"PATCH",path:"/billing/team-seats",headers:p.object({authorization:p.string().min(1).optional()}),body:B6t,responses:{200:qse,400:z,401:z,403:z,404:z,503:z},summary:"Adjust the caller-organization's Team seat quantity (admin of that org only)."},getCreditSettings:{method:"GET",path:"/billing/credits/settings",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:$je,400:z,401:z,403:z,503:z},summary:"Get the caller-organization's credit pool balance + auto-recharge settings."},updateCreditSettings:{method:"PUT",path:"/billing/credits/settings",headers:p.object({authorization:p.string().min(1).optional()}),body:P6t,responses:{200:$je,400:z,401:z,403:z,503:z},summary:"Update the caller-organization's auto-recharge settings (billing admin only)."},createCreditTopUp:{method:"POST",path:"/billing/credits/topup",headers:p.object({authorization:p.string().min(1).optional()}),body:M6t,responses:{200:L6t,400:z,401:z,403:z,503:z},summary:"Manually top up the caller-organization's credit pool by charging the saved card."},adminListBilling:{method:"GET",path:"/admin/billing",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:O6t,401:z,403:z},summary:"List every user and org with current plan + override for the admin panel."},adminListCreditPools:{method:"GET",path:"/admin/billing/credits",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:Q6t,401:z,403:z},summary:"Per-team credit-pool utilization, blended margin, breakage, and overage."},adminSetUserPlanOverride:{method:"PUT",path:"/admin/billing/users/:id/override",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:Hje,responses:{200:aH,401:z,403:z,404:z},summary:"Admin override for a user's plan tier. Null clears the override."},adminSetOrganizationPlanOverride:{method:"PUT",path:"/admin/billing/organizations/:id/override",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:Hje,responses:{200:aH,401:z,403:z,404:z},summary:"Admin override for an organization's plan tier. Null clears the override."},projects:xje,regions:kje,entities:Tje,docs:_je,mentions:vje,favorites:Cje,search:Oje},{pathPrefix:"/api"})});import{AsyncLocalStorage as bGt}from"node:async_hooks";import lh from"node:fs/promises";import _ze from"node:path";function RGt(e){return _ze.join(e,"tokens-refresh.lock")}async function KO(e,t,n={}){let r=hze.getStore();if(r?.has(e))return t();let o=n.waitMs??IGt,i=n.staleMs??CGt,s=n.now??Date.now,u=n.sleep??(v=>new Promise(R=>setTimeout(R,v))),l=RGt(e),f=_ze.join(l,"owner"),h=`${process.pid}:${Date.now()}:${Math.random().toString(36).slice(2)}`,_=s(),E=!1;for(;!E;)try{await lh.mkdir(e,{recursive:!0,mode:448}),await lh.chmod(e,448).catch(()=>{}),await lh.mkdir(l,{mode:448});try{await lh.writeFile(f,h,{mode:384})}catch(v){throw await lh.rm(l,{recursive:!0,force:!0}),v}E=!0}catch(v){if(!xGt(v))throw v;if(await DGt(l,i,s)){await lh.rm(l,{recursive:!0,force:!0});continue}if(s()-_>=o)throw new Error(`Timed out waiting for OAuth token refresh lock at ${l}`);await u(Math.min(vGt,o))}let T=new Set(r??[]);T.add(e);try{return await hze.run(T,t)}finally{await NGt(l,f,h)}}function Eze(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function xGt(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="EEXIST"}async function DGt(e,t,n){try{let r=await lh.stat(e);return n()-r.mtimeMs>=t}catch(r){if(Eze(r))return!1;throw r}}async function NGt(e,t,n){try{if(await lh.readFile(t,"utf8")!==n)return}catch(r){if(!Eze(r))throw r}await lh.rm(e,{recursive:!0,force:!0})}var hze,IGt,CGt,vGt,O$n,P$n,M$n,L$n,U$n,Q$n,pH,Xse=k(()=>{"use strict";m();pc();hze=new bGt,IGt=3e4,CGt=6e4,vGt=100,O$n=process.env.LORE_PLUGIN_AUTHKIT_CLIENT_ID?.trim()||process.env.PLUGIN_AUTHKIT_CLIENT_ID?.trim()||"client_01KRSDB9SR20N7MB0D9MPS05Q6",P$n=process.env.LORE_CLI_AUTHKIT_CLIENT_ID?.trim()||process.env.CLI_AUTHKIT_CLIENT_ID?.trim()||"client_01KV6K8BBANC2J3998K4DG9840",M$n=p.object({resource:p.string(),endpoints:p.object({audience:p.string(),deviceAuthorizationEndpoint:p.string(),tokenEndpoint:p.string(),authorizationEndpoint:p.string()}),fetchedAt:p.number(),prmEtag:p.string().optional()}),L$n=p.object({resource:p.string().min(1,"`resource` must be a non-empty string"),authorization_servers:p.array(p.string())}),U$n=p.object({issuer:p.string().min(1,"`issuer` must be a non-empty string"),token_endpoint:p.string().min(1,"`token_endpoint` must be a non-empty string"),authorization_endpoint:p.string().optional()}),Q$n=p.object({access_token:p.string().min(1),refresh_token:p.string().min(1),expires_in:p.number().int().positive(),token_type:p.string().min(1),scope:p.string().optional()}),pH=class extends Error{constructor(){super("OAuth refresh token is invalid or expired"),this.name="OAuthInvalidGrantError"}}});import yp from"node:fs";import wGt from"node:path";function eae(e){return wGt.join(e,"tokens.json")}function kGt(e){return`${e}.tmp.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}`}function Tze(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function BGt(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=Sze.safeParse(n);if(!o.success)throw new Error(`tokens file at ${t} failed schema validation: ${o.error.message}`);return o.data}let r=fH.safeParse(n);if(!r.success)throw new Error(`tokens file at ${t} failed schema validation: ${r.error.message}`);return MGt(r.data)}function OGt(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 PGt(e){let t=OGt(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 MGt(e){let t={};return PGt(e)&&(t.plugin=e),{version:2,clients:t}}function LGt(e){return JSON.stringify(Sze.parse(e))}function tae(e){let t=eae(e),n;try{n=yp.readFileSync(t,"utf8")}catch(r){if(Tze(r))return null;throw r}return BGt(n,t)}function bze(e,t){let n=eae(e);yp.mkdirSync(e,{recursive:!0,mode:448}),yp.chmodSync(e,448);let r=kGt(n),o=LGt(t),i;try{i=yp.openSync(r,"w",384),yp.writeSync(i,o),yp.fchmodSync(i,384),yp.fsyncSync(i),yp.closeSync(i),i=void 0,yp.renameSync(r,n)}catch(s){if(i!==void 0)try{yp.closeSync(i)}catch{}try{yp.unlinkSync(r)}catch{}throw s}}function Zx(e,t){return tae(e)?.clients[t]??null}function UGt(e){try{return tae(e)??{version:2,clients:{}}}catch{return{version:2,clients:{}}}}function yze(e){try{yp.rmSync(eae(e))}catch(t){if(!Tze(t))throw t}}function mH(e,t,n){let r=UGt(e);r.clients[t]=fH.parse(n),bze(e,r)}function nae(e,t){let n;try{n=tae(e)}catch{yze(e);return}if(!(!n||!(t in n.clients))){if(delete n.clients[t],Object.keys(n.clients).length===0){yze(e);return}bze(e,n)}}var fH,Sze,rae=k(()=>{"use strict";m();pc();Xse();fH=p.object({access_token:p.string(),refresh_token:p.string(),expires_at:p.number().int(),scope:p.string().default("")}),Sze=p.object({version:p.literal(2),clients:p.record(p.string(),fH).default({})})});import QGt from"node:fs";import Cze from"node:os";import vze from"node:path";function FGt(e=Cze.homedir()){return vze.join(e,"Library","Application Support","tanagram","lore","tokens.json")}function Rze(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 Ize(e){try{QGt.rmSync(e)}catch(t){if(!(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ENOENT"))throw t}}function AH(e,t=Cze.homedir()){for(let n of GGt)Ize(vze.join(e,n));Ize(FGt(t))}var GGt,xze=k(()=>{"use strict";m();rae();GGt=["token","refresh_token"]});var YO=k(()=>{"use strict";m();rae();xze();Xse()});import UT from"node:fs";import Wx from"node:path";function gH(e){return e.toISOString().slice(0,10)}function Dze(e){let t=Wx.basename(e);return t.endsWith(".log.txt")?t.slice(0,-8):t.replace(/\.txt$/,"")}function HGt(e,t){let n=Wx.dirname(e),r=Dze(e),o=Wx.join(n,`${r}.${t}.txt`);for(let i=1;UT.existsSync(o);i++)o=Wx.join(n,`${r}.${t}.${i}.txt`);return o}function $Gt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function qGt(e,t){let n=new Date(e.getTime());return n.setUTCDate(n.getUTCDate()-t),gH(n)}function VGt(e,t,n){let r=Wx.dirname(e),o=Dze(e),i=new RegExp(`^${$Gt(o)}\\.(\\d{4}-\\d{2}-\\d{2})(?:\\.\\d+)?\\.txt$`),s=qGt(t,n),u;try{u=UT.readdirSync(r)}catch{return}for(let l of u){let f=i.exec(l);if(!(!f||f[1]>=s))try{UT.rmSync(Wx.join(r,l),{force:!0})}catch{}}}function hH(e,t,n){let r=Buffer.byteLength(t);n.rotateIfNeeded(e,r),UT.appendFileSync(e,t),n.recordWrite(r)}var jGt,zGt,Xx,oae=k(()=>{"use strict";m();jGt=50*1024*1024,zGt=30;Xx=class{liveFile=null;liveLogBytes=null;currentPeriod=null;maxBytes;retentionDays;now;constructor(t={}){this.maxBytes=t.maxBytes??jGt,this.retentionDays=t.retentionDays??zGt,this.now=t.now??(()=>new Date)}rotateIfNeeded(t,n){if(this.liveFile!==t&&(this.liveFile=t,this.liveLogBytes=null,this.currentPeriod=null),this.currentPeriod===null)try{let u=UT.statSync(t);this.liveLogBytes=u.size,this.currentPeriod=gH(u.mtime)}catch{this.liveLogBytes=0,this.currentPeriod=gH(this.now())}let r=this.now(),o=gH(r),i=this.currentPeriod!==o,s=(this.liveLogBytes??0)+n>this.maxBytes;if((i||s)&&(this.liveLogBytes??0)>0)try{UT.renameSync(t,HGt(t,this.currentPeriod??o)),VGt(t,r,this.retentionDays),this.liveLogBytes=0,this.currentPeriod=o;return}catch{try{this.liveLogBytes=UT.statSync(t).size}catch{this.liveLogBytes=0}return}this.currentPeriod=o}recordWrite(t){this.liveLogBytes=(this.liveLogBytes??0)+t}}});import{execFileSync as KGt}from"node:child_process";import{createHash as YGt}from"node:crypto";import JO from"node:os";import Ps from"node:path";function Xn(){if(Hr()==="dev"){let t=process.env.LORE_DEV_STATE_DIR?.trim();if(t)return Ps.resolve(t.replace(/^~(?=$|\/)/,JO.homedir()));let n=JGt();if(n)return Ps.join(JO.homedir(),`.lore-dev-${n}`)}let e=Hr()==="dev"?".lore-dev":".lore";return Ps.join(JO.homedir(),e)}function JGt(){let e=Nze(process.env.LORE_DEV_STACK_NAME??"");if(e)return e;let t=ZGt();return[Nze(t.split(/[\\/]/).pop()||"lore"),WGt(t)].filter(Boolean).join("-").slice(0,63)}function ZGt(){try{return KGt("git",["rev-parse","--show-toplevel"],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch{return Ps.resolve(process.cwd(),"../..")}}function WGt(e){return YGt("sha1").update(e).digest("hex").slice(0,8)}function Nze(e){return e.toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,63)}function Sp(){return Ps.join(Xn(),XGt())}function XGt(){return process.env.LORE_LOG_FILE_NAME?.trim()||"cli.log.txt"}function ZO(){return Ps.join(Xn(),"upload.log.txt")}function wze(){return Ps.join(Xn(),"upload-daemon.lock")}function iae(){return Ps.join(Xn(),"sync_state.json")}function sae(){return Ps.join(Xn(),"upload_queue_state.json")}function QT(){return Ps.join(Xn(),"upload_filters.json")}function _H(){return Ps.join(Xn(),"upload_dirs.json")}function WO(){return Ps.join(Xn(),"status.json")}function eD(){return Ps.join(Xn(),"daemon_status.json")}function tD(){return Ps.join(Xn(),"quarantine")}function FT(){return Ps.join(Xn(),"install_source.json")}function dh(){return Ps.join(Xn(),"skill_sync_state.json")}function GT(){return Ps.join(Xn(),"bin","lore")}function ry(){let e=Hr();return e==="prod"?"ai.tanagram.lore":`ai.tanagram.lore.${e}`}function aae(){return`${ry()}.skill-sync`}function nD(){return Ps.join(JO.homedir(),"Library","LaunchAgents",`${ry()}.plist`)}function uae(){return Ps.join(JO.homedir(),"Library","LaunchAgents",`${aae()}.plist`)}var Lr=k(()=>{"use strict";m();sc()});import Oze from"node:fs";function tjt(){let e=Xn();kze!==e&&(Oze.mkdirSync(e,{recursive:!0}),kze=e)}function njt(e){let t=typeof e=="string"?e:JSON.stringify(e);return/[\s"=]/.test(t)?JSON.stringify(t):t}function rjt(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}=${njt(s)}`).join(" ");return o?`${r} ${o}
|
|
106
106
|
`:`${r}
|
|
107
107
|
`}function cae(e,t,n){try{let r=rjt(e,t,n);tjt(),hH(Sp(),r,ejt),Hr()==="dev"&&ojt(r)}catch{}ijt(e,t,n)}function ojt(e){if(!Bze)try{Oze.writeSync(process.stderr.fd,e)}catch{Bze=!0}}function ijt(e,t,n){if(Hr()!=="dev")try{eB[e](t,sjt(n))}catch{}}function sjt(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 kze,Bze,ejt,H,An=k(()=>{"use strict";m();oae();sx();sc();Lr();kze=null,Bze=!1,ejt=new Xx;H={info(e,t){cae("info",e,t)},warn(e,t){cae("warn",e,t)},error(e,t){cae("error",e,t)}}});import oy from"node:fs";import EH from"node:path";function iy(){try{return Zx(Xn(),yH)}catch(e){return H.warn("auth_load_tokens_failed",{stateDir:Xn(),errorName:e instanceof Error?e.name:void 0,error:e instanceof Error?e.message:String(e)}),null}}function SH(){try{return Zx(Xn(),ajt)}catch(e){return H.warn("auth_load_desktop_managed_tokens_failed",{stateDir:Xn(),errorName:e instanceof Error?e.name:void 0,error:e instanceof Error?e.message:String(e)}),null}}function lae(){return EH.join(Xn(),"analytics_distinct_id")}function Pze(){let e;try{e=oy.readFileSync(lae(),"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 Mze(e){let t=lae();oy.mkdirSync(EH.dirname(t),{recursive:!0,mode:448}),oy.writeFileSync(t,e,{mode:384})}function Lze(){try{oy.rmSync(lae())}catch(e){if(e&&typeof e=="object"&&"code"in e&&e.code==="ENOENT")return;throw e}}function dae(){return EH.join(Xn(),"analytics_person_properties.json")}function Uze(){let e;try{e=oy.readFileSync(dae(),"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 Qze(e){let t=dae();oy.mkdirSync(EH.dirname(t),{recursive:!0,mode:448}),oy.writeFileSync(t,JSON.stringify(e),{mode:384})}function Fze(){try{oy.rmSync(dae())}catch(e){if(e&&typeof e=="object"&&"code"in e&&e.code==="ENOENT")return;throw e}}function pae(){let e=process.env.LORE_CLI_ACCESS_TOKEN?.trim()??"";if(e&&!oD(e,new Date,rD))return{token:e,source:"env"};let t=iy()?.access_token.trim()??"";return!t||oD(t,new Date,rD)?{token:"",source:"none"}:{token:t,source:"file"}}function Gze(){let e=SH()?.access_token.trim()??"";return!e||oD(e,new Date,rD)?{token:"",source:"none"}:{token:e,source:"file"}}function jze(){return iy()?.refresh_token.trim()??""}function zze(){return!!iy()?.access_token}function Hze(e){let t=Xn();mH(t,yH,e),AH(t)}function $ze(e){Hze(e)}function TH(e,t){let n=iy();Hze({access_token:e,refresh_token:t,expires_at:Rze(e)??0,scope:n?.scope??""})}function bH(){H.warn("auth_delete_access_token",{stateDir:Xn()}),nae(Xn(),yH),AH(Xn())}function qze(){nae(Xn(),yH),AH(Xn())}function cjt(e,t){return new URL(t,e).toString()}async function ljt(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function djt(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Token refresh failed"}async function Vze({clientId:e,refreshToken:t,workosApiOrigin:n,fetch:r=globalThis.fetch}){let o=await r(cjt(n,"/user_management/authenticate"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:ujt,refresh_token:t,client_id:e})}),i=await ljt(o);if(!o.ok){let s=i,u=djt(s);throw s.error==="invalid_grant"?new XO(u):new Error(u)}return i}function eP(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 oD(e,t,n=0){let r;try{r=eP(e)}catch{return!1}return typeof r.exp!="number"?!1:t.getTime()+n>=r.exp*1e3}var yH,ajt,rD,XO,ujt,jT=k(()=>{"use strict";m();YO();An();Lr();yH="cli",ajt="desktop",rD=10*1e3;XO=class extends Error{constructor(t="Refresh token is invalid or expired"){super(t),this.name="RefreshTokenInvalidGrantError"}},ujt="refresh_token"});import{AsyncLocalStorage as pjt}from"node:async_hooks";function Yze(e,t){return Kze.run(e,t)}function Jze(){return Kze.getStore()}var Kze,fae=k(()=>{"use strict";m();Kze=new pjt});function jt(e){return e instanceof Error?e.message:String(e)}function Ur(e,t){return e!==null&&typeof e=="object"&&"code"in e&&e.code===t}function sD(){return Hr()==="dev"?"pnpm dev login":"lore login"}function fjt(e){return Hr()!=="dev"?e:e.replaceAll("'lore login'","'pnpm dev login'").replaceAll("`lore login`","`pnpm dev login`")}function pd(){throw new xe("")}var xe,iD,Ht=k(()=>{"use strict";m();sc();xe=class extends Error{constructor(t){super(fjt(t)),this.name="CLIError"}};iD=class extends xe{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}}});import{setTimeout as mjt}from"node:timers/promises";async function tP(e,t){let n=t.limit??Ajt,r=t.baseMs??Zze,o=t.maxMs??Wze,i=t.sleep??mjt,s=t.logEvent??"fetch_retry";for(let u=0;u<=n;u+=1){let l=u===n;try{return await e()}catch(f){if(!t.isRetryableError(f)||l)throw f;H.warn(s,{attempt:u+1,reason:t.describeRetryReason?.(f)??"retryable_error",...t.logFields})}await i(gjt(u,{baseMs:r,maxMs:o}))}throw new Error("fetchWithRetry: unreachable")}function gjt(e,{baseMs:t=Zze,maxMs:n=Wze}={}){let r=Math.min(t*2**e,n),o=Math.floor(r/2);return o+Math.floor(Math.random()*o)}function aD(e){return e instanceof TypeError?e.message==="fetch failed"||e.message==="terminated":!1}function nP(e){return Xze(e,hjt)}function rP(e){return Xze(e,_jt)}function Xze(e,t){if(!aD(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 oP(e){if(!aD(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 IH(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 u=o,l=u.code;l&&r.push(l),n.push(`${u.name}${l?`[${l}]`:""}: ${u.message}`),o=u.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 Ajt,Zze,Wze,hjt,_jt,CH=k(()=>{"use strict";m();An();Ajt=5,Zze=1e3,Wze=16e3;hjt=new Set(["UND_ERR_CONNECT_TIMEOUT","ENOTFOUND","EAI_AGAIN","ECONNREFUSED"]),_jt=new Set(["ECONNRESET","ETIMEDOUT","EPIPE"])});import{execFileSync as tHe}from"node:child_process";import{createHash as Ejt}from"node:crypto";import yjt from"node:fs";import{resolve as nHe}from"node:path";function Tjt(e){if(process.env.LORE_DISABLE_PORTLESS_DISCOVERY!=="1"&&process.env.npm_lifecycle_event!=="test")try{return rHe(["get",e]).trim().replace(/\/$/,"")}catch{return}}function bjt(e){if(process.env.LORE_DISABLE_PORTLESS_DISCOVERY==="1"||process.env.npm_lifecycle_event==="test")return;let t=`${e}.localhost`;try{let o=rHe(["list"]).split(/\r?\n/).find(i=>i.includes(`://${t}:`))?.match(/->\s+localhost:(\d+)\b/);if(o)return`http://127.0.0.1:${o[1]}`}catch{return}}function Ijt(){let e=process.platform==="win32"?"portless.cmd":"portless",t=nHe(oHe(),"node_modules",".bin",e);return yjt.existsSync(t)?t:"portless"}function rHe(e){return tHe(Ijt(),e,{encoding:"utf8",shell:process.platform==="win32",stdio:["ignore","pipe","ignore"]})}function eHe(e){return e.toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,63)}function oHe(){try{return tHe("git",["rev-parse","--show-toplevel"],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch{return nHe(process.cwd(),"../..")}}function Cjt(e){return Ejt("sha1").update(e).digest("hex").slice(0,8)}function vjt(){let e=eHe(process.env.LORE_DEV_STACK_NAME??"");if(e)return e;let t=oHe();return[eHe(t.split(/[\\/]/).pop()||"lore"),Cjt(t)].filter(Boolean).join("-").slice(0,63)}function Rjt(){let e=vjt();return e?`api.${e}.lore`:"api.lore"}function xjt(e){let t=process.env.LORE_TARGET?.trim();return t&&Sjt.has(t)?t:e}function al(e=Hr(),t=process.env.LORE_API_ORIGIN){let n=t?.trim();if(n)return n.replace(/\/$/,"");let r=xjt(e);if(r==="dev"){let o=Rjt();return bjt(o)??Tjt(o)??xH.dev}return xH[r]}function Iu(){let e=iy(),t=SH(),n=e?.access_token.trim()??"",r=e?.refresh_token.trim()??"",o=t?.access_token.trim()??"";return{hasTokenRecord:!!e,hasAccessToken:!!n,accessTokenExpiredOrNearExpiry:n?oD(n,new Date,rD):void 0,hasRefreshToken:!!r,externalTokenManager:aHe(),hasDesktopManagedTokenRecord:!!t,hasDesktopManagedAccessToken:!!o,desktopManagedAccessTokenExpiredOrNearExpiry:o?oD(o,new Date,rD):void 0}}function iHe(e){let t=Jze()??$c();if(!t||t.spanContext().traceFlags!==1)return e;let n=nE({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 Djt(){let e=await sHe(`${al()}/api/cli-auth/config`);if(!e.ok)throw new Error(`CLI auth config failed: HTTP ${e.status}`);return await e.json()}async function Njt(){if(!iy()?.refresh_token.trim())return H.warn("auth_refresh_skipped_no_refresh_token",Iu()),"";vH?H.info("auth_refresh_join_inflight",Iu()):(H.info("auth_refresh_start",Iu()),vH=KO(Xn(),async()=>{let t=pae().token;if(t)return H.info("auth_refresh_reused_latest_token",Iu()),t;let n=iy();if(!n?.refresh_token.trim())return H.warn("auth_refresh_skipped_latest_no_refresh_token",Iu()),"";H.info("auth_refresh_cli_auth_config_start",{...Iu(),resource:al()});let r=await Djt();H.info("auth_refresh_cli_auth_config_success",{...Iu(),tokenEndpoint:new URL("/user_management/authenticate",r.workos_api_origin).toString()});let o=await Vze({clientId:r.workos_client_id,refreshToken:n.refresh_token,workosApiOrigin:r.workos_api_origin,fetch:sHe});return TH(o.access_token,o.refresh_token??n.refresh_token),H.info("auth_refresh_success",Iu()),o.access_token}).finally(()=>{vH=void 0}));try{return await vH}catch(t){return t instanceof pH||t instanceof XO?(H.warn("auth_refresh_invalid_grant_deleting_tokens",{...Iu(),error:jt(t)}),bH()):H.warn("auth_refresh_failed",{...Iu(),errorName:t instanceof Error?t.name:void 0,error:jt(t)}),""}}function RH(e){try{let t=eP(e);typeof t.sub=="string"&&mF({id:t.sub,...typeof t.email=="string"?{email:t.email}:{}})}catch{}}function aHe(){let e=process.env.LORE_EXTERNAL_TOKEN_MANAGER;return typeof e=="string"&&wjt.has(e.trim().toLowerCase())}async function zt(){if(aHe()){let n=Gze().token;if(n)return H.info("auth_get_access_token_valid_desktop_managed_token",Iu()),RH(n),n;let r=SH()?.access_token.trim()??"";return H.warn("auth_get_access_token_external_manager_raw_desktop_token",{...Iu(),returnedRawToken:!!r}),r&&RH(r),r}let e=pae().token;if(e)return H.info("auth_get_access_token_valid_file_token",Iu()),RH(e),e;H.warn("auth_get_access_token_no_valid_file_token",Iu());let t=await Njt();return t?(H.info("auth_get_access_token_refreshed_token",Iu()),RH(t)):H.warn("auth_get_access_token_returning_empty",Iu()),t}function xt(e={}){let t=e.token;return Ate(dH,{baseUrl:al(),baseHeaders:{"User-Agent":qFe(),...t?{authorization:`Bearer ${t}`}:{}},api:async n=>{let r=iHe(n.headers);if(t===void 0){let i=await zt();i&&!r.authorization&&(r={...r,authorization:`Bearer ${i}`})}let o=n.method.toUpperCase()==="GET";try{return await tP(()=>mte({...n,headers:r}),{isRetryableError:o?i=>nP(i)||rP(i):nP,describeRetryReason:i=>`network:${oP(i)}`,logEvent:"api_request_retry",logFields:{method:n.method,path:n.path}})}catch(i){if(aD(i)){let s=IH(i);H.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 xH,X9n,Sjt,vH,sHe,wjt,Sr=k(()=>{"use strict";m();Kx();YO();cA();sx();jT();fae();sc();Ht();CH();An();Lr();xH={dev:"http://localhost:4000","dev-shared":"https://lore-api.dev.tanagram.ai",prod:"https://lore-api.tanagram.ai"},X9n={dev:`${xH.dev}/mcp`,"dev-shared":`${xH["dev-shared"]}/mcp`,prod:"https://mcp.lore.link/mcp"},Sjt=new Set(["dev","dev-shared","prod"]);sHe=(async(e,t)=>{let n=iHe(Object.fromEntries(new Headers(t?.headers).entries()));return fetch(e,{...t,headers:n})});wjt=new Set(["1","true","yes","on"])});function fHe(e){return typeof e!="string"?!1:Gjt.has(e.trim().toLowerCase())}function Cu(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(mHe)||fHe(r.LORE_NO_TUI)||fHe(r.CI)||r.TERM==="dumb"||!t?.isTTY||!n?.isTTY)}function AHe(e){return e.filter(t=>t!==mHe)}var mHe,Gjt,sy=k(()=>{"use strict";m();mHe="--no-tui",Gjt=new Set(["1","true","yes","on"])});var vHe=M(bn=>{"use strict";m();var Sae=Symbol.for("react.transitional.element"),jjt=Symbol.for("react.portal"),zjt=Symbol.for("react.fragment"),Hjt=Symbol.for("react.strict_mode"),$jt=Symbol.for("react.profiler"),qjt=Symbol.for("react.consumer"),Vjt=Symbol.for("react.context"),Kjt=Symbol.for("react.forward_ref"),Yjt=Symbol.for("react.suspense"),Jjt=Symbol.for("react.memo"),yHe=Symbol.for("react.lazy"),Zjt=Symbol.for("react.activity"),gHe=Symbol.iterator;function Wjt(e){return e===null||typeof e!="object"?null:(e=gHe&&e[gHe]||e["@@iterator"],typeof e=="function"?e:null)}var SHe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},THe=Object.assign,bHe={};function cD(e,t,n){this.props=e,this.context=t,this.refs=bHe,this.updater=n||SHe}cD.prototype.isReactComponent={};cD.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")};cD.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function IHe(){}IHe.prototype=cD.prototype;function Tae(e,t,n){this.props=e,this.context=t,this.refs=bHe,this.updater=n||SHe}var bae=Tae.prototype=new IHe;bae.constructor=Tae;THe(bae,cD.prototype);bae.isPureReactComponent=!0;var hHe=Array.isArray;function yae(){}var No={H:null,A:null,T:null,S:null},CHe=Object.prototype.hasOwnProperty;function Iae(e,t,n){var r=n.ref;return{$$typeof:Sae,type:e,key:t,ref:r!==void 0?r:null,props:n}}function Xjt(e,t){return Iae(e.type,t,e.props)}function Cae(e){return typeof e=="object"&&e!==null&&e.$$typeof===Sae}function ezt(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var _He=/\/+/g;function Eae(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ezt(""+e.key):t.toString(36)}function tzt(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(yae,yae):(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 uD(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 Sae:case jjt:s=!0;break;case yHe:return s=e._init,uD(s(e._payload),t,n,r,o)}}if(s)return o=o(e),s=r===""?"."+Eae(e,0):r,hHe(o)?(n="",s!=null&&(n=s.replace(_He,"$&/")+"/"),uD(o,t,n,"",function(f){return f})):o!=null&&(Cae(o)&&(o=Xjt(o,n+(o.key==null||e&&e.key===o.key?"":(""+o.key).replace(_He,"$&/")+"/")+s)),t.push(o)),1;s=0;var u=r===""?".":r+":";if(hHe(e))for(var l=0;l<e.length;l++)r=e[l],i=u+Eae(r,l),s+=uD(r,t,n,i,o);else if(l=Wjt(e),typeof l=="function")for(e=l.call(e),l=0;!(r=e.next()).done;)r=r.value,i=u+Eae(r,l++),s+=uD(r,t,n,i,o);else if(i==="object"){if(typeof e.then=="function")return uD(tzt(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 DH(e,t,n){if(e==null)return e;var r=[],o=0;return uD(e,r,"","",function(i){return t.call(n,i,o++)}),r}function nzt(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 EHe=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)},rzt={map:DH,forEach:function(e,t,n){DH(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return DH(e,function(){t++}),t},toArray:function(e){return DH(e,function(t){return t})||[]},only:function(e){if(!Cae(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};bn.Activity=Zjt;bn.Children=rzt;bn.Component=cD;bn.Fragment=zjt;bn.Profiler=$jt;bn.PureComponent=Tae;bn.StrictMode=Hjt;bn.Suspense=Yjt;bn.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=No;bn.__COMPILER_RUNTIME={__proto__:null,c:function(e){return No.H.useMemoCache(e)}};bn.cache=function(e){return function(){return e.apply(null,arguments)}};bn.cacheSignal=function(){return null};bn.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=THe({},e.props),o=e.key;if(t!=null)for(i in t.key!==void 0&&(o=""+t.key),t)!CHe.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),u=0;u<i;u++)s[u]=arguments[u+2];r.children=s}return Iae(e.type,o,r)};bn.createContext=function(e){return e={$$typeof:Vjt,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:qjt,_context:e},e};bn.createElement=function(e,t,n){var r,o={},i=null;if(t!=null)for(r in t.key!==void 0&&(i=""+t.key),t)CHe.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 u=Array(s),l=0;l<s;l++)u[l]=arguments[l+2];o.children=u}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)o[r]===void 0&&(o[r]=s[r]);return Iae(e,i,o)};bn.createRef=function(){return{current:null}};bn.forwardRef=function(e){return{$$typeof:Kjt,render:e}};bn.isValidElement=Cae;bn.lazy=function(e){return{$$typeof:yHe,_payload:{_status:-1,_result:e},_init:nzt}};bn.memo=function(e,t){return{$$typeof:Jjt,type:e,compare:t===void 0?null:t}};bn.startTransition=function(e){var t=No.T,n={};No.T=n;try{var r=e(),o=No.S;o!==null&&o(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(yae,EHe)}catch(i){EHe(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),No.T=t}};bn.unstable_useCacheRefresh=function(){return No.H.useCacheRefresh()};bn.use=function(e){return No.H.use(e)};bn.useActionState=function(e,t,n){return No.H.useActionState(e,t,n)};bn.useCallback=function(e,t){return No.H.useCallback(e,t)};bn.useContext=function(e){return No.H.useContext(e)};bn.useDebugValue=function(){};bn.useDeferredValue=function(e,t){return No.H.useDeferredValue(e,t)};bn.useEffect=function(e,t){return No.H.useEffect(e,t)};bn.useEffectEvent=function(e){return No.H.useEffectEvent(e)};bn.useId=function(){return No.H.useId()};bn.useImperativeHandle=function(e,t,n){return No.H.useImperativeHandle(e,t,n)};bn.useInsertionEffect=function(e,t){return No.H.useInsertionEffect(e,t)};bn.useLayoutEffect=function(e,t){return No.H.useLayoutEffect(e,t)};bn.useMemo=function(e,t){return No.H.useMemo(e,t)};bn.useOptimistic=function(e,t){return No.H.useOptimistic(e,t)};bn.useReducer=function(e,t,n){return No.H.useReducer(e,t,n)};bn.useRef=function(e){return No.H.useRef(e)};bn.useState=function(e){return No.H.useState(e)};bn.useSyncExternalStore=function(e,t,n){return No.H.useSyncExternalStore(e,t,n)};bn.useTransition=function(){return No.H.useTransition()};bn.version="19.2.4"});var RHe=M((gn,NH)=>{"use strict";m();process.env.NODE_ENV!=="production"&&(function(){function e(L,re){Object.defineProperty(r.prototype,L,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",re[0],re[1])}})}function t(L){return L===null||typeof L!="object"?null:(L=Mn&&L[Mn]||L["@@iterator"],typeof L=="function"?L:null)}function n(L,re){L=(L=L.constructor)&&(L.displayName||L.name)||"ReactClass";var Re=L+"."+re;ft[Re]||(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.",re,L),ft[Re]=!0)}function r(L,re,Re){this.props=L,this.context=re,this.refs=Nt,this.updater=Re||an}function o(){}function i(L,re,Re){this.props=L,this.context=re,this.refs=Nt,this.updater=Re||an}function s(){}function u(L){return""+L}function l(L){try{u(L);var re=!1}catch{re=!0}if(re){re=console;var Re=re.error,qe=typeof Symbol=="function"&&Symbol.toStringTag&&L[Symbol.toStringTag]||L.constructor.name||"Object";return Re.call(re,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",qe),u(L)}}function f(L){if(L==null)return null;if(typeof L=="function")return L.$$typeof===ci?null:L.displayName||L.name||null;if(typeof L=="string")return L;switch(L){case Ct:return"Fragment";case be:return"Profiler";case Nr:return"StrictMode";case er:return"Suspense";case Eo:return"SuspenseList";case qt:return"Activity"}if(typeof L=="object")switch(typeof L.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),L.$$typeof){case lt:return"Portal";case Wt:return L.displayName||"Context";case At:return(L._context.displayName||"Context")+".Consumer";case sn:var re=L.render;return L=L.displayName,L||(L=re.displayName||re.name||"",L=L!==""?"ForwardRef("+L+")":"ForwardRef"),L;case Vn:return re=L.displayName||null,re!==null?re:f(L.type)||"Memo";case cr:re=L._payload,L=L._init;try{return f(L(re))}catch{}}return null}function h(L){if(L===Ct)return"<>";if(typeof L=="object"&&L!==null&&L.$$typeof===cr)return"<...>";try{var re=f(L);return re?"<"+re+">":"<...>"}catch{return"<...>"}}function _(){var L=Dt.A;return L===null?null:L.getOwner()}function E(){return Error("react-stack-top-frame")}function T(L){if(Ki.call(L,"key")){var re=Object.getOwnPropertyDescriptor(L,"key").get;if(re&&re.isReactWarning)return!1}return L.key!==void 0}function v(L,re){function Re(){ko||(ko=!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)",re))}Re.isReactWarning=!0,Object.defineProperty(L,"key",{get:Re,configurable:!0})}function R(){var L=f(this.type);return Nu[L]||(Nu[L]=!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.")),L=this.props.ref,L!==void 0?L:null}function x(L,re,Re,qe,tt,Vt){var wt=Re.ref;return L={$$typeof:rt,type:L,key:re,props:Re,_owner:qe},(wt!==void 0?wt:null)!==null?Object.defineProperty(L,"ref",{enumerable:!1,get:R}):Object.defineProperty(L,"ref",{enumerable:!1,value:null}),L._store={},Object.defineProperty(L._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(L,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(L,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:tt}),Object.defineProperty(L,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Vt}),Object.freeze&&(Object.freeze(L.props),Object.freeze(L)),L}function B(L,re){return re=x(L.type,re,L.props,L._owner,L._debugStack,L._debugTask),L._store&&(re._store.validated=L._store.validated),re}function P(L){G(L)?L._store&&(L._store.validated=1):typeof L=="object"&&L!==null&&L.$$typeof===cr&&(L._payload.status==="fulfilled"?G(L._payload.value)&&L._payload.value._store&&(L._payload.value._store.validated=1):L._store&&(L._store.validated=1))}function G(L){return typeof L=="object"&&L!==null&&L.$$typeof===rt}function j(L){var re={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(Re){return re[Re]})}function $(L,re){return typeof L=="object"&&L!==null&&L.key!=null?(l(L.key),j(""+L.key)):re.toString(36)}function V(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(s,s):(L.status="pending",L.then(function(re){L.status==="pending"&&(L.status="fulfilled",L.value=re)},function(re){L.status==="pending"&&(L.status="rejected",L.reason=re)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function oe(L,re,Re,qe,tt){var Vt=typeof L;(Vt==="undefined"||Vt==="boolean")&&(L=null);var wt=!1;if(L===null)wt=!0;else switch(Vt){case"bigint":case"string":case"number":wt=!0;break;case"object":switch(L.$$typeof){case rt:case lt:wt=!0;break;case cr:return wt=L._init,oe(wt(L._payload),re,Re,qe,tt)}}if(wt){wt=L,tt=tt(wt);var Fn=qe===""?"."+$(wt,0):qe;return so(tt)?(Re="",Fn!=null&&(Re=Fn.replace(_d,"$&/")+"/"),oe(tt,re,Re,"",function(li){return li})):tt!=null&&(G(tt)&&(tt.key!=null&&(wt&&wt.key===tt.key||l(tt.key)),Re=B(tt,Re+(tt.key==null||wt&&wt.key===tt.key?"":(""+tt.key).replace(_d,"$&/")+"/")+Fn),qe!==""&&wt!=null&&G(wt)&&wt.key==null&&wt._store&&!wt._store.validated&&(Re._store.validated=2),tt=Re),re.push(tt)),1}if(wt=0,Fn=qe===""?".":qe+":",so(L))for(var fn=0;fn<L.length;fn++)qe=L[fn],Vt=Fn+$(qe,fn),wt+=oe(qe,re,Re,Vt,tt);else if(fn=t(L),typeof fn=="function")for(fn===L.entries&&(wu||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),wu=!0),L=fn.call(L),fn=0;!(qe=L.next()).done;)qe=qe.value,Vt=Fn+$(qe,fn++),wt+=oe(qe,re,Re,Vt,tt);else if(Vt==="object"){if(typeof L.then=="function")return oe(V(L),re,Re,qe,tt);throw re=String(L),Error("Objects are not valid as a React child (found: "+(re==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":re)+"). If you meant to render a collection of children, use an array instead.")}return wt}function te(L,re,Re){if(L==null)return L;var qe=[],tt=0;return oe(L,qe,"","",function(Vt){return re.call(Re,Vt,tt++)}),qe}function le(L){if(L._status===-1){var re=L._ioInfo;re!=null&&(re.start=re.end=performance.now()),re=L._result;var Re=re();if(Re.then(function(tt){if(L._status===0||L._status===-1){L._status=1,L._result=tt;var Vt=L._ioInfo;Vt!=null&&(Vt.end=performance.now()),Re.status===void 0&&(Re.status="fulfilled",Re.value=tt)}},function(tt){if(L._status===0||L._status===-1){L._status=2,L._result=tt;var Vt=L._ioInfo;Vt!=null&&(Vt.end=performance.now()),Re.status===void 0&&(Re.status="rejected",Re.reason=tt)}}),re=L._ioInfo,re!=null){re.value=Re;var qe=Re.displayName;typeof qe=="string"&&(re.name=qe)}L._status===-1&&(L._status=0,L._result=Re)}if(L._status===1)return re=L._result,re===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
@@ -628,7 +628,7 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
|
|
|
628
628
|
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
629
629
|
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){let n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){let o=t.items[t.items.length-2]?.value?.end;if(Array.isArray(o)){Array.prototype.push.apply(o,n.start),o.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){let r=!this.onKeyLine&&this.indent===t.indent,o=r&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind",i=[];if(o&&n.sep&&!n.value){let s=[];for(let u=0;u<n.sep.length;++u){let l=n.sep[u];switch(l.type){case"newline":s.push(u);break;case"space":break;case"comment":l.indent>t.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(i=n.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":o||n.value?(i.push(this.sourceToken),t.items.push({start:i}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):o||n.value?(i.push(this.sourceToken),t.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Ly(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(ket(n.key)&&!Ly(n.sep,"newline")){let s=T1(n.start),u=n.key,l=n.sep;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:u,sep:l}]})}else i.length>0?n.sep=n.sep.concat(i,this.sourceToken):n.sep.push(this.sourceToken);else if(Ly(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{let s=T1(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||o?t.items.push({start:i,key:null,sep:[this.sourceToken]}):Ly(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let s=this.flowScalar(this.type);o||n.value?(t.items.push({start:i,key:s,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(s):(Object.assign(n,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{let s=this.startBlockValue(t);if(s){if(s.type==="block-seq"){if(!n.explicitKey&&n.sep&&!Ly(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else r&&t.items.push({start:i});this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){let n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){let o=t.items[t.items.length-2]?.value?.end;if(Array.isArray(o)){Array.prototype.push.apply(o,n.start),o.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||Ly(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){let r=this.startBlockValue(t);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){let n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:o,sep:[]}):n.sep?this.stack.push(o):Object.assign(n,{key:o,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}let r=this.startBlockValue(t);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===t.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let o=o5(r),i=T1(o);wet(t);let s=t.end.splice(1,t.end.length);s.push(this.sourceToken);let u={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:i,key:t,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
|
|
630
630
|
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
631
|
-
`,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let n=o5(t),r=T1(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=o5(t),r=T1(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};Bet.Parser=Jfe});var Uet=M(e2=>{"use strict";m();var Oet=Lfe(),Jtn=$M(),XM=KM(),Ztn=Ppe(),Wtn=_r(),Xtn=Yfe(),Pet=Zfe();function Met(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new Xtn.LineCounter||null,prettyErrors:t}}function enn(e,t={}){let{lineCounter:n,prettyErrors:r}=Met(t),o=new Pet.Parser(n?.addNewLine),i=new Oet.Composer(t),s=Array.from(i.compose(o.parse(e)));if(r&&n)for(let u of s)u.errors.forEach(XM.prettifyError(e,n)),u.warnings.forEach(XM.prettifyError(e,n));return s.length>0?s:Object.assign([],{empty:!0},i.streamInfo())}function Let(e,t={}){let{lineCounter:n,prettyErrors:r}=Met(t),o=new Pet.Parser(n?.addNewLine),i=new Oet.Composer(t),s=null;for(let u of i.compose(o.parse(e),!0,e.length))if(!s)s=u;else if(s.options.logLevel!=="silent"){s.errors.push(new XM.YAMLParseError(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(s.errors.forEach(XM.prettifyError(e,n)),s.warnings.forEach(XM.prettifyError(e,n))),s}function tnn(e,t,n){let r;typeof t=="function"?r=t:n===void 0&&t&&typeof t=="object"&&(n=t);let o=Let(e,n);if(!o)return null;if(o.warnings.forEach(i=>Ztn.warn(o.options.logLevel,i)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:r},n))}function nnn(e,t,n){let r=null;if(typeof t=="function"||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){let o=Math.round(n);n=o<1?void 0:o>8?{indent:8}:{indent:o}}if(e===void 0){let{keepUndefined:o}=n??t??{};if(!o)return}return Wtn.isDocument(e)&&!r?e.toString(n):new Jtn.Document(e,r,n).toString(n)}e2.parse=tnn;e2.parseAllDocuments=enn;e2.parseDocument=Let;e2.stringify=nnn});var Fet=M(Fr=>{"use strict";m();var rnn=Lfe(),onn=$M(),inn=hfe(),Wfe=KM(),snn=xM(),Uy=_r(),ann=By(),unn=As(),cnn=Py(),lnn=My(),dnn=n5(),pnn=Vfe(),fnn=Yfe(),mnn=Zfe(),i5=Uet(),Qet=IM();Fr.Composer=rnn.Composer;Fr.Document=onn.Document;Fr.Schema=inn.Schema;Fr.YAMLError=Wfe.YAMLError;Fr.YAMLParseError=Wfe.YAMLParseError;Fr.YAMLWarning=Wfe.YAMLWarning;Fr.Alias=snn.Alias;Fr.isAlias=Uy.isAlias;Fr.isCollection=Uy.isCollection;Fr.isDocument=Uy.isDocument;Fr.isMap=Uy.isMap;Fr.isNode=Uy.isNode;Fr.isPair=Uy.isPair;Fr.isScalar=Uy.isScalar;Fr.isSeq=Uy.isSeq;Fr.Pair=ann.Pair;Fr.Scalar=unn.Scalar;Fr.YAMLMap=cnn.YAMLMap;Fr.YAMLSeq=lnn.YAMLSeq;Fr.CST=dnn;Fr.Lexer=pnn.Lexer;Fr.LineCounter=fnn.LineCounter;Fr.Parser=mnn.Parser;Fr.parse=i5.parse;Fr.parseAllDocuments=i5.parseAllDocuments;Fr.parseDocument=i5.parseDocument;Fr.stringify=i5.stringify;Fr.visit=Qet.visit;Fr.visitAsync=Qet.visitAsync});m();m();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="
|
|
631
|
+
`,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let n=o5(t),r=T1(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=o5(t),r=T1(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};Bet.Parser=Jfe});var Uet=M(e2=>{"use strict";m();var Oet=Lfe(),Jtn=$M(),XM=KM(),Ztn=Ppe(),Wtn=_r(),Xtn=Yfe(),Pet=Zfe();function Met(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new Xtn.LineCounter||null,prettyErrors:t}}function enn(e,t={}){let{lineCounter:n,prettyErrors:r}=Met(t),o=new Pet.Parser(n?.addNewLine),i=new Oet.Composer(t),s=Array.from(i.compose(o.parse(e)));if(r&&n)for(let u of s)u.errors.forEach(XM.prettifyError(e,n)),u.warnings.forEach(XM.prettifyError(e,n));return s.length>0?s:Object.assign([],{empty:!0},i.streamInfo())}function Let(e,t={}){let{lineCounter:n,prettyErrors:r}=Met(t),o=new Pet.Parser(n?.addNewLine),i=new Oet.Composer(t),s=null;for(let u of i.compose(o.parse(e),!0,e.length))if(!s)s=u;else if(s.options.logLevel!=="silent"){s.errors.push(new XM.YAMLParseError(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(s.errors.forEach(XM.prettifyError(e,n)),s.warnings.forEach(XM.prettifyError(e,n))),s}function tnn(e,t,n){let r;typeof t=="function"?r=t:n===void 0&&t&&typeof t=="object"&&(n=t);let o=Let(e,n);if(!o)return null;if(o.warnings.forEach(i=>Ztn.warn(o.options.logLevel,i)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:r},n))}function nnn(e,t,n){let r=null;if(typeof t=="function"||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){let o=Math.round(n);n=o<1?void 0:o>8?{indent:8}:{indent:o}}if(e===void 0){let{keepUndefined:o}=n??t??{};if(!o)return}return Wtn.isDocument(e)&&!r?e.toString(n):new Jtn.Document(e,r,n).toString(n)}e2.parse=tnn;e2.parseAllDocuments=enn;e2.parseDocument=Let;e2.stringify=nnn});var Fet=M(Fr=>{"use strict";m();var rnn=Lfe(),onn=$M(),inn=hfe(),Wfe=KM(),snn=xM(),Uy=_r(),ann=By(),unn=As(),cnn=Py(),lnn=My(),dnn=n5(),pnn=Vfe(),fnn=Yfe(),mnn=Zfe(),i5=Uet(),Qet=IM();Fr.Composer=rnn.Composer;Fr.Document=onn.Document;Fr.Schema=inn.Schema;Fr.YAMLError=Wfe.YAMLError;Fr.YAMLParseError=Wfe.YAMLParseError;Fr.YAMLWarning=Wfe.YAMLWarning;Fr.Alias=snn.Alias;Fr.isAlias=Uy.isAlias;Fr.isCollection=Uy.isCollection;Fr.isDocument=Uy.isDocument;Fr.isMap=Uy.isMap;Fr.isNode=Uy.isNode;Fr.isPair=Uy.isPair;Fr.isScalar=Uy.isScalar;Fr.isSeq=Uy.isSeq;Fr.Pair=ann.Pair;Fr.Scalar=unn.Scalar;Fr.YAMLMap=cnn.YAMLMap;Fr.YAMLSeq=lnn.YAMLSeq;Fr.CST=dnn;Fr.Lexer=pnn.Lexer;Fr.LineCounter=fnn.LineCounter;Fr.Parser=mnn.Parser;Fr.parse=i5.parse;Fr.parseAllDocuments=i5.parseAllDocuments;Fr.parseDocument=i5.parseDocument;Fr.stringify=i5.stringify;Fr.visit=Qet.visit;Fr.visitAsync=Qet.visitAsync});m();m();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="735f2e29-bd57-4c88-8687-3ab8b6fde621",e._sentryDebugIdIdentifier="sentry-dbid-735f2e29-bd57-4c88-8687-3ab8b6fde621")}catch{}})();m();m();m();function Tge(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 bge=Tge();bge.ok||(process.stderr.write(`lore: ${bge.message}.
|
|
632
632
|
Upgrade Node (e.g. \`nvm install 20\`) and re-run.
|
|
633
633
|
`),process.exit(1));m();sx();sc();function tPt(){let e=process.env.SENTRY_SPOTLIGHT?.trim();return!e||e==="0"||e==="false"?!1:e==="1"||e==="true"?!0:e}var nPt=tPt(),VFe=Hr(),Kee=VFe!=="dev";Vee({dsn:Kee?"https://583674b382128b1b30b9fa1f0581daab@o4509017064472576.ingest.us.sentry.io/4511344717529088":void 0,environment:VFe,release:hu(),sendDefaultPii:!0,enableLogs:Kee,spotlight:nPt,tracesSampleRate:Kee?1:0});fF("service_name","lore-cli");sx();Wee();import{realpathSync as xan}from"node:fs";import{fileURLToPath as Dan,pathToFileURL as Brt}from"node:url";m();m();Kx();Sr();Ht();An();m();function iP(e){let t=e;return t._def??t.def??{}}function kjt(e){let t=iP(e);return typeof t.typeName=="string"?t.typeName:typeof t.type=="string"?t.type:void 0}function ul(e,t,n){let r=kjt(e);return r===t||r===n}function uHe(e){let t=iP(e);if(t.element)return t.element;if(typeof t.type=="object"&&t.type!==null)return t.type}function Bjt(e){let t=e.options;if(Array.isArray(t))return[...t];let n=iP(e);return Array.isArray(n.values)?[...n.values]:n.entries&&typeof n.entries=="object"?Object.values(n.entries):[]}function mae(e){if(!e||!ul(e,"ZodObject","object"))return;let t=e.shape;if(typeof t=="function")return t();if(t&&typeof t=="object")return t;let n=iP(e).shape;if(typeof n=="function")return n();if(n&&typeof n=="object")return n}function cHe(e){let t=e,n=!1,r,o=e.description;for(;;){o=t.description??o;let i=iP(t);if(ul(t,"ZodOptional","optional"))n=!0,t=i.innerType;else if(ul(t,"ZodNullable","nullable"))n=!0,t=i.innerType;else if(ul(t,"ZodDefault","default"))r=typeof i.defaultValue=="function"?i.defaultValue():i.defaultValue,t=i.innerType;else if(ul(t,"ZodEffects","effects"))t=i.schema;else if(ul(t,"ZodPipeline","pipe"))t=i.in;else break}return{inner:t,optional:n,defaultValue:r,description:o}}function Ojt(e,t={}){let{inner:n,optional:r,defaultValue:o,description:i}=cHe(e),s=!1,u=n;ul(u,"ZodArray","array")&&(s=!0,u=uHe(u)??u);let l=!r&&o===void 0;return t.positional?{arg:{type:"positional",description:i,required:l,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:s}:ul(u,"ZodEnum","enum")?{arg:{type:"enum",description:i,options:Bjt(u),required:l,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:s}:ul(u,"ZodBoolean","boolean")?{arg:{type:"boolean",description:i,required:l,...typeof o=="boolean"?{default:o}:{}},optional:r,isArray:s}:{arg:{type:"string",description:s?`${i??""}${i?" ":""}(comma-separated)`.trim()||void 0:i,required:l,...o!==void 0?{default:String(o)}:{},...s?{valueHint:"a,b,c"}:{}},optional:r,isArray:s}}function Aae(e,t={}){let n={},r={};for(let[o,i]of Object.entries(e)){let{arg:s,isArray:u}=Ojt(i,t);n[o]=s,r[o]={isArray:u,leafKind:Pjt(i)}}return{args:n,fields:r}}function gae(e,t={}){let n=mae(e);return n?Aae(n,t):{args:{},fields:{}}}function Pjt(e){let{inner:t}=cHe(e),n=t;return ul(n,"ZodArray","array")&&(n=uHe(n)??n),ul(n,"ZodNumber","number")?"number":ul(n,"ZodBoolean","boolean")?"boolean":ul(n,"ZodEnum","enum")?"enum":ul(n,"ZodString","string")?"string":"other"}function Mjt(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 Ljt(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 hae(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 Ujt(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 Qjt(e,t){let n=t.path.map(o=>String(o)).join(".");return` ${n?`${e}.${n}`:e}: ${t.message}`}function _ae(e,t,n){if(!e)return[];let r=t??{},o=e.safeParse(r);return o.success?[]:(o.error.issues??[]).map(s=>Qjt(n,s))}function Fjt(e,t,n){return e.resource==="threads"&&t==="id"?Ujt(n):n}function lHe(e){let t=Mjt(dH,e.path),n=mae(t.pathParams),r=e.positional??(n?Object.keys(n):[]),o=new Set(r),i=Aae(n?Object.fromEntries(r.map(h=>[h,n[h]])):{},{positional:!0}),s=gae(t.query),u=t.method==="GET"||t.method==="DELETE"?{args:{},fields:{}}:gae(t.body);for(let h of Object.keys(u.args))if(s.args[h]!==void 0||o.has(h))throw new Error(`route [${e.path.join(".")}] has overlapping field "${h}" across path/query/body`);let l={...i.args,...s.args,...u.args},f=e.description??t.summary??`${t.method} ${t.path}`;return{meta:{name:e.op,description:f},args:l,async run({args:h,data:_}){H.info("command_start",{command:`${e.resource} ${e.op}`,route:e.path.join(".")});let E=_;if(!await(E?.getAccessToken??zt)())throw new xe("not logged in \u2014 run 'lore login' first");let v={};for(let oe of r){let te=h[oe],le=hae(te,i.fields[oe])??te;v[oe]=Fjt(e,oe,le)}let R={};for(let[oe,te]of Object.entries(s.fields)){let le=hae(h[oe],te);le!==void 0&&(R[oe]=le)}let x={};for(let[oe,te]of Object.entries(u.fields)){let le=hae(h[oe],te);le!==void 0&&(x[oe]=le)}let B=[..._ae(t.pathParams,v,"path"),..._ae(t.query,R,"query"),...t.method==="GET"||t.method==="DELETE"?[]:_ae(t.body,x,"body")];if(B.length>0)throw new xe(`Invalid request for \`lore ${e.resource} ${e.op}\`:
|
|
634
634
|
${B.join(`
|
|
@@ -652,9 +652,9 @@ Inspect: lore quarantine show <id> Discard: lore quarantine discard <id> Ret
|
|
|
652
652
|
The held transcript is never uploaded, and secret values are never shown.`)}},EZt={meta:{name:"discard",description:"Delete a quarantined thread locally (it is never uploaded)"},args:{id:{type:"positional",required:!0,description:"Quarantine id or prefix"}},async run({args:e}){let t=await fpe(String(e.id));await _M(t.id),console.log(`Discarded quarantine ${t.id.slice(0,12)} (deleted locally).`)}},yZt={meta:{name:"release",description:"Re-scan the current source transcript and upload it only if it is now clean"},args:{id:{type:"positional",required:!0,description:"Quarantine id or prefix"}},async run({args:e}){let t=await fpe(String(e.id)),n=await Vi(t.sourcePath);if(!n.exists)throw new xe(`source transcript no longer exists: ${t.sourcePath} \u2014 run \`lore quarantine discard ${t.id.slice(0,12)}\``);if(!await zt())throw new xe("not logged in \u2014 run 'lore login' first");let r=hZt.has(t.harness)?t.harness:"unspecified",o=await dl(t.sourcePath),i={key:t.id,filename:t.filename,sourcePath:t.sourcePath,repoOriginPath:"",tempPath:o.tempPath,md5:o.md5,fileType:"transcript",harness:r,harnessInternalId:t.harnessInternalId,watchedState:n};try{let[s]=await BA(xt(),[i]);if(!s||s.status==="no_upload"){console.log("Nothing to upload.");return}if(s.status==="quarantined"){s.quarantineId!==t.id&&await _M(t.id),console.log(`Still held: ${s.findingCount} finding(s) remain in the current source. Remove them, then release again.`);return}await _M(t.id),console.log(`Released ${t.id.slice(0,12)} \u2014 uploaded${s.status==="deduped"?" (already on Lore)":""} and removed from quarantine.`)}finally{await Ac(o.tempPath)}}},OZe={meta:{name:"quarantine",description:"Inspect and manage transcripts the scrubber held locally (never uploaded)"},subCommands:{list:BZe,show:_Zt,discard:EZt,release:yZt},run:BZe.run};m();Wee();uM();Ht();aM();import{spawn as wZt}from"node:child_process";import{stdin as HZe,stdout as kZt}from"node:process";import{createInterface as BZt}from"node:readline/promises";m();Ht();An();Lr();sy();m();await ho();var SM=ue(pn(),1);await hb();m();await ho();await RA();await Eb();await xA();await yb();await Sb();var gc=ue($t(),1),SZt={enable:"lore enable",disable:"lore disable",restart:"lore restart"},TZt={enable:"installing the launchd agent (\u2264 1 minute)\u2026",disable:"unloading the launchd agent\u2026",restart:"kickstarting the launchd agent\u2026"},bZt={enable:"Background uploads enabled",disable:"Background uploads disabled",restart:"Background uploads restarted"};function PZe(){return{phase:"starting"}}function MZe(e,t){switch(t.kind){case"enable_started":case"restart_started":case"disable_started":return{...e,phase:"in_progress"};case"enable_finished":return{...e,phase:"finished",result:{plistPath:t.plistPath,binaryPath:t.binaryPath,logFile:t.logFile}};case"restart_finished":case"disable_finished":return{...e,phase:"finished"};case"error":return{...e,phase:"errored",errorMessage:t.message}}}function xy({mode:e,state:t}){return(0,gc.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,gc.jsx)(Us,{title:SZt[e],subtitle:"background uploads"}),t.phase==="starting"||t.phase==="in_progress"?(0,gc.jsx)(Qn,{title:"Working",children:(0,gc.jsx)(Ha,{label:TZt[e]})}):null,t.phase==="finished"?(0,gc.jsx)(Qs,{kind:"success",title:bZt[e],children:IZt(e,t)}):null,t.phase==="errored"?(0,gc.jsx)(Qs,{kind:"error",title:"Failed",children:(0,gc.jsx)(_e,{children:t.errorMessage??"Unknown error."})}):null]})}function IZt(e,t){return e==="disable"?(0,gc.jsx)(_e,{children:"The Lore launchd agent has been unloaded and its stable binary removed."}):t.result?(0,gc.jsxs)(Ee,{flexDirection:"column",children:[(0,gc.jsx)(tn,{label:"LaunchAgent",value:t.result.plistPath}),(0,gc.jsx)(tn,{label:"Stable binary",value:t.result.binaryPath}),(0,gc.jsx)(tn,{label:"Log file",value:t.result.logFile})]}):(0,gc.jsx)(_e,{children:"The Lore launchd agent is running again. Run lore status to inspect it."})}m();await ho();await RA();await Eb();await xA();await Sb();Ls();var Qr=ue($t(),1);function EM({report:e}){return(0,Qr.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,Qr.jsx)(Us,{title:"lore status",subtitle:"background uploads"}),(0,Qr.jsxs)(Ee,{flexDirection:"row",gap:2,children:[(0,Qr.jsx)(Ee,{flexDirection:"column",width:"50%",children:(0,Qr.jsxs)(Qn,{title:"Health",children:[(0,Qr.jsx)(tn,{label:"Threads",value:e.subsystems.threads.health,kind:e.subsystems.threads.healthy?"success":"warning"}),(0,Qr.jsx)(tn,{label:"Skills",value:e.subsystems.skills.health,kind:e.subsystems.skills.healthy?"success":"warning"}),(0,Qr.jsx)(tn,{label:"Enabled",value:e.enabled?"yes":"no",kind:e.enabled?"success":"idle"}),(0,Qr.jsx)(tn,{label:"Loaded",value:e.loaded?"yes":"no",kind:e.loaded?"success":"idle"}),(0,Qr.jsx)(tn,{label:"Running",value:e.running?"yes":"no",kind:e.running?"success":"idle"}),(0,Qr.jsx)(tn,{label:"Heartbeat",value:e.status?.last_heartbeat_at?LZe(e.status.last_heartbeat_at):"never",kind:e.heartbeat_fresh?"success":"idle"}),(0,Qr.jsx)(tn,{label:"Last upload",value:e.status?.last_success_at?LZe(e.status.last_success_at):"never"})]})}),(0,Qr.jsx)(Ee,{flexDirection:"column",width:"50%",children:(0,Qr.jsxs)(Qn,{title:"Paths",children:[(0,Qr.jsx)(tn,{label:"LaunchAgent",value:e.plist_path}),(0,Qr.jsx)(tn,{label:"Stable binary",value:e.binary_path}),(0,Qr.jsx)(tn,{label:"Status file",value:e.status_path}),(0,Qr.jsx)(tn,{label:"Daemon status",value:e.daemon_status_path}),(0,Qr.jsx)(tn,{label:"Install source",value:e.install_source_path}),(0,Qr.jsx)(tn,{label:"Label",value:e.label})]})})]}),e.status?.last_error?(0,Qr.jsx)(Ee,{marginTop:1,children:(0,Qr.jsx)(Qs,{kind:"error",title:"Last error",children:(0,Qr.jsx)(_e,{color:De.danger,children:e.status.last_error})})}):null,e.healthy?null:(0,Qr.jsx)(Ee,{marginTop:1,children:(0,Qr.jsx)(Qs,{kind:"warning",title:`Not healthy: ${e.health}`,children:(0,Qr.jsxs)(_e,{children:["Run ",(0,Qr.jsx)(_e,{bold:!0,children:"lore restart"})," to kick the agent, or ",(0,Qr.jsx)(_e,{bold:!0,children:"lore logs"})," to inspect recent activity."]})})})]})}function LZe(e){let t=Date.parse(e);if(Number.isNaN(t))return e;let n=Math.max(0,Math.floor((Date.now()-t)/1e3));return n<60?`${n}s ago`:n<3600?`${Math.floor(n/60)}m ago`:n<86400?`${Math.floor(n/3600)}h ago`:`${Math.floor(n/86400)}d ago`}var yM=ue($t(),1);function CZt({mode:e,perform:t}){let[n,r]=(0,SM.useState)(PZe),{exit:o}=Ms();return(0,SM.useEffect)(()=>{let i=!1,s=u=>{i||r(l=>MZe(l,u))};return(async()=>{try{await t(s)}catch(u){s({kind:"error",message:u instanceof Error?u.message:String(u)}),setTimeout(()=>o(u instanceof Error?u:new Error(String(u))),100);return}setTimeout(()=>o(),100)})(),()=>{i=!0}},[]),(0,yM.jsx)(xy,{mode:e,state:n})}async function mpe(e,t){await cl((0,yM.jsx)(CZt,{mode:e,perform:t})).waitUntilExit()}async function UZe(e){function t(){let{exit:r}=Ms();return(0,SM.useEffect)(()=>{setTimeout(()=>r(),50)},[]),(0,yM.jsx)(EM,{report:e})}await cl((0,yM.jsx)(t,{})).waitUntilExit()}r1();m();Lr();var a9=e=>{switch(e.kind){case"enable_started":console.log("(we're waiting on macOS launchd; this takes up to a minute \u2026)");return;case"enable_finished":console.log("Lore background uploads enabled."),console.log(`LaunchAgent: ${e.plistPath}`),console.log(`Stable binary: ${e.binaryPath}`),console.log(`Log file: ${e.logFile}`);return;case"disable_started":return;case"disable_finished":console.log("Lore background uploads disabled.");return;case"restart_started":console.log("(we're waiting on macOS launchd; this takes up to a minute \u2026)");return;case"restart_finished":console.log("Lore background uploads restarted.");return;case"error":console.error(e.message);return}};var QZe="(we're waiting on macOS launchd; this takes up to a minute \u2026)";function vZt(){if(!process.stdout.isTTY)return console.log(QZe),{stop(){}};let e=["|","/","-","\\"],t=0,n=()=>{process.stdout.write(`\r${e[t%e.length]} ${QZe}`),t++};n();let r=setInterval(n,100);return{stop(){clearInterval(r),process.stdout.write("\r\x1B[2K")}}}async function Ape(e,t,n){t(e==="enable"?{kind:"enable_started"}:{kind:"restart_started"});let{plistPath:r,binaryPath:o}=await n();t(e==="enable"?{kind:"enable_finished",plistPath:r,binaryPath:o,logFile:Sp()}:{kind:"restart_finished"})}async function gpe(e,t){e({kind:"disable_started"}),await t(),e({kind:"disable_finished"})}async function hpe(e,t){let n=t?.enableLaunchAgent??lM,r=t?.restartLaunchAgent??L$,o=t?.disableLaunchAgent??HYe,i=e==="restart"?r:n;if(e==="disable"){if(t?.progress){await gpe(t.progress,o);return}if(Cu()){await mpe("disable",l=>gpe(l,o));return}await gpe(a9,o);return}if(t?.progress){await Ape(e,t.progress,i);return}if(Cu()){await mpe(e,l=>Ape(e,l,i));return}let s=vZt(),u=[];try{await Ape(e,l=>u.push(l),i)}finally{s.stop()}if(e==="enable"){H.info("daemon.enable.captured",{kinds:u.map(f=>f?.kind??"unknown")});let l=RZt(u);a9({kind:"enable_finished",plistPath:l.plistPath,binaryPath:l.binaryPath,logFile:Sp()})}else a9({kind:"restart_finished"})}function RZt(e){for(let n=e.length-1;n>=0;n--){let r=e[n];if(r?.kind==="enable_finished")return{plistPath:r.plistPath,binaryPath:r.binaryPath}}let t=e.map(n=>n?.kind??"unknown").join(", ");throw new Error(`enable_finished event was never emitted (captured: [${t}])`)}var GZe={meta:{name:"enable",description:"Install and start background uploads"},async run({data:e}){await hpe("enable",e)}},u9={meta:{name:"disable",description:"Stop and remove background uploads"},async run({data:e}){await hpe("disable",e)}},jZe={meta:{name:"restart",description:"Restart background uploads"},async run({data:e}){await hpe("restart",e)}};function xZt(e){let t=[];return t.push(`Threads: ${e.subsystems.threads.health}`),t.push(`Skills: ${e.subsystems.skills.health}`),t.push(`Enabled: ${e.enabled}`),t.push(`Loaded: ${e.loaded}`),e.running&&t.push("Process running: true"),t.push(`Healthy: ${e.healthy}`),e.status?.last_heartbeat_at&&t.push(`Last heartbeat: ${e.status.last_heartbeat_at}`),e.status?.last_success_at&&t.push(`Last success: ${e.status.last_success_at}`),e.status?.last_error&&t.push(`Last error: ${e.status.last_error}`),t.push(`LaunchAgent: ${e.plist_path}`),t.push(`Stable binary: ${e.binary_path}`),t.push(`Status file: ${e.status_path}`),t.push(`Daemon status file: ${e.daemon_status_path}`),t.join(`
|
|
653
653
|
`)}async function DZt(){await n9(new Date);let e=(await d1()).length,t=RZe(),n=t.source?`v${t.schemaVersion} (bundled, ${t.source.tool} ${t.source.ref})`:`v${t.schemaVersion} (bundled)`;return{quarantined:e,ruleset:n}}function FZe(e){return`Scrubber: ${e.quarantined===0?"no quarantined threads":`${e.quarantined} quarantined thread(s) \u2014 run \`lore quarantine\``}; ruleset ${e.ruleset}`}var zZe={meta:{name:"status",description:"Show background upload status"},args:{json:{type:"boolean",description:"Output status as JSON"}},async run({args:e,data:t}){let r=await(t?.getLaunchAgentStatusReport??U$)(),o=await DZt();if(e.json){if(console.log(JSON.stringify({...r,scrubber:o},null,2)),!r.healthy)throw new xe(`Lore background uploads are not healthy: ${r.health}`);return}if(Cu()){if(await UZe(r),console.log(FZe(o)),!r.healthy)throw new xe("");return}if(console.log(xZt(r)),console.log(FZe(o)),!r.healthy)throw new xe(`Lore background uploads are not healthy: ${r.health}`)}};var TM="@loredotlink/cli",c9={command:"npm",args:["uninstall","-g",TM]};function OZt(e){switch(e){case"yarn":return{command:"yarn",args:["global","remove",TM]};case"pnpm":return{command:"pnpm",args:["remove","-g",TM]};case"npm":case"unknown":return c9}}async function PZt(){if(!HZe.isTTY)return"";let e=BZt({input:HZe,output:kZt});try{return await e.question("Why are you uninstalling Lore? (optional) ")}finally{e.close()}}async function MZt({promptForReason:e=PZt,track:t=Ch,detectPackageManager:n=P$,runDisable:r=UZt,runPackageCommand:o=QZt,log:i=console.log}={}){let s=(await e()).trim();s&&await _pe({log:i,startMessage:"Recording uninstall feedback...",failureAction:"record uninstall feedback",manualInstruction:"You can send feedback to support@tanagram.ai.",run:()=>t("lore.cli.uninstall.feedback",{reason:s})}),await _pe({log:i,startMessage:"Stopping background uploads...",failureAction:"stop background uploads",manualInstruction:"You can run `lore disable` manually.",run:r});let u=await LZt(n,i),l=$Ze(u.command,u.args);await _pe({log:i,startMessage:`Uninstalling ${TM} with ${u.command}...`,failureAction:`uninstall ${TM}`,manualInstruction:`You can run \`${l}\` manually.`,run:()=>o(u.command,u.args)}),i("goodbye")}async function LZt(e,t){try{let{packageManager:n}=await e();return OZt(n)}catch(n){return t(`Could not detect package manager: ${jt(n)}`),t(`Falling back to \`${$Ze(c9.command,c9.args)}\`.`),c9}}async function _pe({log:e,startMessage:t,failureAction:n,manualInstruction:r,run:o}){e(t);try{await o()}catch(i){e(`Could not ${n}: ${jt(i)}`),e(r)}}function $Ze(e,t){return[e,...t].join(" ")}async function UZt(){await pT(u9,{rawArgs:[]})}function QZt(e,t){return new Promise((n,r)=>{let o=wZt(e,t,{stdio:"inherit"});o.on("error",r),o.on("close",(i,s)=>{if(i===0){n();return}let u=s?`signal ${s}`:`exit code ${i??"unknown"}`;r(new Error(`${e} ${t.join(" ")} failed with ${u}`))})})}var qZe={meta:{name:"uninstall",description:"Uninstall Lore and remove local integrations",skipAutoupdate:!0},async run(){await MZt()}};m();uM();Ht();var bM="@loredotlink/cli";async function FZt({runUpdate:e=MYe,log:t=console.log}={}){t("Checking for Lore CLI updates...");let n=await e();if(GZt(n,t))throw new xe("")}function GZt(e,t){return e?e.error?(t(`Update failed: ${e.error}`),!0):e.newVersion?(t(`Updated ${bM} from ${e.oldVersion} to ${e.newVersion}.`),!1):e.latestVersion===e.oldVersion?(t(`Lore CLI is already up to date (${e.oldVersion}).`),!1):e.pnpmUpdateMessage?(t(e.pnpmUpdateMessage),!1):e.packageManager==="unknown"?(t(`Could not determine how Lore was installed. Run \`npm install -g ${bM}\` to update manually.`),!1):e.latestVersion?(t(`A newer version of ${bM} is available (${e.latestVersion}). Run \`npm install -g ${bM}\` to update manually.`),!1):(t("No update was applied."),!1):(t(`This CLI build cannot be updated automatically. Install ${bM} with npm to update.`),!1)}var VZe={meta:{name:"update",description:"Update the Lore CLI in the foreground",skipAutoupdate:!0},async run(){await FZt()}};m();sc();var KZe={meta:{name:"version",description:"Print the Lore CLI version"},run(){console.log(hu())}};m();m();Sr();Ht();async function YZe(){if(!await zt())throw new xe("not logged in \u2014 run 'lore login' first")}Ht();An();Du();sy();await $de();var JZe={meta:{name:"configure",description:"Re-run the guided setup for which directories Lore auto-uploads from."},args:{json:{type:"boolean",description:"Print the upload filter allowlist as JSON and exit."},set:{type:"string",description:"Replace the upload filter allowlist with the given JSON document (the same shape `--json` prints). Prints the normalized result as JSON."}},async run({args:e,data:t}){if(H.info("command_start",{command:"configure"}),await YZe(),typeof e.set=="string"){let n;try{n=JSON.parse(e.set)}catch(o){let i=o instanceof Error?o.message:String(o);throw new xe(`--set must be valid JSON: ${i}`)}let r;try{r=hde(n,"from --set")}catch(o){let i=o instanceof Error?o.message:String(o);throw new xe(i)}await Ad(r),console.log(JSON.stringify(D$(r),null,2));return}if(e.json){let n=await Di();console.log(JSON.stringify(D$(n),null,2));return}if(!Cu())throw new xe("lore configure needs an interactive terminal \u2014 use `lore configure --json` / `lore configure --set <json>` or `lore listen create <path>` to manage upload filters non-interactively.");await J$({client:t?.client})}};m();w$();Sr();Ht();An();m();Ht();An();Lr();import tme from"node:fs";import Wet from"node:fs/promises";import{watch as Xet}from"node:fs/promises";import Nb from"node:path";import{setTimeout as l5}from"node:timers/promises";m();var zet=ue(Fet(),1);import Dh from"node:fs/promises";import jet from"node:os";import ai from"node:path";var t2="SKILL.md",Het=()=>ai.join(jet.homedir(),".claude","skills"),$et=()=>ai.join(jet.homedir(),".config","agents","skills"),b1=(e=process.cwd())=>ai.join(e,".claude","skills"),I1=(e=process.cwd())=>ai.join(e,".agents","skills"),Ann=(e,t=process.cwd())=>{switch(e){case"claude_global":return Het();case"agents_global":return $et();case"claude_project":return b1(t);case"agents_project":return I1(t)}};function a5(e){return e==="claude_project"?"claude_global":e==="agents_project"?"agents_global":e}var Xfe=(e,t=[],n={})=>{let r=n.includeCwdProject===!1?t:[e,...t];return[...[...new Set(r.map(i=>ai.resolve(i)))].flatMap(i=>[{kind:"claude_project",dir:b1(i)},{kind:"agents_project",dir:I1(i)}]),{kind:"claude_global",dir:Het()},{kind:"agents_global",dir:$et()}]};var gnn=/^[A-Za-z0-9_][A-Za-z0-9._:-]*$/,n2=e=>{if(typeof e!="string"||e.length===0||e.length>200||e==="."||e===".."||e.includes("/")||e.includes("\\")||/[\x00-\x1f]/.test(e)||!gnn.test(e))return!1;for(let t of e.split(":"))if(t===""||t==="."||t==="..")return!1;return!0},s5=(e,t)=>{let n=ai.resolve(e),r=ai.resolve(t),o=ai.relative(n,r);if(o===""||o.startsWith("..")||ai.isAbsolute(o))throw new Error(`refused to use a skill path outside ${n}: ${r}`);return r},hnn=(e,t)=>n2(e)?Xfe(t).map(n=>s5(n.dir,ai.join(n.dir,e,t2))):[],eme=async e=>{try{return await Dh.access(e),!0}catch{return!1}},qet=async(e,t=process.cwd())=>{for(let n of hnn(e,t))if(await eme(n))return Ket(n,e,t);return null},Vet=async(e,t=process.cwd(),n)=>{let r=ai.resolve(e),o=r;try{(await Dh.stat(r)).isDirectory()&&(o=ai.join(r,t2))}catch{return null}return ai.basename(o)!==t2||!await eme(o)?null:Ket(o,ai.basename(ai.dirname(o)),t,n)},Ket=async(e,t,n,r)=>{let o=await Dh.readFile(e,"utf8"),i=Yet(o);return{name:i.name??t,description:i.description??null,bodyMd:o,filePath:e,rootKind:r??_nn(e,n)}},_nn=(e,t)=>{for(let n of Xfe(t)){let r=ai.relative(ai.resolve(n.dir),ai.resolve(e));if(r!==""&&!r.startsWith("..")&&!ai.isAbsolute(r))return n.kind}return"claude_global"},Enn=/^---\s*\n([\s\S]*?)\n---\s*(?:\n|$)/,Get=e=>{if(typeof e!="string")return null;let t=e.trim();return t.length>0?t:null},Yet=e=>{let t=Enn.exec(e);if(!t)return{name:null,description:null};let n=t[1];if(!n)return{name:null,description:null};let r;try{r=(0,zet.parse)(n)}catch{return{name:null,description:null}}if(!r||typeof r!="object"||Array.isArray(r))return{name:null,description:null};let o=r;return{name:Get(o.name),description:Get(o.description)}};var r2=(e,t,n=process.cwd())=>{if(!n2(t))throw new Error(`refusing to install skill with invalid name: ${JSON.stringify(t)}`);let r=Ann(e,n),o=s5(r,ai.join(r,t));return s5(r,ai.join(o,t2))},ynn=async(e,t)=>{let n=`${e}.tmp.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}`;try{let r=await Dh.open(n,"w");try{await r.writeFile(t,"utf8"),await r.sync()}finally{await r.close()}await Dh.rename(n,e)}catch(r){throw await Dh.unlink(n).catch(()=>{}),r}},u5=async(e,t,n,r=process.cwd())=>{let o=r2(e,t,r),i=ai.dirname(o);return await Dh.mkdir(i,{recursive:!0}),await ynn(o,n),o};var Jet=async({cwd:e=process.cwd(),projectCwds:t=[],includeCwdProject:n=!0}={})=>{let r=new Set,o=[];for(let i of Xfe(e,t,{includeCwdProject:n}))try{let s=await Dh.readdir(i.dir,{withFileTypes:!0});for(let u of s){if(!u.isDirectory()||!n2(u.name))continue;let l=s5(i.dir,ai.join(i.dir,u.name,t2)),f=`${i.kind}:${l}`;if(r.has(f)||!await eme(l))continue;r.add(f);let h=await Dh.readFile(l,"utf8"),_=Yet(h);o.push({name:_.name??u.name,description:_.description??null,bodyMd:h,filePath:l,rootKind:i.kind})}}catch{}return o.sort((i,s)=>i.rootKind.localeCompare(s.rootKind)||i.name.localeCompare(s.name)||i.filePath.localeCompare(s.filePath))};async function nme(e){let t=await e.listSkillInstallationSync({});if(t.status!==200){let s=t.body?.message??`listSkillInstallationSync returned ${t.status}`;throw new xe(s)}H.info("skill_installation_sync_listed",{remote_count:t.body.objects.length});let n=0,r=0,o=new Map;for(let s of t.body.objects){o.set(s.skill_id,s);let u=await u1(s.skill_id),l=u?.rootKind??a5(s.root_kind),f=u?.installPath??r2(l,s.name),h=await ntt(f),_=h===null?null:gd(h);if(h!==null&&!u){H.warn("skill_installation_conflict_detected",{skill_id:s.skill_id,installation_id:s.id,name:s.name,install_path:f,reason:"unmanaged_local_file"}),await ll(Bnn(s,l,f)),r+=1;continue}if(u&&_!==null&&_!==u.lastInstalledHash&&_!==s.latest_content_hash&&s.latest_version!==u.lastInstalledVersion){H.warn("skill_installation_conflict_detected",{skill_id:s.skill_id,installation_id:s.id,name:s.name,install_path:f,reason:"local_and_remote_changed"}),await ll({...u,lastSyncStatus:"conflict"}),r+=1;continue}if(u&&_===s.latest_content_hash){s.installed_version!==s.latest_version&&(await c5(e,s.id,s.latest_version),H.info("skill_installation_cursor_updated",{skill_id:s.skill_id,installation_id:s.id,installed_version:s.latest_version})),await ll({...u,installationId:s.id,baseVersion:s.latest_version,baseContentHash:s.latest_content_hash,lastInstalledVersion:s.latest_version,lastInstalledHash:s.latest_content_hash,lastSyncStatus:"current"});continue}if(u?.lastSyncStatus==="proposed"&&_===u.lastInstalledHash)continue;if(u?.lastInstalledVersion===s.latest_version&&h!==null){s.installed_version!==s.latest_version&&(await c5(e,s.id,s.latest_version),H.info("skill_installation_cursor_updated",{skill_id:s.skill_id,installation_id:s.id,installed_version:s.latest_version}),await ll({...u,installationId:s.id}));continue}H.info("skill_installation_download_started",{skill_id:s.skill_id,installation_id:s.id,name:s.name,version:s.latest_version,root_kind:s.root_kind,install_path:f});let E=await knn(e,s.skill_id,s.latest_version);if(gd(E)!==s.latest_content_hash)throw new xe(`downloaded SKILL.md hash did not match metadata for ${s.skill_id}`);let v=await u5(l,s.name,E);await c5(e,s.id,s.latest_version),H.info("skill_installation_cursor_updated",{skill_id:s.skill_id,installation_id:s.id,installed_version:s.latest_version}),await ll({installationId:s.id,skillId:s.skill_id,name:s.name,rootKind:l,installPath:v,baseVersion:s.latest_version,baseContentHash:s.latest_content_hash,lastInstalledVersion:s.latest_version,lastInstalledHash:s.latest_content_hash,lastSyncStatus:"current"}),H.info("skill_installation_download_applied",{skill_id:s.skill_id,installation_id:s.id,name:s.name,version:s.latest_version,root_kind:s.root_kind,install_path:v}),n+=1}let i=await Dnn(e,o);return{installedUpdated:n,localEditsUploaded:i,conflicts:r}}async function p5(e){if(e.signal?.aborted)return;let t=e.sleep??ttt;H.info("skill_sync_daemon_start",{watch:!!e.watch,poll_interval_ms:e.pollIntervalMs,watch_debounce_ms:e.watchDebounceMs});let n=Promise.resolve(),r=async(l,f)=>{n=n.then(async()=>{if(e.signal?.aborted)return;let h=Date.now();H.info("skill_sync_pass_started",{reason:l,event_type:f?.type,event_id_present:!!f?.id});try{let _=await(e.syncPublishedLocalSkills??cZe)(e.client),E=await nme(e.client),T={publishedLocalPushed:_.pushed.length,installedUpdated:E.installedUpdated,localEditsUploaded:E.localEditsUploaded,conflicts:E.conflicts};H.info("skill_sync_pass_completed",{reason:l,event_type:f?.type,event_id_present:!!f?.id,published_local_pushed:_.pushed.length,published_local_unchanged:_.unchanged.length,published_local_skipped:_.skipped.length,installed_updated:E.installedUpdated,local_edits_uploaded:E.localEditsUploaded,conflicts:E.conflicts,duration_ms:Date.now()-h}),await e.onSyncPass?.({reason:l,event:f,result:T}),f?.id&&await rpe(f.id)}catch(_){throw H.error("skill_sync_pass_failed",{reason:l,event_type:f?.type,event_id_present:!!f?.id,error:jt(_),duration_ms:Date.now()-h}),_}}),await n},o=async l=>{let f=l.id;f&&(n=n.then(async()=>{e.signal?.aborted||await rpe(f)}),await n)};await r("startup");let i=(async()=>{for await(let l of e.events??Rnn()){if(e.signal?.aborted)return;if(l.type==="stream.reconnected"){await r("reconnect",l);continue}if(!xnn(l)){await o(l);continue}await r(l.type==="stream.catchup_truncated"?"catchup_truncated":"event",l)}})(),s=e.watch?Snn({signal:e.signal,debounceMs:e.watchDebounceMs,sleep:t,watchRoots:e.watchRoots,watchEventSource:e.watchEventSource,runPass:()=>r("fs_event")}):Promise.resolve(),u=(async()=>{if(e.pollIntervalMs!==void 0)for(;!e.signal?.aborted;){if(await t(e.pollIntervalMs,e.signal),e.signal?.aborted)return;await r("poll")}})();if(e.pollIntervalMs===void 0){await i;return}await Promise.race([i,u,s])}async function Snn(e){let t=e.debounceMs??2e3,n=!1,r=!1,o,i=async()=>{if(n){r=!0;return}n=!0;try{do r=!1,e.signal?.aborted||await e.runPass();while(r&&!e.signal?.aborted)}finally{n=!1}},s=()=>{H.info("skill_watch_pass_scheduled",{debounce_ms:t}),o&&clearTimeout(o),o=setTimeout(()=>{o=void 0,i()},t),o.unref?.()},u=async(h,_=e.signal)=>{for(;!_?.aborted;)try{let E=e.watchEventSource?.(h,_)??Xet(h,{signal:_});for await(let T of E){if(_?.aborted)break;let v=T.filename?String(T.filename):null,R=!v||v.endsWith("SKILL.md");H.info("skill_watch_event",{root:h,filename:v,filename_is_skill_md:R}),R&&s()}}catch(E){if(_?.aborted||E?.name==="AbortError")break;if(!e.watchEventSource&&ett(E)){H.warn("skill_watch_polling_fallback_started",{root:h,error:jt(E)}),await Cnn(h,_,s);break}H.warn("skill_watch_retry",{root:h,retry_ms:3e4,error:jt(E)}),await e.sleep(3e4,_)}};if(e.watchRoots){let h=Zet(e.watchRoots);if(h.length===0)return H.info("skill_watch_no_roots",{configured_watch_root_count:e.watchRoots.length}),vnn(e.signal);H.info("skill_watch_started",{watch_root_count:h.length,debounce_ms:t});try{await Promise.all(h.map(_=>u(_)))}finally{for(o&&clearTimeout(o);n;)await l5(50).catch(()=>{})}return}let l=new Map,f=async()=>{let h=await Inn(),_=new Set(Zet(h));_.size===0&&H.info("skill_watch_no_roots",{configured_watch_root_count:h.length});for(let[E,T]of l)_.has(E)||(T.controller.abort(),l.delete(E));for(let E of _){if(l.has(E))continue;let T=new AbortController,v=u(E,T.signal);l.set(E,{controller:T,done:v}),H.info("skill_watch_started",{watch_root_count:l.size,debounce_ms:t})}};e.signal?.addEventListener("abort",()=>{for(let h of l.values())h.controller.abort()},{once:!0});try{await f(),await Tnn(e.signal,f)}finally{for(let h of l.values())h.controller.abort();for(await Promise.allSettled([...l.values()].map(h=>h.done)),o&&clearTimeout(o);n;)await l5(50).catch(()=>{})}}function Zet(e){return e.filter(t=>{try{return tme.existsSync(t)&&tme.statSync(t).isDirectory()}catch{return!1}})}async function Tnn(e,t){let n=dh(),r=Nb.dirname(n),o=Nb.basename(n);for(await Wet.mkdir(r,{recursive:!0});!e?.aborted;)try{for await(let i of Xet(r,{signal:e})){if(e?.aborted)break;let s=i.filename?String(i.filename):null;(!s||s===o)&&await t()}}catch(i){if(e?.aborted||i?.name==="AbortError")break;if(ett(i)){H.warn("skill_state_watch_polling_fallback_started",{error:jt(i)}),await bnn(n,e,t);break}H.warn("skill_state_watch_retry",{retry_ms:3e4,error:jt(i)}),await ttt(3e4,e)}}async function bnn(e,t,n){let r=d5(e);for(;!t?.aborted&&(await l5(500,void 0,{signal:t}).catch(()=>{}),!t?.aborted);){let o=d5(e);o!==null&&o!==r&&await n(),r=o}}async function Inn(){let e=await si(),t=new Set;for(let n of Object.values(e.publishedLocal))t.add(Nb.dirname(Nb.resolve(n.filePath)));for(let n of Object.values(e.installed))e.publishedLocal[n.skillId]&&t.add(Nb.dirname(Nb.resolve(n.installPath)));return[...t].sort((n,r)=>n.localeCompare(r))}function ett(e){let t=e?.code;return t==="EMFILE"||t==="ENOSPC"}async function Cnn(e,t,n){let r=Nb.join(e,"SKILL.md"),o=d5(r);for(;!t?.aborted&&(await l5(2e3,void 0,{signal:t}).catch(()=>{}),!t?.aborted);){let i=d5(r);i!==null&&i!==o&&(H.info("skill_watch_event",{root:e,filename:"SKILL.md",filename_is_skill_md:!0,source:"polling_fallback"}),n()),o=i}}function d5(e){try{return tme.statSync(e).mtimeMs}catch{return null}}async function vnn(e){e?.aborted||await new Promise(t=>e?.addEventListener("abort",()=>t(),{once:!0}))}async function*Rnn(){}function xnn(e){return e.type.startsWith("skill.version.")||e.type==="skill.published"||e.type==="stream.catchup_truncated"}function ttt(e,t){return t?.aborted?Promise.resolve():new Promise(n=>{let r=setTimeout(n,e);r.unref?.(),t?.addEventListener("abort",()=>{clearTimeout(r),n()},{once:!0})})}async function Dnn(e,t){let n=0,r,o=await si();for(let i of await tZe()){if(i.lastSyncStatus==="conflict")continue;let s=o.publishedLocal[i.skillId];if(!s)continue;let u=await ntt(i.installPath);if(u===null)continue;let l=gd(u);if(l===i.lastInstalledHash||l===s.lastPublishedHash)continue;H.info("skill_local_edit_detected",{skill_id:i.skillId,installation_id:i.installationId,name:i.name,install_path:i.installPath,base_version:i.baseVersion,last_sync_status:i.lastSyncStatus});let f=t.get(i.skillId);if(f&&f.latest_version!==i.baseVersion){H.warn("skill_installation_conflict_detected",{skill_id:i.skillId,installation_id:i.installationId,name:i.name,install_path:i.installPath,reason:"remote_advanced_before_upload",base_version:i.baseVersion,remote_version:f.latest_version}),await ll({...i,lastSyncStatus:"conflict"});continue}r??=await Nnn(e);let h=await wnn(e,i.skillId);if(!h||h!==r){H.info("skill_local_edit_skipped_not_owner",{skill_id:i.skillId,installation_id:i.installationId,name:i.name,install_path:i.installPath});continue}let _="owner_update",E=f?.root_kind??s.rootKind,T;try{T=await c1(e,{skillId:i.skillId,name:i.name,description:null,bodyMd:u,filePath:i.installPath,rootKind:E},{syncAction:_,baseVersion:i.baseVersion})}catch(v){throw H.warn("skill_local_edit_upload_failed",{skill_id:i.skillId,installation_id:i.installationId,name:i.name,install_path:i.installPath,sync_action:_,base_version:i.baseVersion,error:jt(v)}),v}H.info("skill_local_edit_uploaded",{skill_id:i.skillId,installation_id:i.installationId,name:i.name,install_path:i.installPath,sync_action:_,version:T.version,version_status:T.version_status}),T.version_status==="accepted"&&(await c5(e,i.installationId,T.version),await ll({...i,baseVersion:T.version,baseContentHash:T.content_hash,lastInstalledVersion:T.version,lastInstalledHash:T.content_hash,lastSyncStatus:"current"}),await l1({name:i.name,bodyMd:u,filePath:i.installPath,rootKind:E},{skillId:i.skillId,version:T.version})),n+=1}return n}async function c5(e,t,n){let r=await e.updateSkillInstallation({params:{id:t},body:{installed_version:n}});if(r.status!==200){let o=r.body?.message??`updateSkillInstallation returned ${r.status}`;throw new xe(`wrote skill locally, but failed to record installed version: ${o}`)}}async function Nnn(e){let t=await e.whoAmI({headers:{}});return t.status!==200?null:t.body.user.id}async function wnn(e,t){let n=await e.getSkillDetail({params:{id:t}});return n.status!==200?null:n.body.owner?.id??null}async function knn(e,t,n){let r=await e.getSkillRaw({params:{id:t},query:{version:n}});if(r.status!==200){let o=r.body?.message??`getSkillRaw returned ${r.status}`;throw new xe(o)}return typeof r.body=="string"?r.body:String(r.body)}function Bnn(e,t,n){return{installationId:e.id,skillId:e.skill_id,name:e.name,rootKind:t,installPath:n,baseVersion:e.installed_version??0,baseContentHash:"",lastInstalledVersion:e.installed_version??0,lastInstalledHash:"",lastSyncStatus:"conflict"}}async function ntt(e){try{return await Wet.readFile(e,"utf8")}catch{return null}}m();Sr();Ht();An();import{setTimeout as Onn}from"node:timers/promises";var Pnn=75e3,Mnn=1e3,Lnn=6e4,Unn=250,f5=class extends xe{constructor(t){super(`skill sync event stream returned ${t}; login is required`),this.name="SkillSyncEventStreamAuthError"}};async function*m5(e){if(!e.userId)throw new xe("workspace skill sync daemon needs a user subject to subscribe to");if(e.organizationIds.length===0)throw new xe("workspace skill sync daemon needs at least one workspace to subscribe to");let t=e.reconnect??!1,n=jnn(e.backoff),r=e.lastEventId,o=!1;for(;!e.signal?.aborted;)try{o&&(yield{type:"stream.reconnected"});let i=!1;for await(let s of Qnn({...e,lastEventId:r}))i=!0,s.id&&(r=s.id),H.info("skill_event_stream_event_received",{event_type:s.type,event_id_present:!!s.id}),yield s;if(!t||e.signal?.aborted)return;o=!0,H.warn("skill_event_stream_disconnected",{saw_frame:i,will_reconnect:!0}),i&&n.reset(),H.info("skill_event_stream_reconnect_scheduled",{reason:"eof"}),await n.sleep(e.signal)}catch(i){if(e.signal?.aborted||i?.name==="AbortError")return;if(i instanceof f5||!t)throw i;o=!0,H.warn("skill_event_stream_disconnected",{saw_frame:!1,will_reconnect:!0,error:jt(i)}),H.info("skill_event_stream_reconnect_scheduled",{reason:"error"}),await n.sleep(e.signal)}}async function*Qnn(e){let t=e.token??await(e.getAccessToken??zt)();if(!t)throw new xe("workspace skill sync daemon requires login \u2014 run 'lore login' first");let n=new URL("/api/events/stream",e.apiBaseUrl??al());n.searchParams.append("subject",`user:${e.userId}`);for(let i of e.organizationIds)n.searchParams.append("subject",`org:${i}`);let r={accept:"text/event-stream",authorization:`Bearer ${t}`};e.lastEventId&&(r["Last-Event-ID"]=e.lastEventId),H.info("skill_event_stream_connecting",{organization_count:e.organizationIds.length,last_event_id_present:!!e.lastEventId});let o=await(e.fetch??fetch)(n,{headers:r,signal:e.signal});if(o.status===401||o.status===403)throw H.warn("skill_event_stream_auth_failed",{status:o.status}),new f5(o.status);if(!o.ok)throw new xe(`skill sync event stream returned ${o.status}`);if(!o.body)throw new xe("skill sync event stream returned no response body");H.info("skill_event_stream_connected",{status:o.status,organization_count:e.organizationIds.length,last_event_id_present:!!e.lastEventId});for await(let i of Fnn(o.body,{signal:e.signal,heartbeatTimeoutMs:e.heartbeatTimeoutMs??Pnn}))yield{id:i.id,type:i.event??"message"}}async function*Fnn(e,t={}){let n=new TextDecoder,r=e.getReader(),o="";try{for(;;){let{done:s,value:u}=await Gnn(r,t.heartbeatTimeoutMs,t.signal);if(s)break;o+=n.decode(u,{stream:!0});let l=o.split(/\r?\n\r?\n/);o=l.pop()??"";for(let f of l){let h=rtt(f);h&&(yield h)}}o+=n.decode();let i=rtt(o);i&&(yield i)}finally{r.releaseLock()}}async function Gnn(e,t,n){if(t===void 0||t<=0)return e.read();let r,o;try{return await Promise.race([e.read(),new Promise((i,s)=>{r=setTimeout(()=>s(new xe("skill sync event stream heartbeat stalled")),t),r.unref?.(),o=()=>s(new DOMException("Aborted","AbortError")),n?.addEventListener("abort",o,{once:!0})})])}finally{r&&clearTimeout(r),o&&n?.removeEventListener("abort",o)}}function rtt(e){let t={data:""};for(let n of e.split(/\r?\n/)){if(!n||n.startsWith(":"))continue;let r=n.indexOf(":"),o=r===-1?n:n.slice(0,r),i=r===-1?"":n.slice(r+1).replace(/^ /,"");o==="id"&&(t.id=i),o==="event"&&(t.event=i),o==="data"&&(t.data+=`${i}
|
|
654
654
|
`)}return!t.id&&!t.event&&!t.data?null:(t.data.endsWith(`
|
|
655
|
-
`)&&(t.data=t.data.slice(0,-1)),t)}function jnn(e={}){let t=e.initialMs??Mnn,n=e.maxMs??Lnn,r=e.jitterMs??Unn,o=e.random??Math.random,i=e.sleep??((u,l)=>Onn(u,void 0,{signal:l}).catch(()=>{})),s=t;return{async sleep(u){let l=Math.min(n,s)+Math.floor(o()*r);s=Math.min(n,Math.max(t,s*2)),await i(l,u)},reset(){s=t}}}m();Sr();sc();Ht();An();Du();ZD();async function A5(e={}){(e.environment??Hr())==="dev"&&await znn({client:e.client})}function ott(){H.warn("dev_preflight_login_required",{hint:`run \`${Hr()==="dev"?"pnpm dev login":"lore login"}\` to authenticate through WorkOS`,apiBaseUrl:al()})}async function znn(e={}){await Ih();let t=await Di();if(t.include.cwd.length>0||t.include.repo.length>0)return;let n=$i(process.env.LORE_DEV_UPLOAD_DIR?.trim()||process.cwd()),r=e.client??xt();try{let o=await r.whoAmI({headers:{}});if(o.status!==200){H.warn("dev_preflight_whoami_failed",{status:o.status}),ott();return}}catch(o){H.warn("dev_preflight_whoami_error",{error:jt(o)}),ott();return}await Ad({...t,include:{...t.include,cwd:Array.from(new Set([...t.include.cwd,n])).sort()}}),H.info("dev_preflight_upload_dir_seeded",{path:n})}m();k$();Ht();An();Lr();import Bb from"node:fs";import{watch as Vrn}from"node:fs/promises";import Eme from"node:path";import{setTimeout as i2}from"node:timers/promises";m();Sr();An();var Hnn=6e4,g5=class{client;now;minIntervalMs;lastBeatAt=Number.NEGATIVE_INFINITY;constructor(t={}){this.client=t.client??xt(),this.now=t.now??Date.now,this.minIntervalMs=t.minIntervalMs??Hnn}async beat(){let t=this.now();t-this.lastBeatAt<this.minIntervalMs||(this.lastBeatAt=t,await this.post({}))}async uploadCompleted(){this.lastBeatAt=this.now(),await this.post({upload_completed:!0})}async post(t){try{await this.client.recordCliHeartbeat({body:t})}catch(n){H.warn("cli_heartbeat_failed",{error:n instanceof Error?n.message:String(n)})}}};m();Kx();k$();Sr();An();Du();import{setTimeout as Ntt}from"node:timers/promises";m();import Al from"node:fs/promises";import ftt from"node:os";import gs from"node:path";m();m();import $nn from"node:os";import itt from"node:path";function stt(e){return e.replace(/[^A-Za-z0-9_-]/g,"-")}function att(e=$nn.homedir(),t=process.env.CLAUDE_CONFIG_DIR){let n=t?.trim();return n?itt.join(n,"projects"):itt.join(e,".claude","projects")}m();import ml from"node:fs";import qnn from"node:os";import wb from"node:path";var rme="local-agent-mode-sessions",ome=["audit.jsonl","transcript.jsonl"];function utt(e=qnn.homedir()){return wb.join(e,"Library","Application Support","Claude",rme)}function ctt(e){if(!ml.existsSync(e))return[];let t=[];for(let n of ml.readdirSync(e,{withFileTypes:!0})){if(!n.isDirectory())continue;let r=wb.join(e,n.name);for(let o of ml.readdirSync(r,{withFileTypes:!0})){if(!o.isDirectory())continue;let i=wb.join(r,o.name);for(let s of ml.readdirSync(i,{withFileTypes:!0})){if(!s.isDirectory()||!s.name.startsWith("local_"))continue;let u=s.name.replace(/^local_/,"");if(!u)continue;let l=wb.join(i,s.name),f=_5(l),h=f?ml.statSync(f):ml.statSync(l);t.push({accountId:n.name,orgId:o.name,sessionId:u,sessionDir:i,localDir:l,mtimeMs:h.mtimeMs})}}}return t.sort((n,r)=>r.mtimeMs-n.mtimeMs),t}function h5(e){if(!ml.existsSync(e))return null;let t=null;for(let n of ml.readdirSync(e,{withFileTypes:!0})){if(!n.isDirectory()||!n.name.startsWith("local_"))continue;let r=wb.join(e,n.name),o=_5(r),i=o!==null,s=o?ml.statSync(o).mtimeMs:ml.statSync(r).mtimeMs;(t===null||i&&!t.hasTranscript||i===t.hasTranscript&&s>t.mtimeMs)&&(t={dir:r,mtimeMs:s,hasTranscript:i})}return t?.dir??null}function _5(e){for(let t of ome){let n=wb.join(e,t);if(ml.existsSync(n)&&ml.statSync(n).isFile())return n}return null}function ime(e,t){let n=wb.join(e,t);return ml.existsSync(n)?ml.readdirSync(n,{withFileTypes:!0}).filter(r=>r.isFile()&&!r.name.startsWith(".")).map(r=>r.name).sort((r,o)=>r.localeCompare(o)):[]}Ht();G$();An();Du();Th();m();Ht();import{createReadStream as Vnn}from"node:fs";import Knn from"node:fs/promises";import{createInterface as Ynn}from"node:readline";var Jnn=50;async function ltt(e,t={}){let n=t.maxLines??Jnn;try{await Knn.stat(e)}catch(o){if(Ur(o,"ENOENT"))return null;throw o}let r=Vnn(e,{encoding:"utf8"});return await new Promise((o,i)=>{let s=!1,u=0,l=_=>{s||(s=!0,f.close(),r.destroy(),o(_))},f=Ynn({input:r,crlfDelay:Number.POSITIVE_INFINITY});f.on("line",_=>{if(s)return;let E=_.trim();if(E){u+=1;try{let T=JSON.parse(E);if(typeof T=="object"&&T!==null&&"cwd"in T&&typeof T.cwd=="string"){let v=T.cwd.trim();if(v){l(v);return}}}catch{}u>=n&&l(null)}}),f.on("close",()=>l(null));let h=_=>{if(!s){if(s=!0,Ur(_,"ENOENT")){o(null);return}i(_)}};f.on("error",h),r.on("error",h)})}var Znn=3600*1e3,Wnn=336*60*60*1e3,E5=Symbol("missingSessionID"),mtt={name:"claudeCode",historyFilePath:y5,readUnuploadedEntries:Att,collectLocalFiles:trn,buildPendingTranscriptWatches:nrn};async function Att(e){let t=y5(),n=Date.now()-Wnn,r;try{r=await Al.readdir(t,{withFileTypes:!0})}catch(i){if(Ur(i,"ENOENT"))return[];throw new Error(`readdir ${t}: ${String(i)}`)}let o=[];for(let i of r){if(!i.isDirectory())continue;let s=gs.join(t,i.name),u;try{u=await Al.readdir(s,{withFileTypes:!0})}catch{continue}for(let l of u){if(!l.isFile()||!l.name.endsWith(".jsonl"))continue;let f=gs.join(s,l.name),h;try{h=await Al.stat(f)}catch{continue}!h.isFile()||h.mtimeMs<n||o.push({sessionId:l.name.slice(0,-6),project:"",timestamp:h.mtimeMs,resolvedTranscriptPath:f})}}return o.sort((i,s)=>i.timestamp-s.timestamp)}async function gtt(){let e=new Map,t;try{t=await Al.readFile(Sy(),"utf8")}catch{return e}for(let n of pM(t)){let r=n.sessionId?.trim(),o=n.project?.trim();r&&o&&!e.has(r)&&e.set(r,o)}return e}async function htt(e,t,n){let r=await ltt(e);return r||((await n()).get(t)??null)}async function Xnn(){let e=Sy(),t;try{t=await Al.readFile(e,"utf8")}catch(n){if(Ur(n,"ENOENT"))return[];throw n}return pM(t,e)}async function _tt(e){let t=await Xnn(),n=e.sessionId.trim();if(n){for(let u=t.length-1;u>=0;u-=1){let l=t[u];if(l?.sessionId?.trim()===n)return l}let s=await ern(n);if(s){let u=e.project.trim()||process.cwd();return{sessionId:n,project:u,timestamp:s.mtimeMs,resolvedTranscriptPath:s.fullPath}}throw new xe(`no history entry or transcript file found for session-id "${n}" \u2014 check ~/.claude/history.jsonl and ~/.claude/projects/`)}let r=gs.normalize(e.project.trim());if(!r)throw new xe("export requires either --session-id or a project path");let o=await YD(r),i=[...t].sort((s,u)=>u.timestamp-s.timestamp);for(let s of i){if(!s.sessionId?.trim())continue;let u=gs.normalize(s.project.trim());if(!u||u===".")continue;if(u===r)return s;if(!o)continue;let l=await YD(u);if(l&&l===o)return s}throw new xe(`no history entry found for project "${r}" \u2014 pass --session-id to pick a specific session, or cd into the repo where the Claude Code session ran`)}async function ern(e){let t=e.trim();if(!t)return null;let n=y5(),r;try{r=await Al.readdir(n,{withFileTypes:!0})}catch(o){if(Ur(o,"ENOENT"))return null;throw new Error(`readdir ${n}: ${String(o)}`)}for(let o of r){if(!o.isDirectory())continue;let i=gs.join(n,o.name,`${t}.jsonl`);try{let s=await Al.stat(i);if(s.isFile())return{fullPath:i,mtimeMs:s.mtimeMs}}catch(s){if(!Ur(s,"ENOENT")&&!Ur(s,"ENOTDIR"))throw new Error(`stat ${i}: ${String(s)}`)}}return null}async function Ett(e){let t=await sme(e);if(t===E5)throw new Error("history entry is missing sessionId");return t}async function trn(e,t={}){let n=[],r=new Array(e.length),o=new Set,i=new Set,s=new Set,u=new Set,l=[],f=null,h=async()=>(f??=await gtt(),f);try{for(let _=0;_<e.length;_+=1){let E=e[_],T=await sme(E);if(T===E5){let te=`__missing_session__:${E.project}:${E.timestamp}:${_}`;r[_]=te,o.add(te),u.add(te);continue}if(r[_]=T.key,u.has(T.key))continue;let v=await Vi(T.fullPath);if(!v.exists){o.add(T.key),u.add(T.key);continue}if(t.isUnchanged?.(T.key,v)){o.add(T.key),u.add(T.key);continue}if(t.isThrottled?.(T.key)){i.add(T.key),u.add(T.key);continue}let R=t.uploadLane?.includes(T.key,v)??!0;if(!R&&t.uploadLane?.name==="normal"){s.add(T.key),u.add(T.key);continue}if(!R){u.add(T.key);continue}let x=E.project.trim()||await htt(T.fullPath,E.sessionId??"",h);if(!x){H.info("upload_filter_session_excluded",{filename:T.relativeFilename,transcript_path:T.fullPath,cwd:"<unresolved>",reason:"no_resolvable_cwd"}),o.add(T.key),u.add(T.key);continue}let B=await Dp(x),P=null,G=async()=>(P!==null||(P=await Al.readFile(T.fullPath,"utf8")),P),j=await bh(t.uploadFilterConfig??CA(),{cwd:x,repoOriginPath:B,transcriptPath:T.fullPath,readTranscript:G});if(!j.shouldUpload){H.info("upload_filter_session_excluded",{filename:T.relativeFilename,transcript_path:T.fullPath,cwd:x,repo_origin_path:B||"<none>",reason:j.reason}),o.add(T.key),u.add(T.key);continue}H.info("upload_filter_session_included",{filename:T.relativeFilename,transcript_path:T.fullPath,cwd:x,repo_origin_path:B||"<none>",reason:"matched"});let $;try{$=await dl(T.fullPath)}catch(te){if(Ur(te,"ENOENT")){o.add(T.key),u.add(T.key);continue}throw new Error(`read session transcript ${T.fullPath}: ${String(te)}`)}l.push($.tempPath),n.push({key:T.key,filename:T.relativeFilename,sourcePath:T.fullPath,repoOriginPath:B,tempPath:$.tempPath,md5:$.md5,fileType:"transcript",harness:"claudeCode",harnessInternalId:E.sessionId?.trim()??"",watchedState:v}),u.add(T.key);let V=await Al.readFile($.tempPath,"utf8"),oe=srn(V);for(let te of oe){let le;try{le=await arn(te)}catch{continue}let Qe=`${T.key}::plan:${le}`;if(u.has(Qe))continue;let Ze=await Vi(le),Ce;try{Ce=await dl(le)}catch(_t){if(Ur(_t,"ENOENT"))continue;throw new Error(`read plan file ${le}: ${String(_t)}`)}l.push(Ce.tempPath),n.push({key:Qe,filename:le,sourcePath:le,repoOriginPath:B,tempPath:Ce.tempPath,md5:Ce.md5,fileType:"plan",harness:"claudeCode",harnessInternalId:le,watchedState:Ze}),u.add(Qe)}}}catch(_){throw await Promise.all(l.map(E=>Al.rm(gs.dirname(E),{recursive:!0,force:!0}))),_}return{entries:e,localFiles:n,entryFileKeys:r,skippedFileKeys:o,deferredFileKeys:i,largeDeferredFileKeys:s}}async function nrn(e,t,n={}){let r=await Att(e),o=Date.now(),i=[],s=new Set,u=null,l=async()=>(u??=await gtt(),u);for(let f of r){let h=await sme(f);if(h===E5||s.has(h.fullPath))continue;s.add(h.fullPath);let _=await Vi(h.fullPath);if(!_.exists)continue;let E=f.project.trim()||await htt(h.fullPath,f.sessionId??"",l);if(!E)continue;let T=await Dp(E),v=await bh(n.uploadFilterConfig??CA(),{cwd:E,repoOriginPath:T,transcriptPath:h.fullPath,readTranscript:()=>Al.readFile(h.fullPath,"utf8")},{ignoreSkillRules:!0});if(!v.shouldUpload){H.info("upload_filter_watch_excluded",{filename:h.relativeFilename,transcript_path:h.fullPath,cwd:E,repo_origin_path:T||"<none>",reason:v.reason});continue}i.push({sessionId:f.sessionId?.trim()??"",project:E,transcriptPath:h.fullPath,expiresAt:new Date(o+Znn),baseline:t.get(h.fullPath)??_})}return i.sort((f,h)=>f.transcriptPath.localeCompare(h.transcriptPath))}async function sme(e){let t=e.sessionId?.trim();if(!t)return E5;let n=y5(),r=e.resolvedTranscriptPath?.trim();if(r){let s=gs.relative(n,r).split(gs.sep).join("/");return{fullPath:r,relativeFilename:s,key:s}}let o=await rrn(e.project),i=null;for(let s of o){let u=orn(s),l=gs.posix.join(u,`${t}.jsonl`),f=gs.join(n,...l.split("/")),h={fullPath:f,relativeFilename:l,key:l};i??=h;try{return await Al.stat(f),h}catch(_){if(!Ur(_,"ENOENT"))throw new Error(`stat session transcript ${f}: ${String(_)}`)}}if(!i)throw new Error("history entry is missing project path");return i}async function rrn(e){let t=gs.normalize(e.trim());if(!t||t===".")throw new Error("history entry is missing project path");let n=[t],r=await YD(t);if(!r||r===t)return n;for(let o=gs.dirname(t);o!==t&&(n.push(o),o!==r);)t=o,o=gs.dirname(o);return n}function orn(e){let t=gs.normalize(e.trim());if(!t||t===".")throw new Error("history entry is missing project path");return stt(t)}function y5(){return att()}function irn(){return gs.join(ftt.homedir(),".claude","plans")}function srn(e){let t=[],n=new Set;for(let r of e.split(`
|
|
655
|
+
`)&&(t.data=t.data.slice(0,-1)),t)}function jnn(e={}){let t=e.initialMs??Mnn,n=e.maxMs??Lnn,r=e.jitterMs??Unn,o=e.random??Math.random,i=e.sleep??((u,l)=>Onn(u,void 0,{signal:l}).catch(()=>{})),s=t;return{async sleep(u){let l=Math.min(n,s)+Math.floor(o()*r);s=Math.min(n,Math.max(t,s*2)),await i(l,u)},reset(){s=t}}}m();Sr();sc();Ht();An();Du();ZD();async function A5(e={}){(e.environment??Hr())==="dev"&&await znn({client:e.client})}function ott(){H.warn("dev_preflight_login_required",{hint:`run \`${Hr()==="dev"?"pnpm dev login":"lore login"}\` to authenticate through WorkOS`,apiBaseUrl:al()})}async function znn(e={}){await Ih();let t=await Di();if(t.include.cwd.length>0||t.include.repo.length>0)return;let n=$i(process.env.LORE_DEV_UPLOAD_DIR?.trim()||process.cwd()),r=e.client??xt();try{let o=await r.whoAmI({headers:{}});if(o.status!==200){H.warn("dev_preflight_whoami_failed",{status:o.status}),ott();return}}catch(o){H.warn("dev_preflight_whoami_error",{error:jt(o)}),ott();return}await Ad({...t,include:{...t.include,cwd:Array.from(new Set([...t.include.cwd,n])).sort()}}),H.info("dev_preflight_upload_dir_seeded",{path:n})}m();k$();Ht();An();Lr();import Bb from"node:fs";import{watch as Vrn}from"node:fs/promises";import Eme from"node:path";import{setTimeout as i2}from"node:timers/promises";m();Sr();An();var Hnn=6e4,g5=class{client;now;minIntervalMs;source;lastBeatAt=Number.NEGATIVE_INFINITY;constructor(t={}){this.client=t.client??xt(),this.now=t.now??Date.now,this.minIntervalMs=t.minIntervalMs??Hnn,this.source=t.source}async beat(){let t=this.now();t-this.lastBeatAt<this.minIntervalMs||(this.lastBeatAt=t,await this.post({}))}async uploadCompleted(){this.lastBeatAt=this.now(),await this.post({upload_completed:!0})}async post(t){try{await this.client.recordCliHeartbeat({body:this.source?{...t,source:this.source}:t})}catch(n){H.warn("cli_heartbeat_failed",{error:n instanceof Error?n.message:String(n)})}}};m();Kx();k$();Sr();An();Du();import{setTimeout as Ntt}from"node:timers/promises";m();import Al from"node:fs/promises";import ftt from"node:os";import gs from"node:path";m();m();import $nn from"node:os";import itt from"node:path";function stt(e){return e.replace(/[^A-Za-z0-9_-]/g,"-")}function att(e=$nn.homedir(),t=process.env.CLAUDE_CONFIG_DIR){let n=t?.trim();return n?itt.join(n,"projects"):itt.join(e,".claude","projects")}m();import ml from"node:fs";import qnn from"node:os";import wb from"node:path";var rme="local-agent-mode-sessions",ome=["audit.jsonl","transcript.jsonl"];function utt(e=qnn.homedir()){return wb.join(e,"Library","Application Support","Claude",rme)}function ctt(e){if(!ml.existsSync(e))return[];let t=[];for(let n of ml.readdirSync(e,{withFileTypes:!0})){if(!n.isDirectory())continue;let r=wb.join(e,n.name);for(let o of ml.readdirSync(r,{withFileTypes:!0})){if(!o.isDirectory())continue;let i=wb.join(r,o.name);for(let s of ml.readdirSync(i,{withFileTypes:!0})){if(!s.isDirectory()||!s.name.startsWith("local_"))continue;let u=s.name.replace(/^local_/,"");if(!u)continue;let l=wb.join(i,s.name),f=_5(l),h=f?ml.statSync(f):ml.statSync(l);t.push({accountId:n.name,orgId:o.name,sessionId:u,sessionDir:i,localDir:l,mtimeMs:h.mtimeMs})}}}return t.sort((n,r)=>r.mtimeMs-n.mtimeMs),t}function h5(e){if(!ml.existsSync(e))return null;let t=null;for(let n of ml.readdirSync(e,{withFileTypes:!0})){if(!n.isDirectory()||!n.name.startsWith("local_"))continue;let r=wb.join(e,n.name),o=_5(r),i=o!==null,s=o?ml.statSync(o).mtimeMs:ml.statSync(r).mtimeMs;(t===null||i&&!t.hasTranscript||i===t.hasTranscript&&s>t.mtimeMs)&&(t={dir:r,mtimeMs:s,hasTranscript:i})}return t?.dir??null}function _5(e){for(let t of ome){let n=wb.join(e,t);if(ml.existsSync(n)&&ml.statSync(n).isFile())return n}return null}function ime(e,t){let n=wb.join(e,t);return ml.existsSync(n)?ml.readdirSync(n,{withFileTypes:!0}).filter(r=>r.isFile()&&!r.name.startsWith(".")).map(r=>r.name).sort((r,o)=>r.localeCompare(o)):[]}Ht();G$();An();Du();Th();m();Ht();import{createReadStream as Vnn}from"node:fs";import Knn from"node:fs/promises";import{createInterface as Ynn}from"node:readline";var Jnn=50;async function ltt(e,t={}){let n=t.maxLines??Jnn;try{await Knn.stat(e)}catch(o){if(Ur(o,"ENOENT"))return null;throw o}let r=Vnn(e,{encoding:"utf8"});return await new Promise((o,i)=>{let s=!1,u=0,l=_=>{s||(s=!0,f.close(),r.destroy(),o(_))},f=Ynn({input:r,crlfDelay:Number.POSITIVE_INFINITY});f.on("line",_=>{if(s)return;let E=_.trim();if(E){u+=1;try{let T=JSON.parse(E);if(typeof T=="object"&&T!==null&&"cwd"in T&&typeof T.cwd=="string"){let v=T.cwd.trim();if(v){l(v);return}}}catch{}u>=n&&l(null)}}),f.on("close",()=>l(null));let h=_=>{if(!s){if(s=!0,Ur(_,"ENOENT")){o(null);return}i(_)}};f.on("error",h),r.on("error",h)})}var Znn=3600*1e3,Wnn=336*60*60*1e3,E5=Symbol("missingSessionID"),mtt={name:"claudeCode",historyFilePath:y5,readUnuploadedEntries:Att,collectLocalFiles:trn,buildPendingTranscriptWatches:nrn};async function Att(e){let t=y5(),n=Date.now()-Wnn,r;try{r=await Al.readdir(t,{withFileTypes:!0})}catch(i){if(Ur(i,"ENOENT"))return[];throw new Error(`readdir ${t}: ${String(i)}`)}let o=[];for(let i of r){if(!i.isDirectory())continue;let s=gs.join(t,i.name),u;try{u=await Al.readdir(s,{withFileTypes:!0})}catch{continue}for(let l of u){if(!l.isFile()||!l.name.endsWith(".jsonl"))continue;let f=gs.join(s,l.name),h;try{h=await Al.stat(f)}catch{continue}!h.isFile()||h.mtimeMs<n||o.push({sessionId:l.name.slice(0,-6),project:"",timestamp:h.mtimeMs,resolvedTranscriptPath:f})}}return o.sort((i,s)=>i.timestamp-s.timestamp)}async function gtt(){let e=new Map,t;try{t=await Al.readFile(Sy(),"utf8")}catch{return e}for(let n of pM(t)){let r=n.sessionId?.trim(),o=n.project?.trim();r&&o&&!e.has(r)&&e.set(r,o)}return e}async function htt(e,t,n){let r=await ltt(e);return r||((await n()).get(t)??null)}async function Xnn(){let e=Sy(),t;try{t=await Al.readFile(e,"utf8")}catch(n){if(Ur(n,"ENOENT"))return[];throw n}return pM(t,e)}async function _tt(e){let t=await Xnn(),n=e.sessionId.trim();if(n){for(let u=t.length-1;u>=0;u-=1){let l=t[u];if(l?.sessionId?.trim()===n)return l}let s=await ern(n);if(s){let u=e.project.trim()||process.cwd();return{sessionId:n,project:u,timestamp:s.mtimeMs,resolvedTranscriptPath:s.fullPath}}throw new xe(`no history entry or transcript file found for session-id "${n}" \u2014 check ~/.claude/history.jsonl and ~/.claude/projects/`)}let r=gs.normalize(e.project.trim());if(!r)throw new xe("export requires either --session-id or a project path");let o=await YD(r),i=[...t].sort((s,u)=>u.timestamp-s.timestamp);for(let s of i){if(!s.sessionId?.trim())continue;let u=gs.normalize(s.project.trim());if(!u||u===".")continue;if(u===r)return s;if(!o)continue;let l=await YD(u);if(l&&l===o)return s}throw new xe(`no history entry found for project "${r}" \u2014 pass --session-id to pick a specific session, or cd into the repo where the Claude Code session ran`)}async function ern(e){let t=e.trim();if(!t)return null;let n=y5(),r;try{r=await Al.readdir(n,{withFileTypes:!0})}catch(o){if(Ur(o,"ENOENT"))return null;throw new Error(`readdir ${n}: ${String(o)}`)}for(let o of r){if(!o.isDirectory())continue;let i=gs.join(n,o.name,`${t}.jsonl`);try{let s=await Al.stat(i);if(s.isFile())return{fullPath:i,mtimeMs:s.mtimeMs}}catch(s){if(!Ur(s,"ENOENT")&&!Ur(s,"ENOTDIR"))throw new Error(`stat ${i}: ${String(s)}`)}}return null}async function Ett(e){let t=await sme(e);if(t===E5)throw new Error("history entry is missing sessionId");return t}async function trn(e,t={}){let n=[],r=new Array(e.length),o=new Set,i=new Set,s=new Set,u=new Set,l=[],f=null,h=async()=>(f??=await gtt(),f);try{for(let _=0;_<e.length;_+=1){let E=e[_],T=await sme(E);if(T===E5){let te=`__missing_session__:${E.project}:${E.timestamp}:${_}`;r[_]=te,o.add(te),u.add(te);continue}if(r[_]=T.key,u.has(T.key))continue;let v=await Vi(T.fullPath);if(!v.exists){o.add(T.key),u.add(T.key);continue}if(t.isUnchanged?.(T.key,v)){o.add(T.key),u.add(T.key);continue}if(t.isThrottled?.(T.key)){i.add(T.key),u.add(T.key);continue}let R=t.uploadLane?.includes(T.key,v)??!0;if(!R&&t.uploadLane?.name==="normal"){s.add(T.key),u.add(T.key);continue}if(!R){u.add(T.key);continue}let x=E.project.trim()||await htt(T.fullPath,E.sessionId??"",h);if(!x){H.info("upload_filter_session_excluded",{filename:T.relativeFilename,transcript_path:T.fullPath,cwd:"<unresolved>",reason:"no_resolvable_cwd"}),o.add(T.key),u.add(T.key);continue}let B=await Dp(x),P=null,G=async()=>(P!==null||(P=await Al.readFile(T.fullPath,"utf8")),P),j=await bh(t.uploadFilterConfig??CA(),{cwd:x,repoOriginPath:B,transcriptPath:T.fullPath,readTranscript:G});if(!j.shouldUpload){H.info("upload_filter_session_excluded",{filename:T.relativeFilename,transcript_path:T.fullPath,cwd:x,repo_origin_path:B||"<none>",reason:j.reason}),o.add(T.key),u.add(T.key);continue}H.info("upload_filter_session_included",{filename:T.relativeFilename,transcript_path:T.fullPath,cwd:x,repo_origin_path:B||"<none>",reason:"matched"});let $;try{$=await dl(T.fullPath)}catch(te){if(Ur(te,"ENOENT")){o.add(T.key),u.add(T.key);continue}throw new Error(`read session transcript ${T.fullPath}: ${String(te)}`)}l.push($.tempPath),n.push({key:T.key,filename:T.relativeFilename,sourcePath:T.fullPath,repoOriginPath:B,tempPath:$.tempPath,md5:$.md5,fileType:"transcript",harness:"claudeCode",harnessInternalId:E.sessionId?.trim()??"",watchedState:v}),u.add(T.key);let V=await Al.readFile($.tempPath,"utf8"),oe=srn(V);for(let te of oe){let le;try{le=await arn(te)}catch{continue}let Qe=`${T.key}::plan:${le}`;if(u.has(Qe))continue;let Ze=await Vi(le),Ce;try{Ce=await dl(le)}catch(_t){if(Ur(_t,"ENOENT"))continue;throw new Error(`read plan file ${le}: ${String(_t)}`)}l.push(Ce.tempPath),n.push({key:Qe,filename:le,sourcePath:le,repoOriginPath:B,tempPath:Ce.tempPath,md5:Ce.md5,fileType:"plan",harness:"claudeCode",harnessInternalId:le,watchedState:Ze}),u.add(Qe)}}}catch(_){throw await Promise.all(l.map(E=>Al.rm(gs.dirname(E),{recursive:!0,force:!0}))),_}return{entries:e,localFiles:n,entryFileKeys:r,skippedFileKeys:o,deferredFileKeys:i,largeDeferredFileKeys:s}}async function nrn(e,t,n={}){let r=await Att(e),o=Date.now(),i=[],s=new Set,u=null,l=async()=>(u??=await gtt(),u);for(let f of r){let h=await sme(f);if(h===E5||s.has(h.fullPath))continue;s.add(h.fullPath);let _=await Vi(h.fullPath);if(!_.exists)continue;let E=f.project.trim()||await htt(h.fullPath,f.sessionId??"",l);if(!E)continue;let T=await Dp(E),v=await bh(n.uploadFilterConfig??CA(),{cwd:E,repoOriginPath:T,transcriptPath:h.fullPath,readTranscript:()=>Al.readFile(h.fullPath,"utf8")},{ignoreSkillRules:!0});if(!v.shouldUpload){H.info("upload_filter_watch_excluded",{filename:h.relativeFilename,transcript_path:h.fullPath,cwd:E,repo_origin_path:T||"<none>",reason:v.reason});continue}i.push({sessionId:f.sessionId?.trim()??"",project:E,transcriptPath:h.fullPath,expiresAt:new Date(o+Znn),baseline:t.get(h.fullPath)??_})}return i.sort((f,h)=>f.transcriptPath.localeCompare(h.transcriptPath))}async function sme(e){let t=e.sessionId?.trim();if(!t)return E5;let n=y5(),r=e.resolvedTranscriptPath?.trim();if(r){let s=gs.relative(n,r).split(gs.sep).join("/");return{fullPath:r,relativeFilename:s,key:s}}let o=await rrn(e.project),i=null;for(let s of o){let u=orn(s),l=gs.posix.join(u,`${t}.jsonl`),f=gs.join(n,...l.split("/")),h={fullPath:f,relativeFilename:l,key:l};i??=h;try{return await Al.stat(f),h}catch(_){if(!Ur(_,"ENOENT"))throw new Error(`stat session transcript ${f}: ${String(_)}`)}}if(!i)throw new Error("history entry is missing project path");return i}async function rrn(e){let t=gs.normalize(e.trim());if(!t||t===".")throw new Error("history entry is missing project path");let n=[t],r=await YD(t);if(!r||r===t)return n;for(let o=gs.dirname(t);o!==t&&(n.push(o),o!==r);)t=o,o=gs.dirname(o);return n}function orn(e){let t=gs.normalize(e.trim());if(!t||t===".")throw new Error("history entry is missing project path");return stt(t)}function y5(){return att()}function irn(){return gs.join(ftt.homedir(),".claude","plans")}function srn(e){let t=[],n=new Set;for(let r of e.split(`
|
|
656
656
|
`)){let o=r.trim();if(!o)continue;let i;try{i=JSON.parse(o)}catch{break}if(i.type!=="assistant")continue;let s=i.message?.content;if(Array.isArray(s))for(let u of s){if(!ptt(u)||u.type!=="tool_use"||u.name!=="ExitPlanMode"||!ptt(u.input))continue;let l=u.input.planFilePath;if(typeof l!="string")continue;let f=l.trim();!f||n.has(f)||(t.push(f),n.add(f))}}return t}async function arn(e){let t=e.trim();if(!t)throw new Error("plan file path is empty");let n=irn(),r=n;try{r=await Al.realpath(n)}catch{}if(t.startsWith("~/")&&(t=gs.join(ftt.homedir(),t.slice(2))),!gs.isAbsolute(t))throw new Error(`plan file path must stay under ${n}`);if(t=gs.normalize(t),!dtt(t,n))throw new Error(`plan file path must stay under ${n}`);try{let o=await Al.realpath(t);if(!dtt(o,r))throw new Error(`plan file path must resolve under ${n}`)}catch(o){if(!Ur(o,"ENOENT"))throw o}return t}function dtt(e,t){let n=gs.relative(t,e);return n===""||n!==".."&&!n.startsWith(`..${gs.sep}`)}function ptt(e){return e!==null&&typeof e=="object"}m();Ht();An();Du();import{createReadStream as urn}from"node:fs";import Qy from"node:fs/promises";import crn from"node:os";import Kf from"node:path";import{createInterface as lrn}from"node:readline";Th();var drn=3600*1e3,Stt={name:"codex",historyFilePath:ame,readUnuploadedEntries:Ttt,collectLocalFiles:frn,buildPendingTranscriptWatches:mrn};function ame(){return process.env.LORE_CODEX_SESSIONS_DIR??Kf.join(crn.homedir(),".codex","sessions")}async function Ttt(e){let t=ame(),n;try{n=await Qy.readdir(t,{withFileTypes:!0})}catch(o){if(Ur(o,"ENOENT"))return[];throw o}let r=[];for(let o of n){if(!o.isDirectory())continue;let i=Kf.join(t,o.name),s;try{s=await Qy.readdir(i,{withFileTypes:!0})}catch{continue}for(let u of s){if(!u.isDirectory())continue;let l=Kf.join(i,u.name),f;try{f=await Qy.readdir(l,{withFileTypes:!0})}catch{continue}for(let h of f){if(!h.isDirectory())continue;let _=Kf.join(l,h.name),E;try{E=await Qy.readdir(_,{withFileTypes:!0})}catch{continue}for(let T of E){if(!T.isFile()||!T.name.startsWith("rollout-")||!T.name.endsWith(".jsonl"))continue;let v=Kf.join(_,T.name),R;try{R=await Qy.stat(v)}catch{continue}if(R.mtimeMs<=e)continue;let x=await prn(v);x!==null&&r.push({timestamp:R.mtimeMs,sessionId:x.id,project:x.cwd,transcriptPath:v})}}}}return r.sort((o,i)=>o.timestamp-i.timestamp)}async function prn(e){let t,n=urn(e,{encoding:"utf8"});try{t=await new Promise((u,l)=>{let f=lrn({input:n,crlfDelay:Number.POSITIVE_INFINITY}),h=!1;f.on("line",_=>{if(h)return;let E=_.trim();E&&(h=!0,f.close(),n.destroy(),u(E))}),f.on("close",()=>{h||u("")}),f.on("error",l),n.on("error",l)})}finally{n.destroy()}if(!t)return H.warn("codex_rollout_skipped",{transcript_path:e,reason:"empty_first_line"}),null;let r;try{r=JSON.parse(t)}catch{return H.warn("codex_rollout_skipped",{transcript_path:e,reason:"unparseable_json"}),null}if(!ytt(r))return H.warn("codex_rollout_skipped",{transcript_path:e,reason:"not_session_meta"}),null;if(r.type!=="session_meta")return H.warn("codex_rollout_skipped",{transcript_path:e,reason:"not_session_meta"}),null;let o=r.payload;if(!ytt(o))return H.warn("codex_rollout_skipped",{transcript_path:e,reason:"missing_payload"}),null;let i=typeof o.id=="string"?o.id.trim():"",s=typeof o.cwd=="string"?o.cwd.trim():"";return!i||!s?(H.warn("codex_rollout_skipped",{transcript_path:e,reason:"missing_id_or_cwd"}),null):{id:i,cwd:s}}async function frn(e,t={}){let n=ame(),r=[],o=new Array(e.length),i=new Set,s=new Set,u=new Set,l=new Set,f=[];try{for(let h=0;h<e.length;h+=1){let _=e[h];if(!_)continue;let E=Kf.relative(n,_.transcriptPath).split(Kf.sep).join("/");if(o[h]=E,l.has(E))continue;let T=await Vi(_.transcriptPath);if(!T.exists){i.add(E),l.add(E);continue}if(t.isUnchanged?.(E,T)){i.add(E),l.add(E);continue}if(t.isThrottled?.(E)){s.add(E),l.add(E);continue}let v=t.uploadLane?.includes(E,T)??!0;if(!v&&t.uploadLane?.name==="normal"){u.add(E),l.add(E);continue}if(!v){l.add(E);continue}let R=await Dp(_.project),x=()=>Qy.readFile(_.transcriptPath,"utf8"),B=await bh(t.uploadFilterConfig??CA(),{cwd:_.project,repoOriginPath:R,transcriptPath:_.transcriptPath,readTranscript:x});if(!B.shouldUpload){H.info("upload_filter_session_excluded",{filename:Kf.basename(_.transcriptPath),transcript_path:_.transcriptPath,cwd:_.project,repo_origin_path:R||"<none>",reason:B.reason}),i.add(E),l.add(E);continue}H.info("upload_filter_session_included",{filename:Kf.basename(_.transcriptPath),transcript_path:_.transcriptPath,cwd:_.project,repo_origin_path:R||"<none>",reason:"matched"});let P;try{P=await dl(_.transcriptPath)}catch(G){if(Ur(G,"ENOENT")){i.add(E),l.add(E);continue}throw new Error(`read codex rollout ${_.transcriptPath}: ${String(G)}`)}f.push(P.tempPath),r.push({key:E,filename:E,sourcePath:_.transcriptPath,repoOriginPath:R,tempPath:P.tempPath,md5:P.md5,fileType:"transcript",harness:"codex",harnessInternalId:_.sessionId,watchedState:T}),l.add(E)}}catch(h){throw await Promise.all(f.map(_=>Qy.rm(Kf.dirname(_),{recursive:!0,force:!0}))),h}return{entries:e,localFiles:r,entryFileKeys:o,skippedFileKeys:i,deferredFileKeys:s,largeDeferredFileKeys:u}}async function mrn(e,t,n={}){let r=await Ttt(e),o=Date.now(),i=[],s=new Set;for(let u of r){if(s.has(u.transcriptPath))continue;s.add(u.transcriptPath);let l=await Vi(u.transcriptPath);if(!l.exists)continue;let f=await Dp(u.project),h=await bh(n.uploadFilterConfig??CA(),{cwd:u.project,repoOriginPath:f,transcriptPath:u.transcriptPath,readTranscript:()=>Qy.readFile(u.transcriptPath,"utf8")},{ignoreSkillRules:!0});if(!h.shouldUpload){H.info("upload_filter_watch_excluded",{filename:Kf.basename(u.transcriptPath),transcript_path:u.transcriptPath,cwd:u.project,repo_origin_path:f||"<none>",reason:h.reason});continue}i.push({sessionId:u.sessionId,project:u.project,transcriptPath:u.transcriptPath,expiresAt:new Date(o+drn),baseline:t.get(u.transcriptPath)??l})}return i}function ytt(e){return e!==null&&typeof e=="object"}m();Ht();An();Du();import T5 from"node:fs";import cme from"node:fs/promises";import kb from"node:path";m();import Arn from"node:fs";var grn=h5,ume=_5;function btt(e){let t=grn(e);if(!t)throw new Error(`Session ${e} has no local_* subdirectory \u2014 is this a Cowork session?`);let n=ume(t);if(!n)throw new Error(`Session ${e} has no transcript file under ${t} (looked for ${ome.join(", ")})`);let r=Arn.readFileSync(n,"utf8"),o=ime(t,"uploads"),i=ime(t,"outputs");return{transcriptPath:n,transcript:r,uploads:o,outputs:i}}m();import o2 from"node:path";var S5=utt;function Itt(e){let t=o2.resolve(e).split(o2.sep),n=t.lastIndexOf(rme);if(n<0)return null;let r=t[n+1],o=t[n+2];if(!r||!o)return null;let i=t.slice(0,n+1).join(o2.sep),s=o2.join(i,r,o),l=t.slice(n+3).find(h=>h.startsWith("local_"))??o2.basename(h5(s)??""),f=l.startsWith("local_")?l.replace(/^local_/,""):"";return{accountId:r,orgId:o,sessionId:f,sessionDir:s,sessionsRoot:i}}function Fy(e){return ctt(e)}function Ctt(e){return Fy(e)[0]??null}Th();var hrn=3600*1e3,Rtt={name:"cowork",historyFilePath:b5,readUnuploadedEntries:_rn,collectLocalFiles:brn,buildPendingTranscriptWatches:Irn};function b5(){return process.env.LORE_COWORK_SESSIONS_DIR??S5()}async function _rn(e){return xtt(e,{includeWatermark:!1})}async function xtt(e,t){let n=b5(),r=Fy(n),o=[];for(let i of r){let s=i.localDir,u=ume(s);if(!u)continue;let l=kb.basename(s),f=kb.join(i.sessionDir,`${l}.json`),h=Ern(f,i.sessionDir);if(h!==null){if(t.includeWatermark){if(h.lastActivityAt<e)continue}else if(h.lastActivityAt<=e)continue;o.push({timestamp:h.lastActivityAt,sessionId:h.sessionId,accountId:i.accountId,orgId:i.orgId,project:"",userSelectedFolders:h.userSelectedFolders,transcriptPath:u})}}return o.sort((i,s)=>i.timestamp-s.timestamp)}function Ern(e,t){let n;try{n=T5.readFileSync(e,"utf8")}catch{return H.warn("cowork_manifest_missing",{session_dir:t,manifest_path:e}),null}let r;try{r=JSON.parse(n)}catch{return H.warn("cowork_manifest_unparseable",{session_dir:t,manifest_path:e}),null}if(!Crn(r))return H.warn("cowork_manifest_not_object",{session_dir:t,manifest_path:e}),null;let o=typeof r.sessionId=="string"?r.sessionId.trim():"";if(!o)return H.warn("cowork_manifest_missing_session_id",{session_dir:t,manifest_path:e}),null;let i=typeof r.lastActivityAt=="number"?r.lastActivityAt:0,s=typeof r.cwd=="string"?r.cwd.trim():"",u=Array.isArray(r.userSelectedFolders)?r.userSelectedFolders.filter(l=>typeof l=="string"&&l.trim().length>0):[];return u.length===0&&H.info("cowork_no_user_folders",{session_dir:t,manifest_path:e,cwd:s||"<none>"}),{sessionId:o,cwd:s,userSelectedFolders:u,lastActivityAt:i}}function yrn(e){return{uploads:lme(e,"uploads"),outputs:lme(e,"outputs")}}function lme(e,t){let n=kb.join(e,t);return T5.existsSync(n)?T5.readdirSync(n,{withFileTypes:!0}).filter(r=>r.isFile()&&!r.name.startsWith(".")).map(r=>r.name).sort((r,o)=>r.localeCompare(o)):[]}var vtt=25*1024*1024,Srn={".txt":"text/plain",".md":"text/markdown",".json":"application/json",".csv":"text/csv",".html":"text/html",".js":"text/javascript",".ts":"text/plain",".py":"text/plain",".pdf":"application/pdf",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml",".zip":"application/zip"};function Trn(e){return Srn[kb.extname(e).toLowerCase()]??null}async function dme(e){let t=[],n=[],r=["upload","output"];for(let o of r){let i=o==="upload"?"uploads":"outputs";for(let s of lme(e,i)){let u=kb.join(e,i,s),l;try{l=T5.statSync(u).size}catch(f){H.warn("cowork_artifact_stat_failed",{file:u,error:String(f)});continue}if(l>vtt){H.info("cowork_artifact_skipped_too_large",{file:u,size_in_bytes:l,max_bytes:vtt});continue}try{let f=await dl(u);n.push(f.tempPath),t.push({kind:o,fileName:s,tempPath:f.tempPath,md5:f.md5,sizeInBytes:l,contentType:Trn(s)})}catch(f){H.warn("cowork_artifact_snapshot_failed",{file:u,error:String(f)})}}}return{artifactFiles:t,tempPaths:n}}async function brn(e,t={}){let n=[],r=new Array(e.length),o=new Set,i=new Set,s=new Set,u=new Set,l=[],f=[...e];try{for(let h=0;h<e.length;h+=1){let _=e[h];if(!_)continue;let E=`${_.accountId}/${_.orgId}/${_.sessionId}/audit.jsonl`;if(r[h]=E,u.has(E))continue;let T=await Vi(_.transcriptPath);if(!T.exists){o.add(E),u.add(E);continue}if(t.isUnchanged?.(E,T)){o.add(E),u.add(E);continue}if(t.isThrottled?.(E)){i.add(E),u.add(E);continue}let v=t.uploadLane?.includes(E,T)??!0;if(!v&&t.uploadLane?.name==="normal"){s.add(E),u.add(E);continue}if(!v){u.add(E);continue}let R=()=>cme.readFile(_.transcriptPath,"utf8"),x=null,B=null;for(let[oe,te]of _.userSelectedFolders.entries()){let le=await Dp(te),Qe=await bh(t.uploadFilterConfig??CA(),{cwd:te,repoOriginPath:le,transcriptPath:_.transcriptPath,readTranscript:R});if(H.info("cowork_upload_filter_folder_evaluated",{session_id:_.sessionId,account_id:_.accountId,org_id:_.orgId,transcript_path:_.transcriptPath,folder_index:oe,folder:te,repo_origin_path:le||"<none>",should_upload:Qe.shouldUpload,reason:Qe.shouldUpload?"matched":Qe.reason}),Qe.shouldUpload){x=te,B=le;break}}if(x===null){H.info("upload_filter_session_excluded",{filename:"audit.jsonl",transcript_path:_.transcriptPath,user_selected_folders:_.userSelectedFolders,reason:_.userSelectedFolders.length===0?"no_user_selected_folders":"no_matching_folder"}),o.add(E),u.add(E);continue}f[h]={..._,project:x},H.info("cowork_upload_filter_session_accepted",{session_id:_.sessionId,account_id:_.accountId,org_id:_.orgId,transcript_path:_.transcriptPath,matched_project:x,repo_origin_path:B||"<none>",user_selected_folders:_.userSelectedFolders}),H.info("upload_filter_session_included",{filename:"audit.jsonl",transcript_path:_.transcriptPath,session_id:_.sessionId,account_id:_.accountId,org_id:_.orgId,cwd:x,repo_origin_path:B||"<none>",reason:"matched"});let P;try{P=await dl(_.transcriptPath)}catch(oe){if(Ur(oe,"ENOENT")){o.add(E),u.add(E);continue}throw new Error(`read cowork audit ${_.transcriptPath}: ${String(oe)}`)}l.push(P.tempPath);let G=kb.dirname(_.transcriptPath),j=yrn(G),{artifactFiles:$,tempPaths:V}=await dme(G);l.push(...V),n.push({key:E,filename:E,sourcePath:_.transcriptPath,repoOriginPath:B??"",tempPath:P.tempPath,md5:P.md5,fileType:"transcript",harness:"cowork",harnessInternalId:_.sessionId,watchedState:T,artifactMetadata:j,artifactFiles:$}),u.add(E)}}catch(h){throw await Promise.all(l.map(_=>cme.rm(kb.dirname(_),{recursive:!0,force:!0}))),h}return{entries:f,localFiles:n,entryFileKeys:r,skippedFileKeys:o,deferredFileKeys:i,largeDeferredFileKeys:s}}async function Irn(e,t,n={}){let r=await xtt(e,{includeWatermark:!0}),o=Date.now(),i=[],s=new Set;for(let u of r){if(s.has(u.transcriptPath))continue;s.add(u.transcriptPath);let l=await Vi(u.transcriptPath);if(!l.exists)continue;let f=()=>cme.readFile(u.transcriptPath,"utf8"),h=null,_=null;for(let[E,T]of u.userSelectedFolders.entries()){let v=await Dp(T),R=await bh(n.uploadFilterConfig??CA(),{cwd:T,repoOriginPath:v,transcriptPath:u.transcriptPath,readTranscript:f},{ignoreSkillRules:!0});if(H.info("cowork_upload_filter_watch_folder_evaluated",{session_id:u.sessionId,account_id:u.accountId,org_id:u.orgId,transcript_path:u.transcriptPath,folder_index:E,folder:T,repo_origin_path:v||"<none>",should_upload:R.shouldUpload,reason:R.shouldUpload?"matched":R.reason}),R.shouldUpload){h=T,_=v;break}}if(h===null){H.info("upload_filter_watch_excluded",{filename:"audit.jsonl",transcript_path:u.transcriptPath,user_selected_folders:u.userSelectedFolders,reason:u.userSelectedFolders.length===0?"no_user_selected_folders":"no_matching_folder"});continue}i.push({sessionId:u.sessionId,project:h,transcriptPath:u.transcriptPath,expiresAt:new Date(o+hrn),baseline:t.get(u.transcriptPath)??l}),H.info("cowork_upload_filter_watch_accepted",{session_id:u.sessionId,account_id:u.accountId,org_id:u.orgId,transcript_path:u.transcriptPath,matched_project:h,repo_origin_path:_||"<none>",user_selected_folders:u.userSelectedFolders})}return i}function Crn(e){return e!==null&&typeof e=="object"}kde();m();Lr();import mme from"node:fs/promises";import vrn from"node:path";var Ame={claudeCode:"Claude Code",codex:"Codex",cowork:"Cowork"},Rrn=["claudeCode","codex","cowork"],pme=Promise.resolve();function I5(e,t=new Date().toISOString()){return{harnessKey:e,label:Ame[e],floorTimestamp:0,entryCount:0,queuedFileCount:0,processedFileCount:0,uploadedFileCount:0,deferredFileCount:0,largeDeferredFileCount:0,state:"idle",updatedAt:t}}function xrn(e=new Date().toISOString()){return{version:1,updatedAt:e,harnesses:{claudeCode:I5("claudeCode",e),codex:I5("codex",e),cowork:I5("cowork",e)}}}function fme(e,t,n){if(typeof t!="object"||t===null)return I5(e,n);let r=t,o=r.state;return{harnessKey:e,label:Ame[e],floorTimestamp:typeof r.floorTimestamp=="number"?r.floorTimestamp:0,entryCount:typeof r.entryCount=="number"?r.entryCount:0,queuedFileCount:typeof r.queuedFileCount=="number"?r.queuedFileCount:0,processedFileCount:typeof r.processedFileCount=="number"?r.processedFileCount:0,uploadedFileCount:typeof r.uploadedFileCount=="number"?r.uploadedFileCount:0,deferredFileCount:typeof r.deferredFileCount=="number"?r.deferredFileCount:0,largeDeferredFileCount:typeof r.largeDeferredFileCount=="number"?r.largeDeferredFileCount:0,state:o==="scanning"||o==="uploading"||o==="complete"||o==="error"?o:"idle",updatedAt:typeof r.updatedAt=="string"?r.updatedAt:n,...typeof r.error=="string"?{error:r.error}:{}}}async function Drn(){let e=new Date().toISOString();try{let t=JSON.parse(await mme.readFile(sae(),"utf8")),n=t.harnesses&&typeof t.harnesses=="object"?t.harnesses:{};return{version:1,updatedAt:typeof t.updatedAt=="string"?t.updatedAt:e,harnesses:{claudeCode:fme("claudeCode",n.claudeCode,e),codex:fme("codex",n.codex,e),cowork:fme("cowork",n.cowork,e)}}}catch{return xrn(e)}}function Nh(e,t){return pme=pme.catch(()=>{}).then(async()=>{let n=new Date().toISOString(),r=await Drn(),o={version:1,updatedAt:n,harnesses:{...r.harnesses,[e]:{...r.harnesses[e],...t,harnessKey:e,label:Ame[e],updatedAt:n}}},i=sae();await mme.mkdir(vrn.dirname(i),{recursive:!0,mode:448}),await mme.writeFile(i,`${JSON.stringify(o,null,2)}
|
|
657
|
-
`,{mode:384})}).catch(()=>{}),pme}async function Dtt(e){await Promise.all(Rrn.map(t=>Nh(t,{floorTimestamp:e[t]})))}var Nrn=1e3,wrn=250,krn=3,Brn=10,Orn=5e3,hme=[mtt,Stt,Rtt],C1=class extends Error{constructor(){super("lore is logged out")}};function Prn(e){return e.adapters!==void 0?e.adapters:e.adapter!==void 0?[e.adapter]:hme}async function ktt(e={}){return(await _me(e)).threadIDs}async function _me(e={}){Gy(e.signal);let t=await j$();await Dtt({claudeCode:gb(t,"claudeCode"),codex:gb(t,"codex"),cowork:gb(t,"cowork")});let n=e.recorder??new WD,r=Prn(e),o=e.client??xt();H.info("run_upload_start",{adapters:r.map(E=>E.name),hasInjectedClient:!!e.client,hasInjectedRecorder:!!e.recorder}),await n.markRunning();let i=[],s=0,u=0,l=0,f=t,h=new Map,_=!1;try{let E=e.uploadFilterConfig??await Di(),T=await Btt({syncState:t,adapters:r,client:o,recorder:n,uploadFilterConfig:E,parseTimeoutMs:e.parseTimeoutMs,uploadNetworkTimeoutMs:e.uploadNetworkTimeoutMs,adapterConcurrency:e.adapterConcurrency,minReuploadIntervalMs:e.minReuploadIntervalMs,now:e.now,lane:e.lane,largeFileSizeThresholdInBytes:e.largeFileSizeThresholdInBytes,signal:e.signal});i=T.threadIDs,s=T.uploadedCount,u=T.deferredCount,l=T.largeDeferredCount,f=T.syncState,h=T.watchBaselineOverrides,_=T.loggedOut,Gy(e.signal),_||(await n.markSyncSuccess(i),s>0&&e.onUploadCompleted?.());let v=e.tailActiveSessions!==!1;if(!_&&v&&s>0){let R=await Mrn({syncState:f,baselineOverrides:h,adapters:r,client:o,recorder:n,uploadFilterConfig:E,parseTimeoutMs:e.parseTimeoutMs,uploadNetworkTimeoutMs:e.uploadNetworkTimeoutMs,adapterConcurrency:e.adapterConcurrency,signal:e.signal});i=[...i,...R.threadIDs],s+=R.uploadedCount,f=R.syncState,_=R.loggedOut,Gy(e.signal)}return _?(H.warn("run_upload_marking_logged_out",{threadIDs:i.length,adapters:r.map(R=>R.name)}),await n.markLoggedOut()):await n.markSuccess(i),{threadIDs:i,uploadedCount:s,deferredCount:u,largeDeferredCount:l}}catch(E){throw Ott(E)||await n.markError(E),E}}function gme(e){if(e==="claudeCode"||e==="codex"||e==="cowork")return e;throw new Error(`runUpload: adapter.name "${e}" is not a known HarnessKey. Expected one of: claudeCode, codex, cowork. Custom adapters must use one of these names or the per-harness watermark cannot be persisted.`)}async function Btt(e){let t=[],n=0,r=0,o=0,i=e.syncState,s=new Map,u=Promise.resolve(),l=v=>(u=u.then(async()=>{for(let[R,x]of v.cursorUpdates)i=sJe(i,v.harnessKey,R,x);i=aJe(i,v.harnessKey,Orn),i=iJe(i,v.harnessKey,v.newFloor);for(let[R,x]of v.watchBaselineOverrides)s.set(R,x);await z$(i)}),u),f=await Hrn(e.adapters,zrn(e.adapterConcurrency,e.adapters.length),async v=>{Gy(e.signal);let R=gme(v.name),x=gb(e.syncState,R),B=e.syncState.harnesses[R]?.cursors??{};try{let P=await Lrn({...e,adapter:v,harnessKey:R,floor:x,cursors:B,onProgress:l});return{adapter:v,harnessKey:R,uploadResult:P}}catch(P){return await Nh(R,{state:"error",error:P instanceof Error?P.message:String(P)}).catch(()=>{}),{adapter:v,harnessKey:R,error:P}}}),h=[],_=0,E,T;for(let v of f)if(Gy(e.signal),!!v){if("error"in v){if(v.error instanceof C1){E=v.adapter.name;continue}if(Ott(v.error)){T??=v.error;continue}h.push(v.error),H.error("run_upload_adapter_failed",{adapter:v.adapter.name,error:v.error instanceof Error?v.error.message:String(v.error)});continue}_+=1,t=[...t,...v.uploadResult.threadIDs],n+=v.uploadResult.uploadedCount,r+=v.uploadResult.deferredCount,o+=v.uploadResult.largeDeferredCount}if(await u,T)throw T;if(_===0&&h.length>0)throw h.length===1?h[0]:new AggregateError(h,"all upload adapters failed");return E?(H.warn("run_upload_logged_out_short_circuit",{adapter:E,threadIDs:t.length}),{threadIDs:t,uploadedCount:n,deferredCount:r,largeDeferredCount:o,syncState:i,watchBaselineOverrides:s,loggedOut:!0}):{threadIDs:t,uploadedCount:n,deferredCount:r,largeDeferredCount:o,syncState:i,watchBaselineOverrides:s,loggedOut:!1}}async function Mrn(e){let t=new Map;for(let s of e.adapters){let u=s.historyFilePath();t.set(u,await Vi(u))}let n=[];for(let s of e.adapters){let u=gme(s.name),l=await s.buildPendingTranscriptWatches(gb(e.syncState,u),e.baselineOverrides,{uploadFilterConfig:e.uploadFilterConfig});n=[...n,...l]}if(await e.recorder.setPendingWatchers(n),n.length===0)return await e.recorder.setPendingWatchers([]),{threadIDs:[],uploadedCount:0,syncState:e.syncState,loggedOut:!1};let r=[],o=0,i=e.syncState;try{for(;;){await Ntt(Nrn,void 0,{signal:e.signal}),Gy(e.signal),await e.recorder.heartbeat();let s=new Date,u=!1;for(let f of e.adapters){let h=f.historyFilePath(),_=t.get(h),E=await Vi(h);_!==void 0&&r9(_,E)&&(u=!0),t.set(h,E)}if(u||(u=await $rn(n)),!u){let f=qrn(n,s);if(n=f.watchers,f.changed&&await e.recorder.setPendingWatchers(n),n.length===0)return{threadIDs:r,uploadedCount:o,syncState:i,loggedOut:!1};continue}await Ntt(wrn,void 0,{signal:e.signal});let l=await Btt({syncState:i,adapters:e.adapters,client:e.client,recorder:e.recorder,uploadFilterConfig:e.uploadFilterConfig,parseTimeoutMs:e.parseTimeoutMs,uploadNetworkTimeoutMs:e.uploadNetworkTimeoutMs,adapterConcurrency:e.adapterConcurrency,lane:"all",signal:e.signal});if(i=l.syncState,o+=l.uploadedCount,l.loggedOut)return{threadIDs:r,uploadedCount:o,syncState:i,loggedOut:!0};if(r.push(...l.threadIDs),await e.recorder.markSyncSuccess(l.threadIDs),l.uploadedCount===0)return{threadIDs:r,uploadedCount:o,syncState:i,loggedOut:!1};for(let f of e.adapters){let h=f.historyFilePath();t.set(h,await Vi(h))}n=[];for(let f of e.adapters){let h=gme(f.name),_=await f.buildPendingTranscriptWatches(gb(i,h),l.watchBaselineOverrides,{uploadFilterConfig:e.uploadFilterConfig});n=[...n,..._]}if(await e.recorder.setPendingWatchers(n),n.length===0)return{threadIDs:r,uploadedCount:o,syncState:i,loggedOut:!1}}}finally{await e.recorder.setPendingWatchers([])}}async function Lrn(e){let t=(v,R)=>{let x=e.cursors[v];return x===void 0?!1:!r9({exists:!0,size:x.sizeBytes,modTimeUnixMs:x.modTimeUnixMs},R)},n=e.minReuploadIntervalMs??0,r=e.now??Date.now,o=e.lane??"all",i=e.largeFileSizeThresholdInBytes??Kje,s=(v,R)=>R.size>i,u=r(),l=v=>{if(n<=0)return!1;let R=e.cursors[v];return R===void 0?!1:u-R.lastUploadedAtMs<n};Gy(e.signal),await Nh(e.harnessKey,{floorTimestamp:e.floor,state:"scanning",entryCount:0,queuedFileCount:0,processedFileCount:0,uploadedFileCount:0,deferredFileCount:0,largeDeferredFileCount:0,error:void 0});let f=Urn(await e.adapter.readUnuploadedEntries(e.floor));if(await Nh(e.harnessKey,{floorTimestamp:e.floor,state:f.length===0?"complete":"scanning",entryCount:f.length}),H.info("run_upload_adapter_entries_read",{adapter:e.adapter.name,entryCount:f.length,floor:e.floor}),f.length===0)return{threadIDs:[],uploadedCount:0,deferredCount:0,largeDeferredCount:0};if(!await zt())throw H.warn("run_upload_no_access_token_for_entries",{adapter:e.adapter.name,entryCount:f.length,floor:e.floor}),new C1;H.info("run_upload_access_token_available",{adapter:e.adapter.name,entryCount:f.length}),await e.recorder.markAuthenticated();let _=await e.adapter.collectLocalFiles(f,{uploadFilterConfig:e.uploadFilterConfig,isUnchanged:t,isThrottled:l,uploadLane:{name:o,includes:(v,R)=>{if(o==="all")return!0;let x=s(v,R);return o==="large"?x:!x}}}),E=_.deferredFileKeys?.size??0,T=_.largeDeferredFileKeys?.size??0;await Nh(e.harnessKey,{state:_.localFiles.length===0?"complete":"uploading",entryCount:_.entries.length,queuedFileCount:_.localFiles.length,processedFileCount:0,uploadedFileCount:0,deferredFileCount:E,largeDeferredFileCount:T});try{let v=[],R=0,x=0,B=new Set(_.skippedFileKeys),P=async()=>{await Nh(e.harnessKey,{state:"uploading",processedFileCount:x,uploadedFileCount:R,deferredFileCount:E,largeDeferredFileCount:T})};if(_.localFiles.length===0){let V=wtt(e.floor,_.entries,_.entryFileKeys,_.skippedFileKeys);return await e.onProgress({harnessKey:e.harnessKey,cursorUpdates:new Map,newFloor:V,watchBaselineOverrides:new Map}),await Nh(e.harnessKey,{floorTimestamp:V,state:"complete",processedFileCount:0,uploadedFileCount:0}),{threadIDs:v,uploadedCount:R,deferredCount:E,largeDeferredCount:T}}let G=Qrn(_.entries,_.entryFileKeys),j=Frn(_.localFiles,G),$=(V,oe)=>{V.set(oe.key,{sizeBytes:oe.watchedState.size,modTimeUnixMs:oe.watchedState.modTimeUnixMs,md5:oe.md5,lastUploadedAtMs:r()})};for(let V of Grn(j,Brn)){let oe=new Map,te=new Map,le=await BA(e.client,V,{networkTimeoutMs:e.uploadNetworkTimeoutMs});for(let Ze of le){x+=1;let{localFile:Ce}=Ze;if(Ze.status==="quarantined"){H.info("run_upload_quarantine",{filename:Ce.filename,reason:Ze.reason,findings:Ze.findingCount}),B.add(Ce.key),await P();continue}if(Ze.status==="deduped"){let bt=Ze.thread?.id?.trim()??"";if(!bt)throw new Error(`deduped upload session response missing thread for ${Ce.filename}`);H.info("run_upload_already_uploaded",{filename:Ce.filename,threadID:bt}),v.push(bt),B.add(Ce.key),$(oe,Ce),await P();continue}if(Ze.status==="no_upload"){let bt=Ze.error?.trim()||`upload session response missing presigned_url and existing thread for ${Ce.filename}`;H.info("run_upload_no_upload_target",{filename:Ce.filename,reason:bt}),B.add(Ce.key),$(oe,Ce),await P();continue}await e.recorder.heartbeat(),Gy(e.signal);let _t=Ze.thread?.id?.trim()??"";if(!_t){if(Ce.fileType==="plan"){B.add(Ce.key),$(oe,Ce),await P();continue}throw new Error(`complete upload session response missing thread for ${Ce.filename}`)}v.push(_t),R+=1,await P();try{await jrn(e.client,_t,e.recorder,{timeoutMs:e.parseTimeoutMs,signal:e.signal})}catch(bt){if(bt instanceof Error&&(bt.message.includes("timed out waiting for thread")||bt.message.includes("parsing failed permanently")||bt.message.includes("unexpected transcript parsing state")))H.warn("parse_wait_soft_failure",{threadID:_t,filename:Ce.filename,message:bt.message});else throw bt}B.add(Ce.key),$(oe,Ce),Ce.sourcePath&&te.set(Ce.sourcePath,Ce.watchedState)}let Qe=wtt(e.floor,_.entries,_.entryFileKeys,B);await e.onProgress({harnessKey:e.harnessKey,cursorUpdates:oe,newFloor:Qe,watchBaselineOverrides:te}),await Nh(e.harnessKey,{floorTimestamp:Qe,state:x>=_.localFiles.length?"complete":"uploading",processedFileCount:x,uploadedFileCount:R,deferredFileCount:E,largeDeferredFileCount:T})}return{threadIDs:v,uploadedCount:R,deferredCount:E,largeDeferredCount:T}}finally{await Promise.all([..._.localFiles.map(v=>Ac(v.tempPath)),..._.localFiles.flatMap(v=>(v.artifactFiles??[]).map(R=>Ac(R.tempPath)))])}}function Urn(e){return e.map((t,n)=>({entry:t,index:n})).sort((t,n)=>t.entry.timestamp-n.entry.timestamp||t.index-n.index).map(({entry:t})=>t)}function Qrn(e,t){let n=new Map;for(let r=0;r<e.length;r+=1){let o=t[r];if(!o)continue;let i=e[r]?.timestamp;i!==void 0&&n.set(o,Math.min(n.get(o)??Number.POSITIVE_INFINITY,i))}return n}function Frn(e,t){return e.map((n,r)=>({localFile:n,index:r,timestamp:t.get(n.key)??Number.POSITIVE_INFINITY})).sort((n,r)=>n.timestamp-r.timestamp||n.index-r.index).map(({localFile:n})=>n)}function Grn(e,t){let n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}async function jrn(e,t,n,r={}){let o={...r,onPoll:()=>n.heartbeat()};await s1(e,t,o)}function Gy(e){if(e?.aborted)throw new DOMException("The operation was aborted","AbortError")}function Ott(e){return e instanceof Error&&e.name==="AbortError"}function zrn(e,t){return t<=0?1:e===void 0?Math.min(krn,t):!Number.isFinite(e)||e<1?1:Math.min(Math.floor(e),t)}async function Hrn(e,t,n){let r=new Array(e.length),o=0,i=Math.min(t,e.length),s=Array.from({length:i},async()=>{for(;;){let u=o;if(o+=1,u>=e.length)return;let l=e[u];if(l===void 0)return;r[u]=await n(l)}});return await Promise.all(s),r}function wtt(e,t,n,r){let o=Number.POSITIVE_INFINITY;for(let s=0;s<t.length;s+=1){let u=n[s];u&&r.has(u)||(o=Math.min(o,t[s]?.timestamp??o))}let i=e;for(let s=0;s<t.length;s+=1){let u=n[s];if(!u||!r.has(u))continue;let l=t[s]?.timestamp??i;l<o&&(i=Math.max(i,l))}return i}async function $rn(e){for(let t of e){let n=await Vi(t.transcriptPath);if(r9(t.baseline,n))return!0}return!1}function qrn(e,t){let n=e.filter(r=>t<r.expiresAt);return{watchers:n,changed:n.length!==e.length}}var Krn=2e3,Yrn=6e4,Jrn=5e3,Zrn=Xde*3,Wrn=5e3,Xrn=5*6e4,eon=.2,ton=15e3;function Ptt(e){return Array.isArray(e)?{threadIDs:e,uploadedCount:e.length,deferredCount:0,largeDeferredCount:0}:{...e,uploadedCount:e.uploadedCount??e.threadIDs.length,largeDeferredCount:e.largeDeferredCount??0}}var C5=class extends Error{constructor(t){super(t),this.name="SyncPassDeadlineError"}};function non(e){return e.historyFilePath!==void 0?[e.historyFilePath]:e.watchPaths!==void 0?e.watchPaths:(e.uploadOptions?.adapters??hme).map(n=>n.historyFilePath())}async function v5(e={}){let t=e.debounceMs??Krn,n=e.pollIntervalMs,r=n??e.idlePollIntervalMs??Yrn,o=n??e.activePollIntervalMs??Jrn,i=e.syncDeadlineMs??Zrn,s=e.failureBackoffBaseMs??Wrn,u=e.failureBackoffMaxMs??Xrn,l=e.failureBackoffJitterRatio??eon,f=e.random??Math.random,h=non(e),_=e.runUploadFn??_me,E=e.uploadOptions?.minReuploadIntervalMs??e.minReuploadIntervalMs??ton,T=e.uploadOptions?.recorder??new WD,v=e.heartbeatReporter??new g5,R={...e.uploadOptions,recorder:T,tailActiveSessions:!1,lane:e.uploadOptions?.lane??"normal",onUploadCompleted:()=>{v.uploadCompleted()},minReuploadIntervalMs:E},x=e.signal?void 0:new AbortController,B=e.signal??x.signal,P=()=>x?.abort();x&&(process.once("SIGINT",P),process.once("SIGTERM",P));let G=()=>{x&&(process.removeListener("SIGINT",P),process.removeListener("SIGTERM",P))},j=e.lockFilePath??wze(),$;for(;;){let ye=await oon(j);if(ye.acquired){$=ye.release;break}if(H.info("watch_skip_already_running",{pid:ye.pid}),e.lockBusyRetryIntervalMs===void 0){G();return}try{await i2(e.lockBusyRetryIntervalMs,void 0,{signal:B})}catch{G();return}if(B.aborted){G();return}}let V=!1,oe=!1,te=0,le=r,Qe=async ye=>{if(V){oe=!0;return}V=!0;try{do{if(oe=!1,B.aborted)break;if(te>0){let He=ron({consecutiveFailures:te,baseMs:s,maxMs:u,jitterRatio:l,random:f});if(H.warn("watch_sync_backoff",{reason:ye,consecutiveFailures:te,backoffMs:He}),await i2(He,void 0,{signal:B}).catch(()=>{}),B.aborted)break}try{let He=new AbortController,rt=()=>He.abort();B.addEventListener("abort",rt,{once:!0});let lt=`sync pass exceeded ${i}ms deadline`,Ct,Nr=new Promise((At,Wt)=>{Ct=setTimeout(()=>{H.error("watch_sync_stuck",{reason:ye,syncDeadlineMs:i}),T.markStuck(lt).catch(sn=>H.warn("watch_mark_stuck_failed",{error:jt(sn)})),He.abort(),Wt(new C5(lt))},i),Ct.unref?.()}),be=_({...R,signal:He.signal});try{let{threadIDs:At,uploadedCount:Wt=At.length,deferredCount:sn,largeDeferredCount:er=0}=Ptt(await Promise.race([be,Nr]));if(Ct&&(clearTimeout(Ct),Ct=void 0),te=0,er>0&&!B.aborted){H.info("watch_sync_large_lane_start",{reason:ye,largeDeferredCount:er});try{let Eo=Ptt(await _({...R,lane:"large",signal:B}));H.info("watch_sync_large_lane_complete",{reason:ye,uploaded:Eo.uploadedCount??Eo.threadIDs.length,deferred:Eo.deferredCount,largeDeferred:Eo.largeDeferredCount??0})}catch(Eo){H.warn("watch_sync_large_lane_failed",{reason:ye,error:jt(Eo)})}}le=At.length>0||sn>0||er>0?o:r,H.info("watch_sync_complete",{reason:ye,uploaded:Wt,deferred:sn,largeDeferred:er,nextPollIntervalMs:le})}finally{Ct&&clearTimeout(Ct),B.removeEventListener("abort",rt),await be.catch(()=>{})}}catch(He){if(B.aborted&&He?.name==="AbortError")break;te+=1,!(He instanceof C5)&&He?.name!=="AbortError"&&await T.markDegraded(He).catch(rt=>H.warn("watch_mark_degraded_failed",{error:jt(rt)})),H.error("watch_sync_failed",{reason:ye,consecutiveFailures:te,error:jt(He)})}}while(oe&&!B.aborted)}finally{V=!1}},Ze,Ce=ye=>{Ze&&clearTimeout(Ze),Ze=setTimeout(()=>{Ze=void 0,Qe(ye)},t),Ze.unref?.()};H.info("watch_start",{watchPaths:h,debounceMs:t,idlePollIntervalMs:r,activePollIntervalMs:o,syncDeadlineMs:i}),v.beat(),Qe("startup");let _t=async ye=>{for(;!B.aborted;)try{let He=Bb.existsSync(ye)&&Bb.statSync(ye).isDirectory(),rt=He?ye:Eme.dirname(ye),lt=He?void 0:Eme.basename(ye),Ct=e.watchEventSource?.({watchDir:rt,watchPath:ye,recursive:He,signal:B})??Vrn(rt,{signal:B,recursive:He});for await(let Nr of Ct){if(B.aborted)break;(lt===void 0||!Nr.filename||Nr.filename===lt)&&Ce("fs-event")}}catch(He){if(B.aborted||He?.name==="AbortError")break;H.warn("watch_fs_retry",{path:ye,error:jt(He)}),await i2(r,void 0,{signal:B}).catch(()=>{})}},bt=async()=>{for(;!B.aborted;){try{await i2(le,void 0,{signal:B})}catch{break}if(B.aborted)break;v.beat(),await Qe("poll")}};try{await Promise.all([...h.map(_t),bt()])}finally{for(Ze&&clearTimeout(Ze),G();V;)await i2(50).catch(()=>{});await $(),H.info("watch_stop",{})}}function ron(e){let t=e.baseMs*2**Math.max(0,e.consecutiveFailures-1),n=Math.min(e.maxMs,t),r=n*e.jitterRatio,o=r===0?0:(e.random()*2-1)*r;return Math.max(0,Math.round(n+o))}async function oon(e){if(H.info("upload_daemon_lock_check",{lockFilePath:e}),e===!1)return{acquired:!0,release:async()=>{}};for(await Bb.promises.mkdir(Eme.dirname(e),{recursive:!0,mode:448});;)try{let t=await Bb.promises.open(e,"wx",384);return await t.writeFile(JSON.stringify({pid:process.pid,started_at:new Date().toISOString()})),await t.close(),{acquired:!0,release:async()=>{(await Mtt(e))?.pid===process.pid&&await Bb.promises.rm(e,{force:!0})}}}catch(t){if(!son(t))throw t;let n=await Mtt(e);if(n?.pid&&ion(n.pid))return{acquired:!1,pid:n.pid};await Bb.promises.rm(e,{force:!0})}}async function Mtt(e){try{let t=JSON.parse(await Bb.promises.readFile(e,"utf8"));return typeof t.pid=="number"?{pid:t.pid}:{}}catch{return}}function ion(e){try{return process.kill(e,0),!0}catch(t){return typeof t=="object"&&t!==null&&"code"in t&&t.code==="EPERM"}}function son(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="EEXIST"}m();w$();Ht();An();import{setTimeout as aon}from"node:timers/promises";var uon=1e3,con=3e4,Ltt=3e4,lon=6e4;async function Utt(e,t={}){let n=t.signal?void 0:new AbortController,r=t.signal??n.signal,o=()=>n?.abort();n&&(process.once("SIGINT",o),process.once("SIGTERM",o));let i=t.recorder??new N$;await i.markDaemonRunning();let s=setInterval(()=>{i.heartbeat().catch(u=>H.warn("daemon_status_heartbeat_failed",{error:jt(u)}))},t.heartbeatIntervalMs??Ltt);s.unref?.();try{await Promise.all(e.map(u=>don(u,{...t,signal:r,recorder:i})))}finally{clearInterval(s),n&&(process.removeListener("SIGINT",o),process.removeListener("SIGTERM",o))}}async function don(e,t){let n=t.minRestartDelayMs??uon,r=t.maxRestartDelayMs??con,o=t.heartbeatIntervalMs??Ltt,i=t.healthyAfterMs??lon,s=t.random??Math.random,u=t.now??Date.now,l=0;for(;!t.signal.aborted;){let f=u(),h=new AbortController,_=()=>h.abort(t.signal.reason);t.signal.addEventListener("abort",_,{once:!0});let E,T=!1,v=async()=>{T||(T=!0,await t.recorder.markChildRunning(e.name),E=setInterval(()=>{t.recorder.markChildHeartbeat(e.name).catch(R=>H.warn("daemon_child_heartbeat_failed",{child:e.name,error:jt(R)}))},o),E.unref?.())};try{if(e.markRunning!=="manual"&&await v(),await e.run({signal:h.signal,markReady:v}),!t.signal.aborted)throw new Error(`${e.name} daemon exited unexpectedly`)}catch(R){if(t.signal.aborted||h.signal.aborted){await t.recorder.markChildStopped(e.name);return}u()-f>=i&&(l=0),l+=1;let x=pon(l,n,r,s),B=new Date(u()+x);await t.recorder.markChildRestarting(e.name,R,B),H.error("daemon_child_failed",{child:e.name,attempt:l,restart_delay_ms:x,error:jt(R)});try{await aon(x,void 0,{signal:t.signal})}catch{await t.recorder.markChildStopped(e.name);return}}finally{E&&clearInterval(E),t.signal.removeEventListener("abort",_)}}await t.recorder.markChildStopped(e.name)}function pon(e,t,n,r){let o=Math.min(n,t*2**Math.max(0,e-1)),i=Math.max(t,o);return Math.floor(t+r()*(i-t))}var fon=3e4,mon=3e4,Aon=120*1e3,Ftt={meta:{name:"_run_daemon",hidden:!0,skipAutoupdate:!0},args:{"skill-poll-interval-ms":{type:"string",description:"Skill sync fallback full-sync poll interval in milliseconds.",default:"1800000"},"skill-watch-debounce-ms":{type:"string",description:"Skill filesystem watcher debounce interval in milliseconds.",default:"2000"},"exit-if-daemon-running":{type:"boolean",description:"Exit before starting children when another combined daemon has a fresh heartbeat.",default:!1}},async run({args:e,data:t}){let n=t,r=Number(e["skill-poll-interval-ms"]);if(!Number.isFinite(r)||r<=0)throw new xe("--skill-poll-interval-ms must be a positive number");let o=Number(e["skill-watch-debounce-ms"]);if(!Number.isFinite(o)||o<=0)throw new xe("--skill-watch-debounce-ms must be a positive number");if(e["exit-if-daemon-running"]){let s=await(n?.readDaemonStatus??iM)(),u=n?.isProcessAlive??_on;if(hon(s,new Date,u)){H.info("daemon_skip_already_running",{pid:s.pid});return}}await A5(),await(n?.superviseChildren??Utt)([{name:"threads",run:({signal:s})=>{let u={client:n?.client,...n?.adapters!==void 0?{adapters:n.adapters}:n?.adapter!==void 0?{adapter:n.adapter}:{},recorder:n?.recorder};return(n?.runUploadWatch??v5)({uploadOptions:u,signal:s,lockBusyRetryIntervalMs:mon})}},{name:"skills",markRunning:"manual",run:async({signal:s,markReady:u})=>{let{client:l,who:f}=await gon({signal:s,getAccessToken:n?.getAccessToken??zt,injectedClient:n?.client,retryDelayMs:n?.authRetryDelayMs??fon}),h=f.body.organizations.map(v=>v.id),_=f.body.user.id,{lastEventId:E}=await si(),T=(n?.createEventStream??m5)({userId:_,organizationIds:h,getAccessToken:n?.getAccessToken??zt,reconnect:!0,signal:s,...E?{lastEventId:E}:{}});await u(),await(n?.runSkillSyncDaemon??p5)({client:l,events:T,pollIntervalMs:r,watch:!0,watchDebounceMs:o,signal:s,onSyncPass:({reason:v,event:R,result:x})=>{let B=R?` from ${R.type}${R.id?`#${R.id}`:""}`:"";console.log(`skill sync ${v}${B}: ${x.publishedLocalPushed} published local update${x.publishedLocalPushed===1?"":"s"} uploaded, ${x.installedUpdated} updated, ${x.localEditsUploaded} local edit${x.localEditsUploaded===1?"":"s"} uploaded, ${x.conflicts} conflict${x.conflicts===1?"":"s"}`)}})}}],n?.supervisorOptions)}};async function gon(e){for(;!e.signal.aborted;){let t=await e.getAccessToken();if(!t){await Qtt(e.retryDelayMs,e.signal);continue}let n=e.injectedClient??xt({token:t}),r=await n.whoAmI({headers:{}});if(r.status===200)return{client:n,who:r};await Qtt(e.retryDelayMs,e.signal)}throw new Error("daemon auth wait aborted")}function Qtt(e,t){return t.aborted?Promise.resolve():new Promise(n=>{let r=setTimeout(n,e);r.unref?.(),t.addEventListener("abort",()=>{clearTimeout(r),n()},{once:!0})})}function hon(e,t,n){if(e.state!=="running"||!e.last_heartbeat_at||!e.pid)return!1;let r=Date.parse(e.last_heartbeat_at);return Number.isNaN(r)?!1:r+Aon>=t.getTime()&&n(e.pid)}function _on(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}m();m();m();m();Lr();import{cpSync as Bon,existsSync as R1,lstatSync as yme,mkdirSync as ztt,readlinkSync as Oon,rmSync as Htt,symlinkSync as Pon,unlinkSync as Mon,writeFileSync as $tt}from"node:fs";import wh from"node:path";import{pathToFileURL as Lon}from"node:url";m();import{execFile as Don}from"node:child_process";import{promisify as Non}from"node:util";m();import{execFileSync as Eon}from"node:child_process";import{constants as yon,accessSync as Son,readdirSync as Ton,statSync as Gtt}from"node:fs";import bon from"node:os";import MA from"node:path";function Ion(e){try{return Gtt(e).isFile()?(Son(e,yon.X_OK),!0):!1}catch{return!1}}function Con(e){let t=new Set,n=[];for(let r of e)r&&(t.has(r)||(t.add(r),n.push(r)));return n.join(MA.delimiter)}function jtt(e={}){let t=e.env??process.env,n=e.captureLoginPath??(()=>von(t)),r=e.knownDirs??(()=>xon(t)),o=e.isExecutable??Ion,i;function s(){if(i!==void 0)return i;let l=(t.PATH??"").split(MA.delimiter),f=(n()??"").split(MA.delimiter),h=r();return i=Con([...l,...f,...h]),i}function u(l){for(let f of s().split(MA.delimiter)){if(!f)continue;let h=MA.join(f,l);if(o(h))return h}return null}return{searchPath:s,resolve:u,isOnPath:l=>u(l)!==null}}function von(e=process.env){let t=e.SHELL;if(!t)return null;try{let r=Eon(t,["-lic",'printf %s "$PATH"'],{encoding:"utf8",timeout:3e3,stdio:["ignore","pipe","ignore"]}).trim();return r.length>0?r:null}catch{return null}}function Ron(e){let{homedir:t,dirExists:n,listDir:r}=e,o=[],i=MA.join(t,".nvm/versions/node");if(n(i))for(let l of r(i))o.push(MA.join(i,l,"bin"));let s=MA.join(t,".fnm/node-versions");if(n(s))for(let l of r(s))o.push(MA.join(s,l,"installation/bin"));let u=[MA.join(t,".volta/bin"),"/opt/homebrew/bin","/usr/local/bin"].filter(l=>n(l));return[...o,...u]}function xon(e){let t=e.HOME??bon.homedir();return Ron({homedir:t,dirExists:n=>{try{return Gtt(n).isDirectory()}catch{return!1}},listDir:n=>{try{return Ton(n)}catch{return[]}}})}var won=Non(Don);function kon(e){return{isOnPath(t){return e.isOnPath(t)},async run(t,n){let r=e.resolve(t)??t;try{let{stdout:o,stderr:i}=await won(r,n,{env:{...process.env,PATH:e.searchPath(),CI:"1"}});return{code:0,stdout:o,stderr:i}}catch(o){let i=o;return{code:i.code??1,stdout:i.stdout??"",stderr:i.stderr??""}}}}}var v1=kon(jtt());var qtt="amp",Uon="lore.ts",Qon="lore-installed.ts";function Fon(e){let t=process.env.XDG_CONFIG_HOME?.trim();return t&&wh.isAbsolute(t)?t:wh.join(e,".config")}function R5(e){return wh.join(e,"harness","amp","lore-plugin")}function Gon(e){return wh.join(R5(e),"amp","lore.ts")}function x5(e){return wh.join(R5(e),"amp",Qon)}function jon(e){return wh.join(R5(e),"lore-plugin-config.json")}function Sme(e){return wh.join(Fon(e),"amp","plugins")}function Tme(e){return wh.join(Sme(e),Uon)}function zon(e){try{return yme(e).isSymbolicLink()?R1(e):!1}catch{return!1}}function bme(e,t){try{return yme(e).isSymbolicLink()?Oon(e)===t:!1}catch{return!1}}function Hon(e,t){if(!e||!R1(e))throw new Error(`Lore plugin payload not found${e?` at ${e}`:""} \u2014 cannot install the Amp plugin. (set LORE_PLUGIN_PAYLOAD_DIR or rebuild the bundle)`);let n=R5(t);R1(n)&&Htt(n,{recursive:!0,force:!0}),ztt(wh.dirname(n),{recursive:!0}),Bon(e,n,{recursive:!0})}function $on(){return process.env.LORE_MCP_PROXY_BASE_URL?.trim()||process.env.LORE_API_ORIGIN?.trim()||void 0}function qon(e){let t=$on();if(t)return $tt(jon(e),JSON.stringify({mcpBaseUrl:t},null,2),{mode:384}),t}function Von(e,t){let n=Lon(Gon(e)).href,r=["// Generated by `lore harness install amp`. Do not edit by hand.",`process.env.LORE_PLUGIN_STATE_DIR = ${JSON.stringify(e)};`,...t?[`process.env.LORE_MCP_BASE_URL = ${JSON.stringify(t)};`,`process.env.LORE_MCP_PROXY_BASE_URL = ${JSON.stringify(t)};`]:[],`const mod = await import(${JSON.stringify(n)});`,"export default mod.default;",""];$tt(x5(e),r.join(`
|
|
657
|
+
`,{mode:384})}).catch(()=>{}),pme}async function Dtt(e){await Promise.all(Rrn.map(t=>Nh(t,{floorTimestamp:e[t]})))}var Nrn=1e3,wrn=250,krn=3,Brn=10,Orn=5e3,hme=[mtt,Stt,Rtt],C1=class extends Error{constructor(){super("lore is logged out")}};function Prn(e){return e.adapters!==void 0?e.adapters:e.adapter!==void 0?[e.adapter]:hme}async function ktt(e={}){return(await _me(e)).threadIDs}async function _me(e={}){Gy(e.signal);let t=await j$();await Dtt({claudeCode:gb(t,"claudeCode"),codex:gb(t,"codex"),cowork:gb(t,"cowork")});let n=e.recorder??new WD,r=Prn(e),o=e.client??xt();H.info("run_upload_start",{adapters:r.map(E=>E.name),hasInjectedClient:!!e.client,hasInjectedRecorder:!!e.recorder}),await n.markRunning();let i=[],s=0,u=0,l=0,f=t,h=new Map,_=!1;try{let E=e.uploadFilterConfig??await Di(),T=await Btt({syncState:t,adapters:r,client:o,recorder:n,uploadFilterConfig:E,parseTimeoutMs:e.parseTimeoutMs,uploadNetworkTimeoutMs:e.uploadNetworkTimeoutMs,adapterConcurrency:e.adapterConcurrency,minReuploadIntervalMs:e.minReuploadIntervalMs,now:e.now,lane:e.lane,largeFileSizeThresholdInBytes:e.largeFileSizeThresholdInBytes,signal:e.signal});i=T.threadIDs,s=T.uploadedCount,u=T.deferredCount,l=T.largeDeferredCount,f=T.syncState,h=T.watchBaselineOverrides,_=T.loggedOut,Gy(e.signal),_||(await n.markSyncSuccess(i),s>0&&e.onUploadCompleted?.());let v=e.tailActiveSessions!==!1;if(!_&&v&&s>0){let R=await Mrn({syncState:f,baselineOverrides:h,adapters:r,client:o,recorder:n,uploadFilterConfig:E,parseTimeoutMs:e.parseTimeoutMs,uploadNetworkTimeoutMs:e.uploadNetworkTimeoutMs,adapterConcurrency:e.adapterConcurrency,signal:e.signal});i=[...i,...R.threadIDs],s+=R.uploadedCount,f=R.syncState,_=R.loggedOut,Gy(e.signal)}return _?(H.warn("run_upload_marking_logged_out",{threadIDs:i.length,adapters:r.map(R=>R.name)}),await n.markLoggedOut()):await n.markSuccess(i),{threadIDs:i,uploadedCount:s,deferredCount:u,largeDeferredCount:l}}catch(E){throw Ott(E)||await n.markError(E),E}}function gme(e){if(e==="claudeCode"||e==="codex"||e==="cowork")return e;throw new Error(`runUpload: adapter.name "${e}" is not a known HarnessKey. Expected one of: claudeCode, codex, cowork. Custom adapters must use one of these names or the per-harness watermark cannot be persisted.`)}async function Btt(e){let t=[],n=0,r=0,o=0,i=e.syncState,s=new Map,u=Promise.resolve(),l=v=>(u=u.then(async()=>{for(let[R,x]of v.cursorUpdates)i=sJe(i,v.harnessKey,R,x);i=aJe(i,v.harnessKey,Orn),i=iJe(i,v.harnessKey,v.newFloor);for(let[R,x]of v.watchBaselineOverrides)s.set(R,x);await z$(i)}),u),f=await Hrn(e.adapters,zrn(e.adapterConcurrency,e.adapters.length),async v=>{Gy(e.signal);let R=gme(v.name),x=gb(e.syncState,R),B=e.syncState.harnesses[R]?.cursors??{};try{let P=await Lrn({...e,adapter:v,harnessKey:R,floor:x,cursors:B,onProgress:l});return{adapter:v,harnessKey:R,uploadResult:P}}catch(P){return await Nh(R,{state:"error",error:P instanceof Error?P.message:String(P)}).catch(()=>{}),{adapter:v,harnessKey:R,error:P}}}),h=[],_=0,E,T;for(let v of f)if(Gy(e.signal),!!v){if("error"in v){if(v.error instanceof C1){E=v.adapter.name;continue}if(Ott(v.error)){T??=v.error;continue}h.push(v.error),H.error("run_upload_adapter_failed",{adapter:v.adapter.name,error:v.error instanceof Error?v.error.message:String(v.error)});continue}_+=1,t=[...t,...v.uploadResult.threadIDs],n+=v.uploadResult.uploadedCount,r+=v.uploadResult.deferredCount,o+=v.uploadResult.largeDeferredCount}if(await u,T)throw T;if(_===0&&h.length>0)throw h.length===1?h[0]:new AggregateError(h,"all upload adapters failed");return E?(H.warn("run_upload_logged_out_short_circuit",{adapter:E,threadIDs:t.length}),{threadIDs:t,uploadedCount:n,deferredCount:r,largeDeferredCount:o,syncState:i,watchBaselineOverrides:s,loggedOut:!0}):{threadIDs:t,uploadedCount:n,deferredCount:r,largeDeferredCount:o,syncState:i,watchBaselineOverrides:s,loggedOut:!1}}async function Mrn(e){let t=new Map;for(let s of e.adapters){let u=s.historyFilePath();t.set(u,await Vi(u))}let n=[];for(let s of e.adapters){let u=gme(s.name),l=await s.buildPendingTranscriptWatches(gb(e.syncState,u),e.baselineOverrides,{uploadFilterConfig:e.uploadFilterConfig});n=[...n,...l]}if(await e.recorder.setPendingWatchers(n),n.length===0)return await e.recorder.setPendingWatchers([]),{threadIDs:[],uploadedCount:0,syncState:e.syncState,loggedOut:!1};let r=[],o=0,i=e.syncState;try{for(;;){await Ntt(Nrn,void 0,{signal:e.signal}),Gy(e.signal),await e.recorder.heartbeat();let s=new Date,u=!1;for(let f of e.adapters){let h=f.historyFilePath(),_=t.get(h),E=await Vi(h);_!==void 0&&r9(_,E)&&(u=!0),t.set(h,E)}if(u||(u=await $rn(n)),!u){let f=qrn(n,s);if(n=f.watchers,f.changed&&await e.recorder.setPendingWatchers(n),n.length===0)return{threadIDs:r,uploadedCount:o,syncState:i,loggedOut:!1};continue}await Ntt(wrn,void 0,{signal:e.signal});let l=await Btt({syncState:i,adapters:e.adapters,client:e.client,recorder:e.recorder,uploadFilterConfig:e.uploadFilterConfig,parseTimeoutMs:e.parseTimeoutMs,uploadNetworkTimeoutMs:e.uploadNetworkTimeoutMs,adapterConcurrency:e.adapterConcurrency,lane:"all",signal:e.signal});if(i=l.syncState,o+=l.uploadedCount,l.loggedOut)return{threadIDs:r,uploadedCount:o,syncState:i,loggedOut:!0};if(r.push(...l.threadIDs),await e.recorder.markSyncSuccess(l.threadIDs),l.uploadedCount===0)return{threadIDs:r,uploadedCount:o,syncState:i,loggedOut:!1};for(let f of e.adapters){let h=f.historyFilePath();t.set(h,await Vi(h))}n=[];for(let f of e.adapters){let h=gme(f.name),_=await f.buildPendingTranscriptWatches(gb(i,h),l.watchBaselineOverrides,{uploadFilterConfig:e.uploadFilterConfig});n=[...n,..._]}if(await e.recorder.setPendingWatchers(n),n.length===0)return{threadIDs:r,uploadedCount:o,syncState:i,loggedOut:!1}}}finally{await e.recorder.setPendingWatchers([])}}async function Lrn(e){let t=(v,R)=>{let x=e.cursors[v];return x===void 0?!1:!r9({exists:!0,size:x.sizeBytes,modTimeUnixMs:x.modTimeUnixMs},R)},n=e.minReuploadIntervalMs??0,r=e.now??Date.now,o=e.lane??"all",i=e.largeFileSizeThresholdInBytes??Kje,s=(v,R)=>R.size>i,u=r(),l=v=>{if(n<=0)return!1;let R=e.cursors[v];return R===void 0?!1:u-R.lastUploadedAtMs<n};Gy(e.signal),await Nh(e.harnessKey,{floorTimestamp:e.floor,state:"scanning",entryCount:0,queuedFileCount:0,processedFileCount:0,uploadedFileCount:0,deferredFileCount:0,largeDeferredFileCount:0,error:void 0});let f=Urn(await e.adapter.readUnuploadedEntries(e.floor));if(await Nh(e.harnessKey,{floorTimestamp:e.floor,state:f.length===0?"complete":"scanning",entryCount:f.length}),H.info("run_upload_adapter_entries_read",{adapter:e.adapter.name,entryCount:f.length,floor:e.floor}),f.length===0)return{threadIDs:[],uploadedCount:0,deferredCount:0,largeDeferredCount:0};if(!await zt())throw H.warn("run_upload_no_access_token_for_entries",{adapter:e.adapter.name,entryCount:f.length,floor:e.floor}),new C1;H.info("run_upload_access_token_available",{adapter:e.adapter.name,entryCount:f.length}),await e.recorder.markAuthenticated();let _=await e.adapter.collectLocalFiles(f,{uploadFilterConfig:e.uploadFilterConfig,isUnchanged:t,isThrottled:l,uploadLane:{name:o,includes:(v,R)=>{if(o==="all")return!0;let x=s(v,R);return o==="large"?x:!x}}}),E=_.deferredFileKeys?.size??0,T=_.largeDeferredFileKeys?.size??0;await Nh(e.harnessKey,{state:_.localFiles.length===0?"complete":"uploading",entryCount:_.entries.length,queuedFileCount:_.localFiles.length,processedFileCount:0,uploadedFileCount:0,deferredFileCount:E,largeDeferredFileCount:T});try{let v=[],R=0,x=0,B=new Set(_.skippedFileKeys),P=async()=>{await Nh(e.harnessKey,{state:"uploading",processedFileCount:x,uploadedFileCount:R,deferredFileCount:E,largeDeferredFileCount:T})};if(_.localFiles.length===0){let V=wtt(e.floor,_.entries,_.entryFileKeys,_.skippedFileKeys);return await e.onProgress({harnessKey:e.harnessKey,cursorUpdates:new Map,newFloor:V,watchBaselineOverrides:new Map}),await Nh(e.harnessKey,{floorTimestamp:V,state:"complete",processedFileCount:0,uploadedFileCount:0}),{threadIDs:v,uploadedCount:R,deferredCount:E,largeDeferredCount:T}}let G=Qrn(_.entries,_.entryFileKeys),j=Frn(_.localFiles,G),$=(V,oe)=>{V.set(oe.key,{sizeBytes:oe.watchedState.size,modTimeUnixMs:oe.watchedState.modTimeUnixMs,md5:oe.md5,lastUploadedAtMs:r()})};for(let V of Grn(j,Brn)){let oe=new Map,te=new Map,le=await BA(e.client,V,{networkTimeoutMs:e.uploadNetworkTimeoutMs});for(let Ze of le){x+=1;let{localFile:Ce}=Ze;if(Ze.status==="quarantined"){H.info("run_upload_quarantine",{filename:Ce.filename,reason:Ze.reason,findings:Ze.findingCount}),B.add(Ce.key),await P();continue}if(Ze.status==="deduped"){let bt=Ze.thread?.id?.trim()??"";if(!bt)throw new Error(`deduped upload session response missing thread for ${Ce.filename}`);H.info("run_upload_already_uploaded",{filename:Ce.filename,threadID:bt}),v.push(bt),B.add(Ce.key),$(oe,Ce),await P();continue}if(Ze.status==="no_upload"){let bt=Ze.error?.trim()||`upload session response missing presigned_url and existing thread for ${Ce.filename}`;H.info("run_upload_no_upload_target",{filename:Ce.filename,reason:bt}),B.add(Ce.key),$(oe,Ce),await P();continue}await e.recorder.heartbeat(),Gy(e.signal);let _t=Ze.thread?.id?.trim()??"";if(!_t){if(Ce.fileType==="plan"){B.add(Ce.key),$(oe,Ce),await P();continue}throw new Error(`complete upload session response missing thread for ${Ce.filename}`)}v.push(_t),R+=1,await P();try{await jrn(e.client,_t,e.recorder,{timeoutMs:e.parseTimeoutMs,signal:e.signal})}catch(bt){if(bt instanceof Error&&(bt.message.includes("timed out waiting for thread")||bt.message.includes("parsing failed permanently")||bt.message.includes("unexpected transcript parsing state")))H.warn("parse_wait_soft_failure",{threadID:_t,filename:Ce.filename,message:bt.message});else throw bt}B.add(Ce.key),$(oe,Ce),Ce.sourcePath&&te.set(Ce.sourcePath,Ce.watchedState)}let Qe=wtt(e.floor,_.entries,_.entryFileKeys,B);await e.onProgress({harnessKey:e.harnessKey,cursorUpdates:oe,newFloor:Qe,watchBaselineOverrides:te}),await Nh(e.harnessKey,{floorTimestamp:Qe,state:x>=_.localFiles.length?"complete":"uploading",processedFileCount:x,uploadedFileCount:R,deferredFileCount:E,largeDeferredFileCount:T})}return{threadIDs:v,uploadedCount:R,deferredCount:E,largeDeferredCount:T}}finally{await Promise.all([..._.localFiles.map(v=>Ac(v.tempPath)),..._.localFiles.flatMap(v=>(v.artifactFiles??[]).map(R=>Ac(R.tempPath)))])}}function Urn(e){return e.map((t,n)=>({entry:t,index:n})).sort((t,n)=>t.entry.timestamp-n.entry.timestamp||t.index-n.index).map(({entry:t})=>t)}function Qrn(e,t){let n=new Map;for(let r=0;r<e.length;r+=1){let o=t[r];if(!o)continue;let i=e[r]?.timestamp;i!==void 0&&n.set(o,Math.min(n.get(o)??Number.POSITIVE_INFINITY,i))}return n}function Frn(e,t){return e.map((n,r)=>({localFile:n,index:r,timestamp:t.get(n.key)??Number.POSITIVE_INFINITY})).sort((n,r)=>n.timestamp-r.timestamp||n.index-r.index).map(({localFile:n})=>n)}function Grn(e,t){let n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}async function jrn(e,t,n,r={}){let o={...r,onPoll:()=>n.heartbeat()};await s1(e,t,o)}function Gy(e){if(e?.aborted)throw new DOMException("The operation was aborted","AbortError")}function Ott(e){return e instanceof Error&&e.name==="AbortError"}function zrn(e,t){return t<=0?1:e===void 0?Math.min(krn,t):!Number.isFinite(e)||e<1?1:Math.min(Math.floor(e),t)}async function Hrn(e,t,n){let r=new Array(e.length),o=0,i=Math.min(t,e.length),s=Array.from({length:i},async()=>{for(;;){let u=o;if(o+=1,u>=e.length)return;let l=e[u];if(l===void 0)return;r[u]=await n(l)}});return await Promise.all(s),r}function wtt(e,t,n,r){let o=Number.POSITIVE_INFINITY;for(let s=0;s<t.length;s+=1){let u=n[s];u&&r.has(u)||(o=Math.min(o,t[s]?.timestamp??o))}let i=e;for(let s=0;s<t.length;s+=1){let u=n[s];if(!u||!r.has(u))continue;let l=t[s]?.timestamp??i;l<o&&(i=Math.max(i,l))}return i}async function $rn(e){for(let t of e){let n=await Vi(t.transcriptPath);if(r9(t.baseline,n))return!0}return!1}function qrn(e,t){let n=e.filter(r=>t<r.expiresAt);return{watchers:n,changed:n.length!==e.length}}var Krn=2e3,Yrn=6e4,Jrn=5e3,Zrn=Xde*3,Wrn=5e3,Xrn=5*6e4,eon=.2,ton=15e3;function Ptt(e){return Array.isArray(e)?{threadIDs:e,uploadedCount:e.length,deferredCount:0,largeDeferredCount:0}:{...e,uploadedCount:e.uploadedCount??e.threadIDs.length,largeDeferredCount:e.largeDeferredCount??0}}var C5=class extends Error{constructor(t){super(t),this.name="SyncPassDeadlineError"}};function non(e){return e.historyFilePath!==void 0?[e.historyFilePath]:e.watchPaths!==void 0?e.watchPaths:(e.uploadOptions?.adapters??hme).map(n=>n.historyFilePath())}async function v5(e={}){let t=e.debounceMs??Krn,n=e.pollIntervalMs,r=n??e.idlePollIntervalMs??Yrn,o=n??e.activePollIntervalMs??Jrn,i=e.syncDeadlineMs??Zrn,s=e.failureBackoffBaseMs??Wrn,u=e.failureBackoffMaxMs??Xrn,l=e.failureBackoffJitterRatio??eon,f=e.random??Math.random,h=non(e),_=e.runUploadFn??_me,E=e.uploadOptions?.minReuploadIntervalMs??e.minReuploadIntervalMs??ton,T=e.uploadOptions?.recorder??new WD,v=e.heartbeatReporter??new g5({source:e.heartbeatSource}),R={...e.uploadOptions,recorder:T,tailActiveSessions:!1,lane:e.uploadOptions?.lane??"normal",onUploadCompleted:()=>{v.uploadCompleted()},minReuploadIntervalMs:E},x=e.signal?void 0:new AbortController,B=e.signal??x.signal,P=()=>x?.abort();x&&(process.once("SIGINT",P),process.once("SIGTERM",P));let G=()=>{x&&(process.removeListener("SIGINT",P),process.removeListener("SIGTERM",P))},j=e.lockFilePath??wze(),$;for(;;){let ye=await oon(j);if(ye.acquired){$=ye.release;break}if(H.info("watch_skip_already_running",{pid:ye.pid}),e.lockBusyRetryIntervalMs===void 0){G();return}try{await i2(e.lockBusyRetryIntervalMs,void 0,{signal:B})}catch{G();return}if(B.aborted){G();return}}let V=!1,oe=!1,te=0,le=r,Qe=async ye=>{if(V){oe=!0;return}V=!0;try{do{if(oe=!1,B.aborted)break;if(te>0){let He=ron({consecutiveFailures:te,baseMs:s,maxMs:u,jitterRatio:l,random:f});if(H.warn("watch_sync_backoff",{reason:ye,consecutiveFailures:te,backoffMs:He}),await i2(He,void 0,{signal:B}).catch(()=>{}),B.aborted)break}try{let He=new AbortController,rt=()=>He.abort();B.addEventListener("abort",rt,{once:!0});let lt=`sync pass exceeded ${i}ms deadline`,Ct,Nr=new Promise((At,Wt)=>{Ct=setTimeout(()=>{H.error("watch_sync_stuck",{reason:ye,syncDeadlineMs:i}),T.markStuck(lt).catch(sn=>H.warn("watch_mark_stuck_failed",{error:jt(sn)})),He.abort(),Wt(new C5(lt))},i),Ct.unref?.()}),be=_({...R,signal:He.signal});try{let{threadIDs:At,uploadedCount:Wt=At.length,deferredCount:sn,largeDeferredCount:er=0}=Ptt(await Promise.race([be,Nr]));if(Ct&&(clearTimeout(Ct),Ct=void 0),te=0,er>0&&!B.aborted){H.info("watch_sync_large_lane_start",{reason:ye,largeDeferredCount:er});try{let Eo=Ptt(await _({...R,lane:"large",signal:B}));H.info("watch_sync_large_lane_complete",{reason:ye,uploaded:Eo.uploadedCount??Eo.threadIDs.length,deferred:Eo.deferredCount,largeDeferred:Eo.largeDeferredCount??0})}catch(Eo){H.warn("watch_sync_large_lane_failed",{reason:ye,error:jt(Eo)})}}le=At.length>0||sn>0||er>0?o:r,H.info("watch_sync_complete",{reason:ye,uploaded:Wt,deferred:sn,largeDeferred:er,nextPollIntervalMs:le})}finally{Ct&&clearTimeout(Ct),B.removeEventListener("abort",rt),await be.catch(()=>{})}}catch(He){if(B.aborted&&He?.name==="AbortError")break;te+=1,!(He instanceof C5)&&He?.name!=="AbortError"&&await T.markDegraded(He).catch(rt=>H.warn("watch_mark_degraded_failed",{error:jt(rt)})),H.error("watch_sync_failed",{reason:ye,consecutiveFailures:te,error:jt(He)})}}while(oe&&!B.aborted)}finally{V=!1}},Ze,Ce=ye=>{Ze&&clearTimeout(Ze),Ze=setTimeout(()=>{Ze=void 0,Qe(ye)},t),Ze.unref?.()};H.info("watch_start",{watchPaths:h,debounceMs:t,idlePollIntervalMs:r,activePollIntervalMs:o,syncDeadlineMs:i}),v.beat(),Qe("startup");let _t=async ye=>{for(;!B.aborted;)try{let He=Bb.existsSync(ye)&&Bb.statSync(ye).isDirectory(),rt=He?ye:Eme.dirname(ye),lt=He?void 0:Eme.basename(ye),Ct=e.watchEventSource?.({watchDir:rt,watchPath:ye,recursive:He,signal:B})??Vrn(rt,{signal:B,recursive:He});for await(let Nr of Ct){if(B.aborted)break;(lt===void 0||!Nr.filename||Nr.filename===lt)&&Ce("fs-event")}}catch(He){if(B.aborted||He?.name==="AbortError")break;H.warn("watch_fs_retry",{path:ye,error:jt(He)}),await i2(r,void 0,{signal:B}).catch(()=>{})}},bt=async()=>{for(;!B.aborted;){try{await i2(le,void 0,{signal:B})}catch{break}if(B.aborted)break;v.beat(),await Qe("poll")}};try{await Promise.all([...h.map(_t),bt()])}finally{for(Ze&&clearTimeout(Ze),G();V;)await i2(50).catch(()=>{});await $(),H.info("watch_stop",{})}}function ron(e){let t=e.baseMs*2**Math.max(0,e.consecutiveFailures-1),n=Math.min(e.maxMs,t),r=n*e.jitterRatio,o=r===0?0:(e.random()*2-1)*r;return Math.max(0,Math.round(n+o))}async function oon(e){if(H.info("upload_daemon_lock_check",{lockFilePath:e}),e===!1)return{acquired:!0,release:async()=>{}};for(await Bb.promises.mkdir(Eme.dirname(e),{recursive:!0,mode:448});;)try{let t=await Bb.promises.open(e,"wx",384);return await t.writeFile(JSON.stringify({pid:process.pid,started_at:new Date().toISOString()})),await t.close(),{acquired:!0,release:async()=>{(await Mtt(e))?.pid===process.pid&&await Bb.promises.rm(e,{force:!0})}}}catch(t){if(!son(t))throw t;let n=await Mtt(e);if(n?.pid&&ion(n.pid))return{acquired:!1,pid:n.pid};await Bb.promises.rm(e,{force:!0})}}async function Mtt(e){try{let t=JSON.parse(await Bb.promises.readFile(e,"utf8"));return typeof t.pid=="number"?{pid:t.pid}:{}}catch{return}}function ion(e){try{return process.kill(e,0),!0}catch(t){return typeof t=="object"&&t!==null&&"code"in t&&t.code==="EPERM"}}function son(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="EEXIST"}m();w$();Ht();An();import{setTimeout as aon}from"node:timers/promises";var uon=1e3,con=3e4,Ltt=3e4,lon=6e4;async function Utt(e,t={}){let n=t.signal?void 0:new AbortController,r=t.signal??n.signal,o=()=>n?.abort();n&&(process.once("SIGINT",o),process.once("SIGTERM",o));let i=t.recorder??new N$;await i.markDaemonRunning();let s=setInterval(()=>{i.heartbeat().catch(u=>H.warn("daemon_status_heartbeat_failed",{error:jt(u)}))},t.heartbeatIntervalMs??Ltt);s.unref?.();try{await Promise.all(e.map(u=>don(u,{...t,signal:r,recorder:i})))}finally{clearInterval(s),n&&(process.removeListener("SIGINT",o),process.removeListener("SIGTERM",o))}}async function don(e,t){let n=t.minRestartDelayMs??uon,r=t.maxRestartDelayMs??con,o=t.heartbeatIntervalMs??Ltt,i=t.healthyAfterMs??lon,s=t.random??Math.random,u=t.now??Date.now,l=0;for(;!t.signal.aborted;){let f=u(),h=new AbortController,_=()=>h.abort(t.signal.reason);t.signal.addEventListener("abort",_,{once:!0});let E,T=!1,v=async()=>{T||(T=!0,await t.recorder.markChildRunning(e.name),E=setInterval(()=>{t.recorder.markChildHeartbeat(e.name).catch(R=>H.warn("daemon_child_heartbeat_failed",{child:e.name,error:jt(R)}))},o),E.unref?.())};try{if(e.markRunning!=="manual"&&await v(),await e.run({signal:h.signal,markReady:v}),!t.signal.aborted)throw new Error(`${e.name} daemon exited unexpectedly`)}catch(R){if(t.signal.aborted||h.signal.aborted){await t.recorder.markChildStopped(e.name);return}u()-f>=i&&(l=0),l+=1;let x=pon(l,n,r,s),B=new Date(u()+x);await t.recorder.markChildRestarting(e.name,R,B),H.error("daemon_child_failed",{child:e.name,attempt:l,restart_delay_ms:x,error:jt(R)});try{await aon(x,void 0,{signal:t.signal})}catch{await t.recorder.markChildStopped(e.name);return}}finally{E&&clearInterval(E),t.signal.removeEventListener("abort",_)}}await t.recorder.markChildStopped(e.name)}function pon(e,t,n,r){let o=Math.min(n,t*2**Math.max(0,e-1)),i=Math.max(t,o);return Math.floor(t+r()*(i-t))}var fon=3e4,mon=3e4,Aon=120*1e3,Ftt={meta:{name:"_run_daemon",hidden:!0,skipAutoupdate:!0},args:{"skill-poll-interval-ms":{type:"string",description:"Skill sync fallback full-sync poll interval in milliseconds.",default:"1800000"},"skill-watch-debounce-ms":{type:"string",description:"Skill filesystem watcher debounce interval in milliseconds.",default:"2000"},"exit-if-daemon-running":{type:"boolean",description:"Exit before starting children when another combined daemon has a fresh heartbeat.",default:!1}},async run({args:e,data:t}){let n=t,r=Number(e["skill-poll-interval-ms"]);if(!Number.isFinite(r)||r<=0)throw new xe("--skill-poll-interval-ms must be a positive number");let o=Number(e["skill-watch-debounce-ms"]);if(!Number.isFinite(o)||o<=0)throw new xe("--skill-watch-debounce-ms must be a positive number");if(e["exit-if-daemon-running"]){let s=await(n?.readDaemonStatus??iM)(),u=n?.isProcessAlive??_on;if(hon(s,new Date,u)){H.info("daemon_skip_already_running",{pid:s.pid});return}}await A5(),await(n?.superviseChildren??Utt)([{name:"threads",run:({signal:s})=>{let u={client:n?.client,...n?.adapters!==void 0?{adapters:n.adapters}:n?.adapter!==void 0?{adapter:n.adapter}:{},recorder:n?.recorder};return(n?.runUploadWatch??v5)({uploadOptions:u,signal:s,lockBusyRetryIntervalMs:mon})}},{name:"skills",markRunning:"manual",run:async({signal:s,markReady:u})=>{let{client:l,who:f}=await gon({signal:s,getAccessToken:n?.getAccessToken??zt,injectedClient:n?.client,retryDelayMs:n?.authRetryDelayMs??fon}),h=f.body.organizations.map(v=>v.id),_=f.body.user.id,{lastEventId:E}=await si(),T=(n?.createEventStream??m5)({userId:_,organizationIds:h,getAccessToken:n?.getAccessToken??zt,reconnect:!0,signal:s,...E?{lastEventId:E}:{}});await u(),await(n?.runSkillSyncDaemon??p5)({client:l,events:T,pollIntervalMs:r,watch:!0,watchDebounceMs:o,signal:s,onSyncPass:({reason:v,event:R,result:x})=>{let B=R?` from ${R.type}${R.id?`#${R.id}`:""}`:"";console.log(`skill sync ${v}${B}: ${x.publishedLocalPushed} published local update${x.publishedLocalPushed===1?"":"s"} uploaded, ${x.installedUpdated} updated, ${x.localEditsUploaded} local edit${x.localEditsUploaded===1?"":"s"} uploaded, ${x.conflicts} conflict${x.conflicts===1?"":"s"}`)}})}}],n?.supervisorOptions)}};async function gon(e){for(;!e.signal.aborted;){let t=await e.getAccessToken();if(!t){await Qtt(e.retryDelayMs,e.signal);continue}let n=e.injectedClient??xt({token:t}),r=await n.whoAmI({headers:{}});if(r.status===200)return{client:n,who:r};await Qtt(e.retryDelayMs,e.signal)}throw new Error("daemon auth wait aborted")}function Qtt(e,t){return t.aborted?Promise.resolve():new Promise(n=>{let r=setTimeout(n,e);r.unref?.(),t.addEventListener("abort",()=>{clearTimeout(r),n()},{once:!0})})}function hon(e,t,n){if(e.state!=="running"||!e.last_heartbeat_at||!e.pid)return!1;let r=Date.parse(e.last_heartbeat_at);return Number.isNaN(r)?!1:r+Aon>=t.getTime()&&n(e.pid)}function _on(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}m();m();m();m();Lr();import{cpSync as Bon,existsSync as R1,lstatSync as yme,mkdirSync as ztt,readlinkSync as Oon,rmSync as Htt,symlinkSync as Pon,unlinkSync as Mon,writeFileSync as $tt}from"node:fs";import wh from"node:path";import{pathToFileURL as Lon}from"node:url";m();import{execFile as Don}from"node:child_process";import{promisify as Non}from"node:util";m();import{execFileSync as Eon}from"node:child_process";import{constants as yon,accessSync as Son,readdirSync as Ton,statSync as Gtt}from"node:fs";import bon from"node:os";import MA from"node:path";function Ion(e){try{return Gtt(e).isFile()?(Son(e,yon.X_OK),!0):!1}catch{return!1}}function Con(e){let t=new Set,n=[];for(let r of e)r&&(t.has(r)||(t.add(r),n.push(r)));return n.join(MA.delimiter)}function jtt(e={}){let t=e.env??process.env,n=e.captureLoginPath??(()=>von(t)),r=e.knownDirs??(()=>xon(t)),o=e.isExecutable??Ion,i;function s(){if(i!==void 0)return i;let l=(t.PATH??"").split(MA.delimiter),f=(n()??"").split(MA.delimiter),h=r();return i=Con([...l,...f,...h]),i}function u(l){for(let f of s().split(MA.delimiter)){if(!f)continue;let h=MA.join(f,l);if(o(h))return h}return null}return{searchPath:s,resolve:u,isOnPath:l=>u(l)!==null}}function von(e=process.env){let t=e.SHELL;if(!t)return null;try{let r=Eon(t,["-lic",'printf %s "$PATH"'],{encoding:"utf8",timeout:3e3,stdio:["ignore","pipe","ignore"]}).trim();return r.length>0?r:null}catch{return null}}function Ron(e){let{homedir:t,dirExists:n,listDir:r}=e,o=[],i=MA.join(t,".nvm/versions/node");if(n(i))for(let l of r(i))o.push(MA.join(i,l,"bin"));let s=MA.join(t,".fnm/node-versions");if(n(s))for(let l of r(s))o.push(MA.join(s,l,"installation/bin"));let u=[MA.join(t,".volta/bin"),"/opt/homebrew/bin","/usr/local/bin"].filter(l=>n(l));return[...o,...u]}function xon(e){let t=e.HOME??bon.homedir();return Ron({homedir:t,dirExists:n=>{try{return Gtt(n).isDirectory()}catch{return!1}},listDir:n=>{try{return Ton(n)}catch{return[]}}})}var won=Non(Don);function kon(e){return{isOnPath(t){return e.isOnPath(t)},async run(t,n){let r=e.resolve(t)??t;try{let{stdout:o,stderr:i}=await won(r,n,{env:{...process.env,PATH:e.searchPath(),CI:"1"}});return{code:0,stdout:o,stderr:i}}catch(o){let i=o;return{code:i.code??1,stdout:i.stdout??"",stderr:i.stderr??""}}}}}var v1=kon(jtt());var qtt="amp",Uon="lore.ts",Qon="lore-installed.ts";function Fon(e){let t=process.env.XDG_CONFIG_HOME?.trim();return t&&wh.isAbsolute(t)?t:wh.join(e,".config")}function R5(e){return wh.join(e,"harness","amp","lore-plugin")}function Gon(e){return wh.join(R5(e),"amp","lore.ts")}function x5(e){return wh.join(R5(e),"amp",Qon)}function jon(e){return wh.join(R5(e),"lore-plugin-config.json")}function Sme(e){return wh.join(Fon(e),"amp","plugins")}function Tme(e){return wh.join(Sme(e),Uon)}function zon(e){try{return yme(e).isSymbolicLink()?R1(e):!1}catch{return!1}}function bme(e,t){try{return yme(e).isSymbolicLink()?Oon(e)===t:!1}catch{return!1}}function Hon(e,t){if(!e||!R1(e))throw new Error(`Lore plugin payload not found${e?` at ${e}`:""} \u2014 cannot install the Amp plugin. (set LORE_PLUGIN_PAYLOAD_DIR or rebuild the bundle)`);let n=R5(t);R1(n)&&Htt(n,{recursive:!0,force:!0}),ztt(wh.dirname(n),{recursive:!0}),Bon(e,n,{recursive:!0})}function $on(){return process.env.LORE_MCP_PROXY_BASE_URL?.trim()||process.env.LORE_API_ORIGIN?.trim()||void 0}function qon(e){let t=$on();if(t)return $tt(jon(e),JSON.stringify({mcpBaseUrl:t},null,2),{mode:384}),t}function Von(e,t){let n=Lon(Gon(e)).href,r=["// Generated by `lore harness install amp`. Do not edit by hand.",`process.env.LORE_PLUGIN_STATE_DIR = ${JSON.stringify(e)};`,...t?[`process.env.LORE_MCP_BASE_URL = ${JSON.stringify(t)};`,`process.env.LORE_MCP_PROXY_BASE_URL = ${JSON.stringify(t)};`]:[],`const mod = await import(${JSON.stringify(n)});`,"export default mod.default;",""];$tt(x5(e),r.join(`
|
|
658
658
|
`),{mode:384})}function Kon(e,t){if(!bme(e,t)){try{yme(e).isDirectory()?Htt(e,{recursive:!0,force:!0}):Mon(e)}catch{}Pon(t,e)}}function Yon(e,t){let n=Sme(t),r=Tme(t),o=R1(n),i=e.isOnPath("amp"),s=o||i,u=x5(Xn()),l;return bme(r,u)&&R1(r)?l="enabled":zon(r)?l="present":l="absent",Promise.resolve({id:qtt,harnessInstalled:s,loreState:l,installMethod:"symlink",needsRelaunch:!1})}async function Jon(e,t){Hon(e.payloadDir,e.stateDir);let n=qon(e.stateDir);Von(e.stateDir,n);let r=Sme(t);ztt(r,{recursive:!0});let o=Tme(t),i=x5(e.stateDir);Kon(o,i),e.emit({kind:"needs_relaunch",harness:"amp",instruction:"Run `plugins: reload` in Amp to activate the Lore plugin."})}function Zon(e,t){let n=Tme(t),r=x5(e.stateDir),o=bme(n,r)&&R1(n);return Promise.resolve({ok:o,...o?{}:{detail:`symlink ${n} does not resolve to ${r}`}})}function Won(e){return{id:qtt,detect(){let t=process.env.HOME??process.env.USERPROFILE??"";return Yon(e,t)},install(t){let n=process.env.HOME??process.env.USERPROFILE??"";return Jon(t,n)},verify(t){let n=process.env.HOME??process.env.USERPROFILE??"";return Zon(t,n)}}}var Vtt=Won(v1);m();import{existsSync as Ime,mkdirSync as Xon,readFileSync as Jtt,writeFileSync as Ktt}from"node:fs";import Ztt from"node:path";var Wtt="claude-code",s2="lore@tanagram",ein="tanagram",Xtt="tanagram/lore-plugin",tin={source:{source:"github",repo:Xtt}};function Cme(e){return Ztt.join(e,".claude","settings.json")}function ent(e){let t=Cme(e);if(!Ime(t))return null;try{return JSON.parse(Jtt(t,"utf8"))}catch{return null}}function nin(e){if(!e)return!1;let t=e.enabledPlugins;return!t||typeof t!="object"?!1:!!t[s2]}async function tnt(e,t){if(e.isOnPath("claude")){let n=await e.run("claude",["plugin","list","--json"]);if(n.code===0)return sin(n.stdout??"")}return nin(ent(t))}async function rin(e,t){let n=e.isOnPath("claude"),r=Ime(Cme(t)),o=n||r,i=await tnt(e,t)?"enabled":"absent",s;return n?s="cli":r?s="settings-file":s=null,{id:Wtt,harnessInstalled:o,loreState:i,installMethod:s,needsRelaunch:!1}}function Ytt(e){return e.code===0?!1:`${e.stdout??""} ${e.stderr??""}`.toLowerCase().includes("already")}async function oin(e,t){let n=await e.run("claude",["plugin","marketplace","add",Xtt]);if(n.code!==0&&!Ytt(n))throw new Error(`claude plugin marketplace add failed (code=${n.code}): ${n.stderr??n.stdout??""}`);let r=await e.run("claude",["plugin","install",s2]);if(r.code!==0&&!Ytt(r))throw new Error(`claude plugin install failed (code=${r.code}): ${r.stderr??r.stdout??""}`)}async function iin(e){let t=Ztt.join(e,".claude");Xon(t,{recursive:!0});let n=Cme(e),r=ent(e)??{};if(Ime(n)){let u=new Date().toISOString().replace(/[:.]/g,"-"),l=`${n}.${u}.bak`;Ktt(l,Jtt(n,"utf8"),"utf8")}let o=typeof r.extraKnownMarketplaces=="object"&&r.extraKnownMarketplaces!==null?r.extraKnownMarketplaces:{};o[ein]=tin;let i=typeof r.enabledPlugins=="object"&&r.enabledPlugins!==null?r.enabledPlugins:{};i[s2]=!0;let s={...r,extraKnownMarketplaces:o,enabledPlugins:i};Ktt(n,JSON.stringify(s,null,2),{encoding:"utf8",mode:384})}function sin(e){if(!e.trim())return!1;try{let t=JSON.parse(e);if(!Array.isArray(t))return!1;for(let n of t){if(!n||typeof n!="object"||n.name!==s2)continue;let o=n;if(o.enabled===!0)return!0;if(o.enabled===!1)return!1;let i=typeof o.status=="string"?o.status.toLowerCase():"";return i.includes("disabled")?!1:!!i.includes("enabled")}return!1}catch{return!1}}async function ain(e,t){let n=await tnt(e,t);return{ok:n,...n?{}:{detail:`${s2} is not enabled (plugin list / settings.json)`}}}function uin(e){return{id:Wtt,detect(){let t=process.env.HOME??process.env.USERPROFILE??"";return rin(e,t)},async install(t){let n=process.env.HOME??process.env.USERPROFILE??"";e.isOnPath("claude")?await oin(e,t):await iin(n)},verify(t){let n=process.env.HOME??process.env.USERPROFILE??"";return ain(e,n)}}}var nnt=uin(v1);m();import{existsSync as cin}from"node:fs";import lin from"node:os";import din from"node:path";var D5="codex",N5="lore@tanagram",pin="tanagram/lore-plugin";function ont(e){if(!e.trim())return"absent";for(let t of e.split(`
|
|
659
659
|
`)){let n=t.trim();if(!n)continue;let r=n.search(/\s/);if(r===-1||n.slice(0,r).trim()!==N5)continue;let i=n.slice(r).toLowerCase();return i.includes("installed, enabled")||i.includes("installed,enabled")?"enabled":i.includes("not installed")?"absent":i.includes("installed")?"present":"absent"}return"absent"}function rnt(e){if(e.code===0)return!1;let t=`${e.stdout??""} ${e.stderr??""}`.toLowerCase();return t.includes("already")||t.includes("up to date")}async function fin(e){if(!e.isOnPath("codex")){let o=process.env.HOME??lin.homedir(),i=din.join(o,".codex"),s=cin(i);return{id:D5,harnessInstalled:s,loreState:"absent",installMethod:null,needsRelaunch:!1}}let n=await e.run("codex",["plugin","list"]);if(n.code!==0)return{id:D5,harnessInstalled:!0,loreState:"needs-repair",installMethod:"cli",needsRelaunch:!1};let r=ont(n.stdout??"");return{id:D5,harnessInstalled:!0,loreState:r,installMethod:"cli",needsRelaunch:!1}}async function min(e,t){let n=await e.run("codex",["plugin","marketplace","add",pin]);if(n.code!==0&&!rnt(n))throw new Error(`codex plugin marketplace add failed (code=${n.code}): ${n.stderr??n.stdout??""}`);let r=await e.run("codex",["plugin","add",N5]);if(r.code!==0&&!rnt(r))throw new Error(`codex plugin add failed (code=${r.code}): ${r.stderr??r.stdout??""}`)}async function Ain(e){if(!e.isOnPath("codex"))return{ok:!1,detail:"codex binary not found on PATH"};let t=await e.run("codex",["plugin","list"]);if(t.code!==0)return{ok:!1,detail:`could not verify ${N5}: 'codex plugin list' exited ${t.code??"unknown"}`};let n=ont(t.stdout??""),r=n==="enabled";return{ok:r,...r?{}:{detail:`${N5} is not installed and enabled (state=${n})`}}}function gin(e){return{id:D5,detect(){return fin(e)},async install(t){if(!e.isOnPath("codex"))throw new Error("Codex CLI ('codex') could not be found. It was not on PATH, in your login shell PATH, or in a known Node/Homebrew install location. If you installed it with a version manager (nvm/fnm/volta), make sure that manager initialises in your shell, or symlink `codex` into /usr/local/bin, then retry.");await min(e,t)},verify(t){return Ain(e)}}}var int=gin(v1);m();m();import{existsSync as vme,mkdirSync as hin,readFileSync as unt,readdirSync as _in,statSync as Ein,writeFileSync as snt}from"node:fs";import yin from"node:os";import a2 from"node:path";function Sin(){let e=process.env.HOME??yin.homedir();return a2.join(e,"Library","Application Support","Claude","local-agent-mode-sessions")}function w5(){let e=Sin();if(!vme(e))return[];let t=[];for(let n of ant(e)){if(!n.isDir)continue;let r=a2.join(e,n.name);for(let o of ant(r)){if(!o.isDir)continue;let i=a2.join(r,o.name,"rpm","manifest.json");vme(i)&&t.push(i)}}return t}function ant(e){try{return _in(e).map(t=>{try{let n=Ein(a2.join(e,t));return{name:t,isDir:n.isDirectory()}}catch{return{name:t,isDir:!1}}})}catch{return[]}}function k5(e){let t=unt(e,"utf8");return JSON.parse(t)}function cnt(e){let t=e.plugins.find(n=>n.name==="lore");return!t||t.installationPreference==="available"?!1:(t.installationPreference="available",!0)}function lnt(e,t){if(vme(e)){let r=new Date().toISOString().replace(/[:.]/g,"-"),o=`${e}.${r}.bak`,i=unt(e,"utf8");snt(o,i,"utf8")}let n={...t,lastUpdated:Math.floor(Date.now()/1e3)};hin(a2.dirname(e),{recursive:!0}),snt(e,JSON.stringify(n,null,2),"utf8")}var Ob="cowork";function dnt(e){if(e.length===0)return{manifestPaths:[],hasLoreAnywhere:!1,loreAvailableInAll:!1,loreAvailableInSome:!1};let t=!1,n=0,r=0,o=0;for(let u of e){let l;try{l=k5(u)}catch{continue}o++;let f=l.plugins.find(h=>h.name==="lore");f&&(t=!0,r++,f.installationPreference==="available"&&n++)}let i=t&&o>0&&r===o&&n===o,s=n>0;return{manifestPaths:e,hasLoreAnywhere:t,loreAvailableInAll:i,loreAvailableInSome:s}}function Tin(){let e=w5(),t=dnt(e),n=e.length>0,r,o;return n?t.hasLoreAnywhere?t.loreAvailableInAll?(r="enabled",o="manifest-flip"):(r="needs-repair",o="manifest-flip"):(r="absent",o="guided"):(r="absent",o=null),Promise.resolve({id:Ob,harnessInstalled:n,loreState:r,installMethod:o,needsRelaunch:!1})}async function bin(e){let t=w5(),n=!1;for(let r of t){let o;try{o=k5(r)}catch{continue}if(o.plugins.some(i=>i.name==="lore")){n=!0;break}}if(n){let r=0;for(let o of t){let i;try{i=k5(o)}catch{continue}if(!i.plugins.some(l=>l.name==="lore")){r++;continue}cnt(i)&&lnt(o,i)}e.emit({kind:"needs_relaunch",harness:Ob,instruction:"Fully quit Claude Desktop (Cmd-Q / right-click the Dock icon \u2192 Quit) and reopen it to activate the Lore plugin."}),r>0&&e.emit({kind:"guided_step",harness:Ob,instruction:`${r} Cowork workspace(s) still need Lore added via the in-app marketplace. In each affected workspace, go to Settings \u2192 Plugins, search for "Lore", and click Install. Then run \`lore install\` again.`})}else e.emit({kind:"guided_step",harness:Ob,instruction:"1. Open Claude Desktop (Cowork) and navigate to Settings \u2192 Plugins."}),e.emit({kind:"guided_step",harness:Ob,instruction:'2. Search for "Lore" in the plugin marketplace and click Install.'}),e.emit({kind:"guided_step",harness:Ob,instruction:"3. Fully quit Claude Desktop (Cmd-Q) and reopen it. Then run `lore install` again to activate."})}function Iin(e){let t=w5();if(t.length===0)return Promise.resolve({ok:!1,detail:"No workspace manifests found"});let n=dnt(t);return n.hasLoreAnywhere?n.loreAvailableInAll?Promise.resolve({ok:!0}):Promise.resolve({ok:!1,detail:"Lore is not available in all workspace manifests (disabled or absent in some)"}):Promise.resolve({ok:!1,detail:"No lore entry found in any manifest"})}function Cin(){return{id:Ob,detect:Tin,install:bin,verify:Iin}}var pnt=Cin();var Pb={"claude-code":nnt,cowork:pnt,codex:int,amp:Vtt};async function Rme(e){return Promise.all(e.map(async t=>{try{return await t.detect()}catch(n){let r=n instanceof Error?n.message:String(n);return{id:t.id,harnessInstalled:!1,loreState:"absent",installMethod:null,needsRelaunch:!1,detail:`detect failed: ${r}`}}}))}var fnt={meta:{name:"detect",description:"Detect which AI harnesses are installed and whether Lore is wired up."},args:{json:{type:"boolean",description:"Output results as JSON"}},async run({args:e}){let t=await Rme(Object.values(Pb));if(e.json){process.stdout.write(`${JSON.stringify(t,null,2)}
|
|
660
660
|
`);return}let n=15,r=14,o=9,i=(u,l)=>u.padEnd(l),s=`${i("HARNESS",n)+i("LORE STATE",r)+i("INSTALLED",o)}DETAIL`;console.log(s),console.log("-".repeat(s.length));for(let u of t){let l=i(u.id,n)+i(u.loreState,r)+i(u.harnessInstalled?"yes":"no",o)+(u.detail??"");console.log(l)}}};m();Lr();m();m();YO();var vin=10*1e3;function mnt(e){return Date.now()+vin<e.expires_at}function Ant(e){let t=Zx(e,"plugin");if(t!==null&&mnt(t))return"already-valid";let n=["desktop","cli"];for(let r of n){let o=Zx(e,r);if(o!==null&&mnt(o))return mH(e,"plugin",o),"populated"}return"no-source"}async function gnt(e,t){let n=e.id,r=!1,o="absent",i=!1,s=R=>{R.kind==="guided_step"&&(r=!0),R.kind==="needs_relaunch"&&(i=!0),t.emit(R)},u={...t,emit:s},l="install";s({kind:"stage_started",harness:n,stage:l});try{await e.install(u)}catch(R){let x=R instanceof Error?R.message:String(R);s({kind:"error",harness:n,stage:l,message:x});let B={id:n,ok:!1,loreState:o,needsRelaunch:i,guided:r,error:x};return s({kind:"installed",harness:n,result:B}),B}s({kind:"stage_finished",harness:n,stage:l});let f="auth";s({kind:"stage_started",harness:n,stage:f});let h;try{h=Ant(u.stateDir)}catch(R){let x=R instanceof Error?R.message:String(R);s({kind:"error",harness:n,stage:f,message:x});let B={id:n,ok:!1,loreState:o,needsRelaunch:i,guided:r,error:x};return s({kind:"installed",harness:n,result:B}),B}if(h==="no-source"){let R="not signed in \u2014 sign in via the Lore desktop app first";s({kind:"error",harness:n,stage:f,message:R});let x={id:n,ok:!1,loreState:o,needsRelaunch:i,guided:r,error:R};return s({kind:"installed",harness:n,result:x}),x}s({kind:"stage_finished",harness:n,stage:f});let _="verify";s({kind:"stage_started",harness:n,stage:_});let E=!1,T;try{let R=await e.verify(u);if(E=R.ok,T=R.detail,E)o="enabled";else try{o=(await e.detect()).loreState}catch{}}catch(R){let x=R instanceof Error?R.message:String(R);s({kind:"error",harness:n,stage:_,message:x});let B={id:n,ok:!1,loreState:o,needsRelaunch:i,guided:r,error:x};return s({kind:"installed",harness:n,result:B}),B}s({kind:"stage_finished",harness:n,stage:_});let v={id:n,ok:E,loreState:o,needsRelaunch:i,guided:r,...E||r?{}:{error:T??"verify returned ok:false"}};return s({kind:"installed",harness:n,result:v}),v}m();import{existsSync as Rin,readFileSync as oEr}from"node:fs";import u2 from"node:path";import{fileURLToPath as xin}from"node:url";var hnt="LORE_PLUGIN_PAYLOAD_DIR";function _nt(){let e=[],t=process.env[hnt]?.trim();t&&e.push(t);let n=u2.dirname(xin(import.meta.url)),r=u2.resolve(n,"lore-plugin");e.includes(r)||e.push(r);let o=u2.resolve(n,"..","..","..",".."),i=u2.join(o,"packages","lore-plugin");return e.includes(i)||e.push(i),Din(e)}function Din(e){for(let t of e)if(Nin(t))return t;throw new Error(`Could not find the lore-plugin payload directory.
|