@oxog/vld 3.0.4 → 3.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +985 -878
  2. package/README.md +28 -11
  3. package/dist/chunks/index-Bn85LHAC.js +1 -0
  4. package/dist/cjs/chunks/index-DJwZFerZ.cjs +1 -0
  5. package/dist/cjs/cli/bin.cjs +1 -1
  6. package/dist/cjs/compile.cjs +1 -1
  7. package/dist/cjs/index.cjs +1 -1
  8. package/dist/cjs/locales/index.cjs +1 -1
  9. package/dist/cjs/locales/tg.cjs +1 -0
  10. package/dist/cjs/v3/index.cjs +1 -1
  11. package/dist/cjs/v4/core/index.cjs +1 -1
  12. package/dist/cjs/v4/index.cjs +1 -1
  13. package/dist/cjs/v4/locales/index.cjs +1 -1
  14. package/dist/cjs/v4/mini/index.cjs +1 -1
  15. package/dist/cjs/v4-mini/index.cjs +1 -1
  16. package/dist/cjs/validators/base.cjs +1 -1
  17. package/dist/cjs/validators/custom.cjs +1 -1
  18. package/dist/cjs/validators/promise.cjs +1 -1
  19. package/dist/cjs/validators/string-formats.cjs +1 -1
  20. package/dist/cjs/validators/string.cjs +1 -1
  21. package/dist/cli/bin.js +1 -1
  22. package/dist/compile.d.ts +15 -0
  23. package/dist/compile.js +1 -1
  24. package/dist/index.d.ts +50 -17
  25. package/dist/index.js +1 -1
  26. package/dist/locales/index.js +1 -1
  27. package/dist/locales/tg.d.ts +2 -0
  28. package/dist/locales/tg.js +1 -0
  29. package/dist/utils/json-schema.d.ts +4 -0
  30. package/dist/v3/index.js +1 -1
  31. package/dist/v4/core/index.d.ts +12 -2
  32. package/dist/v4/core/index.js +1 -1
  33. package/dist/v4/index.js +1 -1
  34. package/dist/v4/locales/index.d.ts +1 -0
  35. package/dist/v4/locales/index.js +1 -1
  36. package/dist/v4/mini/index.js +1 -1
  37. package/dist/v4-mini/index.d.ts +1 -1
  38. package/dist/v4-mini/index.js +1 -1
  39. package/dist/validators/array-v2.d.ts +1 -1
  40. package/dist/validators/base.d.ts +29 -0
  41. package/dist/validators/base.js +1 -1
  42. package/dist/validators/bigint-v2.d.ts +1 -1
  43. package/dist/validators/custom.d.ts +21 -1
  44. package/dist/validators/custom.js +1 -1
  45. package/dist/validators/date-v2.d.ts +1 -1
  46. package/dist/validators/number-v2.d.ts +1 -1
  47. package/dist/validators/object-v2.d.ts +5 -5
  48. package/dist/validators/promise.d.ts +7 -0
  49. package/dist/validators/promise.js +1 -1
  50. package/dist/validators/string-formats.d.ts +14 -1
  51. package/dist/validators/string-formats.js +1 -1
  52. package/dist/validators/string-v2.d.ts +2 -2
  53. package/dist/validators/string.d.ts +10 -0
  54. package/dist/validators/string.js +1 -1
  55. package/dist/validators/union-v2.d.ts +1 -1
  56. package/package.json +246 -245
  57. package/dist/chunks/index-CKPStM3V.js +0 -1
  58. package/dist/cjs/chunks/index-lejEpLfv.cjs +0 -1
@@ -257,8 +257,18 @@ export declare const toDotPath: (path: readonly (string | number)[]) => string;
257
257
  export declare const isValidBase64: (value: string) => boolean;
258
258
  export declare const isValidBase64URL: (value: string) => boolean;
259
259
  export declare const isValidJWT: (value: string) => boolean;
260
- import { isValidCreditCard } from '../../validators/string-formats.js';
261
- export { isValidCreditCard };
260
+ import { isValidCreditCard, isValidIBAN, base64Charset, base64urlCharset } from '../../validators/string-formats.js';
261
+ export { isValidCreditCard, isValidIBAN, base64Charset, base64urlCharset };
262
+ export declare const _iban: (...args: unknown[]) => root.ZodBase64;
263
+ export { VldStringFormat as $ZodIBAN } from '../../validators/string-formats.js';
264
+ export { VldCustom as $ZodCheckProperties } from '../../validators/custom.js';
265
+ export declare function canParseURL(input: string): boolean;
266
+ export declare function validateURL(trimmed: string, def?: {
267
+ normalize?: unknown;
268
+ hostname?: unknown;
269
+ protocol?: unknown;
270
+ }): URL | typeof URL_BAD_FORMAT | typeof URL_UNPARSEABLE;
271
+ export declare const processSchema: (schema: unknown, _ctx?: unknown, _params?: unknown) => unknown;
262
272
  export declare const _creditCard: (...args: unknown[]) => root.ZodBase64;
263
273
  export declare const standardProps: (schema: unknown) => object;
