@tinkerlandai/longplay-sdk 0.10.25 → 0.10.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/THIRD_PARTY_NOTICES.md +26 -0
- package/dist/{ai-usage-B6RepnmH.d.ts → ai-usage-E4c9NSJK.d.ts} +1 -1
- package/dist/{api-C9P338XT.d.ts → api-BpeJkr6U.d.ts} +390 -390
- package/dist/chunk-2KOQBV3Y.js +1 -0
- package/dist/chunk-2MTTK3BT.js +1 -0
- package/dist/chunk-3FPYCF7Z.js +1 -0
- package/dist/chunk-3VUPVXAV.js +1 -0
- package/dist/chunk-5RXU57I5.js +1 -0
- package/dist/chunk-6VY4PZZ6.js +1 -0
- package/dist/chunk-7CFF6SWH.js +1 -0
- package/dist/chunk-B5JHPPR4.js +10 -0
- package/dist/chunk-BZSKOOMM.js +1 -0
- package/dist/chunk-C6JRUYKW.js +1 -0
- package/dist/chunk-CILM5XMH.js +1 -0
- package/dist/chunk-CNIBGSVO.js +1 -0
- package/dist/chunk-CZ3H2X7D.js +1 -0
- package/dist/chunk-DCCM7FYR.js +1 -0
- package/dist/chunk-DCIGO3NJ.js +1 -0
- package/dist/chunk-DOJE7VUR.js +1 -0
- package/dist/{chunk-34I23EKZ.js → chunk-ECMWY3G2.js} +1 -1
- package/dist/chunk-G7NSECIG.js +1 -0
- package/dist/chunk-GIV4FOOW.js +1 -0
- package/dist/chunk-HMRIMJ5W.js +1 -0
- package/dist/chunk-JAKOBECD.js +1 -0
- package/dist/{chunk-O3LZPMS4.js → chunk-KRTX4QEH.js} +1 -1
- package/dist/chunk-LPDUK7HT.js +1 -0
- package/dist/chunk-MRFBMFNK.js +1 -0
- package/dist/chunk-MWDR5FEU.js +1 -0
- package/dist/chunk-MYUYN7ZG.js +1 -0
- package/dist/chunk-NMKZ724L.js +1 -0
- package/dist/chunk-O4KXODTJ.js +17 -0
- package/dist/chunk-ORPOCB2J.js +1 -0
- package/dist/chunk-PMCGTXGH.js +1 -0
- package/dist/{chunk-RKREEPCT.js → chunk-PWQ5BHBJ.js} +1 -1
- package/dist/chunk-SMIO7OG5.js +1 -0
- package/dist/chunk-T4GTAH43.js +1 -0
- package/dist/chunk-UBKD6VMS.js +1 -0
- package/dist/chunk-UHI7SPHK.js +1 -0
- package/dist/chunk-WM27UTWT.js +62 -0
- package/dist/chunk-WOT6VMZA.js +1 -0
- package/dist/{chunk-SJNF6JDJ.js → chunk-X7G7JMZ3.js} +1 -1
- package/dist/chunk-YSNMXK4R.js +1 -0
- package/dist/{configuration-sync-eEFj_oKG.d.ts → configuration-sync-DdTRUv7A.d.ts} +17 -17
- package/dist/content-UDP5VQS4.js +1 -0
- package/dist/funnel-host-purchase-5NLPYJRK.js +1 -0
- package/dist/{funnel-local-client-CSA9XoC4.d.ts → funnel-local-client-DoYVcZ1z.d.ts} +1696 -1696
- package/dist/funnel-node-evaluation-COxXtZEQ.d.ts +1003 -0
- package/dist/{funnel-process-client-RXgS2i-R.d.ts → funnel-process-client-DtXNiFQ-.d.ts} +1736 -1736
- package/dist/funnel-runtime-host-ZWUAGDBU.js +1 -0
- package/dist/index.d.ts +70 -69
- package/dist/index.js +1 -1
- package/dist/merchant-bridge-contracts-N3Q4W6ZU.js +1 -0
- package/dist/native-shell.js +1 -1
- package/dist/openrouter.d.ts +3 -3
- package/dist/openrouter.js +1 -1
- package/dist/operation-contracts-VURXKAFX.js +1 -0
- package/dist/page.d.ts +12 -12
- package/dist/page.js +1 -1
- package/dist/paywall-QQ2MC4KO.js +1 -0
- package/dist/paywall-session-WC2WFWBQ.js +1 -0
- package/dist/popup.d.ts +4 -4
- package/dist/popup.js +1 -1
- package/dist/react-native.d.ts +8 -8
- package/dist/react-native.js +1 -1
- package/dist/screen-renderer-G2EWN3WB.js +1 -0
- package/dist/server.d.ts +1752 -23
- package/dist/server.js +6 -1
- package/dist/visual-dom-5LUN4AHO.js +1 -0
- package/dist/visual.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2KI63SPJ.js +0 -10
- package/dist/chunk-2ZJ5CS5Q.js +0 -1
- package/dist/chunk-5HJMAZ7A.js +0 -1
- package/dist/chunk-7AXCG6NU.js +0 -1
- package/dist/chunk-BB5P5HPS.js +0 -1
- package/dist/chunk-C2BODHNY.js +0 -1
- package/dist/chunk-EIYWDWXP.js +0 -1
- package/dist/chunk-LFFBNGXP.js +0 -1
- package/dist/chunk-MHEYMXGZ.js +0 -17
- package/dist/chunk-ML3BIPM6.js +0 -1
- package/dist/chunk-O4535GJR.js +0 -6
- package/dist/chunk-OEH47Y2L.js +0 -1
- package/dist/chunk-THGLNE4K.js +0 -1
- package/dist/chunk-TUYBXAAK.js +0 -1
- package/dist/chunk-ZX2RWS3T.js +0 -1
- package/dist/content-FD2Q6XD6.js +0 -1
- package/dist/funnel-host-purchase-XW7IF52Y.js +0 -1
- package/dist/funnel-node-evaluation-Cg-4tcAs.d.ts +0 -2731
- package/dist/funnel-runtime-host-I6PJXVRC.js +0 -1
- package/dist/paywall-CGBFHFRU.js +0 -1
- package/dist/screen-renderer-WOMWOEYL.js +0 -1
- package/dist/visual-dom-7IF7ITAK.js +0 -1
- package/dist/{coupon-DyKA-BRG.d.ts → coupon-kfkIVf9n.d.ts} +4 -4
- package/dist/{presentation-loading-D0A9G_kT.d.ts → presentation-loading-iSaRiDP2.d.ts} +3 -3
- package/dist/{screen-DRP7nsrQ.d.ts → screen-CGCJ46b1.d.ts} +3 -3
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import{a as he}from"./chunk-WOT6VMZA.js";var cd={};he(cd,{$brand:()=>oi,$input:()=>Ou,$output:()=>Zu,INVALID:()=>q,NEVER:()=>ni,TimePrecision:()=>Mu,ZodAny:()=>Za,ZodArray:()=>Ca,ZodBase64:()=>Co,ZodBase64URL:()=>To,ZodBigInt:()=>Tt,ZodBigIntFormat:()=>Lo,ZodBoolean:()=>Ct,ZodCIDRv4:()=>Ao,ZodCIDRv6:()=>No,ZodCUID:()=>xo,ZodCUID2:()=>ko,ZodCatch:()=>el,ZodCodec:()=>Ar,ZodCompileAsyncError:()=>ae,ZodCompileUnsupportedError:()=>Z,ZodCreditCard:()=>wa,ZodCustom:()=>Nr,ZodCustomStringFormat:()=>Xe,ZodDate:()=>kr,ZodDefault:()=>Ga,ZodDiscriminatedUnion:()=>Ea,ZodE164:()=>Eo,ZodEmail:()=>bo,ZodEmoji:()=>vo,ZodEnum:()=>Ot,ZodError:()=>zg,ZodExactOptional:()=>Fo,ZodFile:()=>Ba,ZodFirstPartyTypeKind:()=>ml,ZodFunction:()=>ll,ZodGUID:()=>wo,ZodIBAN:()=>va,ZodIPv4:()=>Zo,ZodIPv6:()=>Oo,ZodISODate:()=>Ae,ZodISODateTime:()=>Oe,ZodISODuration:()=>Ce,ZodISOTime:()=>Ne,ZodInstanceOf:()=>dl,ZodIntersection:()=>Da,ZodIssueCode:()=>Ig,ZodJWT:()=>Do,ZodKSUID:()=>Po,ZodLazy:()=>ul,ZodLiteral:()=>Ua,ZodMAC:()=>ba,ZodMap:()=>Fa,ZodNaN:()=>rl,ZodNanoID:()=>zo,ZodNever:()=>Aa,ZodNonOptional:()=>Mo,ZodNull:()=>Sa,ZodNullable:()=>Wa,ZodNumber:()=>Nt,ZodNumberFormat:()=>Ye,ZodObject:()=>Sr,ZodOptional:()=>Zr,ZodPipe:()=>Or,ZodPrefault:()=>Xa,ZodPreprocess:()=>nl,ZodPromise:()=>al,ZodReadonly:()=>ol,ZodRealError:()=>re,ZodRecord:()=>Zt,ZodSet:()=>Ma,ZodString:()=>At,ZodStringFormat:()=>E,ZodSuccess:()=>Qa,ZodSymbol:()=>ka,ZodTemplateLiteral:()=>sl,ZodTransform:()=>Ja,ZodTuple:()=>Ra,ZodType:()=>S,ZodULID:()=>Io,ZodURL:()=>xr,ZodUUID:()=>me,ZodUndefined:()=>Ia,ZodUnion:()=>Pr,ZodUnknown:()=>Oa,ZodVoid:()=>Na,ZodXID:()=>So,ZodXor:()=>Ta,_ZodString:()=>yo,_default:()=>qa,_function:()=>Up,any:()=>bp,array:()=>Ir,base64:()=>ep,base64url:()=>tp,bigint:()=>hp,boolean:()=>xa,catch:()=>tl,check:()=>Bp,cidrv4:()=>Hf,cidrv6:()=>Qf,clone:()=>N,codec:()=>jp,coerce:()=>gl,compile:()=>Tu,config:()=>j,core:()=>be,creditCard:()=>np,cuid:()=>Bf,cuid2:()=>Jf,currencyCode:()=>ap,custom:()=>Jp,date:()=>vp,decode:()=>da,decodeAsync:()=>ha,deepPartial:()=>od,describe:()=>Kp,discriminatedUnion:()=>Pp,e164:()=>rp,email:()=>Tf,emoji:()=>Mf,encode:()=>pa,encodeAsync:()=>ma,endsWith:()=>$t,enum:()=>jo,exactOptional:()=>Ka,file:()=>Ep,flattenError:()=>Gt,float32:()=>fp,float64:()=>pp,formatError:()=>qt,fromJSONSchema:()=>rd,function:()=>Up,getDiscriminatedOption:()=>nu,getErrorMap:()=>Pg,globalRegistry:()=>B,gt:()=>pe,gte:()=>oe,guid:()=>Ef,hash:()=>lp,hex:()=>cp,hostname:()=>up,httpUrl:()=>Ff,iban:()=>op,includes:()=>gt,input:()=>sd,instanceof:()=>Gp,int:()=>_o,int32:()=>dp,int64:()=>gp,intersection:()=>La,invertCodec:()=>Vp,ipv4:()=>qf,ipv6:()=>Yf,iso:()=>Cr,json:()=>Xp,jwt:()=>ip,keyof:()=>zp,ksuid:()=>Gf,lazy:()=>cl,length:()=>Je,literal:()=>Tp,locales:()=>mr,looseObject:()=>Ip,looseRecord:()=>Op,lowercase:()=>mt,lt:()=>fe,lte:()=>ne,mac:()=>Xf,map:()=>Ap,maxLength:()=>Be,maxSize:()=>Ie,memoizer:()=>dr,meta:()=>Wp,mime:()=>bt,minLength:()=>ye,minSize:()=>de,multipleOf:()=>ke,nan:()=>Rp,nanoid:()=>Uf,nativeEnum:()=>Cp,negative:()=>io,never:()=>Ro,nonnegative:()=>uo,nonoptional:()=>Ha,nonpositive:()=>so,normalize:()=>wt,null:()=>Pa,nullable:()=>zr,nullish:()=>Dp,number:()=>za,object:()=>xp,optional:()=>Ge,output:()=>ud,overwrite:()=>le,parse:()=>ca,parseAsync:()=>aa,partialRecord:()=>Zp,pipe:()=>$o,positive:()=>oo,prefault:()=>Ya,preprocess:()=>Yp,prettifyError:()=>ai,promise:()=>Mp,properties:()=>yt,property:()=>co,readonly:()=>il,record:()=>Va,refine:()=>fl,regex:()=>dt,regexes:()=>ue,registry:()=>Cn,safeDecode:()=>_a,safeDecodeAsync:()=>ya,safeEncode:()=>ga,safeEncodeAsync:()=>$a,safeParse:()=>la,safeParseAsync:()=>fa,set:()=>Np,setErrorMap:()=>Sg,size:()=>Ue,slugify:()=>kt,startsWith:()=>_t,strictObject:()=>kp,string:()=>vr,stringFormat:()=>sp,stringbool:()=>qp,success:()=>Lp,superRefine:()=>pl,symbol:()=>$p,templateLiteral:()=>Fp,toJSONSchema:()=>po,toLowerCase:()=>zt,toUpperCase:()=>xt,toZod:()=>Rt,transform:()=>Vo,treeifyError:()=>ci,trim:()=>vt,tuple:()=>ja,uint32:()=>mp,uint64:()=>_p,ulid:()=>Kf,undefined:()=>yp,union:()=>Et,unknown:()=>We,uppercase:()=>ht,url:()=>Vf,util:()=>b,uuid:()=>Df,uuidv4:()=>Lf,uuidv6:()=>Rf,uuidv7:()=>jf,validate:()=>Xt,validateAsync:()=>Yt,void:()=>wp,withParser:()=>Tn,xid:()=>Wf,xor:()=>Sp});var be={};he(be,{$ZodAny:()=>Gs,$ZodArray:()=>eu,$ZodAsyncError:()=>ee,$ZodBase64:()=>Ds,$ZodBase64URL:()=>Ls,$ZodBigInt:()=>wn,$ZodBigIntFormat:()=>Bs,$ZodBoolean:()=>ur,$ZodCIDRv4:()=>Ts,$ZodCIDRv6:()=>Es,$ZodCUID:()=>vs,$ZodCUID2:()=>zs,$ZodCatch:()=>yu,$ZodCheck:()=>D,$ZodCheckBigIntFormat:()=>qi,$ZodCheckEndsWith:()=>us,$ZodCheckGreaterThan:()=>on,$ZodCheckIncludes:()=>is,$ZodCheckLengthEquals:()=>ts,$ZodCheckLessThan:()=>nn,$ZodCheckLowerCase:()=>ns,$ZodCheckMaxLength:()=>Qi,$ZodCheckMaxSize:()=>Xi,$ZodCheckMimeType:()=>ls,$ZodCheckMinLength:()=>es,$ZodCheckMinSize:()=>Yi,$ZodCheckMultipleOf:()=>Wi,$ZodCheckNumberFormat:()=>Gi,$ZodCheckOverwrite:()=>fs,$ZodCheckProperties:()=>as,$ZodCheckProperty:()=>cs,$ZodCheckRegex:()=>rs,$ZodCheckSizeEquals:()=>Hi,$ZodCheckStartsWith:()=>ss,$ZodCheckStringFormat:()=>at,$ZodCheckUpperCase:()=>os,$ZodCodec:()=>ar,$ZodCreditCard:()=>js,$ZodCustom:()=>Iu,$ZodCustomStringFormat:()=>Ms,$ZodCyclicError:()=>Pn,$ZodDate:()=>Hs,$ZodDefault:()=>hu,$ZodDiscriminatedUnion:()=>ou,$ZodE164:()=>Rs,$ZodEmail:()=>gs,$ZodEmoji:()=>bs,$ZodEncodeError:()=>ze,$ZodEnum:()=>au,$ZodError:()=>ui,$ZodExactOptional:()=>du,$ZodFile:()=>fu,$ZodFunction:()=>xu,$ZodGUID:()=>ms,$ZodIBAN:()=>Vs,$ZodIPv4:()=>As,$ZodIPv6:()=>Ns,$ZodISODate:()=>Ps,$ZodISODateTime:()=>Ss,$ZodISODuration:()=>Os,$ZodISOTime:()=>Zs,$ZodIntersection:()=>iu,$ZodJWT:()=>Fs,$ZodKSUID:()=>Is,$ZodLazy:()=>lr,$ZodLiteral:()=>lu,$ZodMAC:()=>Cs,$ZodMap:()=>uu,$ZodNaN:()=>bu,$ZodNanoID:()=>ws,$ZodNever:()=>Xs,$ZodNonOptional:()=>_u,$ZodNull:()=>Ws,$ZodNullable:()=>mu,$ZodNumber:()=>bn,$ZodNumberFormat:()=>Us,$ZodObject:()=>Ql,$ZodObjectJIT:()=>tu,$ZodOptional:()=>zn,$ZodPipe:()=>xn,$ZodPrefault:()=>gu,$ZodPreprocess:()=>wu,$ZodPromise:()=>ku,$ZodReadonly:()=>vu,$ZodRealError:()=>te,$ZodRecord:()=>su,$ZodRegistry:()=>Nn,$ZodSet:()=>cu,$ZodString:()=>je,$ZodStringFormat:()=>C,$ZodSuccess:()=>$u,$ZodSymbol:()=>Js,$ZodTemplateLiteral:()=>zu,$ZodTransform:()=>pu,$ZodTuple:()=>vn,$ZodType:()=>k,$ZodULID:()=>xs,$ZodURL:()=>ys,$ZodUUID:()=>hs,$ZodUndefined:()=>Ks,$ZodUnion:()=>cr,$ZodUnknown:()=>qs,$ZodVoid:()=>Ys,$ZodXID:()=>ks,$ZodXor:()=>ru,$brand:()=>oi,$constructor:()=>p,$input:()=>Ou,$output:()=>Zu,Doc:()=>Re,INVALID:()=>q,JSONSchema:()=>Af,JSONSchemaGenerator:()=>mo,NEVER:()=>ni,TimePrecision:()=>Mu,URL_BAD_FORMAT:()=>_s,URL_UNPARSEABLE:()=>rr,ZodCompileAsyncError:()=>ae,ZodCompileUnsupportedError:()=>Z,_any:()=>ic,_array:()=>pc,_base64:()=>eo,_base64url:()=>to,_bigint:()=>Hu,_boolean:()=>Xu,_catch:()=>fg,_check:()=>hf,_cidrv4:()=>Hn,_cidrv6:()=>Qn,_coercedBigint:()=>Qu,_coercedBoolean:()=>Yu,_coercedDate:()=>lc,_coercedNumber:()=>Bu,_coercedString:()=>Ru,_creditCard:()=>Vu,_cuid:()=>Jn,_cuid2:()=>Kn,_custom:()=>mc,_date:()=>ac,_decode:()=>Kr,_decodeAsync:()=>Gr,_default:()=>cg,_discriminatedUnion:()=>Xh,_e164:()=>ro,_email:()=>Ln,_emoji:()=>Un,_encode:()=>Jr,_encodeAsync:()=>Wr,_endsWith:()=>$t,_enum:()=>rg,_file:()=>dc,_float32:()=>Ku,_float64:()=>Wu,_gt:()=>pe,_gte:()=>oe,_guid:()=>Rn,_iban:()=>Fu,_includes:()=>gt,_int:()=>Ju,_int32:()=>Gu,_int64:()=>ec,_intersection:()=>Yh,_ipv4:()=>Xn,_ipv6:()=>Yn,_isoDate:()=>_r,_isoDateTime:()=>gr,_isoDuration:()=>yr,_isoTime:()=>$r,_jwt:()=>no,_ksuid:()=>qn,_lazy:()=>hg,_length:()=>Je,_literal:()=>og,_lowercase:()=>mt,_lt:()=>fe,_lte:()=>ne,_mac:()=>ju,_map:()=>eg,_max:()=>ne,_maxLength:()=>Be,_maxSize:()=>Ie,_mime:()=>bt,_min:()=>oe,_minLength:()=>ye,_minSize:()=>de,_multipleOf:()=>ke,_nan:()=>fc,_nanoid:()=>Bn,_nativeEnum:()=>ng,_negative:()=>io,_never:()=>uc,_nonnegative:()=>uo,_nonoptional:()=>ag,_nonpositive:()=>so,_normalize:()=>wt,_null:()=>oc,_nullable:()=>ug,_number:()=>Uu,_optional:()=>sg,_overwrite:()=>le,_parse:()=>it,_parseAsync:()=>st,_pipe:()=>pg,_positive:()=>oo,_promise:()=>gg,_properties:()=>yt,_property:()=>co,_readonly:()=>dg,_record:()=>Qh,_refine:()=>hc,_regex:()=>dt,_safeDecode:()=>Xr,_safeDecodeAsync:()=>Hr,_safeEncode:()=>qr,_safeEncodeAsync:()=>Yr,_safeParse:()=>ut,_safeParseAsync:()=>ct,_set:()=>tg,_size:()=>Ue,_slugify:()=>kt,_startsWith:()=>_t,_string:()=>Lu,_stringFormat:()=>Ke,_stringbool:()=>yc,_success:()=>lg,_superRefine:()=>gc,_symbol:()=>rc,_templateLiteral:()=>mg,_toLowerCase:()=>zt,_toUpperCase:()=>xt,_transform:()=>ig,_trim:()=>vt,_tuple:()=>Hh,_uint32:()=>qu,_uint64:()=>tc,_ulid:()=>Wn,_undefined:()=>nc,_union:()=>Gh,_unknown:()=>sc,_uppercase:()=>ht,_url:()=>hr,_uuid:()=>jn,_uuidv4:()=>Vn,_uuidv6:()=>Fn,_uuidv7:()=>Mn,_void:()=>cc,_xid:()=>Gn,_xor:()=>qh,base64Charset:()=>hn,base64urlCharset:()=>sr,canParseURL:()=>$s,clone:()=>N,compile:()=>Tu,compileFn:()=>En,config:()=>j,createStandardJSONSchemaMethod:()=>It,createToJSONSchemaMethod:()=>wc,decode:()=>tm,decodeAsync:()=>nm,describe:()=>_c,encode:()=>em,encodeAsync:()=>rm,extractDefs:()=>Pe,finalize:()=>Ze,flattenError:()=>Gt,formatError:()=>qt,getDiscriminatedOption:()=>nu,globalConfig:()=>M,globalRegistry:()=>B,handleUnrepresentable:()=>V,initializeContext:()=>Se,isBackEdge:()=>On,isRecursiveSchema:()=>Zn,isValidBase64:()=>ir,isValidBase64URL:()=>gn,isValidCIDRv6:()=>mn,isValidCreditCard:()=>_n,isValidIBAN:()=>$n,isValidIPv6:()=>or,isValidJWT:()=>yn,locales:()=>mr,memoizer:()=>dr,mergeValues:()=>lt,meta:()=>$c,parse:()=>Ur,parseAsync:()=>Br,parseURLObject:()=>Xl,prettifyError:()=>ai,process:()=>T,processSchema:()=>T,regexes:()=>ue,registry:()=>Cn,safeDecode:()=>im,safeDecodeAsync:()=>um,safeEncode:()=>om,safeEncodeAsync:()=>sm,safeParse:()=>qd,safeParseAsync:()=>Xd,standardProps:()=>ln,stripTabAndNewline:()=>nr,toDotPath:()=>Zl,toJSONSchema:()=>po,toZod:()=>Rt,treeifyError:()=>ci,urlHostnameOk:()=>pn,urlProtocolOk:()=>dn,util:()=>b,validate:()=>Xt,validateAsync:()=>Yt,validateURL:()=>fn,version:()=>ps,withParser:()=>Tn});var b={};he(b,{BIGINT_FORMAT_RANGES:()=>Ut,CONSTANT_CATCH:()=>Fr,Class:()=>Ko,NUMBER_FORMAT_RANGES:()=>Mt,aborted:()=>G,allowsEval:()=>qo,assert:()=>hd,assertEqual:()=>fd,assertIs:()=>dd,assertNever:()=>md,assertNotEqual:()=>pd,assignProp:()=>U,attachSchema:()=>Bt,base64ToUint8Array:()=>zl,base64urlToUint8Array:()=>Td,cached:()=>tt,captureStackTrace:()=>Rr,cleanEnum:()=>Cd,cleanRegex:()=>_e,clone:()=>N,cloneDef:()=>$d,codePointLength:()=>De,constantCatch:()=>ti,createTransparentProxy:()=>xd,defineLazy:()=>Wo,defineLazyInternal:()=>P,derived:()=>Rd,esc:()=>W,escapeRegex:()=>se,explicitlyAborted:()=>Ho,extend:()=>Sd,finalizeIssue:()=>Q,floatSafeRemainder:()=>jt,getElementAtPath:()=>yd,getEnumValues:()=>Qe,getLengthableOrigin:()=>Kt,getParsedType:()=>zd,getSizableOrigin:()=>Jt,hexToUint8Array:()=>Dd,hide:()=>Wt,installLazyProp:()=>Md,isObject:()=>Ee,isPlainObject:()=>ie,issue:()=>ot,joinValues:()=>Dr,jsonStringifyReplacer:()=>et,members:()=>ei,merge:()=>Zd,mergeDefs:()=>ce,normalizeParams:()=>_,nullish:()=>Lr,numKeys:()=>vd,objectClone:()=>gd,omit:()=>Id,optionalKeys:()=>Yo,own:()=>ve,parsedType:()=>Qo,partial:()=>Od,pick:()=>kd,prefixIssues:()=>H,primitiveTypes:()=>Xo,promiseAllObject:()=>bd,propertyKeyTypes:()=>Ft,randomString:()=>wd,rawShape:()=>rt,required:()=>Ad,safeExtend:()=>Pd,shallowClone:()=>Vt,sizeCaps:()=>nt,slugify:()=>Go,stringifyPrimitive:()=>jr,toZod:()=>Rt,uint8ArrayToBase64:()=>xl,uint8ArrayToBase64url:()=>Ed,uint8ArrayToHex:()=>Ld,unwrapMessage:()=>He});function fd(e){return e}function pd(e){return e}function Rt(){return e=>e}function dd(e){}function md(e){throw new Error("Unexpected value in exhaustive check")}function hd(e){}function Qe(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function Dr(e,t="|"){return e.map(r=>jr(r)).join(t)}function et(e,t){return typeof t=="bigint"?t.toString():t}var Jo=class{constructor(t){this._getter=t,this._value=void 0}get value(){let t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}};function tt(e){return new Jo(e)}function Lr(e){return e==null}function _e(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function jt(e,t){let r=e/t,n=Math.round(r),o=4*Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<o?0:r-n}var yl=Symbol("evaluating");function Wo(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==yl)return n===void 0&&(n=yl,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function gd(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function U(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function rt(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function ge(e){return rt(e._zod.def)??e._zod.def.shape}function bl(e,t,r){Object.defineProperty(e,t,{get(){let n=r();return U(this,t,n),n},enumerable:!0,configurable:!0})}function wl(e,t,r){t in e?U(e,t,r):e[t]=r}function Te(e,t,r,n){let o=ge(t);for(let i of r){let s=Object.getOwnPropertyDescriptor(o,i);s.enumerable&&(s.get?bl(e,i,()=>{let u=t._zod.def.shape[i];return n?n(u,i):u}):wl(e,i,n?n(s.value,i):s.value))}}function _d(e,t){for(let r of Reflect.ownKeys(t)){let n=Object.getOwnPropertyDescriptor(t,r);n.enumerable&&(n.get?bl(e,r,()=>t[r]):wl(e,r,n.value))}}function ce(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function $d(e){return ce(e._zod.def)}function yd(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function bd(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let o={};for(let i=0;i<t.length;i++)o[t[i]]=n[i];return o})}function wd(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function W(e){return JSON.stringify(e)}function Go(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Rr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ee(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var qo=tt(()=>{if(M.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function ie(e){if(Ee(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Ee(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Vt(e){return ie(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function vd(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var zd=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Ft=new Set(["string","number","symbol"]),Xo=new Set(["string","number","bigint","boolean","symbol","undefined"]);function se(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function N(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function _(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function xd(e){let t;return new Proxy({},{get(r,n,o){return t??(t=e()),Reflect.get(t,n,o)},set(r,n,o,i){return t??(t=e()),Reflect.set(t,n,o,i)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,o){return t??(t=e()),Reflect.defineProperty(t,n,o)}})}function jr(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Yo(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var Mt={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]},Ut={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function kd(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i={};return Te(i,e,Vr(e,t)),N(e,ce(r,{shape:i,checks:[]}))}function Vr(e,t){let r=ge(e),n=[];for(let o of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);t[o]&&n.push(o)}return n}function Id(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=new Set(Vr(e,t)),s={};return Te(s,e,Reflect.ownKeys(ge(e)).filter(u=>!i.has(u))),N(e,ce(r,{shape:s,checks:[]}))}function Sd(e,t){if(!ie(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let o=ge(e);for(let i of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(o,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return N(e,ce(e._zod.def,{shape:vl(e,t)}))}function vl(e,t){let r={};return Te(r,e,Reflect.ownKeys(ge(e))),_d(r,t),r}function Pd(e,t){if(!ie(t))throw new Error("Invalid input to safeExtend: expected a plain object");return N(e,ce(e._zod.def,{shape:vl(e,t)}))}function Zd(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r={};Te(r,e,Reflect.ownKeys(ge(e))),Te(r,t,Reflect.ownKeys(ge(t)));let n=ce(e._zod.def,{shape:r,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return N(e,n)}function Od(e,t,r,n="partial"){let i=t._zod.def.checks;if(i&&i.length>0)throw new Error(`.${n}() cannot be used on object schemas containing refinements`);let u=r?new Set(Vr(t,r)):void 0,c={};return Te(c,t,Reflect.ownKeys(ge(t)),e&&((a,l)=>u&&!u.has(l)?a:new e({type:"optional",innerType:a}))),N(t,ce(t._zod.def,{shape:c,checks:[]}))}function Ad(e,t,r){let n=r?new Set(Vr(t,r)):void 0,o={};return Te(o,t,Reflect.ownKeys(ge(t)),(i,s)=>n&&!n.has(s)?i:new e({type:"nonoptional",innerType:i})),N(t,ce(t._zod.def,{shape:o}))}function G(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Ho(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function H(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function He(e){return typeof e=="string"?e:e?.message}function nt(e){let t=[];for(let r of e??[]){let n=r._zod.def;if(!/_(length|size)$|_equals$/.test(n.check))break;let o=n.maximum??n.length??n.size;o>=0&&t.push([o,r])}return t}function Bt(e,t,r){var n;for(let o=t;o<e.length;o++)(n=e[o]).schema??(n.schema=r)}function Q(e,t,r){var n;let o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(n=e).schema??(n.schema=e.inst):e.schema=e.inst);let i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,s=e.message?e.message:He(e.inst?._zod.def?.error?.(e))??He(i?.(e))??He(t?.error?.(e))??He(r.customError?.(e))??He(r.localeError?.(e))??"Invalid input",u={};for(let c of Object.keys(e))c==="inst"||c==="schema"||c==="continue"||c==="input"||c==="__proto__"||(u[c]=e[c]);return u.path??(u.path=[]),u.message=s,t?.reportInput&&(u.input=e.input),u}function Jt(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}var Nd=/[\uD800-\uDBFF]/;function De(e){let t=e.length;if(!Nd.test(e))return t;let r=t;for(let n=0;n<t-1;n++)(e.charCodeAt(n)&64512)===55296&&(e.charCodeAt(n+1)&64512)===56320&&(r--,n++);return r}function Kt(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Qo(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function ot(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function Cd(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function zl(e){let t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function xl(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function Td(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return zl(t+r)}function Ed(e){return xl(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Dd(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let n=0;n<t.length;n+=2)r[n/2]=Number.parseInt(t.slice(n,n+2),16);return r}function Ld(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Ko=class{constructor(...t){}};function ei(e,t){for(let r in t){let n=Object.getOwnPropertyDescriptor(t,r);n.get?Object.defineProperty(e,r,{...n,enumerable:!1}):jd(e,r,n.value)}}function ve(e,t,r,n=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:n,value:r}),r}function Wt(e,t,r){return ve(e,t,r,!1)}function Rd(e,t){for(let r in e){let n=e[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get(){return ve(this,r,n(this))},set(o){ve(this,r,o)}})}return t}function jd(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:ve(this,t,r.bind(this))},set(n){ve(this,t,n)}})}function Vd(e,t){let r=Object.getPrototypeOf(e);return t in r?void 0:r}var Bo,we=!1,Fd={configurable:!0,get(){we=!0}};function P(e,t,r){let n=Object.getPrototypeOf(e._zod);if(t in n&&Bo!==e._zod){Bo=void 0;return}Bo=e._zod,Object.defineProperty(n,t,{configurable:!0,get(){Object.defineProperty(this,t,Fd);let o=we;we=!1;try{let i=r(this);return we?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),we=we||o,i}catch(i){throw delete this[t],we=we||o,i}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function Md(e,t,r,n){let o=Vd(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){let i={configurable:!0,writable:!0,enumerable:n,value:void 0};return Object.defineProperty(this,t,i),i.value=r(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:n,value:i})}})}var Fr="~constantCatch";function ti(e){let t=()=>e;return t[Fr]=!0,t}var kl,ni=Object.freeze({status:"aborted"}),ri={value:void 0,enumerable:!1},Il="captureStackTrace"in Error?Error:null;function Ud(e){let t=Il;if(t){let r=t.stackTraceLimit;if(typeof r=="number"){try{t.stackTraceLimit=0}catch{return Il=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}function p(e,t,r,n){let o={};function i(m){this.def=m,this.constr=f,this.traits=new Set}i.prototype=o;let s=r,u=s&&new WeakSet;function c(m,d){if(m._zod){if(m._zod.traits.has(e))return}else{ri.value=new i(d);try{Object.defineProperty(m,"_zod",ri)}finally{ri.value=void 0}}if(m._zod.traits.add(e),t(m,d),u){let g=Object.getPrototypeOf(m),$=m._zod.constr.prototype,z=g;for(;z&&z!==$;)z=Object.getPrototypeOf(z);let w=z??g;u.has(w)||(u.add(w),ei(w,s))}let h=f.prototype;for(let g in h)Object.prototype.hasOwnProperty.call(h,g)&&(g in m||(m[g]=h[g].bind(m)))}let a=n?.Parent??Object;class l extends a{}Object.defineProperty(l,"name",{value:e});function f(m){let d=n?.Parent?Ud(l):this;c(d,m);let h=d._zod.deferred;if(h){for(let $ of h)$();d._zod.deferred=void 0}let g=globalThis.__zod_globalConfig?.postProcessor;return g&&g(d),d}return Object.defineProperty(f,"init",{value:c}),Object.defineProperty(f,Symbol.hasInstance,{value:m=>n?.Parent&&m instanceof n.Parent?!0:m?._zod?.traits?.has(e)}),Object.defineProperty(f,"name",{value:e}),f}var oi=Symbol("zod_brand"),ee=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},ze=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(kl=globalThis).__zod_globalConfig??(kl.__zod_globalConfig={});var M=globalThis.__zod_globalConfig;function j(e){return e&&Object.assign(M,e),M}function Bd(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,et,2)),e.message}function Jd(e){this._zod.message=e}var Kd={get:Bd,set:Jd,enumerable:!0,configurable:!0},si={value:void 0,enumerable:!1},Sl=new WeakSet([Object.prototype,Error.prototype]),Pl=(e,t)=>{e.name="$ZodError",si.value=t,Object.defineProperty(e,"issues",si),si.value=void 0,Object.defineProperty(e,"message",Kd);let r=Object.getPrototypeOf(e);Sl.has(r)||(Sl.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let n=()=>this.message;return Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0})}}))},ui=p("$ZodError",Pl),te=p("$ZodError",Pl,void 0,{Parent:Error});function Wd(e,t,r){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:r(),writable:!0,enumerable:!0,configurable:!0}):e[t]=r()),e[t]}function Gt(e,t=r=>r.message){let r={},n=[];for(let o of e.issues)o.path.length>0?Wd(r,o.path[0],()=>[]).push(t(o)):n.push(t(o));return{formErrors:n,fieldErrors:r}}function qt(e,t=r=>r.message){let r={_errors:[]},n=(o,i=[])=>{for(let s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(u=>n({issues:u},[...i,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...i,...s.path]);else{let u=[...i,...s.path];if(u.length===0)r._errors.push(t(s));else{let c=r,a=0;for(;a<u.length;){let l=u[a],f=a===u.length-1;if(l==="_errors"){f&&c._errors.push(t(s)),a++;continue}Object.prototype.hasOwnProperty.call(c,l)||Object.defineProperty(c,l,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let m=c[l];f&&m._errors.push(t(s)),c=m,a++}}}};return n(e),r}function ci(e,t=r=>r.message){let r={errors:[]},n=(o,i=[])=>{var s;for(let u of o.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(c=>n({issues:c},[...i,...u.path]));else if(u.code==="invalid_key")n({issues:u.issues},[...i,...u.path]);else if(u.code==="invalid_element")n({issues:u.issues},[...i,...u.path]);else{let c=[...i,...u.path];if(c.length===0){r.errors.push(t(u));continue}let a=r,l=0;for(;l<c.length;){let f=c[l],m=l===c.length-1;typeof f=="string"?(a.properties??(a.properties={}),Object.prototype.hasOwnProperty.call(a.properties,f)||Object.defineProperty(a.properties,f,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),a=a.properties[f]):(a.items??(a.items=[]),(s=a.items)[f]??(s[f]={errors:[]}),a=a.items[f]),m&&a.errors.push(t(u)),l++}}};return n(e),r}function Zl(e){let t=[],r=e.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?t.push(`[${n}]`):typeof n=="symbol"?t.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?t.push(`[${JSON.stringify(n)}]`):(t.length&&t.push("."),t.push(n));return t.join("")}function ai(e){let t=[],r=[...e.issues].sort((n,o)=>(n.path??[]).length-(o.path??[]).length);for(let n of r)t.push(`\u2716 ${n.message}`),n.path?.length&&t.push(` \u2192 at ${Zl(n.path)}`);return t.join(`
|
|
2
|
+
`)}function Mr(e,t){return{callee:t?.callee??e,Err:t?.Err}}var it=e=>{let t=(r,n,o,i)=>{let s=o?{...o,async:!1}:{async:!1},u=r._zod.run({value:n,issues:[]},s);if(u instanceof Promise)throw new ee;if(u.issues.length){let c=new(i?.Err??e)(u.issues.map(a=>Q(a,s,j())));throw Rr(c,i?.callee??t),c}return u.value};return t},Ur=it(te),st=e=>{let t=async(r,n,o,i)=>{let s=o?{...o,async:!0}:{async:!0},u=r._zod.run({value:n,issues:[]},s);if(u instanceof Promise&&(u=await u),u.issues.length){let c=new(i?.Err??e)(u.issues.map(a=>Q(a,s,j())));throw Rr(c,i?.callee??t),c}return u.value};return t},Br=st(te),ut=e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new ee;return i.issues.length?Ol(e,i.issues,o):{success:!0,data:i.value}},qd=ut(te);function Ol(e,t,r){let n;return{success:!1,get error(){return n||(n=new e(t.map(o=>Q(o,r,j()))),t=void 0,r=void 0),n},set error(o){n=o,t=void 0,r=void 0}}}var ct=e=>async(t,r,n)=>{let o=n?{...n,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?Ol(e,i.issues,o):{success:!0,data:i.value}},Xd=ct(te),Yd=Symbol.for("zod.compile.invalid"),Hd=Symbol.for("zod.compile.fallback"),Xt=((e,t,r)=>{let n=e._zod.bag.validator;if(n!==void 0){if(n(t)!==Yd)return!0;if(n.definite===!0&&r===void 0)return!1}return Qd(e,t,r)});function Qd(e,t,r){let n=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun,i;if(o?(n[Hd]=!0,i=o({value:t,issues:[]},n)):i=e._zod.run({value:t,issues:[]},n),i instanceof Promise)throw new ee;return i.issues.length===0}var Yt=async(e,t,r)=>{let n=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},o=e._zod.run({value:t,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length===0},Jr=e=>{let t=it(e),r=(n,o,i,s)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return t(n,o,u,Mr(r,s))};return r},em=Jr(te),Kr=e=>{let t=it(e),r=(n,o,i,s)=>t(n,o,i,Mr(r,s));return r},tm=Kr(te),Wr=e=>{let t=st(e),r=async(n,o,i,s)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return await t(n,o,u,Mr(r,s))};return r},rm=Wr(te),Gr=e=>{let t=st(e),r=async(n,o,i,s)=>await t(n,o,i,Mr(r,s));return r},nm=Gr(te),qr=e=>(t,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return ut(e)(t,r,o)},om=qr(te),Xr=e=>(t,r,n)=>ut(e)(t,r,n),im=Xr(te),Yr=e=>async(t,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return ct(e)(t,r,o)},sm=Yr(te),Hr=e=>async(t,r,n)=>ct(e)(t,r,n),um=Hr(te);var ue={};he(ue,{anyString:()=>Di,base64:()=>Si,base64url:()=>Pi,bigint:()=>Ri,boolean:()=>ji,browserEmail:()=>hm,cidrv4:()=>ki,cidrv6:()=>Ii,creditCard:()=>Qr,cuid:()=>fi,cuid2:()=>pi,currencyCode:()=>Ni,date:()=>Ci,datetime:()=>Ei,domain:()=>Oi,duration:()=>$i,e164:()=>Ai,email:()=>bi,emoji:()=>wi,extendedDuration:()=>cm,guid:()=>yi,hex:()=>Bi,hostname:()=>Zi,html5Email:()=>pm,httpProtocol:()=>Ht,iban:()=>en,idnEmail:()=>mm,integer:()=>Qt,ipv4:()=>vi,ipv6:()=>zi,ksuid:()=>hi,lowercase:()=>Mi,mac:()=>xi,md5_base64:()=>ym,md5_base64url:()=>bm,md5_hex:()=>$m,nanoid:()=>gi,nanoidOfLength:()=>_i,null:()=>Vi,number:()=>$e,rfc5322Email:()=>dm,sha1_base64:()=>vm,sha1_base64url:()=>zm,sha1_hex:()=>wm,sha256_base64:()=>km,sha256_base64url:()=>Im,sha256_hex:()=>xm,sha384_base64:()=>Pm,sha384_base64url:()=>Zm,sha384_hex:()=>Sm,sha512_base64:()=>Am,sha512_base64url:()=>Nm,sha512_hex:()=>Om,string:()=>Li,time:()=>Ti,ulid:()=>di,undefined:()=>Fi,unicodeEmail:()=>Al,uppercase:()=>Ui,uuid:()=>Le,uuid4:()=>am,uuid6:()=>lm,uuid7:()=>fm,xid:()=>mi});var fi=/^[cC][0-9a-z]{6,}$/,pi=/^[0-9a-z]+$/,di=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,mi=/^[0-9a-vA-V]{20}$/,hi=/^[A-Za-z0-9]{27}$/,gi=/^[a-zA-Z0-9_-]{21}$/;function _i(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var $i=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,cm=/^[-+]?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)?)??$/,yi=/^([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})$/,Le=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,am=Le(4),lm=Le(6),fm=Le(7),bi=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,pm=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,dm=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Al=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,mm=Al,hm=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,gm="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function wi(){return new RegExp(gm,"u")}var vi=/^(?:(?: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])$/,zi=/^(([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}|:))$/,xi=e=>{let t=se(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},ki=/^((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])$/,Ii=/^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Si=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Pi=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Zi=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Oi=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,Ht=/^https?$/,Ai=/^\+[1-9]\d{6,14}$/,Qr=/^\d(?:[ -]?\d){11,18}$/,Ni=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,en=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,Nl="(?:(?:\\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])))";function _m(e){return new RegExp(`^${e}$`)}var Ci=_m(Nl);function li(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ti(e){return new RegExp(`^${li(e)}$`)}function Ei(e){let t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${li({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,n=e.local?`${r}|${li({precision:e.precision})}`:r;return new RegExp(`^${Nl}T(?:${n})$`)}var Di=/^[\s\S]{0,}$/,Li=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Ri=/^-?\d+n?$/,Qt=/^-?\d+$/,$e=/^-?\d+(?:\.\d+)?$/,ji=/^(?:true|false)$/i,Vi=/^null$/i;var Fi=/^undefined$/i;var Mi=/^[^A-Z]*$/,Ui=/^[^a-z]*$/,Bi=/^[0-9a-fA-F]*$/;function er(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function tr(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var $m=/^[0-9a-fA-F]{32}$/,ym=er(22,"=="),bm=tr(22),wm=/^[0-9a-fA-F]{40}$/,vm=er(27,"="),zm=tr(27),xm=/^[0-9a-fA-F]{64}$/,km=er(43,"="),Im=tr(43),Sm=/^[0-9a-fA-F]{96}$/,Pm=er(64,""),Zm=tr(64),Om=/^[0-9a-fA-F]{128}$/,Am=er(86,"=="),Nm=tr(86);var D=p("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Ji=e=>{let t=e.value;return!Lr(t)&&t.size!==void 0},Ki=e=>{let t=e.value;return!Lr(t)&&t.length!==void 0},tn={number:"number",bigint:"bigint",object:"date"},nn=p("$ZodCheckLessThan",(e,t)=>{D.init(e,t);let r=tn[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:tn[typeof n.value]??r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),on=p("$ZodCheckGreaterThan",(e,t)=>{D.init(e,t);let r=tn[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:tn[typeof n.value]??r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Wi=p("$ZodCheckMultipleOf",(e,t)=>{D.init(e,t),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):jt(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Gi=p("$ZodCheckNumberFormat",(e,t)=>{D.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,i]=Mt[t.format];e._zod.check=s=>{let u=s.value;if(r){if(!Number.isInteger(u)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?s.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):s.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}u<o&&s.issues.push({origin:"number",input:u,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),u>i&&s.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),qi=p("$ZodCheckBigIntFormat",(e,t)=>{D.init(e,t);let[r,n]=Ut[t.format];e._zod.check=o=>{let i=o.value;i<r&&o.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>n&&o.issues.push({origin:"bigint",input:i,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),Xi=p("$ZodCheckMaxSize",(e,t)=>{var r;D.init(e,t),(r=e._zod.def).when??(r.when=Ji),e._zod.check=n=>{let o=n.value;o.size<=t.maximum||n.issues.push({origin:Jt(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Yi=p("$ZodCheckMinSize",(e,t)=>{var r;D.init(e,t),(r=e._zod.def).when??(r.when=Ji),e._zod.check=n=>{let o=n.value;o.size>=t.minimum||n.issues.push({origin:Jt(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Hi=p("$ZodCheckSizeEquals",(e,t)=>{var r;D.init(e,t),(r=e._zod.def).when??(r.when=Ji),e._zod.check=n=>{let o=n.value,i=o.size;if(i===t.size)return;let s=i>t.size;n.issues.push({origin:Jt(o),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Qi=p("$ZodCheckMaxLength",(e,t)=>{var r;D.init(e,t),(r=e._zod.def).when??(r.when=Ki),e._zod.check=n=>{let o=n.value,i=o.length;if((typeof o=="string"&&i>t.maximum?De(o):i)<=t.maximum)return;let u=Kt(o);n.issues.push({origin:u,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),es=p("$ZodCheckMinLength",(e,t)=>{var r;D.init(e,t),(r=e._zod.def).when??(r.when=Ki),e._zod.check=n=>{let o=n.value,i=o.length;if((typeof o=="string"&&i>=t.minimum&&i<t.minimum*2?De(o):i)>=t.minimum)return;let u=Kt(o);n.issues.push({origin:u,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),ts=p("$ZodCheckLengthEquals",(e,t)=>{var r;D.init(e,t),(r=e._zod.def).when??(r.when=Ki),e._zod.check=n=>{let o=n.value,i=o.length,s=typeof o=="string"&&i>=t.length&&i<=t.length*2?De(o):i;if(s===t.length)return;let u=Kt(o),c=s>t.length;n.issues.push({origin:u,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),at=p("$ZodCheckStringFormat",(e,t)=>{var r,n;D.init(e,t),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),rs=p("$ZodCheckRegex",(e,t)=>{at.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ns=p("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Mi),at.init(e,t)}),os=p("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Ui),at.init(e,t)}),is=p("$ZodCheckIncludes",(e,t)=>{D.init(e,t);let r=se(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position},}${r}`:r);t.pattern=n,e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),ss=p("$ZodCheckStartsWith",(e,t)=>{D.init(e,t);let r=new RegExp(`^${se(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),us=p("$ZodCheckEndsWith",(e,t)=>{D.init(e,t);let r=new RegExp(`.*${se(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function rn(e,t,r){e.issues.length&&t.issues.push(...H(r,e.issues))}var cs=p("$ZodCheckProperty",(e,t)=>{D.init(e,t),e._zod.check=r=>{let n=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(o=>rn(o,r,t.property));rn(n,r,t.property)}}),as=p("$ZodCheckProperties",(e,t)=>{D.init(e,t),Wt(e,Symbol.iterator,function*(){yield e});let r;e._zod.check=n=>{if(n.value==null){n.issues.push({expected:"object",code:"invalid_type",input:n.value,inst:e});return}r??(r=Reflect.ownKeys(t.shape).map(s=>[s,t.shape[s]]));let o=n.value,i;for(let[s,u]of r){let c=u._zod.run({value:o[s],issues:[]},{});c instanceof Promise?(i??(i=[]),i.push(c.then(a=>rn(a,n,s)))):rn(c,n,s)}if(i)return Promise.all(i).then(()=>{})}}),ls=p("$ZodCheckMimeType",(e,t)=>{D.init(e,t);let r=new Set(t.mime);e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e,continue:!t.abort})}}),fs=p("$ZodCheckOverwrite",(e,t)=>{D.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var Re=class{constructor(t=[],r={}){this.content=[],this.indent=0,this.args=t,this.closed=r}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
|
|
3
|
+
`).filter(s=>s),o=Math.min(...n.map(s=>s.length-s.trimStart().length)),i=n.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let t=Function,r=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
4
|
+
${r.join(`
|
|
5
|
+
`)}
|
|
6
|
+
};`)(...Object.values(this.closed))}};var ps={major:4,minor:6,patch:6};var k=p("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ps;let n=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...n??[]]:n?.length?[...n]:[];for(let i of o)for(let s of i._zod.onattach)s(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=(u,c,a)=>{if(u.memo)return u;let l=G(u),f;for(let m of c){if(m._zod.def.when){if(Ho(u)||!m._zod.def.when(u))continue}else if(l)continue;let d=u.issues.length,h=m._zod.check(u);if(h instanceof Promise&&a?.async===!1)throw new ee;if(f||h instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await h,u.issues.length!==d&&(Bt(u.issues,d,e),l||(l=G(u,d)))});else{if(u.issues.length===d)continue;Bt(u.issues,d,e),l||(l=G(u,d))}}return f?f.then(()=>u):u},s=(u,c,a)=>{if(G(u))return u.aborted=!0,u;let l=i(c,o,a);if(l instanceof Promise){if(a.async===!1)throw new ee;return l.then(f=>e._zod.parse(f,a))}return e._zod.parse(l,a)};e._zod.run=(u,c)=>{if(c.skipChecks)return e._zod.parse(u,c);if(c.direction==="backward"){let l=e._zod.parse({value:u.value,issues:[]},{...c,skipChecks:!0});return l instanceof Promise?l.then(f=>s(f,u,c)):s(l,u,c)}let a=e._zod.parse(u,c);if(a instanceof Promise){if(c.async===!1)throw new ee;return a.then(l=>i(l,o,c))}return i(a,o,c)}}},{get"~standard"(){return Wt(this,"~standard",ln(this))},set"~standard"(e){ve(this,"~standard",e)}}),ql=(e,t)=>e.issues.length?{issues:e.issues.map(r=>Q(r,t,j()))}:{value:e.value};async function Cm(e,t){let r={async:!0};return ql(await e._zod.run({value:t,issues:[]},r),r)}function ln(e){return{validate:t=>{let r={async:!1};try{let n=e._zod.run({value:t,issues:[]},r);if(!(n instanceof Promise))return ql(n,r)}catch{}return Cm(e,t)},vendor:"zod",version:1}}var je=p("$ZodString",(e,t)=>{k.init(e,t),e._zod.pattern=t.pattern??Di,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),C=p("$ZodStringFormat",(e,t)=>{at.init(e,t),je.init(e,t)}),ms=p("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=yi),C.init(e,t)}),hs=p("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Le(n))}else t.pattern??(t.pattern=Le());C.init(e,t)}),gs=p("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=bi),C.init(e,t)}),_s=1,rr=2;function $s(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function fn(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?$s(e)||rr:Xl(e,t)}function Xl(e,t){if(!t.normalize&&t.protocol?.source===Ht.source&&!/^https?:\/\//i.test(e))return _s;try{if(typeof URL<"u"){let r=URL;if(typeof r.parse=="function")return r.parse(e)??rr}return new URL(e)}catch{return rr}}var Tm=/[\t\n\r]/g;function nr(e){return e.replace(Tm,"")}function pn(e,t){return t.lastIndex=0,t.test(e.hostname)}function dn(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}var ys=p("$ZodURL",(e,t)=>{C.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),o=fn(n,t);if(o===_s){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}if(o===rr){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});return}if(o===!0){r.value=nr(n);return}t.hostname&&!pn(o,t.hostname)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort}),t.protocol&&!dn(o,t.protocol)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?o.href:nr(n);return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),bs=p("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=wi()),C.init(e,t)}),ws=p("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?gi:_i(t.length)),C.init(e,t)}),vs=p("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=fi),C.init(e,t)}),zs=p("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=pi),C.init(e,t)}),xs=p("$ZodULID",(e,t)=>{t.pattern??(t.pattern=di),C.init(e,t)}),ks=p("$ZodXID",(e,t)=>{t.pattern??(t.pattern=mi),C.init(e,t)}),Is=p("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=hi),C.init(e,t)}),Ss=p("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Ei(t)),C.init(e,t)}),Ps=p("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Ci),C.init(e,t)}),Zs=p("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ti(t)),C.init(e,t)}),Os=p("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=$i),C.init(e,t)}),As=p("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=vi),C.init(e,t)}),Em=/^[0-9a-fA-F:.]+$/;function or(e){return Em.test(e)?$s(`http://[${e}]`):!1}var Ns=p("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=zi),C.init(e,t),e._zod.check=r=>{or(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),Cs=p("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=xi(t.delimiter)),C.init(e,t)}),Ts=p("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ki),C.init(e,t)});function mn(e){let t=e.split("/");if(t.length!==2)return!1;let[r,n]=t;if(!n)return!1;let o=Number(n);return`${o}`!==n||o<0||o>128?!1:or(r)}var Es=p("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ii),C.init(e,t),e._zod.check=r=>{mn(r.value)||r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function ir(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var hn=/^[0-9a-zA-Z+/]*={0,2}$/,Ds=p("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=hn),C.init(e,t),e._zod.check=r=>{ir(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),sr=/^[A-Za-z0-9_-]*$/;function gn(e){if(!sr.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return ir(r)}var Ls=p("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=sr),C.init(e,t),e._zod.check=r=>{gn(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Rs=p("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Ai),C.init(e,t)}),Dm=/[- ]/g;function Lm(e){let t=e.length,r=1,n=0;for(;t;){let o=e.charCodeAt(--t)-48;r^=1,n+=r?[0,2,4,6,8,1,3,5,7,9][o]:o}return n%10===0}function _n(e){return Qr.test(e)?Lm(e.replace(Dm,"")):!1}var js=p("$ZodCreditCard",(e,t)=>{t.pattern??(t.pattern=Qr),C.init(e,t),e._zod.check=r=>{_n(r.value)||r.issues.push({code:"invalid_format",format:"credit_card",input:r.value,inst:e,continue:!t.abort})}});function Rm(e){let t=0,r=e.length;for(let n=4;n<r;n++){let o=e.charCodeAt(n);t=(o>=65?t*100+(o-55):t*10+(o-48))%97}for(let n=0;n<4;n++){let o=e.charCodeAt(n);t=(o>=65?t*100+(o-55):t*10+(o-48))%97}return t===1}function $n(e){return en.test(e)?Rm(e):!1}var Vs=p("$ZodIBAN",(e,t)=>{t.pattern??(t.pattern=en),C.init(e,t),e._zod.check=r=>{$n(r.value)||r.issues.push({code:"invalid_format",format:"iban",input:r.value,inst:e,continue:!t.abort})}});function yn(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}var Fs=p("$ZodJWT",(e,t)=>{C.init(e,t),e._zod.check=r=>{yn(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Ms=p("$ZodCustomStringFormat",(e,t)=>{C.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),bn=p("$ZodNumber",(e,t)=>{k.init(e,t),e._zod.pattern=$e,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),Us=p("$ZodNumberFormat",(e,t)=>{Gi.init(e,t),bn.init(e,t)}),ur=p("$ZodBoolean",(e,t)=>{k.init(e,t),e._zod.pattern=ji,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),wn=p("$ZodBigInt",(e,t)=>{k.init(e,t),e._zod.pattern=Ri,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Bs=p("$ZodBigIntFormat",(e,t)=>{qi.init(e,t),wn.init(e,t)}),Js=p("$ZodSymbol",(e,t)=>{k.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:o,inst:e}),r}}),Ks=p("$ZodUndefined",(e,t)=>{k.init(e,t),e._zod.pattern=Fi,e._zod.values=new Set([void 0]),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:e}),r}}),Ws=p("$ZodNull",(e,t)=>{k.init(e,t),e._zod.pattern=Vi,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),r}}),Gs=p("$ZodAny",(e,t)=>{k.init(e,t),e._zod.parse=r=>r}),qs=p("$ZodUnknown",(e,t)=>{k.init(e,t),e._zod.parse=r=>r}),Xs=p("$ZodNever",(e,t)=>{k.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Ys=p("$ZodVoid",(e,t)=>{k.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),r}}),Hs=p("$ZodDate",(e,t)=>{k.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,i=o instanceof Date;return i&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...i?{received:"Invalid Date"}:{},inst:e}),r}});function Qs(e,t){let r=nt(e._zod.def.checks);if(!r.length)return;let n=Math.min(...r.map(i=>i[0])),o=e._zod.parse;e._zod.parse=(i,s)=>{let u=t(i.value);if(u>n&&!s?.skipChecks&&s?.direction!=="backward"){for(let[c,a]of nt(e._zod.def.checks))if(u>c&&a._zod.def.when(i)){let l=i.issues.length;return a._zod.check(i),i.issues[l].continue=!1,Bt(i.issues,l,e),i}}return o(i,s)}}var jm=e=>Array.isArray(e)?e.length:-1,Vm=e=>e instanceof Map?e.size:-1,Fm=e=>e instanceof Set?e.size:-1;function Tl(e,t,r){e.issues.length&&t.issues.push(...H(r,e.issues)),t.value[r]=e.value}var eu=p("$ZodArray",(e,t)=>{k.init(e,t);let r=M.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=r?r.alloc(e,n,Array(i.length),o):Array(i.length);let s=[],u=o?.abortEarly;for(let c=0;c<i.length;c++){let a=i[c],l=t.element._zod.run({value:a,issues:[]},o);if(l instanceof Promise)s.push(l.then(f=>Tl(f,n,c)));else if(Tl(l,n,c),u&&l.issues.length!==0&&G(l))break}return s.length?Promise.all(s).then(()=>n):n},Qs(e,jm)});function an(e,t,r,n,o,i){let s=r in n,u=i==="optional";if(!(!s&&u&&o==="optional")){if(e.issues.length){if(o!==void 0&&u&&!s)return;t.issues.push(...H(r,e.issues))}if(!s&&o===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?(s||o==="defaulted"&&!u)&&(t.value[r]=void 0):t.value[r]=e.value}}var Mm=[];function Yl(e){let t=Object.keys(e.shape),r=Object.getOwnPropertySymbols(e.shape),n=r.length?r:Mm,o=n.length?[...t,...n]:t;for(let s of o)if(!e.shape?.[s]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(s)}": expected a Zod schema`);let i=Yo(e.shape);return{...e,allKeys:o,symbolKeys:n,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(i)}}function Hl(e,t,r,n,o,i,s){let u=[],c=o.keySet,a=o.catchall._zod,l=a.def.type,f=a.optin,m=a.optout,d=0;for(let h in t){if(s&&r.issues.length!==d){if(G(r,d))break;d=r.issues.length}if(c.has(h))continue;if(h==="__proto__"){l==="never"&&u.push(h);continue}if(l==="never"){u.push(h);continue}let g=a.run({value:t[h],issues:[]},n);g instanceof Promise?e.push(g.then($=>an($,r,h,t,f,m))):an(g,r,h,t,f,m)}return u.length&&r.issues.push({code:"unrecognized_keys",keys:u,input:t,inst:i,continue:!0}),e.length?Promise.all(e).then(()=>r):r}var Ql=p("$ZodObject",(e,t)=>{k.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape"),n=r?.get?r.get.raw:t.shape??{};if(n){let a=()=>{let l={...n};return Object.defineProperty(t,"shape",{value:l}),a.raw=l,l};a.raw=n,Object.defineProperty(t,"shape",{get:a})}let o=tt(()=>Yl(t));P(e,"propValues",a=>{let l=a.def.shape,f={};for(let m in l){let d=l[m]._zod;if(d.values){Object.prototype.hasOwnProperty.call(f,m)||U(f,m,new Set);for(let h of d.values)f[m].add(h);d.optin!==void 0&&f[m].add(void 0)}}return f});let i=Ee,s=t.catchall,u,c=M.memoizer;c?.attach(e),e._zod.parse=(a,l)=>{u??(u=o.value);let f=a.value;if(!i(f))return a.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),a;a.value=c?c.alloc(e,a,{},l):{};let m=[],d=u.shape,h=l?.abortEarly,g=a.issues.length;for(let $ of u.allKeys){if(h&&a.issues.length!==g){if(G(a,g))break;g=a.issues.length}if($==="__proto__")continue;let z=d[$],w=z._zod.optin,I=z._zod.optout,A=z._zod.run({value:f[$],issues:[]},l);A instanceof Promise?m.push(A.then(L=>an(L,a,$,f,w,I))):an(A,a,$,f,w,I)}return s?Hl(m,f,a,l,o.value,e,h===!0):m.length?Promise.all(m).then(()=>a):a}}),tu=p("$ZodObjectJIT",(e,t)=>{Ql.init(e,t);let r=e._zod.parse,n=tt(()=>Yl(t)),o=M.memoizer,i=d=>{let h=n.value,g=h.symbolKeys,$=new Re(["payload","ctx"],{shape:d,inst:e,memo:o,syms:g}),z=L=>`shape[${L}]._zod.run({ value: input[${L}], issues: [] }, ctx)`,w=(L,O)=>`
|
|
7
|
+
let ${L}_ab = false;
|
|
8
|
+
for (let i = 0; i < ${L}.issues.length; i++) {
|
|
9
|
+
const iss = ${L}.issues[i];
|
|
10
|
+
iss.path = iss.path ? [${O}, ...iss.path] : [${O}];
|
|
11
|
+
payload.issues.push(iss);
|
|
12
|
+
if (iss.continue !== true) ${L}_ab = true;
|
|
13
|
+
}
|
|
14
|
+
if (${L}_ab && ctx && ctx.abortEarly) {
|
|
15
|
+
payload.value = newResult;
|
|
16
|
+
return payload;
|
|
17
|
+
}`;$.write("const input = payload.value;");let I=Object.create(null),A=0;for(let L of h.allKeys)I[L]=`key_${A++}`;$.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let L of h.allKeys){if(L==="__proto__")continue;let O=I[L],J=typeof L=="symbol"?`syms[${g.indexOf(L)}]`:W(L),Lt=`${J} in input`,_l=d[L],Uo=_l?._zod?.optin,$l=Uo!==void 0,ad=_l?._zod?.optout==="optional";if($.write(`const ${O} = ${z(J)};`),$l&&ad){let ld=Uo==="optional"?`${O}_present`:`${O}.value !== undefined || ${O}_present`;$.write(`
|
|
18
|
+
const ${O}_present = ${Lt};
|
|
19
|
+
if (!${O}.issues.length || ${O}_present) {
|
|
20
|
+
if (${O}.issues.length) {${w(O,J)}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (${ld}) {
|
|
24
|
+
newResult[${J}] = ${O}.value;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
`)}else $l?($.write(`
|
|
29
|
+
if (${O}.issues.length) {${w(O,J)}
|
|
30
|
+
}
|
|
31
|
+
`),Uo==="defaulted"?$.write(`newResult[${J}] = ${O}.value;`):$.write(`
|
|
32
|
+
if (${O}.value !== undefined || ${Lt}) {
|
|
33
|
+
newResult[${J}] = ${O}.value;
|
|
34
|
+
}
|
|
35
|
+
`)):$.write(`
|
|
36
|
+
const ${O}_present = ${Lt};
|
|
37
|
+
if (${O}.issues.length) {${w(O,J)}
|
|
38
|
+
}
|
|
39
|
+
if (!${O}_present && !${O}.issues.length) {
|
|
40
|
+
payload.issues.push({
|
|
41
|
+
code: "invalid_type",
|
|
42
|
+
expected: "nonoptional",
|
|
43
|
+
input: undefined,
|
|
44
|
+
path: [${J}]
|
|
45
|
+
});
|
|
46
|
+
if (ctx && ctx.abortEarly) {
|
|
47
|
+
payload.value = newResult;
|
|
48
|
+
return payload;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (${O}_present) {
|
|
53
|
+
newResult[${J}] = ${O}.value;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
`)}return $.write("payload.value = newResult;"),$.write("return payload;"),$.compile()},s,u=Ee,c=!M.jitless,l=c&&qo.value,f=t.catchall,m;e._zod.parse=(d,h)=>{m??(m=n.value);let g=d.value;return u(g)?c&&l&&h?.async===!1&&h.jitless!==!0?(s||(s=i(t.shape)),d=s(d,h),f?Hl([],g,d,h,m,e,h?.abortEarly===!0):d):r(d,h):(d.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),d)}});function El(e,t,r,n){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let o=e.filter(i=>!G(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>Q(s,n,j())))}),t)}var cr=p("$ZodUnion",(e,t)=>{k.init(e,t),P(e,"optin",n=>n.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":n.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),P(e,"optout",n=>n.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),P(e,"values",n=>{if(n.def.options.every(o=>o._zod.values))return new Set(n.def.options.flatMap(o=>Array.from(o._zod.values)))}),P(e,"pattern",n=>{if(n.def.options.every(o=>o._zod.pattern)){let o=n.def.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>_e(i.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=!1,s=[];for(let u of t.options){let c=u._zod.run({value:n.value,issues:[]},o);if(c instanceof Promise)s.push(c),i=!0;else{if(c.issues.length===0)return c;s.push(c)}}return i?Promise.all(s).then(u=>El(u,n,e,o)):El(s,n,e,o)}});function Dl(e,t,r,n){let o=[];for(let i=0;i<e.length;i++)e[i].issues.length===0&&o.push(i);return o.length===1?(t.value=e[o[0]].value,t):(o.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>Q(s,n,j())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1,matches:o}),t)}var ru=p("$ZodXor",(e,t)=>{cr.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=!1,s=[];for(let u of t.options){let c=u._zod.run({value:n.value,issues:[]},o);c instanceof Promise?(s.push(c),i=!0):s.push(c)}return i?Promise.all(s).then(u=>Dl(u,n,e,o)):Dl(s,n,e,o)}});function nu(e,t){let r=e._zod,n=r.bag.optionsMap;n||(n=ef(r.def),r.bag.optionsMap=n);let o=n.get(t);if(o===null)throw new Error(`Ambiguous discriminator value "${String(t)}"`);return o}function ef(e){let t=new Map;for(let r of e.options){let n=r._zod.propValues?.[e.discriminator];if(!n||n.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(let o of n)if(t.has(o)){if(o!==void 0)throw new Error(`Duplicate discriminator value "${String(o)}"`);t.set(o,null)}else t.set(o,r)}return t}var ou=p("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,cr.init(e,t);let r=e._zod.parse;P(e,"propValues",o=>{let i={},s=0;for(let u of o.def.options){let c=u._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${o.def.options.indexOf(u)}"`);c[o.def.discriminator]?.has(void 0)&&s++;for(let[a,l]of Object.entries(c)){Object.prototype.hasOwnProperty.call(i,a)||U(i,a,new Set);for(let f of l)i[a].add(f)}}return!o.def.unionFallback&&s>1&&i[o.def.discriminator]?.delete(void 0),i}),t.options.forEach((o,i)=>{let s=rt(o._zod.def);if(s&&!Object.prototype.hasOwnProperty.call(s,t.discriminator))throw new Error(`Invalid discriminated union option at index "${i}"`)});let n=tt(()=>ef(t));e._zod.parse=(o,i)=>{let s=o.value;if(!Ee(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;let u=s?.[t.discriminator],c=n.value.get(u);return c&&(u!==void 0||i.direction!=="backward")?c._zod.run(o,i):t.unionFallback||i.direction==="backward"?r(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(n.value.keys()).filter(a=>n.value.get(a)!==null),input:s,path:[t.discriminator],inst:e}),o)}}),iu=p("$ZodIntersection",(e,t)=>{k.init(e,t),e._zod.parse=(r,n)=>{let o=r.value,i=t.left._zod.run({value:o,issues:[]},n),s=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,a])=>Ll(r,c,a)):Ll(r,i,s)}});function lt(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ie(e)&&ie(t)){let r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(let i of n){if(i==="__proto__")continue;let s=lt(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let o=e[n],i=t[n],s=lt(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Ll(e,t,r){let n=new Map,o,i=new Map,s=(a,l)=>{let f;if(a.code==="unrecognized_keys"&&!a.path?.length)o??(o=a),f=a.keys;else if(a.code==="invalid_key"&&a.origin==="record"&&a.path?.length===1){let m=String(a.path[0]);i.has(m)||i.set(m,a),f=[m]}else return!1;for(let m of f)n.has(m)||n.set(m,{}),n.get(m)[l]=!0;return!0};for(let a of t.issues)s(a,"l")||e.issues.push(a);for(let a of r.issues)s(a,"r")||e.issues.push(a);let u=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(u.length){let a=o?u.filter(l=>o.keys.includes(l)):[];a.length&&e.issues.push({...o,keys:a});for(let l of u)!a.includes(l)&&i.has(l)&&e.issues.push(i.get(l))}let c=lt(t.value,r.value);if(!c.valid){if(G(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var vn=p("$ZodTuple",(e,t)=>{k.init(e,t);let r=t.items,n=M.memoizer;n?.attach(e),e._zod.parse=(o,i)=>{let s=o.value;if(!Array.isArray(s))return o.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=n?n.alloc(e,o,[],i):[];let u=[],c=Rl(r,"optin"),a=Rl(r,"optout");if(!t.rest){if(s.length<c)return o.issues.push({code:"too_small",minimum:c,inclusive:!0,input:s,inst:e,origin:"array"}),o;s.length>r.length&&o.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:s,inst:e,origin:"array"})}let l=new Array(r.length),f=t.rest?i?.abortEarly:void 0,m=!1;for(let d=0;d<r.length;d++){let h=r[d]._zod.run({value:s[d],issues:[]},i);h instanceof Promise?u.push(h.then(g=>{l[d]=g})):(l[d]=h,f&&!m&&h.issues.length&&(m=G(h)))}if(t.rest&&!m){let d=r.length-1,h=s.slice(r.length),g=o.issues.length;for(let $ of h){if(f&&o.issues.length!==g){if(G(o,g))break;g=o.issues.length}d++;let z=t.rest._zod.run({value:$,issues:[]},i);z instanceof Promise?u.push(z.then(w=>jl(w,o,d))):jl(z,o,d)}}return u.length?Promise.all(u).then(()=>Vl(l,o,r,s,a)):Vl(l,o,r,s,a)}});function Rl(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function jl(e,t,r){e.issues.length&&t.issues.push(...H(r,e.issues)),t.value[r]=e.value}function Vl(e,t,r,n,o){for(let i=0;i<r.length;i++){let s=e[i],u=i<n.length;if(!u&&i>=o&&r[i]._zod.optin==="optional"){t.value.length=i;break}if(s.issues.length){if(!u&&i>=o){t.value.length=i;break}t.issues.push(...H(i,s.issues))}t.value[i]=s.value}for(let i=t.value.length-1;i>=n.length&&(r[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}var su=p("$ZodRecord",(e,t)=>{k.init(e,t);let r=M.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!ie(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;let s=[],u=t.keyType._zod.values;if(u&&!t.partial){n.value=r?r.alloc(e,n,{},o):{};let c=new Set;for(let l of u)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){if(c.add(typeof l=="number"?l.toString():l),l==="__proto__")continue;let f=t.keyType._zod.run({value:l,issues:[]},o);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(f.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(h=>Q(h,o,j())),input:l,path:[l],inst:e});continue}let m=f.value;if(m==="__proto__")continue;let d=t.valueType._zod.run({value:i[l],issues:[]},o);d instanceof Promise?s.push(d.then(h=>{h.issues.length&&n.issues.push(...H(l,h.issues)),n.value[m]=h.value})):(d.issues.length&&n.issues.push(...H(l,d.issues)),n.value[m]=d.value)}let a;for(let l in i)if(!c.has(l))if(t.mode==="loose"){if(l==="__proto__")continue;n.value[l]=i[l]}else a=a??[],a.push(l);a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:a,continue:!0})}else{n.value=r?r.alloc(e,n,{},o):{};let c;for(let a of Reflect.ownKeys(i)){if(a==="__proto__"||!Object.prototype.propertyIsEnumerable.call(i,a))continue;let l=t.keyType._zod.run({value:a,issues:[]},o);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&$e.test(a)&&l.issues.length){let h=t.keyType._zod.run({value:Number(a),issues:[]},o);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");h.issues.length===0&&(l=h)}if(l.issues.length){t.mode==="loose"?n.value[a]=i[a]:u?(c=c??[],c.push(a)):n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(h=>Q(h,o,j())),input:a,path:[a],inst:e});continue}let m=l.value;if(m==="__proto__")continue;let d=t.valueType._zod.run({value:i[a],issues:[]},o);d instanceof Promise?s.push(d.then(h=>{h.issues.length&&n.issues.push(...H(a,h.issues)),n.value[m]=h.value})):(d.issues.length&&n.issues.push(...H(a,d.issues)),n.value[m]=d.value)}c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c,continue:!0})}return s.length?Promise.all(s).then(()=>n):n}}),uu=p("$ZodMap",(e,t)=>{k.init(e,t);let r=M.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),n;let s=[];n.value=r?r.alloc(e,n,new Map,o):new Map;let u=o?.abortEarly,c=n.issues.length;for(let[a,l]of i){if(u&&n.issues.length!==c){if(G(n,c))break;c=n.issues.length}let f=t.keyType._zod.run({value:a,issues:[]},o),m=t.valueType._zod.run({value:l,issues:[]},o);f instanceof Promise||m instanceof Promise?s.push(Promise.all([f,m]).then(([d,h])=>{Fl(d,h,n,a,i,e,o)})):Fl(f,m,n,a,i,e,o)}return s.length?Promise.all(s).then(()=>n):n},Qs(e,Vm)});function Fl(e,t,r,n,o,i,s){e.issues.length&&(Ft.has(typeof n)?r.issues.push(...H(n,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:o,inst:i,issues:e.issues.map(u=>Q(u,s,j()))})),t.issues.length&&(Ft.has(typeof n)?r.issues.push(...H(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:o,inst:i,key:n,issues:t.issues.map(u=>Q(u,s,j()))})),r.value.set(e.value,t.value)}var cu=p("$ZodSet",(e,t)=>{k.init(e,t);let r=M.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),n;let s=[];n.value=r?r.alloc(e,n,new Set,o):new Set;let u=o?.abortEarly,c=n.issues.length;for(let a of i){if(u&&n.issues.length!==c){if(G(n,c))break;c=n.issues.length}let l=t.valueType._zod.run({value:a,issues:[]},o);l instanceof Promise?s.push(l.then(f=>Ml(f,n))):Ml(l,n)}return s.length?Promise.all(s).then(()=>n):n},Qs(e,Fm)});function Ml(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var au=p("$ZodEnum",(e,t)=>{k.init(e,t);let r=Qe(t.entries),n=new Set(r);e._zod.values=n,P(e,"pattern",o=>{let i=Qe(o.def.entries).filter(s=>Ft.has(typeof s));return new RegExp(i.length?`^(${i.map(s=>se(s.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(o,i)=>{let s=o.value;return n.has(s)||o.issues.push({code:"invalid_value",values:r,input:s,inst:e}),o}}),lu=p("$ZodLiteral",(e,t)=>{k.init(e,t);let r=new Set(t.values);e._zod.values=r,P(e,"pattern",n=>{let o=n.def.values;return new RegExp(o.length?`^(${o.map(i=>typeof i=="string"?se(i):i?se(i.toString()):String(i)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(n,o)=>{let i=n.value;return r.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}}),fu=p("$ZodFile",(e,t)=>{k.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return o instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),r}}),pu=p("$ZodTransform",(e,t)=>{k.init(e,t),e._zod.optin="optional",M.memoizer?.guard(e),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new ze(e.constructor.name);let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(r.value=s,r));if(o instanceof Promise)throw new ee;return r.value=o,r}});function Ul(e,t){return e.value=t.issues.length?void 0:t.value,e}var zn=p("$ZodOptional",(e,t)=>{k.init(e,t),P(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",P(e,"values",r=>{let n=r.def.innerType._zod.values;return n?new Set([...n,void 0]):void 0}),P(e,"pattern",r=>{let n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${_e(n.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(r.value===void 0){if(t.innerType._zod.optin!=="defaulted")return r;let o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>Ul(r,i)):Ul(r,o)}return t.innerType._zod.run(r,n)}}),du=p("$ZodExactOptional",(e,t)=>{zn.init(e,t),P(e,"values",r=>r.def.innerType._zod.values),P(e,"pattern",r=>r.def.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),mu=p("$ZodNullable",(e,t)=>{k.init(e,t),P(e,"optin",r=>r.def.innerType._zod.optin),P(e,"optout",r=>r.def.innerType._zod.optout),P(e,"pattern",r=>{let n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${_e(n.source)}|null)$`):void 0}),P(e,"values",r=>r.def.innerType._zod.values?new Set([...r.def.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),hu=p("$ZodDefault",(e,t)=>{k.init(e,t),e._zod.optin="defaulted",P(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>Bl(i,t)):Bl(o,t)}});function Bl(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var gu=p("$ZodPrefault",(e,t)=>{k.init(e,t),e._zod.optin="defaulted",P(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),_u=p("$ZodNonOptional",(e,t)=>{k.init(e,t),P(e,"values",r=>{let n=r.def.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>Jl(i,e)):Jl(o,e)}});function Jl(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var $u=p("$ZodSuccess",(e,t)=>{k.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new ze("ZodSuccess");let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>(r.value=i.issues.length===0,r)):(r.value=o.issues.length===0,r)}});function Kl(e,t,r,n){return t.issues.length?(e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(o=>Q(o,n,j()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var yu=p("$ZodCatch",(e,t)=>{k.init(e,t),P(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),P(e,"optout",r=>r.def.innerType._zod.optout),P(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>Kl(r,i,t,n)):Kl(r,o,t,n)}}),bu=p("$ZodNaN",(e,t)=>{k.init(e,t),e._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),xn=p("$ZodPipe",(e,t)=>{k.init(e,t),P(e,"values",r=>r.def.in._zod.values),P(e,"optin",r=>r.def.in._zod.optin),P(e,"optout",r=>r.def.out._zod.optout),P(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(s=>sn(s,t.in,n)):sn(i,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>sn(i,t.out,n)):sn(o,t.out,n)}});function sn(e,t,r){return e.issues.some(n=>n.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}var ar=p("$ZodCodec",(e,t)=>{k.init(e,t),P(e,"values",r=>r.def.in._zod.values),P(e,"optin",r=>r.def.in._zod.optin),P(e,"optout",r=>r.def.out._zod.optout),P(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>un(s,t,n)):un(i,t,n)}else{let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(s=>un(s,t,n)):un(i,t,n)}}});function un(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let o=t.transform(e.value,e);return o instanceof Promise?o.then(i=>cn(e,i,t.out,r)):cn(e,o,t.out,r)}else{let o=t.reverseTransform(e.value,e);return o instanceof Promise?o.then(i=>cn(e,i,t.in,r)):cn(e,o,t.in,r)}}function cn(e,t,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},n)}var wu=p("$ZodPreprocess",(e,t)=>{xn.init(e,t)}),vu=p("$ZodReadonly",(e,t)=>{k.init(e,t),P(e,"propValues",r=>r.def.innerType._zod.propValues),P(e,"values",r=>r.def.innerType._zod.values),P(e,"optin",r=>r.def.innerType?._zod?.optin),P(e,"optout",r=>r.def.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(Wl):Wl(o)}});function Wl(e){return e.memo||(e.value=Object.freeze(e.value)),e}function Um(e){let t=e._zod.def,r=t.pattern,n=!!t.format?.includes("int"),o,i;for(let u of t.checks??[]){let c=u._zod.def;c.pattern&&(r=c.pattern),n||(n=!!c.format?.includes("int"));let a=c.minimum??c.length,l=c.maximum??c.length;a!==void 0&&(o===void 0||a>o)&&(o=a),l!==void 0&&(i===void 0||l<i)&&(i=l)}if(r)return r.source;if(o!==void 0&&i!==void 0&&o>i)return"(?!)";if(o!==void 0||i!==void 0)return Li({minimum:o,maximum:i}).source;let s=e._zod.pattern;return(n&&s===$e?Qt:s)?.source}function ds(e){let t=e._zod.def,r=e._zod.pattern?.source,n=t.innerType??e._zod.innerType;if(n){let o=n._zod.pattern?.source,i=ds(n);return r&&o&&i&&i!==o?r.replace(_e(o),()=>_e(i)):r}if(t.options){let o=t.options.map(ds);if(o.every(Boolean))return`^(${o.map(i=>_e(i)).join("|")})$`}return Um(e)}var zu=p("$ZodTemplateLiteral",(e,t)=>{k.init(e,t);let r=[];for(let n of t.parts)if(typeof n=="object"&&n!==null){let o=ds(n);if(!o)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);r.push(_e(o))}else if(n===null||Xo.has(typeof n))r.push(se(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(n,o)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),xu=p("$ZodFunction",(e,t)=>(k.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...n){let o=e._def.input?Ur(e._def.input,n):n,i=Reflect.apply(r,this,o);return e._def.output?Ur(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...n){let o=e._def.input?await Br(e._def.input,n):n,i=await Reflect.apply(r,this,o);return e._def.output?await Br(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let n=e.constructor;return Array.isArray(r[0])?new n({type:"function",input:new vn({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new n({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let n=e.constructor;return new n({type:"function",input:e._def.input,output:r})},e)),ku=p("$ZodPromise",(e,t)=>{k.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(o=>t.innerType._zod.run({value:o,issues:[]},n))}),lr=p("$ZodLazy",(e,t)=>{k.init(e,t),Wo(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),P(e,"pattern",r=>r.innerType?._zod?.pattern),P(e,"propValues",r=>r.innerType?._zod?.propValues),P(e,"optin",r=>r.innerType?._zod?.optin??void 0),P(e,"optout",r=>r.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),Iu=p("$ZodCustom",(e,t)=>{D.init(e,t),k.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>Gl(i,r,n,e));Gl(o,r,n,e)}});function Gl(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(ot(o))}}var Pn=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},Pu="~memo",rf=[];function nf(e){return e!==null&&typeof e=="object"}function Su(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}var of=new WeakMap,ft=0,Sn=1,fr=2;function pr(e,t,r){let n=of.get(e);if(n!==void 0)return n?fr:ft;if(t.has(e))return fr;t.add(e);let o=ft,i=l=>{if(o!==fr&&l?._zod){let f=pr(l,t,r);f>o&&(o=f)}},s=(l,f)=>{let m=ft;for(let d of Reflect.ownKeys(l)){let h=Object.getOwnPropertyDescriptor(l,d);if(f&&!h.enumerable)continue;let g=h.get?Sn:h.value?._zod?pr(h.value,t,r):ft;g>m&&(m=g)}return m},u=l=>{l>o&&(o=l)},c=e._zod.def,a=c.type;switch(a){case"object":{let l=rt(c);u(l?s(l,!0):Sn),i(c.catchall);break}case"array":i(c.element);break;case"tuple":for(let l of c.items)i(l);i(c.rest);break;case"record":case"map":i(c.keyType),i(c.valueType);break;case"set":i(c.valueType);break;case"union":for(let l of c.options)i(l);break;case"intersection":i(c.left),i(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":i(c.innerType);break;case"pipe":i(c.in),i(c.out);break;case"function":i(c.input),i(c.output);break;case"lazy":{let l=c._cachedInner??(r?e._zod.innerType:void 0);u(l?pr(l,t,!1):Sn);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let l in c){let f=Object.getOwnPropertyDescriptor(c,l);if(!f||f.get)continue;let m=f.value;if(!(!m||typeof m!="object")){if(m._zod)i(m);else if(Array.isArray(m))for(let d of m)i(d)}}}return t.delete(e),Bm(e,o)}function Bm(e,t){return t!==Sn&&of.set(e,t===fr),t}function Zn(e){return pr(e,new Set,!0)!==ft}function Jm(e,t){let r=e.buckets.get(t);return r||(r=new WeakMap,e.buckets.set(t,r)),r}var kn,In=[],Km={alloc(e,t,r){let n=kn;if(!n)return r;kn=void 0;let o={value:r,issues:null};return n.set(t.value,o),In.push(o),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let r=e._zod.parse,n=(o,i)=>{if(i.direction!=="backward"&&On(i,o.value))throw new Pn;return r(o,i)};e._zod.parse=n,e._zod.run===r&&(e._zod.run=n)})},attach(e){var t;let r,n=!1,o,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let s=e._zod.parse,u=(c,a)=>{if(r===void 0){let z=pr(e,new Set,!1);if(z===ft)return e._zod.parse=s,e._zod.run===u&&(e._zod.run=s),s(c,a);z===fr||n?r=!0:n=!0}let l=c.value;if(!nf(l))return s(c,a);let f=a[Pu];f||(f={buckets:new WeakMap,backEdges:void 0},a[Pu]=f);let m;o===a?m=i:(m=Jm(f,e),o=a,i=m);let d=m.get(l);if(d)return c.value=d.value,d.issues?d.issues.length&&c.issues.push(...Su(d.issues)):(c.memo=!0,f.backEdges??(f.backEdges=new WeakSet),f.backEdges.add(d.value)),c;kn=m;let h=In.length,g=s(c,a);kn=void 0;let $=In.length>h?In.pop():void 0;return g instanceof Promise?g.then(z=>($&&($.issues=z.issues.length?Su(z.issues):rf),z)):($&&($.issues=g.issues.length?Su(g.issues):rf),g)};e._zod.parse=u,e._zod.run===s&&(e._zod.run=u)})}};function dr(){return Km}function On(e,t){let r=e[Pu]?.backEdges;return r!==void 0&&nf(t)&&r.has(t)}var mr={};he(mr,{en:()=>An});var Wm=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(i){return e[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};function o(i,s){return i==="number"&&typeof s=="number"&&!Number.isFinite(s)?String(s):n[i]??i}return i=>{switch(i.code){case"invalid_type":{let s=o(i.expected),u=Qo(i.input),c=o(u,i.input);return`Invalid input: expected ${s}, received ${c}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${jr(i.values[0])}`:`Invalid option: expected one of ${Dr(i.values,"|")}`;case"too_big":{let s=i.exact?"exactly ":i.inclusive?"<=":"<",u=t(i.origin);return u?`Too big: expected ${i.origin??"value"} to have ${s}${i.maximum.toString()} ${u.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${s}${i.maximum.toString()}`}case"too_small":{let s=i.exact?"exactly ":i.inclusive?">=":">",u=t(i.origin);return u?`Too small: expected ${i.origin} to have ${s}${i.minimum.toString()} ${u.unit}`:`Too small: expected ${i.origin} to be ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Invalid string: must start with "${s.prefix}"`:s.format==="ends_with"?`Invalid string: must end with "${s.suffix}"`:s.format==="includes"?`Invalid string: must include "${s.includes}"`:s.format==="regex"?`Invalid string: must match pattern ${s.pattern}`:`Invalid ${r[s.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${Dr(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`Invalid discriminator value. Expected ${i.options.map(u=>`'${u}'`).join(" | ")}`:i.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function An(){return{localeError:Wm()}}var sf,Zu=Symbol("ZodOutput"),Ou=Symbol("ZodInput"),Nn=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Cn(){return new Nn}(sf=globalThis).__zod_globalRegistry??(sf.__zod_globalRegistry=Cn());var B=globalThis.__zod_globalRegistry;var q=Symbol.for("zod.compile.invalid"),uf=Symbol.for("zod.compile.fallback"),ae=class extends Error{constructor(t="z.compile does not support async refinements, transforms, or checks"){super(t),this.name="ZodCompileAsyncError"}},Z=class extends Error{constructor(t,r=!0){super(`z.compile does not support ${t}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=r}};function qm(e,t){try{return En(e,{assertOnly:!0})}catch{return t}}function Tu(e,t){try{let r=En(e),n=Tn(e,r);return n._zod.bag.validator=qm(e,r),n}catch(r){if(t?.strict)throw r;return e}}function Tn(e,t){if(Zn(e))throw new Z("a schema whose subtree contains a reference cycle");let r=N(e),n=e._zod.run,o=n.__originalRun??n,i=(s,u)=>{if(u?.async||u?.direction==="backward"||u?.skipChecks||u?.[uf]||u&&On(u,s.value))return o(s,u);let c=t(s.value);return c!==q?(s.value=c,s):(u&&(u[uf]=!0),o(s,u))};return i.__originalRun=o,r._zod.bag.fallbackRun=o,r._zod.bag.validator=t,r._zod.run=i,n.__originalRun||Xm(r,e,t),r}function Xm(e,t,r){let n=e,o=t;if(typeof o.safeParse=="function"){let i=o.safeParse;n.safeParse=(s,u)=>{let c=r(s);return c!==q?{success:!0,data:c}:i(s,u)}}if(typeof o.parse=="function"){let i=o.parse;n.parse=(s,u)=>{let c=r(s);return c!==q?c:i(s,u)}}}function En(e,t){let r=!0;try{r=Zn(e)}catch{}if(r)throw new Z("a schema whose subtree contains a reference cycle");let n={constants:new Map,constantCounter:0,varCounter:0,definite:!0},o=new Re(["input"]),i=R(o,n,e,"input",!t?.assertOnly);o.write(i===null?"return true;":`return ${i};`);let s=["INVALID",...n.constants.keys()],u=[q,...n.constants.values()],c=o.content.join(`
|
|
57
|
+
`),a=t?.debug?s.length>0?`// Constants: ${s.join(", ")}
|
|
58
|
+
${c}`:c:"",l=Function,f=`return (input) => {
|
|
59
|
+
${c}
|
|
60
|
+
}`,m;try{m=new l(...s,f)(...u)}catch(d){throw new Z(`this schema (generated code failed to evaluate: ${d.message})`)}return t?.debug&&(m.code=a),m.definite=n.definite,m}function x(e,t){for(let[n,o]of e.constants)if(o===t)return n;let r=`c${e.constantCounter++}`;return e.constants.set(r,t),r}function Fe(e,t){return e.definite=!1,x(e,t)}function v(e){return`v${e.varCounter++}`}function Ym(e,t){let r=e._zod.run({value:t,issues:[]},{});if(r&&typeof r.then=="function")return q;let n=r;return n.issues.length===0?n.value:q}function K(e,t,r,n,o=!0){let i=e.content.length,s=t.constants.size,u=t.constantCounter,c=t.varCounter;try{return R(e,t,r,n,o)}catch(a){if(!(a instanceof Z)||!a.islandable)throw a;if(e.content.length=i,t.constants.size>s){let l=Array.from(t.constants.keys()).slice(s);for(let f of l)t.constants.delete(f)}return t.constantCounter=u,t.varCounter=c,Hm(e,t,r,n)}}function Hm(e,t,r,n){t.definite=!1;let o=x(t,r),i=x(t,Ym),s=v(t);return e.write(`const ${s} = ${i}(${o}, ${n});`),e.write(`if (${s} === INVALID) return INVALID;`),s}var Qm=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function eh(e,t,r,n){let o=r._zod.def.checks;if(!o||o.length===0)return n;let i=n;for(let s of o){let u=s._zod.def;if(u.when&&!Qm.has(u.check))throw new Z('check with a custom "when" condition');switch(u.check){case"greater_than":th(e,t,u,i);break;case"less_than":rh(e,t,u,i);break;case"multiple_of":nh(e,t,u,i);break;case"number_format":df(e,u,i);break;case"min_length":{let c=xe(u.minimum,"min_length"),a=Au(e,t,i,`${i}.length >= ${c} && ${i}.length < ${u.minimum*2}`);e.write(`if (${a} < ${c}) return INVALID;`);break}case"max_length":{let c=xe(u.maximum,"max_length"),a=Au(e,t,i,`${i}.length > ${c}`);e.write(`if (${a} > ${c}) return INVALID;`);break}case"length_equals":{let c=xe(u.length,"length_equals"),a=Au(e,t,i,`${i}.length >= ${c} && ${i}.length <= ${u.length*2}`);e.write(`if (${a} !== ${c}) return INVALID;`);break}case"min_size":e.write(`if (${i}.size < ${xe(u.minimum,"min_size")}) return INVALID;`);break;case"max_size":e.write(`if (${i}.size > ${xe(u.maximum,"max_size")}) return INVALID;`);break;case"size_equals":e.write(`if (${i}.size !== ${xe(u.size,"size_equals")}) return INVALID;`);break;case"string_format":i=mf(e,t,u,i);break;case"custom":i=ah(e,t,s,i);break;case"bigint_format":oh(e,u,i);break;case"mime_type":ih(e,t,u,i);break;case"property":uh(e,t,u,i);break;case"properties":sh(e,t,u,i);break;case"overwrite":{let c=v(t);ch(e,t,s,i,c),i=c;break}default:throw new Z(`check type ${u.check}`)}}return i}function Au(e,t,r,n){let o=x(t,De),i=v(t);return e.write(`const ${i} = typeof ${r} === "string" && ${n} ? ${o}(${r}) : ${r}.length;`),i}function xe(e,t){if(typeof e!="number"||!Number.isFinite(e))throw new Z(`${t} bound of type ${typeof e}`);return`${e}`}function pf(e,t){if(typeof t=="bigint")return`${t}n`;if(typeof t=="number"){if(Number.isNaN(t))throw new Z("comparison check with NaN bound");return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new Z("comparison check with Invalid Date bound");return x(e,t)}throw new Z(`comparison check bound of type ${typeof t}`)}function th(e,t,r,n){let o=r.inclusive?"<":"<=";e.write(`if (${n} ${o} ${pf(t,r.value)}) return INVALID;`)}function rh(e,t,r,n){let o=r.inclusive?">":">=";e.write(`if (${n} ${o} ${pf(t,r.value)}) return INVALID;`)}function nh(e,t,r,n){if(typeof r.value=="bigint"){if(r.value===BigInt(0))throw new Z("multiple_of check with a zero divisor");e.write(`if (${n} % ${r.value}n !== 0n) return INVALID;`)}else{let o=x(t,jt);e.write(`if (${o}(${n}, ${xe(r.value,"multiple_of")}) !== 0) return INVALID;`)}}function df(e,t,r){let n=t.format;switch(n){case"safeint":e.write(`if (!Number.isSafeInteger(${r})) return INVALID;`);break;case"int32":e.write(`if (!Number.isInteger(${r}) || ${r} < -2147483648 || ${r} > 2147483647) return INVALID;`);break;case"uint32":e.write(`if (!Number.isInteger(${r}) || ${r} < 0 || ${r} > 4294967295) return INVALID;`);break;case"float32":e.write(`if (!Number.isFinite(${r}) || ${r} < -3.4028234663852886e38 || ${r} > 3.4028234663852886e38) return INVALID;`);break;case"float64":e.write(`if (!Number.isFinite(${r})) return INVALID;`);break;default:throw new Z(`number format ${n}`)}}function oh(e,t,r){let n=t.format;if(n)switch(n){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break;default:throw new Z(`bigint format ${n}`)}}function ih(e,t,r,n){let o=r.mime;if(o&&o.length>0){let i=x(t,new Set(o));e.write(`if (!${i}.has(${n}.type)) return INVALID;`)}}function sh(e,t,r,n){if(r.when)throw new Z('check with a custom "when" condition');e.write(`if (${n} == null) return INVALID;`);let o=r.shape;for(let i of Reflect.ownKeys(o)){let s=typeof i=="symbol"?x(t,i):W(i),u=v(t);e.write(`const ${u} = ${n}[${s}];`),K(e,t,o[i],u,!1)}}function uh(e,t,r,n){let o=`${n}[${JSON.stringify(r.property)}]`;R(e,t,r.schema,o)}function ch(e,t,r,n,o){let i=r._zod.def.tx;if(!i)throw new Z("overwrite check without a transform function");if(Me(i))throw new ae("z.compile: async overwrite transforms are not supported");let s=x(t,i);e.write(`const ${o} = ${s}(${n});`)}function Nu(){throw new ee}function Eu(e){this.issues.push(e)}function ah(e,t,r,n){let o=r._zod.def;if(o.fn){if(Me(o.fn))throw new ae("z.compile: async .refine() predicates are not supported");let i=Fe(t,o.fn),s=x(t,Nu),u=v(t);return e.write(`const ${u} = ${i}(${n});`),e.write(`if (${u} instanceof Promise) ${s}();`),e.write(`if (!${u}) return INVALID;`),n}if(r._zod.check){if(Me(r._zod.check))throw new ae("z.compile: async .superRefine() / check functions are not supported");let i=r._zod.check,u=Fe(t,a=>{let l={value:a,issues:[],addIssue:Eu};return i(l)instanceof Promise&&Nu(),l.issues.length===0?l.value:q}),c=v(t);return e.write(`const ${c} = ${u}(${n});`),e.write(`if (${c} === INVALID) return INVALID;`),c}throw new Z("custom check without a predicate or check function")}var lh=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function mf(e,t,r,n,o=!0){let i=r.format;if(i==="base64"){let a=x(t,ir);return e.write(`if (!${a}(${n})) return INVALID;`),n}if(i==="base64url"){let a=x(t,gn);return e.write(`if (!${a}(${n})) return INVALID;`),n}if(i==="jwt"){let a=x(t,yn),l=x(t,r.alg??null);return e.write(`if (!${a}(${n}, ${l})) return INVALID;`),n}if(i==="ipv6"){let a=x(t,or);return e.write(`if (!${a}(${n})) return INVALID;`),n}if(i==="cidrv6"){let a=x(t,mn);return e.write(`if (!${a}(${n})) return INVALID;`),n}if(i==="credit_card"){let a=x(t,_n);return e.write(`if (!${a}(${n})) return INVALID;`),n}if(i==="iban"){let a=x(t,$n);return e.write(`if (!${a}(${n})) return INVALID;`),n}let s=r;if(i==="url"||i==="httpurl"||s.normalize||s.hostname!==void 0||s.protocol!==void 0){let a=x(t,fn),l=x(t,r),f=v(t),m=v(t);if(e.write(`const ${f} = ${n}.trim();`),e.write(`const ${m} = ${a}(${f}, ${l});`),e.write(`if (typeof ${m} === "number") return INVALID;`),s.hostname!==void 0){let g=x(t,pn);e.write(`if (!${g}(${m}, ${l}.hostname)) return INVALID;`)}if(s.protocol!==void 0){let g=x(t,dn);e.write(`if (!${g}(${m}, ${l}.protocol)) return INVALID;`)}if(!o)return null;let d=v(t),h=s.normalize?`${m}.href`:`${x(t,nr)}(${f})`;return e.write(`const ${d} = ${h};`),d}let u=r.fn;if(u){if(Me(u))throw new Z(`async string format ${i}`);let a=x(t,u);return e.write(`if (!${a}(${n})) return INVALID;`),n}if(lh.has(i)&&r.pattern){let a=x(t,r.pattern);return e.write(`${a}.lastIndex = 0;`),e.write(`if (!${a}.test(${n})) return INVALID;`),n}let c=r.format;switch(c){case"regex":throw new Z("regex format without a pattern");case"lowercase":e.write(`if (${n} !== ${n}.toLowerCase()) return INVALID;`);break;case"uppercase":e.write(`if (${n} !== ${n}.toUpperCase()) return INVALID;`);break;case"includes":e.write(`if (!${n}.includes(${W(r.includes)})) return INVALID;`);break;case"starts_with":{let a=r.prefix;e.write(`if (${n}.slice(0, ${a.length}) !== ${W(a)}) return INVALID;`);break}case"ends_with":{let a=r.suffix;e.write(`if (${n}.slice(-${a.length}) !== ${W(a)}) return INVALID;`);break}default:throw new Z(`string format ${c}`)}return n}function R(e,t,r,n,o=!0){let i=r._zod.def,s=i.type;if(i.coerce)throw new Z(`coercion (z.coerce.${s}())`);let u=o||!!i.checks?.length,c;switch(s){case"string":c=fh(e,t,r,n,u);break;case"number":c=ph(e,r,n);break;case"boolean":c=dh(e,n);break;case"bigint":c=mh(e,r,n);break;case"symbol":c=hh(e,n);break;case"undefined":c=gh(e,n);break;case"null":c=_h(e,n);break;case"any":case"unknown":c=n;break;case"never":e.write("return INVALID;"),c=n;break;case"void":c=$h(e,n);break;case"nan":c=yh(e,n);break;case"date":c=bh(e,n);break;case"object":c=wh(e,t,r,n,u);break;case"optional":c=vh(e,t,r,n,u);break;case"nullable":c=kh(e,t,r,n,u);break;case"array":c=Ih(e,t,r,n,u);break;case"literal":c=Sh(e,t,r,n);break;case"enum":c=Ph(e,t,r,n);break;case"readonly":{let a=af(e,t,r,n),l=v(t);e.write(`const ${l} = Object.freeze(${a});`),c=l;break}case"success":af(e,t,r,n),c="true";break;case"default":case"prefault":c=Zh(e,t,r,n);break;case"nonoptional":c=Oh(e,t,r,n);break;case"tuple":c=Ah(e,t,r,n);break;case"union":c=Nh(e,t,r,n);break;case"intersection":c=Eh(e,t,r,n);break;case"record":c=Dh(e,t,r,n);break;case"map":c=Rh(e,t,r,n);break;case"set":c=jh(e,t,r,n);break;case"file":c=Vh(e,n);break;case"template_literal":c=Fh(e,t,r,n);break;case"lazy":c=Mh(e,t,r,n);break;case"pipe":c=Uh(e,t,r,n);break;case"custom":c=Bh(e,t,r,n);break;case"transform":c=Wh(e,t,r,n);break;case"catch":c=Kh(e,t,r,n);break;default:throw new Z(`schema type ${s}`)}return c===null?null:eh(e,t,r,c)}function fh(e,t,r,n,o=!0){e.write(`if (typeof ${n} !== "string") return INVALID;`);let i=r._zod.def;return i.format===void 0?n:mf(e,t,i,n,o)}function ph(e,t,r){e.write(`if (typeof ${r} !== "number" || !Number.isFinite(${r})) return INVALID;`);let n=t._zod.def;return n.check==="number_format"&&n.format&&df(e,{format:n.format},r),r}function dh(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function mh(e,t,r){e.write(`if (typeof ${r} !== "bigint") return INVALID;`);let n=t._zod.def;if(n.format)switch(n.format){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break}return r}function hh(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function gh(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function _h(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function $h(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function yh(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function bh(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function wh(e,t,r,n,o=!0){let i=r._zod.def;e.write(`if (typeof ${n} !== "object" || ${n} === null || Array.isArray(${n})) return INVALID;`);let s=i.shape,u=Object.keys(s),c=Object.getOwnPropertySymbols(s),a=c.length?[...u,...c]:u,l=w=>typeof w=="symbol"?x(t,w):W(w),f=w=>typeof w=="symbol"?`[${l(w)}]`:W(w),m=s;if(u.includes("__proto__"))throw new Z('object shape key "__proto__"');let d=new Map;for(let w of a){let I=m[w],A=l(w),L=v(t);if(e.write(`const ${L} = ${n}[${A}];`),I._zod.optin!==void 0){let O=v(t);e.write(`let ${O} = (() => {`),e.indented(J=>{let Lt=K(J,t,I,L);J.write(`return ${Lt};`)}),e.write("})();"),I._zod.optout==="optional"?(e.write(`if (${O} === INVALID) {`),e.indented(J=>{J.write(`if (${A} in ${n}) return INVALID;`),J.write(`${O} = undefined;`)}),e.write("}")):e.write(`if (${O} === INVALID) return INVALID;`),d.set(w,O)}else{xh(I)&&e.write(`if (!(${A} in ${n})) return INVALID;`);let O=K(e,t,I,L,o);O!==null&&d.set(w,O)}}let h=i.catchall,g="none";if(h){let w=h._zod.def.type;if(w==="never"){let I=u.map(A=>`k !== ${W(A)}`).join(" && ")||"true";e.write(`for (const k in ${n}) {`),e.indented(A=>{A.write(`if (${I}) return INVALID;`)}),e.write("}")}else(w==="unknown"||w==="any")&&!h._zod.def.checks?.length?g="passthrough":g="schema"}let $=v(t),z=a.some(w=>cf(m[w])||Cu(m[w]));if(!o){if(g==="schema"){let w=u.length>0?x(t,new Set(u)):null;e.write(`for (const k in ${n}) {`),e.indented(I=>{I.write('if (k === "__proto__") continue;'),w&&I.write(`if (${w}.has(k)) continue;`);let A=v(t);I.write(`const ${A} = ${n}[k];`),K(I,t,h,A,!1)}),e.write("}")}return null}if(z){e.write(`const ${$} = {};`);for(let w of a){let I=l(w),A=d.get(w);Cu(m[w])?e.write(`if (${I} in ${n}) ${$}[${I}] = ${A};`):cf(m[w])?e.write(`if (${A} !== undefined || ${I} in ${n}) ${$}[${I}] = ${A};`):e.write(`${$}[${I}] = ${A};`)}}else{let w=a.map(I=>`${f(I)}: ${d.get(I)}`).join(", ");e.write(`const ${$} = { ${w} };`)}if(g!=="none"){let w=u.length>0?x(t,new Set(u)):null;e.write(`for (const k in ${n}) {`),e.indented(I=>{if(I.write('if (k === "__proto__") continue;'),w&&I.write(`if (${w}.has(k)) continue;`),g==="passthrough")I.write(`${$}[k] = ${n}[k];`);else{let A=v(t);I.write(`const ${A} = ${n}[k];`);let L=K(I,t,h,A);I.write(`${$}[k] = ${L};`)}}),e.write("}")}return $}function vh(e,t,r,n,o=!0){let i=r._zod.def;if(zh(r))return R(e,t,i.innerType,n,o);if(i.innerType._zod.optin==="defaulted"){let u=v(t),c=v(t);return e.write(`let ${u};`),e.write(`if (${n} === undefined) {`),e.indented(a=>{a.write(`const ${c} = (() => {`),a.indented(l=>{let f=R(l,t,i.innerType,n);l.write(`return ${f};`)}),a.write("})();"),a.write(`if (${c} !== INVALID) ${u} = ${c};`)}),e.write("} else {"),e.indented(a=>{let l=R(a,t,i.innerType,n);a.write(`${u} = ${l};`)}),e.write("}"),u}let s=o?v(t):null;return s&&e.write(`let ${s};`),e.write(`if (${n} !== undefined) {`),e.indented(u=>{let c=R(u,t,i.innerType,n,o);s&&c!==null&&u.write(`${s} = ${c};`)}),e.write("}"),s}function zh(e){return e._zod.traits?.has("$ZodExactOptional")===!0}function xh(e){return e._zod.optin===void 0&&Ve(e)}function Ve(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return t.innerType?Ve(t.innerType):!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return t.innerType?Ve(t.innerType):!0;case"catch":return!0;case"union":return t.options?t.options.some(Ve):!0;case"intersection":return!t.left||!t.right?!0:Ve(t.left)&&Ve(t.right);case"pipe":return t.in?Ve(t.in):!0;default:return!0}}function Cu(e){return e._zod.optin==="optional"&&e._zod.optout==="optional"}function cf(e){return(e._zod.optin!=="defaulted"||e._zod.optout==="optional")&&pt(e)}function pt(e){let t=e._zod.def;switch(t.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return t.innerType?pt(t.innerType):!0;case"union":return t.options?t.options.some(pt):!0;case"intersection":return!t.left||!t.right||pt(t.left)||pt(t.right);case"pipe":return t.out?pt(t.out):!0;default:return!0}}function kh(e,t,r,n,o=!0){let i=r._zod.def,s=o?v(t):null;return s&&e.write(`let ${s} = null;`),e.write(`if (${n} !== null) {`),e.indented(u=>{let c=R(u,t,i.innerType,n,o);s&&c!==null&&u.write(`${s} = ${c};`)}),e.write("}"),s}function Du(e,t,r){for(let[n,o]of nt(t._zod.def.checks))e.write(`if (${r} > ${xe(n,o._zod.def.check)}) return INVALID;`)}function Ih(e,t,r,n,o=!0){let i=r._zod.def;e.write(`if (!Array.isArray(${n})) return INVALID;`),Du(e,r,`${n}.length`);let s=o?v(t):null,u=v(t),c=v(t);return s&&e.write(`const ${s} = new Array(${n}.length);`),e.write(`for (let ${u} = 0; ${u} < ${n}.length; ${u}++) {`),e.indented(a=>{a.write(`const ${c} = ${n}[${u}];`);let l=K(a,t,i.element,c,o);s&&l!==null&&a.write(`${s}[${u}] = ${l};`)}),e.write("}"),s}function Sh(e,t,r,n){let i=r._zod.def.values;if(i.length!==1){let u=x(t,new Set(i));return e.write(`if (!${u}.has(${n})) return INVALID;`),n}let s=i[0];if(typeof s=="number"&&Number.isNaN(s)){let u=x(t,new Set(i));return e.write(`if (!${u}.has(${n})) return INVALID;`),n}if(typeof s=="string")e.write(`if (${n} !== ${W(s)}) return INVALID;`);else if(typeof s=="number"||typeof s=="boolean")e.write(`if (${n} !== ${s}) return INVALID;`);else if(s===null)e.write(`if (${n} !== null) return INVALID;`);else if(s===void 0)e.write(`if (${n} !== undefined) return INVALID;`);else if(typeof s=="bigint")e.write(`if (${n} !== ${s}n) return INVALID;`);else throw new Z(`literal type ${typeof s}`);return n}function Ph(e,t,r,n){let o=r._zod.values;if(!o)throw new Z("enum schema without enumerated values");let i=x(t,o);return e.write(`if (!${i}.has(${n})) return INVALID;`),n}function af(e,t,r,n){let o=r._zod.def;return R(e,t,o.innerType,n)}function Zh(e,t,r,n){let o=r._zod.def,s=Object.getOwnPropertyDescriptor(r._zod.def,"defaultValue")?()=>r._zod.def.defaultValue:void 0;if(r._zod.def.type==="prefault"){if(!s)return R(e,t,o.innerType,n);let c=x(t,s),a=v(t);return e.write(`let ${a} = ${n};`),e.write(`if (${n} === undefined) ${a} = ${c}();`),R(e,t,o.innerType,a)}let u=v(t);if(s){let c=x(t,s),a=x(t,Vt);e.write(`let ${u};`),e.write(`if (${n} === undefined) {`),e.indented(l=>{l.write(`${u} = ${a}(${c}());`)}),e.write("} else {"),e.indented(l=>{let f=R(l,t,o.innerType,n);l.write(`${u} = ${f} === undefined ? ${a}(${c}()) : ${f};`)}),e.write("}")}else e.write(`let ${u};`),e.write(`if (${n} !== undefined) {`),e.indented(c=>{let a=R(c,t,o.innerType,n);c.write(`${u} = ${a};`)}),e.write("}");return u}function Oh(e,t,r,n){let o=r._zod.def,i=R(e,t,o.innerType,n),s=v(t);return e.write(`const ${s} = ${i};`),e.write(`if (${s} === undefined) return INVALID;`),s}function Ah(e,t,r,n){let o=r._zod.def,i=o.items,s=o.rest;e.write(`if (!Array.isArray(${n})) return INVALID;`);let u=lf(i,"optin"),c=lf(i,"optout");s?e.write(`if (${n}.length < ${u}) return INVALID;`):e.write(`if (${n}.length < ${u} || ${n}.length > ${i.length}) return INVALID;`);let a=v(t);e.write(`const ${a} = [];`);for(let l=0;l<i.length;l++){let f=i[l];if(l>=c)e.write(`if (${a}.length === ${l}) {`),e.indented(m=>{m.write(`if (${l} < ${n}.length) {`),m.indented(d=>{let h=v(t);d.write(`const ${h} = ${n}[${l}];`);let g=K(d,t,f,h);d.write(`${a}[${l}] = ${g};`)}),m.write("} else {"),m.indented(d=>{if(Cu(f)){d.write(`${a}.length = ${l};`);return}let h=v(t),g=v(t);d.write(`const ${h} = undefined;`),d.write(`const ${g} = (() => {`),d.indented($=>{let z=K($,t,f,h);$.write(`return ${z};`)}),d.write("})();"),d.write(`if (${g} === INVALID || ${g} === undefined) ${a}.length = ${l};`),d.write(`else ${a}[${l}] = ${g};`)}),m.write("}")}),e.write("}");else{let m=v(t);e.write(`const ${m} = ${n}[${l}];`);let d=K(e,t,f,m);e.write(`${a}[${l}] = ${d};`)}}if(s){let l=v(t),f=v(t);e.write(`for (let ${l} = ${i.length}; ${l} < ${n}.length; ${l}++) {`),e.indented(m=>{m.write(`const ${f} = ${n}[${l}];`);let d=K(m,t,s,f);m.write(`${a}[${l}] = ${d};`)}),e.write("}")}return a}function lf(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function Nh(e,t,r,n){let o=r._zod.def,i=o.options;if(o.discriminator)return Ch(e,t,o,n);if(o.inclusive===!1)throw new Z("exclusive unions (z.xor)");if(i.length===0)return e.write("return INVALID;"),n;if(i.length===1)return R(e,t,i[0],n);if(i.every(c=>c._zod.def.type==="literal"&&!c._zod.def.checks?.length)){let c=new Set(i.flatMap(l=>l._zod.def.values)),a=x(t,c);return e.write(`if (!${a}.has(${n})) return INVALID;`),n}let u=v(t);e.write(`let ${u};`);for(let c=0;c<i.length;c++){let a=i[c];c===0?e.write(`${u} = (() => {`):e.write(`if (${u} === INVALID) ${u} = (() => {`),e.indented(l=>{let f=R(l,t,a,n);l.write(`return ${f};`)}),e.write("})();")}return e.write(`if (${u} === INVALID) return INVALID;`),u}function Ch(e,t,r,n){if(r.unionFallback)throw new Z("discriminated union with unionFallback");if(r.options.length===0)return e.write("return INVALID;"),n;let o=v(t),i=v(t);e.write(`const ${o} = ${n}?.[${W(r.discriminator)}];`),e.write(`let ${i};`);let s=!0,u=new Set;for(let c of r.options){let a=c._zod.propValues?.[r.discriminator];if(!a||a.size===0)throw new Z("discriminated union option without static discriminator values");for(let m of a){if(u.has(m))throw new Z(`duplicate discriminator value ${String(m)}`);u.add(m)}let l=Array.from(a,m=>Th(t,o,m)),f=s?"if":"else if";e.write(`${f} (${l.join(" || ")}) {`),e.indented(m=>{let d=R(m,t,c,n);m.write(`${i} = ${d};`)}),e.write("}"),s=!1}return e.write("else { return INVALID; }"),i}function Th(e,t,r){if(typeof r=="string")return`${t} === ${W(r)}`;if(typeof r=="number")return Number.isNaN(r)?`Number.isNaN(${t})`:`${t} === ${r}`;if(typeof r=="boolean")return`${t} === ${r}`;if(r===null)return`${t} === null`;if(r===void 0)return`${t} === undefined`;if(typeof r=="bigint")return`${t} === ${r}n`;if(typeof r=="symbol"){let n=x(e,r);return`${t} === ${n}`}throw new Z(`literal discriminator value ${String(r)}`)}function Eh(e,t,r,n){let o=r._zod.def;t.definite=!1;let i=K(e,t,o.left,n),s=K(e,t,o.right,n),u=x(t,lt),c=v(t);return e.write(`const ${c} = ${u}(${i}, ${s});`),e.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function Dh(e,t,r,n){let o=r._zod.def,i=x(t,ie);e.write(`if (!${i}(${n})) return INVALID;`);let s=v(t),u=v(t),c=v(t);e.write(`const ${s} = {};`);let a=o,l=a.partial?void 0:o.keyType._zod.values;if(l){let d=[];for(let g of l){if(!(typeof g=="string"||typeof g=="number"||typeof g=="symbol"))throw new Z(`record key value ${String(g)}`);let $=typeof g=="number"?g.toString():g;if($==="__proto__")throw new Z('record key "__proto__"');d.push($);let z=x(t,g),w=R(e,t,o.keyType,z),I=v(t);e.write(`const ${I} = ${n}[${Lh(t,$)}];`);let A=K(e,t,o.valueType,I);e.write(`${s}[${w}] = ${A};`)}let h=x(t,new Set(d));return e.write(`for (const ${u} in ${n}) {`),e.indented(g=>{g.write(`if (${h}.has(${u})) continue;`),a.mode==="loose"?g.write(`if (${u} !== "__proto__") ${s}[${u}] = ${n}[${u}];`):g.write("return INVALID;")}),e.write("}"),s}let f=o.keyType._zod.def;if(!(f.type==="string"&&f.format===void 0&&!f.coerce&&(f.checks?.length??0)===0)){let d=o.mode==="loose",h=En(o.keyType);h.definite===!1&&(t.definite=!1);let g=x(t,h),$=x(t,$e),z=v(t);return ff(e,t,n,u,w=>{w.write(`let ${z} = ${g}(${u});`),w.write(`if (${z} === INVALID && typeof ${u} === "string" && ${$}.test(${u})) ${z} = ${g}(Number(${u}));`),d?w.write(`if (${z} === INVALID) { ${s}[${u}] = ${n}[${u}]; continue; }`):w.write(`if (${z} === INVALID) return INVALID;`),w.write(`if (${z} === "__proto__") continue;`);let I=v(t);w.write(`const ${I} = ${n}[${u}];`);let A=K(w,t,o.valueType,I);w.write(`${s}[${z}] = ${A};`)}),s}return ff(e,t,n,u,d=>{d.write(`const ${c} = ${n}[${u}];`);let h=K(d,t,o.valueType,c);d.write(`${s}[${u}] = ${h};`)},"return INVALID;"),s}function ff(e,t,r,n,o,i){let s=x(t,Object.prototype.propertyIsEnumerable),u=v(t),c=v(t),a=v(t);e.write(`const ${u} = Object.getOwnPropertySymbols(${r});`),e.write(`const ${c} = Object.getOwnPropertyNames(${r});`),e.write(`for (let ${a} = 0; ${a} < ${c}.length; ${a}++) {`),e.indented(l=>{l.write(`const ${n} = ${c}[${a}];`),l.write(`if (${n} === "__proto__" || !${s}.call(${r}, ${n})) continue;`),o(l)}),e.write("}"),e.write(`for (let ${a} = 0; ${a} < ${u}.length; ${a}++) {`),e.indented(l=>{l.write(`const ${n} = ${u}[${a}];`),l.write(`if (!${s}.call(${r}, ${n})) continue;`),i?l.write(i):o(l)}),e.write("}")}function Lh(e,t){return typeof t=="string"?W(t):x(e,t)}function Rh(e,t,r,n){let o=r._zod.def;e.write(`if (!(${n} instanceof Map)) return INVALID;`),Du(e,r,`${n}.size`);let i=v(t),s=v(t),u=v(t);return e.write(`const ${i} = new Map();`),e.write(`for (const [${s}, ${u}] of ${n}) {`),e.indented(c=>{let a=R(c,t,o.keyType,s),l=R(c,t,o.valueType,u);c.write(`${i}.set(${a}, ${l});`)}),e.write("}"),i}function jh(e,t,r,n){let o=r._zod.def;e.write(`if (!(${n} instanceof Set)) return INVALID;`),Du(e,r,`${n}.size`);let i=v(t),s=v(t);return e.write(`const ${i} = new Set();`),e.write(`for (const ${s} of ${n}) {`),e.indented(u=>{let c=R(u,t,o.valueType,s);u.write(`${i}.add(${c});`)}),e.write("}"),i}function Vh(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function Fh(e,t,r,n){e.write(`if (typeof ${n} !== "string") return INVALID;`);let o=r._zod.pattern;if(o){let i=x(t,o);e.write(`${i}.lastIndex = 0;`),e.write(`if (!${i}.test(${n})) return INVALID;`)}return n}function Mh(e,t,r,n){let o=r._zod.def,i=Fe(t,o.getter),s=x(t,{parser:null});e.write(`if (!${s}.parser) {`),e.indented(c=>{c.write(`const inner = ${i}();`),c.write(`${s}.parser = function(input) {`),c.indented(a=>{a.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),a.write("return result.issues.length === 0 ? result.value : INVALID;")}),c.write("};")}),e.write("}");let u=v(t);return e.write(`const ${u} = ${s}.parser(${n});`),e.write(`if (${u} === INVALID) return INVALID;`),u}function Uh(e,t,r,n){let o=r._zod.def,i=R(e,t,o.in,n);if(o.transform){if(Me(o.transform))throw new ae("z.compile: async transforms in pipes are not supported");let s=o.transform,c=Fe(t,l=>{let f={value:l,issues:[],addIssue:Eu},m=s(l,f);return m instanceof Promise?q:f.issues.length===0?m:q}),a=v(t);return e.write(`const ${a} = ${c}(${i});`),e.write(`if (${a} === INVALID) return INVALID;`),R(e,t,o.out,a)}else return R(e,t,o.out,i)}function Me(e){return typeof e=="function"&&(e.constructor.name==="AsyncFunction"||e[Symbol.toStringTag]==="AsyncFunction")}function Bh(e,t,r,n){let o=r._zod.def;if(o.fn){if(Me(o.fn))throw new ae("z.compile: async custom predicates are not supported");let i=Fe(t,o.fn),s=x(t,Nu),u=v(t);e.write(`const ${u} = ${i}(${n});`),e.write(`if (${u} instanceof Promise) ${s}();`),e.write(`if (!${u}) return INVALID;`)}else throw new Z("custom schema without a predicate function");return n}function Jh(e,t,r){let n=e._zod.run({value:r,issues:[]},{});if(n&&typeof n.then=="function")return q;let o=n;return o.issues.length===0?o.value:t()}function Kh(e,t,r,n){let o=r._zod.def;if(!o.catchValue[Fr])throw new Z("catch with a callback (only a constant catch value compiles)",!1);let i=v(t);e.write(`let ${i} = (() => {`),e.indented(a=>{let l=K(a,t,o.innerType,n);a.write(`return ${l};`)}),e.write("})();");let s=x(t,o.innerType),u=Fe(t,o.catchValue),c=x(t,Jh);return e.write(`if (${i} === INVALID) {`),e.indented(a=>{a.write(`${i} = ${c}(${s}, ${u}, ${n});`),a.write(`if (${i} === INVALID) return INVALID;`)}),e.write("}"),i}function Wh(e,t,r,n){let o=r._zod.def;if(o.transform){if(Me(o.transform))throw new ae("z.compile: async transforms are not supported");let i=o.transform,u=Fe(t,a=>{let l={value:a,issues:[],addIssue:Eu},f=i(a,l);return f instanceof Promise?q:l.issues.length===0?f:q}),c=v(t);return e.write(`const ${c} = ${u}(${n});`),e.write(`if (${c} === INVALID) return INVALID;`),c}return n}function Dn(e){return e.checks&&(e.checks=[...e.checks]),e}function Lu(e,t){return new e(Dn({type:"string",..._(t)}))}function Ru(e,t){return new e(Dn({type:"string",coerce:!0,..._(t)}))}function Ln(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,..._(t)})}function Rn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,..._(t)})}function jn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,..._(t)})}function Vn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",..._(t)})}function Fn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",..._(t)})}function Mn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",..._(t)})}function hr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,..._(t)})}function Un(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,..._(t)})}function Bn(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,..._(t)})}function Jn(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,..._(t)})}function Kn(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,..._(t)})}function Wn(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,..._(t)})}function Gn(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,..._(t)})}function qn(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,..._(t)})}function Xn(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,..._(t)})}function Yn(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,..._(t)})}function ju(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,..._(t)})}function Hn(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,..._(t)})}function Qn(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,..._(t)})}function eo(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,..._(t)})}function to(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,..._(t)})}function ro(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,..._(t)})}function Vu(e,t){return new e({type:"string",format:"credit_card",check:"string_format",abort:!1,..._(t)})}function Fu(e,t){return new e({type:"string",format:"iban",check:"string_format",abort:!1,..._(t)})}function no(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,..._(t)})}var Mu={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function gr(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,..._(t)})}function _r(e,t){return new e({type:"string",format:"date",check:"string_format",..._(t)})}function $r(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,..._(t)})}function yr(e,t){return new e({type:"string",format:"duration",check:"string_format",..._(t)})}function Uu(e,t){return new e(Dn({type:"number",checks:[],..._(t)}))}function Bu(e,t){return new e(Dn({type:"number",coerce:!0,checks:[],..._(t)}))}function Ju(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",..._(t)})}function Ku(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",..._(t)})}function Wu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",..._(t)})}function Gu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",..._(t)})}function qu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",..._(t)})}function Xu(e,t){return new e({type:"boolean",..._(t)})}function Yu(e,t){return new e({type:"boolean",coerce:!0,..._(t)})}function Hu(e,t){return new e({type:"bigint",..._(t)})}function Qu(e,t){return new e({type:"bigint",coerce:!0,..._(t)})}function ec(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",..._(t)})}function tc(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",..._(t)})}function rc(e,t){return new e({type:"symbol",..._(t)})}function nc(e,t){return new e({type:"undefined",..._(t)})}function oc(e,t){return new e({type:"null",..._(t)})}function ic(e){return new e({type:"any"})}function sc(e){return new e({type:"unknown"})}function uc(e,t){return new e({type:"never",..._(t)})}function cc(e,t){return new e({type:"void",..._(t)})}function ac(e,t){return new e({type:"date",..._(t)})}function lc(e,t){return new e({type:"date",coerce:!0,..._(t)})}function fc(e,t){return new e({type:"nan",..._(t)})}function fe(e,t){return new nn({check:"less_than",..._(t),value:e,inclusive:!1})}function ne(e,t){return new nn({check:"less_than",..._(t),value:e,inclusive:!0})}function pe(e,t){return new on({check:"greater_than",..._(t),value:e,inclusive:!1})}function oe(e,t){return new on({check:"greater_than",..._(t),value:e,inclusive:!0})}function oo(e){return pe(0,e)}function io(e){return fe(0,e)}function so(e){return ne(0,e)}function uo(e){return oe(0,e)}function ke(e,t){return new Wi({check:"multiple_of",..._(t),value:e})}function Ie(e,t){return new Xi({check:"max_size",..._(t),maximum:e})}function de(e,t){return new Yi({check:"min_size",..._(t),minimum:e})}function Ue(e,t){return new Hi({check:"size_equals",..._(t),size:e})}function Be(e,t){return new Qi({check:"max_length",..._(t),maximum:e})}function ye(e,t){return new es({check:"min_length",..._(t),minimum:e})}function Je(e,t){return new ts({check:"length_equals",..._(t),length:e})}function dt(e,t){return new rs({check:"string_format",format:"regex",..._(t),pattern:e})}function mt(e){return new ns({check:"string_format",format:"lowercase",..._(e)})}function ht(e){return new os({check:"string_format",format:"uppercase",..._(e)})}function gt(e,t){return new is({check:"string_format",format:"includes",..._(t),includes:e})}function _t(e,t){return new ss({check:"string_format",format:"starts_with",..._(t),prefix:e})}function $t(e,t){return new us({check:"string_format",format:"ends_with",..._(t),suffix:e})}function co(e,t,r){return new cs({check:"property",property:e,schema:t,..._(r)})}function yt(e,t){return new as({check:"properties",shape:e,..._(t)})}function bt(e,t){return new ls({check:"mime_type",mime:e,..._(t)})}function le(e){return new fs({check:"overwrite",tx:e})}function wt(e){return le(t=>t.normalize(e))}function vt(){return le(e=>e.trim())}function zt(){return le(e=>e.toLowerCase())}function xt(){return le(e=>e.toUpperCase())}function kt(){return le(e=>Go(e))}function pc(e,t,r){return new e({type:"array",element:t,..._(r)})}function Gh(e,t,r){return new e({type:"union",options:t,..._(r)})}function qh(e,t,r){return new e({type:"union",options:t,inclusive:!1,..._(r)})}function Xh(e,t,r,n){return new e({type:"union",options:r,discriminator:t,..._(n)})}function Yh(e,t,r){return new e({type:"intersection",left:t,right:r})}function Hh(e,t,r,n){let o=r instanceof k,i=o?n:r,s=o?r:null;return new e({type:"tuple",items:t,rest:s,..._(i)})}function Qh(e,t,r,n){return new e({type:"record",keyType:t,valueType:r,..._(n)})}function eg(e,t,r,n){return new e({type:"map",keyType:t,valueType:r,..._(n)})}function tg(e,t,r){return new e({type:"set",valueType:t,..._(r)})}function rg(e,t,r){let n=Array.isArray(t)?Object.fromEntries(t.map(o=>[o,o])):t;return new e({type:"enum",entries:n,..._(r)})}function ng(e,t,r){return new e({type:"enum",entries:t,..._(r)})}function og(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],..._(r)})}function dc(e,t){return new e({type:"file",..._(t)})}function ig(e,t){return new e({type:"transform",transform:t})}function sg(e,t){return new e({type:"optional",innerType:t})}function ug(e,t){return new e({type:"nullable",innerType:t})}function cg(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Vt(r)}})}function ag(e,t,r){return new e({type:"nonoptional",innerType:t,..._(r)})}function lg(e,t){return new e({type:"success",innerType:t})}function fg(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:ti(r)})}function pg(e,t,r){return new e({type:"pipe",in:t,out:r})}function dg(e,t){return new e({type:"readonly",innerType:t})}function mg(e,t,r){return new e({type:"template_literal",parts:t,..._(r)})}function hg(e,t){return new e({type:"lazy",getter:t})}function gg(e,t){return new e({type:"promise",innerType:t})}function mc(e,t,r){let n=_(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function hc(e,t,r){return new e({type:"custom",check:"custom",fn:t,..._(r)})}function gc(e,t){let r=hf(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(ot(o,n.value,r._zod.def));else{let i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=n.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),n.issues.push(ot(i))}},e(n.value,n)),t);return r}function hf(e,t){let r=new D({check:"custom",..._(t)});return r._zod.check=e,r}function _c(e){let t=new D({check:"describe"});return t._zod.onattach=[r=>{let n=B.get(r)??{};B.add(r,{...n,description:e})}],t._zod.check=()=>{},t}function $c(e){let t=new D({check:"meta"});return t._zod.onattach=[r=>{let n=B.get(r)??{};B.add(r,{...n,...e})}],t._zod.check=()=>{},t}function yc(e,t){let r=_(t),n=r.truthy??["true","1","yes","on","y","enabled"],o=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(d=>typeof d=="string"?d.toLowerCase():d),o=o.map(d=>typeof d=="string"?d.toLowerCase():d));let i=new Set(n),s=new Set(o),u=e.Codec??ar,c=e.Boolean??ur,a=e.String??je,l=new a({type:"string",error:r.error}),f=new c({type:"boolean",error:r.error}),m=new u({type:"pipe",in:l,out:f,transform:((d,h)=>{let g=d;return r.case!=="sensitive"&&(g=g.toLowerCase()),i.has(g)?!0:s.has(g)?!1:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:h.value,inst:m,continue:!1}),{})}),reverseTransform:((d,h)=>d===!0?n[0]||"true":o[0]||"false"),error:r.error});return m._zod.bag.truthy=n,m._zod.bag.falsy=o,m._zod.bag.case=r.case??"insensitive",m}function Ke(e,t,r,n={}){let o=_(n),i={check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:u=>r.test(u),...o};return r instanceof RegExp&&(i.pattern=r),new e(i)}function br(e,...t){for(let r of t)for(let n of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,n)&&U(e,n,r[n]);return e}function Se(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??B,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function V(e,t,r,n,o){let i=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:n.path,message:o}):t.unrepresentable;if(i==="any")return!1;if(i===void 0||i==="throw")throw new Error(o);return Object.assign(r,i),!0}function T(e,t,r={path:[],schemaPath:[]}){var n;let o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let u=e._zod.toJSONSchema?.();if(u)s.schema=u;else{let l={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,l);else{let m=s.schema,d=t.processors[o.type];if(!d)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);d(e,t,m,l)}let f=e._zod.parent;f&&(s.ref||(s.ref=f),T(f,t,l),t.seen.get(f).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&br(s.schema,c),t.io==="input"&&X(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function gf(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Pe(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let n=new Map;for(let s of e.seen.entries()){let u=e.metadataRegistry.get(s[0])?.id;if(u){let c=n.get(u);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(u,s[0])}}let o=s=>{let u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let f=e.external.registry.get(s[0])?.id,m=e.external.uri??(h=>h);if(f)return{ref:m(f)};let d=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=d,{defId:d,ref:`${m("__shared")}#/${u}/${gf(d)}`}}let c="#",a=`${c}/${u}/`;if(s[1]===r&&!s[1].schema.id)return{ref:c};let l=s[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:a+gf(l)}},i=s=>{if(s[1].schema.$ref)return;let u=s[1],{ref:c,defId:a}=o(s);u.def={...u.schema},a&&(u.defId=a);let l=u.schema;for(let f in l)delete l[f];l.$ref=c};if(e.cycles==="throw")for(let s of e.seen.entries()){let u=s[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
|
|
61
|
+
|
|
62
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let u=s[1];if(t===s[0]){i(s);continue}if(e.external){let a=e.external.registry.get(s[0])?.id;if(t!==s[0]&&a){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(u.cycle){i(s);continue}u.count>1&&e.reused==="ref"&&i(s)}e.external&&(e.sharedDefsExtractedFor=e.external)}function yf(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let r=[];for(let n of t){if(!n||typeof n!="object")return;yf(n);let o=Object.keys(n);if(o.length!==1||o[0]!=="type")return;let i=n.type;for(let s of Array.isArray(i)?i:[i]){if(typeof s!="string")return;r.includes(s)||r.push(s)}}delete e.anyOf,e.type=r.length===1?r[0]:r}var bf=new Set(["type","properties","required","additionalProperties"]),_f=["oneOf","anyOf"];function $f(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function bc(e){let t=[];for(let i of e){if(typeof i!="object"||i.type!=="object")return null;for(let s in i)if(!bf.has(s))return null;t.push(i)}let r={},n=new Set;for(let i of t){for(let s in i.properties){if(Object.prototype.hasOwnProperty.call(r,s))continue;let u=[];for(let a of t){let l=a.properties?.[s]??$f(a);l!=null&&(u.some(f=>JSON.stringify(f)===JSON.stringify(l))||u.push(l))}let c=u.length===1?u[0]:bc(u)??{allOf:u};U(r,s,c)}for(let s of i.required??[])n.add(s)}let o={type:"object",properties:r};if(n.size&&(o.required=[...n]),t.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{let i=[];for(let s of t){let u=$f(s);u&&!i.some(c=>JSON.stringify(c)===JSON.stringify(u))&&i.push(u)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function _g(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let o of bf)if(o in e)return;let r=t.filter(o=>_f.some(i=>Array.isArray(o[i]))),n=null;if(!r.length)n=bc(t);else{let o=r[0],i=_f.find(c=>Array.isArray(o[c]));if(Object.keys(o).length!==1)return;let s=t.filter(c=>c!==o),u=o[i].map(c=>bc([...s,c]));if(u.some(c=>!c))return;n={[i]:u}}n&&(delete e.allOf,br(e,n))}function Ze(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=u=>{let c=e.seen.get(u);if(c.ref===null)return;let a=c.def??c.schema,l={...a},f=c.ref;if(c.ref=null,f){n(f);let d=e.seen.get(f),h=d.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(a.allOf=a.allOf??[],a.allOf.push(h)):br(a,h),br(a,l),u._zod.parent===f)for(let $ in a)$==="$ref"||$==="allOf"||$ in l||delete a[$];if(h.$ref&&d.def)for(let $ in a)$==="$ref"||$==="allOf"||$ in d.def&&JSON.stringify(a[$])===JSON.stringify(d.def[$])&&delete a[$]}let m=u._zod.parent;if(m&&m!==f){n(m);let d=e.seen.get(m);if(d?.schema.$ref&&(a.$ref=d.schema.$ref,d.def))for(let h in a)h==="$ref"||h==="allOf"||h in d.def&&JSON.stringify(a[h])===JSON.stringify(d.def[h])&&delete a[h]}e.override({zodSchema:u,jsonSchema:a,path:c.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let u of[...e.seen.entries()].reverse())n(u[0]);if(e.target!=="openapi-3.0")for(let u of e.seen.entries())yf(u[1].def??u[1].schema);for(let u of e.deferred)u();if(e.intersections.length){let u=new Map;for(let c of e.seen.values())for(let a of[c.schema,c.def]){let l=a?.allOf;if(!Array.isArray(l))continue;let f=u.get(l);f?f.push(a):u.set(l,[a])}for(let c of e.intersections)for(let a of u.get(c)??[])_g(a)}}let o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let u=e.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(u)}br(o,r.defId?r.schema:r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;let s=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let u of e.seen.entries()){let c=u[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,U(s,c.defId,c.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{let u=JSON.parse(JSON.stringify(o));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:It(t,"input",e.processors),output:It(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function X(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return X(n.element,r);if(n.type==="set")return X(n.valueType,r);if(n.type==="lazy")return X(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault"||n.type==="catch")return X(n.innerType,r);if(n.type==="intersection")return X(n.left,r)||X(n.right,r);if(n.type==="record"||n.type==="map")return X(n.keyType,r)||X(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:X(n.in,r)||X(n.out,r);if(n.type==="object"){for(let o in n.shape)if(X(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(let o of n.options)if(X(o,r))return!0;return!1}if(n.type==="tuple"){for(let o of n.items)if(X(o,r))return!0;return!!(n.rest&&X(n.rest,r))}return!1}var wc=(e,t={})=>r=>{let n=Se({...r,processors:t});return T(e,n),Pe(n,e),Ze(n,e)},It=(e,t,r={})=>n=>{let{libraryOptions:o,target:i}=n??{},s=Se({...o??{},target:i,io:t,processors:r});return T(e,s),Pe(s,e),Ze(s,e)};var St=(e,t,r)=>{(e[t]===void 0||r>e[t])&&(e[t]=r)},Pt=(e,t,r)=>{(e[t]===void 0||r<e[t])&&(e[t]=r)},wf=(e,t)=>{St(e,"minimum",t),Pt(e,"maximum",t)},kf=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},If=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},Sf=(e,t)=>{e.mime=e.mime?e.mime.filter(r=>t.includes(r)):[...t]},Pf=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},vf=(e,t)=>St(e,"minimum",t.minimum),zf=(e,t)=>Pt(e,"maximum",t.maximum),xf=e=>(t,r)=>{Pf(t,r.format);let[n,o]=e[r.format];St(t,"minimum",n),Pt(t,"maximum",o)},$g={greater_than:(e,t)=>St(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>Pt(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>kf(e,t.value),number_format:xf(Mt),bigint_format:xf(Ut),min_length:vf,max_length:zf,length_equals:(e,t)=>wf(e,t.length),min_size:vf,max_size:zf,size_equals:(e,t)=>wf(e,t.size),string_format:(e,t)=>{Pf(e,t.format),t.pattern&&If(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Sf(e,t.mime)};function F(e){let t={},r=e._zod.def,n=e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[];for(let i of n)$g[i._zod.def.check]?.(t,i._zod.def);let o=e._zod.bag;o.minimum!==void 0&&St(t,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&St(t,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&Pt(t,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&Pt(t,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&kf(t,o.multipleOf),o.format!==void 0&&(t.format??(t.format=o.format),o.format.includes("int")&&(t.isInt=!0)),o.mime&&Sf(t,o.mime);for(let i of o.patterns??[])If(t,i);return t}var yg={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},bg=new Map([[hn,Si],[sr,Pi]]),Zf=e=>bg.get(e)??e,xc=(e,t,r,n)=>{let o=r;o.type="string";let{minimum:i,maximum:s,format:u,patterns:c,contentEncoding:a,laxFormat:l}=F(e);if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),u&&(o.format=yg[u]??u,o.format===""&&delete o.format,(u==="time"||l)&&delete o.format),a&&(o.contentEncoding=a),c&&c.size>0){let f=[...c].map(Zf);f.length===1?o.pattern=f[0].source:f.length>1&&(o.allOf=[...f.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},kc=(e,t,r,n)=>{let o=r,{minimum:i,maximum:s,multipleOf:u,exclusiveMaximum:c,exclusiveMinimum:a,isInt:l}=F(e);o.type=l?"integer":"number";let f=typeof a=="number"&&a>=(i??Number.NEGATIVE_INFINITY),m=typeof c=="number"&&c<=(s??Number.POSITIVE_INFINITY),d=t.target==="draft-04"||t.target==="openapi-3.0";if(f?d?(o.minimum=a,o.exclusiveMinimum=!0):o.exclusiveMinimum=a:typeof i=="number"&&(o.minimum=i),m?d?(o.maximum=c,o.exclusiveMaximum=!0):o.exclusiveMaximum=c:typeof s=="number"&&(o.maximum=s),u){let h=new Set;for(let z of u)Number.isFinite(z)&&z!==0?h.add(Math.abs(z)):V(e,t,o,n,`A multipleOf divisor of ${z} cannot be represented in JSON Schema`);let[g,...$]=h;g!==void 0&&(o.multipleOf=g),$.length&&(o.allOf=[...o.allOf??[],...$.map(z=>({multipleOf:z}))])}},Ic=(e,t,r,n)=>{r.type="boolean"},Sc=(e,t,r,n)=>{V(e,t,r,n,"BigInt cannot be represented in JSON Schema")},Pc=(e,t,r,n)=>{V(e,t,r,n,"Symbols cannot be represented in JSON Schema")},Zc=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Oc=(e,t,r,n)=>{V(e,t,r,n,"Undefined cannot be represented in JSON Schema")},Ac=(e,t,r,n)=>{V(e,t,r,n,"Void cannot be represented in JSON Schema")},Nc=(e,t,r,n)=>{r.not={}},Cc=(e,t,r,n)=>{},Tc=(e,t,r,n)=>{},Ec=(e,t,r,n)=>{V(e,t,r,n,"Date cannot be represented in JSON Schema")},Dc=(e,t,r,n)=>{let o=e._zod.def,i=Qe(o.entries);if(i.length===0){r.not={};return}i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},Lc=(e,t,r,n)=>{let o=e._zod.def;if(o.values.length===0){r.not={};return}let i=[];for(let s of o.values)if(s===void 0){if(V(e,t,r,n,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof s=="bigint"){if(V(e,t,r,n,"BigInt literals cannot be represented in JSON Schema"))return;i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),i.every(s=>typeof s=="boolean")&&(r.type="boolean"),i.every(s=>s===null)&&(r.type="null"),r.enum=i},Rc=(e,t,r,n)=>{V(e,t,r,n,"NaN cannot be represented in JSON Schema")},jc=(e,t,r,n)=>{let o=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},Vc=(e,t,r,n)=>{let o=r;o.type="string",o.format="binary",o.contentEncoding="binary";let{minimum:i,maximum:s,mime:u}=F(e);i!==void 0&&(o.minLength=i),s!==void 0&&(o.maxLength=s),u&&(u.length===0?o.not={}:u.length===1?o.contentMediaType=u[0]:o.anyOf=u.map(c=>({contentMediaType:c})))},Fc=(e,t,r,n)=>{r.type="boolean"},Mc=(e,t,r,n)=>{V(e,t,r,n,"Custom types cannot be represented in JSON Schema")},Uc=(e,t,r,n)=>{V(e,t,r,n,"Function types cannot be represented in JSON Schema")},Bc=(e,t,r,n)=>{V(e,t,r,n,"Transforms cannot be represented in JSON Schema")},Jc=(e,t,r,n)=>{V(e,t,r,n,"Map cannot be represented in JSON Schema")},Kc=(e,t,r,n)=>{V(e,t,r,n,"Set cannot be represented in JSON Schema")},Wc=(e,t,r,n)=>{let o=r,i=e._zod.def,{minimum:s,maximum:u}=F(e);typeof s=="number"&&(o.minItems=s),typeof u=="number"&&(o.maxItems=u),o.type="array",o.items=T(i.element,t,{...n,path:[...n.path,"items"]})};function wr(e){let t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?wr(t.out):t.type==="catch"?wr(t.innerType):e._zod.optin}var Gc=(e,t,r,n)=>{let o=r,i=e._zod.def,s=i.shape;if(Object.getOwnPropertySymbols(s).length&&V(e,t,o,n,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(let a in s)U(o.properties,a,T(s[a],t,{...n,path:[...n.path,"properties",a]}));let c=[];for(let a of Object.keys(s)){let l=i.shape[a];(t.io==="input"?wr(l)===void 0:l._zod.optout===void 0)&&c.push(a)}c.length>0&&(o.required=c),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=T(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},lo=(e,t,r,n)=>{let o=e._zod.def,i=o.inclusive===!1,s=o.options.map((u,c)=>T(u,t,{...n,path:[...n.path,i?"oneOf":"anyOf",c]}));i?r.oneOf=s:r.anyOf=s},qc=(e,t,r,n)=>{let o=e._zod.def,i=T(o.left,t,{...n,path:[...n.path,"allOf",0]}),s=T(o.right,t,{...n,path:[...n.path,"allOf",1]}),u=a=>"allOf"in a&&Object.keys(a).length===1,c=[...u(i)?i.allOf:[i],...u(s)?s.allOf:[s]];r.allOf=c,t.intersections.push(c)},Xc=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((g,$)=>T(g,t,{...n,path:[...n.path,s,$]})),a=i.rest?T(i.rest,t,{...n,path:[...n.path,u,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null,l=i.items.length;for(;l>0;){let g=i.items[l-1];if(!(t.io==="input"?wr(g)!==void 0:g._zod.optout==="optional"))break;l--}let f=i.items.length,m=!i.rest;t.target==="draft-2020-12"?(o.prefixItems=c,m?o.items=!1:a&&(o.items=a),l>0&&(o.minItems=l),m&&(o.maxItems=f)):t.target==="openapi-3.0"?(o.items={anyOf:c},a&&o.items.anyOf.push(a),l>0&&(o.minItems=l),m&&(o.maxItems=f)):(o.items=c,m?o.additionalItems=!1:a&&(o.additionalItems=a),l>0&&(o.minItems=l),m&&(o.maxItems=f));let{minimum:d,maximum:h}=F(e);typeof d=="number"&&(o.minItems=d),typeof h=="number"&&(o.maxItems=h)};function vc(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);let h=e.get(t)?.def;if(!h)return t;let g=vc(e,h,r);return g===h?t:g}for(let h of["anyOf","oneOf"]){let g=t[h];if(!Array.isArray(g))continue;let $=g.map(z=>vc(e,z,r));$.some((z,w)=>z!==g[w])&&(t={...t,[h]:$})}let n=Array.isArray(t.type)?t.type:[t.type],o=!n.includes("string")&&n.some(h=>h==="number"||h==="integer"),i=t.enum??(t.const!==void 0?[t.const]:void 0);if(!o&&!i?.some(h=>typeof h=="number"))return t;let{minimum:s,maximum:u,exclusiveMinimum:c,exclusiveMaximum:a,multipleOf:l,format:f,id:m,...d}=t;return d.enum?d.enum=d.enum.map(h=>typeof h=="number"?String(h):h):typeof d.const=="number"&&(d.const=String(d.const)),o&&(d.type="string",i||(d.pattern=(n.includes("number")?$e:Qt).source)),d}var zc=new WeakMap;function wg(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let r=new Map;for(let n of zc.get(e)??[]){let o=e.seen.get(n),i=(o?.def??o?.schema)?.propertyNames;if(!i||i===!0||r.has(i))continue;let s=vc(t,i,new Set);s!==i&&r.set(i,s)}if(r.size)for(let n of e.seen.values())for(let o of[n.schema,n.def]){let i=o&&r.get(o.propertyNames);i&&(o.propertyNames=i)}}var Yc=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="object";let s=i.keyType,u=F(s).patterns;if(i.mode==="loose"&&u&&u.size>0){let l=T(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(let f of u)U(o.patternProperties,Zf(f).source,l)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){o.propertyNames=T(i.keyType,t,{...n,path:[...n.path,"propertyNames"]});let l=zc.get(t);l||(l=[],zc.set(t,l),t.deferred.push(()=>wg(t))),l.push(e)}o.additionalProperties=T(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]})}let c=s._zod.values,a=t.io==="input"&&wr(i.valueType)!==void 0;if(c&&!i.partial&&!a){let l=[...c].filter(f=>typeof f=="string"||typeof f=="number");l.length>0&&(o.required=l.map(String))}},Hc=(e,t,r,n)=>{let o=e._zod.def,i=T(o.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},Qc=(e,t,r,n)=>{let o=e._zod.def;T(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},ea=Symbol();function Of(e,t,r,n,o){let i=!1,s=JSON.stringify(e,(u,c)=>typeof c!="bigint"?c:(i=!0,null));return i?(V(t,r,n,o,"BigInt defaults cannot be represented in JSON Schema"),ea):JSON.parse(s)}var ta=(e,t,r,n)=>{let o=e._zod.def;T(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;let s=Of(o.defaultValue,e,t,r,n);s!==ea&&(r.default=s)},ra=(e,t,r,n)=>{let o=e._zod.def;T(o.innerType,t,n);let i=t.seen.get(e);if(i.ref=o.innerType,t.io!=="input")return;let s=Of(o.defaultValue,e,t,r,n);s!==ea&&(r._prefault=s)},na=(e,t,r,n)=>{let o=e._zod.def;T(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{V(e,t,r,n,"Dynamic catch values are not supported in JSON Schema");return}r.default=s},oa=(e,t,r,n)=>{let o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?o.out:o.in:o.out;T(s,t,n);let u=t.seen.get(e);u.ref=s},ia=(e,t,r,n)=>{let o=e._zod.def;T(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0},sa=(e,t,r,n)=>{let o=e._zod.def;T(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},fo=(e,t,r,n)=>{let o=e._zod.def;T(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},ua=(e,t,r,n)=>{let o=e._zod.innerType;T(o,t,n);let i=t.seen.get(e);i.ref=o},ao={string:xc,number:kc,boolean:Ic,bigint:Sc,symbol:Pc,null:Zc,undefined:Oc,void:Ac,never:Nc,any:Cc,unknown:Tc,date:Ec,enum:Dc,literal:Lc,nan:Rc,template_literal:jc,file:Vc,success:Fc,custom:Mc,function:Uc,transform:Bc,map:Jc,set:Kc,array:Wc,object:Gc,union:lo,intersection:qc,tuple:Xc,record:Yc,nullable:Hc,nonoptional:Qc,default:ta,prefault:ra,catch:na,pipe:oa,readonly:ia,promise:sa,optional:fo,lazy:ua};function po(e,t){if("_idmap"in e){let n=e,o=Se({...t,processors:ao}),i={};for(let c of n._idmap.entries()){let[a,l]=c;T(l,o)}let s={},u={registry:n,uri:t?.uri,defs:i};o.external=u;for(let c of n._idmap.entries()){let[a,l]=c;Pe(o,l),U(s,a,Ze(o,l))}if(Object.keys(i).length>0){let c=o.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:i}}return{schemas:s}}let r=Se({...t,processors:ao});return T(e,r),Pe(r,e),Ze(r,e)}var mo=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=Se({processors:ao,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return T(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,Pe(this.ctx,t);let n=Ze(this.ctx,t),{"~standard":o,...i}=n;return i}};var Af={};var Dt={};he(Dt,{ZodAny:()=>Za,ZodArray:()=>Ca,ZodBase64:()=>Co,ZodBase64URL:()=>To,ZodBigInt:()=>Tt,ZodBigIntFormat:()=>Lo,ZodBoolean:()=>Ct,ZodCIDRv4:()=>Ao,ZodCIDRv6:()=>No,ZodCUID:()=>xo,ZodCUID2:()=>ko,ZodCatch:()=>el,ZodCodec:()=>Ar,ZodCreditCard:()=>wa,ZodCustom:()=>Nr,ZodCustomStringFormat:()=>Xe,ZodDate:()=>kr,ZodDefault:()=>Ga,ZodDiscriminatedUnion:()=>Ea,ZodE164:()=>Eo,ZodEmail:()=>bo,ZodEmoji:()=>vo,ZodEnum:()=>Ot,ZodExactOptional:()=>Fo,ZodFile:()=>Ba,ZodFunction:()=>ll,ZodGUID:()=>wo,ZodIBAN:()=>va,ZodIPv4:()=>Zo,ZodIPv6:()=>Oo,ZodISODate:()=>Ae,ZodISODateTime:()=>Oe,ZodISODuration:()=>Ce,ZodISOTime:()=>Ne,ZodInstanceOf:()=>dl,ZodIntersection:()=>Da,ZodJWT:()=>Do,ZodKSUID:()=>Po,ZodLazy:()=>ul,ZodLiteral:()=>Ua,ZodMAC:()=>ba,ZodMap:()=>Fa,ZodNaN:()=>rl,ZodNanoID:()=>zo,ZodNever:()=>Aa,ZodNonOptional:()=>Mo,ZodNull:()=>Sa,ZodNullable:()=>Wa,ZodNumber:()=>Nt,ZodNumberFormat:()=>Ye,ZodObject:()=>Sr,ZodOptional:()=>Zr,ZodPipe:()=>Or,ZodPrefault:()=>Xa,ZodPreprocess:()=>nl,ZodPromise:()=>al,ZodReadonly:()=>ol,ZodRecord:()=>Zt,ZodSet:()=>Ma,ZodString:()=>At,ZodStringFormat:()=>E,ZodSuccess:()=>Qa,ZodSymbol:()=>ka,ZodTemplateLiteral:()=>sl,ZodTransform:()=>Ja,ZodTuple:()=>Ra,ZodType:()=>S,ZodULID:()=>Io,ZodURL:()=>xr,ZodUUID:()=>me,ZodUndefined:()=>Ia,ZodUnion:()=>Pr,ZodUnknown:()=>Oa,ZodVoid:()=>Na,ZodXID:()=>So,ZodXor:()=>Ta,_ZodString:()=>yo,_default:()=>qa,_function:()=>Up,any:()=>bp,array:()=>Ir,base64:()=>ep,base64url:()=>tp,bigint:()=>hp,boolean:()=>xa,catch:()=>tl,check:()=>Bp,cidrv4:()=>Hf,cidrv6:()=>Qf,codec:()=>jp,creditCard:()=>np,cuid:()=>Bf,cuid2:()=>Jf,currencyCode:()=>ap,custom:()=>Jp,date:()=>vp,describe:()=>Kp,discriminatedUnion:()=>Pp,e164:()=>rp,email:()=>Tf,emoji:()=>Mf,enum:()=>jo,exactOptional:()=>Ka,file:()=>Ep,float32:()=>fp,float64:()=>pp,function:()=>Up,guid:()=>Ef,hash:()=>lp,hex:()=>cp,hostname:()=>up,httpUrl:()=>Ff,iban:()=>op,instanceof:()=>Gp,int:()=>_o,int32:()=>dp,int64:()=>gp,intersection:()=>La,invertCodec:()=>Vp,ipv4:()=>qf,ipv6:()=>Yf,json:()=>Xp,jwt:()=>ip,keyof:()=>zp,ksuid:()=>Gf,lazy:()=>cl,literal:()=>Tp,looseObject:()=>Ip,looseRecord:()=>Op,mac:()=>Xf,map:()=>Ap,meta:()=>Wp,nan:()=>Rp,nanoid:()=>Uf,nativeEnum:()=>Cp,never:()=>Ro,nonoptional:()=>Ha,null:()=>Pa,nullable:()=>zr,nullish:()=>Dp,number:()=>za,object:()=>xp,optional:()=>Ge,partialRecord:()=>Zp,pipe:()=>$o,prefault:()=>Ya,preprocess:()=>Yp,promise:()=>Mp,readonly:()=>il,record:()=>Va,refine:()=>fl,set:()=>Np,strictObject:()=>kp,string:()=>vr,stringFormat:()=>sp,stringbool:()=>qp,success:()=>Lp,superRefine:()=>pl,symbol:()=>$p,templateLiteral:()=>Fp,transform:()=>Vo,tuple:()=>ja,uint32:()=>mp,uint64:()=>_p,ulid:()=>Kf,undefined:()=>yp,union:()=>Et,unknown:()=>We,url:()=>Vf,uuid:()=>Df,uuidv4:()=>Lf,uuidv6:()=>Rf,uuidv7:()=>jf,void:()=>wp,xid:()=>Wf,xor:()=>Sp});var ho={};he(ho,{endsWith:()=>$t,gt:()=>pe,gte:()=>oe,includes:()=>gt,length:()=>Je,lowercase:()=>mt,lt:()=>fe,lte:()=>ne,maxLength:()=>Be,maxSize:()=>Ie,mime:()=>bt,minLength:()=>ye,minSize:()=>de,multipleOf:()=>ke,negative:()=>io,nonnegative:()=>uo,nonpositive:()=>so,normalize:()=>wt,overwrite:()=>le,positive:()=>oo,properties:()=>yt,property:()=>co,regex:()=>dt,size:()=>Ue,slugify:()=>kt,startsWith:()=>_t,toLowerCase:()=>zt,toUpperCase:()=>xt,trim:()=>vt,uppercase:()=>ht});var Nf=new WeakSet([Object.prototype,Error.prototype]);function go(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let n=r(this);return Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0})}})}var Cf=(e,t)=>{ui.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);Nf.has(r)||(Nf.add(r),go(r,"format",n=>o=>qt(n,o)),go(r,"flatten",n=>o=>Gt(n,o)),go(r,"addIssue",n=>o=>{n.issues.push(o),n.message=JSON.stringify(n.issues,et,2)}),go(r,"addIssues",n=>o=>{n.issues.push(...o),n.message=JSON.stringify(n.issues,et,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},zg=p("ZodError",Cf),re=p("ZodError",Cf,void 0,{Parent:Error});var ca=it(re),aa=st(re),la=ut(re),fa=ct(re),pa=Jr(re),da=Kr(re),ma=Wr(re),ha=Gr(re),ga=qr(re),_a=Xr(re),$a=Yr(re),ya=Hr(re);function kg(){M.localeError||j(An())}function qe(){M.memoizer||j({memoizer:dr()})}var S=p("ZodType",(e,t)=>(kg(),k.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(b.mergeDefs(t,{checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return N(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(fl(e,t))},superRefine(e,t){return this.check(pl(e,t))},overwrite(e){return this.check(le(e))},optional(){return Ge(this)},exactOptional(){return Ka(this)},nullable(){return zr(this)},nullish(){return Ge(zr(this))},nonoptional(e){return Ha(this,e)},array(){return Ir(this)},or(e){return Et([this,e])},and(e){return La(this,e)},transform(e){return $o(this,Vo(e))},default(e){return qa(this,e)},prefault(e){return Ya(this,e)},catch(e){return tl(this,e)},pipe(e){return $o(this,e)},readonly(){return il(this)},describe(e){let t=this.clone();return B.add(t,{description:e}),t},meta(...e){if(e.length===0)return B.get(this);let t=this.clone();return B.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return b.hide(this,"~standard",{...ln(this),jsonSchema:{input:It(this,"input"),output:It(this,"output")}})},set"~standard"(e){b.own(this,"~standard",e)},parse:function e(t,r){return ca(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await aa(this,t,r,{callee:e})},safeParse(e,t){return la(this,e,t)},async safeParseAsync(e,t){return fa(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){b.own(this,"spa",e)},validate(e,t){return Xt(this,e,t)},validateAsync(e,t){return Yt(this,e,t)},encode:function e(t,r){return pa(this,t,r,{callee:e})},decode:function e(t,r){return da(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await ma(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await ha(this,t,r,{callee:e})},safeEncode(e,t){return ga(this,e,t)},safeDecode(e,t){return _a(this,e,t)},async safeEncodeAsync(e,t){return $a(this,e,t)},async safeDecodeAsync(e,t){return ya(this,e,t)},toJSONSchema(e){return wc(this,{})(e)},get description(){return B.get(this)?.description},get _def(){return this._zod.def}}),yo=p("_ZodString",(e,t)=>{je.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>xc(e,r,n,o)},b.derived({format:e=>F(e).format??null,minLength:e=>F(e).minimum??null,maxLength:e=>F(e).maximum??null},{regex(...e){return this.check(dt(...e))},includes(...e){return this.check(gt(...e))},startsWith(...e){return this.check(_t(...e))},endsWith(...e){return this.check($t(...e))},min(...e){return this.check(ye(...e))},max(...e){return this.check(Be(...e))},length(...e){return this.check(Je(...e))},nonempty(...e){return this.check(ye(1,...e))},lowercase(e){return this.check(mt(e))},uppercase(e){return this.check(ht(e))},trim(){return this.check(vt())},normalize(...e){return this.check(wt(...e))},toLowerCase(){return this.check(zt())},toUpperCase(){return this.check(xt())},slugify(){return this.check(kt())}})),At=p("ZodString",(e,t)=>{je.init(e,t),yo.init(e,t)},{email(e){return this.check(Ln(bo,e))},url(e){return this.check(hr(xr,e))},jwt(e){return this.check(no(Do,e))},emoji(e){return this.check(Un(vo,e))},guid(e){return this.check(Rn(wo,e))},uuid(e){return this.check(jn(me,e))},uuidv4(e){return this.check(Vn(me,e))},uuidv6(e){return this.check(Fn(me,e))},uuidv7(e){return this.check(Mn(me,e))},nanoid(e){return this.check(Bn(zo,e))},cuid(e){return this.check(Jn(xo,e))},cuid2(e){return this.check(Kn(ko,e))},ulid(e){return this.check(Wn(Io,e))},base64(e){return this.check(eo(Co,e))},base64url(e){return this.check(to(To,e))},xid(e){return this.check(Gn(So,e))},ksuid(e){return this.check(qn(Po,e))},ipv4(e){return this.check(Xn(Zo,e))},ipv6(e){return this.check(Yn(Oo,e))},cidrv4(e){return this.check(Hn(Ao,e))},cidrv6(e){return this.check(Qn(No,e))},e164(e){return this.check(ro(Eo,e))},datetime(e){return this.check(gr(Oe,e))},date(e){return this.check(_r(Ae,e))},time(e){return this.check($r(Ne,e))},duration(e){return this.check(yr(Ce,e))}});function vr(e){return Lu(At,e)}var E=p("ZodStringFormat",(e,t)=>{C.init(e,t),yo.init(e,t)}),Oe=p("ZodISODateTime",(e,t)=>{Ss.init(e,t),E.init(e,t)}),Ae=p("ZodISODate",(e,t)=>{Ps.init(e,t),E.init(e,t)}),Ne=p("ZodISOTime",(e,t)=>{Zs.init(e,t),E.init(e,t)}),Ce=p("ZodISODuration",(e,t)=>{Os.init(e,t),E.init(e,t)}),bo=p("ZodEmail",(e,t)=>{gs.init(e,t),E.init(e,t)});function Tf(e){return Ln(bo,e)}var wo=p("ZodGUID",(e,t)=>{ms.init(e,t),E.init(e,t)});function Ef(e){return Rn(wo,e)}var me=p("ZodUUID",(e,t)=>{hs.init(e,t),E.init(e,t)});function Df(e){return jn(me,e)}function Lf(e){return Vn(me,e)}function Rf(e){return Fn(me,e)}function jf(e){return Mn(me,e)}var xr=p("ZodURL",(e,t)=>{ys.init(e,t),E.init(e,t)});function Vf(e){return hr(xr,e)}function Ff(e){return hr(xr,{protocol:Ht,hostname:Oi,...b.normalizeParams(e)})}var vo=p("ZodEmoji",(e,t)=>{bs.init(e,t),E.init(e,t)});function Mf(e){return Un(vo,e)}var zo=p("ZodNanoID",(e,t)=>{ws.init(e,t),E.init(e,t)});function Uf(e){return Bn(zo,e)}var xo=p("ZodCUID",(e,t)=>{vs.init(e,t),E.init(e,t)});function Bf(e){return Jn(xo,e)}var ko=p("ZodCUID2",(e,t)=>{zs.init(e,t),E.init(e,t)});function Jf(e){return Kn(ko,e)}var Io=p("ZodULID",(e,t)=>{xs.init(e,t),E.init(e,t)});function Kf(e){return Wn(Io,e)}var So=p("ZodXID",(e,t)=>{ks.init(e,t),E.init(e,t)});function Wf(e){return Gn(So,e)}var Po=p("ZodKSUID",(e,t)=>{Is.init(e,t),E.init(e,t)});function Gf(e){return qn(Po,e)}var Zo=p("ZodIPv4",(e,t)=>{As.init(e,t),E.init(e,t)});function qf(e){return Xn(Zo,e)}var ba=p("ZodMAC",(e,t)=>{Cs.init(e,t),E.init(e,t)});function Xf(e){return ju(ba,e)}var Oo=p("ZodIPv6",(e,t)=>{Ns.init(e,t),E.init(e,t)});function Yf(e){return Yn(Oo,e)}var Ao=p("ZodCIDRv4",(e,t)=>{Ts.init(e,t),E.init(e,t)});function Hf(e){return Hn(Ao,e)}var No=p("ZodCIDRv6",(e,t)=>{Es.init(e,t),E.init(e,t)});function Qf(e){return Qn(No,e)}var Co=p("ZodBase64",(e,t)=>{Ds.init(e,t),E.init(e,t)});function ep(e){return eo(Co,e)}var To=p("ZodBase64URL",(e,t)=>{Ls.init(e,t),E.init(e,t)});function tp(e){return to(To,e)}var Eo=p("ZodE164",(e,t)=>{Rs.init(e,t),E.init(e,t)});function rp(e){return ro(Eo,e)}var wa=p("ZodCreditCard",(e,t)=>{js.init(e,t),E.init(e,t)});function np(e){return Vu(wa,e)}var va=p("ZodIBAN",(e,t)=>{Vs.init(e,t),E.init(e,t)});function op(e){return Fu(va,e)}var Do=p("ZodJWT",(e,t)=>{Fs.init(e,t),E.init(e,t)});function ip(e){return no(Do,e)}var Xe=p("ZodCustomStringFormat",(e,t)=>{Ms.init(e,t),E.init(e,t)});function sp(e,t,r={}){return Ke(Xe,e,t,r)}function up(e){return Ke(Xe,"hostname",Zi,e)}function cp(e){return Ke(Xe,"hex",Bi,e)}function ap(e){return Ke(Xe,"currency_code",Ni,e)}function lp(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,o=ue[n];if(!o)throw new Error(`Unrecognized hash format: ${n}`);return Ke(Xe,n,o,t)}var Nt=p("ZodNumber",(e,t)=>{bn.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>kc(e,r,n,o),e.isFinite=!0},b.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:r}=F(e);return Math.max(t??Number.NEGATIVE_INFINITY,r??Number.NEGATIVE_INFINITY)},maxValue:e=>{let{maximum:t,exclusiveMaximum:r}=F(e);return Math.min(t??Number.POSITIVE_INFINITY,r??Number.POSITIVE_INFINITY)},isInt:e=>{let{isInt:t,multipleOf:r}=F(e);return!!t||!!r?.some(Number.isSafeInteger)},format:e=>F(e).format??null},{gt(e,t){return this.check(pe(e,t))},gte(e,t){return this.check(oe(e,t))},min(e,t){return this.check(oe(e,t))},lt(e,t){return this.check(fe(e,t))},lte(e,t){return this.check(ne(e,t))},max(e,t){return this.check(ne(e,t))},int(e){return this.check(_o(e))},safe(e){return this.check(_o(e))},positive(e){return this.check(pe(0,e))},nonnegative(e){return this.check(oe(0,e))},negative(e){return this.check(fe(0,e))},nonpositive(e){return this.check(ne(0,e))},multipleOf(e,t){return this.check(ke(e,t))},step(e,t){return this.check(ke(e,t))},finite(){return this}}));function za(e){return Uu(Nt,e)}var Ye=p("ZodNumberFormat",(e,t)=>{Us.init(e,t),Nt.init(e,t)});function _o(e){return Ju(Ye,e)}function fp(e){return Ku(Ye,e)}function pp(e){return Wu(Ye,e)}function dp(e){return Gu(Ye,e)}function mp(e){return qu(Ye,e)}var Ct=p("ZodBoolean",(e,t)=>{ur.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ic(e,r,n,o)});function xa(e){return Xu(Ct,e)}var Tt=p("ZodBigInt",(e,t)=>{wn.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Sc(e,r,n,o)},b.derived({minValue:e=>F(e).minimum??null,maxValue:e=>F(e).maximum??null,format:e=>F(e).format??null},{gte(e,t){return this.check(oe(e,t))},min(e,t){return this.check(oe(e,t))},gt(e,t){return this.check(pe(e,t))},lt(e,t){return this.check(fe(e,t))},lte(e,t){return this.check(ne(e,t))},max(e,t){return this.check(ne(e,t))},positive(e){return this.check(pe(BigInt(0),e))},negative(e){return this.check(fe(BigInt(0),e))},nonpositive(e){return this.check(ne(BigInt(0),e))},nonnegative(e){return this.check(oe(BigInt(0),e))},multipleOf(e,t){return this.check(ke(e,t))}}));function hp(e){return Hu(Tt,e)}var Lo=p("ZodBigIntFormat",(e,t)=>{Bs.init(e,t),Tt.init(e,t)});function gp(e){return ec(Lo,e)}function _p(e){return tc(Lo,e)}var ka=p("ZodSymbol",(e,t)=>{Js.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Pc(e,r,n,o)});function $p(e){return rc(ka,e)}var Ia=p("ZodUndefined",(e,t)=>{Ks.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Oc(e,r,n,o)});function yp(e){return nc(Ia,e)}var Sa=p("ZodNull",(e,t)=>{Ws.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Zc(e,r,n,o)});function Pa(e){return oc(Sa,e)}var Za=p("ZodAny",(e,t)=>{Gs.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Cc(e,r,n,o)});function bp(){return ic(Za)}var Oa=p("ZodUnknown",(e,t)=>{qs.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Tc(e,r,n,o)});function We(){return sc(Oa)}var Aa=p("ZodNever",(e,t)=>{Xs.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Nc(e,r,n,o)});function Ro(e){return uc(Aa,e)}var Na=p("ZodVoid",(e,t)=>{Ys.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ac(e,r,n,o)});function wp(e){return cc(Na,e)}var kr=p("ZodDate",(e,t)=>{Hs.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ec(e,r,n,o),e.min=(r,n)=>e.check(oe(r,n)),e.max=(r,n)=>e.check(ne(r,n))},b.derived({minDate:e=>{let{minimum:t}=F(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=F(e);return t?new Date(t):null}},{}));function vp(e){return ac(kr,e)}var Ca=p("ZodArray",(e,t)=>{qe(),eu.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Wc(e,r,n,o),e.element=t.element},{min(e,t){return this.check(ye(e,t))},nonempty(e){return this.check(ye(1,e))},max(e,t){return this.check(Be(e,t))},length(e,t){return this.check(Je(e,t))},unwrap(){return this.element}});function Ir(e,t){return pc(Ca,e,t)}function zp(e){let t=e._zod.def.shape;return jo(Object.keys(t))}var Sr=p("ZodObject",(e,t)=>{qe(),tu.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Gc(e,r,n,o),b.installLazyProp(e,"shape",r=>r._zod.def.shape,!1)},{keyof(){return jo(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(b.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(b.mergeDefs(this._zod.def,{catchall:We()}))},loose(){return this.clone(b.mergeDefs(this._zod.def,{catchall:We()}))},strict(){return this.clone(b.mergeDefs(this._zod.def,{catchall:Ro()}))},strip(){return this.clone(b.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return b.extend(this,e)},safeExtend(e){return b.safeExtend(this,e)},merge(e){return b.merge(this,e)},pick(e){return b.pick(this,e)},omit(e){return b.omit(this,e)},partial(...e){return b.partial(Zr,this,e[0])},exactPartial(...e){return b.partial(Fo,this,e[0],"exactPartial")},required(...e){return b.required(Mo,this,e[0])}});function xp(e,t){let r={type:"object",shape:e??{},...b.normalizeParams(t)};return new Sr(r)}function kp(e,t){return new Sr({type:"object",shape:e,catchall:Ro(),...b.normalizeParams(t)})}function Ip(e,t){return new Sr({type:"object",shape:e,catchall:We(),...b.normalizeParams(t)})}var Pr=p("ZodUnion",(e,t)=>{cr.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>lo(e,r,n,o),e.options=t.options});function Et(e,t){return new Pr({type:"union",options:e,...b.normalizeParams(t)})}var Ta=p("ZodXor",(e,t)=>{Pr.init(e,t),ru.init(e,t),e._zod.processJSONSchema=(r,n,o)=>lo(e,r,n,o),e.options=t.options});function Sp(e,t){return new Ta({type:"union",options:e,inclusive:!1,...b.normalizeParams(t)})}var Ea=p("ZodDiscriminatedUnion",(e,t)=>{Pr.init(e,t),ou.init(e,t)});function Pp(e,t,r){return new Ea({type:"union",options:t,discriminator:e,...b.normalizeParams(r)})}var Da=p("ZodIntersection",(e,t)=>{iu.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>qc(e,r,n,o)});function La(e,t){return new Da({type:"intersection",left:e,right:t})}var Ra=p("ZodTuple",(e,t)=>{qe(),vn.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Xc(e,r,n,o)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new Zr({type:"optional",innerType:t}))})}});function ja(e,t,r){let n=t instanceof k,o=n?r:t,i=n?t:null;return new Ra({type:"tuple",items:e,rest:i,...b.normalizeParams(o)})}var Zt=p("ZodRecord",(e,t)=>{qe(),su.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Yc(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType});function Va(e,t,r){return!t||!t._zod?new Zt({type:"record",keyType:vr(),valueType:e,...b.normalizeParams(t)}):new Zt({type:"record",keyType:e,valueType:t,...b.normalizeParams(r)})}function Zp(e,t,r){return new Zt({type:"record",keyType:e,valueType:t,...b.normalizeParams(r),partial:!0})}function Op(e,t,r){return new Zt({type:"record",keyType:e,valueType:t,mode:"loose",...b.normalizeParams(r)})}var Fa=p("ZodMap",(e,t)=>{qe(),uu.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Jc(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(de(...r)),e.nonempty=r=>e.check(de(1,r)),e.max=(...r)=>e.check(Ie(...r)),e.size=(...r)=>e.check(Ue(...r))});function Ap(e,t,r){return new Fa({type:"map",keyType:e,valueType:t,...b.normalizeParams(r)})}var Ma=p("ZodSet",(e,t)=>{qe(),cu.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Kc(e,r,n,o),e.min=(...r)=>e.check(de(...r)),e.nonempty=r=>e.check(de(1,r)),e.max=(...r)=>e.check(Ie(...r)),e.size=(...r)=>e.check(Ue(...r))});function Np(e,t){return new Ma({type:"set",valueType:e,...b.normalizeParams(t)})}var Ot=p("ZodEnum",(e,t)=>{au.init(e,t),S.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Dc(e,n,o,i),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{let i={};for(let s of n)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Ot({...t,checks:[],...b.normalizeParams(o),entries:i})},e.exclude=(n,o)=>{let i={...t.entries};for(let s of n)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Ot({...t,checks:[],...b.normalizeParams(o),entries:i})}});function jo(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Ot({type:"enum",entries:r,...b.normalizeParams(t)})}function Cp(e,t){return new Ot({type:"enum",entries:e,...b.normalizeParams(t)})}var Ua=p("ZodLiteral",(e,t)=>{lu.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Lc(e,r,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Tp(e,t){return new Ua({type:"literal",values:Array.isArray(e)?e:[e],...b.normalizeParams(t)})}var Ba=p("ZodFile",(e,t)=>{fu.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Vc(e,r,n,o),e.min=(r,n)=>e.check(de(r,n)),e.max=(r,n)=>e.check(Ie(r,n)),e.mime=(r,n)=>e.check(bt(Array.isArray(r)?r:[r],n))});function Ep(e){return dc(Ba,e)}var Ja=p("ZodTransform",(e,t)=>{qe(),pu.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Bc(e,r,n,o),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new ze(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(b.issue(i,r.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),"input"in s||(s.input=r.value),s.inst??(s.inst=e),r.issues.push(b.issue(s))}};let o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function Vo(e){return new Ja({type:"transform",transform:e})}var Zr=p("ZodOptional",(e,t)=>{zn.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>fo(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Ge(e){return new Zr({type:"optional",innerType:e})}var Fo=p("ZodExactOptional",(e,t)=>{du.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>fo(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Ka(e){return new Fo({type:"optional",innerType:e})}var Wa=p("ZodNullable",(e,t)=>{mu.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Hc(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function zr(e){return new Wa({type:"nullable",innerType:e})}function Dp(e){return Ge(zr(e))}var Ga=p("ZodDefault",(e,t)=>{hu.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ta(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function qa(e,t){return new Ga({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():b.shallowClone(t)}})}var Xa=p("ZodPrefault",(e,t)=>{gu.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ra(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Ya(e,t){return new Xa({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():b.shallowClone(t)}})}var Mo=p("ZodNonOptional",(e,t)=>{_u.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Qc(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Ha(e,t){return new Mo({type:"nonoptional",innerType:e,...b.normalizeParams(t)})}var Qa=p("ZodSuccess",(e,t)=>{$u.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Fc(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Lp(e){return new Qa({type:"success",innerType:e})}var el=p("ZodCatch",(e,t)=>{yu.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>na(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function tl(e,t){return new el({type:"catch",innerType:e,catchValue:typeof t=="function"?t:b.constantCatch(t)})}var rl=p("ZodNaN",(e,t)=>{bu.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Rc(e,r,n,o)});function Rp(e){return fc(rl,e)}var Or=p("ZodPipe",(e,t)=>{xn.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>oa(e,r,n,o),e.in=t.in,e.out=t.out});function $o(e,t){return new Or({type:"pipe",in:e,out:t})}var Ar=p("ZodCodec",(e,t)=>{Or.init(e,t),ar.init(e,t)});function jp(e,t,r){return new Ar({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function Vp(e){let t=e._zod.def;return new Ar({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var nl=p("ZodPreprocess",(e,t)=>{Or.init(e,t),wu.init(e,t)}),ol=p("ZodReadonly",(e,t)=>{vu.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ia(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function il(e){return new ol({type:"readonly",innerType:e})}var sl=p("ZodTemplateLiteral",(e,t)=>{zu.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>jc(e,r,n,o)});function Fp(e,t){return new sl({type:"template_literal",parts:e,...b.normalizeParams(t)})}var ul=p("ZodLazy",(e,t)=>{lr.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ua(e,r,n,o),e.unwrap=()=>e._zod.def.getter()});function cl(e){return new ul({type:"lazy",getter:e})}var al=p("ZodPromise",(e,t)=>{ku.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>sa(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Mp(e){return new al({type:"promise",innerType:e})}var ll=p("ZodFunction",(e,t)=>{xu.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Uc(e,r,n,o)});function Up(e){return new ll({type:"function",input:Array.isArray(e?.input)?ja(e?.input):e?.input??Ir(We()),output:e?.output??We()})}var Nr=p("ZodCustom",(e,t)=>{Iu.init(e,t),S.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Mc(e,r,n,o)});function Bp(e){let t=new D({check:"custom"});return t._zod.check=e,t}function Jp(e,t){return mc(Nr,e??(()=>!0),t)}function fl(e,t={}){return hc(Nr,e,t)}function pl(e,t){return gc(e,t)}var Kp=_c,Wp=$c,dl=p("ZodInstanceOf",(e,t)=>{Nr.init(e,t)},{properties(e,t){return this.check(yt(e,t))}});function Gp(e,t={}){let r=new dl({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...b.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var qp=(...e)=>yc({Codec:Ar,Boolean:Ct,String:At},...e);function Xp(e){let t=cl(()=>Et([vr(e),za(),xa(),Pa(),Ir(t),Va(vr(),t)]));return t}function Yp(e,t){return new nl({type:"pipe",in:Vo(e),out:t})}var Ig={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Sg(e){j({customError:e})}function Pg(){return j().customError}var ml;ml||(ml={});var Cr={};he(Cr,{ZodISODate:()=>Ae,ZodISODateTime:()=>Oe,ZodISODuration:()=>Ce,ZodISOTime:()=>Ne,date:()=>Og,datetime:()=>Zg,duration:()=>Ng,time:()=>Ag});function Zg(e){return gr(Oe,e)}function Og(e){return _r(Ae,e)}function Ag(e){return $r(Ne,e)}function Ng(e){return yr(Ce,e)}var y={...Dt,...ho,iso:Cr},Cg=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Tg(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function Hp(e,t){return e.map((r,n)=>n<t?r:r.optional())}function Eg(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Dg(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let n=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let o=r[1]===void 0?void 0:Eg(r[1]);if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}function Lg(e,t){return y.transform(n=>n).check(n=>{let o=n.value;if(typeof o!="object"||o===null||Array.isArray(o))return;let i=Object.getOwnPropertyNames(o);if(t.minProperties!==void 0&&i.length<t.minProperties&&n.issues.push({origin:"object",code:"too_small",minimum:t.minProperties,inclusive:!0,message:`Too small: expected object to have >=${t.minProperties} properties`,input:o,inst:e,continue:!0}),t.maxProperties!==void 0&&i.length>t.maxProperties&&n.issues.push({origin:"object",code:"too_big",maximum:t.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${t.maxProperties} properties`,input:o,inst:e,continue:!0}),t.keySchema)for(let s of i){let u=t.keySchema.safeParse(s);u.success||n.issues.push({code:"invalid_key",origin:"record",issues:u.error.issues,input:s,path:[s],continue:!0})}}).pipe(e)}function hl(e,t){if(e===null)return"z";let r=typeof e;if(r!=="object"){if(r==="number"&&Number.isNaN(e))return null;let n=String(e);return`${r[0]}${n.length}:${n}`}if(t.has(e))return null;t.add(e);try{if(Array.isArray(e)){let i=[];for(let s of e){let u=hl(s,t);if(u===null)return null;i.push(u)}return`a${i.length}:[${i.join(",")}]`}let n=Object.keys(e).sort(),o=[];for(let i of n){let s=hl(e[i],t);if(s===null)return null;o.push(`${i.length}:${i}=${s}`)}return`o${o.length}:{${o.join(",")}}`}finally{t.delete(e)}}var Rg=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),jg=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function Tr(e){return typeof e!="object"||e===null?!1:Array.isArray(e)?e.some(Tr):typeof e.$ref=="string"?!0:Object.entries(e).some(([t,r])=>Rg.has(t)?Tr(r):!jg.has(t)||typeof r!="object"||r===null?!1:Object.values(r).some(Tr))}function Qp(e){return e===1?"element":"elements"}function Vg(e,t){return y.transform(n=>n).check(n=>{let o=n.value;if(Array.isArray(o)){if(t.uniqueItems===!0){let i=new Map;for(let s=0;s<o.length;s++){let u=hl(o[s],new Set);if(u===null)continue;let c=i.get(u);if(c===void 0){i.set(u,s);continue}n.issues.push({code:"custom",message:`Array items must be unique: element at index ${s} duplicates the one at index ${c}`,input:o,path:[s],continue:!0})}}if(t.containsSchema){let i=t.minContains??1,s=t.maxContains!==void 0?t.maxContains+1:Number.POSITIVE_INFINITY,u=0;for(let c of o)if(t.containsSchema.safeParse(c).success&&++u>=s)break;u<i&&n.issues.push({code:"custom",message:`Array must contain at least ${i} matching ${Qp(i)}; found ${u}`,input:o,continue:!0}),t.maxContains!==void 0&&u>t.maxContains&&n.issues.push({code:"custom",message:`Array must contain at most ${t.maxContains} matching ${Qp(t.maxContains)}`,input:o,continue:!0})}}}).pipe(e)}function ed(e,t){if(e!==!1)return e===void 0||e===!0?y.any():Y(e,t)}var Fg=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function td(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return y.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let o=e.$ref;if(t.refs.has(o))return t.refs.get(o);if(t.processing.has(o))return y.lazy(()=>{if(!t.refs.has(o))throw new Error(`Circular reference not resolved: ${o}`);return t.refs.get(o)});t.processing.add(o);let i=Dg(o,t),s=Y(i,t);return t.refs.set(o,s),t.processing.delete(o),s}if(e.enum!==void 0){let o=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&o.length===1&&o[0]===null)return y.null();if(o.length===0)return y.never();if(o.length===1)return y.literal(o[0]);if(o.every(s=>typeof s=="string"))return y.enum(o);let i=o.map(s=>y.literal(s));return i.length<2?i[0]:y.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return y.literal(e.const);let r=e.type;if(Array.isArray(r)){let o=r.map(i=>{let s={...e,type:i};return td(s,t)});return o.length===0?y.never():o.length===1?o[0]:y.union(o)}if(!r)return y.any();let n;switch(r){case"string":{let o=y.string();if(e.format){let i=e.format;i==="email"?o=o.check(y.email()):i==="uri"||i==="uri-reference"?o=o.check(y.url()):i==="uuid"||i==="guid"?o=o.check(y.uuid()):i==="date-time"?o=o.check(y.iso.datetime({offset:!0})):i==="date"?o=o.check(y.iso.date()):i==="time"?o=o.check(y.regex(Fg)):i==="duration"?o=o.check(y.iso.duration()):i==="hostname"?o=o.check(y.hostname()):i==="ipv4"?o=o.check(y.ipv4()):i==="ipv6"?o=o.check(y.ipv6()):i==="mac"?o=o.check(y.mac()):i==="cidr"?o=o.check(y.cidrv4()):i==="cidr-v6"?o=o.check(y.cidrv6()):i==="base64"?o=o.check(y.base64()):i==="base64url"?o=o.check(y.base64url()):i==="e164"?o=o.check(y.e164()):i==="credit_card"?o=o.check(y.creditCard()):i==="iban"?o=o.check(y.iban()):i==="jwt"?o=o.check(y.jwt()):i==="emoji"?o=o.check(y.emoji()):i==="nanoid"?o=o.check(y.nanoid()):i==="cuid"?o=o.check(y.cuid()):i==="cuid2"?o=o.check(y.cuid2()):i==="ulid"?o=o.check(y.ulid()):i==="xid"?o=o.check(y.xid()):i==="ksuid"&&(o=o.check(y.ksuid()))}typeof e.minLength=="number"&&(o=o.min(e.minLength)),typeof e.maxLength=="number"&&(o=o.max(e.maxLength)),e.pattern&&(o=o.regex(new RegExp(e.pattern))),n=o;break}case"number":case"integer":{let o=r==="integer"?y.number().int():y.number();typeof e.minimum=="number"&&e.exclusiveMinimum!==!0&&(o=o.min(e.minimum)),typeof e.maximum=="number"&&e.exclusiveMaximum!==!0&&(o=o.max(e.maximum)),typeof e.exclusiveMinimum=="number"?o=o.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(o=o.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?o=o.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(o=o.lt(e.maximum)),typeof e.multipleOf=="number"&&(o=o.multipleOf(e.multipleOf)),n=o;break}case"boolean":{n=y.boolean();break}case"null":{n=y.null();break}case"object":{let o={},i=e.properties||{},s=new Set(e.required||[]),u=typeof e.additionalProperties=="object"?Y(e.additionalProperties,t):void 0;for(let[f,m]of Object.entries(i)){let d=Y(m,t);U(o,f,s.has(f)?d:d.optional())}if(e.patternProperties){let f=e.patternProperties,m=Object.keys(f),d=[];for(let g of m){let $=Y(f[g],t),z=y.string().regex(new RegExp(g));d.push(y.looseRecord(z,$))}let h=[];if(Object.keys(o).length>0&&h.push(y.object(o).passthrough()),h.push(...d),h.length===0)n=y.object({}).passthrough();else if(h.length===1)n=h[0];else{let g=y.intersection(h[0],h[1]);for(let $=2;$<h.length;$++)g=y.intersection(g,h[$]);n=g}if(e.additionalProperties===!1){let g=Object.keys(o),$=m.map(w=>new RegExp(w)),z=n;n=n.check(w=>{if(!ie(w.value))return;let I=[];for(let A of Object.keys(w.value))g.includes(A)||$.some(L=>L.test(A))||I.push(A);I.length&&w.issues.push({code:"unrecognized_keys",keys:I,input:w.value,inst:z})})}}else{let f=y.object(o);e.additionalProperties===!1?n=f.strict():u?n=f.catchall(u):n=f.passthrough()}let c=e.propertyNames!==void 0&&e.propertyNames!==!0,a=typeof e.minProperties=="number"?e.minProperties:void 0,l=typeof e.maxProperties=="number"?e.maxProperties:void 0;if(c||a!==void 0||l!==void 0){let f;if(c){let m=typeof e.propertyNames=="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;f=Y(m,t)}n=Lg(n,{keySchema:f,minProperties:a,maxProperties:l})}break}case"array":{let o=e.prefixItems,i=e.items;if(o&&Array.isArray(o)){let s=typeof e.minItems=="number"?e.minItems:0,u=o.map(f=>Y(f,t)),c=Hp(u,s),a=Array.isArray(i)?void 0:ed(i,t),l=y.tuple(c);n=a?l.rest(a):l,typeof e.minItems=="number"&&(n=n.check(y.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(y.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=typeof e.minItems=="number"?e.minItems:0,u=i.map(f=>Y(f,t)),c=Hp(u,s),a=ed(e.additionalItems,t),l=y.tuple(c);n=a?l.rest(a):l,typeof e.minItems=="number"&&(n=n.check(y.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(y.maxLength(e.maxItems)))}else if(i!==void 0){let s=Y(i,t),u=y.array(s);typeof e.minItems=="number"&&(u=u.min(e.minItems)),typeof e.maxItems=="number"&&(u=u.max(e.maxItems)),n=u}else n=y.array(y.any());(e.uniqueItems===!0||e.contains!==void 0)&&(n=Vg(n,{uniqueItems:e.uniqueItems===!0,containsSchema:e.contains!==void 0?Y(e.contains,t):void 0,minContains:typeof e.minContains=="number"?e.minContains:void 0,maxContains:typeof e.maxContains=="number"?e.maxContains:void 0}));break}default:throw new Error(`Unsupported type: ${r}`)}return n}function Y(e,t){if(typeof e=="boolean")return e?y.any():y.never();let r=td(e,t),n=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let u=e.anyOf.map(a=>Y(a,t)),c=y.union(u);r=n?y.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let u=e.oneOf.map(a=>Y(a,t)),c=y.xor(u);r=n?y.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:y.any();else{let u=n?r:Y(e.allOf[0],t),c=n?0:1;for(let a=c;a<e.allOf.length;a++)u=y.intersection(u,Y(e.allOf[a],t));r=u}e.nullable===!0&&t.version==="openapi-3.0"&&(r=y.nullable(r)),e.readOnly===!0&&(r=y.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let u of i)u in e&&(o[u]=e[u]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let u of s)u in e&&(o[u]=e[u]);if(e.type==="object"&&e.$ref===void 0){e.propertyNames!==void 0&&!Tr(e.propertyNames)&&(o.propertyNames=e.propertyNames);for(let u of["minProperties","maxProperties"])e[u]!==void 0&&(o[u]=e[u])}if(e.type==="array"&&e.$ref===void 0){e.contains!==void 0&&!Tr(e.contains)&&(o.contains=e.contains);for(let u of["uniqueItems","minContains","maxContains"])e[u]!==void 0&&(o[u]=e[u])}for(let u of Object.keys(e))Cg.has(u)||U(o,u,e[u]);return Object.keys(o).length>0&&t.registry.add(r,o),e.description&&(r=r.describe(e.description)),r}function rd(e,t){if(typeof e=="boolean")return e?y.any():y.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let n=Tg(r,t?.defaultTarget),o=r.$defs||r.definitions||{},i={version:n,defs:o,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??B};return Y(r,i)}var nd=Symbol("z.visit/resolving");function Er(e,t){let r=typeof t=="function"?t:(s,u)=>{let c=t[s._zod.def.type];return c?c(s,u):s},n=new Map;function o(s){let u=n.get(s);if(u===nd)return new lr({type:"lazy",getter:()=>n.get(s)});if(u!==void 0)return u;n.set(s,nd);let c=i(s),a=r(c,c!==s);return n.set(s,a),a}function i(s){let u=s._zod.def,c=u.type;switch(c){case"object":{let a=u.shape,l=Object.keys(a),f=!1,m={};for(let h of l){let g=o(a[h]);g!==a[h]&&(f=!0),m[h]=g}let d=u.catchall;return u.catchall&&(d=o(u.catchall),d!==u.catchall&&(f=!0)),f?N(s,{...u,shape:m,catchall:d}):s}case"array":{let a=o(u.element);return a===u.element?s:N(s,{...u,element:a})}case"tuple":{let a=u.items,l=!1,f=[];for(let d of a){let h=o(d);h!==d&&(l=!0),f.push(h)}let m=u.rest;return u.rest&&(m=o(u.rest),m!==u.rest&&(l=!0)),l?N(s,{...u,items:f,rest:m}):s}case"record":case"map":{let a=o(u.keyType),l=o(u.valueType);return a===u.keyType&&l===u.valueType?s:N(s,{...u,keyType:a,valueType:l})}case"set":{let a=o(u.valueType);return a===u.valueType?s:N(s,{...u,valueType:a})}case"union":{let a=u.options,l=!1,f=[];for(let m of a){let d=o(m);d!==m&&(l=!0),f.push(d)}return l?N(s,{...u,options:f}):s}case"intersection":{let a=o(u.left),l=o(u.right);return a===u.left&&l===u.right?s:N(s,{...u,left:a,right:l})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let a=o(u.innerType);return a===u.innerType?s:N(s,{...u,innerType:a})}case"pipe":{let a=o(u.in),l=o(u.out);return a===u.in&&l===u.out?s:N(s,{...u,in:a,out:l})}case"function":{let a=o(u.input),l=o(u.output);return a===u.input&&l===u.output?s:N(s,{...u,input:a,output:l})}case"lazy":{let a=u.getter,{_cachedInner:l,...f}=u;return N(s,{...f,getter:()=>o(a())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return s;default:return s}}return o(e)}function od(e){return Er(e,{object:t=>t.partial(),union:t=>{let r=t._zod.def;return r.discriminator===void 0?t:Et(r.options)}})}function Mg(e,t){if(!t?.length)return e;let r=e._zod.def;return N(e,ce(r,{checks:[...r.checks??[],...t]}),{parent:!0})}function id(e){return Mg(e.out,e.checks)}function Ug(e){return e.in._zod.traits.has("$ZodTransform")?id(e):e.in}function sd(e){return Er(e,{pipe:t=>Ug(t._zod.def),default:(t,r)=>r?Ge(t._zod.def.innerType):t,catch:(t,r)=>r?t._zod.def.innerType:t})}function ud(e){return Er(e,{pipe:t=>id(t._zod.def),prefault:(t,r)=>r?t._zod.def.innerType:t})}var gl={};he(gl,{bigint:()=>Wg,boolean:()=>Kg,date:()=>Gg,number:()=>Jg,string:()=>Bg});function Bg(e){return Ru(At,e)}function Jg(e){return Bu(Nt,e)}function Kg(e){return Yu(Ct,e)}function Wg(e){return Qu(Tt,e)}function Gg(e){return lc(kr,e)}export{zg as a,cd as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var d=Object.defineProperty;var e=(c,a)=>{for(var b in a)d(c,b,{get:a[b],enumerable:!0})};export{e as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{f as o}from"./chunk-JAKOBECD.js";var n=class extends Error{constructor(t,s,y,i,r){super(s);this.code=t;this.status=y;this.requestId=i;this.name="IndianaError",this.reason=r?.reason;let e=o(t,y??0,{...r,retryAfter:r?.retryAfterSeconds===void 0?void 0:String(r.retryAfterSeconds)});this.retryable=e.retryable,this.recovery=e.recovery,this.retryAfterSeconds=e.retryAfterSeconds}code;status;requestId;commandRequestId;retryable;recovery;retryAfterSeconds;reason};export{n as a};
|