@townco/gui-template 0.1.75 → 0.1.76

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.
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/katex-D_C5EOCM.js","assets/katex-CyAuISp2.css"])))=>i.map(i=>d[i]);
2
- import{e as IN,b as ft,c as fue,r as Te,a as bue,g as yue,f as sc,j as be}from"./react-C5eMgCoK.js";import{b as KD,c as ZD,t as wue,h as kue,d as vue,e as _ue,f as Cue,g as Eue,u as xue,r as Bue,a as Iue,i as Due}from"./markdown-BD8QolPl.js";import{D as ME,Z as Que,a as Sue,R as Tue,C as Sq,b as Tq,M as Fue,X as Lue,L as Nue}from"./icons-BMQGG5h-.js";var e1={exports:{}},t1={};var DN;function Rue(){return DN||(DN=1,(function(t){function e(Q,L){var S=Q.length;Q.push(L);e:for(;0<S;){var M=S-1>>>1,j=Q[M];if(0<r(j,L))Q[M]=L,Q[S]=j,S=M;else break e}}function n(Q){return Q.length===0?null:Q[0]}function a(Q){if(Q.length===0)return null;var L=Q[0],S=Q.pop();if(S!==L){Q[0]=S;e:for(var M=0,j=Q.length,$=j>>>1;M<$;){var G=2*(M+1)-1,q=Q[G],W=G+1,z=Q[W];if(0>r(q,S))W<j&&0>r(z,q)?(Q[M]=z,Q[W]=S,M=W):(Q[M]=q,Q[G]=S,M=G);else if(W<j&&0>r(z,S))Q[M]=z,Q[W]=S,M=W;else break e}}return L}function r(Q,L){var S=Q.sortIndex-L.sortIndex;return S!==0?S:Q.id-L.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}var l=[],u=[],d=1,p=null,A=3,m=!1,g=!1,h=!1,f=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function v(Q){for(var L=n(u);L!==null;){if(L.callback===null)a(u);else if(L.startTime<=Q)a(u),L.sortIndex=L.expirationTime,e(l,L);else break;L=n(u)}}function _(Q){if(h=!1,v(Q),!g)if(n(l)!==null)g=!0,I||(I=!0,N());else{var L=n(u);L!==null&&F(_,L.startTime-Q)}}var I=!1,C=-1,E=5,B=-1;function T(){return f?!0:!(t.unstable_now()-B<E)}function D(){if(f=!1,I){var Q=t.unstable_now();B=Q;var L=!0;try{e:{g=!1,h&&(h=!1,w(C),C=-1),m=!0;var S=A;try{t:{for(v(Q),p=n(l);p!==null&&!(p.expirationTime>Q&&T());){var M=p.callback;if(typeof M=="function"){p.callback=null,A=p.priorityLevel;var j=M(p.expirationTime<=Q);if(Q=t.unstable_now(),typeof j=="function"){p.callback=j,v(Q),L=!0;break t}p===n(l)&&a(l),v(Q)}else a(l);p=n(l)}if(p!==null)L=!0;else{var $=n(u);$!==null&&F(_,$.startTime-Q),L=!1}}break e}finally{p=null,A=S,m=!1}L=void 0}}finally{L?N():I=!1}}}var N;if(typeof y=="function")N=function(){y(D)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,x=R.port2;R.port1.onmessage=D,N=function(){x.postMessage(null)}}else N=function(){b(D,0)};function F(Q,L){C=b(function(){Q(t.unstable_now())},L)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(Q){Q.callback=null},t.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<Q?Math.floor(1e3/Q):5},t.unstable_getCurrentPriorityLevel=function(){return A},t.unstable_next=function(Q){switch(A){case 1:case 2:case 3:var L=3;break;default:L=A}var S=A;A=L;try{return Q()}finally{A=S}},t.unstable_requestPaint=function(){f=!0},t.unstable_runWithPriority=function(Q,L){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var S=A;A=Q;try{return L()}finally{A=S}},t.unstable_scheduleCallback=function(Q,L,S){var M=t.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?M+S:M):S=M,Q){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=S+j,Q={id:d++,callback:L,priorityLevel:Q,startTime:S,expirationTime:j,sortIndex:-1},S>M?(Q.sortIndex=S,e(u,Q),n(l)===null&&Q===n(u)&&(h?(w(C),C=-1):h=!0,F(_,S-M))):(Q.sortIndex=j,e(l,Q),g||m||(g=!0,I||(I=!0,N()))),Q},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(Q){var L=A;return function(){var S=A;A=L;try{return Q.apply(this,arguments)}finally{A=S}}}})(t1)),t1}var QN;function vBt(){return QN||(QN=1,e1.exports=Rue()),e1.exports}var n1={},Ou={},yh={},wh={},fc={},ju={},kh={},SN;function Mue(){return SN||(SN=1,Object.defineProperty(kh,"__esModule",{value:!0}),kh._globalThis=void 0,kh._globalThis=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof IN=="object"?IN:{}),kh}var TN;function $ue(){return TN||(TN=1,(function(t){var e=ju&&ju.__createBinding||(Object.create?(function(a,r,i,o){o===void 0&&(o=i),Object.defineProperty(a,o,{enumerable:!0,get:function(){return r[i]}})}):(function(a,r,i,o){o===void 0&&(o=i),a[o]=r[i]})),n=ju&&ju.__exportStar||function(a,r){for(var i in a)i!=="default"&&!Object.prototype.hasOwnProperty.call(r,i)&&e(r,a,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(Mue(),t)})(ju)),ju}var vh={},FN;function Fq(){return FN||(FN=1,Object.defineProperty(vh,"__esModule",{value:!0}),vh.VERSION=void 0,vh.VERSION="1.9.0"),vh}var Gu={},LN;function Pue(){if(LN)return Gu;LN=1,Object.defineProperty(Gu,"__esModule",{value:!0}),Gu.isCompatible=Gu._makeCompatibilityCheck=void 0;const t=Fq(),e=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function n(a){const r=new Set([a]),i=new Set,o=a.match(e);if(!o)return()=>!1;const s={major:+o[1],minor:+o[2],patch:+o[3],prerelease:o[4]};if(s.prerelease!=null)return function(p){return p===a};function l(d){return i.add(d),!1}function u(d){return r.add(d),!0}return function(p){if(r.has(p))return!0;if(i.has(p))return!1;const A=p.match(e);if(!A)return l(p);const m={major:+A[1],minor:+A[2],patch:+A[3],prerelease:A[4]};return m.prerelease!=null||s.major!==m.major?l(p):s.major===0?s.minor===m.minor&&s.patch<=m.patch?u(p):l(p):s.minor<=m.minor?u(p):l(p)}}return Gu._makeCompatibilityCheck=n,Gu.isCompatible=n(t.VERSION),Gu}var NN;function Ng(){if(NN)return fc;NN=1,Object.defineProperty(fc,"__esModule",{value:!0}),fc.unregisterGlobal=fc.getGlobal=fc.registerGlobal=void 0;const t=$ue(),e=Fq(),n=Pue(),a=e.VERSION.split(".")[0],r=Symbol.for(`opentelemetry.js.api.${a}`),i=t._globalThis;function o(u,d,p,A=!1){var m;const g=i[r]=(m=i[r])!==null&&m!==void 0?m:{version:e.VERSION};if(!A&&g[u]){const h=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${u}`);return p.error(h.stack||h.message),!1}if(g.version!==e.VERSION){const h=new Error(`@opentelemetry/api: Registration of version v${g.version} for ${u} does not match previously registered API v${e.VERSION}`);return p.error(h.stack||h.message),!1}return g[u]=d,p.debug(`@opentelemetry/api: Registered a global for ${u} v${e.VERSION}.`),!0}fc.registerGlobal=o;function s(u){var d,p;const A=(d=i[r])===null||d===void 0?void 0:d.version;if(!(!A||!(0,n.isCompatible)(A)))return(p=i[r])===null||p===void 0?void 0:p[u]}fc.getGlobal=s;function l(u,d){d.debug(`@opentelemetry/api: Unregistering a global for ${u} v${e.VERSION}.`);const p=i[r];p&&delete p[u]}return fc.unregisterGlobal=l,fc}var RN;function Oue(){if(RN)return wh;RN=1,Object.defineProperty(wh,"__esModule",{value:!0}),wh.DiagComponentLogger=void 0;const t=Ng();class e{constructor(r){this._namespace=r.namespace||"DiagComponentLogger"}debug(...r){return n("debug",this._namespace,r)}error(...r){return n("error",this._namespace,r)}info(...r){return n("info",this._namespace,r)}warn(...r){return n("warn",this._namespace,r)}verbose(...r){return n("verbose",this._namespace,r)}}wh.DiagComponentLogger=e;function n(a,r,i){const o=(0,t.getGlobal)("diag");if(o)return i.unshift(r),o[a](...i)}return wh}var _h={},a1={},MN;function JF(){return MN||(MN=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiagLogLevel=void 0,(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"})(t.DiagLogLevel||(t.DiagLogLevel={}))})(a1)),a1}var $N;function jue(){if($N)return _h;$N=1,Object.defineProperty(_h,"__esModule",{value:!0}),_h.createLogLevelDiagLogger=void 0;const t=JF();function e(n,a){n<t.DiagLogLevel.NONE?n=t.DiagLogLevel.NONE:n>t.DiagLogLevel.ALL&&(n=t.DiagLogLevel.ALL),a=a||{};function r(i,o){const s=a[i];return typeof s=="function"&&n>=o?s.bind(a):function(){}}return{error:r("error",t.DiagLogLevel.ERROR),warn:r("warn",t.DiagLogLevel.WARN),info:r("info",t.DiagLogLevel.INFO),debug:r("debug",t.DiagLogLevel.DEBUG),verbose:r("verbose",t.DiagLogLevel.VERBOSE)}}return _h.createLogLevelDiagLogger=e,_h}var PN;function Rg(){if(PN)return yh;PN=1,Object.defineProperty(yh,"__esModule",{value:!0}),yh.DiagAPI=void 0;const t=Oue(),e=jue(),n=JF(),a=Ng(),r="diag";class i{constructor(){function s(d){return function(...p){const A=(0,a.getGlobal)("diag");if(A)return A[d](...p)}}const l=this,u=(d,p={logLevel:n.DiagLogLevel.INFO})=>{var A,m,g;if(d===l){const b=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return l.error((A=b.stack)!==null&&A!==void 0?A:b.message),!1}typeof p=="number"&&(p={logLevel:p});const h=(0,a.getGlobal)("diag"),f=(0,e.createLogLevelDiagLogger)((m=p.logLevel)!==null&&m!==void 0?m:n.DiagLogLevel.INFO,d);if(h&&!p.suppressOverrideMessage){const b=(g=new Error().stack)!==null&&g!==void 0?g:"<failed to generate stacktrace>";h.warn(`Current logger will be overwritten from ${b}`),f.warn(`Current logger will overwrite one already registered from ${b}`)}return(0,a.registerGlobal)("diag",f,l,!0)};l.setLogger=u,l.disable=()=>{(0,a.unregisterGlobal)(r,l)},l.createComponentLogger=d=>new t.DiagComponentLogger(d),l.verbose=s("verbose"),l.debug=s("debug"),l.info=s("info"),l.warn=s("warn"),l.error=s("error")}static instance(){return this._instance||(this._instance=new i),this._instance}}return yh.DiagAPI=i,yh}var Ch={},ON;function Gue(){if(ON)return Ch;ON=1,Object.defineProperty(Ch,"__esModule",{value:!0}),Ch.BaggageImpl=void 0;class t{constructor(n){this._entries=n?new Map(n):new Map}getEntry(n){const a=this._entries.get(n);if(a)return Object.assign({},a)}getAllEntries(){return Array.from(this._entries.entries()).map(([n,a])=>[n,a])}setEntry(n,a){const r=new t(this._entries);return r._entries.set(n,a),r}removeEntry(n){const a=new t(this._entries);return a._entries.delete(n),a}removeEntries(...n){const a=new t(this._entries);for(const r of n)a._entries.delete(r);return a}clear(){return new t}}return Ch.BaggageImpl=t,Ch}var Eh={},jN;function que(){return jN||(jN=1,Object.defineProperty(Eh,"__esModule",{value:!0}),Eh.baggageEntryMetadataSymbol=void 0,Eh.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")),Eh}var GN;function Lq(){if(GN)return Ou;GN=1,Object.defineProperty(Ou,"__esModule",{value:!0}),Ou.baggageEntryMetadataFromString=Ou.createBaggage=void 0;const t=Rg(),e=Gue(),n=que(),a=t.DiagAPI.instance();function r(o={}){return new e.BaggageImpl(new Map(Object.entries(o)))}Ou.createBaggage=r;function i(o){return typeof o!="string"&&(a.error(`Cannot create baggage metadata from unknown type: ${typeof o}`),o=""),{__TYPE__:n.baggageEntryMetadataSymbol,toString(){return o}}}return Ou.baggageEntryMetadataFromString=i,Ou}var qu={},qN;function $E(){if(qN)return qu;qN=1,Object.defineProperty(qu,"__esModule",{value:!0}),qu.ROOT_CONTEXT=qu.createContextKey=void 0;function t(n){return Symbol.for(n)}qu.createContextKey=t;class e{constructor(a){const r=this;r._currentContext=a?new Map(a):new Map,r.getValue=i=>r._currentContext.get(i),r.setValue=(i,o)=>{const s=new e(r._currentContext);return s._currentContext.set(i,o),s},r.deleteValue=i=>{const o=new e(r._currentContext);return o._currentContext.delete(i),o}}}return qu.ROOT_CONTEXT=new e,qu}var xh={},zN;function zue(){if(zN)return xh;zN=1,Object.defineProperty(xh,"__esModule",{value:!0}),xh.DiagConsoleLogger=void 0;const t=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];class e{constructor(){function a(r){return function(...i){if(console){let o=console[r];if(typeof o!="function"&&(o=console.log),typeof o=="function")return o.apply(console,i)}}}for(let r=0;r<t.length;r++)this[t[r].n]=a(t[r].c)}}return xh.DiagConsoleLogger=e,xh}var r1={},UN;function Nq(){return UN||(UN=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createNoopMeter=t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=t.NOOP_OBSERVABLE_GAUGE_METRIC=t.NOOP_OBSERVABLE_COUNTER_METRIC=t.NOOP_UP_DOWN_COUNTER_METRIC=t.NOOP_HISTOGRAM_METRIC=t.NOOP_GAUGE_METRIC=t.NOOP_COUNTER_METRIC=t.NOOP_METER=t.NoopObservableUpDownCounterMetric=t.NoopObservableGaugeMetric=t.NoopObservableCounterMetric=t.NoopObservableMetric=t.NoopHistogramMetric=t.NoopGaugeMetric=t.NoopUpDownCounterMetric=t.NoopCounterMetric=t.NoopMetric=t.NoopMeter=void 0;class e{constructor(){}createGauge(m,g){return t.NOOP_GAUGE_METRIC}createHistogram(m,g){return t.NOOP_HISTOGRAM_METRIC}createCounter(m,g){return t.NOOP_COUNTER_METRIC}createUpDownCounter(m,g){return t.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(m,g){return t.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(m,g){return t.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(m,g){return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(m,g){}removeBatchObservableCallback(m){}}t.NoopMeter=e;class n{}t.NoopMetric=n;class a extends n{add(m,g){}}t.NoopCounterMetric=a;class r extends n{add(m,g){}}t.NoopUpDownCounterMetric=r;class i extends n{record(m,g){}}t.NoopGaugeMetric=i;class o extends n{record(m,g){}}t.NoopHistogramMetric=o;class s{addCallback(m){}removeCallback(m){}}t.NoopObservableMetric=s;class l extends s{}t.NoopObservableCounterMetric=l;class u extends s{}t.NoopObservableGaugeMetric=u;class d extends s{}t.NoopObservableUpDownCounterMetric=d,t.NOOP_METER=new e,t.NOOP_COUNTER_METRIC=new a,t.NOOP_GAUGE_METRIC=new i,t.NOOP_HISTOGRAM_METRIC=new o,t.NOOP_UP_DOWN_COUNTER_METRIC=new r,t.NOOP_OBSERVABLE_COUNTER_METRIC=new l,t.NOOP_OBSERVABLE_GAUGE_METRIC=new u,t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new d;function p(){return t.NOOP_METER}t.createNoopMeter=p})(r1)),r1}var i1={},HN;function Uue(){return HN||(HN=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueType=void 0,(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(t.ValueType||(t.ValueType={}))})(i1)),i1}var zu={},YN;function Rq(){return YN||(YN=1,Object.defineProperty(zu,"__esModule",{value:!0}),zu.defaultTextMapSetter=zu.defaultTextMapGetter=void 0,zu.defaultTextMapGetter={get(t,e){if(t!=null)return t[e]},keys(t){return t==null?[]:Object.keys(t)}},zu.defaultTextMapSetter={set(t,e,n){t!=null&&(t[e]=n)}}),zu}var Bh={},Ih={},Dh={},Qh={},WN;function Hue(){if(WN)return Qh;WN=1,Object.defineProperty(Qh,"__esModule",{value:!0}),Qh.NoopContextManager=void 0;const t=$E();let e=class{active(){return t.ROOT_CONTEXT}with(a,r,i,...o){return r.call(i,...o)}bind(a,r){return r}enable(){return this}disable(){return this}};return Qh.NoopContextManager=e,Qh}var KN;function PE(){if(KN)return Dh;KN=1,Object.defineProperty(Dh,"__esModule",{value:!0}),Dh.ContextAPI=void 0;const t=Hue(),e=Ng(),n=Rg(),a="context",r=new t.NoopContextManager;class i{constructor(){}static getInstance(){return this._instance||(this._instance=new i),this._instance}setGlobalContextManager(s){return(0,e.registerGlobal)(a,s,n.DiagAPI.instance())}active(){return this._getContextManager().active()}with(s,l,u,...d){return this._getContextManager().with(s,l,u,...d)}bind(s,l){return this._getContextManager().bind(s,l)}_getContextManager(){return(0,e.getGlobal)(a)||r}disable(){this._getContextManager().disable(),(0,e.unregisterGlobal)(a,n.DiagAPI.instance())}}return Dh.ContextAPI=i,Dh}var ci={},Sh={},o1={},s1={},ZN;function Mq(){return ZN||(ZN=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TraceFlags=void 0,(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(t.TraceFlags||(t.TraceFlags={}))})(s1)),s1}var VN;function XF(){return VN||(VN=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=void 0;const e=Mq();t.INVALID_SPANID="0000000000000000",t.INVALID_TRACEID="00000000000000000000000000000000",t.INVALID_SPAN_CONTEXT={traceId:t.INVALID_TRACEID,spanId:t.INVALID_SPANID,traceFlags:e.TraceFlags.NONE}})(o1)),o1}var JN;function e4(){if(JN)return Sh;JN=1,Object.defineProperty(Sh,"__esModule",{value:!0}),Sh.NonRecordingSpan=void 0;const t=XF();let e=class{constructor(a=t.INVALID_SPAN_CONTEXT){this._spanContext=a}spanContext(){return this._spanContext}setAttribute(a,r){return this}setAttributes(a){return this}addEvent(a,r){return this}addLink(a){return this}addLinks(a){return this}setStatus(a){return this}updateName(a){return this}end(a){}isRecording(){return!1}recordException(a,r){}};return Sh.NonRecordingSpan=e,Sh}var XN;function $q(){if(XN)return ci;XN=1,Object.defineProperty(ci,"__esModule",{value:!0}),ci.getSpanContext=ci.setSpanContext=ci.deleteSpan=ci.setSpan=ci.getActiveSpan=ci.getSpan=void 0;const t=$E(),e=e4(),n=PE(),a=(0,t.createContextKey)("OpenTelemetry Context Key SPAN");function r(d){return d.getValue(a)||void 0}ci.getSpan=r;function i(){return r(n.ContextAPI.getInstance().active())}ci.getActiveSpan=i;function o(d,p){return d.setValue(a,p)}ci.setSpan=o;function s(d){return d.deleteValue(a)}ci.deleteSpan=s;function l(d,p){return o(d,new e.NonRecordingSpan(p))}ci.setSpanContext=l;function u(d){var p;return(p=r(d))===null||p===void 0?void 0:p.spanContext()}return ci.getSpanContext=u,ci}var Wo={},eR;function t4(){if(eR)return Wo;eR=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.wrapSpanContext=Wo.isSpanContextValid=Wo.isValidSpanId=Wo.isValidTraceId=void 0;const t=XF(),e=e4(),n=/^([0-9a-f]{32})$/i,a=/^[0-9a-f]{16}$/i;function r(l){return n.test(l)&&l!==t.INVALID_TRACEID}Wo.isValidTraceId=r;function i(l){return a.test(l)&&l!==t.INVALID_SPANID}Wo.isValidSpanId=i;function o(l){return r(l.traceId)&&i(l.spanId)}Wo.isSpanContextValid=o;function s(l){return new e.NonRecordingSpan(l)}return Wo.wrapSpanContext=s,Wo}var tR;function Pq(){if(tR)return Ih;tR=1,Object.defineProperty(Ih,"__esModule",{value:!0}),Ih.NoopTracer=void 0;const t=PE(),e=$q(),n=e4(),a=t4(),r=t.ContextAPI.getInstance();let i=class{startSpan(l,u,d=r.active()){if(!!u?.root)return new n.NonRecordingSpan;const A=d&&(0,e.getSpanContext)(d);return o(A)&&(0,a.isSpanContextValid)(A)?new n.NonRecordingSpan(A):new n.NonRecordingSpan}startActiveSpan(l,u,d,p){let A,m,g;if(arguments.length<2)return;arguments.length===2?g=u:arguments.length===3?(A=u,g=d):(A=u,m=d,g=p);const h=m??r.active(),f=this.startSpan(l,A,h),b=(0,e.setSpan)(h,f);return r.with(b,g,void 0,f)}};Ih.NoopTracer=i;function o(s){return typeof s=="object"&&typeof s.spanId=="string"&&typeof s.traceId=="string"&&typeof s.traceFlags=="number"}return Ih}var nR;function Oq(){if(nR)return Bh;nR=1,Object.defineProperty(Bh,"__esModule",{value:!0}),Bh.ProxyTracer=void 0;const t=Pq(),e=new t.NoopTracer;let n=class{constructor(r,i,o,s){this._provider=r,this.name=i,this.version=o,this.options=s}startSpan(r,i,o){return this._getTracer().startSpan(r,i,o)}startActiveSpan(r,i,o,s){const l=this._getTracer();return Reflect.apply(l.startActiveSpan,l,arguments)}_getTracer(){if(this._delegate)return this._delegate;const r=this._provider.getDelegateTracer(this.name,this.version,this.options);return r?(this._delegate=r,this._delegate):e}};return Bh.ProxyTracer=n,Bh}var Th={},Fh={},aR;function Yue(){if(aR)return Fh;aR=1,Object.defineProperty(Fh,"__esModule",{value:!0}),Fh.NoopTracerProvider=void 0;const t=Pq();let e=class{getTracer(a,r,i){return new t.NoopTracer}};return Fh.NoopTracerProvider=e,Fh}var rR;function jq(){if(rR)return Th;rR=1,Object.defineProperty(Th,"__esModule",{value:!0}),Th.ProxyTracerProvider=void 0;const t=Oq(),e=Yue(),n=new e.NoopTracerProvider;let a=class{getTracer(i,o,s){var l;return(l=this.getDelegateTracer(i,o,s))!==null&&l!==void 0?l:new t.ProxyTracer(this,i,o,s)}getDelegate(){var i;return(i=this._delegate)!==null&&i!==void 0?i:n}setDelegate(i){this._delegate=i}getDelegateTracer(i,o,s){var l;return(l=this._delegate)===null||l===void 0?void 0:l.getTracer(i,o,s)}};return Th.ProxyTracerProvider=a,Th}var c1={},iR;function Wue(){return iR||(iR=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SamplingDecision=void 0,(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(t.SamplingDecision||(t.SamplingDecision={}))})(c1)),c1}var l1={},oR;function Kue(){return oR||(oR=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SpanKind=void 0,(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"})(t.SpanKind||(t.SpanKind={}))})(l1)),l1}var u1={},sR;function Zue(){return sR||(sR=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SpanStatusCode=void 0,(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(t.SpanStatusCode||(t.SpanStatusCode={}))})(u1)),u1}var Lh={},Nh={},Uu={},cR;function Vue(){if(cR)return Uu;cR=1,Object.defineProperty(Uu,"__esModule",{value:!0}),Uu.validateValue=Uu.validateKey=void 0;const t="[_0-9a-z-*/]",e=`[a-z]${t}{0,255}`,n=`[a-z0-9]${t}{0,240}@[a-z]${t}{0,13}`,a=new RegExp(`^(?:${e}|${n})$`),r=/^[ -~]{0,255}[!-~]$/,i=/,|=/;function o(l){return a.test(l)}Uu.validateKey=o;function s(l){return r.test(l)&&!i.test(l)}return Uu.validateValue=s,Uu}var lR;function Jue(){if(lR)return Nh;lR=1,Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.TraceStateImpl=void 0;const t=Vue(),e=32,n=512,a=",",r="=";class i{constructor(s){this._internalState=new Map,s&&this._parse(s)}set(s,l){const u=this._clone();return u._internalState.has(s)&&u._internalState.delete(s),u._internalState.set(s,l),u}unset(s){const l=this._clone();return l._internalState.delete(s),l}get(s){return this._internalState.get(s)}serialize(){return this._keys().reduce((s,l)=>(s.push(l+r+this.get(l)),s),[]).join(a)}_parse(s){s.length>n||(this._internalState=s.split(a).reverse().reduce((l,u)=>{const d=u.trim(),p=d.indexOf(r);if(p!==-1){const A=d.slice(0,p),m=d.slice(p+1,u.length);(0,t.validateKey)(A)&&(0,t.validateValue)(m)&&l.set(A,m)}return l},new Map),this._internalState.size>e&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,e))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const s=new i;return s._internalState=new Map(this._internalState),s}}return Nh.TraceStateImpl=i,Nh}var uR;function Xue(){if(uR)return Lh;uR=1,Object.defineProperty(Lh,"__esModule",{value:!0}),Lh.createTraceState=void 0;const t=Jue();function e(n){return new t.TraceStateImpl(n)}return Lh.createTraceState=e,Lh}var Rh={},dR;function ede(){if(dR)return Rh;dR=1,Object.defineProperty(Rh,"__esModule",{value:!0}),Rh.context=void 0;const t=PE();return Rh.context=t.ContextAPI.getInstance(),Rh}var Mh={},pR;function tde(){if(pR)return Mh;pR=1,Object.defineProperty(Mh,"__esModule",{value:!0}),Mh.diag=void 0;const t=Rg();return Mh.diag=t.DiagAPI.instance(),Mh}var $h={},Ph={},Hu={},AR;function nde(){if(AR)return Hu;AR=1,Object.defineProperty(Hu,"__esModule",{value:!0}),Hu.NOOP_METER_PROVIDER=Hu.NoopMeterProvider=void 0;const t=Nq();let e=class{getMeter(a,r,i){return t.NOOP_METER}};return Hu.NoopMeterProvider=e,Hu.NOOP_METER_PROVIDER=new e,Hu}var mR;function ade(){if(mR)return Ph;mR=1,Object.defineProperty(Ph,"__esModule",{value:!0}),Ph.MetricsAPI=void 0;const t=nde(),e=Ng(),n=Rg(),a="metrics";class r{constructor(){}static getInstance(){return this._instance||(this._instance=new r),this._instance}setGlobalMeterProvider(o){return(0,e.registerGlobal)(a,o,n.DiagAPI.instance())}getMeterProvider(){return(0,e.getGlobal)(a)||t.NOOP_METER_PROVIDER}getMeter(o,s,l){return this.getMeterProvider().getMeter(o,s,l)}disable(){(0,e.unregisterGlobal)(a,n.DiagAPI.instance())}}return Ph.MetricsAPI=r,Ph}var gR;function rde(){if(gR)return $h;gR=1,Object.defineProperty($h,"__esModule",{value:!0}),$h.metrics=void 0;const t=ade();return $h.metrics=t.MetricsAPI.getInstance(),$h}var Oh={},jh={},Gh={},hR;function ide(){if(hR)return Gh;hR=1,Object.defineProperty(Gh,"__esModule",{value:!0}),Gh.NoopTextMapPropagator=void 0;let t=class{inject(n,a){}extract(n,a){return n}fields(){return[]}};return Gh.NoopTextMapPropagator=t,Gh}var Ko={},fR;function ode(){if(fR)return Ko;fR=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.deleteBaggage=Ko.setBaggage=Ko.getActiveBaggage=Ko.getBaggage=void 0;const t=PE(),n=(0,$E().createContextKey)("OpenTelemetry Baggage Key");function a(s){return s.getValue(n)||void 0}Ko.getBaggage=a;function r(){return a(t.ContextAPI.getInstance().active())}Ko.getActiveBaggage=r;function i(s,l){return s.setValue(n,l)}Ko.setBaggage=i;function o(s){return s.deleteValue(n)}return Ko.deleteBaggage=o,Ko}var bR;function sde(){if(bR)return jh;bR=1,Object.defineProperty(jh,"__esModule",{value:!0}),jh.PropagationAPI=void 0;const t=Ng(),e=ide(),n=Rq(),a=ode(),r=Lq(),i=Rg(),o="propagation",s=new e.NoopTextMapPropagator;class l{constructor(){this.createBaggage=r.createBaggage,this.getBaggage=a.getBaggage,this.getActiveBaggage=a.getActiveBaggage,this.setBaggage=a.setBaggage,this.deleteBaggage=a.deleteBaggage}static getInstance(){return this._instance||(this._instance=new l),this._instance}setGlobalPropagator(d){return(0,t.registerGlobal)(o,d,i.DiagAPI.instance())}inject(d,p,A=n.defaultTextMapSetter){return this._getGlobalPropagator().inject(d,p,A)}extract(d,p,A=n.defaultTextMapGetter){return this._getGlobalPropagator().extract(d,p,A)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,t.unregisterGlobal)(o,i.DiagAPI.instance())}_getGlobalPropagator(){return(0,t.getGlobal)(o)||s}}return jh.PropagationAPI=l,jh}var yR;function cde(){if(yR)return Oh;yR=1,Object.defineProperty(Oh,"__esModule",{value:!0}),Oh.propagation=void 0;const t=sde();return Oh.propagation=t.PropagationAPI.getInstance(),Oh}var qh={},zh={},wR;function lde(){if(wR)return zh;wR=1,Object.defineProperty(zh,"__esModule",{value:!0}),zh.TraceAPI=void 0;const t=Ng(),e=jq(),n=t4(),a=$q(),r=Rg(),i="trace";class o{constructor(){this._proxyTracerProvider=new e.ProxyTracerProvider,this.wrapSpanContext=n.wrapSpanContext,this.isSpanContextValid=n.isSpanContextValid,this.deleteSpan=a.deleteSpan,this.getSpan=a.getSpan,this.getActiveSpan=a.getActiveSpan,this.getSpanContext=a.getSpanContext,this.setSpan=a.setSpan,this.setSpanContext=a.setSpanContext}static getInstance(){return this._instance||(this._instance=new o),this._instance}setGlobalTracerProvider(l){const u=(0,t.registerGlobal)(i,this._proxyTracerProvider,r.DiagAPI.instance());return u&&this._proxyTracerProvider.setDelegate(l),u}getTracerProvider(){return(0,t.getGlobal)(i)||this._proxyTracerProvider}getTracer(l,u){return this.getTracerProvider().getTracer(l,u)}disable(){(0,t.unregisterGlobal)(i,r.DiagAPI.instance()),this._proxyTracerProvider=new e.ProxyTracerProvider}}return zh.TraceAPI=o,zh}var kR;function ude(){if(kR)return qh;kR=1,Object.defineProperty(qh,"__esModule",{value:!0}),qh.trace=void 0;const t=lde();return qh.trace=t.TraceAPI.getInstance(),qh}var vR;function dde(){return vR||(vR=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.trace=t.propagation=t.metrics=t.diag=t.context=t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=t.isValidSpanId=t.isValidTraceId=t.isSpanContextValid=t.createTraceState=t.TraceFlags=t.SpanStatusCode=t.SpanKind=t.SamplingDecision=t.ProxyTracerProvider=t.ProxyTracer=t.defaultTextMapSetter=t.defaultTextMapGetter=t.ValueType=t.createNoopMeter=t.DiagLogLevel=t.DiagConsoleLogger=t.ROOT_CONTEXT=t.createContextKey=t.baggageEntryMetadataFromString=void 0;var e=Lq();Object.defineProperty(t,"baggageEntryMetadataFromString",{enumerable:!0,get:function(){return e.baggageEntryMetadataFromString}});var n=$E();Object.defineProperty(t,"createContextKey",{enumerable:!0,get:function(){return n.createContextKey}}),Object.defineProperty(t,"ROOT_CONTEXT",{enumerable:!0,get:function(){return n.ROOT_CONTEXT}});var a=zue();Object.defineProperty(t,"DiagConsoleLogger",{enumerable:!0,get:function(){return a.DiagConsoleLogger}});var r=JF();Object.defineProperty(t,"DiagLogLevel",{enumerable:!0,get:function(){return r.DiagLogLevel}});var i=Nq();Object.defineProperty(t,"createNoopMeter",{enumerable:!0,get:function(){return i.createNoopMeter}});var o=Uue();Object.defineProperty(t,"ValueType",{enumerable:!0,get:function(){return o.ValueType}});var s=Rq();Object.defineProperty(t,"defaultTextMapGetter",{enumerable:!0,get:function(){return s.defaultTextMapGetter}}),Object.defineProperty(t,"defaultTextMapSetter",{enumerable:!0,get:function(){return s.defaultTextMapSetter}});var l=Oq();Object.defineProperty(t,"ProxyTracer",{enumerable:!0,get:function(){return l.ProxyTracer}});var u=jq();Object.defineProperty(t,"ProxyTracerProvider",{enumerable:!0,get:function(){return u.ProxyTracerProvider}});var d=Wue();Object.defineProperty(t,"SamplingDecision",{enumerable:!0,get:function(){return d.SamplingDecision}});var p=Kue();Object.defineProperty(t,"SpanKind",{enumerable:!0,get:function(){return p.SpanKind}});var A=Zue();Object.defineProperty(t,"SpanStatusCode",{enumerable:!0,get:function(){return A.SpanStatusCode}});var m=Mq();Object.defineProperty(t,"TraceFlags",{enumerable:!0,get:function(){return m.TraceFlags}});var g=Xue();Object.defineProperty(t,"createTraceState",{enumerable:!0,get:function(){return g.createTraceState}});var h=t4();Object.defineProperty(t,"isSpanContextValid",{enumerable:!0,get:function(){return h.isSpanContextValid}}),Object.defineProperty(t,"isValidTraceId",{enumerable:!0,get:function(){return h.isValidTraceId}}),Object.defineProperty(t,"isValidSpanId",{enumerable:!0,get:function(){return h.isValidSpanId}});var f=XF();Object.defineProperty(t,"INVALID_SPANID",{enumerable:!0,get:function(){return f.INVALID_SPANID}}),Object.defineProperty(t,"INVALID_TRACEID",{enumerable:!0,get:function(){return f.INVALID_TRACEID}}),Object.defineProperty(t,"INVALID_SPAN_CONTEXT",{enumerable:!0,get:function(){return f.INVALID_SPAN_CONTEXT}});const b=ede();Object.defineProperty(t,"context",{enumerable:!0,get:function(){return b.context}});const w=tde();Object.defineProperty(t,"diag",{enumerable:!0,get:function(){return w.diag}});const y=rde();Object.defineProperty(t,"metrics",{enumerable:!0,get:function(){return y.metrics}});const v=cde();Object.defineProperty(t,"propagation",{enumerable:!0,get:function(){return v.propagation}});const _=ude();Object.defineProperty(t,"trace",{enumerable:!0,get:function(){return _.trace}}),t.default={context:b.context,diag:w.diag,metrics:y.metrics,propagation:v.propagation,trace:_.trace}})(n1)),n1}var SBt=dde(),_R;(function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.TRACE=1]="TRACE",t[t.TRACE2=2]="TRACE2",t[t.TRACE3=3]="TRACE3",t[t.TRACE4=4]="TRACE4",t[t.DEBUG=5]="DEBUG",t[t.DEBUG2=6]="DEBUG2",t[t.DEBUG3=7]="DEBUG3",t[t.DEBUG4=8]="DEBUG4",t[t.INFO=9]="INFO",t[t.INFO2=10]="INFO2",t[t.INFO3=11]="INFO3",t[t.INFO4=12]="INFO4",t[t.WARN=13]="WARN",t[t.WARN2=14]="WARN2",t[t.WARN3=15]="WARN3",t[t.WARN4=16]="WARN4",t[t.ERROR=17]="ERROR",t[t.ERROR2=18]="ERROR2",t[t.ERROR3=19]="ERROR3",t[t.ERROR4=20]="ERROR4",t[t.FATAL=21]="FATAL",t[t.FATAL2=22]="FATAL2",t[t.FATAL3=23]="FATAL3",t[t.FATAL4=24]="FATAL4"})(_R||(_R={}));var Gq=(function(){function t(){}return t.prototype.emit=function(e){},t})(),pde=new Gq,Ade=(function(){function t(){}return t.prototype.getLogger=function(e,n,a){return new Gq},t})(),qq=new Ade,mde=(function(){function t(e,n,a,r){this._provider=e,this.name=n,this.version=a,this.options=r}return t.prototype.emit=function(e){this._getLogger().emit(e)},t.prototype._getLogger=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):pde},t})(),CR=(function(){function t(){}return t.prototype.getLogger=function(e,n,a){var r;return(r=this.getDelegateLogger(e,n,a))!==null&&r!==void 0?r:new mde(this,e,n,a)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:qq},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateLogger=function(e,n,a){var r;return(r=this._delegate)===null||r===void 0?void 0:r.getLogger(e,n,a)},t})(),gde=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},yk=Symbol.for("io.opentelemetry.js.api.logs"),Uh=gde;function hde(t,e,n){return function(a){return a===t?e:n}}var ER=1,fde=(function(){function t(){this._proxyLoggerProvider=new CR}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalLoggerProvider=function(e){return Uh[yk]?this.getLoggerProvider():(Uh[yk]=hde(ER,e,qq),this._proxyLoggerProvider.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Uh[yk])===null||e===void 0?void 0:e.call(Uh,ER))!==null&&n!==void 0?n:this._proxyLoggerProvider},t.prototype.getLogger=function(e,n,a){return this.getLoggerProvider().getLogger(e,n,a)},t.prototype.disable=function(){delete Uh[yk],this._proxyLoggerProvider=new CR},t})(),TBt=fde.getInstance(),Rn;(function(t){t.assertEqual=r=>{};function e(r){}t.assertIs=e;function n(r){throw new Error}t.assertNever=n,t.arrayToEnum=r=>{const i={};for(const o of r)i[o]=o;return i},t.getValidEnumValues=r=>{const i=t.objectKeys(r).filter(s=>typeof r[r[s]]!="number"),o={};for(const s of i)o[s]=r[s];return t.objectValues(o)},t.objectValues=r=>t.objectKeys(r).map(function(i){return r[i]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const i=[];for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&i.push(o);return i},t.find=(r,i)=>{for(const o of r)if(i(o))return o},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function a(r,i=" | "){return r.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}t.joinValues=a,t.jsonStringifyReplacer=(r,i)=>typeof i=="bigint"?i.toString():i})(Rn||(Rn={}));var xR;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(xR||(xR={}));const Nt=Rn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),El=t=>{switch(typeof t){case"undefined":return Nt.undefined;case"string":return Nt.string;case"number":return Number.isNaN(t)?Nt.nan:Nt.number;case"boolean":return Nt.boolean;case"function":return Nt.function;case"bigint":return Nt.bigint;case"symbol":return Nt.symbol;case"object":return Array.isArray(t)?Nt.array:t===null?Nt.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Nt.promise:typeof Map<"u"&&t instanceof Map?Nt.map:typeof Set<"u"&&t instanceof Set?Nt.set:typeof Date<"u"&&t instanceof Date?Nt.date:Nt.object;default:return Nt.unknown}},gt=Rn.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"]);class Wc extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(i){return i.message},a={_errors:[]},r=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(r);else if(o.code==="invalid_return_type")r(o.returnTypeError);else if(o.code==="invalid_arguments")r(o.argumentsError);else if(o.path.length===0)a._errors.push(n(o));else{let s=a,l=0;for(;l<o.path.length;){const u=o.path[l];l===o.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(n(o))):s[u]=s[u]||{_errors:[]},s=s[u],l++}}};return r(this),a}static assert(e){if(!(e instanceof Wc))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Rn.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},a=[];for(const r of this.issues)if(r.path.length>0){const i=r.path[0];n[i]=n[i]||[],n[i].push(e(r))}else a.push(e(r));return{formErrors:a,fieldErrors:n}}get formErrors(){return this.flatten()}}Wc.create=t=>new Wc(t);const VD=(t,e)=>{let n;switch(t.code){case gt.invalid_type:t.received===Nt.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case gt.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Rn.jsonStringifyReplacer)}`;break;case gt.unrecognized_keys:n=`Unrecognized key(s) in object: ${Rn.joinValues(t.keys,", ")}`;break;case gt.invalid_union:n="Invalid input";break;case gt.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Rn.joinValues(t.options)}`;break;case gt.invalid_enum_value:n=`Invalid enum value. Expected ${Rn.joinValues(t.options)}, received '${t.received}'`;break;case gt.invalid_arguments:n="Invalid function arguments";break;case gt.invalid_return_type:n="Invalid function return type";break;case gt.invalid_date:n="Invalid date";break;case gt.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Rn.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case gt.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case gt.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case gt.custom:n="Invalid input";break;case gt.invalid_intersection_types:n="Intersection results could not be merged";break;case gt.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case gt.not_finite:n="Number must be finite";break;default:n=e.defaultError,Rn.assertNever(t)}return{message:n}};let bde=VD;function yde(){return bde}const wde=t=>{const{data:e,path:n,errorMaps:a,issueData:r}=t,i=[...n,...r.path||[]],o={...r,path:i};if(r.message!==void 0)return{...r,path:i,message:r.message};let s="";const l=a.filter(u=>!!u).slice().reverse();for(const u of l)s=u(o,{data:e,defaultError:s}).message;return{...r,path:i,message:s}};function It(t,e){const n=yde(),a=wde({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===VD?void 0:VD].filter(r=>!!r)});t.common.issues.push(a)}class yi{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const a=[];for(const r of n){if(r.status==="aborted")return an;r.status==="dirty"&&e.dirty(),a.push(r.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,n){const a=[];for(const r of n){const i=await r.key,o=await r.value;a.push({key:i,value:o})}return yi.mergeObjectSync(e,a)}static mergeObjectSync(e,n){const a={};for(const r of n){const{key:i,value:o}=r;if(i.status==="aborted"||o.status==="aborted")return an;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||r.alwaysSet)&&(a[i.value]=o.value)}return{status:e.value,value:a}}}const an=Object.freeze({status:"aborted"}),Df=t=>({status:"dirty",value:t}),Uo=t=>({status:"valid",value:t}),BR=t=>t.status==="aborted",IR=t=>t.status==="dirty",Zm=t=>t.status==="valid",c_=t=>typeof Promise<"u"&&t instanceof Promise;var Pt;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Pt||(Pt={}));class Xs{constructor(e,n,a,r){this._cachedPath=[],this.parent=e,this.data=n,this._path=a,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const DR=(t,e)=>{if(Zm(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Wc(t.common.issues);return this._error=n,this._error}}};function un(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:a,description:r}=t;if(e&&(n||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:r}:{errorMap:(o,s)=>{const{message:l}=t;return o.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??a??s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:l??n??s.defaultError}},description:r}}let xn=class{get description(){return this._def.description}_getType(e){return El(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:El(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new yi,ctx:{common:e.parent.common,data:e.data,parsedType:El(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(c_(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const a=this.safeParse(e,n);if(a.success)return a.data;throw a.error}safeParse(e,n){const a={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:El(e)},r=this._parseSync({data:e,path:a.path,parent:a});return DR(a,r)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:El(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:n});return Zm(a)?{value:a.value}:{issues:n.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(a=>Zm(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(e,n){const a=await this.safeParseAsync(e,n);if(a.success)return a.data;throw a.error}async safeParseAsync(e,n){const a={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:El(e)},r=this._parse({data:e,path:a.path,parent:a}),i=await(c_(r)?r:Promise.resolve(r));return DR(a,i)}refine(e,n){const a=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,i)=>{const o=e(r),s=()=>i.addIssue({code:gt.custom,...a(r)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(e,n){return this._refinement((a,r)=>e(a)?!0:(r.addIssue(typeof n=="function"?n(a,r):n),!1))}_refinement(e){return new Jm({schema:this,typeName:tn.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Pl.create(this,this._def)}nullable(){return Xm.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Vm.create(this)}promise(){return A_.create(this,this._def)}or(e){return d_.create([this,e],this._def)}and(e){return p_.create(this,e,this._def)}transform(e){return new Jm({...un(this._def),schema:this,typeName:tn.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new sQ({...un(this._def),innerType:this,defaultValue:n,typeName:tn.ZodDefault})}brand(){return new zde({typeName:tn.ZodBranded,type:this,...un(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new cQ({...un(this._def),innerType:this,catchValue:n,typeName:tn.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return a4.create(this,e)}readonly(){return lQ.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const kde=/^c[^\s-]{8,}$/i,vde=/^[0-9a-z]+$/,_de=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Cde=/^[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,Ede=/^[a-z0-9_-]{21}$/i,xde=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Bde=/^[-+]?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)?)??$/,Ide=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Dde="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let d1;const Qde=/^(?:(?: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])$/,Sde=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Tde=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Fde=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Lde=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Nde=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,zq="((\\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])))",Rde=new RegExp(`^${zq}$`);function Uq(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function Mde(t){return new RegExp(`^${Uq(t)}$`)}function $de(t){let e=`${zq}T${Uq(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function Pde(t,e){return!!((e==="v4"||!e)&&Qde.test(t)||(e==="v6"||!e)&&Tde.test(t))}function Ode(t,e){if(!xde.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const a=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(a));return!(typeof r!="object"||r===null||"typ"in r&&r?.typ!=="JWT"||!r.alg||e&&r.alg!==e)}catch{return!1}}function jde(t,e){return!!((e==="v4"||!e)&&Sde.test(t)||(e==="v6"||!e)&&Fde.test(t))}let l_=class Qf extends xn{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Nt.string){const i=this._getOrReturnCtx(e);return It(i,{code:gt.invalid_type,expected:Nt.string,received:i.parsedType}),an}const a=new yi;let r;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(r=this._getOrReturnCtx(e,r),It(r,{code:gt.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),a.dirty());else if(i.kind==="max")e.data.length>i.value&&(r=this._getOrReturnCtx(e,r),It(r,{code:gt.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),a.dirty());else if(i.kind==="length"){const o=e.data.length>i.value,s=e.data.length<i.value;(o||s)&&(r=this._getOrReturnCtx(e,r),o?It(r,{code:gt.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&It(r,{code:gt.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),a.dirty())}else if(i.kind==="email")Ide.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"email",code:gt.invalid_string,message:i.message}),a.dirty());else if(i.kind==="emoji")d1||(d1=new RegExp(Dde,"u")),d1.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"emoji",code:gt.invalid_string,message:i.message}),a.dirty());else if(i.kind==="uuid")Cde.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"uuid",code:gt.invalid_string,message:i.message}),a.dirty());else if(i.kind==="nanoid")Ede.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"nanoid",code:gt.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid")kde.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"cuid",code:gt.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid2")vde.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"cuid2",code:gt.invalid_string,message:i.message}),a.dirty());else if(i.kind==="ulid")_de.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"ulid",code:gt.invalid_string,message:i.message}),a.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{r=this._getOrReturnCtx(e,r),It(r,{validation:"url",code:gt.invalid_string,message:i.message}),a.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"regex",code:gt.invalid_string,message:i.message}),a.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(r=this._getOrReturnCtx(e,r),It(r,{code:gt.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),a.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(r=this._getOrReturnCtx(e,r),It(r,{code:gt.invalid_string,validation:{startsWith:i.value},message:i.message}),a.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(r=this._getOrReturnCtx(e,r),It(r,{code:gt.invalid_string,validation:{endsWith:i.value},message:i.message}),a.dirty()):i.kind==="datetime"?$de(i).test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{code:gt.invalid_string,validation:"datetime",message:i.message}),a.dirty()):i.kind==="date"?Rde.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{code:gt.invalid_string,validation:"date",message:i.message}),a.dirty()):i.kind==="time"?Mde(i).test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{code:gt.invalid_string,validation:"time",message:i.message}),a.dirty()):i.kind==="duration"?Bde.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"duration",code:gt.invalid_string,message:i.message}),a.dirty()):i.kind==="ip"?Pde(e.data,i.version)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"ip",code:gt.invalid_string,message:i.message}),a.dirty()):i.kind==="jwt"?Ode(e.data,i.alg)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"jwt",code:gt.invalid_string,message:i.message}),a.dirty()):i.kind==="cidr"?jde(e.data,i.version)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"cidr",code:gt.invalid_string,message:i.message}),a.dirty()):i.kind==="base64"?Lde.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"base64",code:gt.invalid_string,message:i.message}),a.dirty()):i.kind==="base64url"?Nde.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"base64url",code:gt.invalid_string,message:i.message}),a.dirty()):Rn.assertNever(i);return{status:a.value,value:e.data}}_regex(e,n,a){return this.refinement(r=>e.test(r),{validation:n,code:gt.invalid_string,...Pt.errToObj(a)})}_addCheck(e){return new Qf({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Pt.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Pt.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Pt.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Pt.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Pt.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Pt.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Pt.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Pt.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Pt.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Pt.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Pt.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Pt.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Pt.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Pt.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Pt.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Pt.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...Pt.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...Pt.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...Pt.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...Pt.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...Pt.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...Pt.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...Pt.errToObj(n)})}nonempty(e){return this.min(1,Pt.errToObj(e))}trim(){return new Qf({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Qf({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Qf({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};l_.create=t=>new l_({checks:[],typeName:tn.ZodString,coerce:t?.coerce??!1,...un(t)});function Gde(t,e){const n=(t.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,r=n>a?n:a,i=Number.parseInt(t.toFixed(r).replace(".","")),o=Number.parseInt(e.toFixed(r).replace(".",""));return i%o/10**r}let JD=class XD extends xn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Nt.number){const i=this._getOrReturnCtx(e);return It(i,{code:gt.invalid_type,expected:Nt.number,received:i.parsedType}),an}let a;const r=new yi;for(const i of this._def.checks)i.kind==="int"?Rn.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),It(a,{code:gt.invalid_type,expected:"integer",received:"float",message:i.message}),r.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(a=this._getOrReturnCtx(e,a),It(a,{code:gt.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(a=this._getOrReturnCtx(e,a),It(a,{code:gt.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="multipleOf"?Gde(e.data,i.value)!==0&&(a=this._getOrReturnCtx(e,a),It(a,{code:gt.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),It(a,{code:gt.not_finite,message:i.message}),r.dirty()):Rn.assertNever(i);return{status:r.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Pt.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Pt.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Pt.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Pt.toString(n))}setLimit(e,n,a,r){return new XD({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:a,message:Pt.toString(r)}]})}_addCheck(e){return new XD({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Pt.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Pt.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Pt.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Pt.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Pt.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Pt.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:Pt.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Pt.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Pt.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Rn.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(n===null||a.value>n)&&(n=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(n)&&Number.isFinite(e)}};JD.create=t=>new JD({checks:[],typeName:tn.ZodNumber,coerce:t?.coerce||!1,...un(t)});class iy extends xn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Nt.bigint)return this._getInvalidInput(e);let a;const r=new yi;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(a=this._getOrReturnCtx(e,a),It(a,{code:gt.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(a=this._getOrReturnCtx(e,a),It(a,{code:gt.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),It(a,{code:gt.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):Rn.assertNever(i);return{status:r.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return It(n,{code:gt.invalid_type,expected:Nt.bigint,received:n.parsedType}),an}gte(e,n){return this.setLimit("min",e,!0,Pt.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Pt.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Pt.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Pt.toString(n))}setLimit(e,n,a,r){return new iy({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:a,message:Pt.toString(r)}]})}_addCheck(e){return new iy({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Pt.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Pt.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Pt.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Pt.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Pt.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}iy.create=t=>new iy({checks:[],typeName:tn.ZodBigInt,coerce:t?.coerce??!1,...un(t)});let eQ=class extends xn{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Nt.boolean){const a=this._getOrReturnCtx(e);return It(a,{code:gt.invalid_type,expected:Nt.boolean,received:a.parsedType}),an}return Uo(e.data)}};eQ.create=t=>new eQ({typeName:tn.ZodBoolean,coerce:t?.coerce||!1,...un(t)});class u_ extends xn{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Nt.date){const i=this._getOrReturnCtx(e);return It(i,{code:gt.invalid_type,expected:Nt.date,received:i.parsedType}),an}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return It(i,{code:gt.invalid_date}),an}const a=new yi;let r;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(r=this._getOrReturnCtx(e,r),It(r,{code:gt.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),a.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(r=this._getOrReturnCtx(e,r),It(r,{code:gt.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),a.dirty()):Rn.assertNever(i);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new u_({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:Pt.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:Pt.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}u_.create=t=>new u_({checks:[],coerce:t?.coerce||!1,typeName:tn.ZodDate,...un(t)});class QR extends xn{_parse(e){if(this._getType(e)!==Nt.symbol){const a=this._getOrReturnCtx(e);return It(a,{code:gt.invalid_type,expected:Nt.symbol,received:a.parsedType}),an}return Uo(e.data)}}QR.create=t=>new QR({typeName:tn.ZodSymbol,...un(t)});class SR extends xn{_parse(e){if(this._getType(e)!==Nt.undefined){const a=this._getOrReturnCtx(e);return It(a,{code:gt.invalid_type,expected:Nt.undefined,received:a.parsedType}),an}return Uo(e.data)}}SR.create=t=>new SR({typeName:tn.ZodUndefined,...un(t)});class tQ extends xn{_parse(e){if(this._getType(e)!==Nt.null){const a=this._getOrReturnCtx(e);return It(a,{code:gt.invalid_type,expected:Nt.null,received:a.parsedType}),an}return Uo(e.data)}}tQ.create=t=>new tQ({typeName:tn.ZodNull,...un(t)});let TR=class extends xn{constructor(){super(...arguments),this._any=!0}_parse(e){return Uo(e.data)}};TR.create=t=>new TR({typeName:tn.ZodAny,...un(t)});let nQ=class extends xn{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Uo(e.data)}};nQ.create=t=>new nQ({typeName:tn.ZodUnknown,...un(t)});let Hl=class extends xn{_parse(e){const n=this._getOrReturnCtx(e);return It(n,{code:gt.invalid_type,expected:Nt.never,received:n.parsedType}),an}};Hl.create=t=>new Hl({typeName:tn.ZodNever,...un(t)});class FR extends xn{_parse(e){if(this._getType(e)!==Nt.undefined){const a=this._getOrReturnCtx(e);return It(a,{code:gt.invalid_type,expected:Nt.void,received:a.parsedType}),an}return Uo(e.data)}}FR.create=t=>new FR({typeName:tn.ZodVoid,...un(t)});let Vm=class Y0 extends xn{_parse(e){const{ctx:n,status:a}=this._processInputParams(e),r=this._def;if(n.parsedType!==Nt.array)return It(n,{code:gt.invalid_type,expected:Nt.array,received:n.parsedType}),an;if(r.exactLength!==null){const o=n.data.length>r.exactLength.value,s=n.data.length<r.exactLength.value;(o||s)&&(It(n,{code:o?gt.too_big:gt.too_small,minimum:s?r.exactLength.value:void 0,maximum:o?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),a.dirty())}if(r.minLength!==null&&n.data.length<r.minLength.value&&(It(n,{code:gt.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),a.dirty()),r.maxLength!==null&&n.data.length>r.maxLength.value&&(It(n,{code:gt.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),a.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>r.type._parseAsync(new Xs(n,o,n.path,s)))).then(o=>yi.mergeArray(a,o));const i=[...n.data].map((o,s)=>r.type._parseSync(new Xs(n,o,n.path,s)));return yi.mergeArray(a,i)}get element(){return this._def.type}min(e,n){return new Y0({...this._def,minLength:{value:e,message:Pt.toString(n)}})}max(e,n){return new Y0({...this._def,maxLength:{value:e,message:Pt.toString(n)}})}length(e,n){return new Y0({...this._def,exactLength:{value:e,message:Pt.toString(n)}})}nonempty(e){return this.min(1,e)}};Vm.create=(t,e)=>new Vm({type:t,minLength:null,maxLength:null,exactLength:null,typeName:tn.ZodArray,...un(e)});function lA(t){if(t instanceof Kc){const e={};for(const n in t.shape){const a=t.shape[n];e[n]=Pl.create(lA(a))}return new Kc({...t._def,shape:()=>e})}else return t instanceof Vm?new Vm({...t._def,type:lA(t.element)}):t instanceof Pl?Pl.create(lA(t.unwrap())):t instanceof Xm?Xm.create(lA(t.unwrap())):t instanceof $d?$d.create(t.items.map(e=>lA(e))):t}let Kc=class Zo extends xn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Rn.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==Nt.object){const u=this._getOrReturnCtx(e);return It(u,{code:gt.invalid_type,expected:Nt.object,received:u.parsedType}),an}const{status:a,ctx:r}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Hl&&this._def.unknownKeys==="strip"))for(const u in r.data)o.includes(u)||s.push(u);const l=[];for(const u of o){const d=i[u],p=r.data[u];l.push({key:{status:"valid",value:u},value:d._parse(new Xs(r,p,r.path,u)),alwaysSet:u in r.data})}if(this._def.catchall instanceof Hl){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of s)l.push({key:{status:"valid",value:d},value:{status:"valid",value:r.data[d]}});else if(u==="strict")s.length>0&&(It(r,{code:gt.unrecognized_keys,keys:s}),a.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of s){const p=r.data[d];l.push({key:{status:"valid",value:d},value:u._parse(new Xs(r,p,r.path,d)),alwaysSet:d in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of l){const p=await d.key,A=await d.value;u.push({key:p,value:A,alwaysSet:d.alwaysSet})}return u}).then(u=>yi.mergeObjectSync(a,u)):yi.mergeObjectSync(a,l)}get shape(){return this._def.shape()}strict(e){return Pt.errToObj,new Zo({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,a)=>{const r=this._def.errorMap?.(n,a).message??a.defaultError;return n.code==="unrecognized_keys"?{message:Pt.errToObj(e).message??r}:{message:r}}}:{}})}strip(){return new Zo({...this._def,unknownKeys:"strip"})}passthrough(){return new Zo({...this._def,unknownKeys:"passthrough"})}extend(e){return new Zo({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Zo({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:tn.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Zo({...this._def,catchall:e})}pick(e){const n={};for(const a of Rn.objectKeys(e))e[a]&&this.shape[a]&&(n[a]=this.shape[a]);return new Zo({...this._def,shape:()=>n})}omit(e){const n={};for(const a of Rn.objectKeys(this.shape))e[a]||(n[a]=this.shape[a]);return new Zo({...this._def,shape:()=>n})}deepPartial(){return lA(this)}partial(e){const n={};for(const a of Rn.objectKeys(this.shape)){const r=this.shape[a];e&&!e[a]?n[a]=r:n[a]=r.optional()}return new Zo({...this._def,shape:()=>n})}required(e){const n={};for(const a of Rn.objectKeys(this.shape))if(e&&!e[a])n[a]=this.shape[a];else{let i=this.shape[a];for(;i instanceof Pl;)i=i._def.innerType;n[a]=i}return new Zo({...this._def,shape:()=>n})}keyof(){return Hq(Rn.objectKeys(this.shape))}};Kc.create=(t,e)=>new Kc({shape:()=>t,unknownKeys:"strip",catchall:Hl.create(),typeName:tn.ZodObject,...un(e)});Kc.strictCreate=(t,e)=>new Kc({shape:()=>t,unknownKeys:"strict",catchall:Hl.create(),typeName:tn.ZodObject,...un(e)});Kc.lazycreate=(t,e)=>new Kc({shape:t,unknownKeys:"strip",catchall:Hl.create(),typeName:tn.ZodObject,...un(e)});let d_=class extends xn{_parse(e){const{ctx:n}=this._processInputParams(e),a=this._def.options;function r(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=i.map(s=>new Wc(s.ctx.common.issues));return It(n,{code:gt.invalid_union,unionErrors:o}),an}if(n.common.async)return Promise.all(a.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(r);{let i;const o=[];for(const l of a){const u={...n,common:{...n.common,issues:[]},parent:null},d=l._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=o.map(l=>new Wc(l));return It(n,{code:gt.invalid_union,unionErrors:s}),an}}get options(){return this._def.options}};d_.create=(t,e)=>new d_({options:t,typeName:tn.ZodUnion,...un(e)});function aQ(t,e){const n=El(t),a=El(e);if(t===e)return{valid:!0,data:t};if(n===Nt.object&&a===Nt.object){const r=Rn.objectKeys(e),i=Rn.objectKeys(t).filter(s=>r.indexOf(s)!==-1),o={...t,...e};for(const s of i){const l=aQ(t[s],e[s]);if(!l.valid)return{valid:!1};o[s]=l.data}return{valid:!0,data:o}}else if(n===Nt.array&&a===Nt.array){if(t.length!==e.length)return{valid:!1};const r=[];for(let i=0;i<t.length;i++){const o=t[i],s=e[i],l=aQ(o,s);if(!l.valid)return{valid:!1};r.push(l.data)}return{valid:!0,data:r}}else return n===Nt.date&&a===Nt.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}let p_=class extends xn{_parse(e){const{status:n,ctx:a}=this._processInputParams(e),r=(i,o)=>{if(BR(i)||BR(o))return an;const s=aQ(i.value,o.value);return s.valid?((IR(i)||IR(o))&&n.dirty(),{status:n.value,value:s.data}):(It(a,{code:gt.invalid_intersection_types}),an)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([i,o])=>r(i,o)):r(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}};p_.create=(t,e,n)=>new p_({left:t,right:e,typeName:tn.ZodIntersection,...un(n)});class $d extends xn{_parse(e){const{status:n,ctx:a}=this._processInputParams(e);if(a.parsedType!==Nt.array)return It(a,{code:gt.invalid_type,expected:Nt.array,received:a.parsedType}),an;if(a.data.length<this._def.items.length)return It(a,{code:gt.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),an;!this._def.rest&&a.data.length>this._def.items.length&&(It(a,{code:gt.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...a.data].map((o,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Xs(a,o,a.path,s)):null}).filter(o=>!!o);return a.common.async?Promise.all(i).then(o=>yi.mergeArray(n,o)):yi.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new $d({...this._def,rest:e})}}$d.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new $d({items:t,typeName:tn.ZodTuple,rest:null,...un(e)})};let qde=class rQ extends xn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:a}=this._processInputParams(e);if(a.parsedType!==Nt.object)return It(a,{code:gt.invalid_type,expected:Nt.object,received:a.parsedType}),an;const r=[],i=this._def.keyType,o=this._def.valueType;for(const s in a.data)r.push({key:i._parse(new Xs(a,s,a.path,s)),value:o._parse(new Xs(a,a.data[s],a.path,s)),alwaysSet:s in a.data});return a.common.async?yi.mergeObjectAsync(n,r):yi.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(e,n,a){return n instanceof xn?new rQ({keyType:e,valueType:n,typeName:tn.ZodRecord,...un(a)}):new rQ({keyType:l_.create(),valueType:e,typeName:tn.ZodRecord,...un(n)})}};class LR extends xn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:a}=this._processInputParams(e);if(a.parsedType!==Nt.map)return It(a,{code:gt.invalid_type,expected:Nt.map,received:a.parsedType}),an;const r=this._def.keyType,i=this._def.valueType,o=[...a.data.entries()].map(([s,l],u)=>({key:r._parse(new Xs(a,s,a.path,[u,"key"])),value:i._parse(new Xs(a,l,a.path,[u,"value"]))}));if(a.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,d=await l.value;if(u.status==="aborted"||d.status==="aborted")return an;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),s.set(u.value,d.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of o){const u=l.key,d=l.value;if(u.status==="aborted"||d.status==="aborted")return an;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),s.set(u.value,d.value)}return{status:n.value,value:s}}}}LR.create=(t,e,n)=>new LR({valueType:e,keyType:t,typeName:tn.ZodMap,...un(n)});class oy extends xn{_parse(e){const{status:n,ctx:a}=this._processInputParams(e);if(a.parsedType!==Nt.set)return It(a,{code:gt.invalid_type,expected:Nt.set,received:a.parsedType}),an;const r=this._def;r.minSize!==null&&a.data.size<r.minSize.value&&(It(a,{code:gt.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()),r.maxSize!==null&&a.data.size>r.maxSize.value&&(It(a,{code:gt.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty());const i=this._def.valueType;function o(l){const u=new Set;for(const d of l){if(d.status==="aborted")return an;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const s=[...a.data.values()].map((l,u)=>i._parse(new Xs(a,l,a.path,u)));return a.common.async?Promise.all(s).then(l=>o(l)):o(s)}min(e,n){return new oy({...this._def,minSize:{value:e,message:Pt.toString(n)}})}max(e,n){return new oy({...this._def,maxSize:{value:e,message:Pt.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}oy.create=(t,e)=>new oy({valueType:t,minSize:null,maxSize:null,typeName:tn.ZodSet,...un(e)});class NR extends xn{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}NR.create=(t,e)=>new NR({getter:t,typeName:tn.ZodLazy,...un(e)});let iQ=class extends xn{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return It(n,{received:n.data,code:gt.invalid_literal,expected:this._def.value}),an}return{status:"valid",value:e.data}}get value(){return this._def.value}};iQ.create=(t,e)=>new iQ({value:t,typeName:tn.ZodLiteral,...un(e)});function Hq(t,e){return new n4({values:t,typeName:tn.ZodEnum,...un(e)})}let n4=class oQ extends xn{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),a=this._def.values;return It(n,{expected:Rn.joinValues(a),received:n.parsedType,code:gt.invalid_type}),an}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),a=this._def.values;return It(n,{received:n.data,code:gt.invalid_enum_value,options:a}),an}return Uo(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return oQ.create(e,{...this._def,...n})}exclude(e,n=this._def){return oQ.create(this.options.filter(a=>!e.includes(a)),{...this._def,...n})}};n4.create=Hq;class RR extends xn{_parse(e){const n=Rn.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==Nt.string&&a.parsedType!==Nt.number){const r=Rn.objectValues(n);return It(a,{expected:Rn.joinValues(r),received:a.parsedType,code:gt.invalid_type}),an}if(this._cache||(this._cache=new Set(Rn.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const r=Rn.objectValues(n);return It(a,{received:a.data,code:gt.invalid_enum_value,options:r}),an}return Uo(e.data)}get enum(){return this._def.values}}RR.create=(t,e)=>new RR({values:t,typeName:tn.ZodNativeEnum,...un(e)});class A_ extends xn{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Nt.promise&&n.common.async===!1)return It(n,{code:gt.invalid_type,expected:Nt.promise,received:n.parsedType}),an;const a=n.parsedType===Nt.promise?n.data:Promise.resolve(n.data);return Uo(a.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}}A_.create=(t,e)=>new A_({type:t,typeName:tn.ZodPromise,...un(e)});class Jm extends xn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===tn.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:a}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:o=>{It(a,o),o.fatal?n.abort():n.dirty()},get path(){return a.path}};if(i.addIssue=i.addIssue.bind(i),r.type==="preprocess"){const o=r.transform(a.data,i);if(a.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return an;const l=await this._def.schema._parseAsync({data:s,path:a.path,parent:a});return l.status==="aborted"?an:l.status==="dirty"||n.value==="dirty"?Df(l.value):l});{if(n.value==="aborted")return an;const s=this._def.schema._parseSync({data:o,path:a.path,parent:a});return s.status==="aborted"?an:s.status==="dirty"||n.value==="dirty"?Df(s.value):s}}if(r.type==="refinement"){const o=s=>{const l=r.refinement(s,i);if(a.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(a.common.async===!1){const s=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return s.status==="aborted"?an:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(s=>s.status==="aborted"?an:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(r.type==="transform")if(a.common.async===!1){const o=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Zm(o))return an;const s=r.transform(o.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(o=>Zm(o)?Promise.resolve(r.transform(o.value,i)).then(s=>({status:n.value,value:s})):an);Rn.assertNever(r)}}Jm.create=(t,e,n)=>new Jm({schema:t,typeName:tn.ZodEffects,effect:e,...un(n)});Jm.createWithPreprocess=(t,e,n)=>new Jm({schema:e,effect:{type:"preprocess",transform:t},typeName:tn.ZodEffects,...un(n)});let Pl=class extends xn{_parse(e){return this._getType(e)===Nt.undefined?Uo(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Pl.create=(t,e)=>new Pl({innerType:t,typeName:tn.ZodOptional,...un(e)});let Xm=class extends xn{_parse(e){return this._getType(e)===Nt.null?Uo(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Xm.create=(t,e)=>new Xm({innerType:t,typeName:tn.ZodNullable,...un(e)});let sQ=class extends xn{_parse(e){const{ctx:n}=this._processInputParams(e);let a=n.data;return n.parsedType===Nt.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};sQ.create=(t,e)=>new sQ({innerType:t,typeName:tn.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...un(e)});let cQ=class extends xn{_parse(e){const{ctx:n}=this._processInputParams(e),a={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return c_(r)?r.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Wc(a.common.issues)},input:a.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Wc(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}};cQ.create=(t,e)=>new cQ({innerType:t,typeName:tn.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...un(e)});class MR extends xn{_parse(e){if(this._getType(e)!==Nt.nan){const a=this._getOrReturnCtx(e);return It(a,{code:gt.invalid_type,expected:Nt.nan,received:a.parsedType}),an}return{status:"valid",value:e.data}}}MR.create=t=>new MR({typeName:tn.ZodNaN,...un(t)});class zde extends xn{_parse(e){const{ctx:n}=this._processInputParams(e),a=n.data;return this._def.type._parse({data:a,path:n.path,parent:n})}unwrap(){return this._def.type}}class a4 extends xn{_parse(e){const{status:n,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return i.status==="aborted"?an:i.status==="dirty"?(n.dirty(),Df(i.value)):this._def.out._parseAsync({data:i.value,path:a.path,parent:a})})();{const r=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return r.status==="aborted"?an:r.status==="dirty"?(n.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:a.path,parent:a})}}static create(e,n){return new a4({in:e,out:n,typeName:tn.ZodPipeline})}}let lQ=class extends xn{_parse(e){const n=this._def.innerType._parse(e),a=r=>(Zm(r)&&(r.value=Object.freeze(r.value)),r);return c_(n)?n.then(r=>a(r)):a(n)}unwrap(){return this._def.innerType}};lQ.create=(t,e)=>new lQ({innerType:t,typeName:tn.ZodReadonly,...un(e)});var tn;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(tn||(tn={}));const HBt=l_.create,YBt=JD.create,WBt=eQ.create,KBt=tQ.create,ZBt=nQ.create;Hl.create;const VBt=Vm.create,JBt=Kc.create,XBt=d_.create;p_.create;$d.create;const e1t=qde.create,t1t=iQ.create;n4.create;A_.create;Pl.create;Xm.create;function Xe(t,e,n){function a(s,l){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:l,constr:o,traits:new Set},enumerable:!1}),s._zod.traits.has(t))return;s._zod.traits.add(t),e(s,l);const u=o.prototype,d=Object.keys(u);for(let p=0;p<d.length;p++){const A=d[p];A in s||(s[A]=u[A].bind(s))}}const r=n?.Parent??Object;class i extends r{}Object.defineProperty(i,"name",{value:t});function o(s){var l;const u=n?.Parent?new i:this;a(u,s),(l=u._zod).deferred??(l.deferred=[]);for(const d of u._zod.deferred)d();return u}return Object.defineProperty(o,"init",{value:a}),Object.defineProperty(o,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(t)}),Object.defineProperty(o,"name",{value:t}),o}class TA extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Yq extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const Wq={};function Yl(t){return Wq}function Ude(t){const e=Object.values(t).filter(a=>typeof a=="number");return Object.entries(t).filter(([a,r])=>e.indexOf(+a)===-1).map(([a,r])=>r)}function uQ(t,e){return typeof e=="bigint"?e.toString():e}function OE(t){return{get value(){{const e=t();return Object.defineProperty(this,"value",{value:e}),e}}}}function r4(t){return t==null}function i4(t){const e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function Hde(t,e){const n=(t.toString().split(".")[1]||"").length,a=e.toString();let r=(a.split(".")[1]||"").length;if(r===0&&/\d?e-\d?/.test(a)){const l=a.match(/\d?e-(\d?)/);l?.[1]&&(r=Number.parseInt(l[1]))}const i=n>r?n:r,o=Number.parseInt(t.toFixed(i).replace(".","")),s=Number.parseInt(e.toFixed(i).replace(".",""));return o%s/10**i}const $R=Symbol("evaluating");function Xn(t,e,n){let a;Object.defineProperty(t,e,{get(){if(a!==$R)return a===void 0&&(a=$R,a=n()),a},set(r){Object.defineProperty(t,e,{value:r})},configurable:!0})}function Ap(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function mp(...t){const e={};for(const n of t){const a=Object.getOwnPropertyDescriptors(n);Object.assign(e,a)}return Object.defineProperties({},e)}function PR(t){return JSON.stringify(t)}function Yde(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Kq="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function sy(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const Wde=OE(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function eg(t){if(sy(t)===!1)return!1;const e=t.constructor;if(e===void 0||typeof e!="function")return!0;const n=e.prototype;return!(sy(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Zq(t){return eg(t)?{...t}:Array.isArray(t)?[...t]:t}const Kde=new Set(["string","number","symbol"]);function tg(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fu(t,e,n){const a=new t._zod.constr(e??t._zod.def);return(!e||n?.parent)&&(a._zod.parent=t),a}function zt(t){const e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function Zde(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}const Vde={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]};function Jde(t,e){const n=t._zod.def,a=mp(t._zod.def,{get shape(){const r={};for(const i in e){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);e[i]&&(r[i]=n.shape[i])}return Ap(this,"shape",r),r},checks:[]});return fu(t,a)}function Xde(t,e){const n=t._zod.def,a=mp(t._zod.def,{get shape(){const r={...t._zod.def.shape};for(const i in e){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);e[i]&&delete r[i]}return Ap(this,"shape",r),r},checks:[]});return fu(t,a)}function epe(t,e){if(!eg(e))throw new Error("Invalid input to extend: expected a plain object");const n=t._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const r=mp(t._zod.def,{get shape(){const i={...t._zod.def.shape,...e};return Ap(this,"shape",i),i},checks:[]});return fu(t,r)}function tpe(t,e){if(!eg(e))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...t._zod.def,get shape(){const a={...t._zod.def.shape,...e};return Ap(this,"shape",a),a},checks:t._zod.def.checks};return fu(t,n)}function npe(t,e){const n=mp(t._zod.def,{get shape(){const a={...t._zod.def.shape,...e._zod.def.shape};return Ap(this,"shape",a),a},get catchall(){return e._zod.def.catchall},checks:[]});return fu(t,n)}function ape(t,e,n){const a=mp(e._zod.def,{get shape(){const r=e._zod.def.shape,i={...r};if(n)for(const o in n){if(!(o in r))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(i[o]=t?new t({type:"optional",innerType:r[o]}):r[o])}else for(const o in r)i[o]=t?new t({type:"optional",innerType:r[o]}):r[o];return Ap(this,"shape",i),i},checks:[]});return fu(e,a)}function rpe(t,e,n){const a=mp(e._zod.def,{get shape(){const r=e._zod.def.shape,i={...r};if(n)for(const o in n){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(i[o]=new t({type:"nonoptional",innerType:r[o]}))}else for(const o in r)i[o]=new t({type:"nonoptional",innerType:r[o]});return Ap(this,"shape",i),i},checks:[]});return fu(e,a)}function yA(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue!==!0)return!0;return!1}function wA(t,e){return e.map(n=>{var a;return(a=n).path??(a.path=[]),n.path.unshift(t),n})}function wk(t){return typeof t=="string"?t:t?.message}function Wl(t,e,n){const a={...t,path:t.path??[]};if(!t.message){const r=wk(t.inst?._zod.def?.error?.(t))??wk(e?.error?.(t))??wk(n.customError?.(t))??wk(n.localeError?.(t))??"Invalid input";a.message=r}return delete a.inst,delete a.continue,e?.reportInput||delete a.input,a}function o4(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function cy(...t){const[e,n,a]=t;return typeof e=="string"?{message:e,code:"custom",input:n,inst:a}:{...e}}const Vq=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,uQ,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Jq=Xe("$ZodError",Vq),Xq=Xe("$ZodError",Vq,{Parent:Error});function ipe(t,e=n=>n.message){const n={},a=[];for(const r of t.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(e(r))):a.push(e(r));return{formErrors:a,fieldErrors:n}}function ope(t,e=n=>n.message){const n={_errors:[]},a=r=>{for(const i of r.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(o=>a({issues:o}));else if(i.code==="invalid_key")a({issues:i.issues});else if(i.code==="invalid_element")a({issues:i.issues});else if(i.path.length===0)n._errors.push(e(i));else{let o=n,s=0;for(;s<i.path.length;){const l=i.path[s];s===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(e(i))):o[l]=o[l]||{_errors:[]},o=o[l],s++}}};return a(t),n}const s4=t=>(e,n,a,r)=>{const i=a?Object.assign(a,{async:!1}):{async:!1},o=e._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new TA;if(o.issues.length){const s=new(r?.Err??t)(o.issues.map(l=>Wl(l,i,Yl())));throw Kq(s,r?.callee),s}return o.value},c4=t=>async(e,n,a,r)=>{const i=a?Object.assign(a,{async:!0}):{async:!0};let o=e._zod.run({value:n,issues:[]},i);if(o instanceof Promise&&(o=await o),o.issues.length){const s=new(r?.Err??t)(o.issues.map(l=>Wl(l,i,Yl())));throw Kq(s,r?.callee),s}return o.value},jE=t=>(e,n,a)=>{const r=a?{...a,async:!1}:{async:!1},i=e._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new TA;return i.issues.length?{success:!1,error:new(t??Jq)(i.issues.map(o=>Wl(o,r,Yl())))}:{success:!0,data:i.value}},spe=jE(Xq),GE=t=>async(e,n,a)=>{const r=a?Object.assign(a,{async:!0}):{async:!0};let i=e._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new t(i.issues.map(o=>Wl(o,r,Yl())))}:{success:!0,data:i.value}},cpe=GE(Xq),lpe=t=>(e,n,a)=>{const r=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return s4(t)(e,n,r)},upe=t=>(e,n,a)=>s4(t)(e,n,a),dpe=t=>async(e,n,a)=>{const r=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return c4(t)(e,n,r)},ppe=t=>async(e,n,a)=>c4(t)(e,n,a),Ape=t=>(e,n,a)=>{const r=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return jE(t)(e,n,r)},mpe=t=>(e,n,a)=>jE(t)(e,n,a),gpe=t=>async(e,n,a)=>{const r=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return GE(t)(e,n,r)},hpe=t=>async(e,n,a)=>GE(t)(e,n,a),fpe=/^[cC][^\s-]{8,}$/,bpe=/^[0-9a-z]+$/,ype=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,wpe=/^[0-9a-vA-V]{20}$/,kpe=/^[A-Za-z0-9]{27}$/,vpe=/^[a-zA-Z0-9_-]{21}$/,_pe=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Cpe=/^([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})$/,OR=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[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)$/,Epe=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,xpe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Bpe(){return new RegExp(xpe,"u")}const Ipe=/^(?:(?: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])$/,Dpe=/^(([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}|:))$/,Qpe=/^((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])$/,Spe=/^(([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])$/,Tpe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ez=/^[A-Za-z0-9_-]*$/,Fpe=/^\+(?:[0-9]){6,14}[0-9]$/,tz="(?:(?:\\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])))",Lpe=new RegExp(`^${tz}$`);function nz(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Npe(t){return new RegExp(`^${nz(t)}$`)}function Rpe(t){const e=nz({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const a=`${e}(?:${n.join("|")})`;return new RegExp(`^${tz}T(?:${a})$`)}const Mpe=t=>{const e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},$pe=/^-?\d+$/,Ppe=/^-?\d+(?:\.\d+)?/,Ope=/^(?:true|false)$/i,jpe=/^[^A-Z]*$/,Gpe=/^[^a-z]*$/,Ui=Xe("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),az={number:"number",bigint:"bigint",object:"date"},rz=Xe("$ZodCheckLessThan",(t,e)=>{Ui.init(t,e);const n=az[typeof e.value];t._zod.onattach.push(a=>{const r=a._zod.bag,i=(e.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<i&&(e.inclusive?r.maximum=e.value:r.exclusiveMaximum=e.value)}),t._zod.check=a=>{(e.inclusive?a.value<=e.value:a.value<e.value)||a.issues.push({origin:n,code:"too_big",maximum:e.value,input:a.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),iz=Xe("$ZodCheckGreaterThan",(t,e)=>{Ui.init(t,e);const n=az[typeof e.value];t._zod.onattach.push(a=>{const r=a._zod.bag,i=(e.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>i&&(e.inclusive?r.minimum=e.value:r.exclusiveMinimum=e.value)}),t._zod.check=a=>{(e.inclusive?a.value>=e.value:a.value>e.value)||a.issues.push({origin:n,code:"too_small",minimum:e.value,input:a.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),qpe=Xe("$ZodCheckMultipleOf",(t,e)=>{Ui.init(t,e),t._zod.onattach.push(n=>{var a;(a=n._zod.bag).multipleOf??(a.multipleOf=e.value)}),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%e.value===BigInt(0):Hde(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),zpe=Xe("$ZodCheckNumberFormat",(t,e)=>{Ui.init(t,e),e.format=e.format||"float64";const n=e.format?.includes("int"),a=n?"int":"number",[r,i]=Vde[e.format];t._zod.onattach.push(o=>{const s=o._zod.bag;s.format=e.format,s.minimum=r,s.maximum=i,n&&(s.pattern=$pe)}),t._zod.check=o=>{const s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:a,format:e.format,code:"invalid_type",continue:!1,input:s,inst:t});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:a,continue:!e.abort}):o.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:a,continue:!e.abort});return}}s<r&&o.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),s>i&&o.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inst:t})}}),Upe=Xe("$ZodCheckMaxLength",(t,e)=>{var n;Ui.init(t,e),(n=t._zod.def).when??(n.when=a=>{const r=a.value;return!r4(r)&&r.length!==void 0}),t._zod.onattach.push(a=>{const r=a._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<r&&(a._zod.bag.maximum=e.maximum)}),t._zod.check=a=>{const r=a.value;if(r.length<=e.maximum)return;const o=o4(r);a.issues.push({origin:o,code:"too_big",maximum:e.maximum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),Hpe=Xe("$ZodCheckMinLength",(t,e)=>{var n;Ui.init(t,e),(n=t._zod.def).when??(n.when=a=>{const r=a.value;return!r4(r)&&r.length!==void 0}),t._zod.onattach.push(a=>{const r=a._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>r&&(a._zod.bag.minimum=e.minimum)}),t._zod.check=a=>{const r=a.value;if(r.length>=e.minimum)return;const o=o4(r);a.issues.push({origin:o,code:"too_small",minimum:e.minimum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),Ype=Xe("$ZodCheckLengthEquals",(t,e)=>{var n;Ui.init(t,e),(n=t._zod.def).when??(n.when=a=>{const r=a.value;return!r4(r)&&r.length!==void 0}),t._zod.onattach.push(a=>{const r=a._zod.bag;r.minimum=e.length,r.maximum=e.length,r.length=e.length}),t._zod.check=a=>{const r=a.value,i=r.length;if(i===e.length)return;const o=o4(r),s=i>e.length;a.issues.push({origin:o,...s?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:a.value,inst:t,continue:!e.abort})}}),qE=Xe("$ZodCheckStringFormat",(t,e)=>{var n,a;Ui.init(t,e),t._zod.onattach.push(r=>{const i=r._zod.bag;i.format=e.format,e.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(e.pattern))}),e.pattern?(n=t._zod).check??(n.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:e.format,input:r.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(a=t._zod).check??(a.check=()=>{})}),Wpe=Xe("$ZodCheckRegex",(t,e)=>{qE.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Kpe=Xe("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=jpe),qE.init(t,e)}),Zpe=Xe("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Gpe),qE.init(t,e)}),Vpe=Xe("$ZodCheckIncludes",(t,e)=>{Ui.init(t,e);const n=tg(e.includes),a=new RegExp(typeof e.position=="number"?`^.{${e.position}}${n}`:n);e.pattern=a,t._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(a)}),t._zod.check=r=>{r.value.includes(e.includes,e.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:r.value,inst:t,continue:!e.abort})}}),Jpe=Xe("$ZodCheckStartsWith",(t,e)=>{Ui.init(t,e);const n=new RegExp(`^${tg(e.prefix)}.*`);e.pattern??(e.pattern=n),t._zod.onattach.push(a=>{const r=a._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),t._zod.check=a=>{a.value.startsWith(e.prefix)||a.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:a.value,inst:t,continue:!e.abort})}}),Xpe=Xe("$ZodCheckEndsWith",(t,e)=>{Ui.init(t,e);const n=new RegExp(`.*${tg(e.suffix)}$`);e.pattern??(e.pattern=n),t._zod.onattach.push(a=>{const r=a._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),t._zod.check=a=>{a.value.endsWith(e.suffix)||a.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:a.value,inst:t,continue:!e.abort})}}),eAe=Xe("$ZodCheckOverwrite",(t,e)=>{Ui.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}});class tAe{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const a=e.split(`
2
+ import{e as IN,b as ft,c as fue,r as Te,a as bue,g as yue,f as sc,j as be}from"./react-B42e77sA.js";import{b as KD,c as ZD,t as wue,h as kue,d as vue,e as _ue,f as Cue,g as Eue,u as xue,r as Bue,a as Iue,i as Due}from"./markdown-DxfY7oCC.js";import{D as ME,Z as Que,a as Sue,R as Tue,C as Sq,b as Tq,M as Fue,X as Lue,L as Nue}from"./icons-Bnyv_yj2.js";var e1={exports:{}},t1={};var DN;function Rue(){return DN||(DN=1,(function(t){function e(Q,L){var S=Q.length;Q.push(L);e:for(;0<S;){var M=S-1>>>1,j=Q[M];if(0<r(j,L))Q[M]=L,Q[S]=j,S=M;else break e}}function n(Q){return Q.length===0?null:Q[0]}function a(Q){if(Q.length===0)return null;var L=Q[0],S=Q.pop();if(S!==L){Q[0]=S;e:for(var M=0,j=Q.length,$=j>>>1;M<$;){var G=2*(M+1)-1,q=Q[G],W=G+1,z=Q[W];if(0>r(q,S))W<j&&0>r(z,q)?(Q[M]=z,Q[W]=S,M=W):(Q[M]=q,Q[G]=S,M=G);else if(W<j&&0>r(z,S))Q[M]=z,Q[W]=S,M=W;else break e}}return L}function r(Q,L){var S=Q.sortIndex-L.sortIndex;return S!==0?S:Q.id-L.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}var l=[],u=[],d=1,p=null,A=3,m=!1,g=!1,h=!1,f=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function v(Q){for(var L=n(u);L!==null;){if(L.callback===null)a(u);else if(L.startTime<=Q)a(u),L.sortIndex=L.expirationTime,e(l,L);else break;L=n(u)}}function _(Q){if(h=!1,v(Q),!g)if(n(l)!==null)g=!0,I||(I=!0,N());else{var L=n(u);L!==null&&F(_,L.startTime-Q)}}var I=!1,C=-1,E=5,B=-1;function T(){return f?!0:!(t.unstable_now()-B<E)}function D(){if(f=!1,I){var Q=t.unstable_now();B=Q;var L=!0;try{e:{g=!1,h&&(h=!1,w(C),C=-1),m=!0;var S=A;try{t:{for(v(Q),p=n(l);p!==null&&!(p.expirationTime>Q&&T());){var M=p.callback;if(typeof M=="function"){p.callback=null,A=p.priorityLevel;var j=M(p.expirationTime<=Q);if(Q=t.unstable_now(),typeof j=="function"){p.callback=j,v(Q),L=!0;break t}p===n(l)&&a(l),v(Q)}else a(l);p=n(l)}if(p!==null)L=!0;else{var $=n(u);$!==null&&F(_,$.startTime-Q),L=!1}}break e}finally{p=null,A=S,m=!1}L=void 0}}finally{L?N():I=!1}}}var N;if(typeof y=="function")N=function(){y(D)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,x=R.port2;R.port1.onmessage=D,N=function(){x.postMessage(null)}}else N=function(){b(D,0)};function F(Q,L){C=b(function(){Q(t.unstable_now())},L)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(Q){Q.callback=null},t.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<Q?Math.floor(1e3/Q):5},t.unstable_getCurrentPriorityLevel=function(){return A},t.unstable_next=function(Q){switch(A){case 1:case 2:case 3:var L=3;break;default:L=A}var S=A;A=L;try{return Q()}finally{A=S}},t.unstable_requestPaint=function(){f=!0},t.unstable_runWithPriority=function(Q,L){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var S=A;A=Q;try{return L()}finally{A=S}},t.unstable_scheduleCallback=function(Q,L,S){var M=t.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?M+S:M):S=M,Q){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=S+j,Q={id:d++,callback:L,priorityLevel:Q,startTime:S,expirationTime:j,sortIndex:-1},S>M?(Q.sortIndex=S,e(u,Q),n(l)===null&&Q===n(u)&&(h?(w(C),C=-1):h=!0,F(_,S-M))):(Q.sortIndex=j,e(l,Q),g||m||(g=!0,I||(I=!0,N()))),Q},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(Q){var L=A;return function(){var S=A;A=L;try{return Q.apply(this,arguments)}finally{A=S}}}})(t1)),t1}var QN;function vBt(){return QN||(QN=1,e1.exports=Rue()),e1.exports}var n1={},Ou={},yh={},wh={},fc={},ju={},kh={},SN;function Mue(){return SN||(SN=1,Object.defineProperty(kh,"__esModule",{value:!0}),kh._globalThis=void 0,kh._globalThis=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof IN=="object"?IN:{}),kh}var TN;function $ue(){return TN||(TN=1,(function(t){var e=ju&&ju.__createBinding||(Object.create?(function(a,r,i,o){o===void 0&&(o=i),Object.defineProperty(a,o,{enumerable:!0,get:function(){return r[i]}})}):(function(a,r,i,o){o===void 0&&(o=i),a[o]=r[i]})),n=ju&&ju.__exportStar||function(a,r){for(var i in a)i!=="default"&&!Object.prototype.hasOwnProperty.call(r,i)&&e(r,a,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(Mue(),t)})(ju)),ju}var vh={},FN;function Fq(){return FN||(FN=1,Object.defineProperty(vh,"__esModule",{value:!0}),vh.VERSION=void 0,vh.VERSION="1.9.0"),vh}var Gu={},LN;function Pue(){if(LN)return Gu;LN=1,Object.defineProperty(Gu,"__esModule",{value:!0}),Gu.isCompatible=Gu._makeCompatibilityCheck=void 0;const t=Fq(),e=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function n(a){const r=new Set([a]),i=new Set,o=a.match(e);if(!o)return()=>!1;const s={major:+o[1],minor:+o[2],patch:+o[3],prerelease:o[4]};if(s.prerelease!=null)return function(p){return p===a};function l(d){return i.add(d),!1}function u(d){return r.add(d),!0}return function(p){if(r.has(p))return!0;if(i.has(p))return!1;const A=p.match(e);if(!A)return l(p);const m={major:+A[1],minor:+A[2],patch:+A[3],prerelease:A[4]};return m.prerelease!=null||s.major!==m.major?l(p):s.major===0?s.minor===m.minor&&s.patch<=m.patch?u(p):l(p):s.minor<=m.minor?u(p):l(p)}}return Gu._makeCompatibilityCheck=n,Gu.isCompatible=n(t.VERSION),Gu}var NN;function Ng(){if(NN)return fc;NN=1,Object.defineProperty(fc,"__esModule",{value:!0}),fc.unregisterGlobal=fc.getGlobal=fc.registerGlobal=void 0;const t=$ue(),e=Fq(),n=Pue(),a=e.VERSION.split(".")[0],r=Symbol.for(`opentelemetry.js.api.${a}`),i=t._globalThis;function o(u,d,p,A=!1){var m;const g=i[r]=(m=i[r])!==null&&m!==void 0?m:{version:e.VERSION};if(!A&&g[u]){const h=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${u}`);return p.error(h.stack||h.message),!1}if(g.version!==e.VERSION){const h=new Error(`@opentelemetry/api: Registration of version v${g.version} for ${u} does not match previously registered API v${e.VERSION}`);return p.error(h.stack||h.message),!1}return g[u]=d,p.debug(`@opentelemetry/api: Registered a global for ${u} v${e.VERSION}.`),!0}fc.registerGlobal=o;function s(u){var d,p;const A=(d=i[r])===null||d===void 0?void 0:d.version;if(!(!A||!(0,n.isCompatible)(A)))return(p=i[r])===null||p===void 0?void 0:p[u]}fc.getGlobal=s;function l(u,d){d.debug(`@opentelemetry/api: Unregistering a global for ${u} v${e.VERSION}.`);const p=i[r];p&&delete p[u]}return fc.unregisterGlobal=l,fc}var RN;function Oue(){if(RN)return wh;RN=1,Object.defineProperty(wh,"__esModule",{value:!0}),wh.DiagComponentLogger=void 0;const t=Ng();class e{constructor(r){this._namespace=r.namespace||"DiagComponentLogger"}debug(...r){return n("debug",this._namespace,r)}error(...r){return n("error",this._namespace,r)}info(...r){return n("info",this._namespace,r)}warn(...r){return n("warn",this._namespace,r)}verbose(...r){return n("verbose",this._namespace,r)}}wh.DiagComponentLogger=e;function n(a,r,i){const o=(0,t.getGlobal)("diag");if(o)return i.unshift(r),o[a](...i)}return wh}var _h={},a1={},MN;function JF(){return MN||(MN=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiagLogLevel=void 0,(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"})(t.DiagLogLevel||(t.DiagLogLevel={}))})(a1)),a1}var $N;function jue(){if($N)return _h;$N=1,Object.defineProperty(_h,"__esModule",{value:!0}),_h.createLogLevelDiagLogger=void 0;const t=JF();function e(n,a){n<t.DiagLogLevel.NONE?n=t.DiagLogLevel.NONE:n>t.DiagLogLevel.ALL&&(n=t.DiagLogLevel.ALL),a=a||{};function r(i,o){const s=a[i];return typeof s=="function"&&n>=o?s.bind(a):function(){}}return{error:r("error",t.DiagLogLevel.ERROR),warn:r("warn",t.DiagLogLevel.WARN),info:r("info",t.DiagLogLevel.INFO),debug:r("debug",t.DiagLogLevel.DEBUG),verbose:r("verbose",t.DiagLogLevel.VERBOSE)}}return _h.createLogLevelDiagLogger=e,_h}var PN;function Rg(){if(PN)return yh;PN=1,Object.defineProperty(yh,"__esModule",{value:!0}),yh.DiagAPI=void 0;const t=Oue(),e=jue(),n=JF(),a=Ng(),r="diag";class i{constructor(){function s(d){return function(...p){const A=(0,a.getGlobal)("diag");if(A)return A[d](...p)}}const l=this,u=(d,p={logLevel:n.DiagLogLevel.INFO})=>{var A,m,g;if(d===l){const b=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return l.error((A=b.stack)!==null&&A!==void 0?A:b.message),!1}typeof p=="number"&&(p={logLevel:p});const h=(0,a.getGlobal)("diag"),f=(0,e.createLogLevelDiagLogger)((m=p.logLevel)!==null&&m!==void 0?m:n.DiagLogLevel.INFO,d);if(h&&!p.suppressOverrideMessage){const b=(g=new Error().stack)!==null&&g!==void 0?g:"<failed to generate stacktrace>";h.warn(`Current logger will be overwritten from ${b}`),f.warn(`Current logger will overwrite one already registered from ${b}`)}return(0,a.registerGlobal)("diag",f,l,!0)};l.setLogger=u,l.disable=()=>{(0,a.unregisterGlobal)(r,l)},l.createComponentLogger=d=>new t.DiagComponentLogger(d),l.verbose=s("verbose"),l.debug=s("debug"),l.info=s("info"),l.warn=s("warn"),l.error=s("error")}static instance(){return this._instance||(this._instance=new i),this._instance}}return yh.DiagAPI=i,yh}var Ch={},ON;function Gue(){if(ON)return Ch;ON=1,Object.defineProperty(Ch,"__esModule",{value:!0}),Ch.BaggageImpl=void 0;class t{constructor(n){this._entries=n?new Map(n):new Map}getEntry(n){const a=this._entries.get(n);if(a)return Object.assign({},a)}getAllEntries(){return Array.from(this._entries.entries()).map(([n,a])=>[n,a])}setEntry(n,a){const r=new t(this._entries);return r._entries.set(n,a),r}removeEntry(n){const a=new t(this._entries);return a._entries.delete(n),a}removeEntries(...n){const a=new t(this._entries);for(const r of n)a._entries.delete(r);return a}clear(){return new t}}return Ch.BaggageImpl=t,Ch}var Eh={},jN;function que(){return jN||(jN=1,Object.defineProperty(Eh,"__esModule",{value:!0}),Eh.baggageEntryMetadataSymbol=void 0,Eh.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")),Eh}var GN;function Lq(){if(GN)return Ou;GN=1,Object.defineProperty(Ou,"__esModule",{value:!0}),Ou.baggageEntryMetadataFromString=Ou.createBaggage=void 0;const t=Rg(),e=Gue(),n=que(),a=t.DiagAPI.instance();function r(o={}){return new e.BaggageImpl(new Map(Object.entries(o)))}Ou.createBaggage=r;function i(o){return typeof o!="string"&&(a.error(`Cannot create baggage metadata from unknown type: ${typeof o}`),o=""),{__TYPE__:n.baggageEntryMetadataSymbol,toString(){return o}}}return Ou.baggageEntryMetadataFromString=i,Ou}var qu={},qN;function $E(){if(qN)return qu;qN=1,Object.defineProperty(qu,"__esModule",{value:!0}),qu.ROOT_CONTEXT=qu.createContextKey=void 0;function t(n){return Symbol.for(n)}qu.createContextKey=t;class e{constructor(a){const r=this;r._currentContext=a?new Map(a):new Map,r.getValue=i=>r._currentContext.get(i),r.setValue=(i,o)=>{const s=new e(r._currentContext);return s._currentContext.set(i,o),s},r.deleteValue=i=>{const o=new e(r._currentContext);return o._currentContext.delete(i),o}}}return qu.ROOT_CONTEXT=new e,qu}var xh={},zN;function zue(){if(zN)return xh;zN=1,Object.defineProperty(xh,"__esModule",{value:!0}),xh.DiagConsoleLogger=void 0;const t=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];class e{constructor(){function a(r){return function(...i){if(console){let o=console[r];if(typeof o!="function"&&(o=console.log),typeof o=="function")return o.apply(console,i)}}}for(let r=0;r<t.length;r++)this[t[r].n]=a(t[r].c)}}return xh.DiagConsoleLogger=e,xh}var r1={},UN;function Nq(){return UN||(UN=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createNoopMeter=t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=t.NOOP_OBSERVABLE_GAUGE_METRIC=t.NOOP_OBSERVABLE_COUNTER_METRIC=t.NOOP_UP_DOWN_COUNTER_METRIC=t.NOOP_HISTOGRAM_METRIC=t.NOOP_GAUGE_METRIC=t.NOOP_COUNTER_METRIC=t.NOOP_METER=t.NoopObservableUpDownCounterMetric=t.NoopObservableGaugeMetric=t.NoopObservableCounterMetric=t.NoopObservableMetric=t.NoopHistogramMetric=t.NoopGaugeMetric=t.NoopUpDownCounterMetric=t.NoopCounterMetric=t.NoopMetric=t.NoopMeter=void 0;class e{constructor(){}createGauge(m,g){return t.NOOP_GAUGE_METRIC}createHistogram(m,g){return t.NOOP_HISTOGRAM_METRIC}createCounter(m,g){return t.NOOP_COUNTER_METRIC}createUpDownCounter(m,g){return t.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(m,g){return t.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(m,g){return t.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(m,g){return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(m,g){}removeBatchObservableCallback(m){}}t.NoopMeter=e;class n{}t.NoopMetric=n;class a extends n{add(m,g){}}t.NoopCounterMetric=a;class r extends n{add(m,g){}}t.NoopUpDownCounterMetric=r;class i extends n{record(m,g){}}t.NoopGaugeMetric=i;class o extends n{record(m,g){}}t.NoopHistogramMetric=o;class s{addCallback(m){}removeCallback(m){}}t.NoopObservableMetric=s;class l extends s{}t.NoopObservableCounterMetric=l;class u extends s{}t.NoopObservableGaugeMetric=u;class d extends s{}t.NoopObservableUpDownCounterMetric=d,t.NOOP_METER=new e,t.NOOP_COUNTER_METRIC=new a,t.NOOP_GAUGE_METRIC=new i,t.NOOP_HISTOGRAM_METRIC=new o,t.NOOP_UP_DOWN_COUNTER_METRIC=new r,t.NOOP_OBSERVABLE_COUNTER_METRIC=new l,t.NOOP_OBSERVABLE_GAUGE_METRIC=new u,t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new d;function p(){return t.NOOP_METER}t.createNoopMeter=p})(r1)),r1}var i1={},HN;function Uue(){return HN||(HN=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueType=void 0,(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(t.ValueType||(t.ValueType={}))})(i1)),i1}var zu={},YN;function Rq(){return YN||(YN=1,Object.defineProperty(zu,"__esModule",{value:!0}),zu.defaultTextMapSetter=zu.defaultTextMapGetter=void 0,zu.defaultTextMapGetter={get(t,e){if(t!=null)return t[e]},keys(t){return t==null?[]:Object.keys(t)}},zu.defaultTextMapSetter={set(t,e,n){t!=null&&(t[e]=n)}}),zu}var Bh={},Ih={},Dh={},Qh={},WN;function Hue(){if(WN)return Qh;WN=1,Object.defineProperty(Qh,"__esModule",{value:!0}),Qh.NoopContextManager=void 0;const t=$E();let e=class{active(){return t.ROOT_CONTEXT}with(a,r,i,...o){return r.call(i,...o)}bind(a,r){return r}enable(){return this}disable(){return this}};return Qh.NoopContextManager=e,Qh}var KN;function PE(){if(KN)return Dh;KN=1,Object.defineProperty(Dh,"__esModule",{value:!0}),Dh.ContextAPI=void 0;const t=Hue(),e=Ng(),n=Rg(),a="context",r=new t.NoopContextManager;class i{constructor(){}static getInstance(){return this._instance||(this._instance=new i),this._instance}setGlobalContextManager(s){return(0,e.registerGlobal)(a,s,n.DiagAPI.instance())}active(){return this._getContextManager().active()}with(s,l,u,...d){return this._getContextManager().with(s,l,u,...d)}bind(s,l){return this._getContextManager().bind(s,l)}_getContextManager(){return(0,e.getGlobal)(a)||r}disable(){this._getContextManager().disable(),(0,e.unregisterGlobal)(a,n.DiagAPI.instance())}}return Dh.ContextAPI=i,Dh}var ci={},Sh={},o1={},s1={},ZN;function Mq(){return ZN||(ZN=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TraceFlags=void 0,(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(t.TraceFlags||(t.TraceFlags={}))})(s1)),s1}var VN;function XF(){return VN||(VN=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=void 0;const e=Mq();t.INVALID_SPANID="0000000000000000",t.INVALID_TRACEID="00000000000000000000000000000000",t.INVALID_SPAN_CONTEXT={traceId:t.INVALID_TRACEID,spanId:t.INVALID_SPANID,traceFlags:e.TraceFlags.NONE}})(o1)),o1}var JN;function e4(){if(JN)return Sh;JN=1,Object.defineProperty(Sh,"__esModule",{value:!0}),Sh.NonRecordingSpan=void 0;const t=XF();let e=class{constructor(a=t.INVALID_SPAN_CONTEXT){this._spanContext=a}spanContext(){return this._spanContext}setAttribute(a,r){return this}setAttributes(a){return this}addEvent(a,r){return this}addLink(a){return this}addLinks(a){return this}setStatus(a){return this}updateName(a){return this}end(a){}isRecording(){return!1}recordException(a,r){}};return Sh.NonRecordingSpan=e,Sh}var XN;function $q(){if(XN)return ci;XN=1,Object.defineProperty(ci,"__esModule",{value:!0}),ci.getSpanContext=ci.setSpanContext=ci.deleteSpan=ci.setSpan=ci.getActiveSpan=ci.getSpan=void 0;const t=$E(),e=e4(),n=PE(),a=(0,t.createContextKey)("OpenTelemetry Context Key SPAN");function r(d){return d.getValue(a)||void 0}ci.getSpan=r;function i(){return r(n.ContextAPI.getInstance().active())}ci.getActiveSpan=i;function o(d,p){return d.setValue(a,p)}ci.setSpan=o;function s(d){return d.deleteValue(a)}ci.deleteSpan=s;function l(d,p){return o(d,new e.NonRecordingSpan(p))}ci.setSpanContext=l;function u(d){var p;return(p=r(d))===null||p===void 0?void 0:p.spanContext()}return ci.getSpanContext=u,ci}var Wo={},eR;function t4(){if(eR)return Wo;eR=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.wrapSpanContext=Wo.isSpanContextValid=Wo.isValidSpanId=Wo.isValidTraceId=void 0;const t=XF(),e=e4(),n=/^([0-9a-f]{32})$/i,a=/^[0-9a-f]{16}$/i;function r(l){return n.test(l)&&l!==t.INVALID_TRACEID}Wo.isValidTraceId=r;function i(l){return a.test(l)&&l!==t.INVALID_SPANID}Wo.isValidSpanId=i;function o(l){return r(l.traceId)&&i(l.spanId)}Wo.isSpanContextValid=o;function s(l){return new e.NonRecordingSpan(l)}return Wo.wrapSpanContext=s,Wo}var tR;function Pq(){if(tR)return Ih;tR=1,Object.defineProperty(Ih,"__esModule",{value:!0}),Ih.NoopTracer=void 0;const t=PE(),e=$q(),n=e4(),a=t4(),r=t.ContextAPI.getInstance();let i=class{startSpan(l,u,d=r.active()){if(!!u?.root)return new n.NonRecordingSpan;const A=d&&(0,e.getSpanContext)(d);return o(A)&&(0,a.isSpanContextValid)(A)?new n.NonRecordingSpan(A):new n.NonRecordingSpan}startActiveSpan(l,u,d,p){let A,m,g;if(arguments.length<2)return;arguments.length===2?g=u:arguments.length===3?(A=u,g=d):(A=u,m=d,g=p);const h=m??r.active(),f=this.startSpan(l,A,h),b=(0,e.setSpan)(h,f);return r.with(b,g,void 0,f)}};Ih.NoopTracer=i;function o(s){return typeof s=="object"&&typeof s.spanId=="string"&&typeof s.traceId=="string"&&typeof s.traceFlags=="number"}return Ih}var nR;function Oq(){if(nR)return Bh;nR=1,Object.defineProperty(Bh,"__esModule",{value:!0}),Bh.ProxyTracer=void 0;const t=Pq(),e=new t.NoopTracer;let n=class{constructor(r,i,o,s){this._provider=r,this.name=i,this.version=o,this.options=s}startSpan(r,i,o){return this._getTracer().startSpan(r,i,o)}startActiveSpan(r,i,o,s){const l=this._getTracer();return Reflect.apply(l.startActiveSpan,l,arguments)}_getTracer(){if(this._delegate)return this._delegate;const r=this._provider.getDelegateTracer(this.name,this.version,this.options);return r?(this._delegate=r,this._delegate):e}};return Bh.ProxyTracer=n,Bh}var Th={},Fh={},aR;function Yue(){if(aR)return Fh;aR=1,Object.defineProperty(Fh,"__esModule",{value:!0}),Fh.NoopTracerProvider=void 0;const t=Pq();let e=class{getTracer(a,r,i){return new t.NoopTracer}};return Fh.NoopTracerProvider=e,Fh}var rR;function jq(){if(rR)return Th;rR=1,Object.defineProperty(Th,"__esModule",{value:!0}),Th.ProxyTracerProvider=void 0;const t=Oq(),e=Yue(),n=new e.NoopTracerProvider;let a=class{getTracer(i,o,s){var l;return(l=this.getDelegateTracer(i,o,s))!==null&&l!==void 0?l:new t.ProxyTracer(this,i,o,s)}getDelegate(){var i;return(i=this._delegate)!==null&&i!==void 0?i:n}setDelegate(i){this._delegate=i}getDelegateTracer(i,o,s){var l;return(l=this._delegate)===null||l===void 0?void 0:l.getTracer(i,o,s)}};return Th.ProxyTracerProvider=a,Th}var c1={},iR;function Wue(){return iR||(iR=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SamplingDecision=void 0,(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(t.SamplingDecision||(t.SamplingDecision={}))})(c1)),c1}var l1={},oR;function Kue(){return oR||(oR=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SpanKind=void 0,(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"})(t.SpanKind||(t.SpanKind={}))})(l1)),l1}var u1={},sR;function Zue(){return sR||(sR=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SpanStatusCode=void 0,(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(t.SpanStatusCode||(t.SpanStatusCode={}))})(u1)),u1}var Lh={},Nh={},Uu={},cR;function Vue(){if(cR)return Uu;cR=1,Object.defineProperty(Uu,"__esModule",{value:!0}),Uu.validateValue=Uu.validateKey=void 0;const t="[_0-9a-z-*/]",e=`[a-z]${t}{0,255}`,n=`[a-z0-9]${t}{0,240}@[a-z]${t}{0,13}`,a=new RegExp(`^(?:${e}|${n})$`),r=/^[ -~]{0,255}[!-~]$/,i=/,|=/;function o(l){return a.test(l)}Uu.validateKey=o;function s(l){return r.test(l)&&!i.test(l)}return Uu.validateValue=s,Uu}var lR;function Jue(){if(lR)return Nh;lR=1,Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.TraceStateImpl=void 0;const t=Vue(),e=32,n=512,a=",",r="=";class i{constructor(s){this._internalState=new Map,s&&this._parse(s)}set(s,l){const u=this._clone();return u._internalState.has(s)&&u._internalState.delete(s),u._internalState.set(s,l),u}unset(s){const l=this._clone();return l._internalState.delete(s),l}get(s){return this._internalState.get(s)}serialize(){return this._keys().reduce((s,l)=>(s.push(l+r+this.get(l)),s),[]).join(a)}_parse(s){s.length>n||(this._internalState=s.split(a).reverse().reduce((l,u)=>{const d=u.trim(),p=d.indexOf(r);if(p!==-1){const A=d.slice(0,p),m=d.slice(p+1,u.length);(0,t.validateKey)(A)&&(0,t.validateValue)(m)&&l.set(A,m)}return l},new Map),this._internalState.size>e&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,e))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const s=new i;return s._internalState=new Map(this._internalState),s}}return Nh.TraceStateImpl=i,Nh}var uR;function Xue(){if(uR)return Lh;uR=1,Object.defineProperty(Lh,"__esModule",{value:!0}),Lh.createTraceState=void 0;const t=Jue();function e(n){return new t.TraceStateImpl(n)}return Lh.createTraceState=e,Lh}var Rh={},dR;function ede(){if(dR)return Rh;dR=1,Object.defineProperty(Rh,"__esModule",{value:!0}),Rh.context=void 0;const t=PE();return Rh.context=t.ContextAPI.getInstance(),Rh}var Mh={},pR;function tde(){if(pR)return Mh;pR=1,Object.defineProperty(Mh,"__esModule",{value:!0}),Mh.diag=void 0;const t=Rg();return Mh.diag=t.DiagAPI.instance(),Mh}var $h={},Ph={},Hu={},AR;function nde(){if(AR)return Hu;AR=1,Object.defineProperty(Hu,"__esModule",{value:!0}),Hu.NOOP_METER_PROVIDER=Hu.NoopMeterProvider=void 0;const t=Nq();let e=class{getMeter(a,r,i){return t.NOOP_METER}};return Hu.NoopMeterProvider=e,Hu.NOOP_METER_PROVIDER=new e,Hu}var mR;function ade(){if(mR)return Ph;mR=1,Object.defineProperty(Ph,"__esModule",{value:!0}),Ph.MetricsAPI=void 0;const t=nde(),e=Ng(),n=Rg(),a="metrics";class r{constructor(){}static getInstance(){return this._instance||(this._instance=new r),this._instance}setGlobalMeterProvider(o){return(0,e.registerGlobal)(a,o,n.DiagAPI.instance())}getMeterProvider(){return(0,e.getGlobal)(a)||t.NOOP_METER_PROVIDER}getMeter(o,s,l){return this.getMeterProvider().getMeter(o,s,l)}disable(){(0,e.unregisterGlobal)(a,n.DiagAPI.instance())}}return Ph.MetricsAPI=r,Ph}var gR;function rde(){if(gR)return $h;gR=1,Object.defineProperty($h,"__esModule",{value:!0}),$h.metrics=void 0;const t=ade();return $h.metrics=t.MetricsAPI.getInstance(),$h}var Oh={},jh={},Gh={},hR;function ide(){if(hR)return Gh;hR=1,Object.defineProperty(Gh,"__esModule",{value:!0}),Gh.NoopTextMapPropagator=void 0;let t=class{inject(n,a){}extract(n,a){return n}fields(){return[]}};return Gh.NoopTextMapPropagator=t,Gh}var Ko={},fR;function ode(){if(fR)return Ko;fR=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.deleteBaggage=Ko.setBaggage=Ko.getActiveBaggage=Ko.getBaggage=void 0;const t=PE(),n=(0,$E().createContextKey)("OpenTelemetry Baggage Key");function a(s){return s.getValue(n)||void 0}Ko.getBaggage=a;function r(){return a(t.ContextAPI.getInstance().active())}Ko.getActiveBaggage=r;function i(s,l){return s.setValue(n,l)}Ko.setBaggage=i;function o(s){return s.deleteValue(n)}return Ko.deleteBaggage=o,Ko}var bR;function sde(){if(bR)return jh;bR=1,Object.defineProperty(jh,"__esModule",{value:!0}),jh.PropagationAPI=void 0;const t=Ng(),e=ide(),n=Rq(),a=ode(),r=Lq(),i=Rg(),o="propagation",s=new e.NoopTextMapPropagator;class l{constructor(){this.createBaggage=r.createBaggage,this.getBaggage=a.getBaggage,this.getActiveBaggage=a.getActiveBaggage,this.setBaggage=a.setBaggage,this.deleteBaggage=a.deleteBaggage}static getInstance(){return this._instance||(this._instance=new l),this._instance}setGlobalPropagator(d){return(0,t.registerGlobal)(o,d,i.DiagAPI.instance())}inject(d,p,A=n.defaultTextMapSetter){return this._getGlobalPropagator().inject(d,p,A)}extract(d,p,A=n.defaultTextMapGetter){return this._getGlobalPropagator().extract(d,p,A)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,t.unregisterGlobal)(o,i.DiagAPI.instance())}_getGlobalPropagator(){return(0,t.getGlobal)(o)||s}}return jh.PropagationAPI=l,jh}var yR;function cde(){if(yR)return Oh;yR=1,Object.defineProperty(Oh,"__esModule",{value:!0}),Oh.propagation=void 0;const t=sde();return Oh.propagation=t.PropagationAPI.getInstance(),Oh}var qh={},zh={},wR;function lde(){if(wR)return zh;wR=1,Object.defineProperty(zh,"__esModule",{value:!0}),zh.TraceAPI=void 0;const t=Ng(),e=jq(),n=t4(),a=$q(),r=Rg(),i="trace";class o{constructor(){this._proxyTracerProvider=new e.ProxyTracerProvider,this.wrapSpanContext=n.wrapSpanContext,this.isSpanContextValid=n.isSpanContextValid,this.deleteSpan=a.deleteSpan,this.getSpan=a.getSpan,this.getActiveSpan=a.getActiveSpan,this.getSpanContext=a.getSpanContext,this.setSpan=a.setSpan,this.setSpanContext=a.setSpanContext}static getInstance(){return this._instance||(this._instance=new o),this._instance}setGlobalTracerProvider(l){const u=(0,t.registerGlobal)(i,this._proxyTracerProvider,r.DiagAPI.instance());return u&&this._proxyTracerProvider.setDelegate(l),u}getTracerProvider(){return(0,t.getGlobal)(i)||this._proxyTracerProvider}getTracer(l,u){return this.getTracerProvider().getTracer(l,u)}disable(){(0,t.unregisterGlobal)(i,r.DiagAPI.instance()),this._proxyTracerProvider=new e.ProxyTracerProvider}}return zh.TraceAPI=o,zh}var kR;function ude(){if(kR)return qh;kR=1,Object.defineProperty(qh,"__esModule",{value:!0}),qh.trace=void 0;const t=lde();return qh.trace=t.TraceAPI.getInstance(),qh}var vR;function dde(){return vR||(vR=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.trace=t.propagation=t.metrics=t.diag=t.context=t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=t.isValidSpanId=t.isValidTraceId=t.isSpanContextValid=t.createTraceState=t.TraceFlags=t.SpanStatusCode=t.SpanKind=t.SamplingDecision=t.ProxyTracerProvider=t.ProxyTracer=t.defaultTextMapSetter=t.defaultTextMapGetter=t.ValueType=t.createNoopMeter=t.DiagLogLevel=t.DiagConsoleLogger=t.ROOT_CONTEXT=t.createContextKey=t.baggageEntryMetadataFromString=void 0;var e=Lq();Object.defineProperty(t,"baggageEntryMetadataFromString",{enumerable:!0,get:function(){return e.baggageEntryMetadataFromString}});var n=$E();Object.defineProperty(t,"createContextKey",{enumerable:!0,get:function(){return n.createContextKey}}),Object.defineProperty(t,"ROOT_CONTEXT",{enumerable:!0,get:function(){return n.ROOT_CONTEXT}});var a=zue();Object.defineProperty(t,"DiagConsoleLogger",{enumerable:!0,get:function(){return a.DiagConsoleLogger}});var r=JF();Object.defineProperty(t,"DiagLogLevel",{enumerable:!0,get:function(){return r.DiagLogLevel}});var i=Nq();Object.defineProperty(t,"createNoopMeter",{enumerable:!0,get:function(){return i.createNoopMeter}});var o=Uue();Object.defineProperty(t,"ValueType",{enumerable:!0,get:function(){return o.ValueType}});var s=Rq();Object.defineProperty(t,"defaultTextMapGetter",{enumerable:!0,get:function(){return s.defaultTextMapGetter}}),Object.defineProperty(t,"defaultTextMapSetter",{enumerable:!0,get:function(){return s.defaultTextMapSetter}});var l=Oq();Object.defineProperty(t,"ProxyTracer",{enumerable:!0,get:function(){return l.ProxyTracer}});var u=jq();Object.defineProperty(t,"ProxyTracerProvider",{enumerable:!0,get:function(){return u.ProxyTracerProvider}});var d=Wue();Object.defineProperty(t,"SamplingDecision",{enumerable:!0,get:function(){return d.SamplingDecision}});var p=Kue();Object.defineProperty(t,"SpanKind",{enumerable:!0,get:function(){return p.SpanKind}});var A=Zue();Object.defineProperty(t,"SpanStatusCode",{enumerable:!0,get:function(){return A.SpanStatusCode}});var m=Mq();Object.defineProperty(t,"TraceFlags",{enumerable:!0,get:function(){return m.TraceFlags}});var g=Xue();Object.defineProperty(t,"createTraceState",{enumerable:!0,get:function(){return g.createTraceState}});var h=t4();Object.defineProperty(t,"isSpanContextValid",{enumerable:!0,get:function(){return h.isSpanContextValid}}),Object.defineProperty(t,"isValidTraceId",{enumerable:!0,get:function(){return h.isValidTraceId}}),Object.defineProperty(t,"isValidSpanId",{enumerable:!0,get:function(){return h.isValidSpanId}});var f=XF();Object.defineProperty(t,"INVALID_SPANID",{enumerable:!0,get:function(){return f.INVALID_SPANID}}),Object.defineProperty(t,"INVALID_TRACEID",{enumerable:!0,get:function(){return f.INVALID_TRACEID}}),Object.defineProperty(t,"INVALID_SPAN_CONTEXT",{enumerable:!0,get:function(){return f.INVALID_SPAN_CONTEXT}});const b=ede();Object.defineProperty(t,"context",{enumerable:!0,get:function(){return b.context}});const w=tde();Object.defineProperty(t,"diag",{enumerable:!0,get:function(){return w.diag}});const y=rde();Object.defineProperty(t,"metrics",{enumerable:!0,get:function(){return y.metrics}});const v=cde();Object.defineProperty(t,"propagation",{enumerable:!0,get:function(){return v.propagation}});const _=ude();Object.defineProperty(t,"trace",{enumerable:!0,get:function(){return _.trace}}),t.default={context:b.context,diag:w.diag,metrics:y.metrics,propagation:v.propagation,trace:_.trace}})(n1)),n1}var SBt=dde(),_R;(function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.TRACE=1]="TRACE",t[t.TRACE2=2]="TRACE2",t[t.TRACE3=3]="TRACE3",t[t.TRACE4=4]="TRACE4",t[t.DEBUG=5]="DEBUG",t[t.DEBUG2=6]="DEBUG2",t[t.DEBUG3=7]="DEBUG3",t[t.DEBUG4=8]="DEBUG4",t[t.INFO=9]="INFO",t[t.INFO2=10]="INFO2",t[t.INFO3=11]="INFO3",t[t.INFO4=12]="INFO4",t[t.WARN=13]="WARN",t[t.WARN2=14]="WARN2",t[t.WARN3=15]="WARN3",t[t.WARN4=16]="WARN4",t[t.ERROR=17]="ERROR",t[t.ERROR2=18]="ERROR2",t[t.ERROR3=19]="ERROR3",t[t.ERROR4=20]="ERROR4",t[t.FATAL=21]="FATAL",t[t.FATAL2=22]="FATAL2",t[t.FATAL3=23]="FATAL3",t[t.FATAL4=24]="FATAL4"})(_R||(_R={}));var Gq=(function(){function t(){}return t.prototype.emit=function(e){},t})(),pde=new Gq,Ade=(function(){function t(){}return t.prototype.getLogger=function(e,n,a){return new Gq},t})(),qq=new Ade,mde=(function(){function t(e,n,a,r){this._provider=e,this.name=n,this.version=a,this.options=r}return t.prototype.emit=function(e){this._getLogger().emit(e)},t.prototype._getLogger=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):pde},t})(),CR=(function(){function t(){}return t.prototype.getLogger=function(e,n,a){var r;return(r=this.getDelegateLogger(e,n,a))!==null&&r!==void 0?r:new mde(this,e,n,a)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:qq},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateLogger=function(e,n,a){var r;return(r=this._delegate)===null||r===void 0?void 0:r.getLogger(e,n,a)},t})(),gde=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},yk=Symbol.for("io.opentelemetry.js.api.logs"),Uh=gde;function hde(t,e,n){return function(a){return a===t?e:n}}var ER=1,fde=(function(){function t(){this._proxyLoggerProvider=new CR}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalLoggerProvider=function(e){return Uh[yk]?this.getLoggerProvider():(Uh[yk]=hde(ER,e,qq),this._proxyLoggerProvider.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Uh[yk])===null||e===void 0?void 0:e.call(Uh,ER))!==null&&n!==void 0?n:this._proxyLoggerProvider},t.prototype.getLogger=function(e,n,a){return this.getLoggerProvider().getLogger(e,n,a)},t.prototype.disable=function(){delete Uh[yk],this._proxyLoggerProvider=new CR},t})(),TBt=fde.getInstance(),Rn;(function(t){t.assertEqual=r=>{};function e(r){}t.assertIs=e;function n(r){throw new Error}t.assertNever=n,t.arrayToEnum=r=>{const i={};for(const o of r)i[o]=o;return i},t.getValidEnumValues=r=>{const i=t.objectKeys(r).filter(s=>typeof r[r[s]]!="number"),o={};for(const s of i)o[s]=r[s];return t.objectValues(o)},t.objectValues=r=>t.objectKeys(r).map(function(i){return r[i]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const i=[];for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&i.push(o);return i},t.find=(r,i)=>{for(const o of r)if(i(o))return o},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function a(r,i=" | "){return r.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}t.joinValues=a,t.jsonStringifyReplacer=(r,i)=>typeof i=="bigint"?i.toString():i})(Rn||(Rn={}));var xR;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(xR||(xR={}));const Nt=Rn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),El=t=>{switch(typeof t){case"undefined":return Nt.undefined;case"string":return Nt.string;case"number":return Number.isNaN(t)?Nt.nan:Nt.number;case"boolean":return Nt.boolean;case"function":return Nt.function;case"bigint":return Nt.bigint;case"symbol":return Nt.symbol;case"object":return Array.isArray(t)?Nt.array:t===null?Nt.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Nt.promise:typeof Map<"u"&&t instanceof Map?Nt.map:typeof Set<"u"&&t instanceof Set?Nt.set:typeof Date<"u"&&t instanceof Date?Nt.date:Nt.object;default:return Nt.unknown}},gt=Rn.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"]);class Wc extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(i){return i.message},a={_errors:[]},r=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(r);else if(o.code==="invalid_return_type")r(o.returnTypeError);else if(o.code==="invalid_arguments")r(o.argumentsError);else if(o.path.length===0)a._errors.push(n(o));else{let s=a,l=0;for(;l<o.path.length;){const u=o.path[l];l===o.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(n(o))):s[u]=s[u]||{_errors:[]},s=s[u],l++}}};return r(this),a}static assert(e){if(!(e instanceof Wc))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Rn.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},a=[];for(const r of this.issues)if(r.path.length>0){const i=r.path[0];n[i]=n[i]||[],n[i].push(e(r))}else a.push(e(r));return{formErrors:a,fieldErrors:n}}get formErrors(){return this.flatten()}}Wc.create=t=>new Wc(t);const VD=(t,e)=>{let n;switch(t.code){case gt.invalid_type:t.received===Nt.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case gt.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Rn.jsonStringifyReplacer)}`;break;case gt.unrecognized_keys:n=`Unrecognized key(s) in object: ${Rn.joinValues(t.keys,", ")}`;break;case gt.invalid_union:n="Invalid input";break;case gt.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Rn.joinValues(t.options)}`;break;case gt.invalid_enum_value:n=`Invalid enum value. Expected ${Rn.joinValues(t.options)}, received '${t.received}'`;break;case gt.invalid_arguments:n="Invalid function arguments";break;case gt.invalid_return_type:n="Invalid function return type";break;case gt.invalid_date:n="Invalid date";break;case gt.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Rn.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case gt.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case gt.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case gt.custom:n="Invalid input";break;case gt.invalid_intersection_types:n="Intersection results could not be merged";break;case gt.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case gt.not_finite:n="Number must be finite";break;default:n=e.defaultError,Rn.assertNever(t)}return{message:n}};let bde=VD;function yde(){return bde}const wde=t=>{const{data:e,path:n,errorMaps:a,issueData:r}=t,i=[...n,...r.path||[]],o={...r,path:i};if(r.message!==void 0)return{...r,path:i,message:r.message};let s="";const l=a.filter(u=>!!u).slice().reverse();for(const u of l)s=u(o,{data:e,defaultError:s}).message;return{...r,path:i,message:s}};function It(t,e){const n=yde(),a=wde({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===VD?void 0:VD].filter(r=>!!r)});t.common.issues.push(a)}class yi{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const a=[];for(const r of n){if(r.status==="aborted")return an;r.status==="dirty"&&e.dirty(),a.push(r.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,n){const a=[];for(const r of n){const i=await r.key,o=await r.value;a.push({key:i,value:o})}return yi.mergeObjectSync(e,a)}static mergeObjectSync(e,n){const a={};for(const r of n){const{key:i,value:o}=r;if(i.status==="aborted"||o.status==="aborted")return an;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||r.alwaysSet)&&(a[i.value]=o.value)}return{status:e.value,value:a}}}const an=Object.freeze({status:"aborted"}),Df=t=>({status:"dirty",value:t}),Uo=t=>({status:"valid",value:t}),BR=t=>t.status==="aborted",IR=t=>t.status==="dirty",Zm=t=>t.status==="valid",c_=t=>typeof Promise<"u"&&t instanceof Promise;var Pt;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Pt||(Pt={}));class Xs{constructor(e,n,a,r){this._cachedPath=[],this.parent=e,this.data=n,this._path=a,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const DR=(t,e)=>{if(Zm(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Wc(t.common.issues);return this._error=n,this._error}}};function un(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:a,description:r}=t;if(e&&(n||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:r}:{errorMap:(o,s)=>{const{message:l}=t;return o.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??a??s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:l??n??s.defaultError}},description:r}}let xn=class{get description(){return this._def.description}_getType(e){return El(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:El(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new yi,ctx:{common:e.parent.common,data:e.data,parsedType:El(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(c_(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const a=this.safeParse(e,n);if(a.success)return a.data;throw a.error}safeParse(e,n){const a={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:El(e)},r=this._parseSync({data:e,path:a.path,parent:a});return DR(a,r)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:El(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:n});return Zm(a)?{value:a.value}:{issues:n.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(a=>Zm(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(e,n){const a=await this.safeParseAsync(e,n);if(a.success)return a.data;throw a.error}async safeParseAsync(e,n){const a={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:El(e)},r=this._parse({data:e,path:a.path,parent:a}),i=await(c_(r)?r:Promise.resolve(r));return DR(a,i)}refine(e,n){const a=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,i)=>{const o=e(r),s=()=>i.addIssue({code:gt.custom,...a(r)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(e,n){return this._refinement((a,r)=>e(a)?!0:(r.addIssue(typeof n=="function"?n(a,r):n),!1))}_refinement(e){return new Jm({schema:this,typeName:tn.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Pl.create(this,this._def)}nullable(){return Xm.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Vm.create(this)}promise(){return A_.create(this,this._def)}or(e){return d_.create([this,e],this._def)}and(e){return p_.create(this,e,this._def)}transform(e){return new Jm({...un(this._def),schema:this,typeName:tn.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new sQ({...un(this._def),innerType:this,defaultValue:n,typeName:tn.ZodDefault})}brand(){return new zde({typeName:tn.ZodBranded,type:this,...un(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new cQ({...un(this._def),innerType:this,catchValue:n,typeName:tn.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return a4.create(this,e)}readonly(){return lQ.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const kde=/^c[^\s-]{8,}$/i,vde=/^[0-9a-z]+$/,_de=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Cde=/^[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,Ede=/^[a-z0-9_-]{21}$/i,xde=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Bde=/^[-+]?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)?)??$/,Ide=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Dde="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let d1;const Qde=/^(?:(?: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])$/,Sde=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Tde=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Fde=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Lde=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Nde=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,zq="((\\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])))",Rde=new RegExp(`^${zq}$`);function Uq(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function Mde(t){return new RegExp(`^${Uq(t)}$`)}function $de(t){let e=`${zq}T${Uq(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function Pde(t,e){return!!((e==="v4"||!e)&&Qde.test(t)||(e==="v6"||!e)&&Tde.test(t))}function Ode(t,e){if(!xde.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const a=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(a));return!(typeof r!="object"||r===null||"typ"in r&&r?.typ!=="JWT"||!r.alg||e&&r.alg!==e)}catch{return!1}}function jde(t,e){return!!((e==="v4"||!e)&&Sde.test(t)||(e==="v6"||!e)&&Fde.test(t))}let l_=class Qf extends xn{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Nt.string){const i=this._getOrReturnCtx(e);return It(i,{code:gt.invalid_type,expected:Nt.string,received:i.parsedType}),an}const a=new yi;let r;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(r=this._getOrReturnCtx(e,r),It(r,{code:gt.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),a.dirty());else if(i.kind==="max")e.data.length>i.value&&(r=this._getOrReturnCtx(e,r),It(r,{code:gt.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),a.dirty());else if(i.kind==="length"){const o=e.data.length>i.value,s=e.data.length<i.value;(o||s)&&(r=this._getOrReturnCtx(e,r),o?It(r,{code:gt.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&It(r,{code:gt.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),a.dirty())}else if(i.kind==="email")Ide.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"email",code:gt.invalid_string,message:i.message}),a.dirty());else if(i.kind==="emoji")d1||(d1=new RegExp(Dde,"u")),d1.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"emoji",code:gt.invalid_string,message:i.message}),a.dirty());else if(i.kind==="uuid")Cde.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"uuid",code:gt.invalid_string,message:i.message}),a.dirty());else if(i.kind==="nanoid")Ede.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"nanoid",code:gt.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid")kde.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"cuid",code:gt.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid2")vde.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"cuid2",code:gt.invalid_string,message:i.message}),a.dirty());else if(i.kind==="ulid")_de.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"ulid",code:gt.invalid_string,message:i.message}),a.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{r=this._getOrReturnCtx(e,r),It(r,{validation:"url",code:gt.invalid_string,message:i.message}),a.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"regex",code:gt.invalid_string,message:i.message}),a.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(r=this._getOrReturnCtx(e,r),It(r,{code:gt.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),a.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(r=this._getOrReturnCtx(e,r),It(r,{code:gt.invalid_string,validation:{startsWith:i.value},message:i.message}),a.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(r=this._getOrReturnCtx(e,r),It(r,{code:gt.invalid_string,validation:{endsWith:i.value},message:i.message}),a.dirty()):i.kind==="datetime"?$de(i).test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{code:gt.invalid_string,validation:"datetime",message:i.message}),a.dirty()):i.kind==="date"?Rde.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{code:gt.invalid_string,validation:"date",message:i.message}),a.dirty()):i.kind==="time"?Mde(i).test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{code:gt.invalid_string,validation:"time",message:i.message}),a.dirty()):i.kind==="duration"?Bde.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"duration",code:gt.invalid_string,message:i.message}),a.dirty()):i.kind==="ip"?Pde(e.data,i.version)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"ip",code:gt.invalid_string,message:i.message}),a.dirty()):i.kind==="jwt"?Ode(e.data,i.alg)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"jwt",code:gt.invalid_string,message:i.message}),a.dirty()):i.kind==="cidr"?jde(e.data,i.version)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"cidr",code:gt.invalid_string,message:i.message}),a.dirty()):i.kind==="base64"?Lde.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"base64",code:gt.invalid_string,message:i.message}),a.dirty()):i.kind==="base64url"?Nde.test(e.data)||(r=this._getOrReturnCtx(e,r),It(r,{validation:"base64url",code:gt.invalid_string,message:i.message}),a.dirty()):Rn.assertNever(i);return{status:a.value,value:e.data}}_regex(e,n,a){return this.refinement(r=>e.test(r),{validation:n,code:gt.invalid_string,...Pt.errToObj(a)})}_addCheck(e){return new Qf({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Pt.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Pt.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Pt.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Pt.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Pt.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Pt.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Pt.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Pt.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Pt.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Pt.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Pt.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Pt.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Pt.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Pt.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Pt.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Pt.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...Pt.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...Pt.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...Pt.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...Pt.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...Pt.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...Pt.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...Pt.errToObj(n)})}nonempty(e){return this.min(1,Pt.errToObj(e))}trim(){return new Qf({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Qf({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Qf({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};l_.create=t=>new l_({checks:[],typeName:tn.ZodString,coerce:t?.coerce??!1,...un(t)});function Gde(t,e){const n=(t.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,r=n>a?n:a,i=Number.parseInt(t.toFixed(r).replace(".","")),o=Number.parseInt(e.toFixed(r).replace(".",""));return i%o/10**r}let JD=class XD extends xn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Nt.number){const i=this._getOrReturnCtx(e);return It(i,{code:gt.invalid_type,expected:Nt.number,received:i.parsedType}),an}let a;const r=new yi;for(const i of this._def.checks)i.kind==="int"?Rn.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),It(a,{code:gt.invalid_type,expected:"integer",received:"float",message:i.message}),r.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(a=this._getOrReturnCtx(e,a),It(a,{code:gt.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(a=this._getOrReturnCtx(e,a),It(a,{code:gt.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="multipleOf"?Gde(e.data,i.value)!==0&&(a=this._getOrReturnCtx(e,a),It(a,{code:gt.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),It(a,{code:gt.not_finite,message:i.message}),r.dirty()):Rn.assertNever(i);return{status:r.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Pt.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Pt.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Pt.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Pt.toString(n))}setLimit(e,n,a,r){return new XD({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:a,message:Pt.toString(r)}]})}_addCheck(e){return new XD({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Pt.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Pt.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Pt.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Pt.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Pt.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Pt.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:Pt.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Pt.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Pt.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Rn.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(n===null||a.value>n)&&(n=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(n)&&Number.isFinite(e)}};JD.create=t=>new JD({checks:[],typeName:tn.ZodNumber,coerce:t?.coerce||!1,...un(t)});class iy extends xn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Nt.bigint)return this._getInvalidInput(e);let a;const r=new yi;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(a=this._getOrReturnCtx(e,a),It(a,{code:gt.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(a=this._getOrReturnCtx(e,a),It(a,{code:gt.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),It(a,{code:gt.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):Rn.assertNever(i);return{status:r.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return It(n,{code:gt.invalid_type,expected:Nt.bigint,received:n.parsedType}),an}gte(e,n){return this.setLimit("min",e,!0,Pt.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Pt.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Pt.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Pt.toString(n))}setLimit(e,n,a,r){return new iy({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:a,message:Pt.toString(r)}]})}_addCheck(e){return new iy({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Pt.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Pt.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Pt.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Pt.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Pt.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}iy.create=t=>new iy({checks:[],typeName:tn.ZodBigInt,coerce:t?.coerce??!1,...un(t)});let eQ=class extends xn{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Nt.boolean){const a=this._getOrReturnCtx(e);return It(a,{code:gt.invalid_type,expected:Nt.boolean,received:a.parsedType}),an}return Uo(e.data)}};eQ.create=t=>new eQ({typeName:tn.ZodBoolean,coerce:t?.coerce||!1,...un(t)});class u_ extends xn{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Nt.date){const i=this._getOrReturnCtx(e);return It(i,{code:gt.invalid_type,expected:Nt.date,received:i.parsedType}),an}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return It(i,{code:gt.invalid_date}),an}const a=new yi;let r;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(r=this._getOrReturnCtx(e,r),It(r,{code:gt.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),a.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(r=this._getOrReturnCtx(e,r),It(r,{code:gt.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),a.dirty()):Rn.assertNever(i);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new u_({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:Pt.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:Pt.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}u_.create=t=>new u_({checks:[],coerce:t?.coerce||!1,typeName:tn.ZodDate,...un(t)});class QR extends xn{_parse(e){if(this._getType(e)!==Nt.symbol){const a=this._getOrReturnCtx(e);return It(a,{code:gt.invalid_type,expected:Nt.symbol,received:a.parsedType}),an}return Uo(e.data)}}QR.create=t=>new QR({typeName:tn.ZodSymbol,...un(t)});class SR extends xn{_parse(e){if(this._getType(e)!==Nt.undefined){const a=this._getOrReturnCtx(e);return It(a,{code:gt.invalid_type,expected:Nt.undefined,received:a.parsedType}),an}return Uo(e.data)}}SR.create=t=>new SR({typeName:tn.ZodUndefined,...un(t)});class tQ extends xn{_parse(e){if(this._getType(e)!==Nt.null){const a=this._getOrReturnCtx(e);return It(a,{code:gt.invalid_type,expected:Nt.null,received:a.parsedType}),an}return Uo(e.data)}}tQ.create=t=>new tQ({typeName:tn.ZodNull,...un(t)});let TR=class extends xn{constructor(){super(...arguments),this._any=!0}_parse(e){return Uo(e.data)}};TR.create=t=>new TR({typeName:tn.ZodAny,...un(t)});let nQ=class extends xn{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Uo(e.data)}};nQ.create=t=>new nQ({typeName:tn.ZodUnknown,...un(t)});let Hl=class extends xn{_parse(e){const n=this._getOrReturnCtx(e);return It(n,{code:gt.invalid_type,expected:Nt.never,received:n.parsedType}),an}};Hl.create=t=>new Hl({typeName:tn.ZodNever,...un(t)});class FR extends xn{_parse(e){if(this._getType(e)!==Nt.undefined){const a=this._getOrReturnCtx(e);return It(a,{code:gt.invalid_type,expected:Nt.void,received:a.parsedType}),an}return Uo(e.data)}}FR.create=t=>new FR({typeName:tn.ZodVoid,...un(t)});let Vm=class Y0 extends xn{_parse(e){const{ctx:n,status:a}=this._processInputParams(e),r=this._def;if(n.parsedType!==Nt.array)return It(n,{code:gt.invalid_type,expected:Nt.array,received:n.parsedType}),an;if(r.exactLength!==null){const o=n.data.length>r.exactLength.value,s=n.data.length<r.exactLength.value;(o||s)&&(It(n,{code:o?gt.too_big:gt.too_small,minimum:s?r.exactLength.value:void 0,maximum:o?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),a.dirty())}if(r.minLength!==null&&n.data.length<r.minLength.value&&(It(n,{code:gt.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),a.dirty()),r.maxLength!==null&&n.data.length>r.maxLength.value&&(It(n,{code:gt.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),a.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>r.type._parseAsync(new Xs(n,o,n.path,s)))).then(o=>yi.mergeArray(a,o));const i=[...n.data].map((o,s)=>r.type._parseSync(new Xs(n,o,n.path,s)));return yi.mergeArray(a,i)}get element(){return this._def.type}min(e,n){return new Y0({...this._def,minLength:{value:e,message:Pt.toString(n)}})}max(e,n){return new Y0({...this._def,maxLength:{value:e,message:Pt.toString(n)}})}length(e,n){return new Y0({...this._def,exactLength:{value:e,message:Pt.toString(n)}})}nonempty(e){return this.min(1,e)}};Vm.create=(t,e)=>new Vm({type:t,minLength:null,maxLength:null,exactLength:null,typeName:tn.ZodArray,...un(e)});function lA(t){if(t instanceof Kc){const e={};for(const n in t.shape){const a=t.shape[n];e[n]=Pl.create(lA(a))}return new Kc({...t._def,shape:()=>e})}else return t instanceof Vm?new Vm({...t._def,type:lA(t.element)}):t instanceof Pl?Pl.create(lA(t.unwrap())):t instanceof Xm?Xm.create(lA(t.unwrap())):t instanceof $d?$d.create(t.items.map(e=>lA(e))):t}let Kc=class Zo extends xn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Rn.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==Nt.object){const u=this._getOrReturnCtx(e);return It(u,{code:gt.invalid_type,expected:Nt.object,received:u.parsedType}),an}const{status:a,ctx:r}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Hl&&this._def.unknownKeys==="strip"))for(const u in r.data)o.includes(u)||s.push(u);const l=[];for(const u of o){const d=i[u],p=r.data[u];l.push({key:{status:"valid",value:u},value:d._parse(new Xs(r,p,r.path,u)),alwaysSet:u in r.data})}if(this._def.catchall instanceof Hl){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of s)l.push({key:{status:"valid",value:d},value:{status:"valid",value:r.data[d]}});else if(u==="strict")s.length>0&&(It(r,{code:gt.unrecognized_keys,keys:s}),a.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of s){const p=r.data[d];l.push({key:{status:"valid",value:d},value:u._parse(new Xs(r,p,r.path,d)),alwaysSet:d in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of l){const p=await d.key,A=await d.value;u.push({key:p,value:A,alwaysSet:d.alwaysSet})}return u}).then(u=>yi.mergeObjectSync(a,u)):yi.mergeObjectSync(a,l)}get shape(){return this._def.shape()}strict(e){return Pt.errToObj,new Zo({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,a)=>{const r=this._def.errorMap?.(n,a).message??a.defaultError;return n.code==="unrecognized_keys"?{message:Pt.errToObj(e).message??r}:{message:r}}}:{}})}strip(){return new Zo({...this._def,unknownKeys:"strip"})}passthrough(){return new Zo({...this._def,unknownKeys:"passthrough"})}extend(e){return new Zo({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Zo({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:tn.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Zo({...this._def,catchall:e})}pick(e){const n={};for(const a of Rn.objectKeys(e))e[a]&&this.shape[a]&&(n[a]=this.shape[a]);return new Zo({...this._def,shape:()=>n})}omit(e){const n={};for(const a of Rn.objectKeys(this.shape))e[a]||(n[a]=this.shape[a]);return new Zo({...this._def,shape:()=>n})}deepPartial(){return lA(this)}partial(e){const n={};for(const a of Rn.objectKeys(this.shape)){const r=this.shape[a];e&&!e[a]?n[a]=r:n[a]=r.optional()}return new Zo({...this._def,shape:()=>n})}required(e){const n={};for(const a of Rn.objectKeys(this.shape))if(e&&!e[a])n[a]=this.shape[a];else{let i=this.shape[a];for(;i instanceof Pl;)i=i._def.innerType;n[a]=i}return new Zo({...this._def,shape:()=>n})}keyof(){return Hq(Rn.objectKeys(this.shape))}};Kc.create=(t,e)=>new Kc({shape:()=>t,unknownKeys:"strip",catchall:Hl.create(),typeName:tn.ZodObject,...un(e)});Kc.strictCreate=(t,e)=>new Kc({shape:()=>t,unknownKeys:"strict",catchall:Hl.create(),typeName:tn.ZodObject,...un(e)});Kc.lazycreate=(t,e)=>new Kc({shape:t,unknownKeys:"strip",catchall:Hl.create(),typeName:tn.ZodObject,...un(e)});let d_=class extends xn{_parse(e){const{ctx:n}=this._processInputParams(e),a=this._def.options;function r(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=i.map(s=>new Wc(s.ctx.common.issues));return It(n,{code:gt.invalid_union,unionErrors:o}),an}if(n.common.async)return Promise.all(a.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(r);{let i;const o=[];for(const l of a){const u={...n,common:{...n.common,issues:[]},parent:null},d=l._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=o.map(l=>new Wc(l));return It(n,{code:gt.invalid_union,unionErrors:s}),an}}get options(){return this._def.options}};d_.create=(t,e)=>new d_({options:t,typeName:tn.ZodUnion,...un(e)});function aQ(t,e){const n=El(t),a=El(e);if(t===e)return{valid:!0,data:t};if(n===Nt.object&&a===Nt.object){const r=Rn.objectKeys(e),i=Rn.objectKeys(t).filter(s=>r.indexOf(s)!==-1),o={...t,...e};for(const s of i){const l=aQ(t[s],e[s]);if(!l.valid)return{valid:!1};o[s]=l.data}return{valid:!0,data:o}}else if(n===Nt.array&&a===Nt.array){if(t.length!==e.length)return{valid:!1};const r=[];for(let i=0;i<t.length;i++){const o=t[i],s=e[i],l=aQ(o,s);if(!l.valid)return{valid:!1};r.push(l.data)}return{valid:!0,data:r}}else return n===Nt.date&&a===Nt.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}let p_=class extends xn{_parse(e){const{status:n,ctx:a}=this._processInputParams(e),r=(i,o)=>{if(BR(i)||BR(o))return an;const s=aQ(i.value,o.value);return s.valid?((IR(i)||IR(o))&&n.dirty(),{status:n.value,value:s.data}):(It(a,{code:gt.invalid_intersection_types}),an)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([i,o])=>r(i,o)):r(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}};p_.create=(t,e,n)=>new p_({left:t,right:e,typeName:tn.ZodIntersection,...un(n)});class $d extends xn{_parse(e){const{status:n,ctx:a}=this._processInputParams(e);if(a.parsedType!==Nt.array)return It(a,{code:gt.invalid_type,expected:Nt.array,received:a.parsedType}),an;if(a.data.length<this._def.items.length)return It(a,{code:gt.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),an;!this._def.rest&&a.data.length>this._def.items.length&&(It(a,{code:gt.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...a.data].map((o,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Xs(a,o,a.path,s)):null}).filter(o=>!!o);return a.common.async?Promise.all(i).then(o=>yi.mergeArray(n,o)):yi.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new $d({...this._def,rest:e})}}$d.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new $d({items:t,typeName:tn.ZodTuple,rest:null,...un(e)})};let qde=class rQ extends xn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:a}=this._processInputParams(e);if(a.parsedType!==Nt.object)return It(a,{code:gt.invalid_type,expected:Nt.object,received:a.parsedType}),an;const r=[],i=this._def.keyType,o=this._def.valueType;for(const s in a.data)r.push({key:i._parse(new Xs(a,s,a.path,s)),value:o._parse(new Xs(a,a.data[s],a.path,s)),alwaysSet:s in a.data});return a.common.async?yi.mergeObjectAsync(n,r):yi.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(e,n,a){return n instanceof xn?new rQ({keyType:e,valueType:n,typeName:tn.ZodRecord,...un(a)}):new rQ({keyType:l_.create(),valueType:e,typeName:tn.ZodRecord,...un(n)})}};class LR extends xn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:a}=this._processInputParams(e);if(a.parsedType!==Nt.map)return It(a,{code:gt.invalid_type,expected:Nt.map,received:a.parsedType}),an;const r=this._def.keyType,i=this._def.valueType,o=[...a.data.entries()].map(([s,l],u)=>({key:r._parse(new Xs(a,s,a.path,[u,"key"])),value:i._parse(new Xs(a,l,a.path,[u,"value"]))}));if(a.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,d=await l.value;if(u.status==="aborted"||d.status==="aborted")return an;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),s.set(u.value,d.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of o){const u=l.key,d=l.value;if(u.status==="aborted"||d.status==="aborted")return an;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),s.set(u.value,d.value)}return{status:n.value,value:s}}}}LR.create=(t,e,n)=>new LR({valueType:e,keyType:t,typeName:tn.ZodMap,...un(n)});class oy extends xn{_parse(e){const{status:n,ctx:a}=this._processInputParams(e);if(a.parsedType!==Nt.set)return It(a,{code:gt.invalid_type,expected:Nt.set,received:a.parsedType}),an;const r=this._def;r.minSize!==null&&a.data.size<r.minSize.value&&(It(a,{code:gt.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()),r.maxSize!==null&&a.data.size>r.maxSize.value&&(It(a,{code:gt.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty());const i=this._def.valueType;function o(l){const u=new Set;for(const d of l){if(d.status==="aborted")return an;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const s=[...a.data.values()].map((l,u)=>i._parse(new Xs(a,l,a.path,u)));return a.common.async?Promise.all(s).then(l=>o(l)):o(s)}min(e,n){return new oy({...this._def,minSize:{value:e,message:Pt.toString(n)}})}max(e,n){return new oy({...this._def,maxSize:{value:e,message:Pt.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}oy.create=(t,e)=>new oy({valueType:t,minSize:null,maxSize:null,typeName:tn.ZodSet,...un(e)});class NR extends xn{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}NR.create=(t,e)=>new NR({getter:t,typeName:tn.ZodLazy,...un(e)});let iQ=class extends xn{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return It(n,{received:n.data,code:gt.invalid_literal,expected:this._def.value}),an}return{status:"valid",value:e.data}}get value(){return this._def.value}};iQ.create=(t,e)=>new iQ({value:t,typeName:tn.ZodLiteral,...un(e)});function Hq(t,e){return new n4({values:t,typeName:tn.ZodEnum,...un(e)})}let n4=class oQ extends xn{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),a=this._def.values;return It(n,{expected:Rn.joinValues(a),received:n.parsedType,code:gt.invalid_type}),an}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),a=this._def.values;return It(n,{received:n.data,code:gt.invalid_enum_value,options:a}),an}return Uo(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return oQ.create(e,{...this._def,...n})}exclude(e,n=this._def){return oQ.create(this.options.filter(a=>!e.includes(a)),{...this._def,...n})}};n4.create=Hq;class RR extends xn{_parse(e){const n=Rn.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==Nt.string&&a.parsedType!==Nt.number){const r=Rn.objectValues(n);return It(a,{expected:Rn.joinValues(r),received:a.parsedType,code:gt.invalid_type}),an}if(this._cache||(this._cache=new Set(Rn.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const r=Rn.objectValues(n);return It(a,{received:a.data,code:gt.invalid_enum_value,options:r}),an}return Uo(e.data)}get enum(){return this._def.values}}RR.create=(t,e)=>new RR({values:t,typeName:tn.ZodNativeEnum,...un(e)});class A_ extends xn{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Nt.promise&&n.common.async===!1)return It(n,{code:gt.invalid_type,expected:Nt.promise,received:n.parsedType}),an;const a=n.parsedType===Nt.promise?n.data:Promise.resolve(n.data);return Uo(a.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}}A_.create=(t,e)=>new A_({type:t,typeName:tn.ZodPromise,...un(e)});class Jm extends xn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===tn.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:a}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:o=>{It(a,o),o.fatal?n.abort():n.dirty()},get path(){return a.path}};if(i.addIssue=i.addIssue.bind(i),r.type==="preprocess"){const o=r.transform(a.data,i);if(a.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return an;const l=await this._def.schema._parseAsync({data:s,path:a.path,parent:a});return l.status==="aborted"?an:l.status==="dirty"||n.value==="dirty"?Df(l.value):l});{if(n.value==="aborted")return an;const s=this._def.schema._parseSync({data:o,path:a.path,parent:a});return s.status==="aborted"?an:s.status==="dirty"||n.value==="dirty"?Df(s.value):s}}if(r.type==="refinement"){const o=s=>{const l=r.refinement(s,i);if(a.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(a.common.async===!1){const s=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return s.status==="aborted"?an:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(s=>s.status==="aborted"?an:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(r.type==="transform")if(a.common.async===!1){const o=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Zm(o))return an;const s=r.transform(o.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(o=>Zm(o)?Promise.resolve(r.transform(o.value,i)).then(s=>({status:n.value,value:s})):an);Rn.assertNever(r)}}Jm.create=(t,e,n)=>new Jm({schema:t,typeName:tn.ZodEffects,effect:e,...un(n)});Jm.createWithPreprocess=(t,e,n)=>new Jm({schema:e,effect:{type:"preprocess",transform:t},typeName:tn.ZodEffects,...un(n)});let Pl=class extends xn{_parse(e){return this._getType(e)===Nt.undefined?Uo(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Pl.create=(t,e)=>new Pl({innerType:t,typeName:tn.ZodOptional,...un(e)});let Xm=class extends xn{_parse(e){return this._getType(e)===Nt.null?Uo(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Xm.create=(t,e)=>new Xm({innerType:t,typeName:tn.ZodNullable,...un(e)});let sQ=class extends xn{_parse(e){const{ctx:n}=this._processInputParams(e);let a=n.data;return n.parsedType===Nt.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};sQ.create=(t,e)=>new sQ({innerType:t,typeName:tn.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...un(e)});let cQ=class extends xn{_parse(e){const{ctx:n}=this._processInputParams(e),a={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return c_(r)?r.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Wc(a.common.issues)},input:a.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Wc(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}};cQ.create=(t,e)=>new cQ({innerType:t,typeName:tn.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...un(e)});class MR extends xn{_parse(e){if(this._getType(e)!==Nt.nan){const a=this._getOrReturnCtx(e);return It(a,{code:gt.invalid_type,expected:Nt.nan,received:a.parsedType}),an}return{status:"valid",value:e.data}}}MR.create=t=>new MR({typeName:tn.ZodNaN,...un(t)});class zde extends xn{_parse(e){const{ctx:n}=this._processInputParams(e),a=n.data;return this._def.type._parse({data:a,path:n.path,parent:n})}unwrap(){return this._def.type}}class a4 extends xn{_parse(e){const{status:n,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return i.status==="aborted"?an:i.status==="dirty"?(n.dirty(),Df(i.value)):this._def.out._parseAsync({data:i.value,path:a.path,parent:a})})();{const r=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return r.status==="aborted"?an:r.status==="dirty"?(n.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:a.path,parent:a})}}static create(e,n){return new a4({in:e,out:n,typeName:tn.ZodPipeline})}}let lQ=class extends xn{_parse(e){const n=this._def.innerType._parse(e),a=r=>(Zm(r)&&(r.value=Object.freeze(r.value)),r);return c_(n)?n.then(r=>a(r)):a(n)}unwrap(){return this._def.innerType}};lQ.create=(t,e)=>new lQ({innerType:t,typeName:tn.ZodReadonly,...un(e)});var tn;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(tn||(tn={}));const HBt=l_.create,YBt=JD.create,WBt=eQ.create,KBt=tQ.create,ZBt=nQ.create;Hl.create;const VBt=Vm.create,JBt=Kc.create,XBt=d_.create;p_.create;$d.create;const e1t=qde.create,t1t=iQ.create;n4.create;A_.create;Pl.create;Xm.create;function Xe(t,e,n){function a(s,l){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:l,constr:o,traits:new Set},enumerable:!1}),s._zod.traits.has(t))return;s._zod.traits.add(t),e(s,l);const u=o.prototype,d=Object.keys(u);for(let p=0;p<d.length;p++){const A=d[p];A in s||(s[A]=u[A].bind(s))}}const r=n?.Parent??Object;class i extends r{}Object.defineProperty(i,"name",{value:t});function o(s){var l;const u=n?.Parent?new i:this;a(u,s),(l=u._zod).deferred??(l.deferred=[]);for(const d of u._zod.deferred)d();return u}return Object.defineProperty(o,"init",{value:a}),Object.defineProperty(o,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(t)}),Object.defineProperty(o,"name",{value:t}),o}class TA extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Yq extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const Wq={};function Yl(t){return Wq}function Ude(t){const e=Object.values(t).filter(a=>typeof a=="number");return Object.entries(t).filter(([a,r])=>e.indexOf(+a)===-1).map(([a,r])=>r)}function uQ(t,e){return typeof e=="bigint"?e.toString():e}function OE(t){return{get value(){{const e=t();return Object.defineProperty(this,"value",{value:e}),e}}}}function r4(t){return t==null}function i4(t){const e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function Hde(t,e){const n=(t.toString().split(".")[1]||"").length,a=e.toString();let r=(a.split(".")[1]||"").length;if(r===0&&/\d?e-\d?/.test(a)){const l=a.match(/\d?e-(\d?)/);l?.[1]&&(r=Number.parseInt(l[1]))}const i=n>r?n:r,o=Number.parseInt(t.toFixed(i).replace(".","")),s=Number.parseInt(e.toFixed(i).replace(".",""));return o%s/10**i}const $R=Symbol("evaluating");function Xn(t,e,n){let a;Object.defineProperty(t,e,{get(){if(a!==$R)return a===void 0&&(a=$R,a=n()),a},set(r){Object.defineProperty(t,e,{value:r})},configurable:!0})}function Ap(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function mp(...t){const e={};for(const n of t){const a=Object.getOwnPropertyDescriptors(n);Object.assign(e,a)}return Object.defineProperties({},e)}function PR(t){return JSON.stringify(t)}function Yde(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Kq="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function sy(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const Wde=OE(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function eg(t){if(sy(t)===!1)return!1;const e=t.constructor;if(e===void 0||typeof e!="function")return!0;const n=e.prototype;return!(sy(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Zq(t){return eg(t)?{...t}:Array.isArray(t)?[...t]:t}const Kde=new Set(["string","number","symbol"]);function tg(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fu(t,e,n){const a=new t._zod.constr(e??t._zod.def);return(!e||n?.parent)&&(a._zod.parent=t),a}function zt(t){const e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function Zde(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}const Vde={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]};function Jde(t,e){const n=t._zod.def,a=mp(t._zod.def,{get shape(){const r={};for(const i in e){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);e[i]&&(r[i]=n.shape[i])}return Ap(this,"shape",r),r},checks:[]});return fu(t,a)}function Xde(t,e){const n=t._zod.def,a=mp(t._zod.def,{get shape(){const r={...t._zod.def.shape};for(const i in e){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);e[i]&&delete r[i]}return Ap(this,"shape",r),r},checks:[]});return fu(t,a)}function epe(t,e){if(!eg(e))throw new Error("Invalid input to extend: expected a plain object");const n=t._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const r=mp(t._zod.def,{get shape(){const i={...t._zod.def.shape,...e};return Ap(this,"shape",i),i},checks:[]});return fu(t,r)}function tpe(t,e){if(!eg(e))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...t._zod.def,get shape(){const a={...t._zod.def.shape,...e};return Ap(this,"shape",a),a},checks:t._zod.def.checks};return fu(t,n)}function npe(t,e){const n=mp(t._zod.def,{get shape(){const a={...t._zod.def.shape,...e._zod.def.shape};return Ap(this,"shape",a),a},get catchall(){return e._zod.def.catchall},checks:[]});return fu(t,n)}function ape(t,e,n){const a=mp(e._zod.def,{get shape(){const r=e._zod.def.shape,i={...r};if(n)for(const o in n){if(!(o in r))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(i[o]=t?new t({type:"optional",innerType:r[o]}):r[o])}else for(const o in r)i[o]=t?new t({type:"optional",innerType:r[o]}):r[o];return Ap(this,"shape",i),i},checks:[]});return fu(e,a)}function rpe(t,e,n){const a=mp(e._zod.def,{get shape(){const r=e._zod.def.shape,i={...r};if(n)for(const o in n){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(i[o]=new t({type:"nonoptional",innerType:r[o]}))}else for(const o in r)i[o]=new t({type:"nonoptional",innerType:r[o]});return Ap(this,"shape",i),i},checks:[]});return fu(e,a)}function yA(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue!==!0)return!0;return!1}function wA(t,e){return e.map(n=>{var a;return(a=n).path??(a.path=[]),n.path.unshift(t),n})}function wk(t){return typeof t=="string"?t:t?.message}function Wl(t,e,n){const a={...t,path:t.path??[]};if(!t.message){const r=wk(t.inst?._zod.def?.error?.(t))??wk(e?.error?.(t))??wk(n.customError?.(t))??wk(n.localeError?.(t))??"Invalid input";a.message=r}return delete a.inst,delete a.continue,e?.reportInput||delete a.input,a}function o4(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function cy(...t){const[e,n,a]=t;return typeof e=="string"?{message:e,code:"custom",input:n,inst:a}:{...e}}const Vq=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,uQ,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Jq=Xe("$ZodError",Vq),Xq=Xe("$ZodError",Vq,{Parent:Error});function ipe(t,e=n=>n.message){const n={},a=[];for(const r of t.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(e(r))):a.push(e(r));return{formErrors:a,fieldErrors:n}}function ope(t,e=n=>n.message){const n={_errors:[]},a=r=>{for(const i of r.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(o=>a({issues:o}));else if(i.code==="invalid_key")a({issues:i.issues});else if(i.code==="invalid_element")a({issues:i.issues});else if(i.path.length===0)n._errors.push(e(i));else{let o=n,s=0;for(;s<i.path.length;){const l=i.path[s];s===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(e(i))):o[l]=o[l]||{_errors:[]},o=o[l],s++}}};return a(t),n}const s4=t=>(e,n,a,r)=>{const i=a?Object.assign(a,{async:!1}):{async:!1},o=e._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new TA;if(o.issues.length){const s=new(r?.Err??t)(o.issues.map(l=>Wl(l,i,Yl())));throw Kq(s,r?.callee),s}return o.value},c4=t=>async(e,n,a,r)=>{const i=a?Object.assign(a,{async:!0}):{async:!0};let o=e._zod.run({value:n,issues:[]},i);if(o instanceof Promise&&(o=await o),o.issues.length){const s=new(r?.Err??t)(o.issues.map(l=>Wl(l,i,Yl())));throw Kq(s,r?.callee),s}return o.value},jE=t=>(e,n,a)=>{const r=a?{...a,async:!1}:{async:!1},i=e._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new TA;return i.issues.length?{success:!1,error:new(t??Jq)(i.issues.map(o=>Wl(o,r,Yl())))}:{success:!0,data:i.value}},spe=jE(Xq),GE=t=>async(e,n,a)=>{const r=a?Object.assign(a,{async:!0}):{async:!0};let i=e._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new t(i.issues.map(o=>Wl(o,r,Yl())))}:{success:!0,data:i.value}},cpe=GE(Xq),lpe=t=>(e,n,a)=>{const r=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return s4(t)(e,n,r)},upe=t=>(e,n,a)=>s4(t)(e,n,a),dpe=t=>async(e,n,a)=>{const r=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return c4(t)(e,n,r)},ppe=t=>async(e,n,a)=>c4(t)(e,n,a),Ape=t=>(e,n,a)=>{const r=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return jE(t)(e,n,r)},mpe=t=>(e,n,a)=>jE(t)(e,n,a),gpe=t=>async(e,n,a)=>{const r=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return GE(t)(e,n,r)},hpe=t=>async(e,n,a)=>GE(t)(e,n,a),fpe=/^[cC][^\s-]{8,}$/,bpe=/^[0-9a-z]+$/,ype=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,wpe=/^[0-9a-vA-V]{20}$/,kpe=/^[A-Za-z0-9]{27}$/,vpe=/^[a-zA-Z0-9_-]{21}$/,_pe=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Cpe=/^([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})$/,OR=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[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)$/,Epe=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,xpe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Bpe(){return new RegExp(xpe,"u")}const Ipe=/^(?:(?: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])$/,Dpe=/^(([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}|:))$/,Qpe=/^((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])$/,Spe=/^(([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])$/,Tpe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ez=/^[A-Za-z0-9_-]*$/,Fpe=/^\+(?:[0-9]){6,14}[0-9]$/,tz="(?:(?:\\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])))",Lpe=new RegExp(`^${tz}$`);function nz(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Npe(t){return new RegExp(`^${nz(t)}$`)}function Rpe(t){const e=nz({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const a=`${e}(?:${n.join("|")})`;return new RegExp(`^${tz}T(?:${a})$`)}const Mpe=t=>{const e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},$pe=/^-?\d+$/,Ppe=/^-?\d+(?:\.\d+)?/,Ope=/^(?:true|false)$/i,jpe=/^[^A-Z]*$/,Gpe=/^[^a-z]*$/,Ui=Xe("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),az={number:"number",bigint:"bigint",object:"date"},rz=Xe("$ZodCheckLessThan",(t,e)=>{Ui.init(t,e);const n=az[typeof e.value];t._zod.onattach.push(a=>{const r=a._zod.bag,i=(e.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<i&&(e.inclusive?r.maximum=e.value:r.exclusiveMaximum=e.value)}),t._zod.check=a=>{(e.inclusive?a.value<=e.value:a.value<e.value)||a.issues.push({origin:n,code:"too_big",maximum:e.value,input:a.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),iz=Xe("$ZodCheckGreaterThan",(t,e)=>{Ui.init(t,e);const n=az[typeof e.value];t._zod.onattach.push(a=>{const r=a._zod.bag,i=(e.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>i&&(e.inclusive?r.minimum=e.value:r.exclusiveMinimum=e.value)}),t._zod.check=a=>{(e.inclusive?a.value>=e.value:a.value>e.value)||a.issues.push({origin:n,code:"too_small",minimum:e.value,input:a.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),qpe=Xe("$ZodCheckMultipleOf",(t,e)=>{Ui.init(t,e),t._zod.onattach.push(n=>{var a;(a=n._zod.bag).multipleOf??(a.multipleOf=e.value)}),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%e.value===BigInt(0):Hde(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),zpe=Xe("$ZodCheckNumberFormat",(t,e)=>{Ui.init(t,e),e.format=e.format||"float64";const n=e.format?.includes("int"),a=n?"int":"number",[r,i]=Vde[e.format];t._zod.onattach.push(o=>{const s=o._zod.bag;s.format=e.format,s.minimum=r,s.maximum=i,n&&(s.pattern=$pe)}),t._zod.check=o=>{const s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:a,format:e.format,code:"invalid_type",continue:!1,input:s,inst:t});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:a,continue:!e.abort}):o.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:a,continue:!e.abort});return}}s<r&&o.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),s>i&&o.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inst:t})}}),Upe=Xe("$ZodCheckMaxLength",(t,e)=>{var n;Ui.init(t,e),(n=t._zod.def).when??(n.when=a=>{const r=a.value;return!r4(r)&&r.length!==void 0}),t._zod.onattach.push(a=>{const r=a._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<r&&(a._zod.bag.maximum=e.maximum)}),t._zod.check=a=>{const r=a.value;if(r.length<=e.maximum)return;const o=o4(r);a.issues.push({origin:o,code:"too_big",maximum:e.maximum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),Hpe=Xe("$ZodCheckMinLength",(t,e)=>{var n;Ui.init(t,e),(n=t._zod.def).when??(n.when=a=>{const r=a.value;return!r4(r)&&r.length!==void 0}),t._zod.onattach.push(a=>{const r=a._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>r&&(a._zod.bag.minimum=e.minimum)}),t._zod.check=a=>{const r=a.value;if(r.length>=e.minimum)return;const o=o4(r);a.issues.push({origin:o,code:"too_small",minimum:e.minimum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),Ype=Xe("$ZodCheckLengthEquals",(t,e)=>{var n;Ui.init(t,e),(n=t._zod.def).when??(n.when=a=>{const r=a.value;return!r4(r)&&r.length!==void 0}),t._zod.onattach.push(a=>{const r=a._zod.bag;r.minimum=e.length,r.maximum=e.length,r.length=e.length}),t._zod.check=a=>{const r=a.value,i=r.length;if(i===e.length)return;const o=o4(r),s=i>e.length;a.issues.push({origin:o,...s?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:a.value,inst:t,continue:!e.abort})}}),qE=Xe("$ZodCheckStringFormat",(t,e)=>{var n,a;Ui.init(t,e),t._zod.onattach.push(r=>{const i=r._zod.bag;i.format=e.format,e.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(e.pattern))}),e.pattern?(n=t._zod).check??(n.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:e.format,input:r.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(a=t._zod).check??(a.check=()=>{})}),Wpe=Xe("$ZodCheckRegex",(t,e)=>{qE.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Kpe=Xe("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=jpe),qE.init(t,e)}),Zpe=Xe("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Gpe),qE.init(t,e)}),Vpe=Xe("$ZodCheckIncludes",(t,e)=>{Ui.init(t,e);const n=tg(e.includes),a=new RegExp(typeof e.position=="number"?`^.{${e.position}}${n}`:n);e.pattern=a,t._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(a)}),t._zod.check=r=>{r.value.includes(e.includes,e.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:r.value,inst:t,continue:!e.abort})}}),Jpe=Xe("$ZodCheckStartsWith",(t,e)=>{Ui.init(t,e);const n=new RegExp(`^${tg(e.prefix)}.*`);e.pattern??(e.pattern=n),t._zod.onattach.push(a=>{const r=a._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),t._zod.check=a=>{a.value.startsWith(e.prefix)||a.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:a.value,inst:t,continue:!e.abort})}}),Xpe=Xe("$ZodCheckEndsWith",(t,e)=>{Ui.init(t,e);const n=new RegExp(`.*${tg(e.suffix)}$`);e.pattern??(e.pattern=n),t._zod.onattach.push(a=>{const r=a._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),t._zod.check=a=>{a.value.endsWith(e.suffix)||a.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:a.value,inst:t,continue:!e.abort})}}),eAe=Xe("$ZodCheckOverwrite",(t,e)=>{Ui.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}});class tAe{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const a=e.split(`
3
3
  `).filter(o=>o),r=Math.min(...a.map(o=>o.length-o.trimStart().length)),i=a.map(o=>o.slice(r)).map(o=>" ".repeat(this.indent*2)+o);for(const o of i)this.content.push(o)}compile(){const e=Function,n=this?.args,r=[...(this?.content??[""]).map(i=>` ${i}`)];return new e(...n,r.join(`
4
4
  `))}}const nAe={major:4,minor:1,patch:13},ha=Xe("$ZodType",(t,e)=>{var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=nAe;const a=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&a.unshift(t);for(const r of a)for(const i of r._zod.onattach)i(t);if(a.length===0)(n=t._zod).deferred??(n.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const r=(o,s,l)=>{let u=yA(o),d;for(const p of s){if(p._zod.def.when){if(!p._zod.def.when(o))continue}else if(u)continue;const A=o.issues.length,m=p._zod.check(o);if(m instanceof Promise&&l?.async===!1)throw new TA;if(d||m instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await m,o.issues.length!==A&&(u||(u=yA(o,A)))});else{if(o.issues.length===A)continue;u||(u=yA(o,A))}}return d?d.then(()=>o):o},i=(o,s,l)=>{if(yA(o))return o.aborted=!0,o;const u=r(s,a,l);if(u instanceof Promise){if(l.async===!1)throw new TA;return u.then(d=>t._zod.parse(d,l))}return t._zod.parse(u,l)};t._zod.run=(o,s)=>{if(s.skipChecks)return t._zod.parse(o,s);if(s.direction==="backward"){const u=t._zod.parse({value:o.value,issues:[]},{...s,skipChecks:!0});return u instanceof Promise?u.then(d=>i(d,o,s)):i(u,o,s)}const l=t._zod.parse(o,s);if(l instanceof Promise){if(s.async===!1)throw new TA;return l.then(u=>r(u,a,s))}return r(l,a,s)}}t["~standard"]={validate:r=>{try{const i=spe(t,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return cpe(t,r).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}}),l4=Xe("$ZodString",(t,e)=>{ha.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Mpe(t._zod.bag),t._zod.parse=(n,a)=>{if(e.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}}),fa=Xe("$ZodStringFormat",(t,e)=>{qE.init(t,e),l4.init(t,e)}),aAe=Xe("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Cpe),fa.init(t,e)}),rAe=Xe("$ZodUUID",(t,e)=>{if(e.version){const a={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(a===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=OR(a))}else e.pattern??(e.pattern=OR());fa.init(t,e)}),iAe=Xe("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Epe),fa.init(t,e)}),oAe=Xe("$ZodURL",(t,e)=>{fa.init(t,e),t._zod.check=n=>{try{const a=n.value.trim(),r=new URL(a);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:n.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:n.value,inst:t,continue:!e.abort})),e.normalize?n.value=r.href:n.value=a;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!e.abort})}}}),sAe=Xe("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Bpe()),fa.init(t,e)}),cAe=Xe("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=vpe),fa.init(t,e)}),lAe=Xe("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=fpe),fa.init(t,e)}),uAe=Xe("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=bpe),fa.init(t,e)}),dAe=Xe("$ZodULID",(t,e)=>{e.pattern??(e.pattern=ype),fa.init(t,e)}),pAe=Xe("$ZodXID",(t,e)=>{e.pattern??(e.pattern=wpe),fa.init(t,e)}),AAe=Xe("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=kpe),fa.init(t,e)}),mAe=Xe("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=Rpe(e)),fa.init(t,e)}),gAe=Xe("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=Lpe),fa.init(t,e)}),hAe=Xe("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Npe(e)),fa.init(t,e)}),fAe=Xe("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=_pe),fa.init(t,e)}),bAe=Xe("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=Ipe),fa.init(t,e),t._zod.bag.format="ipv4"}),yAe=Xe("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=Dpe),fa.init(t,e),t._zod.bag.format="ipv6",t._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!e.abort})}}}),wAe=Xe("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Qpe),fa.init(t,e)}),kAe=Xe("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=Spe),fa.init(t,e),t._zod.check=n=>{const a=n.value.split("/");try{if(a.length!==2)throw new Error;const[r,i]=a;if(!i)throw new Error;const o=Number(i);if(`${o}`!==i)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!e.abort})}}});function oz(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const vAe=Xe("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=Tpe),fa.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=n=>{oz(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!e.abort})}});function _Ae(t){if(!ez.test(t))return!1;const e=t.replace(/[-_]/g,a=>a==="-"?"+":"/"),n=e.padEnd(Math.ceil(e.length/4)*4,"=");return oz(n)}const CAe=Xe("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=ez),fa.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=n=>{_Ae(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!e.abort})}}),EAe=Xe("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Fpe),fa.init(t,e)});function xAe(t,e=null){try{const n=t.split(".");if(n.length!==3)return!1;const[a]=n;if(!a)return!1;const r=JSON.parse(atob(a));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||e&&(!("alg"in r)||r.alg!==e))}catch{return!1}}const BAe=Xe("$ZodJWT",(t,e)=>{fa.init(t,e),t._zod.check=n=>{xAe(n.value,e.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!e.abort})}}),sz=Xe("$ZodNumber",(t,e)=>{ha.init(t,e),t._zod.pattern=t._zod.bag.pattern??Ppe,t._zod.parse=(n,a)=>{if(e.coerce)try{n.value=Number(n.value)}catch{}const r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;const i=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:t,...i?{received:i}:{}}),n}}),IAe=Xe("$ZodNumberFormat",(t,e)=>{zpe.init(t,e),sz.init(t,e)}),DAe=Xe("$ZodBoolean",(t,e)=>{ha.init(t,e),t._zod.pattern=Ope,t._zod.parse=(n,a)=>{if(e.coerce)try{n.value=!!n.value}catch{}const r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:t}),n}}),QAe=Xe("$ZodAny",(t,e)=>{ha.init(t,e),t._zod.parse=n=>n}),SAe=Xe("$ZodUnknown",(t,e)=>{ha.init(t,e),t._zod.parse=n=>n}),TAe=Xe("$ZodNever",(t,e)=>{ha.init(t,e),t._zod.parse=(n,a)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)});function jR(t,e,n){t.issues.length&&e.issues.push(...wA(n,t.issues)),e.value[n]=t.value}const FAe=Xe("$ZodArray",(t,e)=>{ha.init(t,e),t._zod.parse=(n,a)=>{const r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:t}),n;n.value=Array(r.length);const i=[];for(let o=0;o<r.length;o++){const s=r[o],l=e.element._zod.run({value:s,issues:[]},a);l instanceof Promise?i.push(l.then(u=>jR(u,n,o))):jR(l,n,o)}return i.length?Promise.all(i).then(()=>n):n}});function m_(t,e,n,a){t.issues.length&&e.issues.push(...wA(n,t.issues)),t.value===void 0?n in a&&(e.value[n]=void 0):e.value[n]=t.value}function cz(t){const e=Object.keys(t.shape);for(const a of e)if(!t.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);const n=Zde(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(n)}}function lz(t,e,n,a,r,i){const o=[],s=r.keySet,l=r.catchall._zod,u=l.def.type;for(const d in e){if(s.has(d))continue;if(u==="never"){o.push(d);continue}const p=l.run({value:e[d],issues:[]},a);p instanceof Promise?t.push(p.then(A=>m_(A,n,d,e))):m_(p,n,d,e)}return o.length&&n.issues.push({code:"unrecognized_keys",keys:o,input:e,inst:i}),t.length?Promise.all(t).then(()=>n):n}const LAe=Xe("$ZodObject",(t,e)=>{if(ha.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){const s=e.shape;Object.defineProperty(e,"shape",{get:()=>{const l={...s};return Object.defineProperty(e,"shape",{value:l}),l}})}const a=OE(()=>cz(e));Xn(t._zod,"propValues",()=>{const s=e.shape,l={};for(const u in s){const d=s[u]._zod;if(d.values){l[u]??(l[u]=new Set);for(const p of d.values)l[u].add(p)}}return l});const r=sy,i=e.catchall;let o;t._zod.parse=(s,l)=>{o??(o=a.value);const u=s.value;if(!r(u))return s.issues.push({expected:"object",code:"invalid_type",input:u,inst:t}),s;s.value={};const d=[],p=o.shape;for(const A of o.keys){const g=p[A]._zod.run({value:u[A],issues:[]},l);g instanceof Promise?d.push(g.then(h=>m_(h,s,A,u))):m_(g,s,A,u)}return i?lz(d,u,s,l,a.value,t):d.length?Promise.all(d).then(()=>s):s}}),NAe=Xe("$ZodObjectJIT",(t,e)=>{LAe.init(t,e);const n=t._zod.parse,a=OE(()=>cz(e)),r=A=>{const m=new tAe(["shape","payload","ctx"]),g=a.value,h=y=>{const v=PR(y);return`shape[${v}]._zod.run({ value: input[${v}], issues: [] }, ctx)`};m.write("const input = payload.value;");const f=Object.create(null);let b=0;for(const y of g.keys)f[y]=`key_${b++}`;m.write("const newResult = {};");for(const y of g.keys){const v=f[y],_=PR(y);m.write(`const ${v} = ${h(y)};`),m.write(`
5
5
  if (${v}.issues.length) {
package/dist/index.html CHANGED
@@ -4,17 +4,17 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Agent Chat</title>
7
- <script type="module" crossorigin src="/assets/index-CNX2Rkku.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-Bjes2WDZ.js"></script>
8
8
  <link rel="modulepreload" crossorigin href="/assets/katex-D_C5EOCM.js">
9
- <link rel="modulepreload" crossorigin href="/assets/markdown-BD8QolPl.js">
10
- <link rel="modulepreload" crossorigin href="/assets/icons-BMQGG5h-.js">
11
- <link rel="modulepreload" crossorigin href="/assets/vendor-ONMATJ-d.js">
12
- <link rel="modulepreload" crossorigin href="/assets/react-C5eMgCoK.js">
13
- <link rel="modulepreload" crossorigin href="/assets/acp-sdk-CEgMSyAg.js">
14
- <link rel="modulepreload" crossorigin href="/assets/radix-DPrMPFMI.js">
15
- <link rel="modulepreload" crossorigin href="/assets/framer-motion-BVRmlZkv.js">
9
+ <link rel="modulepreload" crossorigin href="/assets/markdown-DxfY7oCC.js">
10
+ <link rel="modulepreload" crossorigin href="/assets/icons-Bnyv_yj2.js">
11
+ <link rel="modulepreload" crossorigin href="/assets/vendor-DJ_E-kWT.js">
12
+ <link rel="modulepreload" crossorigin href="/assets/react-B42e77sA.js">
13
+ <link rel="modulepreload" crossorigin href="/assets/acp-sdk-gsCuRd1n.js">
14
+ <link rel="modulepreload" crossorigin href="/assets/radix-htOb34Il.js">
15
+ <link rel="modulepreload" crossorigin href="/assets/framer-motion-CZge_vRQ.js">
16
16
  <link rel="stylesheet" crossorigin href="/assets/katex-CyAuISp2.css">
17
- <link rel="stylesheet" crossorigin href="/assets/index-C0ImZKbu.css">
17
+ <link rel="stylesheet" crossorigin href="/assets/index-BTP0uDMO.css">
18
18
  </head>
19
19
  <body>
20
20
  <div id="root"></div>