264
274
  export declare const handleUnrepresentable: (schema: unknown, ctx: {
@@ -1 +1 @@
1
- import{base64 as Z,base64url as S,cidrv4 as $,cidrv6 as F,coerce as I,cuid as T,cuid2 as E,decode as U,decodeAsync as D,e164 as L,email as N,emoji as P,encode as O,encodeAsync as R,endsWith as M,float32 as J,float64 as K,guid as X,includes as _,int as G,int32 as H,int64 as W,ipv4 as Q,ipv6 as Y,iso as oo,jwt as ao,ksuid as ro,length as eo,lowercase as so,mac as to,maxLength as lo,maxSize as no,mime as io,minLength as mo,minSize as co,multipleOf as po,nanoid as Zo,negative as Vo,nonnegative as uo,nonpositive as go,normalize as fo,parse as yo,parseAsync as So,positive as xo,regex as $o,safeDecode as Fo,safeDecodeAsync as vo,safeEncode as jo,safeEncodeAsync as bo,safeParse as Io,safeParseAsync as To,size as ho,slugify as Eo,startsWith as Co,stringFormat as Uo,toLowerCase as Do,toUpperCase as Lo,trim as Bo,uint32 as No,uint64 as Po,ulid as Ao,uppercase as Oo,url as Ro,uuid as wo,uuidv4 as zo,uuidv6 as ko,uuidv7 as Mo,xid as Jo,toJSONSchema as Ko,any as Xo,array as _o,bigint as Go,boolean as Ho,catch as Wo,check as qo,codec as Qo,creditCard as Yo,custom as oa,date as aa,discriminatedUnion as ra,enum as ea,nativeEnum as sa,file as ta,_function as da,number as la,intersection as na,lazy as ia,literal as ma,map as ca,nan as pa,never as Za,nonoptional as Va,null as ua,nullable as ga,object as fa,optional as ya,overwrite as Sa,pipe as xa,promise as $a,property as Fa,readonly as va,record as ja,refine as ba,set as Ia,string as Ta,stringbool as ha,superRefine as Ea,symbol as Ca,templateLiteral as Ua,transform as Da,tuple as La,undefined as Ba,union as Na,unknown as Pa,void as Aa,xor as Oa}from"../../index.js";export{$brand,$input,$output,NEVER,TimePrecision,ZodFirstPartyTypeKind,ZodIssueCode,ZodLikeError,_ZodString,base64Bytes,clone,config,core,createLogger,createNoOpLogger,deepPartial,core as default,describe,disableLogging,enableDebug,exactOptional,formatError,fromJSONSchema,getErrorMap,getLogger,gt,gte,hash,hex,hexBytes,hostname,httpUrl,initLogger,input,instanceof,json,keyof,locales,looseObject,looseRecord,lt,lte,mapSchema,meta,nullish,output,partialRecord,prefault,preprocess,regexes,setErrorMap,setLogLevel,strictObject,toZodError,toZodSafeResult,uint8Array,util,default as v,vV2,z}from"../../index.js";export{flattenError,prettifyError,prettifyErrorColored,prettifyErrorPlain,treeifyError}from"../../errors.js";export{VldCatch as $ZodCatch,VldDefault as $ZodDefault,VldExactOptional as $ZodExactOptional,VldRefine as $ZodNonOptional,VldNullable as $ZodNullable,VldOptional as $ZodOptional,VldPipe as $ZodPipe,VldPrefault as $ZodPrefault,VldPreprocess as $ZodPreprocess,VldReadonly as $ZodReadonly,VldTransform as $ZodTransform,VldBase as $ZodType,VldBase,VldMeta,VldBrand as ZodBranded,VldCatch as ZodCatch,VldDefault as ZodDefault,VldExactOptional as ZodExactOptional,VldMeta as ZodMeta,VldRefine as ZodNonOptional,VldNullable as ZodNullable,VldOptional as ZodOptional,VldPipe as ZodPipe,VldPrefault as ZodPrefault,VldPreprocess as ZodPreprocess,VldReadonly as ZodReadonly,VldTransform as ZodTransform,VldBase as ZodType}from"../../validators/base.js";export{VldString as $ZodString,VldString as ZodString}from"../../validators/string.js";export{VldNumber as $ZodNumber,VldNumber as ZodNumber,VldNumber as ZodNumberFormat}from"../../validators/number.js";export{VldBoolean as $ZodBoolean,VldBoolean as ZodBoolean}from"../../validators/boolean.js";export{VldBigInt as $ZodBigInt,VldBigInt as ZodBigInt,VldBigInt as ZodBigIntFormat}from"../../validators/bigint.js";export{VldSymbol as $ZodSymbol,VldSymbol as ZodSymbol}from"../../validators/symbol.js";export{VldUndefined as $ZodUndefined,VldUndefined as ZodUndefined}from"../../validators/undefined.js";export{VldNull as $ZodNull,VldNull as ZodNull}from"../../validators/null.js";export{VldAny as $ZodAny,VldAny as ZodAny}from"../../validators/any.js";export{VldUnknown as $ZodUnknown,VldUnknown as ZodUnknown}from"../../validators/unknown.js";export{VldNever as $ZodNever,VldNever as ZodNever}from"../../validators/never.js";export{VldVoid as $ZodVoid,VldVoid as ZodVoid}from"../../validators/void.js";export{VldDate as $ZodDate,VldDate as ZodDate}from"../../validators/date.js";export{VldArray as $ZodArray,VldArray as ZodArray}from"../../validators/array.js";import{VldObject as Ra}from"../../validators/object.js";export{VldUnion as $ZodUnion,VldUnion as ZodUnion}from"../../validators/union.js";export{VldIntersection as $ZodIntersection,VldIntersection,VldIntersection as ZodIntersection}from"../../validators/intersection.js";export{VldTuple as $ZodTuple,VldTuple as ZodTuple}from"../../validators/tuple.js";export{VldRecord as $ZodRecord,VldRecord as ZodRecord}from"../../validators/record.js";export{VldMap as $ZodMap,VldMap as ZodMap}from"../../validators/map.js";export{VldSet as $ZodSet,VldSet as ZodSet}from"../../validators/set.js";export{VldEnum as $ZodEnum,VldEnum as ZodEnum}from"../../validators/enum.js";export{VldLiteral as $ZodLiteral,VldLiteral as ZodLiteral}from"../../validators/literal.js";export{VldFile as $ZodFile,VldFile as ZodFile}from"../../validators/file.js";export{VldLazy as $ZodLazy,VldLazy as ZodLazy}from"../../validators/lazy.js";export{VldPromise as $ZodPromise,VldPromise as ZodPromise}from"../../validators/promise.js";export{VldCustom as $ZodCustom,VldCustom as ZodCustom,VldCustom as ZodSuccess}from"../../validators/custom.js";export{VldBase64 as $ZodBase64,VldBase64 as $ZodBase64URL}from"../../validators/base64.js";export{VldCodec as $ZodCodec,VldCodec as ZodCodec}from"../../validators/codec.js";export{VldDiscriminatedUnion as $ZodDiscriminatedUnion,VldDiscriminatedUnion as ZodDiscriminatedUnion}from"../../validators/discriminated-union.js";export{VldFunction as $ZodFunction,VldFunction as ZodFunction}from"../../validators/function.js";export{VldJson as $ZodSuccess,VldJson as ZodJSON}from"../../validators/json.js";export{VldNan as $ZodNaN,VldNan as ZodNaN}from"../../validators/nan.js";export{VldTemplateLiteral as $ZodTemplateLiteral,VldTemplateLiteral as ZodTemplateLiteral}from"../../validators/template-literal.js";export{VldXor as $ZodXor,VldXor as ZodXor}from"../../validators/xor.js";export{VldStringFormat as $ZodBigIntFormat,VldStringFormat as $ZodCIDRv4,VldStringFormat as $ZodCIDRv6,VldStringFormat as $ZodCUID,VldStringFormat as $ZodCUID2,VldStringFormat as $ZodCreditCard,VldStringFormat as $ZodCustomStringFormat,VldStringFormat as $ZodE164,VldStringFormat as $ZodEmail,VldStringFormat as $ZodEmoji,VldStringFormat as $ZodGUID,VldStringFormat as $ZodIPv4,VldStringFormat as $ZodIPv6,VldStringFormat as $ZodISODate,VldStringFormat as $ZodISODateTime,VldStringFormat as $ZodISODuration,VldStringFormat as $ZodISOTime,VldStringFormat as $ZodJWT,VldStringFormat as $ZodKSUID,VldStringFormat as $ZodMAC,VldStringFormat as $ZodNanoID,VldStringFormat as $ZodNumberFormat,VldStringFormat as $ZodStringFormat,VldStringFormat as $ZodULID,VldStringFormat as $ZodURL,VldStringFormat as $ZodUUID,VldStringFormat as $ZodXID,VldStringFormat as ZodBase64,VldStringFormat as ZodBase64URL,VldStringFormat as ZodCIDRv4,VldStringFormat as ZodCIDRv6,VldStringFormat as ZodCUID,VldStringFormat as ZodCUID2,VldStringFormat as ZodCreditCard,VldStringFormat as ZodCustomStringFormat,VldStringFormat as ZodE164,VldStringFormat as ZodEmail,VldStringFormat as ZodEmoji,VldStringFormat as ZodGUID,VldStringFormat as ZodIPv4,VldStringFormat as ZodIPv6,VldStringFormat as ZodISODate,VldStringFormat as ZodISODateTime,VldStringFormat as ZodISODuration,VldStringFormat as ZodISOTime,VldStringFormat as ZodJWT,VldStringFormat as ZodKSUID,VldStringFormat as ZodMAC,VldStringFormat as ZodNanoID,VldStringFormat as ZodStringFormat,VldStringFormat as ZodULID,VldStringFormat as ZodURL,VldStringFormat as ZodUUID,VldStringFormat as ZodXID,isValidCreditCard}from"../../validators/string-formats.js";export{registry as $ZodRegistry,globalRegistry,registry}from"../../registry.js";export{ZodCompileAsyncError,ZodCompileError,ZodCompileUnsupportedError,properties as _properties,applyCompiled,compile,compileFn,getDiscriminatedOption,memoizer,properties,toZod,validate,validateAsync,compileFn as zodCompileFn}from"../../compile.js";import{success as wa}from"../../compat/result.js";export{Err,Ok,ResultUtils,all,failure,flatMap,fromNullable,isErr,isOk,isResult,mapErr,match,tryCatch,tryCatchAsync,unwrap,unwrapOr}from"../../compat/result.js";export{V as $ZodError,V as $ZodRealError,V as VldError,V as ZodError,V as ZodRealError}from"../../chunks/errors-core-BU14-Dk8.js";export{b as base64Json,a as base64ToBytes,c as base64ToUint8Array,d as base64UrlToBytes,e as base64urlToBytes,f as bytesToUtf8,g as epochMillisToDate,h as epochSecondsToDate,i as hexLowerToBytes,j as hexToBytes,k as hexToUint8Array,l as invertCodec,m as isoDatetimeToDate,n as jsonCodec,o as jwtPayload,p as numberToBigInt,s as stringToBigInt,q as stringToBoolean,r as stringToHttpURL,t as stringToInt,u as stringToNumber,v as stringToURL,w as stringToUint8Array,x as uint8ArrayToBase64,y as uint8ArrayToBase64Url,z as uint8ArrayToHex,A as uint8ArrayToString,B as uriComponent,C as utf8ToBytes}from"../../chunks/index-CkbfQQ4n.js";export{blue,bold,createTheme,cyan,dim,gray,green,grey,italic,magenta,default as pigment,red,strip,supportsColor,underline,vldTheme,white,yellow}from"../../pigment.js";export{createEmitter,createEventBus,withEmitter}from"../../compat/emitter.js";export{createVldKernel,definePlugin,getVldKernel,resetVldKernel,usePlugin}from"../../kernel.js";export{getLocale,getMessages,getSupportedLocales,isLocaleLoaded,isLocaleSupported,registerLocale,setLocale}from"../../locales/runtime.js";export{s as setLocaleAsync}from"../../chunks/index-CKPStM3V.js";const za=o=>"string"==typeof o?o:o?.message||o?.error,ka=o=>"function"==typeof o[0]&&o.length>1,Ma=(o,a=0)=>o[ka(o)?a+1:a],Ja=(o,a=0)=>o[ka(o)?a+1:a],Ka=(o,a=0)=>{const r=Ja(o,a);return Array.isArray(r)?r:o.slice(a)},Xa=o=>()=>{throw new Error(`${o} is an internal Zod core compatibility placeholder`)};class _a extends Error{}class Ga extends Error{}class Ha{}class Wa extends Ha{}class qa extends Ha{}class Qa extends Ha{}class Ya extends Ha{}class or extends Ha{}class ar extends Ha{}class rr extends Ha{}class er extends Ha{}class sr extends Ha{}class tr extends Ha{}class dr extends Ha{}class lr extends Ha{}class nr extends Ha{}class ir extends Ha{}class mr extends Ha{}class cr extends Ha{}class pr extends Ha{}class Zr extends Ha{}class Vr extends Ha{}class ur extends Ha{}class gr extends Ha{}const fr=Ra;class yr{}const Sr={};class xr{}const $r={},Fr={major:4,minor:4,patch:3},vr=(o,a)=>{var r;return(r=class{constructor(o){Object.defineProperty(this,"_zod",{value:{def:o},enumerable:!1}),a?.(this,o)}}).displayName=o,r},jr=yo,br=(...o)=>{const a=Ma(o),r=Ja(o,1);return a.default("function"==typeof r?r():r)},Ir=Io,Tr=So,hr=To,Er=O,Cr=jo,Ur=U,Dr=Fo,Lr=R,Br=bo,Nr=D,Pr=vo,Ar=(...o)=>Ta(),Or=(...o)=>la(),Rr=(...o)=>Ho(),wr=(...o)=>Go(),zr=(...o)=>Ca(),kr=(...o)=>Ba(),Mr=(...o)=>ua(),Jr=(...o)=>Xo(),Kr=(...o)=>Pa(),Xr=(...o)=>Za(),_r=(...o)=>Aa(),Gr=(...o)=>aa(),Hr=(...o)=>_o(Ma(o)),Wr=(...o)=>fa(Ja(o)),qr=(...o)=>Na(...Ka(o)),Qr=(...o)=>na(Ma(o),Ma(o,1)),Yr=(...o)=>La(...Ka(o)),oe=(...o)=>ja(Ma(o,ka(o)?1:0)),ae=(...o)=>ca(Ma(o),Ma(o,1)),re=(...o)=>Ia(Ma(o)),ee=(...o)=>{const a=Ja(o);return Array.isArray(a)?ea(...a):sa(a)},se=(...o)=>sa(Ja(o)),te=(...o)=>ma(Ja(o)),de=(...o)=>ta(),le=(...o)=>ia(Ja(o)),ne=(...o)=>$a(Ma(o)),ie=(...o)=>ya(Ma(o)),me=(...o)=>ga(Ma(o)),ce=(...o)=>Va(Ma(o)),pe=(...o)=>va(Ma(o)),Ze=(...o)=>Ua(...Ka(o)),Ve=(...o)=>ha(Ja(o)),ue=(...o)=>pa(),ge=N,fe=X,ye=wo,Se=zo,xe=ko,$e=Mo,Fe=Ro,ve=P,je=Zo,be=T,Ie=E,Te=Ao,he=Jo,Ee=ro,Ce=Q,Ue=Y,De=$,Le=F,Be=Z,Ne=S,Pe=L,Ae=ao,Oe=oo.dateTime,Re=oo.date,we=oo.time,ze=oo.duration,ke=to,Me=io,Je=Uo,Ke=(o,a)=>la().min(o,za(a)),Xe=(o,a)=>la().max(o,za(a)),_e=(o,a)=>la().gt(o,za(a)),Ge=(o,a)=>la().gte(o,za(a)),He=(o,a)=>la().lt(o,za(a)),We=(o,a)=>la().lte(o,za(a)),qe=G,Qe=H,Ye=No,os=W,as=Po,rs=J,es=K,ss=xo,ts=Vo,ds=go,ls=uo,ns=po,is=mo,ms=lo,cs=eo,ps=ho,Zs=co,Vs=no,us=$o,gs=Co,fs=M,ys=_,Ss=so,xs=Oo,$s=Bo,Fs=fo,vs=Eo,js=Do,bs=Lo,Is=(...o)=>qo(Ja(o)),Ts=(...o)=>oa(Ja(o)),hs=(...o)=>ba(Ja(o),Ja(o,1)),Es=(...o)=>Ea(Ma(o),Ja(o,1)),Cs=(...o)=>Da(Ja(o)),Us=(...o)=>Sa(Ja(o)),Ds=(...o)=>xa(Ma(o),Ma(o,1)),Ls=(...o)=>Wo(Ma(o),Ja(o,1)),Bs=(...o)=>wa(Ja(o)),Ns=(...o)=>Fa(Ja(o),Ma(o,1),Ja(o,2)),Ps=I.string,As=I.number,Os=I.boolean,Rs=I.bigint,ws=I.date,zs=(...o)=>Qo(Ma(o),Ma(o,1),Ja(o,2)),ks=(...o)=>da(),Ms=(...o)=>ra(Ja(o),...Ka(o,1)),Js=(...o)=>Oa(...Ka(o)),Ks=()=>Ko,Xs=()=>Ko,_s=()=>({}),Gs=o=>o,Hs=()=>({}),Ws=o=>o,qs=o=>o.map(String).join("."),Qs=o=>Z().safeParse(o).success,Ys=o=>S().safeParse(o).success,ot=o=>ao().safeParse(o).success,at=(...o)=>Yo(Ja(o)),rt=o=>{const a=o;if(a&&"object"==typeof a["~standard"]&&null!==a["~standard"])return a["~standard"];const r=o;if("function"!=typeof r?.safeParse)throw new TypeError("standardProps expects a VLD schema");return{validate:o=>{const a=r.safeParse(o);return a.success?{value:a.data}:{issues:[{message:a.error?.message??"Invalid input"}]}},vendor:"vld",version:1}},et=(o,a,r,e,s)=>{const t="function"==typeof a.unrepresentable?a.unrepresentable({zodSchema:o,path:e.path,message:s}):a.unrepresentable;if("any"===t)return!1;if(void 0===t||"throw"===t)throw new Error(s);return Object.assign(r,{...t}),!0},st=Xa("_checkInternal"),tt=Xa("$ZodCyclicError"),dt=Xa("attachMemoizer"),nt=Xa("isBackEdge"),it=o=>!(!o||"object"!=typeof o)&&"ZodLazy"===o._def?.typeName,mt=1,ct=2,pt=Symbol.for("zod.compile.invalid"),Zt=o=>Y().safeParse(o).success,Vt=o=>F().safeParse(o).success,ut=o=>/^[A-Za-z0-9.-]+$/.test(o),ft=o=>/^[a-z][a-z0-9+\-.]*$/i.test(o),yt=o=>{try{return new URL(o)}catch{return null}},St=o=>o.replace(/[\t\n\r]/g,""),xt=(o,a)=>Array.isArray(o)&&Array.isArray(a)?[...o,...a]:o&&a&&"object"==typeof o&&"object"==typeof a?{...o,...a}:a;export{_a as $ZodAsyncError,Ha as $ZodCheck,Wa as $ZodCheckBigIntFormat,qa as $ZodCheckEndsWith,Qa as $ZodCheckGreaterThan,Ya as $ZodCheckIncludes,or as $ZodCheckLengthEquals,ar as $ZodCheckLessThan,rr as $ZodCheckLowerCase,er as $ZodCheckMaxLength,sr as $ZodCheckMaxSize,tr as $ZodCheckMimeType,dr as $ZodCheckMinLength,lr as $ZodCheckMinSize,nr as $ZodCheckMultipleOf,ir as $ZodCheckNumberFormat,mr as $ZodCheckOverwrite,cr as $ZodCheckProperty,pr as $ZodCheckRegex,Zr as $ZodCheckSizeEquals,Vr as $ZodCheckStartsWith,ur as $ZodCheckStringFormat,gr as $ZodCheckUpperCase,tt as $ZodCyclicError,Ga as $ZodEncodeError,Ra as $ZodObject,fr as $ZodObjectJIT,vr as $constructor,yr as Doc,pt as INVALID,Sr as JSONSchema,xr as JSONSchemaGenerator,mt as URL_BAD_FORMAT,ct as URL_UNPARSEABLE,Ra as ZodObject,Jr as _any,Hr as _array,Be as _base64,Ne as _base64url,wr as _bigint,Rr as _boolean,Ls as _catch,Is as _check,st as _checkInternal,De as _cidrv4,Le as _cidrv6,zs as _codec,Rs as _coercedBigint,Os as _coercedBoolean,ws as _coercedDate,As as _coercedNumber,Ps as _coercedString,at as _creditCard,be as _cuid,Ie as _cuid2,Ts as _custom,Gr as _date,Ur as _decode,Nr as _decodeAsync,br as _default,Ms as _discriminatedUnion,Pe as _e164,ge as _email,ve as _emoji,Er as _encode,Lr as _encodeAsync,fs as _endsWith,ee as _enum,de as _file,rs as _float32,es as _float64,ks as _function,_e as _gt,Ge as _gte,fe as _guid,ys as _includes,qe as _int,Qe as _int32,os as _int64,Qr as _intersection,Ce as _ipv4,Ue as _ipv6,Re as _isoDate,Oe as _isoDateTime,ze as _isoDuration,we as _isoTime,Ae as _jwt,Ee as _ksuid,le as _lazy,cs as _length,te as _literal,Ss as _lowercase,He as _lt,We as _lte,ke as _mac,ae as _map,Xe as _max,ms as _maxLength,Vs as _maxSize,Me as _mime,Ke as _min,is as _minLength,Zs as _minSize,ns as _multipleOf,ue as _nan,je as _nanoid,se as _nativeEnum,ts as _negative,Xr as _never,ls as _nonnegative,ce as _nonoptional,ds as _nonpositive,Fs as _normalize,Mr as _null,me as _nullable,Or as _number,Wr as _object,ie as _optional,Us as _overwrite,jr as _parse,Tr as _parseAsync,Ds as _pipe,ss as _positive,ne as _promise,Ns as _property,pe as _readonly,oe as _record,hs as _refine,us as _regex,Dr as _safeDecode,Pr as _safeDecodeAsync,Cr as _safeEncode,Br as _safeEncodeAsync,Ir as _safeParse,hr as _safeParseAsync,re as _set,ps as _size,vs as _slugify,gs as _startsWith,Ar as _string,Je as _stringFormat,Ve as _stringbool,Bs as _success,Es as _superRefine,zr as _symbol,Ze as _templateLiteral,js as _toLowerCase,bs as _toUpperCase,Cs as _transform,$s as _trim,Yr as _tuple,Ye as _uint32,as as _uint64,Te as _ulid,kr as _undefined,qr as _union,Kr as _unknown,xs as _uppercase,Fe as _url,ye as _uuid,Se as _uuidv4,xe as _uuidv6,$e as _uuidv7,_r as _void,he as _xid,Js as _xor,Xo as any,_o as array,dt as attachMemoizer,Z as base64,S as base64url,Go as bigint,Ho as boolean,Wo as catch,qo as check,$ as cidrv4,F as cidrv6,Qo as codec,I as coerce,Xs as createStandardJSONSchemaMethod,Ks as createToJSONSchemaMethod,Yo as creditCard,T as cuid,E as cuid2,oa as custom,aa as date,U as decode,D as decodeAsync,ra as discriminatedUnion,L as e164,N as email,P as emoji,O as encode,R as encodeAsync,M as endsWith,ea as enum,_s as extractDefs,ta as file,Gs as finalize,J as float32,K as float64,da as function,$r as globalConfig,X as guid,et as handleUnrepresentable,_ as includes,Hs as initializeContext,G as int,H as int32,W as int64,na as intersection,Q as ipv4,Y as ipv6,nt as isBackEdge,it as isRecursiveSchema,Qs as isValidBase64,Ys as isValidBase64URL,Vt as isValidCIDRv6,Zt as isValidIPv6,ot as isValidJWT,oo as iso,ao as jwt,ro as ksuid,ia as lazy,eo as length,ma as literal,so as lowercase,to as mac,ca as map,lo as maxLength,no as maxSize,xt as mergeValues,io as mime,mo as minLength,co as minSize,po as multipleOf,pa as nan,Zo as nanoid,sa as nativeEnum,Vo as negative,Za as never,uo as nonnegative,Va as nonoptional,go as nonpositive,fo as normalize,ua as null,ga as nullable,la as number,fa as object,ya as optional,Sa as overwrite,yo as parse,So as parseAsync,yt as parseURLObject,xa as pipe,xo as positive,Ws as process,$a as promise,Fa as property,va as readonly,ja as record,ba as refine,$o as regex,Fo as safeDecode,vo as safeDecodeAsync,jo as safeEncode,bo as safeEncodeAsync,Io as safeParse,To as safeParseAsync,Ia as set,ho as size,Eo as slugify,rt as standardProps,Co as startsWith,Ta as string,Uo as stringFormat,ha as stringbool,St as stripTabAndNewline,wa as success,Ea as superRefine,Ca as symbol,Ua as templateLiteral,qs as toDotPath,Ko as toJSONSchema,Do as toLowerCase,Lo as toUpperCase,Da as transform,Bo as trim,La as tuple,No as uint32,Po as uint64,Ao as ulid,Ba as undefined,Na as union,Pa as unknown,Oo as uppercase,Ro as url,ut as urlHostnameOk,ft as urlProtocolOk,wo as uuid,zo as uuidv4,ko as uuidv6,Mo as uuidv7,Fr as version,Aa as void,Jo as xid,Oa as xor};
1
+ import{base64 as Z,base64url as S,cidrv4 as $,cidrv6 as F,coerce as I,cuid as U,cuid2 as T,decode as E,decodeAsync as L,e164 as D,email as N,emoji as P,encode as R,encodeAsync as O,endsWith as M,float32 as J,float64 as _,guid as K,includes as X,int as G,int32 as H,int64 as W,ipv4 as Q,ipv6 as Y,iso as oo,jwt as ao,ksuid as ro,length as eo,lowercase as so,mac as to,maxLength as lo,maxSize as no,mime as io,minLength as mo,minSize as co,multipleOf as po,nanoid as Vo,negative as Zo,nonnegative as uo,nonpositive as go,normalize as fo,parse as yo,parseAsync as So,positive as xo,regex as $o,safeDecode as Fo,safeDecodeAsync as vo,safeEncode as jo,safeEncodeAsync as bo,safeParse as Io,safeParseAsync as ho,size as Co,slugify as Uo,startsWith as To,stringFormat as Eo,toLowerCase as Lo,toUpperCase as Do,trim as Bo,uint32 as No,uint64 as Po,ulid as Ao,uppercase as Ro,url as Oo,uuid as wo,uuidv4 as ko,uuidv6 as zo,uuidv7 as Mo,xid as Jo,toJSONSchema as _o,any as Ko,array as Xo,bigint as Go,boolean as Ho,catch as Wo,check as qo,codec as Qo,creditCard as Yo,custom as oa,date as aa,discriminatedUnion as ra,enum as ea,nativeEnum as sa,file as ta,_function as da,number as la,iban as na,intersection as ia,lazy as ma,literal as ca,map as pa,nan as Va,never as Za,nonoptional as ua,null as ga,nullable as fa,object as ya,optional as Sa,overwrite as xa,pipe as $a,promise as Fa,property as va,readonly as ja,record as ba,refine as Ia,set as ha,string as Ca,stringbool as Ua,superRefine as Ta,symbol as Ea,templateLiteral as La,transform as Da,tuple as Ba,undefined as Na,union as Pa,unknown as Aa,void as Ra,xor as Oa}from"../../index.js";export{$brand,$input,$output,NEVER,TimePrecision,ZodFirstPartyTypeKind,ZodIssueCode,ZodLikeError,_ZodString,base64Bytes,clone,config,core,createLogger,createNoOpLogger,currencyCode,deepPartial,core as default,describe,disableLogging,enableDebug,exactOptional,formatError,fromJSONSchema,getErrorMap,getLogger,gt,gte,hash,hex,hexBytes,hostname,httpUrl,initLogger,input,instanceof,json,keyof,locales,looseObject,looseRecord,lt,lte,mapSchema,meta,nullish,output,partialRecord,prefault,preprocess,regexes,setErrorMap,setLogLevel,strictObject,toZodError,toZodSafeResult,uint8Array,util,default as v,vV2,z}from"../../index.js";export{flattenError,prettifyError,prettifyErrorColored,prettifyErrorPlain,treeifyError}from"../../errors.js";export{VldCatch as $ZodCatch,VldDefault as $ZodDefault,VldExactOptional as $ZodExactOptional,VldRefine as $ZodNonOptional,VldNullable as $ZodNullable,VldOptional as $ZodOptional,VldPipe as $ZodPipe,VldPrefault as $ZodPrefault,VldPreprocess as $ZodPreprocess,VldReadonly as $ZodReadonly,VldTransform as $ZodTransform,VldBase as $ZodType,VldBase,VldMeta,VldBrand as ZodBranded,VldCatch as ZodCatch,VldDefault as ZodDefault,VldExactOptional as ZodExactOptional,VldMeta as ZodMeta,VldRefine as ZodNonOptional,VldNullable as ZodNullable,VldOptional as ZodOptional,VldPipe as ZodPipe,VldPrefault as ZodPrefault,VldPreprocess as ZodPreprocess,VldReadonly as ZodReadonly,VldTransform as ZodTransform,VldBase as ZodType}from"../../validators/base.js";export{VldString as $ZodString,VldString as ZodString}from"../../validators/string.js";export{VldNumber as $ZodNumber,VldNumber as ZodNumber,VldNumber as ZodNumberFormat}from"../../validators/number.js";export{VldBoolean as $ZodBoolean,VldBoolean as ZodBoolean}from"../../validators/boolean.js";export{VldBigInt as $ZodBigInt,VldBigInt as ZodBigInt,VldBigInt as ZodBigIntFormat}from"../../validators/bigint.js";export{VldSymbol as $ZodSymbol,VldSymbol as ZodSymbol}from"../../validators/symbol.js";export{VldUndefined as $ZodUndefined,VldUndefined as ZodUndefined}from"../../validators/undefined.js";export{VldNull as $ZodNull,VldNull as ZodNull}from"../../validators/null.js";export{VldAny as $ZodAny,VldAny as ZodAny}from"../../validators/any.js";export{VldUnknown as $ZodUnknown,VldUnknown as ZodUnknown}from"../../validators/unknown.js";export{VldNever as $ZodNever,VldNever as ZodNever}from"../../validators/never.js";export{VldVoid as $ZodVoid,VldVoid as ZodVoid}from"../../validators/void.js";export{VldDate as $ZodDate,VldDate as ZodDate}from"../../validators/date.js";export{VldArray as $ZodArray,VldArray as ZodArray}from"../../validators/array.js";import{VldObject as wa}from"../../validators/object.js";export{VldUnion as $ZodUnion,VldUnion as ZodUnion}from"../../validators/union.js";export{VldIntersection as $ZodIntersection,VldIntersection,VldIntersection as ZodIntersection}from"../../validators/intersection.js";export{VldTuple as $ZodTuple,VldTuple as ZodTuple}from"../../validators/tuple.js";export{VldRecord as $ZodRecord,VldRecord as ZodRecord}from"../../validators/record.js";export{VldMap as $ZodMap,VldMap as ZodMap}from"../../validators/map.js";export{VldSet as $ZodSet,VldSet as ZodSet}from"../../validators/set.js";export{VldEnum as $ZodEnum,VldEnum as ZodEnum}from"../../validators/enum.js";export{VldLiteral as $ZodLiteral,VldLiteral as ZodLiteral}from"../../validators/literal.js";export{VldFile as $ZodFile,VldFile as ZodFile}from"../../validators/file.js";export{VldLazy as $ZodLazy,VldLazy as ZodLazy}from"../../validators/lazy.js";export{VldPromise as $ZodPromise,VldPromise as ZodPromise}from"../../validators/promise.js";export{VldCustom as $ZodCheckProperties,VldCustom as $ZodCustom,VldCustom as ZodCustom,VldInstance as ZodInstanceOf,VldCustom as ZodSuccess}from"../../validators/custom.js";export{VldBase64 as $ZodBase64,VldBase64 as $ZodBase64URL}from"../../validators/base64.js";export{VldCodec as $ZodCodec,VldCodec as ZodCodec}from"../../validators/codec.js";export{VldDiscriminatedUnion as $ZodDiscriminatedUnion,VldDiscriminatedUnion as ZodDiscriminatedUnion}from"../../validators/discriminated-union.js";export{VldFunction as $ZodFunction,VldFunction as ZodFunction}from"../../validators/function.js";export{VldJson as $ZodSuccess,VldJson as ZodJSON}from"../../validators/json.js";export{VldNan as $ZodNaN,VldNan as ZodNaN}from"../../validators/nan.js";export{VldTemplateLiteral as $ZodTemplateLiteral,VldTemplateLiteral as ZodTemplateLiteral}from"../../validators/template-literal.js";export{VldXor as $ZodXor,VldXor as ZodXor}from"../../validators/xor.js";export{VldStringFormat as $ZodBigIntFormat,VldStringFormat as $ZodCIDRv4,VldStringFormat as $ZodCIDRv6,VldStringFormat as $ZodCUID,VldStringFormat as $ZodCUID2,VldStringFormat as $ZodCreditCard,VldStringFormat as $ZodCustomStringFormat,VldStringFormat as $ZodE164,VldStringFormat as $ZodEmail,VldStringFormat as $ZodEmoji,VldStringFormat as $ZodGUID,VldStringFormat as $ZodIBAN,VldStringFormat as $ZodIPv4,VldStringFormat as $ZodIPv6,VldStringFormat as $ZodISODate,VldStringFormat as $ZodISODateTime,VldStringFormat as $ZodISODuration,VldStringFormat as $ZodISOTime,VldStringFormat as $ZodJWT,VldStringFormat as $ZodKSUID,VldStringFormat as $ZodMAC,VldStringFormat as $ZodNanoID,VldStringFormat as $ZodNumberFormat,VldStringFormat as $ZodStringFormat,VldStringFormat as $ZodULID,VldStringFormat as $ZodURL,VldStringFormat as $ZodUUID,VldStringFormat as $ZodXID,VldStringFormat as ZodBase64,VldStringFormat as ZodBase64URL,VldStringFormat as ZodCIDRv4,VldStringFormat as ZodCIDRv6,VldStringFormat as ZodCUID,VldStringFormat as ZodCUID2,VldStringFormat as ZodCreditCard,VldStringFormat as ZodCustomStringFormat,VldStringFormat as ZodE164,VldStringFormat as ZodEmail,VldStringFormat as ZodEmoji,VldStringFormat as ZodGUID,VldStringFormat as ZodIBAN,VldStringFormat as ZodIPv4,VldStringFormat as ZodIPv6,VldStringFormat as ZodISODate,VldStringFormat as ZodISODateTime,VldStringFormat as ZodISODuration,VldStringFormat as ZodISOTime,VldStringFormat as ZodJWT,VldStringFormat as ZodKSUID,VldStringFormat as ZodMAC,VldStringFormat as ZodNanoID,VldStringFormat as ZodStringFormat,VldStringFormat as ZodULID,VldStringFormat as ZodURL,VldStringFormat as ZodUUID,VldStringFormat as ZodXID,base64Charset,base64urlCharset,isValidCreditCard,isValidIBAN}from"../../validators/string-formats.js";export{registry as $ZodRegistry,globalRegistry,registry}from"../../registry.js";export{COMPILE_INVALID,ZodCompileAsyncError,ZodCompileError,ZodCompileUnsupportedError,properties as _properties,applyCompiled,compile,compileFn,getDiscriminatedOption,memoizer,properties,toZod,validate,validateAsync,withParser,compileFn as zodCompileFn}from"../../compile.js";import{success as ka}from"../../compat/result.js";export{Err,Ok,ResultUtils,all,failure,flatMap,fromNullable,isErr,isOk,isResult,mapErr,match,tryCatch,tryCatchAsync,unwrap,unwrapOr}from"../../compat/result.js";export{V as $ZodError,V as $ZodRealError,V as VldError,V as ZodError,V as ZodRealError}from"../../chunks/errors-core-BU14-Dk8.js";export{b as base64Json,a as base64ToBytes,c as base64ToUint8Array,d as base64UrlToBytes,e as base64urlToBytes,f as bytesToUtf8,g as epochMillisToDate,h as epochSecondsToDate,i as hexLowerToBytes,j as hexToBytes,k as hexToUint8Array,l as invertCodec,m as isoDatetimeToDate,n as jsonCodec,o as jwtPayload,p as numberToBigInt,s as stringToBigInt,q as stringToBoolean,r as stringToHttpURL,t as stringToInt,u as stringToNumber,v as stringToURL,w as stringToUint8Array,x as uint8ArrayToBase64,y as uint8ArrayToBase64Url,z as uint8ArrayToHex,A as uint8ArrayToString,B as uriComponent,C as utf8ToBytes}from"../../chunks/index-CkbfQQ4n.js";export{blue,bold,createTheme,cyan,dim,gray,green,grey,italic,magenta,default as pigment,red,strip,supportsColor,underline,vldTheme,white,yellow}from"../../pigment.js";export{createEmitter,createEventBus,withEmitter}from"../../compat/emitter.js";export{createVldKernel,definePlugin,getVldKernel,resetVldKernel,usePlugin}from"../../kernel.js";export{getLocale,getMessages,getSupportedLocales,isLocaleLoaded,isLocaleSupported,registerLocale,setLocale}from"../../locales/runtime.js";export{s as setLocaleAsync}from"../../chunks/index-Bn85LHAC.js";const za=o=>"string"==typeof o?o:o?.message||o?.error,Ma=o=>"function"==typeof o[0]&&o.length>1,Ja=(o,a=0)=>o[Ma(o)?a+1:a],_a=(o,a=0)=>o[Ma(o)?a+1:a],Ka=(o,a=0)=>{const r=_a(o,a);return Array.isArray(r)?r:o.slice(a)},Xa=o=>()=>{throw new Error(`${o} is an internal Zod core compatibility placeholder`)};class Ga extends Error{}class Ha extends Error{}class Wa{}class qa extends Wa{}class Qa extends Wa{}class Ya extends Wa{}class or extends Wa{}class ar extends Wa{}class rr extends Wa{}class er extends Wa{}class sr extends Wa{}class tr extends Wa{}class dr extends Wa{}class lr extends Wa{}class nr extends Wa{}class ir extends Wa{}class mr extends Wa{}class cr extends Wa{}class pr extends Wa{}class Vr extends Wa{}class Zr extends Wa{}class ur extends Wa{}class gr extends Wa{}class fr extends Wa{}const yr=wa;class Sr{}const xr={};class $r{}const Fr={},vr={major:4,minor:4,patch:3},jr=(o,a)=>{var r;return(r=class{constructor(o){Object.defineProperty(this,"_zod",{value:{def:o},enumerable:!1}),a?.(this,o)}}).displayName=o,r},br=yo,Ir=(...o)=>{const a=Ja(o),r=_a(o,1);return a.default("function"==typeof r?r():r)},hr=Io,Cr=So,Ur=ho,Tr=R,Er=jo,Lr=E,Dr=Fo,Br=O,Nr=bo,Pr=L,Ar=vo,Rr=(...o)=>Ca(),Or=(...o)=>la(),wr=(...o)=>Ho(),kr=(...o)=>Go(),zr=(...o)=>Ea(),Mr=(...o)=>Na(),Jr=(...o)=>ga(),_r=(...o)=>Ko(),Kr=(...o)=>Aa(),Xr=(...o)=>Za(),Gr=(...o)=>Ra(),Hr=(...o)=>aa(),Wr=(...o)=>Xo(Ja(o)),qr=(...o)=>ya(_a(o)),Qr=(...o)=>Pa(...Ka(o)),Yr=(...o)=>ia(Ja(o),Ja(o,1)),oe=(...o)=>Ba(...Ka(o)),ae=(...o)=>ba(Ja(o,Ma(o)?1:0)),re=(...o)=>pa(Ja(o),Ja(o,1)),ee=(...o)=>ha(Ja(o)),se=(...o)=>{const a=_a(o);return Array.isArray(a)?ea(...a):sa(a)},te=(...o)=>sa(_a(o)),de=(...o)=>ca(_a(o)),le=(...o)=>ta(),ne=(...o)=>ma(_a(o)),ie=(...o)=>Fa(Ja(o)),me=(...o)=>Sa(Ja(o)),ce=(...o)=>fa(Ja(o)),pe=(...o)=>ua(Ja(o)),Ve=(...o)=>ja(Ja(o)),Ze=(...o)=>La(...Ka(o)),ue=(...o)=>Ua(_a(o)),ge=(...o)=>Va(),fe=N,ye=K,Se=wo,xe=ko,$e=zo,Fe=Mo,ve=Oo,je=P,be=Vo,Ie=U,he=T,Ce=Ao,Ue=Jo,Te=ro,Ee=Q,Le=Y,De=$,Be=F,Ne=Z,Pe=S,Ae=D,Re=ao,Oe=oo.dateTime,we=oo.date,ke=oo.time,ze=oo.duration,Me=to,Je=io,_e=Eo,Ke=(o,a)=>la().min(o,za(a)),Xe=(o,a)=>la().max(o,za(a)),Ge=(o,a)=>la().gt(o,za(a)),He=(o,a)=>la().gte(o,za(a)),We=(o,a)=>la().lt(o,za(a)),qe=(o,a)=>la().lte(o,za(a)),Qe=G,Ye=H,os=No,as=W,rs=Po,es=J,ss=_,ts=xo,ds=Zo,ls=go,ns=uo,is=po,ms=mo,cs=lo,ps=eo,Vs=Co,Zs=co,us=no,gs=$o,fs=To,ys=M,Ss=X,xs=so,$s=Ro,Fs=Bo,vs=fo,js=Uo,bs=Lo,Is=Do,hs=(...o)=>qo(_a(o)),Cs=(...o)=>oa(_a(o)),Us=(...o)=>Ia(_a(o),_a(o,1)),Ts=(...o)=>Ta(Ja(o),_a(o,1)),Es=(...o)=>Da(_a(o)),Ls=(...o)=>xa(_a(o)),Ds=(...o)=>$a(Ja(o),Ja(o,1)),Bs=(...o)=>Wo(Ja(o),_a(o,1)),Ns=(...o)=>ka(_a(o)),Ps=(...o)=>va(_a(o),Ja(o,1),_a(o,2)),As=I.string,Rs=I.number,Os=I.boolean,ws=I.bigint,ks=I.date,zs=(...o)=>Qo(Ja(o),Ja(o,1),_a(o,2)),Ms=(...o)=>da(),Js=(...o)=>ra(_a(o),...Ka(o,1)),_s=(...o)=>Oa(...Ka(o)),Ks=()=>_o,Xs=()=>_o,Gs=()=>({}),Hs=o=>o,Ws=()=>({}),qs=o=>o,Qs=o=>o.map(String).join("."),Ys=o=>Z().safeParse(o).success,ot=o=>S().safeParse(o).success,at=o=>ao().safeParse(o).success,rt=(...o)=>na(_a(o));function et(o){try{return"undefined"!=typeof URL&&"function"==typeof URL.canParse?URL.canParse(o):(new URL(o),!0)}catch{return!1}}function st(o,a={}){try{return new URL(o)}catch{return ft}}const tt=(o,a,r)=>o,dt=(...o)=>Yo(_a(o)),nt=o=>{const a=o;if(a&&"object"==typeof a["~standard"]&&null!==a["~standard"])return a["~standard"];const r=o;if("function"!=typeof r?.safeParse)throw new TypeError("standardProps expects a VLD schema");return{validate:o=>{const a=r.safeParse(o);return a.success?{value:a.data}:{issues:[{message:a.error?.message??"Invalid input"}]}},vendor:"vld",version:1}},it=(o,a,r,e,s)=>{const t="function"==typeof a.unrepresentable?a.unrepresentable({zodSchema:o,path:e.path,message:s}):a.unrepresentable;if("any"===t)return!1;if(void 0===t||"throw"===t)throw new Error(s);return Object.assign(r,{...t}),!0},mt=Xa("_checkInternal"),ct=Xa("$ZodCyclicError"),pt=Xa("attachMemoizer"),Vt=Xa("isBackEdge"),Zt=o=>!(!o||"object"!=typeof o)&&"ZodLazy"===o._def?.typeName,ut=1,ft=2,yt=Symbol.for("zod.compile.invalid"),St=o=>Y().safeParse(o).success,xt=o=>F().safeParse(o).success,$t=o=>/^[A-Za-z0-9.-]+$/.test(o),Ft=o=>/^[a-z][a-z0-9+\-.]*$/i.test(o),vt=o=>{try{return new URL(o)}catch{return null}},jt=o=>o.replace(/[\t\n\r]/g,""),bt=(o,a)=>Array.isArray(o)&&Array.isArray(a)?[...o,...a]:o&&a&&"object"==typeof o&&"object"==typeof a?{...o,...a}:a;export{Ga as $ZodAsyncError,Wa as $ZodCheck,qa as $ZodCheckBigIntFormat,Qa as $ZodCheckEndsWith,Ya as $ZodCheckGreaterThan,or as $ZodCheckIncludes,ar as $ZodCheckLengthEquals,rr as $ZodCheckLessThan,er as $ZodCheckLowerCase,sr as $ZodCheckMaxLength,tr as $ZodCheckMaxSize,dr as $ZodCheckMimeType,lr as $ZodCheckMinLength,nr as $ZodCheckMinSize,ir as $ZodCheckMultipleOf,mr as $ZodCheckNumberFormat,cr as $ZodCheckOverwrite,pr as $ZodCheckProperty,Vr as $ZodCheckRegex,Zr as $ZodCheckSizeEquals,ur as $ZodCheckStartsWith,gr as $ZodCheckStringFormat,fr as $ZodCheckUpperCase,ct as $ZodCyclicError,Ha as $ZodEncodeError,wa as $ZodObject,yr as $ZodObjectJIT,jr as $constructor,Sr as Doc,yt as INVALID,xr as JSONSchema,$r as JSONSchemaGenerator,ut as URL_BAD_FORMAT,ft as URL_UNPARSEABLE,wa as ZodObject,_r as _any,Wr as _array,Ne as _base64,Pe as _base64url,kr as _bigint,wr as _boolean,Bs as _catch,hs as _check,mt as _checkInternal,De as _cidrv4,Be as _cidrv6,zs as _codec,ws as _coercedBigint,Os as _coercedBoolean,ks as _coercedDate,Rs as _coercedNumber,As as _coercedString,dt as _creditCard,Ie as _cuid,he as _cuid2,Cs as _custom,Hr as _date,Lr as _decode,Pr as _decodeAsync,Ir as _default,Js as _discriminatedUnion,Ae as _e164,fe as _email,je as _emoji,Tr as _encode,Br as _encodeAsync,ys as _endsWith,se as _enum,le as _file,es as _float32,ss as _float64,Ms as _function,Ge as _gt,He as _gte,ye as _guid,rt as _iban,Ss as _includes,Qe as _int,Ye as _int32,as as _int64,Yr as _intersection,Ee as _ipv4,Le as _ipv6,we as _isoDate,Oe as _isoDateTime,ze as _isoDuration,ke as _isoTime,Re as _jwt,Te as _ksuid,ne as _lazy,ps as _length,de as _literal,xs as _lowercase,We as _lt,qe as _lte,Me as _mac,re as _map,Xe as _max,cs as _maxLength,us as _maxSize,Je as _mime,Ke as _min,ms as _minLength,Zs as _minSize,is as _multipleOf,ge as _nan,be as _nanoid,te as _nativeEnum,ds as _negative,Xr as _never,ns as _nonnegative,pe as _nonoptional,ls as _nonpositive,vs as _normalize,Jr as _null,ce as _nullable,Or as _number,qr as _object,me as _optional,Ls as _overwrite,br as _parse,Cr as _parseAsync,Ds as _pipe,ts as _positive,ie as _promise,Ps as _property,Ve as _readonly,ae as _record,Us as _refine,gs as _regex,Dr as _safeDecode,Ar as _safeDecodeAsync,Er as _safeEncode,Nr as _safeEncodeAsync,hr as _safeParse,Ur as _safeParseAsync,ee as _set,Vs as _size,js as _slugify,fs as _startsWith,Rr as _string,_e as _stringFormat,ue as _stringbool,Ns as _success,Ts as _superRefine,zr as _symbol,Ze as _templateLiteral,bs as _toLowerCase,Is as _toUpperCase,Es as _transform,Fs as _trim,oe as _tuple,os as _uint32,rs as _uint64,Ce as _ulid,Mr as _undefined,Qr as _union,Kr as _unknown,$s as _uppercase,ve as _url,Se as _uuid,xe as _uuidv4,$e as _uuidv6,Fe as _uuidv7,Gr as _void,Ue as _xid,_s as _xor,Ko as any,Xo as array,pt as attachMemoizer,Z as base64,S as base64url,Go as bigint,Ho as boolean,et as canParseURL,Wo as catch,qo as check,$ as cidrv4,F as cidrv6,Qo as codec,I as coerce,Xs as createStandardJSONSchemaMethod,Ks as createToJSONSchemaMethod,Yo as creditCard,U as cuid,T as cuid2,oa as custom,aa as date,E as decode,L as decodeAsync,ra as discriminatedUnion,D as e164,N as email,P as emoji,R as encode,O as encodeAsync,M as endsWith,ea as enum,Gs as extractDefs,ta as file,Hs as finalize,J as float32,_ as float64,da as function,Fr as globalConfig,K as guid,it as handleUnrepresentable,na as iban,X as includes,Ws as initializeContext,G as int,H as int32,W as int64,ia as intersection,Q as ipv4,Y as ipv6,Vt as isBackEdge,Zt as isRecursiveSchema,Ys as isValidBase64,ot as isValidBase64URL,xt as isValidCIDRv6,St as isValidIPv6,at as isValidJWT,oo as iso,ao as jwt,ro as ksuid,ma as lazy,eo as length,ca as literal,so as lowercase,to as mac,pa as map,lo as maxLength,no as maxSize,bt as mergeValues,io as mime,mo as minLength,co as minSize,po as multipleOf,Va as nan,Vo as nanoid,sa as nativeEnum,Zo as negative,Za as never,uo as nonnegative,ua as nonoptional,go as nonpositive,fo as normalize,ga as null,fa as nullable,la as number,ya as object,Sa as optional,xa as overwrite,yo as parse,So as parseAsync,vt as parseURLObject,$a as pipe,xo as positive,qs as process,tt as processSchema,Fa as promise,va as property,ja as readonly,ba as record,Ia as refine,$o as regex,Fo as safeDecode,vo as safeDecodeAsync,jo as safeEncode,bo as safeEncodeAsync,Io as safeParse,ho as safeParseAsync,ha as set,Co as size,Uo as slugify,nt as standardProps,To as startsWith,Ca as string,Eo as stringFormat,Ua as stringbool,jt as stripTabAndNewline,ka as success,Ta as superRefine,Ea as symbol,La as templateLiteral,Qs as toDotPath,_o as toJSONSchema,Lo as toLowerCase,Do as toUpperCase,Da as transform,Bo as trim,Ba as tuple,No as uint32,Po as uint64,Ao as ulid,Na as undefined,Pa as union,Aa as unknown,Ro as uppercase,Oo as url,$t as urlHostnameOk,Ft as urlProtocolOk,wo as uuid,ko as uuidv4,zo as uuidv6,Mo as uuidv7,st as validateURL,vr as version,Ra as void,Jo as xid,Oa as xor};
package/dist/v4/index.js CHANGED
@@ -1 +1 @@
1
- export{$brand,$input,$output,NEVER,TimePrecision,ZodFirstPartyTypeKind,ZodIssueCode,ZodLikeError,_ZodString,_function,any,array,base64,base64Bytes,base64url,bigint,boolean,catch,check,cidrv4,cidrv6,clone,codec,coerce,config,core,createLogger,createNoOpLogger,creditCard,cuid,cuid2,custom,date,decode,decodeAsync,deepPartial,default,describe,disableLogging,discriminatedUnion,e164,email,emoji,enableDebug,encode,encodeAsync,endsWith,enum,exactOptional,file,float32,float64,formatError,fromJSONSchema,_function as function,getErrorMap,getLogger,gt,gte,guid,hash,hex,hexBytes,hostname,httpUrl,includes,initLogger,input,instanceof,int,int32,int64,intersection,ipv4,ipv6,iso,json,jwt,keyof,ksuid,lazy,length,literal,locales,looseObject,looseRecord,lowercase,lt,lte,mac,map,mapSchema,maxLength,maxSize,meta,mime,minLength,minSize,multipleOf,nan,nanoid,nativeEnum,negative,never,nonnegative,nonoptional,nonpositive,normalize,null,nullable,nullish,number,object,optional,output,overwrite,parse,parseAsync,partialRecord,pipe,positive,prefault,preprocess,promise,property,readonly,record,refine,regex,regexes,safeDecode,safeDecodeAsync,safeEncode,safeEncodeAsync,safeParse,safeParseAsync,set,setErrorMap,setLogLevel,size,slugify,startsWith,strictObject,string,stringFormat,stringbool,superRefine,symbol,templateLiteral,toJSONSchema,toLowerCase,toUpperCase,toZodError,toZodSafeResult,transform,trim,tuple,uint32,uint64,uint8Array,ulid,undefined,union,unknown,uppercase,url,util,uuid,uuidv4,uuidv6,uuidv7,default as v,vV2,void,xid,xor,z}from"../index.js";export{ZodCompileAsyncError,ZodCompileError,ZodCompileUnsupportedError,compile,getDiscriminatedOption,memoizer,properties,toZod,validate,validateAsync,compileFn as zodCompileFn}from"../compile.js";export{Err,Ok,ResultUtils,all,failure,flatMap,fromNullable,isErr,isOk,isResult,mapErr,match,success,tryCatch,tryCatchAsync,unwrap,unwrapOr}from"../compat/result.js";export{VldBase,VldMeta,VldBrand as ZodBranded,VldCatch as ZodCatch,VldDefault as ZodDefault,VldExactOptional as ZodExactOptional,VldMeta as ZodMeta,VldRefine as ZodNonOptional,VldNullable as ZodNullable,VldOptional as ZodOptional,VldPipe as ZodPipe,VldPrefault as ZodPrefault,VldPreprocess as ZodPreprocess,VldReadonly as ZodReadonly,VldTransform as ZodTransform,VldBase as ZodType}from"../validators/base.js";export{V as VldError,V as ZodError,V as ZodRealError}from"../chunks/errors-core-BU14-Dk8.js";export{VldIntersection,VldIntersection as ZodIntersection}from"../validators/intersection.js";export{VldAny as ZodAny}from"../validators/any.js";export{VldArray as ZodArray}from"../validators/array.js";export{VldStringFormat as ZodBase64,VldStringFormat as ZodBase64URL,VldStringFormat as ZodCIDRv4,VldStringFormat as ZodCIDRv6,VldStringFormat as ZodCUID,VldStringFormat as ZodCUID2,VldStringFormat as ZodCreditCard,VldStringFormat as ZodCustomStringFormat,VldStringFormat as ZodE164,VldStringFormat as ZodEmail,VldStringFormat as ZodEmoji,VldStringFormat as ZodGUID,VldStringFormat as ZodIPv4,VldStringFormat as ZodIPv6,VldStringFormat as ZodISODate,VldStringFormat as ZodISODateTime,VldStringFormat as ZodISODuration,VldStringFormat as ZodISOTime,VldStringFormat as ZodJWT,VldStringFormat as ZodKSUID,VldStringFormat as ZodMAC,VldStringFormat as ZodNanoID,VldStringFormat as ZodStringFormat,VldStringFormat as ZodULID,VldStringFormat as ZodURL,VldStringFormat as ZodUUID,VldStringFormat as ZodXID}from"../validators/string-formats.js";export{VldBigInt as ZodBigInt,VldBigInt as ZodBigIntFormat}from"../validators/bigint.js";export{VldBoolean as ZodBoolean}from"../validators/boolean.js";export{VldCodec as ZodCodec}from"../validators/codec.js";export{VldCustom as ZodCustom,VldCustom as ZodSuccess}from"../validators/custom.js";export{VldDate as ZodDate}from"../validators/date.js";export{VldDiscriminatedUnion as ZodDiscriminatedUnion}from"../validators/discriminated-union.js";export{VldEnum as ZodEnum}from"../validators/enum.js";export{VldFile as ZodFile}from"../validators/file.js";export{VldFunction as ZodFunction}from"../validators/function.js";export{VldJson as ZodJSON}from"../validators/json.js";export{VldLazy as ZodLazy}from"../validators/lazy.js";export{VldLiteral as ZodLiteral}from"../validators/literal.js";export{VldMap as ZodMap}from"../validators/map.js";export{VldNan as ZodNaN}from"../validators/nan.js";export{VldNever as ZodNever}from"../validators/never.js";export{VldNull as ZodNull}from"../validators/null.js";export{VldNumber as ZodNumber,VldNumber as ZodNumberFormat}from"../validators/number.js";export{VldObject as ZodObject}from"../validators/object.js";export{VldPromise as ZodPromise}from"../validators/promise.js";export{VldRecord as ZodRecord}from"../validators/record.js";export{VldSet as ZodSet}from"../validators/set.js";export{VldString as ZodString}from"../validators/string.js";export{VldSymbol as ZodSymbol}from"../validators/symbol.js";export{VldTemplateLiteral as ZodTemplateLiteral}from"../validators/template-literal.js";export{VldTuple as ZodTuple}from"../validators/tuple.js";export{VldUndefined as ZodUndefined}from"../validators/undefined.js";export{VldUnion as ZodUnion}from"../validators/union.js";export{VldUnknown as ZodUnknown}from"../validators/unknown.js";export{VldVoid as ZodVoid}from"../validators/void.js";export{VldXor as ZodXor}from"../validators/xor.js";export{b as base64Json,a as base64ToBytes,c as base64ToUint8Array,d as base64UrlToBytes,e as base64urlToBytes,f as bytesToUtf8,g as epochMillisToDate,h as epochSecondsToDate,i as hexLowerToBytes,j as hexToBytes,k as hexToUint8Array,l as invertCodec,m as isoDatetimeToDate,n as jsonCodec,o as jwtPayload,p as numberToBigInt,s as stringToBigInt,q as stringToBoolean,r as stringToHttpURL,t as stringToInt,u as stringToNumber,v as stringToURL,w as stringToUint8Array,x as uint8ArrayToBase64,y as uint8ArrayToBase64Url,z as uint8ArrayToHex,A as uint8ArrayToString,B as uriComponent,C as utf8ToBytes}from"../chunks/index-CkbfQQ4n.js";export{blue,bold,createTheme,cyan,dim,gray,green,grey,italic,magenta,default as pigment,red,strip,supportsColor,underline,vldTheme,white,yellow}from"../pigment.js";export{createEmitter,createEventBus,withEmitter}from"../compat/emitter.js";export{createVldKernel,definePlugin,getVldKernel,resetVldKernel,usePlugin}from"../kernel.js";export{flattenError,prettifyError,prettifyErrorColored,prettifyErrorPlain,treeifyError}from"../errors.js";export{getLocale,getMessages,getSupportedLocales,isLocaleLoaded,isLocaleSupported,registerLocale,setLocale}from"../locales/runtime.js";export{globalRegistry,registry}from"../registry.js";export{s as setLocaleAsync}from"../chunks/index-CKPStM3V.js";const Z=(o,r)=>o.default("function"==typeof r?r():r);export{Z as _default};
1
+ export{$brand,$input,$output,NEVER,TimePrecision,ZodFirstPartyTypeKind,ZodIssueCode,ZodLikeError,_ZodString,_function,any,array,base64,base64Bytes,base64url,bigint,boolean,catch,check,cidrv4,cidrv6,clone,codec,coerce,config,core,createLogger,createNoOpLogger,creditCard,cuid,cuid2,currencyCode,custom,date,decode,decodeAsync,deepPartial,default,describe,disableLogging,discriminatedUnion,e164,email,emoji,enableDebug,encode,encodeAsync,endsWith,enum,exactOptional,file,float32,float64,formatError,fromJSONSchema,_function as function,getErrorMap,getLogger,gt,gte,guid,hash,hex,hexBytes,hostname,httpUrl,iban,includes,initLogger,input,instanceof,int,int32,int64,intersection,ipv4,ipv6,iso,json,jwt,keyof,ksuid,lazy,length,literal,locales,looseObject,looseRecord,lowercase,lt,lte,mac,map,mapSchema,maxLength,maxSize,meta,mime,minLength,minSize,multipleOf,nan,nanoid,nativeEnum,negative,never,nonnegative,nonoptional,nonpositive,normalize,null,nullable,nullish,number,object,optional,output,overwrite,parse,parseAsync,partialRecord,pipe,positive,prefault,preprocess,promise,property,readonly,record,refine,regex,regexes,safeDecode,safeDecodeAsync,safeEncode,safeEncodeAsync,safeParse,safeParseAsync,set,setErrorMap,setLogLevel,size,slugify,startsWith,strictObject,string,stringFormat,stringbool,superRefine,symbol,templateLiteral,toJSONSchema,toLowerCase,toUpperCase,toZodError,toZodSafeResult,transform,trim,tuple,uint32,uint64,uint8Array,ulid,undefined,union,unknown,uppercase,url,util,uuid,uuidv4,uuidv6,uuidv7,default as v,vV2,void,xid,xor,z}from"../index.js";export{COMPILE_INVALID,COMPILE_INVALID as INVALID,ZodCompileAsyncError,ZodCompileError,ZodCompileUnsupportedError,compile,getDiscriminatedOption,memoizer,properties,toZod,validate,validateAsync,withParser,compileFn as zodCompileFn}from"../compile.js";export{Err,Ok,ResultUtils,all,failure,flatMap,fromNullable,isErr,isOk,isResult,mapErr,match,success,tryCatch,tryCatchAsync,unwrap,unwrapOr}from"../compat/result.js";export{VldBase,VldMeta,VldBrand as ZodBranded,VldCatch as ZodCatch,VldDefault as ZodDefault,VldExactOptional as ZodExactOptional,VldMeta as ZodMeta,VldRefine as ZodNonOptional,VldNullable as ZodNullable,VldOptional as ZodOptional,VldPipe as ZodPipe,VldPrefault as ZodPrefault,VldPreprocess as ZodPreprocess,VldReadonly as ZodReadonly,VldTransform as ZodTransform,VldBase as ZodType}from"../validators/base.js";export{V as VldError,V as ZodError,V as ZodRealError}from"../chunks/errors-core-BU14-Dk8.js";export{VldIntersection,VldIntersection as ZodIntersection}from"../validators/intersection.js";export{VldAny as ZodAny}from"../validators/any.js";export{VldArray as ZodArray}from"../validators/array.js";export{VldStringFormat as ZodBase64,VldStringFormat as ZodBase64URL,VldStringFormat as ZodCIDRv4,VldStringFormat as ZodCIDRv6,VldStringFormat as ZodCUID,VldStringFormat as ZodCUID2,VldStringFormat as ZodCreditCard,VldStringFormat as ZodCustomStringFormat,VldStringFormat as ZodE164,VldStringFormat as ZodEmail,VldStringFormat as ZodEmoji,VldStringFormat as ZodGUID,VldStringFormat as ZodIBAN,VldStringFormat as ZodIPv4,VldStringFormat as ZodIPv6,VldStringFormat as ZodISODate,VldStringFormat as ZodISODateTime,VldStringFormat as ZodISODuration,VldStringFormat as ZodISOTime,VldStringFormat as ZodJWT,VldStringFormat as ZodKSUID,VldStringFormat as ZodMAC,VldStringFormat as ZodNanoID,VldStringFormat as ZodStringFormat,VldStringFormat as ZodULID,VldStringFormat as ZodURL,VldStringFormat as ZodUUID,VldStringFormat as ZodXID,isValidIBAN}from"../validators/string-formats.js";export{VldBigInt as ZodBigInt,VldBigInt as ZodBigIntFormat}from"../validators/bigint.js";export{VldBoolean as ZodBoolean}from"../validators/boolean.js";export{VldCodec as ZodCodec}from"../validators/codec.js";export{VldCustom as ZodCustom,VldInstance as ZodInstanceOf,VldCustom as ZodSuccess}from"../validators/custom.js";export{VldDate as ZodDate}from"../validators/date.js";export{VldDiscriminatedUnion as ZodDiscriminatedUnion}from"../validators/discriminated-union.js";export{VldEnum as ZodEnum}from"../validators/enum.js";export{VldFile as ZodFile}from"../validators/file.js";export{VldFunction as ZodFunction}from"../validators/function.js";export{VldJson as ZodJSON}from"../validators/json.js";export{VldLazy as ZodLazy}from"../validators/lazy.js";export{VldLiteral as ZodLiteral}from"../validators/literal.js";export{VldMap as ZodMap}from"../validators/map.js";export{VldNan as ZodNaN}from"../validators/nan.js";export{VldNever as ZodNever}from"../validators/never.js";export{VldNull as ZodNull}from"../validators/null.js";export{VldNumber as ZodNumber,VldNumber as ZodNumberFormat}from"../validators/number.js";export{VldObject as ZodObject}from"../validators/object.js";export{VldPromise as ZodPromise}from"../validators/promise.js";export{VldRecord as ZodRecord}from"../validators/record.js";export{VldSet as ZodSet}from"../validators/set.js";export{VldString as ZodString}from"../validators/string.js";export{VldSymbol as ZodSymbol}from"../validators/symbol.js";export{VldTemplateLiteral as ZodTemplateLiteral}from"../validators/template-literal.js";export{VldTuple as ZodTuple}from"../validators/tuple.js";export{VldUndefined as ZodUndefined}from"../validators/undefined.js";export{VldUnion as ZodUnion}from"../validators/union.js";export{VldUnknown as ZodUnknown}from"../validators/unknown.js";export{VldVoid as ZodVoid}from"../validators/void.js";export{VldXor as ZodXor}from"../validators/xor.js";export{b as base64Json,a as base64ToBytes,c as base64ToUint8Array,d as base64UrlToBytes,e as base64urlToBytes,f as bytesToUtf8,g as epochMillisToDate,h as epochSecondsToDate,i as hexLowerToBytes,j as hexToBytes,k as hexToUint8Array,l as invertCodec,m as isoDatetimeToDate,n as jsonCodec,o as jwtPayload,p as numberToBigInt,s as stringToBigInt,q as stringToBoolean,r as stringToHttpURL,t as stringToInt,u as stringToNumber,v as stringToURL,w as stringToUint8Array,x as uint8ArrayToBase64,y as uint8ArrayToBase64Url,z as uint8ArrayToHex,A as uint8ArrayToString,B as uriComponent,C as utf8ToBytes}from"../chunks/index-CkbfQQ4n.js";export{blue,bold,createTheme,cyan,dim,gray,green,grey,italic,magenta,default as pigment,red,strip,supportsColor,underline,vldTheme,white,yellow}from"../pigment.js";export{createEmitter,createEventBus,withEmitter}from"../compat/emitter.js";export{createVldKernel,definePlugin,getVldKernel,resetVldKernel,usePlugin}from"../kernel.js";export{flattenError,prettifyError,prettifyErrorColored,prettifyErrorPlain,treeifyError}from"../errors.js";export{getLocale,getMessages,getSupportedLocales,isLocaleLoaded,isLocaleSupported,registerLocale,setLocale}from"../locales/runtime.js";export{globalRegistry,registry}from"../registry.js";export{s as setLocaleAsync}from"../chunks/index-Bn85LHAC.js";const Z=(o,r)=>o.default("function"==typeof r?r():r);export{Z as _default};
@@ -49,6 +49,7 @@ export declare const ru: () => LocaleMessages;
49
49
  export declare const sk: () => LocaleMessages;
50
50
  export declare const sl: () => LocaleMessages;
51
51
  export declare const sv: () => LocaleMessages;
52
+ export declare const tg: () => LocaleMessages;
52
53
  export declare const ta: () => LocaleMessages;
53
54
  export declare const th: () => LocaleMessages;
54
55
  export declare const tk: () => LocaleMessages;
@@ -1 +1 @@
1
- import{ar as o}from"../../locales/ar.js";import{bn as s}from"../../locales/bn.js";import{da as r}from"../../locales/da.js";import{de as a}from"../../locales/de.js";import{en as l}from"../../locales/en.js";import{es as m}from"../../locales/es.js";import{fi as t}from"../../locales/fi.js";import{fr as i}from"../../locales/fr.js";import{gu as e}from"../../locales/gu.js";import{hi as p}from"../../locales/hi.js";import{id as f}from"../../locales/id.js";import{it as j}from"../../locales/it.js";import{ja as c}from"../../locales/ja.js";import{kn as n}from"../../locales/kn.js";import{ko as d}from"../../locales/ko.js";import{ne as k}from"../../locales/ne.js";import{nl as h}from"../../locales/nl.js";import{no as v}from"../../locales/no.js";import{pl as u}from"../../locales/pl.js";import{pt as b}from"../../locales/pt.js";import{ptBR as g}from"../../locales/pt-BR-v4.js";import{ru as B}from"../../locales/ru.js";import{sk as R}from"../../locales/sk.js";import{sv as x}from"../../locales/sv.js";import{th as z}from"../../locales/th.js";import{tr as q}from"../../locales/tr.js";import{vi as w}from"../../locales/vi.js";import{zh as y}from"../../locales/zh.js";const A=()=>l,C=()=>o,D=A,E=A,F=A,G=()=>s,H=A,I=A,J=A,K=()=>r,L=()=>a,M=A,N=()=>l,O=A,P=()=>m,Q=A,S=()=>t,T=()=>i,U=()=>i,V=()=>e,W=A,X=()=>p,Y=A,Z=A,$=A,_=()=>f,oo=A,so=()=>j,ro=()=>c,ao=A,lo=A,mo=A,to=()=>n,io=()=>d,eo=A,po=A,fo=A,jo=()=>k,co=()=>h,no=A,ko=()=>v,ho=A,vo=()=>u,uo=A,bo=()=>b,go=()=>g,Bo=A,Ro=()=>B,xo=()=>R,zo=A,qo=()=>x,wo=A,yo=()=>z,Ao=A,Co=()=>q,Do=A,Eo=A,Fo=A,Go=A,Ho=()=>w,Io=A,Jo=()=>y,Ko=()=>y;export{C as ar,D as az,E as be,F as bg,G as bn,H as ca,I as ckb,J as cs,K as da,L as de,M as el,N as en,O as eo,P as es,Q as fa,S as fi,T as fr,U as frCA,V as gu,W as he,X as hi,Y as hr,Z as hu,$ as hy,_ as id,oo as is,so as it,ro as ja,ao as ka,lo as kh,mo as km,to as kn,io as ko,eo as lt,po as mk,fo as ms,jo as ne,co as nl,no as nn,ko as no,ho as ota,vo as pl,uo as ps,bo as pt,go as ptBR,Bo as ro,Ro as ru,xo as sk,zo as sl,qo as sv,wo as ta,yo as th,Ao as tk,Co as tr,Do as ua,Eo as uk,Fo as ur,Go as uz,Ho as vi,Io as yo,Jo as zhCN,Ko as zhTW};
1
+ import{ar as o}from"../../locales/ar.js";import{bn as s}from"../../locales/bn.js";import{da as r}from"../../locales/da.js";import{de as a}from"../../locales/de.js";import{en as l}from"../../locales/en.js";import{es as m}from"../../locales/es.js";import{fi as t}from"../../locales/fi.js";import{fr as i}from"../../locales/fr.js";import{gu as e}from"../../locales/gu.js";import{hi as p}from"../../locales/hi.js";import{id as f}from"../../locales/id.js";import{it as j}from"../../locales/it.js";import{ja as c}from"../../locales/ja.js";import{kn as n}from"../../locales/kn.js";import{ko as d}from"../../locales/ko.js";import{ne as k}from"../../locales/ne.js";import{nl as h}from"../../locales/nl.js";import{no as v}from"../../locales/no.js";import{pl as g}from"../../locales/pl.js";import{pt as u}from"../../locales/pt.js";import{ptBR as b}from"../../locales/pt-BR-v4.js";import{ru as B}from"../../locales/ru.js";import{sk as R}from"../../locales/sk.js";import{sv as x}from"../../locales/sv.js";import{tg as z}from"../../locales/tg.js";import{th as q}from"../../locales/th.js";import{tr as w}from"../../locales/tr.js";import{vi as y}from"../../locales/vi.js";import{zh as A}from"../../locales/zh.js";const C=()=>l,D=()=>o,E=C,F=C,G=C,H=()=>s,I=C,J=C,K=C,L=()=>r,M=()=>a,N=C,O=()=>l,P=C,Q=()=>m,S=C,T=()=>t,U=()=>i,V=()=>i,W=()=>e,X=C,Y=()=>p,Z=C,$=C,_=C,oo=()=>f,so=C,ro=()=>j,ao=()=>c,lo=C,mo=C,to=C,io=()=>n,eo=()=>d,po=C,fo=C,jo=C,co=()=>k,no=()=>h,ko=C,ho=()=>v,vo=C,go=()=>g,uo=C,bo=()=>u,Bo=()=>b,Ro=C,xo=()=>B,zo=()=>R,qo=C,wo=()=>x,yo=()=>z,Ao=C,Co=()=>q,Do=C,Eo=()=>w,Fo=C,Go=C,Ho=C,Io=C,Jo=()=>y,Ko=C,Lo=()=>A,Mo=()=>A;export{D as ar,E as az,F as be,G as bg,H as bn,I as ca,J as ckb,K as cs,L as da,M as de,N as el,O as en,P as eo,Q as es,S as fa,T as fi,U as fr,V as frCA,W as gu,X as he,Y as hi,Z as hr,$ as hu,_ as hy,oo as id,so as is,ro as it,ao as ja,lo as ka,mo as kh,to as km,io as kn,eo as ko,po as lt,fo as mk,jo as ms,co as ne,no as nl,ko as nn,ho as no,vo as ota,go as pl,uo as ps,bo as pt,Bo as ptBR,Ro as ro,xo as ru,zo as sk,qo as sl,wo as sv,Ao as ta,yo as tg,Co as th,Do as tk,Eo as tr,Fo as ua,Go as uk,Ho as ur,Io as uz,Jo as vi,Ko as yo,Lo as zhCN,Mo as zhTW};
@@ -1 +1 @@
1
- export{_default,catchall,exactPartial,extend,maximum,merge,minimum,omit,partial,pick,required,safeExtend}from"../../v4-mini/index.js";export{$brand,$input,$output,NEVER,TimePrecision,ZodFirstPartyTypeKind,ZodIssueCode,ZodLikeError,_ZodString,_function,any,array,base64,base64Bytes,base64url,bigint,boolean,catch,check,cidrv4,cidrv6,clone,codec,coerce,config,core,createLogger,createNoOpLogger,creditCard,cuid,cuid2,custom,date,decode,decodeAsync,deepPartial,default,describe,disableLogging,discriminatedUnion,e164,email,emoji,enableDebug,encode,encodeAsync,endsWith,enum,exactOptional,file,float32,float64,formatError,fromJSONSchema,_function as function,getErrorMap,getLogger,gt,gte,guid,hash,hex,hexBytes,hostname,httpUrl,includes,initLogger,input,instanceof,int,int32,int64,intersection,ipv4,ipv6,iso,json,jwt,keyof,ksuid,lazy,length,literal,locales,looseObject,looseRecord,lowercase,lt,lte,mac,map,mapSchema,maxLength,maxSize,meta,mime,minLength,minSize,multipleOf,nan,nanoid,nativeEnum,negative,never,nonnegative,nonoptional,nonpositive,normalize,null,nullable,nullish,number,object,optional,output,overwrite,parse,parseAsync,partialRecord,pipe,positive,prefault,preprocess,promise,property,readonly,record,refine,regex,regexes,safeDecode,safeDecodeAsync,safeEncode,safeEncodeAsync,safeParse,safeParseAsync,set,setErrorMap,setLogLevel,size,slugify,startsWith,strictObject,string,stringFormat,stringbool,superRefine,symbol,templateLiteral,toJSONSchema,toLowerCase,toUpperCase,toZodError,toZodSafeResult,transform,trim,tuple,uint32,uint64,uint8Array,ulid,undefined,union,unknown,uppercase,url,util,uuid,uuidv4,uuidv6,uuidv7,default as v,vV2,void,xid,xor,z}from"../../index.js";export{Err,Ok,ResultUtils,all,failure,flatMap,fromNullable,isErr,isOk,isResult,mapErr,match,success,tryCatch,tryCatchAsync,unwrap,unwrapOr}from"../../compat/result.js";export{VldBase,VldMeta,VldBrand as ZodBranded,VldCatch as ZodCatch,VldDefault as ZodDefault,VldExactOptional as ZodExactOptional,VldMeta as ZodMeta,VldBrand as ZodMiniBrand,VldCatch as ZodMiniCatch,VldDefault as ZodMiniDefault,VldExactOptional as ZodMiniExactOptional,VldRefine as ZodMiniNonOptional,VldNullable as ZodMiniNullable,VldOptional as ZodMiniOptional,VldPipe as ZodMiniPipe,VldPrefault as ZodMiniPrefault,VldReadonly as ZodMiniReadonly,VldTransform as ZodMiniTransform,VldBase as ZodMiniType,VldRefine as ZodNonOptional,VldNullable as ZodNullable,VldOptional as ZodOptional,VldPipe as ZodPipe,VldPrefault as ZodPrefault,VldPreprocess as ZodPreprocess,VldReadonly as ZodReadonly,VldTransform as ZodTransform,VldBase as ZodType}from"../../validators/base.js";export{V as VldError,V as ZodError,V as ZodRealError}from"../../chunks/errors-core-BU14-Dk8.js";export{VldIntersection,VldIntersection as ZodIntersection,VldIntersection as ZodMiniIntersection}from"../../validators/intersection.js";export{VldAny as ZodAny,VldAny as ZodMiniAny}from"../../validators/any.js";export{VldArray as ZodArray,VldArray as ZodMiniArray}from"../../validators/array.js";export{VldStringFormat as ZodBase64,VldStringFormat as ZodBase64URL,VldStringFormat as ZodCIDRv4,VldStringFormat as ZodCIDRv6,VldStringFormat as ZodCUID,VldStringFormat as ZodCUID2,VldStringFormat as ZodCreditCard,VldStringFormat as ZodCustomStringFormat,VldStringFormat as ZodE164,VldStringFormat as ZodEmail,VldStringFormat as ZodEmoji,VldStringFormat as ZodGUID,VldStringFormat as ZodIPv4,VldStringFormat as ZodIPv6,VldStringFormat as ZodISODate,VldStringFormat as ZodISODateTime,VldStringFormat as ZodISODuration,VldStringFormat as ZodISOTime,VldStringFormat as ZodJWT,VldStringFormat as ZodKSUID,VldStringFormat as ZodMAC,VldStringFormat as ZodMiniBase64,VldStringFormat as ZodMiniBase64URL,VldStringFormat as ZodMiniCIDRv4,VldStringFormat as ZodMiniCIDRv6,VldStringFormat as ZodMiniCUID,VldStringFormat as ZodMiniCUID2,VldStringFormat as ZodMiniCreditCard,VldStringFormat as ZodMiniCustomStringFormat,VldStringFormat as ZodMiniE164,VldStringFormat as ZodMiniEmail,VldStringFormat as ZodMiniEmoji,VldStringFormat as ZodMiniGUID,VldStringFormat as ZodMiniIPv4,VldStringFormat as ZodMiniIPv6,VldStringFormat as ZodMiniISODate,VldStringFormat as ZodMiniISODateTime,VldStringFormat as ZodMiniISODuration,VldStringFormat as ZodMiniISOTime,VldStringFormat as ZodMiniJWT,VldStringFormat as ZodMiniKSUID,VldStringFormat as ZodMiniMAC,VldStringFormat as ZodMiniNanoID,VldStringFormat as ZodMiniStringFormat,VldStringFormat as ZodMiniULID,VldStringFormat as ZodMiniURL,VldStringFormat as ZodMiniUUID,VldStringFormat as ZodMiniXID,VldStringFormat as ZodNanoID,VldStringFormat as ZodStringFormat,VldStringFormat as ZodULID,VldStringFormat as ZodURL,VldStringFormat as ZodUUID,VldStringFormat as ZodXID}from"../../validators/string-formats.js";export{VldBigInt as ZodBigInt,VldBigInt as ZodBigIntFormat,VldBigInt as ZodMiniBigInt,VldBigInt as ZodMiniBigIntFormat}from"../../validators/bigint.js";export{VldBoolean as ZodBoolean,VldBoolean as ZodMiniBoolean}from"../../validators/boolean.js";export{VldCodec as ZodCodec,VldCodec as ZodMiniCodec}from"../../validators/codec.js";export{ZodCompileAsyncError,ZodCompileError,ZodCompileUnsupportedError,compile,getDiscriminatedOption,memoizer,properties,toZod,validate,validateAsync,compileFn as zodCompileFn}from"../../compile.js";export{VldCustom as ZodCustom,VldCustom as ZodMiniCustom,VldCustom as ZodMiniSuccess,VldCustom as ZodSuccess}from"../../validators/custom.js";export{VldDate as ZodDate,VldDate as ZodMiniDate}from"../../validators/date.js";export{VldDiscriminatedUnion as ZodDiscriminatedUnion,VldDiscriminatedUnion as ZodMiniDiscriminatedUnion}from"../../validators/discriminated-union.js";export{VldEnum as ZodEnum,VldEnum as ZodMiniEnum}from"../../validators/enum.js";export{VldFile as ZodFile,VldFile as ZodMiniFile}from"../../validators/file.js";export{VldFunction as ZodFunction,VldFunction as ZodMiniFunction}from"../../validators/function.js";export{VldJson as ZodJSON}from"../../validators/json.js";export{VldLazy as ZodLazy,VldLazy as ZodMiniLazy}from"../../validators/lazy.js";export{VldLiteral as ZodLiteral,VldLiteral as ZodMiniLiteral}from"../../validators/literal.js";export{VldMap as ZodMap,VldMap as ZodMiniMap}from"../../validators/map.js";export{VldNan as ZodMiniNaN,VldNan as ZodNaN}from"../../validators/nan.js";export{VldNever as ZodMiniNever,VldNever as ZodNever}from"../../validators/never.js";export{VldNull as ZodMiniNull,VldNull as ZodNull}from"../../validators/null.js";export{VldNumber as ZodMiniNumber,VldNumber as ZodMiniNumberFormat,VldNumber as ZodNumber,VldNumber as ZodNumberFormat}from"../../validators/number.js";export{VldObject as ZodMiniObject,VldObject as ZodObject}from"../../validators/object.js";export{VldPromise as ZodMiniPromise,VldPromise as ZodPromise}from"../../validators/promise.js";export{VldRecord as ZodMiniRecord,VldRecord as ZodRecord}from"../../validators/record.js";export{VldSet as ZodMiniSet,VldSet as ZodSet}from"../../validators/set.js";export{VldString as ZodMiniString,VldString as ZodString}from"../../validators/string.js";export{VldSymbol as ZodMiniSymbol,VldSymbol as ZodSymbol}from"../../validators/symbol.js";export{VldTemplateLiteral as ZodMiniTemplateLiteral,VldTemplateLiteral as ZodTemplateLiteral}from"../../validators/template-literal.js";export{VldTuple as ZodMiniTuple,VldTuple as ZodTuple}from"../../validators/tuple.js";export{VldUndefined as ZodMiniUndefined,VldUndefined as ZodUndefined}from"../../validators/undefined.js";export{VldUnion as ZodMiniUnion,VldUnion as ZodUnion}from"../../validators/union.js";export{VldUnknown as ZodMiniUnknown,VldUnknown as ZodUnknown}from"../../validators/unknown.js";export{VldVoid as ZodMiniVoid,VldVoid as ZodVoid}from"../../validators/void.js";export{VldXor as ZodMiniXor,VldXor as ZodXor}from"../../validators/xor.js";export{b as base64Json,a as base64ToBytes,c as base64ToUint8Array,d as base64UrlToBytes,e as base64urlToBytes,f as bytesToUtf8,g as epochMillisToDate,h as epochSecondsToDate,i as hexLowerToBytes,j as hexToBytes,k as hexToUint8Array,l as invertCodec,m as isoDatetimeToDate,n as jsonCodec,o as jwtPayload,p as numberToBigInt,s as stringToBigInt,q as stringToBoolean,r as stringToHttpURL,t as stringToInt,u as stringToNumber,v as stringToURL,w as stringToUint8Array,x as uint8ArrayToBase64,y as uint8ArrayToBase64Url,z as uint8ArrayToHex,A as uint8ArrayToString,B as uriComponent,C as utf8ToBytes}from"../../chunks/index-CkbfQQ4n.js";export{blue,bold,createTheme,cyan,dim,gray,green,grey,italic,magenta,default as pigment,red,strip,supportsColor,underline,vldTheme,white,yellow}from"../../pigment.js";export{createEmitter,createEventBus,withEmitter}from"../../compat/emitter.js";export{createVldKernel,definePlugin,getVldKernel,resetVldKernel,usePlugin}from"../../kernel.js";export{flattenError,prettifyError,prettifyErrorColored,prettifyErrorPlain,treeifyError}from"../../errors.js";export{getLocale,getMessages,getSupportedLocales,isLocaleLoaded,isLocaleSupported,registerLocale,setLocale}from"../../locales/runtime.js";export{globalRegistry,registry}from"../../registry.js";export{s as setLocaleAsync}from"../../chunks/index-CKPStM3V.js";
1
+ export{_default,catchall,exactPartial,extend,maximum,merge,minimum,omit,partial,pick,required,safeExtend}from"../../v4-mini/index.js";export{$brand,$input,$output,NEVER,TimePrecision,ZodFirstPartyTypeKind,ZodIssueCode,ZodLikeError,_ZodString,_function,any,array,base64,base64Bytes,base64url,bigint,boolean,catch,check,cidrv4,cidrv6,clone,codec,coerce,config,core,createLogger,createNoOpLogger,creditCard,cuid,cuid2,currencyCode,custom,date,decode,decodeAsync,deepPartial,default,describe,disableLogging,discriminatedUnion,e164,email,emoji,enableDebug,encode,encodeAsync,endsWith,enum,exactOptional,file,float32,float64,formatError,fromJSONSchema,_function as function,getErrorMap,getLogger,gt,gte,guid,hash,hex,hexBytes,hostname,httpUrl,iban,includes,initLogger,input,instanceof,int,int32,int64,intersection,ipv4,ipv6,iso,json,jwt,keyof,ksuid,lazy,length,literal,locales,looseObject,looseRecord,lowercase,lt,lte,mac,map,mapSchema,maxLength,maxSize,meta,mime,minLength,minSize,multipleOf,nan,nanoid,nativeEnum,negative,never,nonnegative,nonoptional,nonpositive,normalize,null,nullable,nullish,number,object,optional,output,overwrite,parse,parseAsync,partialRecord,pipe,positive,prefault,preprocess,promise,property,readonly,record,refine,regex,regexes,safeDecode,safeDecodeAsync,safeEncode,safeEncodeAsync,safeParse,safeParseAsync,set,setErrorMap,setLogLevel,size,slugify,startsWith,strictObject,string,stringFormat,stringbool,superRefine,symbol,templateLiteral,toJSONSchema,toLowerCase,toUpperCase,toZodError,toZodSafeResult,transform,trim,tuple,uint32,uint64,uint8Array,ulid,undefined,union,unknown,uppercase,url,util,uuid,uuidv4,uuidv6,uuidv7,default as v,vV2,void,xid,xor,z}from"../../index.js";export{COMPILE_INVALID,COMPILE_INVALID as INVALID,ZodCompileAsyncError,ZodCompileError,ZodCompileUnsupportedError,compile,getDiscriminatedOption,memoizer,properties,toZod,validate,validateAsync,withParser,compileFn as zodCompileFn}from"../../compile.js";export{Err,Ok,ResultUtils,all,failure,flatMap,fromNullable,isErr,isOk,isResult,mapErr,match,success,tryCatch,tryCatchAsync,unwrap,unwrapOr}from"../../compat/result.js";export{VldBase,VldMeta,VldBrand as ZodBranded,VldCatch as ZodCatch,VldDefault as ZodDefault,VldExactOptional as ZodExactOptional,VldMeta as ZodMeta,VldBrand as ZodMiniBrand,VldCatch as ZodMiniCatch,VldDefault as ZodMiniDefault,VldExactOptional as ZodMiniExactOptional,VldRefine as ZodMiniNonOptional,VldNullable as ZodMiniNullable,VldOptional as ZodMiniOptional,VldPipe as ZodMiniPipe,VldPrefault as ZodMiniPrefault,VldReadonly as ZodMiniReadonly,VldTransform as ZodMiniTransform,VldBase as ZodMiniType,VldRefine as ZodNonOptional,VldNullable as ZodNullable,VldOptional as ZodOptional,VldPipe as ZodPipe,VldPrefault as ZodPrefault,VldPreprocess as ZodPreprocess,VldReadonly as ZodReadonly,VldTransform as ZodTransform,VldBase as ZodType}from"../../validators/base.js";export{V as VldError,V as ZodError,V as ZodRealError}from"../../chunks/errors-core-BU14-Dk8.js";export{VldIntersection,VldIntersection as ZodIntersection,VldIntersection as ZodMiniIntersection}from"../../validators/intersection.js";export{VldAny as ZodAny,VldAny as ZodMiniAny}from"../../validators/any.js";export{VldArray as ZodArray,VldArray as ZodMiniArray}from"../../validators/array.js";export{VldStringFormat as ZodBase64,VldStringFormat as ZodBase64URL,VldStringFormat as ZodCIDRv4,VldStringFormat as ZodCIDRv6,VldStringFormat as ZodCUID,VldStringFormat as ZodCUID2,VldStringFormat as ZodCreditCard,VldStringFormat as ZodCustomStringFormat,VldStringFormat as ZodE164,VldStringFormat as ZodEmail,VldStringFormat as ZodEmoji,VldStringFormat as ZodGUID,VldStringFormat as ZodIBAN,VldStringFormat as ZodIPv4,VldStringFormat as ZodIPv6,VldStringFormat as ZodISODate,VldStringFormat as ZodISODateTime,VldStringFormat as ZodISODuration,VldStringFormat as ZodISOTime,VldStringFormat as ZodJWT,VldStringFormat as ZodKSUID,VldStringFormat as ZodMAC,VldStringFormat as ZodMiniBase64,VldStringFormat as ZodMiniBase64URL,VldStringFormat as ZodMiniCIDRv4,VldStringFormat as ZodMiniCIDRv6,VldStringFormat as ZodMiniCUID,VldStringFormat as ZodMiniCUID2,VldStringFormat as ZodMiniCreditCard,VldStringFormat as ZodMiniCustomStringFormat,VldStringFormat as ZodMiniE164,VldStringFormat as ZodMiniEmail,VldStringFormat as ZodMiniEmoji,VldStringFormat as ZodMiniGUID,VldStringFormat as ZodMiniIBAN,VldStringFormat as ZodMiniIPv4,VldStringFormat as ZodMiniIPv6,VldStringFormat as ZodMiniISODate,VldStringFormat as ZodMiniISODateTime,VldStringFormat as ZodMiniISODuration,VldStringFormat as ZodMiniISOTime,VldStringFormat as ZodMiniJWT,VldStringFormat as ZodMiniKSUID,VldStringFormat as ZodMiniMAC,VldStringFormat as ZodMiniNanoID,VldStringFormat as ZodMiniStringFormat,VldStringFormat as ZodMiniULID,VldStringFormat as ZodMiniURL,VldStringFormat as ZodMiniUUID,VldStringFormat as ZodMiniXID,VldStringFormat as ZodNanoID,VldStringFormat as ZodStringFormat,VldStringFormat as ZodULID,VldStringFormat as ZodURL,VldStringFormat as ZodUUID,VldStringFormat as ZodXID,isValidIBAN}from"../../validators/string-formats.js";export{VldBigInt as ZodBigInt,VldBigInt as ZodBigIntFormat,VldBigInt as ZodMiniBigInt,VldBigInt as ZodMiniBigIntFormat}from"../../validators/bigint.js";export{VldBoolean as ZodBoolean,VldBoolean as ZodMiniBoolean}from"../../validators/boolean.js";export{VldCodec as ZodCodec,VldCodec as ZodMiniCodec}from"../../validators/codec.js";export{VldCustom as ZodCustom,VldInstance as ZodInstanceOf,VldCustom as ZodMiniCustom,VldCustom as ZodMiniSuccess,VldCustom as ZodSuccess}from"../../validators/custom.js";export{VldDate as ZodDate,VldDate as ZodMiniDate}from"../../validators/date.js";export{VldDiscriminatedUnion as ZodDiscriminatedUnion,VldDiscriminatedUnion as ZodMiniDiscriminatedUnion}from"../../validators/discriminated-union.js";export{VldEnum as ZodEnum,VldEnum as ZodMiniEnum}from"../../validators/enum.js";export{VldFile as ZodFile,VldFile as ZodMiniFile}from"../../validators/file.js";export{VldFunction as ZodFunction,VldFunction as ZodMiniFunction}from"../../validators/function.js";export{VldJson as ZodJSON}from"../../validators/json.js";export{VldLazy as ZodLazy,VldLazy as ZodMiniLazy}from"../../validators/lazy.js";export{VldLiteral as ZodLiteral,VldLiteral as ZodMiniLiteral}from"../../validators/literal.js";export{VldMap as ZodMap,VldMap as ZodMiniMap}from"../../validators/map.js";export{VldNan as ZodMiniNaN,VldNan as ZodNaN}from"../../validators/nan.js";export{VldNever as ZodMiniNever,VldNever as ZodNever}from"../../validators/never.js";export{VldNull as ZodMiniNull,VldNull as ZodNull}from"../../validators/null.js";export{VldNumber as ZodMiniNumber,VldNumber as ZodMiniNumberFormat,VldNumber as ZodNumber,VldNumber as ZodNumberFormat}from"../../validators/number.js";export{VldObject as ZodMiniObject,VldObject as ZodObject}from"../../validators/object.js";export{VldPromise as ZodMiniPromise,VldPromise as ZodPromise}from"../../validators/promise.js";export{VldRecord as ZodMiniRecord,VldRecord as ZodRecord}from"../../validators/record.js";export{VldSet as ZodMiniSet,VldSet as ZodSet}from"../../validators/set.js";export{VldString as ZodMiniString,VldString as ZodString}from"../../validators/string.js";export{VldSymbol as ZodMiniSymbol,VldSymbol as ZodSymbol}from"../../validators/symbol.js";export{VldTemplateLiteral as ZodMiniTemplateLiteral,VldTemplateLiteral as ZodTemplateLiteral}from"../../validators/template-literal.js";export{VldTuple as ZodMiniTuple,VldTuple as ZodTuple}from"../../validators/tuple.js";export{VldUndefined as ZodMiniUndefined,VldUndefined as ZodUndefined}from"../../validators/undefined.js";export{VldUnion as ZodMiniUnion,VldUnion as ZodUnion}from"../../validators/union.js";export{VldUnknown as ZodMiniUnknown,VldUnknown as ZodUnknown}from"../../validators/unknown.js";export{VldVoid as ZodMiniVoid,VldVoid as ZodVoid}from"../../validators/void.js";export{VldXor as ZodMiniXor,VldXor as ZodXor}from"../../validators/xor.js";export{b as base64Json,a as base64ToBytes,c as base64ToUint8Array,d as base64UrlToBytes,e as base64urlToBytes,f as bytesToUtf8,g as epochMillisToDate,h as epochSecondsToDate,i as hexLowerToBytes,j as hexToBytes,k as hexToUint8Array,l as invertCodec,m as isoDatetimeToDate,n as jsonCodec,o as jwtPayload,p as numberToBigInt,s as stringToBigInt,q as stringToBoolean,r as stringToHttpURL,t as stringToInt,u as stringToNumber,v as stringToURL,w as stringToUint8Array,x as uint8ArrayToBase64,y as uint8ArrayToBase64Url,z as uint8ArrayToHex,A as uint8ArrayToString,B as uriComponent,C as utf8ToBytes}from"../../chunks/index-CkbfQQ4n.js";export{blue,bold,createTheme,cyan,dim,gray,green,grey,italic,magenta,default as pigment,red,strip,supportsColor,underline,vldTheme,white,yellow}from"../../pigment.js";export{createEmitter,createEventBus,withEmitter}from"../../compat/emitter.js";export{createVldKernel,definePlugin,getVldKernel,resetVldKernel,usePlugin}from"../../kernel.js";export{flattenError,prettifyError,prettifyErrorColored,prettifyErrorPlain,treeifyError}from"../../errors.js";export{getLocale,getMessages,getSupportedLocales,isLocaleLoaded,isLocaleSupported,registerLocale,setLocale}from"../../locales/runtime.js";export{globalRegistry,registry}from"../../registry.js";export{s as setLocaleAsync}from"../../chunks/index-Bn85LHAC.js";
@@ -1,6 +1,6 @@
1
1
  export * from '../index.js';
2
2
  export { default } from '../index.js';
3
- export { ZodAny as ZodMiniAny, ZodArray as ZodMiniArray, ZodBase64 as ZodMiniBase64, ZodBase64URL as ZodMiniBase64URL, ZodBigInt as ZodMiniBigInt, ZodBigIntFormat as ZodMiniBigIntFormat, ZodBoolean as ZodMiniBoolean, ZodBranded as ZodMiniBrand, ZodCIDRv4 as ZodMiniCIDRv4, ZodCIDRv6 as ZodMiniCIDRv6, ZodCUID as ZodMiniCUID, ZodCUID2 as ZodMiniCUID2, ZodCatch as ZodMiniCatch, ZodCodec as ZodMiniCodec, ZodCreditCard as ZodMiniCreditCard, ZodCustom as ZodMiniCustom, ZodCustomStringFormat as ZodMiniCustomStringFormat, ZodDate as ZodMiniDate, ZodDefault as ZodMiniDefault, ZodDiscriminatedUnion as ZodMiniDiscriminatedUnion, ZodE164 as ZodMiniE164, ZodEmail as ZodMiniEmail, ZodEmoji as ZodMiniEmoji, ZodEnum as ZodMiniEnum, ZodExactOptional as ZodMiniExactOptional, ZodFile as ZodMiniFile, ZodFunction as ZodMiniFunction, ZodGUID as ZodMiniGUID, ZodIPv4 as ZodMiniIPv4, ZodIPv6 as ZodMiniIPv6, ZodISODate as ZodMiniISODate, ZodISODateTime as ZodMiniISODateTime, ZodISODuration as ZodMiniISODuration, ZodISOTime as ZodMiniISOTime, ZodIntersection as ZodMiniIntersection, ZodJWT as ZodMiniJWT, ZodKSUID as ZodMiniKSUID, ZodLazy as ZodMiniLazy, ZodLiteral as ZodMiniLiteral, ZodMAC as ZodMiniMAC, ZodMap as ZodMiniMap, ZodNaN as ZodMiniNaN, ZodNanoID as ZodMiniNanoID, ZodNever as ZodMiniNever, ZodNonOptional as ZodMiniNonOptional, ZodNull as ZodMiniNull, ZodNullable as ZodMiniNullable, ZodNumber as ZodMiniNumber, ZodNumberFormat as ZodMiniNumberFormat, ZodObject as ZodMiniObject, ZodOptional as ZodMiniOptional, ZodPipe as ZodMiniPipe, ZodPrefault as ZodMiniPrefault, ZodPromise as ZodMiniPromise, ZodReadonly as ZodMiniReadonly, ZodRecord as ZodMiniRecord, ZodSet as ZodMiniSet, ZodString as ZodMiniString, ZodStringFormat as ZodMiniStringFormat, ZodSuccess as ZodMiniSuccess, ZodSymbol as ZodMiniSymbol, ZodTemplateLiteral as ZodMiniTemplateLiteral, ZodTransform as ZodMiniTransform, ZodTuple as ZodMiniTuple, ZodType as ZodMiniType, ZodULID as ZodMiniULID, ZodURL as ZodMiniURL, ZodUUID as ZodMiniUUID, ZodUndefined as ZodMiniUndefined, ZodUnion as ZodMiniUnion, ZodUnknown as ZodMiniUnknown, ZodVoid as ZodMiniVoid, ZodXID as ZodMiniXID, ZodXor as ZodMiniXor } from '../index.js';
3
+ export { ZodAny as ZodMiniAny, ZodArray as ZodMiniArray, ZodBase64 as ZodMiniBase64, ZodBase64URL as ZodMiniBase64URL, ZodBigInt as ZodMiniBigInt, ZodBigIntFormat as ZodMiniBigIntFormat, ZodBoolean as ZodMiniBoolean, ZodBranded as ZodMiniBrand, ZodCIDRv4 as ZodMiniCIDRv4, ZodCIDRv6 as ZodMiniCIDRv6, ZodCUID as ZodMiniCUID, ZodCUID2 as ZodMiniCUID2, ZodCatch as ZodMiniCatch, ZodCodec as ZodMiniCodec, ZodCreditCard as ZodMiniCreditCard, ZodCustom as ZodMiniCustom, ZodCustomStringFormat as ZodMiniCustomStringFormat, ZodDate as ZodMiniDate, ZodDefault as ZodMiniDefault, ZodDiscriminatedUnion as ZodMiniDiscriminatedUnion, ZodE164 as ZodMiniE164, ZodEmail as ZodMiniEmail, ZodEmoji as ZodMiniEmoji, ZodEnum as ZodMiniEnum, ZodExactOptional as ZodMiniExactOptional, ZodFile as ZodMiniFile, ZodFunction as ZodMiniFunction, ZodGUID as ZodMiniGUID, ZodIBAN as ZodMiniIBAN, ZodIPv4 as ZodMiniIPv4, ZodIPv6 as ZodMiniIPv6, ZodISODate as ZodMiniISODate, ZodISODateTime as ZodMiniISODateTime, ZodISODuration as ZodMiniISODuration, ZodISOTime as ZodMiniISOTime, ZodIntersection as ZodMiniIntersection, ZodJWT as ZodMiniJWT, ZodKSUID as ZodMiniKSUID, ZodLazy as ZodMiniLazy, ZodLiteral as ZodMiniLiteral, ZodMAC as ZodMiniMAC, ZodMap as ZodMiniMap, ZodNaN as ZodMiniNaN, ZodNanoID as ZodMiniNanoID, ZodNever as ZodMiniNever, ZodNonOptional as ZodMiniNonOptional, ZodNull as ZodMiniNull, ZodNullable as ZodMiniNullable, ZodNumber as ZodMiniNumber, ZodNumberFormat as ZodMiniNumberFormat, ZodObject as ZodMiniObject, ZodOptional as ZodMiniOptional, ZodPipe as ZodMiniPipe, ZodPrefault as ZodMiniPrefault, ZodPromise as ZodMiniPromise, ZodReadonly as ZodMiniReadonly, ZodRecord as ZodMiniRecord, ZodSet as ZodMiniSet, ZodString as ZodMiniString, ZodStringFormat as ZodMiniStringFormat, ZodSuccess as ZodMiniSuccess, ZodSymbol as ZodMiniSymbol, ZodTemplateLiteral as ZodMiniTemplateLiteral, ZodTransform as ZodMiniTransform, ZodTuple as ZodMiniTuple, ZodType as ZodMiniType, ZodULID as ZodMiniULID, ZodURL as ZodMiniURL, ZodUUID as ZodMiniUUID, ZodUndefined as ZodMiniUndefined, ZodUnion as ZodMiniUnion, ZodUnknown as ZodMiniUnknown, ZodVoid as ZodMiniVoid, ZodXID as ZodMiniXID, ZodXor as ZodMiniXor } from '../index.js';
4
4
  import type { VldBase } from '../validators/base.js';
5
5
  import type { VldObject } from '../validators/object.js';
6
6
  type ObjectShape = Record<string, VldBase<any, any>>;
@@ -1 +1 @@
1
- import{number as Z}from"../index.js";export{$brand,$input,$output,NEVER,TimePrecision,ZodFirstPartyTypeKind,ZodIssueCode,ZodLikeError,_ZodString,_function,any,array,base64,base64Bytes,base64url,bigint,boolean,catch,check,cidrv4,cidrv6,clone,codec,coerce,config,core,createLogger,createNoOpLogger,creditCard,cuid,cuid2,custom,date,decode,decodeAsync,deepPartial,default,describe,disableLogging,discriminatedUnion,e164,email,emoji,enableDebug,encode,encodeAsync,endsWith,enum,exactOptional,file,float32,float64,formatError,fromJSONSchema,_function as function,getErrorMap,getLogger,gt,gte,guid,hash,hex,hexBytes,hostname,httpUrl,includes,initLogger,input,instanceof,int,int32,int64,intersection,ipv4,ipv6,iso,json,jwt,keyof,ksuid,lazy,length,literal,locales,looseObject,looseRecord,lowercase,lt,lte,mac,map,mapSchema,maxLength,maxSize,meta,mime,minLength,minSize,multipleOf,nan,nanoid,nativeEnum,negative,never,nonnegative,nonoptional,nonpositive,normalize,null,nullable,nullish,object,optional,output,overwrite,parse,parseAsync,partialRecord,pipe,positive,prefault,preprocess,promise,property,readonly,record,refine,regex,regexes,safeDecode,safeDecodeAsync,safeEncode,safeEncodeAsync,safeParse,safeParseAsync,set,setErrorMap,setLogLevel,size,slugify,startsWith,strictObject,string,stringFormat,stringbool,superRefine,symbol,templateLiteral,toJSONSchema,toLowerCase,toUpperCase,toZodError,toZodSafeResult,transform,trim,tuple,uint32,uint64,uint8Array,ulid,undefined,union,unknown,uppercase,url,util,uuid,uuidv4,uuidv6,uuidv7,default as v,vV2,void,xid,xor,z}from"../index.js";export{ZodCompileAsyncError,ZodCompileError,ZodCompileUnsupportedError,compile,getDiscriminatedOption,memoizer,properties,toZod,validate,validateAsync,compileFn as zodCompileFn}from"../compile.js";export{Err,Ok,ResultUtils,all,failure,flatMap,fromNullable,isErr,isOk,isResult,mapErr,match,success,tryCatch,tryCatchAsync,unwrap,unwrapOr}from"../compat/result.js";export{VldBase,VldMeta,VldBrand as ZodBranded,VldCatch as ZodCatch,VldDefault as ZodDefault,VldExactOptional as ZodExactOptional,VldMeta as ZodMeta,VldBrand as ZodMiniBrand,VldCatch as ZodMiniCatch,VldDefault as ZodMiniDefault,VldExactOptional as ZodMiniExactOptional,VldRefine as ZodMiniNonOptional,VldNullable as ZodMiniNullable,VldOptional as ZodMiniOptional,VldPipe as ZodMiniPipe,VldPrefault as ZodMiniPrefault,VldReadonly as ZodMiniReadonly,VldTransform as ZodMiniTransform,VldBase as ZodMiniType,VldRefine as ZodNonOptional,VldNullable as ZodNullable,VldOptional as ZodOptional,VldPipe as ZodPipe,VldPrefault as ZodPrefault,VldPreprocess as ZodPreprocess,VldReadonly as ZodReadonly,VldTransform as ZodTransform,VldBase as ZodType}from"../validators/base.js";export{V as VldError,V as ZodError,V as ZodRealError}from"../chunks/errors-core-BU14-Dk8.js";export{VldIntersection,VldIntersection as ZodIntersection,VldIntersection as ZodMiniIntersection}from"../validators/intersection.js";export{VldAny as ZodAny,VldAny as ZodMiniAny}from"../validators/any.js";export{VldArray as ZodArray,VldArray as ZodMiniArray}from"../validators/array.js";export{VldStringFormat as ZodBase64,VldStringFormat as ZodBase64URL,VldStringFormat as ZodCIDRv4,VldStringFormat as ZodCIDRv6,VldStringFormat as ZodCUID,VldStringFormat as ZodCUID2,VldStringFormat as ZodCreditCard,VldStringFormat as ZodCustomStringFormat,VldStringFormat as ZodE164,VldStringFormat as ZodEmail,VldStringFormat as ZodEmoji,VldStringFormat as ZodGUID,VldStringFormat as ZodIPv4,VldStringFormat as ZodIPv6,VldStringFormat as ZodISODate,VldStringFormat as ZodISODateTime,VldStringFormat as ZodISODuration,VldStringFormat as ZodISOTime,VldStringFormat as ZodJWT,VldStringFormat as ZodKSUID,VldStringFormat as ZodMAC,VldStringFormat as ZodMiniBase64,VldStringFormat as ZodMiniBase64URL,VldStringFormat as ZodMiniCIDRv4,VldStringFormat as ZodMiniCIDRv6,VldStringFormat as ZodMiniCUID,VldStringFormat as ZodMiniCUID2,VldStringFormat as ZodMiniCreditCard,VldStringFormat as ZodMiniCustomStringFormat,VldStringFormat as ZodMiniE164,VldStringFormat as ZodMiniEmail,VldStringFormat as ZodMiniEmoji,VldStringFormat as ZodMiniGUID,VldStringFormat as ZodMiniIPv4,VldStringFormat as ZodMiniIPv6,VldStringFormat as ZodMiniISODate,VldStringFormat as ZodMiniISODateTime,VldStringFormat as ZodMiniISODuration,VldStringFormat as ZodMiniISOTime,VldStringFormat as ZodMiniJWT,VldStringFormat as ZodMiniKSUID,VldStringFormat as ZodMiniMAC,VldStringFormat as ZodMiniNanoID,VldStringFormat as ZodMiniStringFormat,VldStringFormat as ZodMiniULID,VldStringFormat as ZodMiniURL,VldStringFormat as ZodMiniUUID,VldStringFormat as ZodMiniXID,VldStringFormat as ZodNanoID,VldStringFormat as ZodStringFormat,VldStringFormat as ZodULID,VldStringFormat as ZodURL,VldStringFormat as ZodUUID,VldStringFormat as ZodXID}from"../validators/string-formats.js";export{VldBigInt as ZodBigInt,VldBigInt as ZodBigIntFormat,VldBigInt as ZodMiniBigInt,VldBigInt as ZodMiniBigIntFormat}from"../validators/bigint.js";export{VldBoolean as ZodBoolean,VldBoolean as ZodMiniBoolean}from"../validators/boolean.js";export{VldCodec as ZodCodec,VldCodec as ZodMiniCodec}from"../validators/codec.js";export{VldCustom as ZodCustom,VldCustom as ZodMiniCustom,VldCustom as ZodMiniSuccess,VldCustom as ZodSuccess}from"../validators/custom.js";export{VldDate as ZodDate,VldDate as ZodMiniDate}from"../validators/date.js";export{VldDiscriminatedUnion as ZodDiscriminatedUnion,VldDiscriminatedUnion as ZodMiniDiscriminatedUnion}from"../validators/discriminated-union.js";export{VldEnum as ZodEnum,VldEnum as ZodMiniEnum}from"../validators/enum.js";export{VldFile as ZodFile,VldFile as ZodMiniFile}from"../validators/file.js";export{VldFunction as ZodFunction,VldFunction as ZodMiniFunction}from"../validators/function.js";export{VldJson as ZodJSON}from"../validators/json.js";export{VldLazy as ZodLazy,VldLazy as ZodMiniLazy}from"../validators/lazy.js";export{VldLiteral as ZodLiteral,VldLiteral as ZodMiniLiteral}from"../validators/literal.js";export{VldMap as ZodMap,VldMap as ZodMiniMap}from"../validators/map.js";export{VldNan as ZodMiniNaN,VldNan as ZodNaN}from"../validators/nan.js";export{VldNever as ZodMiniNever,VldNever as ZodNever}from"../validators/never.js";export{VldNull as ZodMiniNull,VldNull as ZodNull}from"../validators/null.js";export{VldNumber as ZodMiniNumber,VldNumber as ZodMiniNumberFormat,VldNumber as ZodNumber,VldNumber as ZodNumberFormat}from"../validators/number.js";export{VldObject as ZodMiniObject,VldObject as ZodObject}from"../validators/object.js";export{VldPromise as ZodMiniPromise,VldPromise as ZodPromise}from"../validators/promise.js";export{VldRecord as ZodMiniRecord,VldRecord as ZodRecord}from"../validators/record.js";export{VldSet as ZodMiniSet,VldSet as ZodSet}from"../validators/set.js";export{VldString as ZodMiniString,VldString as ZodString}from"../validators/string.js";export{VldSymbol as ZodMiniSymbol,VldSymbol as ZodSymbol}from"../validators/symbol.js";export{VldTemplateLiteral as ZodMiniTemplateLiteral,VldTemplateLiteral as ZodTemplateLiteral}from"../validators/template-literal.js";export{VldTuple as ZodMiniTuple,VldTuple as ZodTuple}from"../validators/tuple.js";export{VldUndefined as ZodMiniUndefined,VldUndefined as ZodUndefined}from"../validators/undefined.js";export{VldUnion as ZodMiniUnion,VldUnion as ZodUnion}from"../validators/union.js";export{VldUnknown as ZodMiniUnknown,VldUnknown as ZodUnknown}from"../validators/unknown.js";export{VldVoid as ZodMiniVoid,VldVoid as ZodVoid}from"../validators/void.js";export{VldXor as ZodMiniXor,VldXor as ZodXor}from"../validators/xor.js";export{b as base64Json,a as base64ToBytes,c as base64ToUint8Array,d as base64UrlToBytes,e as base64urlToBytes,f as bytesToUtf8,g as epochMillisToDate,h as epochSecondsToDate,i as hexLowerToBytes,j as hexToBytes,k as hexToUint8Array,l as invertCodec,m as isoDatetimeToDate,n as jsonCodec,o as jwtPayload,p as numberToBigInt,s as stringToBigInt,q as stringToBoolean,r as stringToHttpURL,t as stringToInt,u as stringToNumber,v as stringToURL,w as stringToUint8Array,x as uint8ArrayToBase64,y as uint8ArrayToBase64Url,z as uint8ArrayToHex,A as uint8ArrayToString,B as uriComponent,C as utf8ToBytes}from"../chunks/index-CkbfQQ4n.js";export{blue,bold,createTheme,cyan,dim,gray,green,grey,italic,magenta,default as pigment,red,strip,supportsColor,underline,vldTheme,white,yellow}from"../pigment.js";export{createEmitter,createEventBus,withEmitter}from"../compat/emitter.js";export{createVldKernel,definePlugin,getVldKernel,resetVldKernel,usePlugin}from"../kernel.js";export{flattenError,prettifyError,prettifyErrorColored,prettifyErrorPlain,treeifyError}from"../errors.js";export{getLocale,getMessages,getSupportedLocales,isLocaleLoaded,isLocaleSupported,registerLocale,setLocale}from"../locales/runtime.js";export{globalRegistry,registry}from"../registry.js";export{s as setLocaleAsync}from"../chunks/index-CKPStM3V.js";function S(o){return Object.keys(o).filter(a=>o[a])}function M(o){return"string"==typeof o?o:o?.message||o?.error}const F=(o,a)=>o.pick(...S(a)),I=(o,a)=>o.omit(...S(a)),T=o=>o.partial(),U=o=>o.required(),D=(o,a)=>o.extend(a),E=(o,a)=>o.safeExtend(a),L=(o,a)=>a&&"function"==typeof a.parse?o.merge(a):o.extend(a),N=(o,a)=>o.catchall(a),O=(o,a)=>o.default("function"==typeof a?a():a),R=(o,a)=>{const r=M(a);return Z().min(o,r)},P=(o,a)=>{const r=M(a);return Z().max(o,r)},J=o=>o.exactPartial();export{O as _default,N as catchall,J as exactPartial,D as extend,P as maximum,L as merge,R as minimum,Z as number,I as omit,T as partial,F as pick,U as required,E as safeExtend};
1
+ import{number as Z}from"../index.js";export{$brand,$input,$output,NEVER,TimePrecision,ZodFirstPartyTypeKind,ZodIssueCode,ZodLikeError,_ZodString,_function,any,array,base64,base64Bytes,base64url,bigint,boolean,catch,check,cidrv4,cidrv6,clone,codec,coerce,config,core,createLogger,createNoOpLogger,creditCard,cuid,cuid2,currencyCode,custom,date,decode,decodeAsync,deepPartial,default,describe,disableLogging,discriminatedUnion,e164,email,emoji,enableDebug,encode,encodeAsync,endsWith,enum,exactOptional,file,float32,float64,formatError,fromJSONSchema,_function as function,getErrorMap,getLogger,gt,gte,guid,hash,hex,hexBytes,hostname,httpUrl,iban,includes,initLogger,input,instanceof,int,int32,int64,intersection,ipv4,ipv6,iso,json,jwt,keyof,ksuid,lazy,length,literal,locales,looseObject,looseRecord,lowercase,lt,lte,mac,map,mapSchema,maxLength,maxSize,meta,mime,minLength,minSize,multipleOf,nan,nanoid,nativeEnum,negative,never,nonnegative,nonoptional,nonpositive,normalize,null,nullable,nullish,object,optional,output,overwrite,parse,parseAsync,partialRecord,pipe,positive,prefault,preprocess,promise,property,readonly,record,refine,regex,regexes,safeDecode,safeDecodeAsync,safeEncode,safeEncodeAsync,safeParse,safeParseAsync,set,setErrorMap,setLogLevel,size,slugify,startsWith,strictObject,string,stringFormat,stringbool,superRefine,symbol,templateLiteral,toJSONSchema,toLowerCase,toUpperCase,toZodError,toZodSafeResult,transform,trim,tuple,uint32,uint64,uint8Array,ulid,undefined,union,unknown,uppercase,url,util,uuid,uuidv4,uuidv6,uuidv7,default as v,vV2,void,xid,xor,z}from"../index.js";export{COMPILE_INVALID,COMPILE_INVALID as INVALID,ZodCompileAsyncError,ZodCompileError,ZodCompileUnsupportedError,compile,getDiscriminatedOption,memoizer,properties,toZod,validate,validateAsync,withParser,compileFn as zodCompileFn}from"../compile.js";export{Err,Ok,ResultUtils,all,failure,flatMap,fromNullable,isErr,isOk,isResult,mapErr,match,success,tryCatch,tryCatchAsync,unwrap,unwrapOr}from"../compat/result.js";export{VldBase,VldMeta,VldBrand as ZodBranded,VldCatch as ZodCatch,VldDefault as ZodDefault,VldExactOptional as ZodExactOptional,VldMeta as ZodMeta,VldBrand as ZodMiniBrand,VldCatch as ZodMiniCatch,VldDefault as ZodMiniDefault,VldExactOptional as ZodMiniExactOptional,VldRefine as ZodMiniNonOptional,VldNullable as ZodMiniNullable,VldOptional as ZodMiniOptional,VldPipe as ZodMiniPipe,VldPrefault as ZodMiniPrefault,VldReadonly as ZodMiniReadonly,VldTransform as ZodMiniTransform,VldBase as ZodMiniType,VldRefine as ZodNonOptional,VldNullable as ZodNullable,VldOptional as ZodOptional,VldPipe as ZodPipe,VldPrefault as ZodPrefault,VldPreprocess as ZodPreprocess,VldReadonly as ZodReadonly,VldTransform as ZodTransform,VldBase as ZodType}from"../validators/base.js";export{V as VldError,V as ZodError,V as ZodRealError}from"../chunks/errors-core-BU14-Dk8.js";export{VldIntersection,VldIntersection as ZodIntersection,VldIntersection as ZodMiniIntersection}from"../validators/intersection.js";export{VldAny as ZodAny,VldAny as ZodMiniAny}from"../validators/any.js";export{VldArray as ZodArray,VldArray as ZodMiniArray}from"../validators/array.js";export{VldStringFormat as ZodBase64,VldStringFormat as ZodBase64URL,VldStringFormat as ZodCIDRv4,VldStringFormat as ZodCIDRv6,VldStringFormat as ZodCUID,VldStringFormat as ZodCUID2,VldStringFormat as ZodCreditCard,VldStringFormat as ZodCustomStringFormat,VldStringFormat as ZodE164,VldStringFormat as ZodEmail,VldStringFormat as ZodEmoji,VldStringFormat as ZodGUID,VldStringFormat as ZodIBAN,VldStringFormat as ZodIPv4,VldStringFormat as ZodIPv6,VldStringFormat as ZodISODate,VldStringFormat as ZodISODateTime,VldStringFormat as ZodISODuration,VldStringFormat as ZodISOTime,VldStringFormat as ZodJWT,VldStringFormat as ZodKSUID,VldStringFormat as ZodMAC,VldStringFormat as ZodMiniBase64,VldStringFormat as ZodMiniBase64URL,VldStringFormat as ZodMiniCIDRv4,VldStringFormat as ZodMiniCIDRv6,VldStringFormat as ZodMiniCUID,VldStringFormat as ZodMiniCUID2,VldStringFormat as ZodMiniCreditCard,VldStringFormat as ZodMiniCustomStringFormat,VldStringFormat as ZodMiniE164,VldStringFormat as ZodMiniEmail,VldStringFormat as ZodMiniEmoji,VldStringFormat as ZodMiniGUID,VldStringFormat as ZodMiniIBAN,VldStringFormat as ZodMiniIPv4,VldStringFormat as ZodMiniIPv6,VldStringFormat as ZodMiniISODate,VldStringFormat as ZodMiniISODateTime,VldStringFormat as ZodMiniISODuration,VldStringFormat as ZodMiniISOTime,VldStringFormat as ZodMiniJWT,VldStringFormat as ZodMiniKSUID,VldStringFormat as ZodMiniMAC,VldStringFormat as ZodMiniNanoID,VldStringFormat as ZodMiniStringFormat,VldStringFormat as ZodMiniULID,VldStringFormat as ZodMiniURL,VldStringFormat as ZodMiniUUID,VldStringFormat as ZodMiniXID,VldStringFormat as ZodNanoID,VldStringFormat as ZodStringFormat,VldStringFormat as ZodULID,VldStringFormat as ZodURL,VldStringFormat as ZodUUID,VldStringFormat as ZodXID,isValidIBAN}from"../validators/string-formats.js";export{VldBigInt as ZodBigInt,VldBigInt as ZodBigIntFormat,VldBigInt as ZodMiniBigInt,VldBigInt as ZodMiniBigIntFormat}from"../validators/bigint.js";export{VldBoolean as ZodBoolean,VldBoolean as ZodMiniBoolean}from"../validators/boolean.js";export{VldCodec as ZodCodec,VldCodec as ZodMiniCodec}from"../validators/codec.js";export{VldCustom as ZodCustom,VldInstance as ZodInstanceOf,VldCustom as ZodMiniCustom,VldCustom as ZodMiniSuccess,VldCustom as ZodSuccess}from"../validators/custom.js";export{VldDate as ZodDate,VldDate as ZodMiniDate}from"../validators/date.js";export{VldDiscriminatedUnion as ZodDiscriminatedUnion,VldDiscriminatedUnion as ZodMiniDiscriminatedUnion}from"../validators/discriminated-union.js";export{VldEnum as ZodEnum,VldEnum as ZodMiniEnum}from"../validators/enum.js";export{VldFile as ZodFile,VldFile as ZodMiniFile}from"../validators/file.js";export{VldFunction as ZodFunction,VldFunction as ZodMiniFunction}from"../validators/function.js";export{VldJson as ZodJSON}from"../validators/json.js";export{VldLazy as ZodLazy,VldLazy as ZodMiniLazy}from"../validators/lazy.js";export{VldLiteral as ZodLiteral,VldLiteral as ZodMiniLiteral}from"../validators/literal.js";export{VldMap as ZodMap,VldMap as ZodMiniMap}from"../validators/map.js";export{VldNan as ZodMiniNaN,VldNan as ZodNaN}from"../validators/nan.js";export{VldNever as ZodMiniNever,VldNever as ZodNever}from"../validators/never.js";export{VldNull as ZodMiniNull,VldNull as ZodNull}from"../validators/null.js";export{VldNumber as ZodMiniNumber,VldNumber as ZodMiniNumberFormat,VldNumber as ZodNumber,VldNumber as ZodNumberFormat}from"../validators/number.js";export{VldObject as ZodMiniObject,VldObject as ZodObject}from"../validators/object.js";export{VldPromise as ZodMiniPromise,VldPromise as ZodPromise}from"../validators/promise.js";export{VldRecord as ZodMiniRecord,VldRecord as ZodRecord}from"../validators/record.js";export{VldSet as ZodMiniSet,VldSet as ZodSet}from"../validators/set.js";export{VldString as ZodMiniString,VldString as ZodString}from"../validators/string.js";export{VldSymbol as ZodMiniSymbol,VldSymbol as ZodSymbol}from"../validators/symbol.js";export{VldTemplateLiteral as ZodMiniTemplateLiteral,VldTemplateLiteral as ZodTemplateLiteral}from"../validators/template-literal.js";export{VldTuple as ZodMiniTuple,VldTuple as ZodTuple}from"../validators/tuple.js";export{VldUndefined as ZodMiniUndefined,VldUndefined as ZodUndefined}from"../validators/undefined.js";export{VldUnion as ZodMiniUnion,VldUnion as ZodUnion}from"../validators/union.js";export{VldUnknown as ZodMiniUnknown,VldUnknown as ZodUnknown}from"../validators/unknown.js";export{VldVoid as ZodMiniVoid,VldVoid as ZodVoid}from"../validators/void.js";export{VldXor as ZodMiniXor,VldXor as ZodXor}from"../validators/xor.js";export{b as base64Json,a as base64ToBytes,c as base64ToUint8Array,d as base64UrlToBytes,e as base64urlToBytes,f as bytesToUtf8,g as epochMillisToDate,h as epochSecondsToDate,i as hexLowerToBytes,j as hexToBytes,k as hexToUint8Array,l as invertCodec,m as isoDatetimeToDate,n as jsonCodec,o as jwtPayload,p as numberToBigInt,s as stringToBigInt,q as stringToBoolean,r as stringToHttpURL,t as stringToInt,u as stringToNumber,v as stringToURL,w as stringToUint8Array,x as uint8ArrayToBase64,y as uint8ArrayToBase64Url,z as uint8ArrayToHex,A as uint8ArrayToString,B as uriComponent,C as utf8ToBytes}from"../chunks/index-CkbfQQ4n.js";export{blue,bold,createTheme,cyan,dim,gray,green,grey,italic,magenta,default as pigment,red,strip,supportsColor,underline,vldTheme,white,yellow}from"../pigment.js";export{createEmitter,createEventBus,withEmitter}from"../compat/emitter.js";export{createVldKernel,definePlugin,getVldKernel,resetVldKernel,usePlugin}from"../kernel.js";export{flattenError,prettifyError,prettifyErrorColored,prettifyErrorPlain,treeifyError}from"../errors.js";export{getLocale,getMessages,getSupportedLocales,isLocaleLoaded,isLocaleSupported,registerLocale,setLocale}from"../locales/runtime.js";export{globalRegistry,registry}from"../registry.js";export{s as setLocaleAsync}from"../chunks/index-Bn85LHAC.js";function S(o){return Object.keys(o).filter(a=>o[a])}function M(o){return"string"==typeof o?o:o?.message||o?.error}const F=(o,a)=>o.pick(...S(a)),I=(o,a)=>o.omit(...S(a)),D=o=>o.partial(),T=o=>o.required(),U=(o,a)=>o.extend(a),L=(o,a)=>o.safeExtend(a),E=(o,a)=>a&&"function"==typeof a.parse?o.merge(a):o.extend(a),N=(o,a)=>o.catchall(a),O=(o,a)=>o.default("function"==typeof a?a():a),P=(o,a)=>{const r=M(a);return Z().min(o,r)},R=(o,a)=>{const r=M(a);return Z().max(o,r)},J=o=>o.exactPartial();export{O as _default,N as catchall,J as exactPartial,U as extend,R as maximum,E as merge,P as minimum,Z as number,I as omit,D as partial,F as pick,T as required,L as safeExtend};
@@ -1,5 +1,5 @@
1
1
  /**
2
- * VldArrayV2 array validator with single-def + check-class pattern.
2
+ * VldArrayV2 - array validator with single-def + check-class pattern.
3
3
  * Public API mirrors the legacy VldArray 1:1. Exposed via v.arrayV2().
4
4
  */
5
5
  import { VldBase, type ErrorParam, type ParseResult } from './base.js';
@@ -230,6 +230,35 @@ export declare abstract class VldBase<TInput, TOutput = TInput> {
230
230
  safeEncodeAsync(value: TOutput): Promise<ParseResult<TInput>>;
231
231
  /** Zod's short alias for safeParseAsync. */
232
232
  spa(value: unknown): Promise<ParseResult<TOutput>>;
233
+ /**
234
+ * Zod 4.6 boolean validation. Returns `true` when the value is valid,
235
+ * `false` otherwise, without allocating a result object or an error.
236
+ * Short-circuits on the first failed check.
237
+ *
238
+ * Fast-path ladder (mirrors Zod 4.6):
239
+ * 1. an explicitly compiled validator (z.compile / z.withParser),
240
+ * 2. a lazily AOT-compiled validator, memoized on first call
241
+ * (skipped in CSP environments where `new Function` is blocked),
242
+ * 3. the runtime safeParse, bound once so the call site stays stable.
243
+ *
244
+ * The hot path is a single memoized property read - never the `_zod`
245
+ * getter, which allocates. Schemas whose validation is asynchronous
246
+ * (z.promise) throw, matching Zod's $ZodAsyncError behavior; use
247
+ * validateAsync for those.
248
+ */
249
+ validate(data: unknown): data is TInput;
250
+ /**
251
+ * Runtime fallback shared by the cold and hot paths. The bound safeParse
252
+ * is memoized per schema so the call site stays stable for V8.
253
+ */
254
+ private validateWithRuntimeParser;
255
+ /**
256
+ * Cold path of `.validate()`: resolve the fastest validator available
257
+ * (explicitly compiled, else lazily compiled), memoize it, and run it.
258
+ */
259
+ private initValidate;
260
+ /** Zod 4.6 async boolean validation. */
261
+ validateAsync(data: unknown): Promise<boolean>;
233
262
  /** Compatibility helpers retained by Zod 4. */
234
263
  isOptional(): boolean;
235
264
  isNullable(): boolean;
@@ -1 +1 @@
1
- import{globalRegistry as e}from"../registry.js";import{V as t}from"../chunks/errors-core-BU14-Dk8.js";function s(e){if(e instanceof t)return e;const s=e instanceof Error?e.message:String(e);return new t([{code:"custom",path:[],message:s}])}const r={STRING:"string",STRING_FORMAT:"stringFormat",STRING_BOOL:"stringBool",NUMBER:"number",BOOLEAN:"boolean",DATE:"date",BIGINT:"bigint",UNDEFINED:"undefined",NULL:"null",UNKNOWN:"unknown",ANY:"any",VOID:"void",NEVER:"never",SYMBOL:"symbol",NAN:"nan",HEX:"hex",BASE64:"base64",UINT8_ARRAY:"uint8Array",COERCE_STRING:"coerceString",COERCE_NUMBER:"coerceNumber",COERCE_BOOLEAN:"coerceBoolean",COERCE_DATE:"coerceDate",COERCE_BIGINT:"coerceBigint",OBJECT:"object",ARRAY:"array",TUPLE:"tuple",SET:"set",MAP:"map",RECORD:"record",UNION:"union",DISCRIMINATED_UNION:"discriminatedUnion",INTERSECTION:"intersection",XOR:"xor",ENUM:"enum",LITERAL:"literal",LAZY:"lazy",CUSTOM:"custom",FUNCTION:"function",FILE:"file",JSON:"json",TEMPLATE_LITERAL:"templateLiteral",PROMISE:"promise",OPTIONAL:"optional",NULLABLE:"nullable",NULLISH:"nullish",EXACT_OPTIONAL:"exactOptional",DEFAULT:"default",CATCH:"catch",REFINE:"refine",TRANSFORM:"transform",PIPE:"pipe",PREPROCESS:"preprocess",SUPER_REFINE:"superRefine",BRAND:"brand",READONLY:"readonly",META:"meta",PREFAULT:"prefault",PREFault:"prefault",CODEC:"codec"};function a(e,t){if("string"==typeof e)return e;if("function"==typeof e){const s=e(void 0);return"string"==typeof s?s:"object"==typeof s&&s?.message?s.message:t}if("object"==typeof e&&null!==e){if("string"==typeof e.error)return e.error;if("function"==typeof e.error)return e.error({})||t;if("string"==typeof e.message)return e.message}return t}function i(e){return null!==e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}let n;function o(e){n=e}function h(e){return"function"==typeof e?e():function(e){if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(null!==e&&"object"==typeof e){const t=Object.getPrototypeOf(e);if(t===Object.prototype||null===t)return{...e}}return e}(e)}function u(e){if(!0===e.isSimple)switch(e.validatorType){case r.STRING:return"string";case r.NUMBER:return"number";case r.BOOLEAN:return"boolean";case r.BIGINT:return"bigint";case r.SYMBOL:return"symbol";default:return}}function l(e,t){switch(e){case"string":return"string"==typeof t?t:void 0;case"number":return"number"!=typeof t||isNaN(t)?void 0:t;case"boolean":return"boolean"==typeof t?t:void 0;case"bigint":return"bigint"==typeof t?t:void 0;case"symbol":return"symbol"==typeof t?t:void 0;default:return}}class VldBase{constructor(e="unknown"){this.validatorType=e}get type(){return this.validatorType}get _def(){return{typeName:"Zod"+this.validatorType.charAt(0).toUpperCase()+this.validatorType.slice(1),...this.config||{}}}get def(){return this._def}get _zod(){return this._def}get"~standard"(){return{version:1,vendor:"vld",validate:e=>{const t=this.safeParse(e);return t.success?{value:t.data}:{issues:[{message:t.error.message}]}},types:void 0}}async parseAsync(e){return this.parse(e)}async safeParseAsync(e){try{return{success:!0,data:await this.parseAsync(e)}}catch(e){return{success:!1,error:s(e)}}}decode(e){return this.parse(e)}safeDecode(e){return this.safeParse(e)}async decodeAsync(e){return this.parseAsync(e)}async safeDecodeAsync(e){return this.safeParseAsync(e)}encode(e){return this.parse(e)}safeEncode(e){const t=this.safeParse(e);return t.success?{success:!0,data:t.data}:t}async encodeAsync(e){return this.parseAsync(e)}async safeEncodeAsync(e){const t=await this.safeParseAsync(e);return t.success?{success:!0,data:t.data}:t}spa(e){return this.safeParseAsync(e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}clone(){return this}isValid(e){return this.safeParse(e).success}parseOrDefault(e,t){const s=this.safeParse(e);if(s.success)return s.data;const r=this.safeParse(t);if(!r.success)throw new Error(`Invalid default value provided: ${r.error.message}`);return r.data}refine(e,t){return new VldRefine(this,e,t)}superRefine(e){return new VldSuperRefine(this,e)}transform(e){return new VldTransform(this,e)}default(e){return new VldDefault(this,e)}prefault(e){return new VldPrefault(this,e)}nonoptional(e){return new VldRefine(this,e=>void 0!==e,a(e,"Expected non-optional value"))}array(){return n.array(this)}or(e){return n.union(this,e)}and(e){return n.intersection(this,e)}overwrite(e){return new VldTransform(this,e)}with(...e){return new VldSuperRefine(this,(t,s)=>{const r={value:t,issues:[]},a=[];for(const t of e){const e="function"==typeof t?t:t._zod?.check;if(!e)continue;const s=e(r);i(s)&&a.push(Promise.resolve(s))}const n=()=>{for(const e of r.issues)s.addIssue(void 0===e.code?{message:e.message||"Custom check failed"}:{message:e.message||"Custom check failed",code:e.code})};if(a.length>0)return Promise.all(a).then(n);n()})}toJSONSchema(e){return n.toJSONSchema(this,e)}catch(e){return new VldCatch(this,e)}optional(){return new VldOptional(this)}nullable(){return new VldNullable(this)}nullish(){return new VldNullish(this)}exactOptional(){return new VldExactOptional(this)}pipe(e){return new VldPipe(this,e)}readonly(){return new VldReadonly(this)}brand(){return new VldBrand(this)}apply(e){return e(this)}check(e,t){return this.refine(e,t)}meta(t){if(void 0===t)return e.get(this)??this.baseValidator?.meta?.()??this.schema?.meta?.()??this.inner?.meta?.();const s=new VldMeta(this,t);return e.add(s,t),s}register(e,t){return e.add(this,t),this}describe(e){return this.meta({description:e})}get description(){return this.meta()?.description??this.baseValidator?.description??this.schema?.description??this.inner?.description}}class VldMeta extends VldBase{constructor(e,t){super(r.META),this.baseValidator=e,this.metadata=t}parse(e){return this.baseValidator.parse(e)}safeParse(e){return this.baseValidator.safeParse(e)}getMeta(){return{...this.metadata}}meta(t){if(void 0===t)return{...this.metadata,...e.get(this)};const s=new VldMeta(this.baseValidator,{...this.metadata,...t});return e.add(s,s.getMeta()),s}describe(e){return this.meta({description:e})}}class VldReadonly extends VldBase{constructor(e){super(r.READONLY),this.baseValidator=e}parse(e){return this.baseValidator.parse(e)}safeParse(e){const t=this.baseValidator.safeParse(e);return t.success?{success:!0,data:t.data}:{success:!1,error:t.error}}}class VldBrand extends VldBase{constructor(e){super(r.BRAND),this.baseValidator=e}parse(e){return this.baseValidator.parse(e)}safeParse(e){const t=this.baseValidator.safeParse(e);return t.success?{success:!0,data:t.data}:{success:!1,error:t.error}}}class VldRefine extends VldBase{constructor(e,t,s){super(r.REFINE),this.baseValidator=e,this.predicate=t,this.customMessage=s??"Refinement check failed","object"==typeof s&&null!==s&&"path"in s&&Array.isArray(s.path)&&(this.refinePath=s.path)}_createIssue(e){if("function"==typeof this.customMessage){const t=this.customMessage(e);return"string"==typeof t?{code:"custom",path:this.refinePath??[],message:t}:{code:"custom",path:t?.path??this.refinePath??[],message:t?.message??"Refinement check failed"}}if("object"==typeof this.customMessage&&null!==this.customMessage){const e=this.customMessage.message??this.customMessage.error,t="function"==typeof e?e({}):"string"==typeof e?e:"Refinement check failed";return{code:"custom",path:this.customMessage.path??this.refinePath??[],message:t}}return{code:"custom",path:this.refinePath??[],message:"string"==typeof this.customMessage?this.customMessage:"Refinement check failed"}}parse(e){const s=this.baseValidator.parse(e),r=this.predicate(s);if(i(r))throw new Error("Use parseAsync for async refinements");if(!r)throw new t([this._createIssue(s)]);return s}safeParse(e){try{return{success:!0,data:this.parse(e)}}catch(e){return{success:!1,error:s(e)}}}async parseAsync(e){const s=await this.baseValidator.parseAsync(e);if(!await this.predicate(s))throw new t([this._createIssue(s)]);return s}async safeParseAsync(e){try{return{success:!0,data:await this.parseAsync(e)}}catch(e){return{success:!1,error:s(e)}}}_wrap(e){return new VldRefine(e,this.predicate,this.customMessage)}min(e,t){return this._wrap(this.baseValidator.min?.(e,t)??this.baseValidator)}max(e,t){return this._wrap(this.baseValidator.max?.(e,t)??this.baseValidator)}length(e,t){return this._wrap(this.baseValidator.length?.(e,t)??this.baseValidator)}email(e){return this._wrap(this.baseValidator.email?.(e)??this.baseValidator)}url(e){return this._wrap(this.baseValidator.url?.(e)??this.baseValidator)}uuid(e){return this._wrap(this.baseValidator.uuid?.(e)??this.baseValidator)}regex(e,t){return this._wrap(this.baseValidator.regex?.(e,t)??this.baseValidator)}startsWith(e,t){return this._wrap(this.baseValidator.startsWith?.(e,t)??this.baseValidator)}endsWith(e,t){return this._wrap(this.baseValidator.endsWith?.(e,t)??this.baseValidator)}includes(e,t){return this._wrap(this.baseValidator.includes?.(e,t)??this.baseValidator)}ip(e){return this._wrap(this.baseValidator.ip?.(e)??this.baseValidator)}ipv4(e){return this._wrap(this.baseValidator.ipv4?.(e)??this.baseValidator)}ipv6(e){return this._wrap(this.baseValidator.ipv6?.(e)??this.baseValidator)}nonempty(e){return this._wrap(this.baseValidator.nonempty?.(e)??this.baseValidator)}trim(){return this._wrap(this.baseValidator.trim?.()??this.baseValidator)}toLowerCase(){return this._wrap(this.baseValidator.toLowerCase?.()??this.baseValidator)}lowercase(){return this.toLowerCase()}toUpperCase(){return this._wrap(this.baseValidator.toUpperCase?.()??this.baseValidator)}uppercase(){return this.toUpperCase()}positive(e){return this._wrap(this.baseValidator.positive?.(e)??this.baseValidator)}negative(e){return this._wrap(this.baseValidator.negative?.(e)??this.baseValidator)}nonnegative(e){return this._wrap(this.baseValidator.nonnegative?.(e)??this.baseValidator)}nonpositive(e){return this._wrap(this.baseValidator.nonpositive?.(e)??this.baseValidator)}int(e){return this._wrap(this.baseValidator.int?.(e)??this.baseValidator)}finite(e){return this._wrap(this.baseValidator.finite?.(e)??this.baseValidator)}safe(e){return this._wrap(this.baseValidator.safe?.(e)??this.baseValidator)}multipleOf(e,t){return this._wrap(this.baseValidator.multipleOf?.(e,t)??this.baseValidator)}step(e,t){return this._wrap(this.baseValidator.step?.(e,t)??this.baseValidator)}gt(e,t){return this._wrap(this.baseValidator.gt?.(e,t)??this.baseValidator)}gte(e,t){return this._wrap(this.baseValidator.gte?.(e,t)??this.baseValidator)}lt(e,t){return this._wrap(this.baseValidator.lt?.(e,t)??this.baseValidator)}lte(e,t){return this._wrap(this.baseValidator.lte?.(e,t)??this.baseValidator)}extend(e){return this._wrap(this.baseValidator.extend?.(e)??this.baseValidator)}merge(e){return this._wrap(this.baseValidator.merge?.(e)??this.baseValidator)}pick(...e){return this._wrap(this.baseValidator.pick?.(...e)??this.baseValidator)}omit(...e){return this._wrap(this.baseValidator.omit?.(...e)??this.baseValidator)}partial(){return this._wrap(this.baseValidator.partial?.()??this.baseValidator)}required(){return this._wrap(this.baseValidator.required?.()??this.baseValidator)}strict(e){return this._wrap(this.baseValidator.strict?.(e)??this.baseValidator)}passthrough(){return this._wrap(this.baseValidator.passthrough?.()??this.baseValidator)}strip(){return this._wrap(this.baseValidator.strip?.()??this.baseValidator)}catchall(e){return this._wrap(this.baseValidator.catchall?.(e)??this.baseValidator)}get shape(){return this.baseValidator.shape}get keyof(){return this.baseValidator.keyof}unwrap(){return this.baseValidator.unwrap?this.baseValidator.unwrap():this.baseValidator}get element(){return this.baseValidator.element}}class VldTransform extends VldBase{constructor(e,t){super(r.TRANSFORM),this.baseValidator=e,this.transformer=t}parse(e){const t=this.baseValidator.parse(e);try{const e=this.transformer(t);if(i(e))throw new Error("Use parseAsync for async transforms");return e}catch(e){throw new Error(`Transform failed: ${e.message}`)}}safeParse(e){try{return{success:!0,data:this.parse(e)}}catch(e){return{success:!1,error:s(e)}}}async parseAsync(e){const t=await this.baseValidator.parseAsync(e);try{return await this.transformer(t)}catch(e){throw new Error(`Transform failed: ${e.message}`)}}}class VldDefault extends VldBase{constructor(e,t){super(r.DEFAULT),this.baseValidator=e,this.defaultValue=t}parse(e){return void 0===e?h(this.defaultValue):this.baseValidator.parse(e)}safeParse(e){return void 0===e?{success:!0,data:h(this.defaultValue)}:this.baseValidator.safeParse(e)}prefault(e){return new VldPrefault(this.baseValidator,void 0===e?this.defaultValue:e)}unwrap(){return this.baseValidator}removeDefault(){return this.baseValidator}}class VldPrefault extends VldBase{constructor(e,t){super(r.PREFAULT),this.baseValidator=e,this.defaultValue=t}parse(e){return void 0===e?this.baseValidator.parse(h(this.defaultValue)):this.baseValidator.parse(e)}safeParse(e){return void 0===e?this.baseValidator.safeParse(h(this.defaultValue)):this.baseValidator.safeParse(e)}prefault(e){return void 0===e?this:new VldPrefault(this.baseValidator,e)}unwrap(){return this.baseValidator}}class VldCatch extends VldBase{constructor(e,t){super(r.CATCH),this.baseValidator=e,this.fallbackValue=t,this.simpleMode=u(e);const s=e.safeParse(t);if(!s.success)throw new Error(`Invalid fallback value: ${s.error.message}`)}parse(e){const t=l(this.simpleMode,e);if(void 0!==t)return t;if(void 0!==this.simpleMode)return this.fallbackValue;try{return this.baseValidator.parse(e)}catch{return this.fallbackValue}}safeParse(e){const t=l(this.simpleMode,e);if(void 0!==t)return{success:!0,data:t};if(void 0!==this.simpleMode)return{success:!0,data:this.fallbackValue};const s=this.baseValidator.safeParse(e);return s.success?s:{success:!0,data:this.fallbackValue}}}class VldOptional extends VldBase{constructor(e){super(r.OPTIONAL),this.baseValidator=e,this.simpleMode=u(e)}parseSimpleValue(e){return l(this.simpleMode,e)}static create(e){return new VldOptional(e)}parse(e){if(void 0===e)return;const t=this.parseSimpleValue(e);return void 0!==t?t:this.baseValidator.parse(e)}safeParse(e){if(void 0===e)return{success:!0,data:void 0};const t=this.parseSimpleValue(e);return void 0!==t?{success:!0,data:t}:this.baseValidator.safeParse(e)}unwrap(){return this.baseValidator}}class VldExactOptional extends VldBase{constructor(e){super(r.EXACT_OPTIONAL),this.baseValidator=e,this.simpleMode=u(e)}static create(e){return new VldExactOptional(e)}parse(e){if(void 0===e)return;const t=l(this.simpleMode,e);return void 0!==t?t:this.baseValidator.parse(e)}safeParse(e){if(void 0===e)return{success:!0,data:void 0};const t=l(this.simpleMode,e);return void 0!==t?{success:!0,data:t}:this.baseValidator.safeParse(e)}unwrap(){return this.baseValidator}}class VldNullable extends VldBase{constructor(e){super(r.NULLABLE),this.baseValidator=e,this.simpleMode=u(e)}static create(e){return new VldNullable(e)}parse(e){if(null===e)return null;const t=l(this.simpleMode,e);return void 0!==t?t:this.baseValidator.parse(e)}safeParse(e){if(null===e)return{success:!0,data:null};const t=l(this.simpleMode,e);return void 0!==t?{success:!0,data:t}:this.baseValidator.safeParse(e)}unwrap(){return this.baseValidator}}class VldNullish extends VldBase{constructor(e){super(r.NULLISH),this.baseValidator=e,this.simpleMode=u(e)}static create(e){return new VldNullish(e)}parse(e){if(null==e)return e;const t=l(this.simpleMode,e);return void 0!==t?t:this.baseValidator.parse(e)}safeParse(e){if(null==e)return{success:!0,data:e};const t=l(this.simpleMode,e);return void 0!==t?{success:!0,data:t}:this.baseValidator.safeParse(e)}unwrap(){return this.baseValidator}}class VldPipe extends VldBase{constructor(e,t){super(r.PIPE),this.first=e,this.second=t}parse(e){const t=this.first.parse(e);return this.second.parse(t)}safeParse(e){const t=this.first.safeParse(e);return t.success?this.second.safeParse(t.data):{success:!1,error:t.error}}}class VldSuperRefine extends VldBase{constructor(e,t){super(r.SUPER_REFINE),this._inner=e,this._refinement=t}parse(e){const s=this._inner.parse(e),r=[],a={addIssue:e=>{r.push({code:e.code||"custom",path:e.path??[],message:e.message||"Validation error"})},path:[]};if(this._refinement(s,a)instanceof Promise)throw new Error("Use parseAsync for async refinements");if(r.length>0)throw new t(r,r.map(e=>e.message).join("; "));return s}safeParse(e){const r=this._inner.safeParse(e);if(!r.success)return{success:!1,error:s(r.error)};const a=[],i={addIssue:e=>{a.push({code:e.code||"custom",path:e.path??[],message:e.message||"Validation error"})},path:[]};if(this._refinement(r.data,i)instanceof Promise)throw new Error("Use safeParseAsync for async refinements");return a.length>0?{success:!1,error:new t(a,a.map(e=>e.message).join("; "))}:r}async parseAsync(e){const s=await this._inner.parseAsync(e),r=[],a={addIssue:e=>{r.push({code:e.code||"custom",path:e.path??[],message:e.message||"Validation error"})},path:[]};if(await this._refinement(s,a),r.length>0)throw new t(r,r.map(e=>e.message).join("; "));return s}async safeParseAsync(e){try{return{success:!0,data:await this.parseAsync(e)}}catch(e){return{success:!1,error:s(e)}}}_wrap(e){return new VldSuperRefine(e,this._refinement)}min(e,t){return this._wrap(this._inner.min?.(e,t)??this._inner)}max(e,t){return this._wrap(this._inner.max?.(e,t)??this._inner)}length(e,t){return this._wrap(this._inner.length?.(e,t)??this._inner)}email(e){return this._wrap(this._inner.email?.(e)??this._inner)}url(e){return this._wrap(this._inner.url?.(e)??this._inner)}uuid(e){return this._wrap(this._inner.uuid?.(e)??this._inner)}regex(e,t){return this._wrap(this._inner.regex?.(e,t)??this._inner)}startsWith(e,t){return this._wrap(this._inner.startsWith?.(e,t)??this._inner)}endsWith(e,t){return this._wrap(this._inner.endsWith?.(e,t)??this._inner)}includes(e,t){return this._wrap(this._inner.includes?.(e,t)??this._inner)}ip(e){return this._wrap(this._inner.ip?.(e)??this._inner)}ipv4(e){return this._wrap(this._inner.ipv4?.(e)??this._inner)}ipv6(e){return this._wrap(this._inner.ipv6?.(e)??this._inner)}nonempty(e){return this._wrap(this._inner.nonempty?.(e)??this._inner)}trim(){return this._wrap(this._inner.trim?.()??this._inner)}toLowerCase(){return this._wrap(this._inner.toLowerCase?.()??this._inner)}lowercase(){return this.toLowerCase()}toUpperCase(){return this._wrap(this._inner.toUpperCase?.()??this._inner)}uppercase(){return this.toUpperCase()}positive(e){return this._wrap(this._inner.positive?.(e)??this._inner)}negative(e){return this._wrap(this._inner.negative?.(e)??this._inner)}nonnegative(e){return this._wrap(this._inner.nonnegative?.(e)??this._inner)}nonpositive(e){return this._wrap(this._inner.nonpositive?.(e)??this._inner)}int(e){return this._wrap(this._inner.int?.(e)??this._inner)}finite(e){return this._wrap(this._inner.finite?.(e)??this._inner)}safe(e){return this._wrap(this._inner.safe?.(e)??this._inner)}multipleOf(e,t){return this._wrap(this._inner.multipleOf?.(e,t)??this._inner)}step(e,t){return this._wrap(this._inner.step?.(e,t)??this._inner)}gt(e,t){return this._wrap(this._inner.gt?.(e,t)??this._inner)}gte(e,t){return this._wrap(this._inner.gte?.(e,t)??this._inner)}lt(e,t){return this._wrap(this._inner.lt?.(e,t)??this._inner)}lte(e,t){return this._wrap(this._inner.lte?.(e,t)??this._inner)}extend(e){return this._wrap(this._inner.extend?.(e)??this._inner)}merge(e){return this._wrap(this._inner.merge?.(e)??this._inner)}pick(...e){return this._wrap(this._inner.pick?.(...e)??this._inner)}omit(...e){return this._wrap(this._inner.omit?.(...e)??this._inner)}partial(){return this._wrap(this._inner.partial?.()??this._inner)}required(){return this._wrap(this._inner.required?.()??this._inner)}strict(e){return this._wrap(this._inner.strict?.(e)??this._inner)}passthrough(){return this._wrap(this._inner.passthrough?.()??this._inner)}strip(){return this._wrap(this._inner.strip?.()??this._inner)}catchall(e){return this._wrap(this._inner.catchall?.(e)??this._inner)}get shape(){return this._inner.shape}get keyof(){return this._inner.keyof}unwrap(){return this._inner.unwrap?this._inner.unwrap():this._inner}get element(){return this._inner.element}}class VldPreprocess extends VldBase{constructor(e,t){super(r.PREPROCESS),this._preprocessor=e,this._schema=t}static create(e,t){return new VldPreprocess(e,t)}parse(e){const t=this._preprocessor(e);return this._schema.parse(t)}safeParse(e){try{const t=this._preprocessor(e);return this._schema.safeParse(t)}catch(e){return{success:!1,error:s(e)}}}}export{r as VLD_VALIDATOR_TYPES,VldBase,VldBrand,VldCatch,VldDefault,VldExactOptional,VldMeta,VldNullable,VldNullish,VldOptional,VldPipe,VldPrefault,VldPreprocess,VldReadonly,VldRefine,VldSuperRefine,VldTransform,o as configureSchemaCompositionFactories,s as ensureVldError,i as isPromiseLike,a as resolveErrorMessage};
1
+ import{globalRegistry as e}from"../registry.js";import{V as t}from"../chunks/errors-core-BU14-Dk8.js";function s(e){if(e instanceof t)return e;const s=e instanceof Error?e.message:String(e);return new t([{code:"custom",path:[],message:s}])}const r=Symbol.for("@oxog/vld/compile-invalid");function a(e){let t=null;try{const s=globalThis?.["@oxog/vld/lazy-validate-compiler"];t=(s?s(e):null)??null}catch{t=null}return Object.defineProperty(e,"__vldValidateFn",{value:t,enumerable:!1,configurable:!0}),t}const i={STRING:"string",STRING_FORMAT:"stringFormat",STRING_BOOL:"stringBool",NUMBER:"number",BOOLEAN:"boolean",DATE:"date",BIGINT:"bigint",UNDEFINED:"undefined",NULL:"null",UNKNOWN:"unknown",ANY:"any",VOID:"void",NEVER:"never",SYMBOL:"symbol",NAN:"nan",HEX:"hex",BASE64:"base64",UINT8_ARRAY:"uint8Array",COERCE_STRING:"coerceString",COERCE_NUMBER:"coerceNumber",COERCE_BOOLEAN:"coerceBoolean",COERCE_DATE:"coerceDate",COERCE_BIGINT:"coerceBigint",OBJECT:"object",ARRAY:"array",TUPLE:"tuple",SET:"set",MAP:"map",RECORD:"record",UNION:"union",DISCRIMINATED_UNION:"discriminatedUnion",INTERSECTION:"intersection",XOR:"xor",ENUM:"enum",LITERAL:"literal",LAZY:"lazy",CUSTOM:"custom",FUNCTION:"function",FILE:"file",JSON:"json",TEMPLATE_LITERAL:"templateLiteral",PROMISE:"promise",OPTIONAL:"optional",NULLABLE:"nullable",NULLISH:"nullish",EXACT_OPTIONAL:"exactOptional",DEFAULT:"default",CATCH:"catch",REFINE:"refine",TRANSFORM:"transform",PIPE:"pipe",PREPROCESS:"preprocess",SUPER_REFINE:"superRefine",BRAND:"brand",READONLY:"readonly",META:"meta",PREFAULT:"prefault",PREFault:"prefault",CODEC:"codec"};function n(e,t){if("string"==typeof e)return e;if("function"==typeof e){const s=e(void 0);return"string"==typeof s?s:"object"==typeof s&&s?.message?s.message:t}if("object"==typeof e&&null!==e){if("string"==typeof e.error)return e.error;if("function"==typeof e.error)return e.error({})||t;if("string"==typeof e.message)return e.message}return t}function o(e){return null!==e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}let h;function l(e){h=e}function u(e){return"function"==typeof e?e():function(e){if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(null!==e&&"object"==typeof e){const t=Object.getPrototypeOf(e);if(t===Object.prototype||null===t)return{...e}}return e}(e)}function d(e){if(!0===e.isSimple)switch(e.validatorType){case i.STRING:return"string";case i.NUMBER:return"number";case i.BOOLEAN:return"boolean";case i.BIGINT:return"bigint";case i.SYMBOL:return"symbol";default:return}}function c(e,t){switch(e){case"string":return"string"==typeof t?t:void 0;case"number":return"number"!=typeof t||isNaN(t)?void 0:t;case"boolean":return"boolean"==typeof t?t:void 0;case"bigint":return"bigint"==typeof t?t:void 0;case"symbol":return"symbol"==typeof t?t:void 0;default:return}}class VldBase{constructor(e="unknown"){this.validatorType=e}get type(){return this.validatorType}get _def(){return{typeName:"Zod"+this.validatorType.charAt(0).toUpperCase()+this.validatorType.slice(1),...this.config||{}}}get def(){return this._def}get _zod(){return this._def}get"~standard"(){return{version:1,vendor:"vld",validate:e=>{const t=this.safeParse(e);return t.success?{value:t.data}:{issues:[{message:t.error.message}]}},types:void 0}}async parseAsync(e){return this.parse(e)}async safeParseAsync(e){try{return{success:!0,data:await this.parseAsync(e)}}catch(e){return{success:!1,error:s(e)}}}decode(e){return this.parse(e)}safeDecode(e){return this.safeParse(e)}async decodeAsync(e){return this.parseAsync(e)}async safeDecodeAsync(e){return this.safeParseAsync(e)}encode(e){return this.parse(e)}safeEncode(e){const t=this.safeParse(e);return t.success?{success:!0,data:t.data}:t}async encodeAsync(e){return this.parseAsync(e)}async safeEncodeAsync(e){const t=await this.safeParseAsync(e);return t.success?{success:!0,data:t.data}:t}spa(e){return this.safeParseAsync(e)}validate(e){const t=this.__vldValidateFn;return void 0!==t?null!==t?t(e)!==r:this.validateWithRuntimeParser(e):this.initValidate(e)}validateWithRuntimeParser(e){let t=this.__vldSafeFn;return void 0===t&&(t=this.__vldSafeFn=this.safeParse.bind(this)),Boolean(t(e).success)}initValidate(e){const t=this,s=t._zod?.bag,i=s?.validatorValidate??s?.validator;if(void 0!==i)return Object.defineProperty(t,"__vldValidateFn",{value:i,enumerable:!1,configurable:!0}),i(e)!==r;const n=a(t);return null!==n?n(e)!==r:this.validateWithRuntimeParser(e)}async validateAsync(e){const t=this.__vldValidateFn;if(null!=t)return t(e)!==r;if(void 0===t){this.initValidate(e);const t=this.__vldValidateFn;if(null!=t)return t(e)!==r}return(await this.safeParseAsync(e)).success}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}clone(){return this}isValid(e){return this.validate(e)}parseOrDefault(e,t){const s=this.safeParse(e);if(s.success)return s.data;const r=this.safeParse(t);if(!r.success)throw new Error(`Invalid default value provided: ${r.error.message}`);return r.data}refine(e,t){return new VldRefine(this,e,t)}superRefine(e){return new VldSuperRefine(this,e)}transform(e){return new VldTransform(this,e)}default(e){return new VldDefault(this,e)}prefault(e){return new VldPrefault(this,e)}nonoptional(e){return new VldRefine(this,e=>void 0!==e,n(e,"Expected non-optional value"))}array(){return h.array(this)}or(e){return h.union(this,e)}and(e){return h.intersection(this,e)}overwrite(e){return new VldTransform(this,e)}with(...e){return new VldSuperRefine(this,(t,s)=>{const r={value:t,issues:[]},a=[];for(const t of e){const e="function"==typeof t?t:t._zod?.check;if(!e)continue;const s=e(r);o(s)&&a.push(Promise.resolve(s))}const i=()=>{for(const e of r.issues)s.addIssue(void 0===e.code?{message:e.message||"Custom check failed"}:{message:e.message||"Custom check failed",code:e.code})};if(a.length>0)return Promise.all(a).then(i);i()})}toJSONSchema(e){return h.toJSONSchema(this,e)}catch(e){return new VldCatch(this,e)}optional(){return new VldOptional(this)}nullable(){return new VldNullable(this)}nullish(){return new VldNullish(this)}exactOptional(){return new VldExactOptional(this)}pipe(e){return new VldPipe(this,e)}readonly(){return new VldReadonly(this)}brand(){return new VldBrand(this)}apply(e){return e(this)}check(e,t){return this.refine(e,t)}meta(t){if(void 0===t)return e.get(this)??this.baseValidator?.meta?.()??this.schema?.meta?.()??this.inner?.meta?.();const s=new VldMeta(this,t);return e.add(s,t),s}register(e,t){return e.add(this,t),this}describe(e){return this.meta({description:e})}get description(){return this.meta()?.description??this.baseValidator?.description??this.schema?.description??this.inner?.description}}class VldMeta extends VldBase{constructor(e,t){super(i.META),this.baseValidator=e,this.metadata=t}parse(e){return this.baseValidator.parse(e)}safeParse(e){return this.baseValidator.safeParse(e)}getMeta(){return{...this.metadata}}meta(t){if(void 0===t)return{...this.metadata,...e.get(this)};const s=new VldMeta(this.baseValidator,{...this.metadata,...t});return e.add(s,s.getMeta()),s}describe(e){return this.meta({description:e})}}class VldReadonly extends VldBase{constructor(e){super(i.READONLY),this.baseValidator=e}parse(e){return this.baseValidator.parse(e)}safeParse(e){const t=this.baseValidator.safeParse(e);return t.success?{success:!0,data:t.data}:{success:!1,error:t.error}}}class VldBrand extends VldBase{constructor(e){super(i.BRAND),this.baseValidator=e}parse(e){return this.baseValidator.parse(e)}safeParse(e){const t=this.baseValidator.safeParse(e);return t.success?{success:!0,data:t.data}:{success:!1,error:t.error}}}class VldRefine extends VldBase{constructor(e,t,s){super(i.REFINE),this.baseValidator=e,this.predicate=t,this.customMessage=s??"Refinement check failed","object"==typeof s&&null!==s&&"path"in s&&Array.isArray(s.path)&&(this.refinePath=s.path)}_createIssue(e){if("function"==typeof this.customMessage){const t=this.customMessage(e);return"string"==typeof t?{code:"custom",path:this.refinePath??[],message:t}:{code:"custom",path:t?.path??this.refinePath??[],message:t?.message??"Refinement check failed"}}if("object"==typeof this.customMessage&&null!==this.customMessage){const e=this.customMessage.message??this.customMessage.error,t="function"==typeof e?e({}):"string"==typeof e?e:"Refinement check failed";return{code:"custom",path:this.customMessage.path??this.refinePath??[],message:t}}return{code:"custom",path:this.refinePath??[],message:"string"==typeof this.customMessage?this.customMessage:"Refinement check failed"}}parse(e){const s=this.baseValidator.parse(e),r=this.predicate(s);if(o(r))throw new Error("Use parseAsync for async refinements");if(!r)throw new t([this._createIssue(s)]);return s}safeParse(e){try{return{success:!0,data:this.parse(e)}}catch(e){return{success:!1,error:s(e)}}}async parseAsync(e){const s=await this.baseValidator.parseAsync(e);if(!await this.predicate(s))throw new t([this._createIssue(s)]);return s}async safeParseAsync(e){try{return{success:!0,data:await this.parseAsync(e)}}catch(e){return{success:!1,error:s(e)}}}_wrap(e){return new VldRefine(e,this.predicate,this.customMessage)}min(e,t){return this._wrap(this.baseValidator.min?.(e,t)??this.baseValidator)}max(e,t){return this._wrap(this.baseValidator.max?.(e,t)??this.baseValidator)}length(e,t){return this._wrap(this.baseValidator.length?.(e,t)??this.baseValidator)}email(e){return this._wrap(this.baseValidator.email?.(e)??this.baseValidator)}url(e){return this._wrap(this.baseValidator.url?.(e)??this.baseValidator)}uuid(e){return this._wrap(this.baseValidator.uuid?.(e)??this.baseValidator)}regex(e,t){return this._wrap(this.baseValidator.regex?.(e,t)??this.baseValidator)}startsWith(e,t){return this._wrap(this.baseValidator.startsWith?.(e,t)??this.baseValidator)}endsWith(e,t){return this._wrap(this.baseValidator.endsWith?.(e,t)??this.baseValidator)}includes(e,t){return this._wrap(this.baseValidator.includes?.(e,t)??this.baseValidator)}ip(e){return this._wrap(this.baseValidator.ip?.(e)??this.baseValidator)}ipv4(e){return this._wrap(this.baseValidator.ipv4?.(e)??this.baseValidator)}ipv6(e){return this._wrap(this.baseValidator.ipv6?.(e)??this.baseValidator)}nonempty(e){return this._wrap(this.baseValidator.nonempty?.(e)??this.baseValidator)}trim(){return this._wrap(this.baseValidator.trim?.()??this.baseValidator)}toLowerCase(){return this._wrap(this.baseValidator.toLowerCase?.()??this.baseValidator)}lowercase(){return this.toLowerCase()}toUpperCase(){return this._wrap(this.baseValidator.toUpperCase?.()??this.baseValidator)}uppercase(){return this.toUpperCase()}positive(e){return this._wrap(this.baseValidator.positive?.(e)??this.baseValidator)}negative(e){return this._wrap(this.baseValidator.negative?.(e)??this.baseValidator)}nonnegative(e){return this._wrap(this.baseValidator.nonnegative?.(e)??this.baseValidator)}nonpositive(e){return this._wrap(this.baseValidator.nonpositive?.(e)??this.baseValidator)}int(e){return this._wrap(this.baseValidator.int?.(e)??this.baseValidator)}finite(e){return this._wrap(this.baseValidator.finite?.(e)??this.baseValidator)}safe(e){return this._wrap(this.baseValidator.safe?.(e)??this.baseValidator)}multipleOf(e,t){return this._wrap(this.baseValidator.multipleOf?.(e,t)??this.baseValidator)}step(e,t){return this._wrap(this.baseValidator.step?.(e,t)??this.baseValidator)}gt(e,t){return this._wrap(this.baseValidator.gt?.(e,t)??this.baseValidator)}gte(e,t){return this._wrap(this.baseValidator.gte?.(e,t)??this.baseValidator)}lt(e,t){return this._wrap(this.baseValidator.lt?.(e,t)??this.baseValidator)}lte(e,t){return this._wrap(this.baseValidator.lte?.(e,t)??this.baseValidator)}extend(e){return this._wrap(this.baseValidator.extend?.(e)??this.baseValidator)}merge(e){return this._wrap(this.baseValidator.merge?.(e)??this.baseValidator)}pick(...e){return this._wrap(this.baseValidator.pick?.(...e)??this.baseValidator)}omit(...e){return this._wrap(this.baseValidator.omit?.(...e)??this.baseValidator)}partial(){return this._wrap(this.baseValidator.partial?.()??this.baseValidator)}required(){return this._wrap(this.baseValidator.required?.()??this.baseValidator)}strict(e){return this._wrap(this.baseValidator.strict?.(e)??this.baseValidator)}passthrough(){return this._wrap(this.baseValidator.passthrough?.()??this.baseValidator)}strip(){return this._wrap(this.baseValidator.strip?.()??this.baseValidator)}catchall(e){return this._wrap(this.baseValidator.catchall?.(e)??this.baseValidator)}get shape(){return this.baseValidator.shape}get keyof(){return this.baseValidator.keyof}unwrap(){return this.baseValidator.unwrap?this.baseValidator.unwrap():this.baseValidator}get element(){return this.baseValidator.element}}class VldTransform extends VldBase{constructor(e,t){super(i.TRANSFORM),this.baseValidator=e,this.transformer=t}parse(e){const t=this.baseValidator.parse(e);try{const e=this.transformer(t);if(o(e))throw new Error("Use parseAsync for async transforms");return e}catch(e){throw new Error(`Transform failed: ${e.message}`)}}safeParse(e){try{return{success:!0,data:this.parse(e)}}catch(e){return{success:!1,error:s(e)}}}async parseAsync(e){const t=await this.baseValidator.parseAsync(e);try{return await this.transformer(t)}catch(e){throw new Error(`Transform failed: ${e.message}`)}}}class VldDefault extends VldBase{constructor(e,t){super(i.DEFAULT),this.baseValidator=e,this.defaultValue=t}parse(e){return void 0===e?u(this.defaultValue):this.baseValidator.parse(e)}safeParse(e){return void 0===e?{success:!0,data:u(this.defaultValue)}:this.baseValidator.safeParse(e)}prefault(e){return new VldPrefault(this.baseValidator,void 0===e?this.defaultValue:e)}unwrap(){return this.baseValidator}removeDefault(){return this.baseValidator}}class VldPrefault extends VldBase{constructor(e,t){super(i.PREFAULT),this.baseValidator=e,this.defaultValue=t}parse(e){return void 0===e?this.baseValidator.parse(u(this.defaultValue)):this.baseValidator.parse(e)}safeParse(e){return void 0===e?this.baseValidator.safeParse(u(this.defaultValue)):this.baseValidator.safeParse(e)}prefault(e){return void 0===e?this:new VldPrefault(this.baseValidator,e)}unwrap(){return this.baseValidator}}class VldCatch extends VldBase{constructor(e,t){super(i.CATCH),this.baseValidator=e,this.fallbackValue=t,this.simpleMode=d(e);const s=e.safeParse(t);if(!s.success)throw new Error(`Invalid fallback value: ${s.error.message}`)}parse(e){const t=c(this.simpleMode,e);if(void 0!==t)return t;if(void 0!==this.simpleMode)return this.fallbackValue;try{return this.baseValidator.parse(e)}catch{return this.fallbackValue}}safeParse(e){const t=c(this.simpleMode,e);if(void 0!==t)return{success:!0,data:t};if(void 0!==this.simpleMode)return{success:!0,data:this.fallbackValue};const s=this.baseValidator.safeParse(e);return s.success?s:{success:!0,data:this.fallbackValue}}}class VldOptional extends VldBase{constructor(e){super(i.OPTIONAL),this.baseValidator=e,this.simpleMode=d(e)}parseSimpleValue(e){return c(this.simpleMode,e)}static create(e){return new VldOptional(e)}parse(e){if(void 0===e)return;const t=this.parseSimpleValue(e);return void 0!==t?t:this.baseValidator.parse(e)}safeParse(e){if(void 0===e)return{success:!0,data:void 0};const t=this.parseSimpleValue(e);return void 0!==t?{success:!0,data:t}:this.baseValidator.safeParse(e)}unwrap(){return this.baseValidator}}class VldExactOptional extends VldBase{constructor(e){super(i.EXACT_OPTIONAL),this.baseValidator=e,this.simpleMode=d(e)}static create(e){return new VldExactOptional(e)}parse(e){if(void 0===e)return;const t=c(this.simpleMode,e);return void 0!==t?t:this.baseValidator.parse(e)}safeParse(e){if(void 0===e)return{success:!0,data:void 0};const t=c(this.simpleMode,e);return void 0!==t?{success:!0,data:t}:this.baseValidator.safeParse(e)}unwrap(){return this.baseValidator}}class VldNullable extends VldBase{constructor(e){super(i.NULLABLE),this.baseValidator=e,this.simpleMode=d(e)}static create(e){return new VldNullable(e)}parse(e){if(null===e)return null;const t=c(this.simpleMode,e);return void 0!==t?t:this.baseValidator.parse(e)}safeParse(e){if(null===e)return{success:!0,data:null};const t=c(this.simpleMode,e);return void 0!==t?{success:!0,data:t}:this.baseValidator.safeParse(e)}unwrap(){return this.baseValidator}}class VldNullish extends VldBase{constructor(e){super(i.NULLISH),this.baseValidator=e,this.simpleMode=d(e)}static create(e){return new VldNullish(e)}parse(e){if(null==e)return e;const t=c(this.simpleMode,e);return void 0!==t?t:this.baseValidator.parse(e)}safeParse(e){if(null==e)return{success:!0,data:e};const t=c(this.simpleMode,e);return void 0!==t?{success:!0,data:t}:this.baseValidator.safeParse(e)}unwrap(){return this.baseValidator}}class VldPipe extends VldBase{constructor(e,t){super(i.PIPE),this.first=e,this.second=t}parse(e){const t=this.first.parse(e);return this.second.parse(t)}safeParse(e){const t=this.first.safeParse(e);return t.success?this.second.safeParse(t.data):{success:!1,error:t.error}}}class VldSuperRefine extends VldBase{constructor(e,t){super(i.SUPER_REFINE),this._inner=e,this._refinement=t}parse(e){const s=this._inner.parse(e),r=[],a={addIssue:e=>{r.push({code:e.code||"custom",path:e.path??[],message:e.message||"Validation error"})},path:[]};if(this._refinement(s,a)instanceof Promise)throw new Error("Use parseAsync for async refinements");if(r.length>0)throw new t(r,r.map(e=>e.message).join("; "));return s}safeParse(e){const r=this._inner.safeParse(e);if(!r.success)return{success:!1,error:s(r.error)};const a=[],i={addIssue:e=>{a.push({code:e.code||"custom",path:e.path??[],message:e.message||"Validation error"})},path:[]};if(this._refinement(r.data,i)instanceof Promise)throw new Error("Use safeParseAsync for async refinements");return a.length>0?{success:!1,error:new t(a,a.map(e=>e.message).join("; "))}:r}async parseAsync(e){const s=await this._inner.parseAsync(e),r=[],a={addIssue:e=>{r.push({code:e.code||"custom",path:e.path??[],message:e.message||"Validation error"})},path:[]};if(await this._refinement(s,a),r.length>0)throw new t(r,r.map(e=>e.message).join("; "));return s}async safeParseAsync(e){try{return{success:!0,data:await this.parseAsync(e)}}catch(e){return{success:!1,error:s(e)}}}_wrap(e){return new VldSuperRefine(e,this._refinement)}min(e,t){return this._wrap(this._inner.min?.(e,t)??this._inner)}max(e,t){return this._wrap(this._inner.max?.(e,t)??this._inner)}length(e,t){return this._wrap(this._inner.length?.(e,t)??this._inner)}email(e){return this._wrap(this._inner.email?.(e)??this._inner)}url(e){return this._wrap(this._inner.url?.(e)??this._inner)}uuid(e){return this._wrap(this._inner.uuid?.(e)??this._inner)}regex(e,t){return this._wrap(this._inner.regex?.(e,t)??this._inner)}startsWith(e,t){return this._wrap(this._inner.startsWith?.(e,t)??this._inner)}endsWith(e,t){return this._wrap(this._inner.endsWith?.(e,t)??this._inner)}includes(e,t){return this._wrap(this._inner.includes?.(e,t)??this._inner)}ip(e){return this._wrap(this._inner.ip?.(e)??this._inner)}ipv4(e){return this._wrap(this._inner.ipv4?.(e)??this._inner)}ipv6(e){return this._wrap(this._inner.ipv6?.(e)??this._inner)}nonempty(e){return this._wrap(this._inner.nonempty?.(e)??this._inner)}trim(){return this._wrap(this._inner.trim?.()??this._inner)}toLowerCase(){return this._wrap(this._inner.toLowerCase?.()??this._inner)}lowercase(){return this.toLowerCase()}toUpperCase(){return this._wrap(this._inner.toUpperCase?.()??this._inner)}uppercase(){return this.toUpperCase()}positive(e){return this._wrap(this._inner.positive?.(e)??this._inner)}negative(e){return this._wrap(this._inner.negative?.(e)??this._inner)}nonnegative(e){return this._wrap(this._inner.nonnegative?.(e)??this._inner)}nonpositive(e){return this._wrap(this._inner.nonpositive?.(e)??this._inner)}int(e){return this._wrap(this._inner.int?.(e)??this._inner)}finite(e){return this._wrap(this._inner.finite?.(e)??this._inner)}safe(e){return this._wrap(this._inner.safe?.(e)??this._inner)}multipleOf(e,t){return this._wrap(this._inner.multipleOf?.(e,t)??this._inner)}step(e,t){return this._wrap(this._inner.step?.(e,t)??this._inner)}gt(e,t){return this._wrap(this._inner.gt?.(e,t)??this._inner)}gte(e,t){return this._wrap(this._inner.gte?.(e,t)??this._inner)}lt(e,t){return this._wrap(this._inner.lt?.(e,t)??this._inner)}lte(e,t){return this._wrap(this._inner.lte?.(e,t)??this._inner)}extend(e){return this._wrap(this._inner.extend?.(e)??this._inner)}merge(e){return this._wrap(this._inner.merge?.(e)??this._inner)}pick(...e){return this._wrap(this._inner.pick?.(...e)??this._inner)}omit(...e){return this._wrap(this._inner.omit?.(...e)??this._inner)}partial(){return this._wrap(this._inner.partial?.()??this._inner)}required(){return this._wrap(this._inner.required?.()??this._inner)}strict(e){return this._wrap(this._inner.strict?.(e)??this._inner)}passthrough(){return this._wrap(this._inner.passthrough?.()??this._inner)}strip(){return this._wrap(this._inner.strip?.()??this._inner)}catchall(e){return this._wrap(this._inner.catchall?.(e)??this._inner)}get shape(){return this._inner.shape}get keyof(){return this._inner.keyof}unwrap(){return this._inner.unwrap?this._inner.unwrap():this._inner}get element(){return this._inner.element}}class VldPreprocess extends VldBase{constructor(e,t){super(i.PREPROCESS),this._preprocessor=e,this._schema=t}static create(e,t){return new VldPreprocess(e,t)}parse(e){const t=this._preprocessor(e);return this._schema.parse(t)}safeParse(e){try{const t=this._preprocessor(e);return this._schema.safeParse(t)}catch(e){return{success:!1,error:s(e)}}}}export{i as VLD_VALIDATOR_TYPES,VldBase,VldBrand,VldCatch,VldDefault,VldExactOptional,VldMeta,VldNullable,VldNullish,VldOptional,VldPipe,VldPrefault,VldPreprocess,VldReadonly,VldRefine,VldSuperRefine,VldTransform,l as configureSchemaCompositionFactories,s as ensureVldError,o as isPromiseLike,n as resolveErrorMessage};
@@ -1,5 +1,5 @@
1
1
  /**
2
- * VldBigIntV2 OPTIMIZED: check returns Issue | null.
2
+ * VldBigIntV2 - OPTIMIZED: check returns Issue | null.
3
3
  */
4
4
  import { VldBase, type ErrorParam, type ParseResult } from './base.js';
5
5
  import { type VldIssue } from '../errors-core.js';
@@ -44,7 +44,7 @@ export declare class VldCustom<TOutput = unknown> extends VldBase<unknown, TOutp
44
44
  private readonly _parseAsyncFn;
45
45
  private readonly _safeParseFn;
46
46
  private readonly _safeParseAsyncFn;
47
- private constructor();
47
+ protected constructor(options: CustomValidatorOptions<TOutput>);
48
48
  /**
49
49
  * Create a new custom validator
50
50
  */
@@ -68,3 +68,23 @@ export declare class VldCustom<TOutput = unknown> extends VldBase<unknown, TOutp
68
68
  * - v.custom({ parse: (val) => ... })
69
69
  */
70
70
  export declare function custom<TOutput = unknown>(optionsOrPredicate?: CustomValidatorOptions<TOutput> | ((data: unknown) => boolean | Promise<boolean>), errorParam?: ErrorParam): VldCustom<TOutput>;
71
+ export { custom as customFn };
72
+ /**
73
+ * Zod 4.6 `z.instanceof(Class)` schema. Keeps the constructor around so
74
+ * `.properties(shape)` can validate the instance's fields in place (Zod 4.6
75
+ * `ZodInstanceOf.properties`) while the prototype survives parsing.
76
+ */
77
+ export declare class VldInstance<T> extends VldCustom<T> {
78
+ private readonly _cls;
79
+ private readonly _instanceMessage;
80
+ constructor(cls: abstract new (...args: any[]) => T, message?: string);
81
+ /**
82
+ * Zod 4.6 instance properties: validate the given fields of the class
83
+ * instance in place. The instance itself is the parse output - the
84
+ * prototype is preserved (unlike z.object, which builds a plain object).
85
+ * Field errors are reported with the field name prepended to the path.
86
+ */
87
+ properties<Shape extends Record<string, VldBase<any, any>>>(shape: Shape, params?: {
88
+ message?: string;
89
+ }): VldCustom<T>;
90
+ }
@@ -1 +1 @@
1
- import{VldBase as s,VLD_VALIDATOR_TYPES as r,ensureVldError as e,resolveErrorMessage as a}from"./base.js";class VldCustom extends s{constructor(s){super(r.CUSTOM),this._parseFn=s.parse,this._parseAsyncFn=s.parseAsync||(s=>Promise.resolve(this._parseFn(s))),this._safeParseFn=s.safeParse?r=>{const a=s.safeParse(r);return a.success?{success:!0,data:a.data}:{success:!1,error:e(a.error)}}:s=>{try{return{success:!0,data:this._parseFn(s)}}catch(s){return{success:!1,error:e(s)}}},this._safeParseAsyncFn=s.safeParseAsync?async r=>{const a=await s.safeParseAsync(r);return a.success?{success:!0,data:a.data}:{success:!1,error:e(a.error)}}:async s=>{try{return{success:!0,data:await this._parseAsyncFn(s)}}catch(s){return{success:!1,error:e(s)}}}}static create(s){return new VldCustom(s)}parse(s){return this._parseFn(s)}safeParse(s){return this._safeParseFn(s)}async parseAsync(s){return this._parseAsyncFn(s)}async safeParseAsync(s){return this._safeParseAsyncFn(s)}}function t(s,r){if("function"==typeof s){const t=s;return VldCustom.create({parse:s=>{if(!t(s))throw e(a(r,"Custom validation failed"));return s}})}return s?VldCustom.create(s):VldCustom.create({parse:s=>s})}export{VldCustom,t as custom};
1
+ import{VldBase as s,VLD_VALIDATOR_TYPES as e,ensureVldError as r,resolveErrorMessage as t}from"./base.js";import{V as a}from"../chunks/errors-core-BU14-Dk8.js";class VldCustom extends s{constructor(s){super(e.CUSTOM),this._parseFn=s.parse,this._parseAsyncFn=s.parseAsync||(s=>Promise.resolve(this._parseFn(s))),this._safeParseFn=s.safeParse?e=>{const t=s.safeParse(e);return t.success?{success:!0,data:t.data}:{success:!1,error:r(t.error)}}:s=>{try{return{success:!0,data:this._parseFn(s)}}catch(s){return{success:!1,error:r(s)}}},this._safeParseAsyncFn=s.safeParseAsync?async e=>{const t=await s.safeParseAsync(e);return t.success?{success:!0,data:t.data}:{success:!1,error:r(t.error)}}:async s=>{try{return{success:!0,data:await this._parseAsyncFn(s)}}catch(s){return{success:!1,error:r(s)}}}}static create(s){return new VldCustom(s)}parse(s){return this._parseFn(s)}safeParse(s){return this._safeParseFn(s)}async parseAsync(s){return this._parseAsyncFn(s)}async safeParseAsync(s){return this._safeParseAsyncFn(s)}}function c(s,e){if("function"==typeof s){const a=s;return VldCustom.create({parse:s=>{if(!a(s))throw r(t(e,"Custom validation failed"));return s}})}return s?VldCustom.create(s):VldCustom.create({parse:s=>s})}class VldInstance extends VldCustom{constructor(s,e){super({parse:r=>{if(!(r instanceof s))throw new a([{code:"custom",path:[],message:e||`Expected instance of ${s.name||"provided constructor"}`}]);return r}}),this._cls=s,this._instanceMessage=e}properties(s,e){const r=this._cls,t=e?.message??this._instanceMessage,c=Object.entries(s);return VldCustom.create({parse:s=>{if(!(s instanceof r))throw new a([{code:"custom",path:[],message:t||`Expected instance of ${r.name||"provided constructor"}`}]);for(const[e,r]of c){const t=r.safeParse(s[e]);if(!t.success){const s=t.error.issues??[];throw new a(s.length>0?s.map(s=>({...s,path:[e,...s.path]})):[{code:"custom",path:[e],message:t.error.message}])}}return s}})}}export{VldCustom,VldInstance,c as custom,c as customFn};
@@ -1,5 +1,5 @@
1
1
  /**
2
- * VldDateV2 OPTIMIZED: check returns Issue | null.
2
+ * VldDateV2 - OPTIMIZED: check returns Issue | null.
3
3
  */
4
4
  import { VldBase, type ErrorParam, type ParseResult } from './base.js';
5
5
  import { type VldIssue } from '../errors-core.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * VldNumberV2 OPTIMIZED: check returns Issue | null, no per-call payload.
2
+ * VldNumberV2 - OPTIMIZED: check returns Issue | null, no per-call payload.
3
3
  * Same public API as legacy VldNumber.
4
4
  */
5
5
  import { VldBase, type ErrorParam, type ParseResult } from './base.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * VldObjectV2 Analysis and decision document
2
+ * VldObjectV2 - Analysis and decision document
3
3
  *
4
4
  * After detailed analysis of VldObject (1071 lines, 10 own properties, all
5
5
  * precomputed internal arrays for fast-path dispatch), the V2 single-def
@@ -8,23 +8,23 @@
8
8
  * - The V2 pattern saves memory by collapsing duplicated data
9
9
  * (`config` + `_checks` + `_transforms` + `_isSimple` + `_checkMetas`)
10
10
  * into a single `__def` object.
11
- * - VldObject has NO duplicated data it has 10 distinct internal arrays
11
+ * - VldObject has NO duplicated data - it has 10 distinct internal arrays
12
12
  * (shapeKeys, validators, validatorTypes, simpleFieldModes, ...), each
13
13
  * serving a unique fast-path purpose.
14
14
  * - A "VldObjectV2" wrapper that holds both a `__def` AND a VldObject
15
- * child would have 2+10=12 own properties WORSE than the legacy.
15
+ * child would have 2+10=12 own properties - WORSE than the legacy.
16
16
  *
17
17
  * The real Zod 4.5 9.8x win on `z.object()` came from a fundamentally
18
18
  * different data layout: a single `def = {type, shape, ...}` object shared
19
19
  * across all chained variants, plus bound methods. Replicating that for
20
20
  * VldObject would require rewriting the entire fast-path dispatch logic
21
- * (1071 lines) into a def-based representation a multi-day refactor with
21
+ * (1071 lines) into a def-based representation - a multi-day refactor with
22
22
  * uncertain return.
23
23
  *
24
24
  * Decision (Faz 4): VldObject, VldArray, VldUnion remain in their legacy
25
25
  * form. The composite-side memory benefit from the V2 pattern is below
26
26
  * noise. The ~38% wins we observed come from using VldStringV2/VldNumberV2
27
- * as the children of VldObject that's where the savings live.
27
+ * as the children of VldObject - that's where the savings live.
28
28
  *
29
29
  * The composite itself is not refactored. Only its child primitive types
30
30
  * get the V2 treatment.
@@ -43,6 +43,13 @@ export declare class VldPromise<T> extends VldBase<unknown, Promise<T>> {
43
43
  */
44
44
  safeParse(value: unknown): any;
45
45
  safeParseAsync(value: unknown): Promise<ParseResult<Promise<T>>>;
46
+ /**
47
+ * Promise schemas validate asynchronously by nature, so the synchronous
48
+ * Zod 4.6 `.validate()` throws (Zod throws $ZodAsyncError in this case).
49
+ * Use `.validateAsync()`.
50
+ */
51
+ validate(_data: unknown): _data is unknown;
52
+ validateAsync(value: unknown): Promise<boolean>;
46
53
  }
47
54
  /**
48
55
  * Create a Promise validator
@@ -1 +1 @@
1
- import{VldBase as e,VLD_VALIDATOR_TYPES as s,ensureVldError as r}from"./base.js";class VldPromise extends e{constructor(e){super(s.PROMISE),this.inner=e}get"~standard"(){return{version:1,vendor:"vld",validate:async e=>{const s=await this.safeParse(e);return s.success?{value:s.data}:{issues:[{message:s.error.message}]}},types:void 0}}_isThenable(e){return null!==e&&"function"==typeof e.then}unwrap(){return this.inner}async parse(e){if(!this._isThenable(e))throw new Error("Expected a Promise value");const s=await Promise.resolve(e);return this.inner.parseAsync?this.inner.parseAsync(s):this.inner.parse(s)}parseAsync(e){return this.parse(e)}safeParse(e){return this._isThenable(e)?(async()=>{try{const s=await Promise.resolve(e);if(this.inner.safeParseAsync)return await this.inner.safeParseAsync(s);const r=this.inner.safeParse(s);return r.success?{success:!0,data:r.data}:r}catch(e){return{success:!1,error:r(e)}}})():Promise.resolve({success:!1,error:r("Expected a Promise value")})}safeParseAsync(e){return this.safeParse(e)}}function n(e){return new VldPromise(e)}export{VldPromise,n as promise};
1
+ import{VldBase as s,VLD_VALIDATOR_TYPES as e,ensureVldError as r}from"./base.js";class VldPromise extends s{constructor(s){super(e.PROMISE),this.inner=s}get"~standard"(){return{version:1,vendor:"vld",validate:async s=>{const e=await this.safeParse(s);return e.success?{value:e.data}:{issues:[{message:e.error.message}]}},types:void 0}}_isThenable(s){return null!==s&&"function"==typeof s.then}unwrap(){return this.inner}async parse(s){if(!this._isThenable(s))throw new Error("Expected a Promise value");const e=await Promise.resolve(s);return this.inner.parseAsync?this.inner.parseAsync(e):this.inner.parse(e)}parseAsync(s){return this.parse(s)}safeParse(s){return this._isThenable(s)?(async()=>{try{const e=await Promise.resolve(s);if(this.inner.safeParseAsync)return await this.inner.safeParseAsync(e);const r=this.inner.safeParse(e);return r.success?{success:!0,data:r.data}:r}catch(s){return{success:!1,error:r(s)}}})():Promise.resolve({success:!1,error:r("Expected a Promise value")})}safeParseAsync(s){return this.safeParse(s)}validate(s){throw new Error("Promise schemas validate asynchronously; use validateAsync instead")}async validateAsync(s){return(await this.safeParseAsync(s)).success}}function a(s){return new VldPromise(s)}export{VldPromise,a as promise};