Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

valibot

Package Overview
Dependencies
Maintainers
0
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

valibot - npm Package Compare versions

Comparing version 0.35.0 to 0.36.0

2

dist/index.min.js

@@ -1,1 +0,1 @@

function de(){return{kind:"transformation",type:"await",reference:de,async:!0,async _run(t){return t.value=await t.value,t}}}var _=/^[A-Z]{6}(?!00)[A-Z\d]{2}(?:[A-Z\d]{3})?$/u,q=/^[a-z][\da-z]*$/u,D=/^\d+$/u,N=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu,W=/^[\p{Extended_Pictographic}\p{Emoji_Component}]+$/u,V=/^(?:0h|0x)?[\da-f]+$/iu,C=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/iu,L=/^\d{15}$|^\d{2}-\d{6}-\d{6}-\d$/u,K=/^(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])(?:\.(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])){3}$/u,$=/^(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,7}:|(?:[\da-f]{1,4}:){1,6}:[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,5}(?::[\da-f]{1,4}){1,2}|(?:[\da-f]{1,4}:){1,4}(?::[\da-f]{1,4}){1,3}|(?:[\da-f]{1,4}:){1,3}(?::[\da-f]{1,4}){1,4}|(?:[\da-f]{1,4}:){1,2}(?::[\da-f]{1,4}){1,5}|[\da-f]{1,4}:(?::[\da-f]{1,4}){1,6}|:(?:(?::[\da-f]{1,4}){1,7}|:)|fe80:(?::[\da-f]{0,4}){0,4}%[\da-z]+|::(?:f{4}(?::0{1,4})?:)?(?:(?:25[0-5]|(?:2[0-4]|1?\d)?\d)\.){3}(?:25[0-5]|(?:2[0-4]|1?\d)?\d)|(?:[\da-f]{1,4}:){1,4}:(?:(?:25[0-5]|(?:2[0-4]|1?\d)?\d)\.){3}(?:25[0-5]|(?:2[0-4]|1?\d)?\d))$/iu,z=/^(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])(?:\.(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])){3}$|^(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,7}:|(?:[\da-f]{1,4}:){1,6}:[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,5}(?::[\da-f]{1,4}){1,2}|(?:[\da-f]{1,4}:){1,4}(?::[\da-f]{1,4}){1,3}|(?:[\da-f]{1,4}:){1,3}(?::[\da-f]{1,4}){1,4}|(?:[\da-f]{1,4}:){1,2}(?::[\da-f]{1,4}){1,5}|[\da-f]{1,4}:(?::[\da-f]{1,4}){1,6}|:(?:(?::[\da-f]{1,4}){1,7}|:)|fe80:(?::[\da-f]{0,4}){0,4}%[\da-z]+|::(?:f{4}(?::0{1,4})?:)?(?:(?:25[0-5]|(?:2[0-4]|1?\d)?\d)\.){3}(?:25[0-5]|(?:2[0-4]|1?\d)?\d)|(?:[\da-f]{1,4}:){1,4}:(?:(?:25[0-5]|(?:2[0-4]|1?\d)?\d)\.){3}(?:25[0-5]|(?:2[0-4]|1?\d)?\d))$/iu,F=/^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])$/u,U=/^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])T(?:0\d|1\d|2[0-3]):[0-5]\d$/u,G=/^(?:0\d|1\d|2[0-3]):[0-5]\d$/u,X=/^(?:0\d|1\d|2[0-3])(?::[0-5]\d){2}$/u,H=/^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])T(?:0\d|1\d|2[0-3])(?::[0-5]\d){2}(?:\.\d{1,9})?(?:Z|[+-](?:0\d|1\d|2[0-3])(?::?[0-5]\d)?)$/u,J=/^\d{4}-W(?:0[1-9]|[1-4]\d|5[0-3])$/u,Z=/^(?:[\da-f]{2}:){5}[\da-f]{2}$|^(?:[\da-f]{2}-){5}[\da-f]{2}$|^(?:[\da-f]{4}\.){2}[\da-f]{4}$/iu,Q=/^(?:[\da-f]{2}:){7}[\da-f]{2}$|^(?:[\da-f]{2}-){7}[\da-f]{2}$|^(?:[\da-f]{4}\.){3}[\da-f]{4}$|^(?:[\da-f]{4}:){3}[\da-f]{4}$/iu,Y=/^(?:[\da-f]{2}:){5}[\da-f]{2}$|^(?:[\da-f]{2}-){5}[\da-f]{2}$|^(?:[\da-f]{4}\.){2}[\da-f]{4}$|^(?:[\da-f]{2}:){7}[\da-f]{2}$|^(?:[\da-f]{2}-){7}[\da-f]{2}$|^(?:[\da-f]{4}\.){3}[\da-f]{4}$|^(?:[\da-f]{4}:){3}[\da-f]{4}$/iu,ee=/^(?:0o)?[0-7]+$/iu,ne=/^[\da-hjkmnp-tv-z]{26}$/iu,te=/^[\da-f]{8}(?:-[\da-f]{4}){3}-[\da-f]{12}$/iu;var x;function rs(t){x={...x,...t}}function l(t){return{lang:t?.lang??x?.lang,message:t?.message,abortEarly:t?.abortEarly??x?.abortEarly,abortPipeEarly:t?.abortPipeEarly??x?.abortPipeEarly}}function Is(){x=void 0}var S;function is(t,n){S||(S=new Map),S.set(n,t)}function se(t){return S?.get(t)}function as(t){S?.delete(t)}var B;function ps(t,n){B||(B=new Map),B.set(n,t)}function ue(t){return B?.get(t)}function cs(t){B?.delete(t)}var O;function fs(t,n,e){O||(O=new Map),O.get(t)||O.set(t,new Map),O.get(t).set(e,n)}function re(t,n){return O?.get(t)?.get(n)}function ds(t,n){O?.get(t)?.delete(n)}function f(t){let n=typeof t;return n==="string"?`"${t}"`:n==="number"||n==="bigint"||n==="boolean"?`${t}`:n==="object"||n==="function"?(t&&Object.getPrototypeOf(t)?.constructor?.name)??"null":n}function u(t,n,e,s,r){let o=r&&"input"in r?r.input:e.value,i=r?.expected??t.expects??null,a=r?.received??f(o),I={kind:t.kind,type:t.type,input:o,expected:i,received:a,message:`Invalid ${n}: ${i?`Expected ${i} but r`:"R"}eceived ${a}`,requirement:t.requirement,path:r?.path,issues:r?.issues,lang:s.lang,abortEarly:s.abortEarly,abortPipeEarly:s.abortPipeEarly},m=t.kind==="schema",p=r?.message??t.message??re(t.reference,I.lang)??(m?ue(I.lang):null)??s.message??se(I.lang);p&&(I.message=typeof p=="function"?p(I):p),m&&(e.typed=!1),e.issues?e.issues.push(I):e.issues=[I]}var ye=/\D/gu;function b(t){let n=t.replace(ye,""),e=n.length,s=1,r=0;for(;e;){let o=+n[--e];s^=1,r+=s?[0,2,4,6,8,1,3,5,7,9][o]:o}return r%10===0}function y(t,n){return Object.hasOwn(t,n)&&n!=="__proto__"&&n!=="prototype"&&n!=="constructor"}function gs(t,n){let e={};for(let s of t)e[s]=n;return e}function Ie(t){if(t.path){let n="";for(let e of t.path)if("key"in e&&(typeof e.key=="string"||typeof e.key=="number"))n?n+=`.${e.key}`:n+=e.key;else return null;return n}return null}function As(t,n){return n.kind===t}function Es(t,n){return n.type===t}function js(t){return t instanceof k}var k=class extends Error{issues;constructor(n){super(n[0].message),this.name="ValiError",this.issues=n}};function le(t){return{kind:"validation",type:"bic",reference:le,async:!1,expects:null,requirement:_,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"BIC",n,e),n}}}function ke(t){return{kind:"transformation",type:"brand",reference:ke,async:!1,name:t,_run(n){return n}}}function he(t,n){return{kind:"validation",type:"bytes",reference:he,async:!1,expects:`${t}`,requirement:t,message:n,_run(e,s){if(e.typed){let r=new TextEncoder().encode(e.value).length;r!==this.requirement&&u(this,"bytes",e,s,{received:`${r}`})}return e}}}function Oe(t,n){return{kind:"validation",type:"check",reference:Oe,async:!1,expects:null,requirement:t,message:n,_run(e,s){return e.typed&&!this.requirement(e.value)&&u(this,"input",e,s),e}}}function xe(t,n){return{kind:"validation",type:"check",reference:xe,async:!0,expects:null,requirement:t,message:n,async _run(e,s){return e.typed&&!await this.requirement(e.value)&&u(this,"input",e,s),e}}}function we(t,n){return{kind:"validation",type:"check_items",reference:we,async:!1,expects:null,requirement:t,message:n,_run(e,s){if(e.typed)for(let r=0;r<e.value.length;r++){let o=e.value[r];this.requirement(o,r,e.value)||u(this,"item",e,s,{input:o,path:[{type:"array",origin:"value",input:e.value,key:r,value:o}]})}return e}}}var ge=/^(?:\d{14,19}|\d{4}(?: \d{3,6}){2,4}|\d{4}(?:-\d{3,6}){2,4})$/u,Se=/[- ]/gu,Be=[/^3[47]\d{13}$/u,/^3(?:0[0-5]|[68]\d)\d{11,13}$/u,/^6(?:011|5\d{2})\d{12,15}$/u,/^(?:2131|1800|35\d{3})\d{11}$/u,/^5[1-5]\d{2}|(?:222\d|22[3-9]\d|2[3-6]\d{2}|27[01]\d|2720)\d{12}$/u,/^(?:6[27]\d{14,17}|81\d{14,17})$/u,/^4\d{12}(?:\d{3,6})?$/u];function Ae(t){return{kind:"validation",type:"credit_card",reference:Ae,async:!1,expects:null,requirement(n){let e;return ge.test(n)&&(e=n.replace(Se,""))&&Be.some(s=>s.test(e))&&b(e)},message:t,_run(n,e){return n.typed&&!this.requirement(n.value)&&u(this,"credit card",n,e),n}}}function be(t){return{kind:"validation",type:"cuid2",reference:be,async:!1,expects:null,requirement:q,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"Cuid2",n,e),n}}}function Ee(t){return{kind:"validation",type:"decimal",reference:Ee,async:!1,expects:null,requirement:D,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"decimal",n,e),n}}}function Me(t){return{kind:"validation",type:"email",reference:Me,expects:null,async:!1,requirement:N,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"email",n,e),n}}}function Pe(t){return{kind:"validation",type:"emoji",reference:Pe,async:!1,expects:null,requirement:W,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"emoji",n,e),n}}}function je(t){return{kind:"validation",type:"empty",reference:je,async:!1,expects:"0",message:t,_run(n,e){return n.typed&&n.value.length>0&&u(this,"length",n,e,{received:`${n.value.length}`}),n}}}function ve(t,n){return{kind:"validation",type:"ends_with",reference:ve,async:!1,expects:`"${t}"`,requirement:t,message:n,_run(e,s){return e.typed&&!e.value.endsWith(this.requirement)&&u(this,"end",e,s,{received:`"${e.value.slice(-this.requirement.length)}"`}),e}}}function Re(t,n){return{kind:"validation",type:"every_item",reference:Re,async:!1,expects:null,requirement:t,message:n,_run(e,s){return e.typed&&!e.value.every(this.requirement)&&u(this,"item",e,s),e}}}function _e(t,n){let e=f(t);return{kind:"validation",type:"excludes",reference:_e,async:!1,expects:`!${e}`,requirement:t,message:n,_run(s,r){return s.typed&&s.value.includes(this.requirement)&&u(this,"content",s,r,{received:e}),s}}}function qe(t){return{kind:"transformation",type:"filter_items",reference:qe,async:!1,operation:t,_run(n){return n.value=n.value.filter(this.operation),n}}}function De(t){return{kind:"transformation",type:"find_item",reference:De,async:!1,operation:t,_run(n){return n.value=n.value.find(this.operation),n}}}function Ne(t){return{kind:"validation",type:"finite",reference:Ne,async:!1,expects:null,requirement:Number.isFinite,message:t,_run(n,e){return n.typed&&!this.requirement(n.value)&&u(this,"finite",n,e),n}}}var We={md4:32,md5:32,sha1:40,sha256:64,sha384:96,sha512:128,ripemd128:32,ripemd160:40,tiger128:32,tiger160:40,tiger192:48,crc32:8,crc32b:8,adler32:8};function Ve(t,n){return{kind:"validation",type:"hash",reference:Ve,expects:null,async:!1,requirement:RegExp(t.map(e=>`^[a-f0-9]{${We[e]}}$`).join("|"),"iu"),message:n,_run(e,s){return e.typed&&!this.requirement.test(e.value)&&u(this,"hash",e,s),e}}}function Ce(t){return{kind:"validation",type:"hexadecimal",reference:Ce,async:!1,expects:null,requirement:V,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"hexadecimal",n,e),n}}}function Le(t){return{kind:"validation",type:"hex_color",reference:Le,async:!1,expects:null,requirement:C,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"hex color",n,e),n}}}function Ke(t){return{kind:"validation",type:"imei",reference:Ke,async:!1,expects:null,requirement(n){return L.test(n)&&b(n)},message:t,_run(n,e){return n.typed&&!this.requirement(n.value)&&u(this,"IMEI",n,e),n}}}function $e(t,n){let e=f(t);return{kind:"validation",type:"includes",reference:$e,async:!1,expects:e,requirement:t,message:n,_run(s,r){return s.typed&&!s.value.includes(this.requirement)&&u(this,"content",s,r,{received:`!${e}`}),s}}}function ze(t){return{kind:"validation",type:"integer",reference:ze,async:!1,expects:null,requirement:Number.isInteger,message:t,_run(n,e){return n.typed&&!this.requirement(n.value)&&u(this,"integer",n,e),n}}}function Fe(t){return{kind:"validation",type:"ip",reference:Fe,async:!1,expects:null,requirement:z,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"IP",n,e),n}}}function Ue(t){return{kind:"validation",type:"ipv4",reference:Ue,async:!1,expects:null,requirement:K,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"IPv4",n,e),n}}}function Ge(t){return{kind:"validation",type:"ipv6",reference:Ge,async:!1,expects:null,requirement:$,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"IPv6",n,e),n}}}function Xe(t){return{kind:"validation",type:"iso_date",reference:Xe,async:!1,expects:null,requirement:F,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"date",n,e),n}}}function He(t){return{kind:"validation",type:"iso_date_time",reference:He,async:!1,expects:null,requirement:U,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"date-time",n,e),n}}}function Je(t){return{kind:"validation",type:"iso_time",reference:Je,async:!1,expects:null,requirement:G,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"time",n,e),n}}}function Ze(t){return{kind:"validation",type:"iso_time_second",reference:Ze,async:!1,expects:null,requirement:X,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"time-second",n,e),n}}}function Qe(t){return{kind:"validation",type:"iso_timestamp",reference:Qe,async:!1,expects:null,requirement:H,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"timestamp",n,e),n}}}function Ye(t){return{kind:"validation",type:"iso_week",reference:Ye,async:!1,expects:null,requirement:J,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"week",n,e),n}}}function en(t,n){return{kind:"validation",type:"length",reference:en,async:!1,expects:`${t}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value.length!==this.requirement&&u(this,"length",e,s,{received:`${e.value.length}`}),e}}}function nn(t){return{kind:"validation",type:"mac",reference:nn,async:!1,expects:null,requirement:Y,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"MAC",n,e),n}}}function tn(t){return{kind:"validation",type:"mac48",reference:tn,async:!1,expects:null,requirement:Z,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"48-bit MAC",n,e),n}}}function sn(t){return{kind:"validation",type:"mac64",reference:sn,async:!1,expects:null,requirement:Q,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"64-bit MAC",n,e),n}}}function un(t){return{kind:"transformation",type:"map_items",reference:un,async:!1,operation:t,_run(n){return n.value=n.value.map(this.operation),n}}}function rn(t,n){return{kind:"validation",type:"max_bytes",reference:rn,async:!1,expects:`<=${t}`,requirement:t,message:n,_run(e,s){if(e.typed){let r=new TextEncoder().encode(e.value).length;r>this.requirement&&u(this,"bytes",e,s,{received:`${r}`})}return e}}}function In(t,n){return{kind:"validation",type:"max_length",reference:In,async:!1,expects:`<=${t}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value.length>this.requirement&&u(this,"length",e,s,{received:`${e.value.length}`}),e}}}function on(t,n){return{kind:"validation",type:"max_size",reference:on,async:!1,expects:`<=${t}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value.size>this.requirement&&u(this,"size",e,s,{received:`${e.value.size}`}),e}}}function an(t,n){return{kind:"validation",type:"max_value",reference:an,async:!1,expects:`<=${t instanceof Date?t.toJSON():f(t)}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value>this.requirement&&u(this,"value",e,s,{received:e.value instanceof Date?e.value.toJSON():f(e.value)}),e}}}function mn(t,n){return{kind:"validation",type:"mime_type",reference:mn,async:!1,expects:t.map(e=>`"${e}"`).join(" | ")||"never",requirement:t,message:n,_run(e,s){return e.typed&&!this.requirement.includes(e.value.type)&&u(this,"MIME type",e,s,{received:`"${e.value.type}"`}),e}}}function pn(t,n){return{kind:"validation",type:"min_bytes",reference:pn,async:!1,expects:`>=${t}`,requirement:t,message:n,_run(e,s){if(e.typed){let r=new TextEncoder().encode(e.value).length;r<this.requirement&&u(this,"bytes",e,s,{received:`${r}`})}return e}}}function cn(t,n){return{kind:"validation",type:"min_length",reference:cn,async:!1,expects:`>=${t}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value.length<this.requirement&&u(this,"length",e,s,{received:`${e.value.length}`}),e}}}function Tn(t,n){return{kind:"validation",type:"min_size",reference:Tn,async:!1,expects:`>=${t}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value.size<this.requirement&&u(this,"size",e,s,{received:`${e.value.size}`}),e}}}function fn(t,n){return{kind:"validation",type:"min_value",reference:fn,async:!1,expects:`>=${t instanceof Date?t.toJSON():f(t)}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value<this.requirement&&u(this,"value",e,s,{received:e.value instanceof Date?e.value.toJSON():f(e.value)}),e}}}function dn(t,n){return{kind:"validation",type:"multiple_of",reference:dn,async:!1,expects:`%${t}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value%this.requirement!==0&&u(this,"multiple",e,s),e}}}function yn(t){return{kind:"validation",type:"non_empty",reference:yn,async:!1,expects:"!0",message:t,_run(n,e){return n.typed&&n.value.length===0&&u(this,"length",n,e,{received:"0"}),n}}}function ln(t,n){return{kind:"validation",type:"not_bytes",reference:ln,async:!1,expects:`!${t}`,requirement:t,message:n,_run(e,s){if(e.typed){let r=new TextEncoder().encode(e.value).length;r===this.requirement&&u(this,"bytes",e,s,{received:`${r}`})}return e}}}function kn(t,n){return{kind:"validation",type:"not_length",reference:kn,async:!1,expects:`!${t}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value.length===this.requirement&&u(this,"length",e,s,{received:`${e.value.length}`}),e}}}function hn(t,n){return{kind:"validation",type:"not_size",reference:hn,async:!1,expects:`!${t}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value.size===this.requirement&&u(this,"size",e,s,{received:`${e.value.size}`}),e}}}function On(t,n){return{kind:"validation",type:"not_value",reference:On,async:!1,expects:t instanceof Date?`!${t.toJSON()}`:`!${f(t)}`,requirement:t,message:n,_run(e,s){return e.typed&&this.requirement<=e.value&&this.requirement>=e.value&&u(this,"value",e,s,{received:e.value instanceof Date?e.value.toJSON():f(e.value)}),e}}}function xn(t){return{kind:"validation",type:"octal",reference:xn,async:!1,expects:null,requirement:ee,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"octal",n,e),n}}}function E(t,n){if(t.issues)for(let e of n)for(let s of t.issues){let r=!1,o=Math.min(e.length,s.path?.length??0);for(let i=0;i<o;i++)if(e[i]!==s.path[i].key){r=!0;break}if(!r)return!1}return!0}function wn(t,n,e){return{kind:"validation",type:"partial_check",reference:wn,async:!1,expects:null,requirement:n,message:e,_run(s,r){return E(s,t)&&!this.requirement(s.value)&&u(this,"input",s,r),s}}}function gn(t,n,e){return{kind:"validation",type:"partial_check",reference:gn,async:!0,expects:null,requirement:n,message:e,async _run(s,r){return E(s,t)&&!await this.requirement(s.value)&&u(this,"input",s,r),s}}}function Sn(t){return{kind:"validation",type:"raw_check",reference:Sn,async:!1,expects:null,_run(n,e){return t({dataset:n,config:e,addIssue:s=>u(this,s?.label??"input",n,e,s)}),n}}}function Bn(t){return{kind:"validation",type:"raw_check",reference:Bn,async:!0,expects:null,async _run(n,e){return await t({dataset:n,config:e,addIssue:s=>u(this,s?.label??"input",n,e,s)}),n}}}function An(t){return{kind:"transformation",type:"raw_transform",reference:An,async:!1,_run(n,e){let s=t({dataset:n,config:e,addIssue:r=>u(this,r?.label??"input",n,e,r),NEVER:null});return n.issues?n.typed=!1:n.value=s,n}}}function bn(t){return{kind:"transformation",type:"raw_transform",reference:bn,async:!0,async _run(n,e){let s=await t({dataset:n,config:e,addIssue:r=>u(this,r?.label??"input",n,e,r),NEVER:null});return n.issues?n.typed=!1:n.value=s,n}}}function En(){return{kind:"transformation",type:"readonly",reference:En,async:!1,_run(t){return t}}}function Mn(t,n){return{kind:"transformation",type:"reduce_items",reference:Mn,async:!1,operation:t,initial:n,_run(e){return e.value=e.value.reduce(this.operation,this.initial),e}}}function Pn(t,n){return{kind:"validation",type:"regex",reference:Pn,async:!1,expects:`${t}`,requirement:t,message:n,_run(e,s){return e.typed&&!this.requirement.test(e.value)&&u(this,"format",e,s),e}}}function jn(t){return{kind:"validation",type:"safe_integer",reference:jn,async:!1,expects:null,requirement:Number.isSafeInteger,message:t,_run(n,e){return n.typed&&!this.requirement(n.value)&&u(this,"safe integer",n,e),n}}}function vn(t,n){return{kind:"validation",type:"size",reference:vn,async:!1,expects:`${t}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value.size!==this.requirement&&u(this,"size",e,s,{received:`${e.value.size}`}),e}}}function Rn(t,n){return{kind:"validation",type:"some_item",reference:Rn,async:!1,expects:null,requirement:t,message:n,_run(e,s){return e.typed&&!e.value.some(this.requirement)&&u(this,"item",e,s),e}}}function _n(t){return{kind:"transformation",type:"sort_items",reference:_n,async:!1,operation:t,_run(n){return n.value=n.value.sort(this.operation),n}}}function qn(t,n){return{kind:"validation",type:"starts_with",reference:qn,async:!1,expects:`"${t}"`,requirement:t,message:n,_run(e,s){return e.typed&&!e.value.startsWith(this.requirement)&&u(this,"start",e,s,{received:`"${e.value.slice(0,this.requirement.length)}"`}),e}}}function Dn(){return{kind:"transformation",type:"to_lower_case",reference:Dn,async:!1,_run(t){return t.value=t.value.toLowerCase(),t}}}function Nn(t){return{kind:"transformation",type:"to_max_value",reference:Nn,async:!1,requirement:t,_run(n){return n.value=n.value>this.requirement?this.requirement:n.value,n}}}function Wn(t){return{kind:"transformation",type:"to_min_value",reference:Wn,async:!1,requirement:t,_run(n){return n.value=n.value<this.requirement?this.requirement:n.value,n}}}function Vn(){return{kind:"transformation",type:"to_upper_case",reference:Vn,async:!1,_run(t){return t.value=t.value.toUpperCase(),t}}}function Cn(t){return{kind:"transformation",type:"transform",reference:Cn,async:!1,operation:t,_run(n){return n.value=this.operation(n.value),n}}}function Ln(t){return{kind:"transformation",type:"transform",reference:Ln,async:!0,operation:t,async _run(n){return n.value=await this.operation(n.value),n}}}function Kn(){return{kind:"transformation",type:"trim",reference:Kn,async:!1,_run(t){return t.value=t.value.trim(),t}}}function $n(){return{kind:"transformation",type:"trim_end",reference:$n,async:!1,_run(t){return t.value=t.value.trimEnd(),t}}}function zn(){return{kind:"transformation",type:"trim_start",reference:zn,async:!1,_run(t){return t.value=t.value.trimStart(),t}}}function Fn(t){return{kind:"validation",type:"ulid",reference:Fn,async:!1,expects:null,requirement:ne,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"ULID",n,e),n}}}function Un(t){return{kind:"validation",type:"url",reference:Un,async:!1,expects:null,requirement(n){try{return new URL(n),!0}catch{return!1}},message:t,_run(n,e){return n.typed&&!this.requirement(n.value)&&u(this,"URL",n,e),n}}}function Gn(t){return{kind:"validation",type:"uuid",reference:Gn,async:!1,expects:null,requirement:te,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"UUID",n,e),n}}}function Xn(t,n){return{kind:"validation",type:"value",reference:Xn,async:!1,expects:t instanceof Date?t.toJSON():f(t),requirement:t,message:n,_run(e,s){return e.typed&&!(this.requirement<=e.value&&this.requirement>=e.value)&&u(this,"value",e,s,{received:e.value instanceof Date?e.value.toJSON():f(e.value)}),e}}}function zI(t,n){return{...t,_run(e,s){return t._run(e,{...s,...n})}}}function h(t,n,e){return typeof t.fallback=="function"?t.fallback(n,e):t.fallback}function XI(t,n){return{...t,fallback:n,_run(e,s){return t._run(e,s),e.issues?{typed:!0,value:h(this,e,s)}:e}}}function ZI(t,n){return{...t,fallback:n,async:!0,async _run(e,s){return t._run(e,s),e.issues?{typed:!0,value:await h(this,e,s)}:e}}}function eo(t){let n={};for(let e of t)if(e.path){let s=Ie(e);s?(n.nested||(n.nested={}),n.nested[s]?n.nested[s].push(e.message):n.nested[s]=[e.message]):n.other?n.other.push(e.message):n.other=[e.message]}else n.root?n.root.push(e.message):n.root=[e.message];return n}function to(t,n){return{...t,_run(e,s){let r=e.issues&&[...e.issues];if(t._run(e,s),e.issues){for(let o of e.issues)if(!r?.includes(o)){let i=e.value;for(let a of n){let I=i[a],m={type:"unknown",origin:"value",input:i,key:a,value:I};if(o.path?o.path.push(m):o.path=[m],!I)break;i=I}}}return e}}}function uo(t,n){return{...t,async:!0,async _run(e,s){let r=e.issues&&[...e.issues];if(await t._run(e,s),e.issues){for(let o of e.issues)if(!r?.includes(o)){let i=e.value;for(let a of n){let I=i[a],m={type:"unknown",origin:"value",input:i,key:a,value:I};if(o.path?o.path.push(m):o.path=[m],!I)break;i=I}}}return e}}}function d(t,n,e){return typeof t.default=="function"?t.default(n,e):t.default}function oe(t){if("entries"in t){let n={};for(let e in t.entries)n[e]=oe(t.entries[e]);return n}return"items"in t?t.items.map(oe):d(t)}async function ie(t){return"entries"in t?Object.fromEntries(await Promise.all(Object.entries(t.entries).map(async([n,e])=>[n,await ie(e)]))):"items"in t?Promise.all(t.items.map(ie)):d(t)}function ae(t){if("entries"in t){let n={};for(let e in t.entries)n[e]=ae(t.entries[e]);return n}return"items"in t?t.items.map(ae):h(t)}async function me(t){return"entries"in t?Object.fromEntries(await Promise.all(Object.entries(t.entries).map(async([n,e])=>[n,await me(e)]))):"items"in t?Promise.all(t.items.map(me)):h(t)}function yo(t,n){return!t._run({typed:!1,value:n},{abortEarly:!0}).issues}function Hn(){return{kind:"schema",type:"any",reference:Hn,expects:"any",async:!1,_run(t){return t.typed=!0,t}}}function Jn(t,n){return{kind:"schema",type:"array",reference:Jn,expects:"Array",async:!1,item:t,message:n,_run(e,s){let r=e.value;if(Array.isArray(r)){e.typed=!0,e.value=[];for(let o=0;o<r.length;o++){let i=r[o],a=this.item._run({typed:!1,value:i},s);if(a.issues){let I={type:"array",origin:"value",input:r,key:o,value:i};for(let m of a.issues)m.path?m.path.unshift(I):m.path=[I],e.issues?.push(m);if(e.issues||(e.issues=a.issues),s.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.push(a.value)}}else u(this,"type",e,s);return e}}}function Zn(t,n){return{kind:"schema",type:"array",reference:Zn,expects:"Array",async:!0,item:t,message:n,async _run(e,s){let r=e.value;if(Array.isArray(r)){e.typed=!0,e.value=[];let o=await Promise.all(r.map(i=>this.item._run({typed:!1,value:i},s)));for(let i=0;i<o.length;i++){let a=o[i];if(a.issues){let I={type:"array",origin:"value",input:r,key:i,value:r[i]};for(let m of a.issues)m.path?m.path.unshift(I):m.path=[I],e.issues?.push(m);if(e.issues||(e.issues=a.issues),s.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.push(a.value)}}else u(this,"type",e,s);return e}}}function Qn(t){return{kind:"schema",type:"bigint",reference:Qn,expects:"bigint",async:!1,message:t,_run(n,e){return typeof n.value=="bigint"?n.typed=!0:u(this,"type",n,e),n}}}function Yn(t){return{kind:"schema",type:"blob",reference:Yn,expects:"Blob",async:!1,message:t,_run(n,e){return n.value instanceof Blob?n.typed=!0:u(this,"type",n,e),n}}}function et(t){return{kind:"schema",type:"boolean",reference:et,expects:"boolean",async:!1,message:t,_run(n,e){return typeof n.value=="boolean"?n.typed=!0:u(this,"type",n,e),n}}}function nt(t,n){return{kind:"schema",type:"custom",reference:nt,expects:"unknown",async:!1,check:t,message:n,_run(e,s){return this.check(e.value)?e.typed=!0:u(this,"type",e,s),e}}}function tt(t,n){return{kind:"schema",type:"custom",reference:tt,expects:"unknown",async:!0,check:t,message:n,async _run(e,s){return await this.check(e.value)?e.typed=!0:u(this,"type",e,s),e}}}function st(t){return{kind:"schema",type:"date",reference:st,expects:"Date",async:!1,message:t,_run(n,e){return n.value instanceof Date?isNaN(n.value)?u(this,"type",n,e,{received:'"Invalid Date"'}):n.typed=!0:u(this,"type",n,e),n}}}function ut(t,n){let e=Object.entries(t).filter(([s])=>isNaN(+s)).map(([,s])=>s);return{kind:"schema",type:"enum",reference:ut,expects:e.map(f).join(" | ")||"never",async:!1,enum:t,options:e,message:n,_run(s,r){return this.options.includes(s.value)?s.typed=!0:u(this,"type",s,r),s}}}function rt(t){return{kind:"schema",type:"file",reference:rt,expects:"File",async:!1,message:t,_run(n,e){return n.value instanceof File?n.typed=!0:u(this,"type",n,e),n}}}function It(t){return{kind:"schema",type:"function",reference:It,expects:"Function",async:!1,message:t,_run(n,e){return typeof n.value=="function"?n.typed=!0:u(this,"type",n,e),n}}}function ot(t,n){return{kind:"schema",type:"instance",reference:ot,expects:t.name,async:!1,class:t,message:n,_run(e,s){return e.value instanceof this.class?e.typed=!0:u(this,"type",e,s),e}}}function w(t,n){if(typeof t==typeof n){if(t===n||t instanceof Date&&n instanceof Date&&+t==+n)return{value:t};if(t&&n&&t.constructor===Object&&n.constructor===Object){for(let e in n)if(e in t){let s=w(t[e],n[e]);if(s.issue)return s;t[e]=s.value}else t[e]=n[e];return{value:t}}if(Array.isArray(t)&&Array.isArray(n)&&t.length===n.length){for(let e=0;e<t.length;e++){let s=w(t[e],n[e]);if(s.issue)return s;t[e]=s.value}return{value:t}}}return{issue:!0}}function it(t,n){return{kind:"schema",type:"intersect",reference:it,expects:[...new Set(t.map(e=>e.expects))].join(" & ")||"never",async:!1,options:t,message:n,_run(e,s){if(this.options.length){let r=e.value,o;e.typed=!0;for(let i of this.options){let a=i._run({typed:!1,value:r},s);if(a.issues&&(e.issues?e.issues.push(...a.issues):e.issues=a.issues,s.abortEarly)){e.typed=!1;break}a.typed||(e.typed=!1),e.typed&&(o?o.push(a.value):o=[a.value])}if(e.typed){e.value=o[0];for(let i=1;i<o.length;i++){let a=w(e.value,o[i]);if(a.issue){u(this,"type",e,s,{received:"unknown"});break}e.value=a.value}}}else u(this,"type",e,s);return e}}}function at(t,n){return{kind:"schema",type:"intersect",reference:at,expects:[...new Set(t.map(e=>e.expects))].join(" & ")||"never",async:!0,options:t,message:n,async _run(e,s){if(this.options.length){let r=e.value,o;e.typed=!0;let i=await Promise.all(this.options.map(a=>a._run({typed:!1,value:r},s)));for(let a of i){if(a.issues&&(e.issues?e.issues.push(...a.issues):e.issues=a.issues,s.abortEarly)){e.typed=!1;break}a.typed||(e.typed=!1),e.typed&&(o?o.push(a.value):o=[a.value])}if(e.typed){e.value=o[0];for(let a=1;a<o.length;a++){let I=w(e.value,o[a]);if(I.issue){u(this,"type",e,s,{received:"unknown"});break}e.value=I.value}}}else u(this,"type",e,s);return e}}}function mt(t){return{kind:"schema",type:"lazy",reference:mt,expects:"unknown",async:!1,getter:t,_run(n,e){return this.getter(n.value)._run(n,e)}}}function pt(t){return{kind:"schema",type:"lazy",reference:pt,expects:"unknown",async:!0,getter:t,async _run(n,e){return(await this.getter(n.value))._run(n,e)}}}function ct(t,n){return{kind:"schema",type:"literal",reference:ct,expects:f(t),async:!1,literal:t,message:n,_run(e,s){return e.value===this.literal?e.typed=!0:u(this,"type",e,s),e}}}function Tt(t,n){return{kind:"schema",type:"loose_object",reference:Tt,expects:"Object",async:!1,entries:t,message:n,_run(e,s){let r=e.value;if(r&&typeof r=="object"){e.typed=!0,e.value={};for(let o in this.entries){let i=r[o],a=this.entries[o]._run({typed:!1,value:i},s);if(a.issues){let I={type:"object",origin:"value",input:r,key:o,value:i};for(let m of a.issues)m.path?m.path.unshift(I):m.path=[I],e.issues?.push(m);if(e.issues||(e.issues=a.issues),s.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),(a.value!==void 0||o in r)&&(e.value[o]=a.value)}if(!e.issues||!s.abortEarly)for(let o in r)y(r,o)&&!(o in this.entries)&&(e.value[o]=r[o])}else u(this,"type",e,s);return e}}}function ft(t,n){return{kind:"schema",type:"loose_object",reference:ft,expects:"Object",async:!0,entries:t,message:n,async _run(e,s){let r=e.value;if(r&&typeof r=="object"){e.typed=!0,e.value={};let o=await Promise.all(Object.entries(this.entries).map(async([i,a])=>{let I=r[i];return[i,I,await a._run({typed:!1,value:I},s)]}));for(let[i,a,I]of o){if(I.issues){let m={type:"object",origin:"value",input:r,key:i,value:a};for(let p of I.issues)p.path?p.path.unshift(m):p.path=[m],e.issues?.push(p);if(e.issues||(e.issues=I.issues),s.abortEarly){e.typed=!1;break}}I.typed||(e.typed=!1),(I.value!==void 0||i in r)&&(e.value[i]=I.value)}if(!e.issues||!s.abortEarly)for(let i in r)y(r,i)&&!(i in this.entries)&&(e.value[i]=r[i])}else u(this,"type",e,s);return e}}}function dt(t,n){return{kind:"schema",type:"loose_tuple",reference:dt,expects:"Array",async:!1,items:t,message:n,_run(e,s){let r=e.value;if(Array.isArray(r)){e.typed=!0,e.value=[];for(let o=0;o<this.items.length;o++){let i=r[o],a=this.items[o]._run({typed:!1,value:i},s);if(a.issues){let I={type:"array",origin:"value",input:r,key:o,value:i};for(let m of a.issues)m.path?m.path.unshift(I):m.path=[I],e.issues?.push(m);if(e.issues||(e.issues=a.issues),s.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.push(a.value)}if(!e.issues||!s.abortEarly)for(let o=this.items.length;o<r.length;o++)e.value.push(r[o])}else u(this,"type",e,s);return e}}}function yt(t,n){return{kind:"schema",type:"loose_tuple",reference:yt,expects:"Array",async:!0,items:t,message:n,async _run(e,s){let r=e.value;if(Array.isArray(r)){e.typed=!0,e.value=[];let o=await Promise.all(this.items.map(async(i,a)=>{let I=r[a];return[a,I,await i._run({typed:!1,value:I},s)]}));for(let[i,a,I]of o){if(I.issues){let m={type:"array",origin:"value",input:r,key:i,value:a};for(let p of I.issues)p.path?p.path.unshift(m):p.path=[m],e.issues?.push(p);if(e.issues||(e.issues=I.issues),s.abortEarly){e.typed=!1;break}}I.typed||(e.typed=!1),e.value.push(I.value)}if(!e.issues||!s.abortEarly)for(let i=this.items.length;i<r.length;i++)e.value.push(r[i])}else u(this,"type",e,s);return e}}}function lt(t,n,e){return{kind:"schema",type:"map",reference:lt,expects:"Map",async:!1,key:t,value:n,message:e,_run(s,r){let o=s.value;if(o instanceof Map){s.typed=!0,s.value=new Map;for(let[i,a]of o){let I=this.key._run({typed:!1,value:i},r);if(I.issues){let p={type:"map",origin:"key",input:o,key:i,value:a};for(let c of I.issues)c.path?c.path.unshift(p):c.path=[p],s.issues?.push(c);if(s.issues||(s.issues=I.issues),r.abortEarly){s.typed=!1;break}}let m=this.value._run({typed:!1,value:a},r);if(m.issues){let p={type:"map",origin:"value",input:o,key:i,value:a};for(let c of m.issues)c.path?c.path.unshift(p):c.path=[p],s.issues?.push(c);if(s.issues||(s.issues=m.issues),r.abortEarly){s.typed=!1;break}}(!I.typed||!m.typed)&&(s.typed=!1),s.value.set(I.value,m.value)}}else u(this,"type",s,r);return s}}}function kt(t,n,e){return{kind:"schema",type:"map",reference:kt,expects:"Map",async:!0,key:t,value:n,message:e,async _run(s,r){let o=s.value;if(o instanceof Map){s.typed=!0,s.value=new Map;let i=await Promise.all([...o].map(([a,I])=>Promise.all([a,I,this.key._run({typed:!1,value:a},r),this.value._run({typed:!1,value:I},r)])));for(let[a,I,m,p]of i){if(m.issues){let c={type:"map",origin:"key",input:o,key:a,value:I};for(let T of m.issues)T.path?T.path.unshift(c):T.path=[c],s.issues?.push(T);if(s.issues||(s.issues=m.issues),r.abortEarly){s.typed=!1;break}}if(p.issues){let c={type:"map",origin:"value",input:o,key:a,value:I};for(let T of p.issues)T.path?T.path.unshift(c):T.path=[c],s.issues?.push(T);if(s.issues||(s.issues=p.issues),r.abortEarly){s.typed=!1;break}}(!m.typed||!p.typed)&&(s.typed=!1),s.value.set(m.value,p.value)}}else u(this,"type",s,r);return s}}}function ht(t){return{kind:"schema",type:"nan",reference:ht,expects:"NaN",async:!1,message:t,_run(n,e){return Number.isNaN(n.value)?n.typed=!0:u(this,"type",n,e),n}}}function Ot(t){return{kind:"schema",type:"never",reference:Ot,expects:"never",async:!1,message:t,_run(n,e){return u(this,"type",n,e),n}}}function xt(t,n){return{kind:"schema",type:"non_nullable",reference:xt,expects:"!null",async:!1,wrapped:t,message:n,_run(e,s){return e.value===null?(u(this,"type",e,s),e):this.wrapped._run(e,s)}}}function wt(t,n){return{kind:"schema",type:"non_nullable",reference:wt,expects:"!null",async:!0,wrapped:t,message:n,async _run(e,s){return e.value===null?(u(this,"type",e,s),e):this.wrapped._run(e,s)}}}function gt(t,n){return{kind:"schema",type:"non_nullish",reference:gt,expects:"!null & !undefined",async:!1,wrapped:t,message:n,_run(e,s){return e.value===null||e.value===void 0?(u(this,"type",e,s),e):this.wrapped._run(e,s)}}}function St(t,n){return{kind:"schema",type:"non_nullish",reference:St,expects:"!null & !undefined",async:!0,wrapped:t,message:n,async _run(e,s){return e.value===null||e.value===void 0?(u(this,"type",e,s),e):this.wrapped._run(e,s)}}}function M(t,n){return{kind:"schema",type:"non_optional",reference:M,expects:"!undefined",async:!1,wrapped:t,message:n,_run(e,s){return e.value===void 0?(u(this,"type",e,s),e):this.wrapped._run(e,s)}}}function P(t,n){return{kind:"schema",type:"non_optional",reference:P,expects:"!undefined",async:!0,wrapped:t,message:n,async _run(e,s){return e.value===void 0?(u(this,"type",e,s),e):this.wrapped._run(e,s)}}}function Bt(t){return{kind:"schema",type:"null",reference:Bt,expects:"null",async:!1,message:t,_run(n,e){return n.value===null?n.typed=!0:u(this,"type",n,e),n}}}function At(t,...n){let e={kind:"schema",type:"nullable",reference:At,expects:`${t.expects} | null`,async:!1,wrapped:t,_run(s,r){return s.value===null&&("default"in this&&(s.value=d(this,s,r)),s.value===null)?(s.typed=!0,s):this.wrapped._run(s,r)}};return 0 in n&&(e.default=n[0]),e}function bt(t,...n){let e={kind:"schema",type:"nullable",reference:bt,expects:`${t.expects} | null`,async:!0,wrapped:t,async _run(s,r){return s.value===null&&("default"in this&&(s.value=await d(this,s,r)),s.value===null)?(s.typed=!0,s):this.wrapped._run(s,r)}};return 0 in n&&(e.default=n[0]),e}function Et(t,...n){let e={kind:"schema",type:"nullish",reference:Et,expects:`${t.expects} | null | undefined`,async:!1,wrapped:t,_run(s,r){return(s.value===null||s.value===void 0)&&("default"in this&&(s.value=d(this,s,r)),s.value===null||s.value===void 0)?(s.typed=!0,s):this.wrapped._run(s,r)}};return 0 in n&&(e.default=n[0]),e}function Mt(t,...n){let e={kind:"schema",type:"nullish",reference:Mt,expects:`${t.expects} | null | undefined`,async:!0,wrapped:t,async _run(s,r){return(s.value===null||s.value===void 0)&&("default"in this&&(s.value=await d(this,s,r)),s.value===null||s.value===void 0)?(s.typed=!0,s):this.wrapped._run(s,r)}};return 0 in n&&(e.default=n[0]),e}function Pt(t){return{kind:"schema",type:"number",reference:Pt,expects:"number",async:!1,message:t,_run(n,e){return typeof n.value=="number"&&!isNaN(n.value)?n.typed=!0:u(this,"type",n,e),n}}}function jt(t,n){return{kind:"schema",type:"object",reference:jt,expects:"Object",async:!1,entries:t,message:n,_run(e,s){let r=e.value;if(r&&typeof r=="object"){e.typed=!0,e.value={};for(let o in this.entries){let i=r[o],a=this.entries[o]._run({typed:!1,value:i},s);if(a.issues){let I={type:"object",origin:"value",input:r,key:o,value:i};for(let m of a.issues)m.path?m.path.unshift(I):m.path=[I],e.issues?.push(m);if(e.issues||(e.issues=a.issues),s.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),(a.value!==void 0||o in r)&&(e.value[o]=a.value)}}else u(this,"type",e,s);return e}}}function vt(t,n){return{kind:"schema",type:"object",reference:vt,expects:"Object",async:!0,entries:t,message:n,async _run(e,s){let r=e.value;if(r&&typeof r=="object"){e.typed=!0,e.value={};let o=await Promise.all(Object.entries(this.entries).map(async([i,a])=>{let I=r[i];return[i,I,await a._run({typed:!1,value:I},s)]}));for(let[i,a,I]of o){if(I.issues){let m={type:"object",origin:"value",input:r,key:i,value:a};for(let p of I.issues)p.path?p.path.unshift(m):p.path=[m],e.issues?.push(p);if(e.issues||(e.issues=I.issues),s.abortEarly){e.typed=!1;break}}I.typed||(e.typed=!1),(I.value!==void 0||i in r)&&(e.value[i]=I.value)}}else u(this,"type",e,s);return e}}}function Rt(t,n,e){return{kind:"schema",type:"object_with_rest",reference:Rt,expects:"Object",async:!1,entries:t,rest:n,message:e,_run(s,r){let o=s.value;if(o&&typeof o=="object"){s.typed=!0,s.value={};for(let i in this.entries){let a=o[i],I=this.entries[i]._run({typed:!1,value:a},r);if(I.issues){let m={type:"object",origin:"value",input:o,key:i,value:a};for(let p of I.issues)p.path?p.path.unshift(m):p.path=[m],s.issues?.push(p);if(s.issues||(s.issues=I.issues),r.abortEarly){s.typed=!1;break}}I.typed||(s.typed=!1),(I.value!==void 0||i in o)&&(s.value[i]=I.value)}if(!s.issues||!r.abortEarly){for(let i in o)if(y(o,i)&&!(i in this.entries)){let a=o[i],I=this.rest._run({typed:!1,value:a},r);if(I.issues){let m={type:"object",origin:"value",input:o,key:i,value:a};for(let p of I.issues)p.path?p.path.unshift(m):p.path=[m],s.issues?.push(p);if(s.issues||(s.issues=I.issues),r.abortEarly){s.typed=!1;break}}I.typed||(s.typed=!1),s.value[i]=I.value}}}else u(this,"type",s,r);return s}}}function _t(t,n,e){return{kind:"schema",type:"object_with_rest",reference:_t,expects:"Object",async:!0,entries:t,rest:n,message:e,async _run(s,r){let o=s.value;if(o&&typeof o=="object"){s.typed=!0,s.value={};let[i,a]=await Promise.all([Promise.all(Object.entries(this.entries).map(async([I,m])=>{let p=o[I];return[I,p,await m._run({typed:!1,value:p},r)]})),Promise.all(Object.entries(o).filter(([I])=>y(o,I)&&!(I in this.entries)).map(async([I,m])=>[I,m,await this.rest._run({typed:!1,value:m},r)]))]);for(let[I,m,p]of i){if(p.issues){let c={type:"object",origin:"value",input:o,key:I,value:m};for(let T of p.issues)T.path?T.path.unshift(c):T.path=[c],s.issues?.push(T);if(s.issues||(s.issues=p.issues),r.abortEarly){s.typed=!1;break}}p.typed||(s.typed=!1),(p.value!==void 0||I in o)&&(s.value[I]=p.value)}if(!s.issues||!r.abortEarly)for(let[I,m,p]of a){if(p.issues){let c={type:"object",origin:"value",input:o,key:I,value:m};for(let T of p.issues)T.path?T.path.unshift(c):T.path=[c],s.issues?.push(T);if(s.issues||(s.issues=p.issues),r.abortEarly){s.typed=!1;break}}p.typed||(s.typed=!1),s.value[I]=p.value}}else u(this,"type",s,r);return s}}}function j(t,...n){let e={kind:"schema",type:"optional",reference:j,expects:`${t.expects} | undefined`,async:!1,wrapped:t,_run(s,r){return s.value===void 0&&("default"in this&&(s.value=d(this,s,r)),s.value===void 0)?(s.typed=!0,s):this.wrapped._run(s,r)}};return 0 in n&&(e.default=n[0]),e}function v(t,...n){let e={kind:"schema",type:"optional",reference:v,expects:`${t.expects} | undefined`,async:!0,wrapped:t,async _run(s,r){return s.value===void 0&&("default"in this&&(s.value=await d(this,s,r)),s.value===void 0)?(s.typed=!0,s):this.wrapped._run(s,r)}};return 0 in n&&(e.default=n[0]),e}function R(t,n){return{kind:"schema",type:"picklist",reference:R,expects:t.map(f).join(" | ")||"never",async:!1,options:t,message:n,_run(e,s){return this.options.includes(e.value)?e.typed=!0:u(this,"type",e,s),e}}}function qt(t){return{kind:"schema",type:"promise",reference:qt,expects:"Promise",async:!1,message:t,_run(n,e){return n.value instanceof Promise?n.typed=!0:u(this,"type",n,e),n}}}function Dt(t,n,e){return{kind:"schema",type:"record",reference:Dt,expects:"Object",async:!1,key:t,value:n,message:e,_run(s,r){let o=s.value;if(o&&typeof o=="object"){s.typed=!0,s.value={};for(let i in o)if(y(o,i)){let a=o[i],I=this.key._run({typed:!1,value:i},r);if(I.issues){let p={type:"object",origin:"key",input:o,key:i,value:a};for(let c of I.issues)c.path=[p],s.issues?.push(c);if(s.issues||(s.issues=I.issues),r.abortEarly){s.typed=!1;break}}let m=this.value._run({typed:!1,value:a},r);if(m.issues){let p={type:"object",origin:"value",input:o,key:i,value:a};for(let c of m.issues)c.path?c.path.unshift(p):c.path=[p],s.issues?.push(c);if(s.issues||(s.issues=m.issues),r.abortEarly){s.typed=!1;break}}(!I.typed||!m.typed)&&(s.typed=!1),I.typed&&(s.value[I.value]=m.value)}}else u(this,"type",s,r);return s}}}function Nt(t,n,e){return{kind:"schema",type:"record",reference:Nt,expects:"Object",async:!0,key:t,value:n,message:e,async _run(s,r){let o=s.value;if(o&&typeof o=="object"){s.typed=!0,s.value={};let i=await Promise.all(Object.entries(o).filter(([a])=>y(o,a)).map(([a,I])=>Promise.all([a,I,this.key._run({typed:!1,value:a},r),this.value._run({typed:!1,value:I},r)])));for(let[a,I,m,p]of i){if(m.issues){let c={type:"object",origin:"key",input:o,key:a,value:I};for(let T of m.issues)T.path=[c],s.issues?.push(T);if(s.issues||(s.issues=m.issues),r.abortEarly){s.typed=!1;break}}if(p.issues){let c={type:"object",origin:"value",input:o,key:a,value:I};for(let T of p.issues)T.path?T.path.unshift(c):T.path=[c],s.issues?.push(T);if(s.issues||(s.issues=p.issues),r.abortEarly){s.typed=!1;break}}(!m.typed||!p.typed)&&(s.typed=!1),m.typed&&(s.value[m.value]=p.value)}}else u(this,"type",s,r);return s}}}function Wt(t,n){return{kind:"schema",type:"set",reference:Wt,expects:"Set",async:!1,value:t,message:n,_run(e,s){let r=e.value;if(r instanceof Set){e.typed=!0,e.value=new Set;for(let o of r){let i=this.value._run({typed:!1,value:o},s);if(i.issues){let a={type:"set",origin:"value",input:r,value:o};for(let I of i.issues)I.path?I.path.unshift(a):I.path=[a],e.issues?.push(I);if(e.issues||(e.issues=i.issues),s.abortEarly){e.typed=!1;break}}i.typed||(e.typed=!1),e.value.add(i.value)}}else u(this,"type",e,s);return e}}}function Vt(t,n){return{kind:"schema",type:"set",reference:Vt,expects:"Set",async:!0,value:t,message:n,async _run(e,s){let r=e.value;if(r instanceof Set){e.typed=!0,e.value=new Set;let o=await Promise.all([...r].map(async i=>[i,await this.value._run({typed:!1,value:i},s)]));for(let[i,a]of o){if(a.issues){let I={type:"set",origin:"value",input:r,value:i};for(let m of a.issues)m.path?m.path.unshift(I):m.path=[I],e.issues?.push(m);if(e.issues||(e.issues=a.issues),s.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.add(a.value)}}else u(this,"type",e,s);return e}}}function Ct(t,n){return{kind:"schema",type:"strict_object",reference:Ct,expects:"Object",async:!1,entries:t,message:n,_run(e,s){let r=e.value;if(r&&typeof r=="object"){e.typed=!0,e.value={};for(let o in this.entries){let i=r[o],a=this.entries[o]._run({typed:!1,value:i},s);if(a.issues){let I={type:"object",origin:"value",input:r,key:o,value:i};for(let m of a.issues)m.path?m.path.unshift(I):m.path=[I],e.issues?.push(m);if(e.issues||(e.issues=a.issues),s.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),(a.value!==void 0||o in r)&&(e.value[o]=a.value)}if(!e.issues||!s.abortEarly){for(let o in r)if(!(o in this.entries)){let i=r[o];u(this,"type",e,s,{input:i,expected:"never",path:[{type:"object",origin:"value",input:r,key:o,value:i}]});break}}}else u(this,"type",e,s);return e}}}function Lt(t,n){return{kind:"schema",type:"strict_object",reference:Lt,expects:"Object",async:!0,entries:t,message:n,async _run(e,s){let r=e.value;if(r&&typeof r=="object"){e.typed=!0,e.value={};let o=await Promise.all(Object.entries(this.entries).map(async([i,a])=>{let I=r[i];return[i,I,await a._run({typed:!1,value:I},s)]}));for(let[i,a,I]of o){if(I.issues){let m={type:"object",origin:"value",input:r,key:i,value:a};for(let p of I.issues)p.path?p.path.unshift(m):p.path=[m],e.issues?.push(p);if(e.issues||(e.issues=I.issues),s.abortEarly){e.typed=!1;break}}I.typed||(e.typed=!1),(I.value!==void 0||i in r)&&(e.value[i]=I.value)}if(!e.issues||!s.abortEarly){for(let i in r)if(!(i in this.entries)){let a=r[i];u(this,"type",e,s,{input:a,expected:"never",path:[{type:"object",origin:"value",input:r,key:i,value:a}]});break}}}else u(this,"type",e,s);return e}}}function Kt(t,n){return{kind:"schema",type:"strict_tuple",reference:Kt,expects:"Array",async:!1,items:t,message:n,_run(e,s){let r=e.value;if(Array.isArray(r)){e.typed=!0,e.value=[];for(let o=0;o<this.items.length;o++){let i=r[o],a=this.items[o]._run({typed:!1,value:i},s);if(a.issues){let I={type:"array",origin:"value",input:r,key:o,value:i};for(let m of a.issues)m.path?m.path.unshift(I):m.path=[I],e.issues?.push(m);if(e.issues||(e.issues=a.issues),s.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.push(a.value)}if(!(e.issues&&s.abortEarly)&&this.items.length<r.length){let o=r[t.length];u(this,"type",e,s,{input:o,expected:"never",path:[{type:"array",origin:"value",input:r,key:this.items.length,value:o}]})}}else u(this,"type",e,s);return e}}}function $t(t,n){return{kind:"schema",type:"strict_tuple",reference:$t,expects:"Array",async:!0,items:t,message:n,async _run(e,s){let r=e.value;if(Array.isArray(r)){e.typed=!0,e.value=[];let o=await Promise.all(this.items.map(async(i,a)=>{let I=r[a];return[a,I,await i._run({typed:!1,value:I},s)]}));for(let[i,a,I]of o){if(I.issues){let m={type:"array",origin:"value",input:r,key:i,value:a};for(let p of I.issues)p.path?p.path.unshift(m):p.path=[m],e.issues?.push(p);if(e.issues||(e.issues=I.issues),s.abortEarly){e.typed=!1;break}}I.typed||(e.typed=!1),e.value.push(I.value)}if(!(e.issues&&s.abortEarly)&&this.items.length<r.length){let i=r[t.length];u(this,"type",e,s,{input:i,expected:"never",path:[{type:"array",origin:"value",input:r,key:this.items.length,value:i}]})}}else u(this,"type",e,s);return e}}}function zt(t){return{kind:"schema",type:"string",reference:zt,expects:"string",async:!1,message:t,_run(n,e){return typeof n.value=="string"?n.typed=!0:u(this,"type",n,e),n}}}function Ft(t){return{kind:"schema",type:"symbol",reference:Ft,expects:"symbol",async:!1,message:t,_run(n,e){return typeof n.value=="symbol"?n.typed=!0:u(this,"type",n,e),n}}}function Ut(t,n){return{kind:"schema",type:"tuple",reference:Ut,expects:"Array",async:!1,items:t,message:n,_run(e,s){let r=e.value;if(Array.isArray(r)){e.typed=!0,e.value=[];for(let o=0;o<this.items.length;o++){let i=r[o],a=this.items[o]._run({typed:!1,value:i},s);if(a.issues){let I={type:"array",origin:"value",input:r,key:o,value:i};for(let m of a.issues)m.path?m.path.unshift(I):m.path=[I],e.issues?.push(m);if(e.issues||(e.issues=a.issues),s.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.push(a.value)}}else u(this,"type",e,s);return e}}}function Gt(t,n){return{kind:"schema",type:"tuple",reference:Gt,expects:"Array",async:!0,items:t,message:n,async _run(e,s){let r=e.value;if(Array.isArray(r)){e.typed=!0,e.value=[];let o=await Promise.all(this.items.map(async(i,a)=>{let I=r[a];return[a,I,await i._run({typed:!1,value:I},s)]}));for(let[i,a,I]of o){if(I.issues){let m={type:"array",origin:"value",input:r,key:i,value:a};for(let p of I.issues)p.path?p.path.unshift(m):p.path=[m],e.issues?.push(p);if(e.issues||(e.issues=I.issues),s.abortEarly){e.typed=!1;break}}I.typed||(e.typed=!1),e.value.push(I.value)}}else u(this,"type",e,s);return e}}}function Xt(t,n,e){return{kind:"schema",type:"tuple_with_rest",reference:Xt,expects:"Array",async:!1,items:t,rest:n,message:e,_run(s,r){let o=s.value;if(Array.isArray(o)){s.typed=!0,s.value=[];for(let i=0;i<this.items.length;i++){let a=o[i],I=this.items[i]._run({typed:!1,value:a},r);if(I.issues){let m={type:"array",origin:"value",input:o,key:i,value:a};for(let p of I.issues)p.path?p.path.unshift(m):p.path=[m],s.issues?.push(p);if(s.issues||(s.issues=I.issues),r.abortEarly){s.typed=!1;break}}I.typed||(s.typed=!1),s.value.push(I.value)}if(!s.issues||!r.abortEarly)for(let i=this.items.length;i<o.length;i++){let a=o[i],I=this.rest._run({typed:!1,value:a},r);if(I.issues){let m={type:"array",origin:"value",input:o,key:i,value:a};for(let p of I.issues)p.path?p.path.unshift(m):p.path=[m],s.issues?.push(p);if(s.issues||(s.issues=I.issues),r.abortEarly){s.typed=!1;break}}I.typed||(s.typed=!1),s.value.push(I.value)}}else u(this,"type",s,r);return s}}}function Ht(t,n,e){return{kind:"schema",type:"tuple_with_rest",reference:Ht,expects:"Array",async:!0,items:t,rest:n,message:e,async _run(s,r){let o=s.value;if(Array.isArray(o)){s.typed=!0,s.value=[];let[i,a]=await Promise.all([Promise.all(this.items.map(async(I,m)=>{let p=o[m];return[m,p,await I._run({typed:!1,value:p},r)]})),Promise.all(o.slice(this.items.length).map(async(I,m)=>[m+this.items.length,I,await this.rest._run({typed:!1,value:I},r)]))]);for(let[I,m,p]of i){if(p.issues){let c={type:"array",origin:"value",input:o,key:I,value:m};for(let T of p.issues)T.path?T.path.unshift(c):T.path=[c],s.issues?.push(T);if(s.issues||(s.issues=p.issues),r.abortEarly){s.typed=!1;break}}p.typed||(s.typed=!1),s.value.push(p.value)}if(!s.issues||!r.abortEarly)for(let[I,m,p]of a){if(p.issues){let c={type:"array",origin:"value",input:o,key:I,value:m};for(let T of p.issues)T.path?T.path.unshift(c):T.path=[c],s.issues?.push(T);if(s.issues||(s.issues=p.issues),r.abortEarly){s.typed=!1;break}}p.typed||(s.typed=!1),s.value.push(p.value)}}else u(this,"type",s,r);return s}}}function Jt(t){return{kind:"schema",type:"undefined",reference:Jt,expects:"undefined",async:!1,message:t,_run(n,e){return n.value===void 0?n.typed=!0:u(this,"type",n,e),n}}}function g(t){let n;if(t)for(let e of t)n?n.push(...e.issues):n=e.issues;return n}function Zt(t,n){return{kind:"schema",type:"union",reference:Zt,expects:[...new Set(t.map(e=>e.expects))].join(" | ")||"never",async:!1,options:t,message:n,_run(e,s){let r,o,i;for(let a of this.options){let I=a._run({typed:!1,value:e.value},s);if(I.typed)if(I.issues)o?o.push(I):o=[I];else{r=I;break}else i?i.push(I):i=[I]}if(r)return r;if(o){if(o.length===1)return o[0];u(this,"type",e,s,{issues:g(o)}),e.typed=!0}else{if(i?.length===1)return i[0];u(this,"type",e,s,{issues:g(i)})}return e}}}function Qt(t,n){return{kind:"schema",type:"union",reference:Qt,expects:[...new Set(t.map(e=>e.expects))].join(" | ")||"never",async:!0,options:t,message:n,async _run(e,s){let r,o,i;for(let a of this.options){let I=await a._run({typed:!1,value:e.value},s);if(I.typed)if(I.issues)o?o.push(I):o=[I];else{r=I;break}else i?i.push(I):i=[I]}if(r)return r;if(o){if(o.length===1)return o[0];u(this,"type",e,s,{issues:g(o)}),e.typed=!0}else{if(i?.length===1)return i[0];u(this,"type",e,s,{issues:g(i)})}return e}}}function Yt(){return{kind:"schema",type:"unknown",reference:Yt,expects:"unknown",async:!1,_run(t){return t.typed=!0,t}}}function A(t,n,e=new Set){for(let s of n)s.type==="variant"?A(t,s.options,e):e.add(s.entries[t].expects);return e}function es(t,n,e){let s;return{kind:"schema",type:"variant",reference:es,expects:"Object",async:!1,key:t,options:n,message:e,_run(r,o){let i=r.value;if(i&&typeof i=="object"){let a=i[this.key];if(this.key in i){let I;for(let m of this.options)if(m.type==="variant"||!m.entries[this.key]._run({typed:!1,value:a},o).issues){let p=m._run({typed:!1,value:i},o);if(!p.issues)return p;(!I||!I.typed&&p.typed)&&(I=p)}if(I)return I}s||(s=[...A(this.key,this.options)].join(" | ")||"never"),u(this,"type",r,o,{input:a,expected:s,path:[{type:"object",origin:"value",input:i,key:this.key,value:a}]})}else u(this,"type",r,o);return r}}}function ns(t,n,e){let s;return{kind:"schema",type:"variant",reference:ns,expects:"Object",async:!0,key:t,options:n,message:e,async _run(r,o){let i=r.value;if(i&&typeof i=="object"){let a=i[this.key];if(this.key in i){let I;for(let m of this.options)if(m.type==="variant"||!(await m.entries[this.key]._run({typed:!1,value:a},o)).issues){let p=await m._run({typed:!1,value:i},o);if(!p.issues)return p;(!I||!I.typed&&p.typed)&&(I=p)}if(I)return I}s||(s=[...A(this.key,this.options)].join(" | ")||"never"),u(this,"type",r,o,{input:a,expected:s,path:[{type:"object",origin:"value",input:i,key:this.key,value:a}]})}else u(this,"type",r,o);return r}}}function ts(t){return{kind:"schema",type:"void",reference:ts,expects:"void",async:!1,message:t,_run(n,e){return n.value===void 0?n.typed=!0:u(this,"type",n,e),n}}}function Ja(t,n){return R(Object.keys(t.entries),n)}function Qa(t,n){let e={...t.entries};for(let s of n)delete e[s];return{...t,entries:e}}function pe(t,n,e){let s=t._run({typed:!1,value:n},l(e));if(s.issues)throw new k(s.issues);return s.value}async function ce(t,n,e){let s=await t._run({typed:!1,value:n},l(e));if(s.issues)throw new k(s.issues);return s.value}function om(t,n){let e=s=>pe(t,s,n);return e.schema=t,e.config=n,e}function mm(t,n){let e=s=>ce(t,s,n);return e.schema=t,e.config=n,e}function Tm(t,n){let e={};for(let s in t.entries)e[s]=!n||n.includes(s)?j(t.entries[s]):t.entries[s];return{...t,entries:e}}function ym(t,n){let e={};for(let s in t.entries)e[s]=!n||n.includes(s)?v(t.entries[s]):t.entries[s];return{...t,entries:e}}function km(t,n){let e={};for(let s of n)e[s]=t.entries[s];return{...t,entries:e}}function Om(...t){return{...t[0],pipe:t,_run(n,e){for(let s=0;s<t.length;s++){if(n.issues&&(t[s].kind==="schema"||t[s].kind==="transformation")){n.typed=!1;break}(!n.issues||!e.abortEarly&&!e.abortPipeEarly)&&(n=t[s]._run(n,e))}return n}}}function wm(...t){return{...t[0],pipe:t,async:!0,async _run(n,e){for(let s=0;s<t.length;s++){if(n.issues&&(t[s].kind==="schema"||t[s].kind==="transformation")){n.typed=!1;break}(!n.issues||!e.abortEarly&&!e.abortPipeEarly)&&(n=await t[s]._run(n,e))}return n}}}function Bm(t,n,e){let s=Array.isArray(n)?n:void 0,r=Array.isArray(n)?e:n,o={};for(let i in t.entries)o[i]=!s||s.includes(i)?M(t.entries[i],r):t.entries[i];return{...t,entries:o}}function Em(t,n,e){let s=Array.isArray(n)?n:void 0,r=Array.isArray(n)?e:n,o={};for(let i in t.entries)o[i]=!s||s.includes(i)?P(t.entries[i],r):t.entries[i];return{...t,entries:o}}function Te(t,n,e){let s=t._run({typed:!1,value:n},l(e));return{typed:s.typed,success:!s.issues,output:s.value,issues:s.issues}}async function fe(t,n,e){let s=await t._run({typed:!1,value:n},l(e));return{typed:s.typed,success:!s.issues,output:s.value,issues:s.issues}}function qm(t,n){let e=s=>Te(t,s,n);return e.schema=t,e.config=n,e}function Wm(t,n){let e=s=>fe(t,s,n);return e.schema=t,e.config=n,e}function Cm(t){return t.wrapped}export{_ as BIC_REGEX,q as CUID2_REGEX,D as DECIMAL_REGEX,N as EMAIL_REGEX,W as EMOJI_REGEX,V as HEXADECIMAL_REGEX,C as HEX_COLOR_REGEX,L as IMEI_REGEX,K as IPV4_REGEX,$ as IPV6_REGEX,z as IP_REGEX,F as ISO_DATE_REGEX,U as ISO_DATE_TIME_REGEX,H as ISO_TIMESTAMP_REGEX,G as ISO_TIME_REGEX,X as ISO_TIME_SECOND_REGEX,J as ISO_WEEK_REGEX,Z as MAC48_REGEX,Q as MAC64_REGEX,Y as MAC_REGEX,ee as OCTAL_REGEX,ne as ULID_REGEX,te as UUID_REGEX,k as ValiError,u as _addIssue,b as _isLuhnAlgo,y as _isValidObjectKey,f as _stringify,Hn as any,Jn as array,Zn as arrayAsync,de as awaitAsync,le as bic,Qn as bigint,Yn as blob,et as boolean,ke as brand,he as bytes,Oe as check,xe as checkAsync,we as checkItems,zI as config,Ae as creditCard,be as cuid2,nt as custom,tt as customAsync,st as date,Ee as decimal,Is as deleteGlobalConfig,as as deleteGlobalMessage,cs as deleteSchemaMessage,ds as deleteSpecificMessage,Me as email,Pe as emoji,je as empty,ve as endsWith,gs as entriesFromList,ut as enum,ut as enum_,Re as everyItem,_e as excludes,XI as fallback,ZI as fallbackAsync,rt as file,qe as filterItems,De as findItem,Ne as finite,eo as flatten,to as forward,uo as forwardAsync,It as function,It as function_,d as getDefault,oe as getDefaults,ie as getDefaultsAsync,Ie as getDotPath,h as getFallback,ae as getFallbacks,me as getFallbacksAsync,l as getGlobalConfig,se as getGlobalMessage,ue as getSchemaMessage,re as getSpecificMessage,Ve as hash,Le as hexColor,Ce as hexadecimal,Ke as imei,$e as includes,ot as instance,ze as integer,it as intersect,at as intersectAsync,Fe as ip,Ue as ipv4,Ge as ipv6,yo as is,As as isOfKind,Es as isOfType,js as isValiError,Xe as isoDate,He as isoDateTime,Je as isoTime,Ze as isoTimeSecond,Qe as isoTimestamp,Ye as isoWeek,Ja as keyof,mt as lazy,pt as lazyAsync,en as length,ct as literal,Tt as looseObject,ft as looseObjectAsync,dt as looseTuple,yt as looseTupleAsync,nn as mac,tn as mac48,sn as mac64,lt as map,kt as mapAsync,un as mapItems,rn as maxBytes,In as maxLength,on as maxSize,an as maxValue,mn as mimeType,pn as minBytes,cn as minLength,Tn as minSize,fn as minValue,dn as multipleOf,ht as nan,Ot as never,yn as nonEmpty,xt as nonNullable,wt as nonNullableAsync,gt as nonNullish,St as nonNullishAsync,M as nonOptional,P as nonOptionalAsync,ln as notBytes,kn as notLength,hn as notSize,On as notValue,Bt as null,Bt as null_,At as nullable,bt as nullableAsync,Et as nullish,Mt as nullishAsync,Pt as number,jt as object,vt as objectAsync,Rt as objectWithRest,_t as objectWithRestAsync,xn as octal,Qa as omit,j as optional,v as optionalAsync,pe as parse,ce as parseAsync,om as parser,mm as parserAsync,Tm as partial,ym as partialAsync,wn as partialCheck,gn as partialCheckAsync,km as pick,R as picklist,Om as pipe,wm as pipeAsync,qt as promise,Sn as rawCheck,Bn as rawCheckAsync,An as rawTransform,bn as rawTransformAsync,En as readonly,Dt as record,Nt as recordAsync,Mn as reduceItems,Pn as regex,Bm as required,Em as requiredAsync,jn as safeInteger,Te as safeParse,fe as safeParseAsync,qm as safeParser,Wm as safeParserAsync,Wt as set,Vt as setAsync,rs as setGlobalConfig,is as setGlobalMessage,ps as setSchemaMessage,fs as setSpecificMessage,vn as size,Rn as someItem,_n as sortItems,qn as startsWith,Ct as strictObject,Lt as strictObjectAsync,Kt as strictTuple,$t as strictTupleAsync,zt as string,Ft as symbol,Dn as toLowerCase,Nn as toMaxValue,Wn as toMinValue,Vn as toUpperCase,Cn as transform,Ln as transformAsync,Kn as trim,$n as trimEnd,zn as trimStart,Ut as tuple,Gt as tupleAsync,Xt as tupleWithRest,Ht as tupleWithRestAsync,Fn as ulid,Jt as undefined,Jt as undefined_,Zt as union,Qt as unionAsync,Yt as unknown,Cm as unwrap,Un as url,Gn as uuid,Xn as value,es as variant,ns as variantAsync,ts as void,ts as void_};
function de(){return{kind:"transformation",type:"await",reference:de,async:!0,async _run(t){return t.value=await t.value,t}}}var _=/^[A-Z]{6}(?!00)[A-Z\d]{2}(?:[A-Z\d]{3})?$/u,q=/^[a-z][\da-z]*$/u,D=/^\d+$/u,N=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu,W=/^[\p{Extended_Pictographic}\p{Emoji_Component}]+$/u,V=/^(?:0h|0x)?[\da-f]+$/iu,C=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/iu,L=/^\d{15}$|^\d{2}-\d{6}-\d{6}-\d$/u,K=/^(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])(?:\.(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])){3}$/u,$=/^(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,7}:|(?:[\da-f]{1,4}:){1,6}:[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,5}(?::[\da-f]{1,4}){1,2}|(?:[\da-f]{1,4}:){1,4}(?::[\da-f]{1,4}){1,3}|(?:[\da-f]{1,4}:){1,3}(?::[\da-f]{1,4}){1,4}|(?:[\da-f]{1,4}:){1,2}(?::[\da-f]{1,4}){1,5}|[\da-f]{1,4}:(?::[\da-f]{1,4}){1,6}|:(?:(?::[\da-f]{1,4}){1,7}|:)|fe80:(?::[\da-f]{0,4}){0,4}%[\da-z]+|::(?:f{4}(?::0{1,4})?:)?(?:(?:25[0-5]|(?:2[0-4]|1?\d)?\d)\.){3}(?:25[0-5]|(?:2[0-4]|1?\d)?\d)|(?:[\da-f]{1,4}:){1,4}:(?:(?:25[0-5]|(?:2[0-4]|1?\d)?\d)\.){3}(?:25[0-5]|(?:2[0-4]|1?\d)?\d))$/iu,z=/^(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])(?:\.(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])){3}$|^(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,7}:|(?:[\da-f]{1,4}:){1,6}:[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,5}(?::[\da-f]{1,4}){1,2}|(?:[\da-f]{1,4}:){1,4}(?::[\da-f]{1,4}){1,3}|(?:[\da-f]{1,4}:){1,3}(?::[\da-f]{1,4}){1,4}|(?:[\da-f]{1,4}:){1,2}(?::[\da-f]{1,4}){1,5}|[\da-f]{1,4}:(?::[\da-f]{1,4}){1,6}|:(?:(?::[\da-f]{1,4}){1,7}|:)|fe80:(?::[\da-f]{0,4}){0,4}%[\da-z]+|::(?:f{4}(?::0{1,4})?:)?(?:(?:25[0-5]|(?:2[0-4]|1?\d)?\d)\.){3}(?:25[0-5]|(?:2[0-4]|1?\d)?\d)|(?:[\da-f]{1,4}:){1,4}:(?:(?:25[0-5]|(?:2[0-4]|1?\d)?\d)\.){3}(?:25[0-5]|(?:2[0-4]|1?\d)?\d))$/iu,F=/^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])$/u,U=/^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])T(?:0\d|1\d|2[0-3]):[0-5]\d$/u,G=/^(?:0\d|1\d|2[0-3]):[0-5]\d$/u,X=/^(?:0\d|1\d|2[0-3])(?::[0-5]\d){2}$/u,H=/^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])T(?:0\d|1\d|2[0-3])(?::[0-5]\d){2}(?:\.\d{1,9})?(?:Z|[+-](?:0\d|1\d|2[0-3])(?::?[0-5]\d)?)$/u,J=/^\d{4}-W(?:0[1-9]|[1-4]\d|5[0-3])$/u,Z=/^(?:[\da-f]{2}:){5}[\da-f]{2}$|^(?:[\da-f]{2}-){5}[\da-f]{2}$|^(?:[\da-f]{4}\.){2}[\da-f]{4}$/iu,Q=/^(?:[\da-f]{2}:){7}[\da-f]{2}$|^(?:[\da-f]{2}-){7}[\da-f]{2}$|^(?:[\da-f]{4}\.){3}[\da-f]{4}$|^(?:[\da-f]{4}:){3}[\da-f]{4}$/iu,Y=/^(?:[\da-f]{2}:){5}[\da-f]{2}$|^(?:[\da-f]{2}-){5}[\da-f]{2}$|^(?:[\da-f]{4}\.){2}[\da-f]{4}$|^(?:[\da-f]{2}:){7}[\da-f]{2}$|^(?:[\da-f]{2}-){7}[\da-f]{2}$|^(?:[\da-f]{4}\.){3}[\da-f]{4}$|^(?:[\da-f]{4}:){3}[\da-f]{4}$/iu,ee=/^(?:0o)?[0-7]+$/iu,ne=/^[\da-hjkmnp-tv-z]{26}$/iu,te=/^[\da-f]{8}(?:-[\da-f]{4}){3}-[\da-f]{12}$/iu;var O;function Is(t){O={...O,...t}}function l(t){return{lang:t?.lang??O?.lang,message:t?.message,abortEarly:t?.abortEarly??O?.abortEarly,abortPipeEarly:t?.abortPipeEarly??O?.abortPipeEarly}}function os(){O=void 0}var S;function as(t,n){S||(S=new Map),S.set(n,t)}function se(t){return S?.get(t)}function ms(t){S?.delete(t)}var B;function cs(t,n){B||(B=new Map),B.set(n,t)}function ue(t){return B?.get(t)}function Ts(t){B?.delete(t)}var x;function ds(t,n,e){x||(x=new Map),x.get(t)||x.set(t,new Map),x.get(t).set(e,n)}function re(t,n){return x?.get(t)?.get(n)}function ys(t,n){x?.get(t)?.delete(n)}function f(t){let n=typeof t;return n==="string"?`"${t}"`:n==="number"||n==="bigint"||n==="boolean"?`${t}`:n==="object"||n==="function"?(t&&Object.getPrototypeOf(t)?.constructor?.name)??"null":n}function u(t,n,e,s,r){let o=r&&"input"in r?r.input:e.value,i=r?.expected??t.expects??null,a=r?.received??f(o),I={kind:t.kind,type:t.type,input:o,expected:i,received:a,message:`Invalid ${n}: ${i?`Expected ${i} but r`:"R"}eceived ${a}`,requirement:t.requirement,path:r?.path,issues:r?.issues,lang:s.lang,abortEarly:s.abortEarly,abortPipeEarly:s.abortPipeEarly},m=t.kind==="schema",p=r?.message??t.message??re(t.reference,I.lang)??(m?ue(I.lang):null)??s.message??se(I.lang);p&&(I.message=typeof p=="function"?p(I):p),m&&(e.typed=!1),e.issues?e.issues.push(I):e.issues=[I]}var ye=/\D/gu;function b(t){let n=t.replace(ye,""),e=n.length,s=1,r=0;for(;e;){let o=+n[--e];s^=1,r+=s?[0,2,4,6,8,1,3,5,7,9][o]:o}return r%10===0}function y(t,n){return Object.hasOwn(t,n)&&n!=="__proto__"&&n!=="prototype"&&n!=="constructor"}function Ss(t,n){let e={};for(let s of t)e[s]=n;return e}function Ie(t){if(t.path){let n="";for(let e of t.path)if(typeof e.key=="string"||typeof e.key=="number")n?n+=`.${e.key}`:n+=e.key;else return null;return n}return null}function bs(t,n){return n.kind===t}function Ms(t,n){return n.type===t}function vs(t){return t instanceof k}var k=class extends Error{issues;constructor(n){super(n[0].message),this.name="ValiError",this.issues=n}};function le(t){return{kind:"validation",type:"bic",reference:le,async:!1,expects:null,requirement:_,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"BIC",n,e),n}}}function ke(t){return{kind:"transformation",type:"brand",reference:ke,async:!1,name:t,_run(n){return n}}}function he(t,n){return{kind:"validation",type:"bytes",reference:he,async:!1,expects:`${t}`,requirement:t,message:n,_run(e,s){if(e.typed){let r=new TextEncoder().encode(e.value).length;r!==this.requirement&&u(this,"bytes",e,s,{received:`${r}`})}return e}}}function xe(t,n){return{kind:"validation",type:"check",reference:xe,async:!1,expects:null,requirement:t,message:n,_run(e,s){return e.typed&&!this.requirement(e.value)&&u(this,"input",e,s),e}}}function Oe(t,n){return{kind:"validation",type:"check",reference:Oe,async:!0,expects:null,requirement:t,message:n,async _run(e,s){return e.typed&&!await this.requirement(e.value)&&u(this,"input",e,s),e}}}function we(t,n){return{kind:"validation",type:"check_items",reference:we,async:!1,expects:null,requirement:t,message:n,_run(e,s){if(e.typed)for(let r=0;r<e.value.length;r++){let o=e.value[r];this.requirement(o,r,e.value)||u(this,"item",e,s,{input:o,path:[{type:"array",origin:"value",input:e.value,key:r,value:o}]})}return e}}}var ge=/^(?:\d{14,19}|\d{4}(?: \d{3,6}){2,4}|\d{4}(?:-\d{3,6}){2,4})$/u,Se=/[- ]/gu,Be=[/^3[47]\d{13}$/u,/^3(?:0[0-5]|[68]\d)\d{11,13}$/u,/^6(?:011|5\d{2})\d{12,15}$/u,/^(?:2131|1800|35\d{3})\d{11}$/u,/^5[1-5]\d{2}|(?:222\d|22[3-9]\d|2[3-6]\d{2}|27[01]\d|2720)\d{12}$/u,/^(?:6[27]\d{14,17}|81\d{14,17})$/u,/^4\d{12}(?:\d{3,6})?$/u];function Ae(t){return{kind:"validation",type:"credit_card",reference:Ae,async:!1,expects:null,requirement(n){let e;return ge.test(n)&&(e=n.replace(Se,""))&&Be.some(s=>s.test(e))&&b(e)},message:t,_run(n,e){return n.typed&&!this.requirement(n.value)&&u(this,"credit card",n,e),n}}}function be(t){return{kind:"validation",type:"cuid2",reference:be,async:!1,expects:null,requirement:q,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"Cuid2",n,e),n}}}function Ee(t){return{kind:"validation",type:"decimal",reference:Ee,async:!1,expects:null,requirement:D,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"decimal",n,e),n}}}function Me(t){return{kind:"validation",type:"email",reference:Me,expects:null,async:!1,requirement:N,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"email",n,e),n}}}function Pe(t){return{kind:"validation",type:"emoji",reference:Pe,async:!1,expects:null,requirement:W,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"emoji",n,e),n}}}function je(t){return{kind:"validation",type:"empty",reference:je,async:!1,expects:"0",message:t,_run(n,e){return n.typed&&n.value.length>0&&u(this,"length",n,e,{received:`${n.value.length}`}),n}}}function ve(t,n){return{kind:"validation",type:"ends_with",reference:ve,async:!1,expects:`"${t}"`,requirement:t,message:n,_run(e,s){return e.typed&&!e.value.endsWith(this.requirement)&&u(this,"end",e,s,{received:`"${e.value.slice(-this.requirement.length)}"`}),e}}}function Re(t,n){return{kind:"validation",type:"every_item",reference:Re,async:!1,expects:null,requirement:t,message:n,_run(e,s){return e.typed&&!e.value.every(this.requirement)&&u(this,"item",e,s),e}}}function _e(t,n){let e=f(t);return{kind:"validation",type:"excludes",reference:_e,async:!1,expects:`!${e}`,requirement:t,message:n,_run(s,r){return s.typed&&s.value.includes(this.requirement)&&u(this,"content",s,r,{received:e}),s}}}function qe(t){return{kind:"transformation",type:"filter_items",reference:qe,async:!1,operation:t,_run(n){return n.value=n.value.filter(this.operation),n}}}function De(t){return{kind:"transformation",type:"find_item",reference:De,async:!1,operation:t,_run(n){return n.value=n.value.find(this.operation),n}}}function Ne(t){return{kind:"validation",type:"finite",reference:Ne,async:!1,expects:null,requirement:Number.isFinite,message:t,_run(n,e){return n.typed&&!this.requirement(n.value)&&u(this,"finite",n,e),n}}}var We={md4:32,md5:32,sha1:40,sha256:64,sha384:96,sha512:128,ripemd128:32,ripemd160:40,tiger128:32,tiger160:40,tiger192:48,crc32:8,crc32b:8,adler32:8};function Ve(t,n){return{kind:"validation",type:"hash",reference:Ve,expects:null,async:!1,requirement:RegExp(t.map(e=>`^[a-f0-9]{${We[e]}}$`).join("|"),"iu"),message:n,_run(e,s){return e.typed&&!this.requirement.test(e.value)&&u(this,"hash",e,s),e}}}function Ce(t){return{kind:"validation",type:"hexadecimal",reference:Ce,async:!1,expects:null,requirement:V,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"hexadecimal",n,e),n}}}function Le(t){return{kind:"validation",type:"hex_color",reference:Le,async:!1,expects:null,requirement:C,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"hex color",n,e),n}}}function Ke(t){return{kind:"validation",type:"imei",reference:Ke,async:!1,expects:null,requirement(n){return L.test(n)&&b(n)},message:t,_run(n,e){return n.typed&&!this.requirement(n.value)&&u(this,"IMEI",n,e),n}}}function $e(t,n){let e=f(t);return{kind:"validation",type:"includes",reference:$e,async:!1,expects:e,requirement:t,message:n,_run(s,r){return s.typed&&!s.value.includes(this.requirement)&&u(this,"content",s,r,{received:`!${e}`}),s}}}function ze(t){return{kind:"validation",type:"integer",reference:ze,async:!1,expects:null,requirement:Number.isInteger,message:t,_run(n,e){return n.typed&&!this.requirement(n.value)&&u(this,"integer",n,e),n}}}function Fe(t){return{kind:"validation",type:"ip",reference:Fe,async:!1,expects:null,requirement:z,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"IP",n,e),n}}}function Ue(t){return{kind:"validation",type:"ipv4",reference:Ue,async:!1,expects:null,requirement:K,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"IPv4",n,e),n}}}function Ge(t){return{kind:"validation",type:"ipv6",reference:Ge,async:!1,expects:null,requirement:$,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"IPv6",n,e),n}}}function Xe(t){return{kind:"validation",type:"iso_date",reference:Xe,async:!1,expects:null,requirement:F,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"date",n,e),n}}}function He(t){return{kind:"validation",type:"iso_date_time",reference:He,async:!1,expects:null,requirement:U,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"date-time",n,e),n}}}function Je(t){return{kind:"validation",type:"iso_time",reference:Je,async:!1,expects:null,requirement:G,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"time",n,e),n}}}function Ze(t){return{kind:"validation",type:"iso_time_second",reference:Ze,async:!1,expects:null,requirement:X,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"time-second",n,e),n}}}function Qe(t){return{kind:"validation",type:"iso_timestamp",reference:Qe,async:!1,expects:null,requirement:H,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"timestamp",n,e),n}}}function Ye(t){return{kind:"validation",type:"iso_week",reference:Ye,async:!1,expects:null,requirement:J,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"week",n,e),n}}}function en(t,n){return{kind:"validation",type:"length",reference:en,async:!1,expects:`${t}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value.length!==this.requirement&&u(this,"length",e,s,{received:`${e.value.length}`}),e}}}function nn(t){return{kind:"validation",type:"mac",reference:nn,async:!1,expects:null,requirement:Y,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"MAC",n,e),n}}}function tn(t){return{kind:"validation",type:"mac48",reference:tn,async:!1,expects:null,requirement:Z,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"48-bit MAC",n,e),n}}}function sn(t){return{kind:"validation",type:"mac64",reference:sn,async:!1,expects:null,requirement:Q,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"64-bit MAC",n,e),n}}}function un(t){return{kind:"transformation",type:"map_items",reference:un,async:!1,operation:t,_run(n){return n.value=n.value.map(this.operation),n}}}function rn(t,n){return{kind:"validation",type:"max_bytes",reference:rn,async:!1,expects:`<=${t}`,requirement:t,message:n,_run(e,s){if(e.typed){let r=new TextEncoder().encode(e.value).length;r>this.requirement&&u(this,"bytes",e,s,{received:`${r}`})}return e}}}function In(t,n){return{kind:"validation",type:"max_length",reference:In,async:!1,expects:`<=${t}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value.length>this.requirement&&u(this,"length",e,s,{received:`${e.value.length}`}),e}}}function on(t,n){return{kind:"validation",type:"max_size",reference:on,async:!1,expects:`<=${t}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value.size>this.requirement&&u(this,"size",e,s,{received:`${e.value.size}`}),e}}}function an(t,n){return{kind:"validation",type:"max_value",reference:an,async:!1,expects:`<=${t instanceof Date?t.toJSON():f(t)}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value>this.requirement&&u(this,"value",e,s,{received:e.value instanceof Date?e.value.toJSON():f(e.value)}),e}}}function mn(t,n){return{kind:"validation",type:"mime_type",reference:mn,async:!1,expects:t.map(e=>`"${e}"`).join(" | ")||"never",requirement:t,message:n,_run(e,s){return e.typed&&!this.requirement.includes(e.value.type)&&u(this,"MIME type",e,s,{received:`"${e.value.type}"`}),e}}}function pn(t,n){return{kind:"validation",type:"min_bytes",reference:pn,async:!1,expects:`>=${t}`,requirement:t,message:n,_run(e,s){if(e.typed){let r=new TextEncoder().encode(e.value).length;r<this.requirement&&u(this,"bytes",e,s,{received:`${r}`})}return e}}}function cn(t,n){return{kind:"validation",type:"min_length",reference:cn,async:!1,expects:`>=${t}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value.length<this.requirement&&u(this,"length",e,s,{received:`${e.value.length}`}),e}}}function Tn(t,n){return{kind:"validation",type:"min_size",reference:Tn,async:!1,expects:`>=${t}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value.size<this.requirement&&u(this,"size",e,s,{received:`${e.value.size}`}),e}}}function fn(t,n){return{kind:"validation",type:"min_value",reference:fn,async:!1,expects:`>=${t instanceof Date?t.toJSON():f(t)}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value<this.requirement&&u(this,"value",e,s,{received:e.value instanceof Date?e.value.toJSON():f(e.value)}),e}}}function dn(t,n){return{kind:"validation",type:"multiple_of",reference:dn,async:!1,expects:`%${t}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value%this.requirement!==0&&u(this,"multiple",e,s),e}}}function yn(t){return{kind:"validation",type:"non_empty",reference:yn,async:!1,expects:"!0",message:t,_run(n,e){return n.typed&&n.value.length===0&&u(this,"length",n,e,{received:"0"}),n}}}function ln(t){return{kind:"transformation",type:"normalize",reference:ln,async:!1,form:t,_run(n){return n.value=n.value.normalize(this.form),n}}}function kn(t,n){return{kind:"validation",type:"not_bytes",reference:kn,async:!1,expects:`!${t}`,requirement:t,message:n,_run(e,s){if(e.typed){let r=new TextEncoder().encode(e.value).length;r===this.requirement&&u(this,"bytes",e,s,{received:`${r}`})}return e}}}function hn(t,n){return{kind:"validation",type:"not_length",reference:hn,async:!1,expects:`!${t}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value.length===this.requirement&&u(this,"length",e,s,{received:`${e.value.length}`}),e}}}function xn(t,n){return{kind:"validation",type:"not_size",reference:xn,async:!1,expects:`!${t}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value.size===this.requirement&&u(this,"size",e,s,{received:`${e.value.size}`}),e}}}function On(t,n){return{kind:"validation",type:"not_value",reference:On,async:!1,expects:t instanceof Date?`!${t.toJSON()}`:`!${f(t)}`,requirement:t,message:n,_run(e,s){return e.typed&&this.requirement<=e.value&&this.requirement>=e.value&&u(this,"value",e,s,{received:e.value instanceof Date?e.value.toJSON():f(e.value)}),e}}}function wn(t){return{kind:"validation",type:"octal",reference:wn,async:!1,expects:null,requirement:ee,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"octal",n,e),n}}}function E(t,n){if(t.issues)for(let e of n)for(let s of t.issues){let r=!1,o=Math.min(e.length,s.path?.length??0);for(let i=0;i<o;i++)if(e[i]!==s.path[i].key){r=!0;break}if(!r)return!1}return!0}function gn(t,n,e){return{kind:"validation",type:"partial_check",reference:gn,async:!1,expects:null,requirement:n,message:e,_run(s,r){return E(s,t)&&!this.requirement(s.value)&&u(this,"input",s,r),s}}}function Sn(t,n,e){return{kind:"validation",type:"partial_check",reference:Sn,async:!0,expects:null,requirement:n,message:e,async _run(s,r){return E(s,t)&&!await this.requirement(s.value)&&u(this,"input",s,r),s}}}function Bn(t){return{kind:"validation",type:"raw_check",reference:Bn,async:!1,expects:null,_run(n,e){return t({dataset:n,config:e,addIssue:s=>u(this,s?.label??"input",n,e,s)}),n}}}function An(t){return{kind:"validation",type:"raw_check",reference:An,async:!0,expects:null,async _run(n,e){return await t({dataset:n,config:e,addIssue:s=>u(this,s?.label??"input",n,e,s)}),n}}}function bn(t){return{kind:"transformation",type:"raw_transform",reference:bn,async:!1,_run(n,e){let s=t({dataset:n,config:e,addIssue:r=>u(this,r?.label??"input",n,e,r),NEVER:null});return n.issues?n.typed=!1:n.value=s,n}}}function En(t){return{kind:"transformation",type:"raw_transform",reference:En,async:!0,async _run(n,e){let s=await t({dataset:n,config:e,addIssue:r=>u(this,r?.label??"input",n,e,r),NEVER:null});return n.issues?n.typed=!1:n.value=s,n}}}function Mn(){return{kind:"transformation",type:"readonly",reference:Mn,async:!1,_run(t){return t}}}function Pn(t,n){return{kind:"transformation",type:"reduce_items",reference:Pn,async:!1,operation:t,initial:n,_run(e){return e.value=e.value.reduce(this.operation,this.initial),e}}}function jn(t,n){return{kind:"validation",type:"regex",reference:jn,async:!1,expects:`${t}`,requirement:t,message:n,_run(e,s){return e.typed&&!this.requirement.test(e.value)&&u(this,"format",e,s),e}}}function vn(t){return{kind:"validation",type:"safe_integer",reference:vn,async:!1,expects:null,requirement:Number.isSafeInteger,message:t,_run(n,e){return n.typed&&!this.requirement(n.value)&&u(this,"safe integer",n,e),n}}}function Rn(t,n){return{kind:"validation",type:"size",reference:Rn,async:!1,expects:`${t}`,requirement:t,message:n,_run(e,s){return e.typed&&e.value.size!==this.requirement&&u(this,"size",e,s,{received:`${e.value.size}`}),e}}}function _n(t,n){return{kind:"validation",type:"some_item",reference:_n,async:!1,expects:null,requirement:t,message:n,_run(e,s){return e.typed&&!e.value.some(this.requirement)&&u(this,"item",e,s),e}}}function qn(t){return{kind:"transformation",type:"sort_items",reference:qn,async:!1,operation:t,_run(n){return n.value=n.value.sort(this.operation),n}}}function Dn(t,n){return{kind:"validation",type:"starts_with",reference:Dn,async:!1,expects:`"${t}"`,requirement:t,message:n,_run(e,s){return e.typed&&!e.value.startsWith(this.requirement)&&u(this,"start",e,s,{received:`"${e.value.slice(0,this.requirement.length)}"`}),e}}}function Nn(){return{kind:"transformation",type:"to_lower_case",reference:Nn,async:!1,_run(t){return t.value=t.value.toLowerCase(),t}}}function Wn(t){return{kind:"transformation",type:"to_max_value",reference:Wn,async:!1,requirement:t,_run(n){return n.value=n.value>this.requirement?this.requirement:n.value,n}}}function Vn(t){return{kind:"transformation",type:"to_min_value",reference:Vn,async:!1,requirement:t,_run(n){return n.value=n.value<this.requirement?this.requirement:n.value,n}}}function Cn(){return{kind:"transformation",type:"to_upper_case",reference:Cn,async:!1,_run(t){return t.value=t.value.toUpperCase(),t}}}function Ln(t){return{kind:"transformation",type:"transform",reference:Ln,async:!1,operation:t,_run(n){return n.value=this.operation(n.value),n}}}function Kn(t){return{kind:"transformation",type:"transform",reference:Kn,async:!0,operation:t,async _run(n){return n.value=await this.operation(n.value),n}}}function $n(){return{kind:"transformation",type:"trim",reference:$n,async:!1,_run(t){return t.value=t.value.trim(),t}}}function zn(){return{kind:"transformation",type:"trim_end",reference:zn,async:!1,_run(t){return t.value=t.value.trimEnd(),t}}}function Fn(){return{kind:"transformation",type:"trim_start",reference:Fn,async:!1,_run(t){return t.value=t.value.trimStart(),t}}}function Un(t){return{kind:"validation",type:"ulid",reference:Un,async:!1,expects:null,requirement:ne,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"ULID",n,e),n}}}function Gn(t){return{kind:"validation",type:"url",reference:Gn,async:!1,expects:null,requirement(n){try{return new URL(n),!0}catch{return!1}},message:t,_run(n,e){return n.typed&&!this.requirement(n.value)&&u(this,"URL",n,e),n}}}function Xn(t){return{kind:"validation",type:"uuid",reference:Xn,async:!1,expects:null,requirement:te,message:t,_run(n,e){return n.typed&&!this.requirement.test(n.value)&&u(this,"UUID",n,e),n}}}function Hn(t,n){return{kind:"validation",type:"value",reference:Hn,async:!1,expects:t instanceof Date?t.toJSON():f(t),requirement:t,message:n,_run(e,s){return e.typed&&!(this.requirement<=e.value&&this.requirement>=e.value)&&u(this,"value",e,s,{received:e.value instanceof Date?e.value.toJSON():f(e.value)}),e}}}function UI(t,n){return{...t,_run(e,s){return t._run(e,{...s,...n})}}}function h(t,n,e){return typeof t.fallback=="function"?t.fallback(n,e):t.fallback}function JI(t,n){return{...t,fallback:n,_run(e,s){return t._run(e,s),e.issues?{typed:!0,value:h(this,e,s)}:e}}}function YI(t,n){return{...t,fallback:n,async:!0,async _run(e,s){return t._run(e,s),e.issues?{typed:!0,value:await h(this,e,s)}:e}}}function to(t){let n={};for(let e of t)if(e.path){let s=Ie(e);s?(n.nested||(n.nested={}),n.nested[s]?n.nested[s].push(e.message):n.nested[s]=[e.message]):n.other?n.other.push(e.message):n.other=[e.message]}else n.root?n.root.push(e.message):n.root=[e.message];return n}function uo(t,n){return{...t,_run(e,s){let r=e.issues&&[...e.issues];if(t._run(e,s),e.issues){for(let o of e.issues)if(!r?.includes(o)){let i=e.value;for(let a of n){let I=i[a],m={type:"unknown",origin:"value",input:i,key:a,value:I};if(o.path?o.path.push(m):o.path=[m],!I)break;i=I}}}return e}}}function Io(t,n){return{...t,async:!0,async _run(e,s){let r=e.issues&&[...e.issues];if(await t._run(e,s),e.issues){for(let o of e.issues)if(!r?.includes(o)){let i=e.value;for(let a of n){let I=i[a],m={type:"unknown",origin:"value",input:i,key:a,value:I};if(o.path?o.path.push(m):o.path=[m],!I)break;i=I}}}return e}}}function d(t,n,e){return typeof t.default=="function"?t.default(n,e):t.default}function oe(t){if("entries"in t){let n={};for(let e in t.entries)n[e]=oe(t.entries[e]);return n}return"items"in t?t.items.map(oe):d(t)}async function ie(t){return"entries"in t?Object.fromEntries(await Promise.all(Object.entries(t.entries).map(async([n,e])=>[n,await ie(e)]))):"items"in t?Promise.all(t.items.map(ie)):d(t)}function ae(t){if("entries"in t){let n={};for(let e in t.entries)n[e]=ae(t.entries[e]);return n}return"items"in t?t.items.map(ae):h(t)}async function me(t){return"entries"in t?Object.fromEntries(await Promise.all(Object.entries(t.entries).map(async([n,e])=>[n,await me(e)]))):"items"in t?Promise.all(t.items.map(me)):h(t)}function ko(t,n){return!t._run({typed:!1,value:n},{abortEarly:!0}).issues}function Jn(){return{kind:"schema",type:"any",reference:Jn,expects:"any",async:!1,_run(t){return t.typed=!0,t}}}function Zn(t,n){return{kind:"schema",type:"array",reference:Zn,expects:"Array",async:!1,item:t,message:n,_run(e,s){let r=e.value;if(Array.isArray(r)){e.typed=!0,e.value=[];for(let o=0;o<r.length;o++){let i=r[o],a=this.item._run({typed:!1,value:i},s);if(a.issues){let I={type:"array",origin:"value",input:r,key:o,value:i};for(let m of a.issues)m.path?m.path.unshift(I):m.path=[I],e.issues?.push(m);if(e.issues||(e.issues=a.issues),s.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.push(a.value)}}else u(this,"type",e,s);return e}}}function Qn(t,n){return{kind:"schema",type:"array",reference:Qn,expects:"Array",async:!0,item:t,message:n,async _run(e,s){let r=e.value;if(Array.isArray(r)){e.typed=!0,e.value=[];let o=await Promise.all(r.map(i=>this.item._run({typed:!1,value:i},s)));for(let i=0;i<o.length;i++){let a=o[i];if(a.issues){let I={type:"array",origin:"value",input:r,key:i,value:r[i]};for(let m of a.issues)m.path?m.path.unshift(I):m.path=[I],e.issues?.push(m);if(e.issues||(e.issues=a.issues),s.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.push(a.value)}}else u(this,"type",e,s);return e}}}function Yn(t){return{kind:"schema",type:"bigint",reference:Yn,expects:"bigint",async:!1,message:t,_run(n,e){return typeof n.value=="bigint"?n.typed=!0:u(this,"type",n,e),n}}}function et(t){return{kind:"schema",type:"blob",reference:et,expects:"Blob",async:!1,message:t,_run(n,e){return n.value instanceof Blob?n.typed=!0:u(this,"type",n,e),n}}}function nt(t){return{kind:"schema",type:"boolean",reference:nt,expects:"boolean",async:!1,message:t,_run(n,e){return typeof n.value=="boolean"?n.typed=!0:u(this,"type",n,e),n}}}function tt(t,n){return{kind:"schema",type:"custom",reference:tt,expects:"unknown",async:!1,check:t,message:n,_run(e,s){return this.check(e.value)?e.typed=!0:u(this,"type",e,s),e}}}function st(t,n){return{kind:"schema",type:"custom",reference:st,expects:"unknown",async:!0,check:t,message:n,async _run(e,s){return await this.check(e.value)?e.typed=!0:u(this,"type",e,s),e}}}function ut(t){return{kind:"schema",type:"date",reference:ut,expects:"Date",async:!1,message:t,_run(n,e){return n.value instanceof Date?isNaN(n.value)?u(this,"type",n,e,{received:'"Invalid Date"'}):n.typed=!0:u(this,"type",n,e),n}}}function rt(t,n){let e=Object.entries(t).filter(([s])=>isNaN(+s)).map(([,s])=>s);return{kind:"schema",type:"enum",reference:rt,expects:e.map(f).join(" | ")||"never",async:!1,enum:t,options:e,message:n,_run(s,r){return this.options.includes(s.value)?s.typed=!0:u(this,"type",s,r),s}}}function It(t){return{kind:"schema",type:"file",reference:It,expects:"File",async:!1,message:t,_run(n,e){return n.value instanceof File?n.typed=!0:u(this,"type",n,e),n}}}function ot(t){return{kind:"schema",type:"function",reference:ot,expects:"Function",async:!1,message:t,_run(n,e){return typeof n.value=="function"?n.typed=!0:u(this,"type",n,e),n}}}function it(t,n){return{kind:"schema",type:"instance",reference:it,expects:t.name,async:!1,class:t,message:n,_run(e,s){return e.value instanceof this.class?e.typed=!0:u(this,"type",e,s),e}}}function w(t,n){if(typeof t==typeof n){if(t===n||t instanceof Date&&n instanceof Date&&+t==+n)return{value:t};if(t&&n&&t.constructor===Object&&n.constructor===Object){for(let e in n)if(e in t){let s=w(t[e],n[e]);if(s.issue)return s;t[e]=s.value}else t[e]=n[e];return{value:t}}if(Array.isArray(t)&&Array.isArray(n)&&t.length===n.length){for(let e=0;e<t.length;e++){let s=w(t[e],n[e]);if(s.issue)return s;t[e]=s.value}return{value:t}}}return{issue:!0}}function at(t,n){return{kind:"schema",type:"intersect",reference:at,expects:[...new Set(t.map(e=>e.expects))].join(" & ")||"never",async:!1,options:t,message:n,_run(e,s){if(this.options.length){let r=e.value,o;e.typed=!0;for(let i of this.options){let a=i._run({typed:!1,value:r},s);if(a.issues&&(e.issues?e.issues.push(...a.issues):e.issues=a.issues,s.abortEarly)){e.typed=!1;break}a.typed||(e.typed=!1),e.typed&&(o?o.push(a.value):o=[a.value])}if(e.typed){e.value=o[0];for(let i=1;i<o.length;i++){let a=w(e.value,o[i]);if(a.issue){u(this,"type",e,s,{received:"unknown"});break}e.value=a.value}}}else u(this,"type",e,s);return e}}}function mt(t,n){return{kind:"schema",type:"intersect",reference:mt,expects:[...new Set(t.map(e=>e.expects))].join(" & ")||"never",async:!0,options:t,message:n,async _run(e,s){if(this.options.length){let r=e.value,o;e.typed=!0;let i=await Promise.all(this.options.map(a=>a._run({typed:!1,value:r},s)));for(let a of i){if(a.issues&&(e.issues?e.issues.push(...a.issues):e.issues=a.issues,s.abortEarly)){e.typed=!1;break}a.typed||(e.typed=!1),e.typed&&(o?o.push(a.value):o=[a.value])}if(e.typed){e.value=o[0];for(let a=1;a<o.length;a++){let I=w(e.value,o[a]);if(I.issue){u(this,"type",e,s,{received:"unknown"});break}e.value=I.value}}}else u(this,"type",e,s);return e}}}function pt(t){return{kind:"schema",type:"lazy",reference:pt,expects:"unknown",async:!1,getter:t,_run(n,e){return this.getter(n.value)._run(n,e)}}}function ct(t){return{kind:"schema",type:"lazy",reference:ct,expects:"unknown",async:!0,getter:t,async _run(n,e){return(await this.getter(n.value))._run(n,e)}}}function Tt(t,n){return{kind:"schema",type:"literal",reference:Tt,expects:f(t),async:!1,literal:t,message:n,_run(e,s){return e.value===this.literal?e.typed=!0:u(this,"type",e,s),e}}}function ft(t,n){return{kind:"schema",type:"loose_object",reference:ft,expects:"Object",async:!1,entries:t,message:n,_run(e,s){let r=e.value;if(r&&typeof r=="object"){e.typed=!0,e.value={};for(let o in this.entries){let i=r[o],a=this.entries[o]._run({typed:!1,value:i},s);if(a.issues){let I={type:"object",origin:"value",input:r,key:o,value:i};for(let m of a.issues)m.path?m.path.unshift(I):m.path=[I],e.issues?.push(m);if(e.issues||(e.issues=a.issues),s.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),(a.value!==void 0||o in r)&&(e.value[o]=a.value)}if(!e.issues||!s.abortEarly)for(let o in r)y(r,o)&&!(o in this.entries)&&(e.value[o]=r[o])}else u(this,"type",e,s);return e}}}function dt(t,n){return{kind:"schema",type:"loose_object",reference:dt,expects:"Object",async:!0,entries:t,message:n,async _run(e,s){let r=e.value;if(r&&typeof r=="object"){e.typed=!0,e.value={};let o=await Promise.all(Object.entries(this.entries).map(async([i,a])=>{let I=r[i];return[i,I,await a._run({typed:!1,value:I},s)]}));for(let[i,a,I]of o){if(I.issues){let m={type:"object",origin:"value",input:r,key:i,value:a};for(let p of I.issues)p.path?p.path.unshift(m):p.path=[m],e.issues?.push(p);if(e.issues||(e.issues=I.issues),s.abortEarly){e.typed=!1;break}}I.typed||(e.typed=!1),(I.value!==void 0||i in r)&&(e.value[i]=I.value)}if(!e.issues||!s.abortEarly)for(let i in r)y(r,i)&&!(i in this.entries)&&(e.value[i]=r[i])}else u(this,"type",e,s);return e}}}function yt(t,n){return{kind:"schema",type:"loose_tuple",reference:yt,expects:"Array",async:!1,items:t,message:n,_run(e,s){let r=e.value;if(Array.isArray(r)){e.typed=!0,e.value=[];for(let o=0;o<this.items.length;o++){let i=r[o],a=this.items[o]._run({typed:!1,value:i},s);if(a.issues){let I={type:"array",origin:"value",input:r,key:o,value:i};for(let m of a.issues)m.path?m.path.unshift(I):m.path=[I],e.issues?.push(m);if(e.issues||(e.issues=a.issues),s.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.push(a.value)}if(!e.issues||!s.abortEarly)for(let o=this.items.length;o<r.length;o++)e.value.push(r[o])}else u(this,"type",e,s);return e}}}function lt(t,n){return{kind:"schema",type:"loose_tuple",reference:lt,expects:"Array",async:!0,items:t,message:n,async _run(e,s){let r=e.value;if(Array.isArray(r)){e.typed=!0,e.value=[];let o=await Promise.all(this.items.map(async(i,a)=>{let I=r[a];return[a,I,await i._run({typed:!1,value:I},s)]}));for(let[i,a,I]of o){if(I.issues){let m={type:"array",origin:"value",input:r,key:i,value:a};for(let p of I.issues)p.path?p.path.unshift(m):p.path=[m],e.issues?.push(p);if(e.issues||(e.issues=I.issues),s.abortEarly){e.typed=!1;break}}I.typed||(e.typed=!1),e.value.push(I.value)}if(!e.issues||!s.abortEarly)for(let i=this.items.length;i<r.length;i++)e.value.push(r[i])}else u(this,"type",e,s);return e}}}function kt(t,n,e){return{kind:"schema",type:"map",reference:kt,expects:"Map",async:!1,key:t,value:n,message:e,_run(s,r){let o=s.value;if(o instanceof Map){s.typed=!0,s.value=new Map;for(let[i,a]of o){let I=this.key._run({typed:!1,value:i},r);if(I.issues){let p={type:"map",origin:"key",input:o,key:i,value:a};for(let c of I.issues)c.path?c.path.unshift(p):c.path=[p],s.issues?.push(c);if(s.issues||(s.issues=I.issues),r.abortEarly){s.typed=!1;break}}let m=this.value._run({typed:!1,value:a},r);if(m.issues){let p={type:"map",origin:"value",input:o,key:i,value:a};for(let c of m.issues)c.path?c.path.unshift(p):c.path=[p],s.issues?.push(c);if(s.issues||(s.issues=m.issues),r.abortEarly){s.typed=!1;break}}(!I.typed||!m.typed)&&(s.typed=!1),s.value.set(I.value,m.value)}}else u(this,"type",s,r);return s}}}function ht(t,n,e){return{kind:"schema",type:"map",reference:ht,expects:"Map",async:!0,key:t,value:n,message:e,async _run(s,r){let o=s.value;if(o instanceof Map){s.typed=!0,s.value=new Map;let i=await Promise.all([...o].map(([a,I])=>Promise.all([a,I,this.key._run({typed:!1,value:a},r),this.value._run({typed:!1,value:I},r)])));for(let[a,I,m,p]of i){if(m.issues){let c={type:"map",origin:"key",input:o,key:a,value:I};for(let T of m.issues)T.path?T.path.unshift(c):T.path=[c],s.issues?.push(T);if(s.issues||(s.issues=m.issues),r.abortEarly){s.typed=!1;break}}if(p.issues){let c={type:"map",origin:"value",input:o,key:a,value:I};for(let T of p.issues)T.path?T.path.unshift(c):T.path=[c],s.issues?.push(T);if(s.issues||(s.issues=p.issues),r.abortEarly){s.typed=!1;break}}(!m.typed||!p.typed)&&(s.typed=!1),s.value.set(m.value,p.value)}}else u(this,"type",s,r);return s}}}function xt(t){return{kind:"schema",type:"nan",reference:xt,expects:"NaN",async:!1,message:t,_run(n,e){return Number.isNaN(n.value)?n.typed=!0:u(this,"type",n,e),n}}}function Ot(t){return{kind:"schema",type:"never",reference:Ot,expects:"never",async:!1,message:t,_run(n,e){return u(this,"type",n,e),n}}}function wt(t,n){return{kind:"schema",type:"non_nullable",reference:wt,expects:"!null",async:!1,wrapped:t,message:n,_run(e,s){return e.value===null?(u(this,"type",e,s),e):this.wrapped._run(e,s)}}}function gt(t,n){return{kind:"schema",type:"non_nullable",reference:gt,expects:"!null",async:!0,wrapped:t,message:n,async _run(e,s){return e.value===null?(u(this,"type",e,s),e):this.wrapped._run(e,s)}}}function St(t,n){return{kind:"schema",type:"non_nullish",reference:St,expects:"!null & !undefined",async:!1,wrapped:t,message:n,_run(e,s){return e.value===null||e.value===void 0?(u(this,"type",e,s),e):this.wrapped._run(e,s)}}}function Bt(t,n){return{kind:"schema",type:"non_nullish",reference:Bt,expects:"!null & !undefined",async:!0,wrapped:t,message:n,async _run(e,s){return e.value===null||e.value===void 0?(u(this,"type",e,s),e):this.wrapped._run(e,s)}}}function M(t,n){return{kind:"schema",type:"non_optional",reference:M,expects:"!undefined",async:!1,wrapped:t,message:n,_run(e,s){return e.value===void 0?(u(this,"type",e,s),e):this.wrapped._run(e,s)}}}function P(t,n){return{kind:"schema",type:"non_optional",reference:P,expects:"!undefined",async:!0,wrapped:t,message:n,async _run(e,s){return e.value===void 0?(u(this,"type",e,s),e):this.wrapped._run(e,s)}}}function At(t){return{kind:"schema",type:"null",reference:At,expects:"null",async:!1,message:t,_run(n,e){return n.value===null?n.typed=!0:u(this,"type",n,e),n}}}function bt(t,...n){let e={kind:"schema",type:"nullable",reference:bt,expects:`${t.expects} | null`,async:!1,wrapped:t,_run(s,r){return s.value===null&&("default"in this&&(s.value=d(this,s,r)),s.value===null)?(s.typed=!0,s):this.wrapped._run(s,r)}};return 0 in n&&(e.default=n[0]),e}function Et(t,...n){let e={kind:"schema",type:"nullable",reference:Et,expects:`${t.expects} | null`,async:!0,wrapped:t,async _run(s,r){return s.value===null&&("default"in this&&(s.value=await d(this,s,r)),s.value===null)?(s.typed=!0,s):this.wrapped._run(s,r)}};return 0 in n&&(e.default=n[0]),e}function Mt(t,...n){let e={kind:"schema",type:"nullish",reference:Mt,expects:`${t.expects} | null | undefined`,async:!1,wrapped:t,_run(s,r){return(s.value===null||s.value===void 0)&&("default"in this&&(s.value=d(this,s,r)),s.value===null||s.value===void 0)?(s.typed=!0,s):this.wrapped._run(s,r)}};return 0 in n&&(e.default=n[0]),e}function Pt(t,...n){let e={kind:"schema",type:"nullish",reference:Pt,expects:`${t.expects} | null | undefined`,async:!0,wrapped:t,async _run(s,r){return(s.value===null||s.value===void 0)&&("default"in this&&(s.value=await d(this,s,r)),s.value===null||s.value===void 0)?(s.typed=!0,s):this.wrapped._run(s,r)}};return 0 in n&&(e.default=n[0]),e}function jt(t){return{kind:"schema",type:"number",reference:jt,expects:"number",async:!1,message:t,_run(n,e){return typeof n.value=="number"&&!isNaN(n.value)?n.typed=!0:u(this,"type",n,e),n}}}function vt(t,n){return{kind:"schema",type:"object",reference:vt,expects:"Object",async:!1,entries:t,message:n,_run(e,s){let r=e.value;if(r&&typeof r=="object"){e.typed=!0,e.value={};for(let o in this.entries){let i=r[o],a=this.entries[o]._run({typed:!1,value:i},s);if(a.issues){let I={type:"object",origin:"value",input:r,key:o,value:i};for(let m of a.issues)m.path?m.path.unshift(I):m.path=[I],e.issues?.push(m);if(e.issues||(e.issues=a.issues),s.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),(a.value!==void 0||o in r)&&(e.value[o]=a.value)}}else u(this,"type",e,s);return e}}}function Rt(t,n){return{kind:"schema",type:"object",reference:Rt,expects:"Object",async:!0,entries:t,message:n,async _run(e,s){let r=e.value;if(r&&typeof r=="object"){e.typed=!0,e.value={};let o=await Promise.all(Object.entries(this.entries).map(async([i,a])=>{let I=r[i];return[i,I,await a._run({typed:!1,value:I},s)]}));for(let[i,a,I]of o){if(I.issues){let m={type:"object",origin:"value",input:r,key:i,value:a};for(let p of I.issues)p.path?p.path.unshift(m):p.path=[m],e.issues?.push(p);if(e.issues||(e.issues=I.issues),s.abortEarly){e.typed=!1;break}}I.typed||(e.typed=!1),(I.value!==void 0||i in r)&&(e.value[i]=I.value)}}else u(this,"type",e,s);return e}}}function _t(t,n,e){return{kind:"schema",type:"object_with_rest",reference:_t,expects:"Object",async:!1,entries:t,rest:n,message:e,_run(s,r){let o=s.value;if(o&&typeof o=="object"){s.typed=!0,s.value={};for(let i in this.entries){let a=o[i],I=this.entries[i]._run({typed:!1,value:a},r);if(I.issues){let m={type:"object",origin:"value",input:o,key:i,value:a};for(let p of I.issues)p.path?p.path.unshift(m):p.path=[m],s.issues?.push(p);if(s.issues||(s.issues=I.issues),r.abortEarly){s.typed=!1;break}}I.typed||(s.typed=!1),(I.value!==void 0||i in o)&&(s.value[i]=I.value)}if(!s.issues||!r.abortEarly){for(let i in o)if(y(o,i)&&!(i in this.entries)){let a=o[i],I=this.rest._run({typed:!1,value:a},r);if(I.issues){let m={type:"object",origin:"value",input:o,key:i,value:a};for(let p of I.issues)p.path?p.path.unshift(m):p.path=[m],s.issues?.push(p);if(s.issues||(s.issues=I.issues),r.abortEarly){s.typed=!1;break}}I.typed||(s.typed=!1),s.value[i]=I.value}}}else u(this,"type",s,r);return s}}}function qt(t,n,e){return{kind:"schema",type:"object_with_rest",reference:qt,expects:"Object",async:!0,entries:t,rest:n,message:e,async _run(s,r){let o=s.value;if(o&&typeof o=="object"){s.typed=!0,s.value={};let[i,a]=await Promise.all([Promise.all(Object.entries(this.entries).map(async([I,m])=>{let p=o[I];return[I,p,await m._run({typed:!1,value:p},r)]})),Promise.all(Object.entries(o).filter(([I])=>y(o,I)&&!(I in this.entries)).map(async([I,m])=>[I,m,await this.rest._run({typed:!1,value:m},r)]))]);for(let[I,m,p]of i){if(p.issues){let c={type:"object",origin:"value",input:o,key:I,value:m};for(let T of p.issues)T.path?T.path.unshift(c):T.path=[c],s.issues?.push(T);if(s.issues||(s.issues=p.issues),r.abortEarly){s.typed=!1;break}}p.typed||(s.typed=!1),(p.value!==void 0||I in o)&&(s.value[I]=p.value)}if(!s.issues||!r.abortEarly)for(let[I,m,p]of a){if(p.issues){let c={type:"object",origin:"value",input:o,key:I,value:m};for(let T of p.issues)T.path?T.path.unshift(c):T.path=[c],s.issues?.push(T);if(s.issues||(s.issues=p.issues),r.abortEarly){s.typed=!1;break}}p.typed||(s.typed=!1),s.value[I]=p.value}}else u(this,"type",s,r);return s}}}function j(t,...n){let e={kind:"schema",type:"optional",reference:j,expects:`${t.expects} | undefined`,async:!1,wrapped:t,_run(s,r){return s.value===void 0&&("default"in this&&(s.value=d(this,s,r)),s.value===void 0)?(s.typed=!0,s):this.wrapped._run(s,r)}};return 0 in n&&(e.default=n[0]),e}function v(t,...n){let e={kind:"schema",type:"optional",reference:v,expects:`${t.expects} | undefined`,async:!0,wrapped:t,async _run(s,r){return s.value===void 0&&("default"in this&&(s.value=await d(this,s,r)),s.value===void 0)?(s.typed=!0,s):this.wrapped._run(s,r)}};return 0 in n&&(e.default=n[0]),e}function R(t,n){return{kind:"schema",type:"picklist",reference:R,expects:t.map(f).join(" | ")||"never",async:!1,options:t,message:n,_run(e,s){return this.options.includes(e.value)?e.typed=!0:u(this,"type",e,s),e}}}function Dt(t){return{kind:"schema",type:"promise",reference:Dt,expects:"Promise",async:!1,message:t,_run(n,e){return n.value instanceof Promise?n.typed=!0:u(this,"type",n,e),n}}}function Nt(t,n,e){return{kind:"schema",type:"record",reference:Nt,expects:"Object",async:!1,key:t,value:n,message:e,_run(s,r){let o=s.value;if(o&&typeof o=="object"){s.typed=!0,s.value={};for(let i in o)if(y(o,i)){let a=o[i],I=this.key._run({typed:!1,value:i},r);if(I.issues){let p={type:"object",origin:"key",input:o,key:i,value:a};for(let c of I.issues)c.path=[p],s.issues?.push(c);if(s.issues||(s.issues=I.issues),r.abortEarly){s.typed=!1;break}}let m=this.value._run({typed:!1,value:a},r);if(m.issues){let p={type:"object",origin:"value",input:o,key:i,value:a};for(let c of m.issues)c.path?c.path.unshift(p):c.path=[p],s.issues?.push(c);if(s.issues||(s.issues=m.issues),r.abortEarly){s.typed=!1;break}}(!I.typed||!m.typed)&&(s.typed=!1),I.typed&&(s.value[I.value]=m.value)}}else u(this,"type",s,r);return s}}}function Wt(t,n,e){return{kind:"schema",type:"record",reference:Wt,expects:"Object",async:!0,key:t,value:n,message:e,async _run(s,r){let o=s.value;if(o&&typeof o=="object"){s.typed=!0,s.value={};let i=await Promise.all(Object.entries(o).filter(([a])=>y(o,a)).map(([a,I])=>Promise.all([a,I,this.key._run({typed:!1,value:a},r),this.value._run({typed:!1,value:I},r)])));for(let[a,I,m,p]of i){if(m.issues){let c={type:"object",origin:"key",input:o,key:a,value:I};for(let T of m.issues)T.path=[c],s.issues?.push(T);if(s.issues||(s.issues=m.issues),r.abortEarly){s.typed=!1;break}}if(p.issues){let c={type:"object",origin:"value",input:o,key:a,value:I};for(let T of p.issues)T.path?T.path.unshift(c):T.path=[c],s.issues?.push(T);if(s.issues||(s.issues=p.issues),r.abortEarly){s.typed=!1;break}}(!m.typed||!p.typed)&&(s.typed=!1),m.typed&&(s.value[m.value]=p.value)}}else u(this,"type",s,r);return s}}}function Vt(t,n){return{kind:"schema",type:"set",reference:Vt,expects:"Set",async:!1,value:t,message:n,_run(e,s){let r=e.value;if(r instanceof Set){e.typed=!0,e.value=new Set;for(let o of r){let i=this.value._run({typed:!1,value:o},s);if(i.issues){let a={type:"set",origin:"value",input:r,key:null,value:o};for(let I of i.issues)I.path?I.path.unshift(a):I.path=[a],e.issues?.push(I);if(e.issues||(e.issues=i.issues),s.abortEarly){e.typed=!1;break}}i.typed||(e.typed=!1),e.value.add(i.value)}}else u(this,"type",e,s);return e}}}function Ct(t,n){return{kind:"schema",type:"set",reference:Ct,expects:"Set",async:!0,value:t,message:n,async _run(e,s){let r=e.value;if(r instanceof Set){e.typed=!0,e.value=new Set;let o=await Promise.all([...r].map(async i=>[i,await this.value._run({typed:!1,value:i},s)]));for(let[i,a]of o){if(a.issues){let I={type:"set",origin:"value",input:r,key:null,value:i};for(let m of a.issues)m.path?m.path.unshift(I):m.path=[I],e.issues?.push(m);if(e.issues||(e.issues=a.issues),s.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.add(a.value)}}else u(this,"type",e,s);return e}}}function Lt(t,n){return{kind:"schema",type:"strict_object",reference:Lt,expects:"Object",async:!1,entries:t,message:n,_run(e,s){let r=e.value;if(r&&typeof r=="object"){e.typed=!0,e.value={};for(let o in this.entries){let i=r[o],a=this.entries[o]._run({typed:!1,value:i},s);if(a.issues){let I={type:"object",origin:"value",input:r,key:o,value:i};for(let m of a.issues)m.path?m.path.unshift(I):m.path=[I],e.issues?.push(m);if(e.issues||(e.issues=a.issues),s.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),(a.value!==void 0||o in r)&&(e.value[o]=a.value)}if(!e.issues||!s.abortEarly){for(let o in r)if(!(o in this.entries)){let i=r[o];u(this,"type",e,s,{input:i,expected:"never",path:[{type:"object",origin:"value",input:r,key:o,value:i}]});break}}}else u(this,"type",e,s);return e}}}function Kt(t,n){return{kind:"schema",type:"strict_object",reference:Kt,expects:"Object",async:!0,entries:t,message:n,async _run(e,s){let r=e.value;if(r&&typeof r=="object"){e.typed=!0,e.value={};let o=await Promise.all(Object.entries(this.entries).map(async([i,a])=>{let I=r[i];return[i,I,await a._run({typed:!1,value:I},s)]}));for(let[i,a,I]of o){if(I.issues){let m={type:"object",origin:"value",input:r,key:i,value:a};for(let p of I.issues)p.path?p.path.unshift(m):p.path=[m],e.issues?.push(p);if(e.issues||(e.issues=I.issues),s.abortEarly){e.typed=!1;break}}I.typed||(e.typed=!1),(I.value!==void 0||i in r)&&(e.value[i]=I.value)}if(!e.issues||!s.abortEarly){for(let i in r)if(!(i in this.entries)){let a=r[i];u(this,"type",e,s,{input:a,expected:"never",path:[{type:"object",origin:"value",input:r,key:i,value:a}]});break}}}else u(this,"type",e,s);return e}}}function $t(t,n){return{kind:"schema",type:"strict_tuple",reference:$t,expects:"Array",async:!1,items:t,message:n,_run(e,s){let r=e.value;if(Array.isArray(r)){e.typed=!0,e.value=[];for(let o=0;o<this.items.length;o++){let i=r[o],a=this.items[o]._run({typed:!1,value:i},s);if(a.issues){let I={type:"array",origin:"value",input:r,key:o,value:i};for(let m of a.issues)m.path?m.path.unshift(I):m.path=[I],e.issues?.push(m);if(e.issues||(e.issues=a.issues),s.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.push(a.value)}if(!(e.issues&&s.abortEarly)&&this.items.length<r.length){let o=r[t.length];u(this,"type",e,s,{input:o,expected:"never",path:[{type:"array",origin:"value",input:r,key:this.items.length,value:o}]})}}else u(this,"type",e,s);return e}}}function zt(t,n){return{kind:"schema",type:"strict_tuple",reference:zt,expects:"Array",async:!0,items:t,message:n,async _run(e,s){let r=e.value;if(Array.isArray(r)){e.typed=!0,e.value=[];let o=await Promise.all(this.items.map(async(i,a)=>{let I=r[a];return[a,I,await i._run({typed:!1,value:I},s)]}));for(let[i,a,I]of o){if(I.issues){let m={type:"array",origin:"value",input:r,key:i,value:a};for(let p of I.issues)p.path?p.path.unshift(m):p.path=[m],e.issues?.push(p);if(e.issues||(e.issues=I.issues),s.abortEarly){e.typed=!1;break}}I.typed||(e.typed=!1),e.value.push(I.value)}if(!(e.issues&&s.abortEarly)&&this.items.length<r.length){let i=r[t.length];u(this,"type",e,s,{input:i,expected:"never",path:[{type:"array",origin:"value",input:r,key:this.items.length,value:i}]})}}else u(this,"type",e,s);return e}}}function Ft(t){return{kind:"schema",type:"string",reference:Ft,expects:"string",async:!1,message:t,_run(n,e){return typeof n.value=="string"?n.typed=!0:u(this,"type",n,e),n}}}function Ut(t){return{kind:"schema",type:"symbol",reference:Ut,expects:"symbol",async:!1,message:t,_run(n,e){return typeof n.value=="symbol"?n.typed=!0:u(this,"type",n,e),n}}}function Gt(t,n){return{kind:"schema",type:"tuple",reference:Gt,expects:"Array",async:!1,items:t,message:n,_run(e,s){let r=e.value;if(Array.isArray(r)){e.typed=!0,e.value=[];for(let o=0;o<this.items.length;o++){let i=r[o],a=this.items[o]._run({typed:!1,value:i},s);if(a.issues){let I={type:"array",origin:"value",input:r,key:o,value:i};for(let m of a.issues)m.path?m.path.unshift(I):m.path=[I],e.issues?.push(m);if(e.issues||(e.issues=a.issues),s.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.push(a.value)}}else u(this,"type",e,s);return e}}}function Xt(t,n){return{kind:"schema",type:"tuple",reference:Xt,expects:"Array",async:!0,items:t,message:n,async _run(e,s){let r=e.value;if(Array.isArray(r)){e.typed=!0,e.value=[];let o=await Promise.all(this.items.map(async(i,a)=>{let I=r[a];return[a,I,await i._run({typed:!1,value:I},s)]}));for(let[i,a,I]of o){if(I.issues){let m={type:"array",origin:"value",input:r,key:i,value:a};for(let p of I.issues)p.path?p.path.unshift(m):p.path=[m],e.issues?.push(p);if(e.issues||(e.issues=I.issues),s.abortEarly){e.typed=!1;break}}I.typed||(e.typed=!1),e.value.push(I.value)}}else u(this,"type",e,s);return e}}}function Ht(t,n,e){return{kind:"schema",type:"tuple_with_rest",reference:Ht,expects:"Array",async:!1,items:t,rest:n,message:e,_run(s,r){let o=s.value;if(Array.isArray(o)){s.typed=!0,s.value=[];for(let i=0;i<this.items.length;i++){let a=o[i],I=this.items[i]._run({typed:!1,value:a},r);if(I.issues){let m={type:"array",origin:"value",input:o,key:i,value:a};for(let p of I.issues)p.path?p.path.unshift(m):p.path=[m],s.issues?.push(p);if(s.issues||(s.issues=I.issues),r.abortEarly){s.typed=!1;break}}I.typed||(s.typed=!1),s.value.push(I.value)}if(!s.issues||!r.abortEarly)for(let i=this.items.length;i<o.length;i++){let a=o[i],I=this.rest._run({typed:!1,value:a},r);if(I.issues){let m={type:"array",origin:"value",input:o,key:i,value:a};for(let p of I.issues)p.path?p.path.unshift(m):p.path=[m],s.issues?.push(p);if(s.issues||(s.issues=I.issues),r.abortEarly){s.typed=!1;break}}I.typed||(s.typed=!1),s.value.push(I.value)}}else u(this,"type",s,r);return s}}}function Jt(t,n,e){return{kind:"schema",type:"tuple_with_rest",reference:Jt,expects:"Array",async:!0,items:t,rest:n,message:e,async _run(s,r){let o=s.value;if(Array.isArray(o)){s.typed=!0,s.value=[];let[i,a]=await Promise.all([Promise.all(this.items.map(async(I,m)=>{let p=o[m];return[m,p,await I._run({typed:!1,value:p},r)]})),Promise.all(o.slice(this.items.length).map(async(I,m)=>[m+this.items.length,I,await this.rest._run({typed:!1,value:I},r)]))]);for(let[I,m,p]of i){if(p.issues){let c={type:"array",origin:"value",input:o,key:I,value:m};for(let T of p.issues)T.path?T.path.unshift(c):T.path=[c],s.issues?.push(T);if(s.issues||(s.issues=p.issues),r.abortEarly){s.typed=!1;break}}p.typed||(s.typed=!1),s.value.push(p.value)}if(!s.issues||!r.abortEarly)for(let[I,m,p]of a){if(p.issues){let c={type:"array",origin:"value",input:o,key:I,value:m};for(let T of p.issues)T.path?T.path.unshift(c):T.path=[c],s.issues?.push(T);if(s.issues||(s.issues=p.issues),r.abortEarly){s.typed=!1;break}}p.typed||(s.typed=!1),s.value.push(p.value)}}else u(this,"type",s,r);return s}}}function Zt(t){return{kind:"schema",type:"undefined",reference:Zt,expects:"undefined",async:!1,message:t,_run(n,e){return n.value===void 0?n.typed=!0:u(this,"type",n,e),n}}}function g(t){let n;if(t)for(let e of t)n?n.push(...e.issues):n=e.issues;return n}function Qt(t,n){return{kind:"schema",type:"union",reference:Qt,expects:[...new Set(t.map(e=>e.expects))].join(" | ")||"never",async:!1,options:t,message:n,_run(e,s){let r,o,i;for(let a of this.options){let I=a._run({typed:!1,value:e.value},s);if(I.typed)if(I.issues)o?o.push(I):o=[I];else{r=I;break}else i?i.push(I):i=[I]}if(r)return r;if(o){if(o.length===1)return o[0];u(this,"type",e,s,{issues:g(o)}),e.typed=!0}else{if(i?.length===1)return i[0];u(this,"type",e,s,{issues:g(i)})}return e}}}function Yt(t,n){return{kind:"schema",type:"union",reference:Yt,expects:[...new Set(t.map(e=>e.expects))].join(" | ")||"never",async:!0,options:t,message:n,async _run(e,s){let r,o,i;for(let a of this.options){let I=await a._run({typed:!1,value:e.value},s);if(I.typed)if(I.issues)o?o.push(I):o=[I];else{r=I;break}else i?i.push(I):i=[I]}if(r)return r;if(o){if(o.length===1)return o[0];u(this,"type",e,s,{issues:g(o)}),e.typed=!0}else{if(i?.length===1)return i[0];u(this,"type",e,s,{issues:g(i)})}return e}}}function es(){return{kind:"schema",type:"unknown",reference:es,expects:"unknown",async:!1,_run(t){return t.typed=!0,t}}}function A(t,n,e=new Set){for(let s of n)s.type==="variant"?A(t,s.options,e):e.add(s.entries[t].expects);return e}function ns(t,n,e){let s;return{kind:"schema",type:"variant",reference:ns,expects:"Object",async:!1,key:t,options:n,message:e,_run(r,o){let i=r.value;if(i&&typeof i=="object"){let a=i[this.key];if(this.key in i){let I;for(let m of this.options)if(m.type==="variant"||!m.entries[this.key]._run({typed:!1,value:a},o).issues){let p=m._run({typed:!1,value:i},o);if(!p.issues)return p;(!I||!I.typed&&p.typed)&&(I=p)}if(I)return I}s||(s=[...A(this.key,this.options)].join(" | ")||"never"),u(this,"type",r,o,{input:a,expected:s,path:[{type:"object",origin:"value",input:i,key:this.key,value:a}]})}else u(this,"type",r,o);return r}}}function ts(t,n,e){let s;return{kind:"schema",type:"variant",reference:ts,expects:"Object",async:!0,key:t,options:n,message:e,async _run(r,o){let i=r.value;if(i&&typeof i=="object"){let a=i[this.key];if(this.key in i){let I;for(let m of this.options)if(m.type==="variant"||!(await m.entries[this.key]._run({typed:!1,value:a},o)).issues){let p=await m._run({typed:!1,value:i},o);if(!p.issues)return p;(!I||!I.typed&&p.typed)&&(I=p)}if(I)return I}s||(s=[...A(this.key,this.options)].join(" | ")||"never"),u(this,"type",r,o,{input:a,expected:s,path:[{type:"object",origin:"value",input:i,key:this.key,value:a}]})}else u(this,"type",r,o);return r}}}function ss(t){return{kind:"schema",type:"void",reference:ss,expects:"void",async:!1,message:t,_run(n,e){return n.value===void 0?n.typed=!0:u(this,"type",n,e),n}}}function Qa(t,n){return R(Object.keys(t.entries),n)}function em(t,n){let e={...t.entries};for(let s of n)delete e[s];return{...t,entries:e}}function pe(t,n,e){let s=t._run({typed:!1,value:n},l(e));if(s.issues)throw new k(s.issues);return s.value}async function ce(t,n,e){let s=await t._run({typed:!1,value:n},l(e));if(s.issues)throw new k(s.issues);return s.value}function am(t,n){let e=s=>pe(t,s,n);return e.schema=t,e.config=n,e}function cm(t,n){let e=s=>ce(t,s,n);return e.schema=t,e.config=n,e}function dm(t,n){let e={};for(let s in t.entries)e[s]=!n||n.includes(s)?j(t.entries[s]):t.entries[s];return{...t,entries:e}}function km(t,n){let e={};for(let s in t.entries)e[s]=!n||n.includes(s)?v(t.entries[s]):t.entries[s];return{...t,entries:e}}function xm(t,n){let e={};for(let s of n)e[s]=t.entries[s];return{...t,entries:e}}function wm(...t){return{...t[0],pipe:t,_run(n,e){for(let s=0;s<t.length;s++){if(n.issues&&(t[s].kind==="schema"||t[s].kind==="transformation")){n.typed=!1;break}(!n.issues||!e.abortEarly&&!e.abortPipeEarly)&&(n=t[s]._run(n,e))}return n}}}function Sm(...t){return{...t[0],pipe:t,async:!0,async _run(n,e){for(let s=0;s<t.length;s++){if(n.issues&&(t[s].kind==="schema"||t[s].kind==="transformation")){n.typed=!1;break}(!n.issues||!e.abortEarly&&!e.abortPipeEarly)&&(n=await t[s]._run(n,e))}return n}}}function bm(t,n,e){let s=Array.isArray(n)?n:void 0,r=Array.isArray(n)?e:n,o={};for(let i in t.entries)o[i]=!s||s.includes(i)?M(t.entries[i],r):t.entries[i];return{...t,entries:o}}function Pm(t,n,e){let s=Array.isArray(n)?n:void 0,r=Array.isArray(n)?e:n,o={};for(let i in t.entries)o[i]=!s||s.includes(i)?P(t.entries[i],r):t.entries[i];return{...t,entries:o}}function Te(t,n,e){let s=t._run({typed:!1,value:n},l(e));return{typed:s.typed,success:!s.issues,output:s.value,issues:s.issues}}async function fe(t,n,e){let s=await t._run({typed:!1,value:n},l(e));return{typed:s.typed,success:!s.issues,output:s.value,issues:s.issues}}function Nm(t,n){let e=s=>Te(t,s,n);return e.schema=t,e.config=n,e}function Cm(t,n){let e=s=>fe(t,s,n);return e.schema=t,e.config=n,e}function Km(t){return t.wrapped}export{_ as BIC_REGEX,q as CUID2_REGEX,D as DECIMAL_REGEX,N as EMAIL_REGEX,W as EMOJI_REGEX,V as HEXADECIMAL_REGEX,C as HEX_COLOR_REGEX,L as IMEI_REGEX,K as IPV4_REGEX,$ as IPV6_REGEX,z as IP_REGEX,F as ISO_DATE_REGEX,U as ISO_DATE_TIME_REGEX,H as ISO_TIMESTAMP_REGEX,G as ISO_TIME_REGEX,X as ISO_TIME_SECOND_REGEX,J as ISO_WEEK_REGEX,Z as MAC48_REGEX,Q as MAC64_REGEX,Y as MAC_REGEX,ee as OCTAL_REGEX,ne as ULID_REGEX,te as UUID_REGEX,k as ValiError,u as _addIssue,b as _isLuhnAlgo,y as _isValidObjectKey,f as _stringify,Jn as any,Zn as array,Qn as arrayAsync,de as awaitAsync,le as bic,Yn as bigint,et as blob,nt as boolean,ke as brand,he as bytes,xe as check,Oe as checkAsync,we as checkItems,UI as config,Ae as creditCard,be as cuid2,tt as custom,st as customAsync,ut as date,Ee as decimal,os as deleteGlobalConfig,ms as deleteGlobalMessage,Ts as deleteSchemaMessage,ys as deleteSpecificMessage,Me as email,Pe as emoji,je as empty,ve as endsWith,Ss as entriesFromList,rt as enum,rt as enum_,Re as everyItem,_e as excludes,JI as fallback,YI as fallbackAsync,It as file,qe as filterItems,De as findItem,Ne as finite,to as flatten,uo as forward,Io as forwardAsync,ot as function,ot as function_,d as getDefault,oe as getDefaults,ie as getDefaultsAsync,Ie as getDotPath,h as getFallback,ae as getFallbacks,me as getFallbacksAsync,l as getGlobalConfig,se as getGlobalMessage,ue as getSchemaMessage,re as getSpecificMessage,Ve as hash,Le as hexColor,Ce as hexadecimal,Ke as imei,$e as includes,it as instance,ze as integer,at as intersect,mt as intersectAsync,Fe as ip,Ue as ipv4,Ge as ipv6,ko as is,bs as isOfKind,Ms as isOfType,vs as isValiError,Xe as isoDate,He as isoDateTime,Je as isoTime,Ze as isoTimeSecond,Qe as isoTimestamp,Ye as isoWeek,Qa as keyof,pt as lazy,ct as lazyAsync,en as length,Tt as literal,ft as looseObject,dt as looseObjectAsync,yt as looseTuple,lt as looseTupleAsync,nn as mac,tn as mac48,sn as mac64,kt as map,ht as mapAsync,un as mapItems,rn as maxBytes,In as maxLength,on as maxSize,an as maxValue,mn as mimeType,pn as minBytes,cn as minLength,Tn as minSize,fn as minValue,dn as multipleOf,xt as nan,Ot as never,yn as nonEmpty,wt as nonNullable,gt as nonNullableAsync,St as nonNullish,Bt as nonNullishAsync,M as nonOptional,P as nonOptionalAsync,ln as normalize,kn as notBytes,hn as notLength,xn as notSize,On as notValue,At as null,At as null_,bt as nullable,Et as nullableAsync,Mt as nullish,Pt as nullishAsync,jt as number,vt as object,Rt as objectAsync,_t as objectWithRest,qt as objectWithRestAsync,wn as octal,em as omit,j as optional,v as optionalAsync,pe as parse,ce as parseAsync,am as parser,cm as parserAsync,dm as partial,km as partialAsync,gn as partialCheck,Sn as partialCheckAsync,xm as pick,R as picklist,wm as pipe,Sm as pipeAsync,Dt as promise,Bn as rawCheck,An as rawCheckAsync,bn as rawTransform,En as rawTransformAsync,Mn as readonly,Nt as record,Wt as recordAsync,Pn as reduceItems,jn as regex,bm as required,Pm as requiredAsync,vn as safeInteger,Te as safeParse,fe as safeParseAsync,Nm as safeParser,Cm as safeParserAsync,Vt as set,Ct as setAsync,Is as setGlobalConfig,as as setGlobalMessage,cs as setSchemaMessage,ds as setSpecificMessage,Rn as size,_n as someItem,qn as sortItems,Dn as startsWith,Lt as strictObject,Kt as strictObjectAsync,$t as strictTuple,zt as strictTupleAsync,Ft as string,Ut as symbol,Nn as toLowerCase,Wn as toMaxValue,Vn as toMinValue,Cn as toUpperCase,Ln as transform,Kn as transformAsync,$n as trim,zn as trimEnd,Fn as trimStart,Gt as tuple,Xt as tupleAsync,Ht as tupleWithRest,Jt as tupleWithRestAsync,Un as ulid,Zt as undefined,Zt as undefined_,Qt as union,Yt as unionAsync,es as unknown,Km as unwrap,Gn as url,Xn as uuid,Hn as value,ns as variant,ts as variantAsync,ss as void,ss as void_};
{
"name": "valibot",
"description": "The modular and type safe schema library for validating structural data",
"version": "0.35.0",
"version": "0.36.0",
"license": "MIT",

@@ -57,19 +57,19 @@ "author": "Fabian Hiller",

"devDependencies": {
"@types/eslint": "^8.56.7",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0",
"@vitest/coverage-v8": "^1.4.0",
"@types/eslint": "^8.56.10",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/parser": "^7.15.0",
"@vitest/coverage-v8": "^1.6.0",
"eslint": "^8.57.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsdoc": "^48.2.2",
"eslint-plugin-jsdoc": "^48.5.2",
"eslint-plugin-redos-detector": "^2.4.0",
"eslint-plugin-regexp": "^2.4.0",
"eslint-plugin-regexp": "^2.6.0",
"eslint-plugin-security": "^2.1.1",
"jsdom": "^24.0.0",
"jsdom": "^24.1.0",
"tsm": "^2.3.0",
"tsup": "^8.0.2",
"typescript": "^5.4.3",
"vite": "^5.2.7",
"vitest": "1.4.0"
"tsup": "^8.1.0",
"typescript": "^5.5.3",
"vite": "^5.3.3",
"vitest": "1.6.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc