@synnaxlabs/drift 0.46.0 → 0.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/eslint.config.d.ts +4 -0
- package/dist/eslint.config.d.ts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/react.cjs +1 -1
- package/dist/react.js +2 -2
- package/dist/{selectors-D8hS_RlY.js → selectors-DyMwTbxE.js} +1 -1
- package/dist/{selectors-aSH0_uiN.cjs → selectors-KaNE81VG.cjs} +1 -1
- package/dist/src/configureStore.d.ts +13 -14
- package/dist/src/configureStore.d.ts.map +1 -1
- package/dist/state-BEtTdLcx.cjs +28 -0
- package/dist/{state-BY1hJV7i.js → state-BI4Gp9I9.js} +2536 -2410
- package/dist/tauri.cjs +1 -1
- package/dist/tauri.js +79 -70
- package/package.json +19 -24
- package/dist/debounce-BUAIXXZt.cjs +0 -1
- package/dist/debounce-DOZKRZa9.js +0 -9
- package/dist/electron.cjs +0 -1
- package/dist/electron.js +0 -249
- package/dist/src/electron/index.d.ts +0 -49
- package/dist/src/electron/index.d.ts.map +0 -1
- package/dist/state-Zba9U3R-.cjs +0 -28
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";const Yl=require("@reduxjs/toolkit"),nt=(t=!1,...e)=>{t&&console.log(...e)},yo=(t=!1,...e)=>{t&&console.group(...e)},On=t=>{t&&console.groupEnd()},bo=Object.freeze({status:"aborted"});function l(t,e,r){function i(u,s){var c;Object.defineProperty(u,"_zod",{value:u._zod??{},enumerable:!1}),(c=u._zod).traits??(c.traits=new Set),u._zod.traits.add(t),e(u,s);for(const d in a.prototype)d in u||Object.defineProperty(u,d,{value:a.prototype[d].bind(u)});u._zod.constr=a,u._zod.def=s}const n=r?.Parent??Object;class o extends n{}Object.defineProperty(o,"name",{value:t});function a(u){var s;const c=r?.Parent?new o:this;i(c,u),(s=c._zod).deferred??(s.deferred=[]);for(const d of c._zod.deferred)d();return c}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:u=>r?.Parent&&u instanceof r.Parent?!0:u?._zod?.traits?.has(t)}),Object.defineProperty(a,"name",{value:t}),a}const $o=Symbol("zod_brand");class De extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Yt extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const Ct={};function H(t){return t&&Object.assign(Ct,t),Ct}function Xl(t){return t}function Hl(t){return t}function Ql(t){}function ed(t){throw new Error}function td(t){}function Vn(t){const e=Object.values(t).filter(i=>typeof i=="number");return Object.entries(t).filter(([i,n])=>e.indexOf(+i)===-1).map(([i,n])=>n)}function y(t,e="|"){return t.map(r=>k(r)).join(e)}function Mt(t,e){return typeof e=="bigint"?e.toString():e}function ht(t){return{get value(){{const e=t();return Object.defineProperty(this,"value",{value:e}),e}}}}function Le(t){return t==null}function Xt(t){const e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function wo(t,e){const r=(t.toString().split(".")[1]||"").length,i=e.toString();let n=(i.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(i)){const s=i.match(/\d?e-(\d?)/);s?.[1]&&(n=Number.parseInt(s[1]))}const o=r>n?r:n,a=Number.parseInt(t.toFixed(o).replace(".","")),u=Number.parseInt(e.toFixed(o).replace(".",""));return a%u/10**o}const Fi=Symbol("evaluating");function N(t,e,r){let i;Object.defineProperty(t,e,{get(){if(i!==Fi)return i===void 0&&(i=Fi,i=r()),i},set(n){Object.defineProperty(t,e,{value:n})},configurable:!0})}function nd(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function xe(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function ye(...t){const e={};for(const r of t){const i=Object.getOwnPropertyDescriptors(r);Object.assign(e,i)}return Object.defineProperties({},e)}function rd(t){return ye(t._zod.def)}function id(t,e){return e?e.reduce((r,i)=>r?.[i],t):t}function od(t){const e=Object.keys(t),r=e.map(i=>t[i]);return Promise.all(r).then(i=>{const n={};for(let o=0;o<e.length;o++)n[e[o]]=i[o];return n})}function ad(t=10){const e="abcdefghijklmnopqrstuvwxyz";let r="";for(let i=0;i<t;i++)r+=e[Math.floor(Math.random()*e.length)];return r}function zn(t){return JSON.stringify(t)}const Gn="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Ve(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const _o=ht(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Ze(t){if(Ve(t)===!1)return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(Ve(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Ht(t){return Ze(t)?{...t}:Array.isArray(t)?[...t]:t}function ud(t){let e=0;for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}const sd=t=>{const e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},Lt=new Set(["string","number","symbol"]),Io=new Set(["string","number","bigint","boolean","symbol","undefined"]);function ke(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ie(t,e,r){const i=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(i._zod.parent=t),i}function p(t){const e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function cd(t){let e;return new Proxy({},{get(r,i,n){return e??(e=t()),Reflect.get(e,i,n)},set(r,i,n,o){return e??(e=t()),Reflect.set(e,i,n,o)},has(r,i){return e??(e=t()),Reflect.has(e,i)},deleteProperty(r,i){return e??(e=t()),Reflect.deleteProperty(e,i)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,i){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,i)},defineProperty(r,i,n){return e??(e=t()),Reflect.defineProperty(e,i,n)}})}function k(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function ko(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}const So={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Oo={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function zo(t,e){const r=t._zod.def,i=ye(t._zod.def,{get shape(){const n={};for(const o in e){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&(n[o]=r.shape[o])}return xe(this,"shape",n),n},checks:[]});return ie(t,i)}function xo(t,e){const r=t._zod.def,i=ye(t._zod.def,{get shape(){const n={...t._zod.def.shape};for(const o in e){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&delete n[o]}return xe(this,"shape",n),n},checks:[]});return ie(t,i)}function No(t,e){if(!Ze(e))throw new Error("Invalid input to extend: expected a plain object");const r=t._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const n=ye(t._zod.def,{get shape(){const o={...t._zod.def.shape,...e};return xe(this,"shape",o),o},checks:[]});return ie(t,n)}function jo(t,e){if(!Ze(e))throw new Error("Invalid input to safeExtend: expected a plain object");const r={...t._zod.def,get shape(){const i={...t._zod.def.shape,...e};return xe(this,"shape",i),i},checks:t._zod.def.checks};return ie(t,r)}function To(t,e){const r=ye(t._zod.def,{get shape(){const i={...t._zod.def.shape,...e._zod.def.shape};return xe(this,"shape",i),i},get catchall(){return e._zod.def.catchall},checks:[]});return ie(t,r)}function Uo(t,e,r){const i=ye(e._zod.def,{get shape(){const n=e._zod.def.shape,o={...n};if(r)for(const a in r){if(!(a in n))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(o[a]=t?new t({type:"optional",innerType:n[a]}):n[a])}else for(const a in n)o[a]=t?new t({type:"optional",innerType:n[a]}):n[a];return xe(this,"shape",o),o},checks:[]});return ie(e,i)}function Do(t,e,r){const i=ye(e._zod.def,{get shape(){const n=e._zod.def.shape,o={...n};if(r)for(const a in r){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(o[a]=new t({type:"nonoptional",innerType:n[a]}))}else for(const a in n)o[a]=new t({type:"nonoptional",innerType:n[a]});return xe(this,"shape",o),o},checks:[]});return ie(e,i)}function je(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function oe(t,e){return e.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(t),r})}function rt(t){return typeof t=="string"?t:t?.message}function ue(t,e,r){const i={...t,path:t.path??[]};if(!t.message){const n=rt(t.inst?._zod.def?.error?.(t))??rt(e?.error?.(t))??rt(r.customError?.(t))??rt(r.localeError?.(t))??"Invalid input";i.message=n}return delete i.inst,delete i.continue,e?.reportInput||delete i.input,i}function Qt(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function en(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Ge(...t){const[e,r,i]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:i}:{...e}}function ld(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Eo(t){const e=atob(t),r=new Uint8Array(e.length);for(let i=0;i<e.length;i++)r[i]=e.charCodeAt(i);return r}function Ao(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function dd(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return Eo(e+r)}function fd(t){return Ao(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function md(t){const e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");const r=new Uint8Array(e.length/2);for(let i=0;i<e.length;i+=2)r[i/2]=Number.parseInt(e.slice(i,i+2),16);return r}function gd(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}class pd{constructor(...e){}}const Po=Object.freeze(Object.defineProperty({__proto__:null,BIGINT_FORMAT_RANGES:Oo,Class:pd,NUMBER_FORMAT_RANGES:So,aborted:je,allowsEval:_o,assert:td,assertEqual:Xl,assertIs:Ql,assertNever:ed,assertNotEqual:Hl,assignProp:xe,base64ToUint8Array:Eo,base64urlToUint8Array:dd,cached:ht,captureStackTrace:Gn,cleanEnum:ld,cleanRegex:Xt,clone:ie,cloneDef:rd,createTransparentProxy:cd,defineLazy:N,esc:zn,escapeRegex:ke,extend:No,finalizeIssue:ue,floatSafeRemainder:wo,getElementAtPath:id,getEnumValues:Vn,getLengthableOrigin:en,getParsedType:sd,getSizableOrigin:Qt,hexToUint8Array:md,isObject:Ve,isPlainObject:Ze,issue:Ge,joinValues:y,jsonStringifyReplacer:Mt,merge:To,mergeDefs:ye,normalizeParams:p,nullish:Le,numKeys:ud,objectClone:nd,omit:xo,optionalKeys:ko,partial:Uo,pick:zo,prefixIssues:oe,primitiveTypes:Io,promiseAllObject:od,propertyKeyTypes:Lt,randomString:ad,required:Do,safeExtend:jo,shallowClone:Ht,stringifyPrimitive:k,uint8ArrayToBase64:Ao,uint8ArrayToBase64url:fd,uint8ArrayToHex:gd,unwrapMessage:rt},Symbol.toStringTag,{value:"Module"})),Zo=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,Mt,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},qn=l("$ZodError",Zo),ee=l("$ZodError",Zo,{Parent:Error});function Kn(t,e=r=>r.message){const r={},i=[];for(const n of t.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(e(n))):i.push(e(n));return{formErrors:i,fieldErrors:r}}function Yn(t,e=r=>r.message){const r={_errors:[]},i=n=>{for(const o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(a=>i({issues:a}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)r._errors.push(e(o));else{let a=r,u=0;for(;u<o.path.length;){const s=o.path[u];u===o.path.length-1?(a[s]=a[s]||{_errors:[]},a[s]._errors.push(e(o))):a[s]=a[s]||{_errors:[]},a=a[s],u++}}};return i(t),r}function Ro(t,e=r=>r.message){const r={errors:[]},i=(n,o=[])=>{var a,u;for(const s of n.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>i({issues:c},s.path));else if(s.code==="invalid_key")i({issues:s.issues},s.path);else if(s.code==="invalid_element")i({issues:s.issues},s.path);else{const c=[...o,...s.path];if(c.length===0){r.errors.push(e(s));continue}let d=r,m=0;for(;m<c.length;){const h=c[m],b=m===c.length-1;typeof h=="string"?(d.properties??(d.properties={}),(a=d.properties)[h]??(a[h]={errors:[]}),d=d.properties[h]):(d.items??(d.items=[]),(u=d.items)[h]??(u[h]={errors:[]}),d=d.items[h]),b&&d.errors.push(e(s)),m++}}};return i(t),r}function Co(t){const e=[],r=t.map(i=>typeof i=="object"?i.key:i);for(const i of r)typeof i=="number"?e.push(`[${i}]`):typeof i=="symbol"?e.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?e.push(`[${JSON.stringify(i)}]`):(e.length&&e.push("."),e.push(i));return e.join("")}function Mo(t){const e=[],r=[...t.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(const i of r)e.push(`✖ ${i.message}`),i.path?.length&&e.push(` → at ${Co(i.path)}`);return e.join(`
|
|
2
|
+
`)}const vt=t=>(e,r,i,n)=>{const o=i?Object.assign(i,{async:!1}):{async:!1},a=e._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new De;if(a.issues.length){const u=new(n?.Err??t)(a.issues.map(s=>ue(s,o,H())));throw Gn(u,n?.callee),u}return a.value},xn=vt(ee),yt=t=>async(e,r,i,n)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let a=e._zod.run({value:r,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){const u=new(n?.Err??t)(a.issues.map(s=>ue(s,o,H())));throw Gn(u,n?.callee),u}return a.value},Nn=yt(ee),bt=t=>(e,r,i)=>{const n=i?{...i,async:!1}:{async:!1},o=e._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new De;return o.issues.length?{success:!1,error:new(t??qn)(o.issues.map(a=>ue(a,n,H())))}:{success:!0,data:o.value}},Lo=bt(ee),$t=t=>async(e,r,i)=>{const n=i?Object.assign(i,{async:!0}):{async:!0};let o=e._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new t(o.issues.map(a=>ue(a,n,H())))}:{success:!0,data:o.value}},Wo=$t(ee),Xn=t=>(e,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return vt(t)(e,r,n)},hd=Xn(ee),Hn=t=>(e,r,i)=>vt(t)(e,r,i),vd=Hn(ee),Qn=t=>async(e,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return yt(t)(e,r,n)},yd=Qn(ee),er=t=>async(e,r,i)=>yt(t)(e,r,i),bd=er(ee),tr=t=>(e,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return bt(t)(e,r,n)},$d=tr(ee),nr=t=>(e,r,i)=>bt(t)(e,r,i),wd=nr(ee),rr=t=>async(e,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return $t(t)(e,r,n)},_d=rr(ee),ir=t=>async(e,r,i)=>$t(t)(e,r,i),Id=ir(ee),Bo=/^[cC][^\s-]{8,}$/,Fo=/^[0-9a-z]+$/,Jo=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Vo=/^[0-9a-vA-V]{20}$/,Go=/^[A-Za-z0-9]{27}$/,qo=/^[a-zA-Z0-9_-]{21}$/,Ko=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,kd=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Yo=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,qe=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Sd=qe(4),Od=qe(6),zd=qe(7),Xo=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,xd=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Nd=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Ho=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,jd=Ho,Td=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ud="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Qo(){return new RegExp(Ud,"u")}const ea=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ta=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,na=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ra=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ia=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,or=/^[A-Za-z0-9_-]*$/,ar=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,oa=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,aa=/^\+(?:[0-9]){6,14}[0-9]$/,ua="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",sa=new RegExp(`^${ua}$`);function ca(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function la(t){return new RegExp(`^${ca(t)}$`)}function da(t){const e=ca({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${e}(?:${r.join("|")})`;return new RegExp(`^${ua}T(?:${i})$`)}const fa=t=>{const e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},ma=/^-?\d+n?$/,ga=/^-?\d+$/,pa=/^-?\d+(?:\.\d+)?/,ha=/^(?:true|false)$/i,va=/^null$/i,ya=/^undefined$/i,ba=/^[^A-Z]*$/,$a=/^[^a-z]*$/,wa=/^[0-9a-fA-F]*$/;function wt(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function _t(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}const Dd=/^[0-9a-fA-F]{32}$/,Ed=wt(22,"=="),Ad=_t(22),Pd=/^[0-9a-fA-F]{40}$/,Zd=wt(27,"="),Rd=_t(27),Cd=/^[0-9a-fA-F]{64}$/,Md=wt(43,"="),Ld=_t(43),Wd=/^[0-9a-fA-F]{96}$/,Bd=wt(64,""),Fd=_t(64),Jd=/^[0-9a-fA-F]{128}$/,Vd=wt(86,"=="),Gd=_t(86),ur=Object.freeze(Object.defineProperty({__proto__:null,base64:ia,base64url:or,bigint:ma,boolean:ha,browserEmail:Td,cidrv4:na,cidrv6:ra,cuid:Bo,cuid2:Fo,date:sa,datetime:da,domain:oa,duration:Ko,e164:aa,email:Xo,emoji:Qo,extendedDuration:kd,guid:Yo,hex:wa,hostname:ar,html5Email:xd,idnEmail:jd,integer:ga,ipv4:ea,ipv6:ta,ksuid:Go,lowercase:ba,md5_base64:Ed,md5_base64url:Ad,md5_hex:Dd,nanoid:qo,null:va,number:pa,rfc5322Email:Nd,sha1_base64:Zd,sha1_base64url:Rd,sha1_hex:Pd,sha256_base64:Md,sha256_base64url:Ld,sha256_hex:Cd,sha384_base64:Bd,sha384_base64url:Fd,sha384_hex:Wd,sha512_base64:Vd,sha512_base64url:Gd,sha512_hex:Jd,string:fa,time:la,ulid:Jo,undefined:ya,unicodeEmail:Ho,uppercase:$a,uuid:qe,uuid4:Sd,uuid6:Od,uuid7:zd,xid:Vo},Symbol.toStringTag,{value:"Module"})),B=l("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),_a={number:"number",bigint:"bigint",object:"date"},sr=l("$ZodCheckLessThan",(t,e)=>{B.init(t,e);const r=_a[typeof e.value];t._zod.onattach.push(i=>{const n=i._zod.bag,o=(e.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<o&&(e.inclusive?n.maximum=e.value:n.exclusiveMaximum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value<=e.value:i.value<e.value)||i.issues.push({origin:r,code:"too_big",maximum:e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),cr=l("$ZodCheckGreaterThan",(t,e)=>{B.init(t,e);const r=_a[typeof e.value];t._zod.onattach.push(i=>{const n=i._zod.bag,o=(e.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>o&&(e.inclusive?n.minimum=e.value:n.exclusiveMinimum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value>=e.value:i.value>e.value)||i.issues.push({origin:r,code:"too_small",minimum:e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Ia=l("$ZodCheckMultipleOf",(t,e)=>{B.init(t,e),t._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):wo(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),ka=l("$ZodCheckNumberFormat",(t,e)=>{B.init(t,e),e.format=e.format||"float64";const r=e.format?.includes("int"),i=r?"int":"number",[n,o]=So[e.format];t._zod.onattach.push(a=>{const u=a._zod.bag;u.format=e.format,u.minimum=n,u.maximum=o,r&&(u.pattern=ga)}),t._zod.check=a=>{const u=a.value;if(r){if(!Number.isInteger(u)){a.issues.push({expected:i,format:e.format,code:"invalid_type",continue:!1,input:u,inst:t});return}if(!Number.isSafeInteger(u)){u>0?a.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,continue:!e.abort}):a.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,continue:!e.abort});return}}u<n&&a.issues.push({origin:"number",input:u,code:"too_small",minimum:n,inclusive:!0,inst:t,continue:!e.abort}),u>o&&a.issues.push({origin:"number",input:u,code:"too_big",maximum:o,inst:t})}}),Sa=l("$ZodCheckBigIntFormat",(t,e)=>{B.init(t,e);const[r,i]=Oo[e.format];t._zod.onattach.push(n=>{const o=n._zod.bag;o.format=e.format,o.minimum=r,o.maximum=i}),t._zod.check=n=>{const o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inst:t})}}),Oa=l("$ZodCheckMaxSize",(t,e)=>{var r;B.init(t,e),(r=t._zod.def).when??(r.when=i=>{const n=i.value;return!Le(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{const n=i.value;n.size<=e.maximum||i.issues.push({origin:Qt(n),code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),za=l("$ZodCheckMinSize",(t,e)=>{var r;B.init(t,e),(r=t._zod.def).when??(r.when=i=>{const n=i.value;return!Le(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{const n=i.value;n.size>=e.minimum||i.issues.push({origin:Qt(n),code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),xa=l("$ZodCheckSizeEquals",(t,e)=>{var r;B.init(t,e),(r=t._zod.def).when??(r.when=i=>{const n=i.value;return!Le(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=e.size,n.maximum=e.size,n.size=e.size}),t._zod.check=i=>{const n=i.value,o=n.size;if(o===e.size)return;const a=o>e.size;i.issues.push({origin:Qt(n),...a?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),Na=l("$ZodCheckMaxLength",(t,e)=>{var r;B.init(t,e),(r=t._zod.def).when??(r.when=i=>{const n=i.value;return!Le(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{const n=i.value;if(n.length<=e.maximum)return;const a=en(n);i.issues.push({origin:a,code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),ja=l("$ZodCheckMinLength",(t,e)=>{var r;B.init(t,e),(r=t._zod.def).when??(r.when=i=>{const n=i.value;return!Le(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{const n=i.value;if(n.length>=e.minimum)return;const a=en(n);i.issues.push({origin:a,code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Ta=l("$ZodCheckLengthEquals",(t,e)=>{var r;B.init(t,e),(r=t._zod.def).when??(r.when=i=>{const n=i.value;return!Le(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=e.length,n.maximum=e.length,n.length=e.length}),t._zod.check=i=>{const n=i.value,o=n.length;if(o===e.length)return;const a=en(n),u=o>e.length;i.issues.push({origin:a,...u?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),It=l("$ZodCheckStringFormat",(t,e)=>{var r,i;B.init(t,e),t._zod.onattach.push(n=>{const o=n._zod.bag;o.format=e.format,e.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:e.format,input:n.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(i=t._zod).check??(i.check=()=>{})}),Ua=l("$ZodCheckRegex",(t,e)=>{It.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Da=l("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=ba),It.init(t,e)}),Ea=l("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=$a),It.init(t,e)}),Aa=l("$ZodCheckIncludes",(t,e)=>{B.init(t,e);const r=ke(e.includes),i=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=i,t._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),t._zod.check=n=>{n.value.includes(e.includes,e.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:n.value,inst:t,continue:!e.abort})}}),Pa=l("$ZodCheckStartsWith",(t,e)=>{B.init(t,e);const r=new RegExp(`^${ke(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),t._zod.check=i=>{i.value.startsWith(e.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:i.value,inst:t,continue:!e.abort})}}),Za=l("$ZodCheckEndsWith",(t,e)=>{B.init(t,e);const r=new RegExp(`.*${ke(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),t._zod.check=i=>{i.value.endsWith(e.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:i.value,inst:t,continue:!e.abort})}});function Ji(t,e,r){t.issues.length&&e.issues.push(...oe(r,t.issues))}const Ra=l("$ZodCheckProperty",(t,e)=>{B.init(t,e),t._zod.check=r=>{const i=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>Ji(n,r,e.property));Ji(i,r,e.property)}}),Ca=l("$ZodCheckMimeType",(t,e)=>{B.init(t,e);const r=new Set(e.mime);t._zod.onattach.push(i=>{i._zod.bag.mime=e.mime}),t._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:e.mime,input:i.value.type,inst:t,continue:!e.abort})}}),Ma=l("$ZodCheckOverwrite",(t,e)=>{B.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});class La{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const i=e.split(`
|
|
3
|
+
`).filter(a=>a),n=Math.min(...i.map(a=>a.length-a.trimStart().length)),o=i.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(const a of o)this.content.push(a)}compile(){const e=Function,r=this?.args,n=[...(this?.content??[""]).map(o=>` ${o}`)];return new e(...r,n.join(`
|
|
4
|
+
`))}}const Wa={major:4,minor:1,patch:12},S=l("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Wa;const i=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&i.unshift(t);for(const n of i)for(const o of n._zod.onattach)o(t);if(i.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const n=(a,u,s)=>{let c=je(a),d;for(const m of u){if(m._zod.def.when){if(!m._zod.def.when(a))continue}else if(c)continue;const h=a.issues.length,b=m._zod.check(a);if(b instanceof Promise&&s?.async===!1)throw new De;if(d||b instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await b,a.issues.length!==h&&(c||(c=je(a,h)))});else{if(a.issues.length===h)continue;c||(c=je(a,h))}}return d?d.then(()=>a):a},o=(a,u,s)=>{if(je(a))return a.aborted=!0,a;const c=n(u,i,s);if(c instanceof Promise){if(s.async===!1)throw new De;return c.then(d=>t._zod.parse(d,s))}return t._zod.parse(c,s)};t._zod.run=(a,u)=>{if(u.skipChecks)return t._zod.parse(a,u);if(u.direction==="backward"){const c=t._zod.parse({value:a.value,issues:[]},{...u,skipChecks:!0});return c instanceof Promise?c.then(d=>o(d,a,u)):o(c,a,u)}const s=t._zod.parse(a,u);if(s instanceof Promise){if(u.async===!1)throw new De;return s.then(c=>n(c,i,u))}return n(s,i,u)}}t["~standard"]={validate:n=>{try{const o=Lo(t,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Wo(t,n).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}}),kt=l("$ZodString",(t,e)=>{S.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??fa(t._zod.bag),t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),Z=l("$ZodStringFormat",(t,e)=>{It.init(t,e),kt.init(t,e)}),Ba=l("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Yo),Z.init(t,e)}),Fa=l("$ZodUUID",(t,e)=>{if(e.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(i===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=qe(i))}else e.pattern??(e.pattern=qe());Z.init(t,e)}),Ja=l("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Xo),Z.init(t,e)}),Va=l("$ZodURL",(t,e)=>{Z.init(t,e),t._zod.check=r=>{try{const i=r.value.trim(),n=new URL(i);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:ar.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=n.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),Ga=l("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Qo()),Z.init(t,e)}),qa=l("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=qo),Z.init(t,e)}),Ka=l("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Bo),Z.init(t,e)}),Ya=l("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Fo),Z.init(t,e)}),Xa=l("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Jo),Z.init(t,e)}),Ha=l("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Vo),Z.init(t,e)}),Qa=l("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Go),Z.init(t,e)}),eu=l("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=da(e)),Z.init(t,e)}),tu=l("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=sa),Z.init(t,e)}),nu=l("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=la(e)),Z.init(t,e)}),ru=l("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Ko),Z.init(t,e)}),iu=l("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=ea),Z.init(t,e),t._zod.onattach.push(r=>{const i=r._zod.bag;i.format="ipv4"})}),ou=l("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=ta),Z.init(t,e),t._zod.onattach.push(r=>{const i=r._zod.bag;i.format="ipv6"}),t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),au=l("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=na),Z.init(t,e)}),uu=l("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=ra),Z.init(t,e),t._zod.check=r=>{const i=r.value.split("/");try{if(i.length!==2)throw new Error;const[n,o]=i;if(!o)throw new Error;const a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function lr(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const su=l("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=ia),Z.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),t._zod.check=r=>{lr(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function cu(t){if(!or.test(t))return!1;const e=t.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return lr(r)}const lu=l("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=or),Z.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),t._zod.check=r=>{cu(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),du=l("$ZodE164",(t,e)=>{e.pattern??(e.pattern=aa),Z.init(t,e)});function fu(t,e=null){try{const r=t.split(".");if(r.length!==3)return!1;const[i]=r;if(!i)return!1;const n=JSON.parse(atob(i));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||e&&(!("alg"in n)||n.alg!==e))}catch{return!1}}const mu=l("$ZodJWT",(t,e)=>{Z.init(t,e),t._zod.check=r=>{fu(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),gu=l("$ZodCustomStringFormat",(t,e)=>{Z.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),dr=l("$ZodNumber",(t,e)=>{S.init(t,e),t._zod.pattern=t._zod.bag.pattern??pa,t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}const n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;const o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:t,...o?{received:o}:{}}),r}}),pu=l("$ZodNumber",(t,e)=>{ka.init(t,e),dr.init(t,e)}),fr=l("$ZodBoolean",(t,e)=>{S.init(t,e),t._zod.pattern=ha,t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=!!r.value}catch{}const n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:t}),r}}),mr=l("$ZodBigInt",(t,e)=>{S.init(t,e),t._zod.pattern=ma,t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}}),hu=l("$ZodBigInt",(t,e)=>{Sa.init(t,e),mr.init(t,e)}),vu=l("$ZodSymbol",(t,e)=>{S.init(t,e),t._zod.parse=(r,i)=>{const n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:t}),r}}),yu=l("$ZodUndefined",(t,e)=>{S.init(t,e),t._zod.pattern=ya,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:t}),r}}),bu=l("$ZodNull",(t,e)=>{S.init(t,e),t._zod.pattern=va,t._zod.values=new Set([null]),t._zod.parse=(r,i)=>{const n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:t}),r}}),$u=l("$ZodAny",(t,e)=>{S.init(t,e),t._zod.parse=r=>r}),wu=l("$ZodUnknown",(t,e)=>{S.init(t,e),t._zod.parse=r=>r}),_u=l("$ZodNever",(t,e)=>{S.init(t,e),t._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),Iu=l("$ZodVoid",(t,e)=>{S.init(t,e),t._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:t}),r}}),ku=l("$ZodDate",(t,e)=>{S.init(t,e),t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}const n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:t}),r}});function Vi(t,e,r){t.issues.length&&e.issues.push(...oe(r,t.issues)),e.value[r]=t.value}const Su=l("$ZodArray",(t,e)=>{S.init(t,e),t._zod.parse=(r,i)=>{const n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:t}),r;r.value=Array(n.length);const o=[];for(let a=0;a<n.length;a++){const u=n[a],s=e.element._zod.run({value:u,issues:[]},i);s instanceof Promise?o.push(s.then(c=>Vi(c,r,a))):Vi(s,r,a)}return o.length?Promise.all(o).then(()=>r):r}});function Wt(t,e,r,i){t.issues.length&&e.issues.push(...oe(r,t.issues)),t.value===void 0?r in i&&(e.value[r]=void 0):e.value[r]=t.value}function Ou(t){const e=Object.keys(t.shape);for(const i of e)if(!t.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const r=ko(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function zu(t,e,r,i,n,o){const a=[],u=n.keySet,s=n.catchall._zod,c=s.def.type;for(const d of Object.keys(e)){if(u.has(d))continue;if(c==="never"){a.push(d);continue}const m=s.run({value:e[d],issues:[]},i);m instanceof Promise?t.push(m.then(h=>Wt(h,r,d,e))):Wt(m,r,d,e)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:e,inst:o}),t.length?Promise.all(t).then(()=>r):r}const xu=l("$ZodObject",(t,e)=>{if(S.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){const u=e.shape;Object.defineProperty(e,"shape",{get:()=>{const s={...u};return Object.defineProperty(e,"shape",{value:s}),s}})}const i=ht(()=>Ou(e));N(t._zod,"propValues",()=>{const u=e.shape,s={};for(const c in u){const d=u[c]._zod;if(d.values){s[c]??(s[c]=new Set);for(const m of d.values)s[c].add(m)}}return s});const n=Ve,o=e.catchall;let a;t._zod.parse=(u,s)=>{a??(a=i.value);const c=u.value;if(!n(c))return u.issues.push({expected:"object",code:"invalid_type",input:c,inst:t}),u;u.value={};const d=[],m=a.shape;for(const h of a.keys){const f=m[h]._zod.run({value:c[h],issues:[]},s);f instanceof Promise?d.push(f.then(w=>Wt(w,u,h,c))):Wt(f,u,h,c)}return o?zu(d,c,u,s,i.value,t):d.length?Promise.all(d).then(()=>u):u}}),Nu=l("$ZodObjectJIT",(t,e)=>{xu.init(t,e);const r=t._zod.parse,i=ht(()=>Ou(e)),n=h=>{const b=new La(["shape","payload","ctx"]),f=i.value,w=D=>{const R=zn(D);return`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`};b.write("const input = payload.value;");const $=Object.create(null);let I=0;for(const D of f.keys)$[D]=`key_${I++}`;b.write("const newResult = {};");for(const D of f.keys){const R=$[D],pe=zn(D);b.write(`const ${R} = ${w(D)};`),b.write(`
|
|
5
|
+
if (${R}.issues.length) {
|
|
6
|
+
payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
|
|
7
|
+
...iss,
|
|
8
|
+
path: iss.path ? [${pe}, ...iss.path] : [${pe}]
|
|
9
|
+
})));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
if (${R}.value === undefined) {
|
|
14
|
+
if (${pe} in input) {
|
|
15
|
+
newResult[${pe}] = undefined;
|
|
16
|
+
}
|
|
17
|
+
} else {
|
|
18
|
+
newResult[${pe}] = ${R}.value;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
`)}b.write("payload.value = newResult;"),b.write("return payload;");const x=b.compile();return(D,R)=>x(h,D,R)};let o;const a=Ve,u=!Ct.jitless,c=u&&_o.value,d=e.catchall;let m;t._zod.parse=(h,b)=>{m??(m=i.value);const f=h.value;return a(f)?u&&c&&b?.async===!1&&b.jitless!==!0?(o||(o=n(e.shape)),h=o(h,b),d?zu([],f,h,b,m,t):h):r(h,b):(h.issues.push({expected:"object",code:"invalid_type",input:f,inst:t}),h)}});function Gi(t,e,r,i){for(const o of t)if(o.issues.length===0)return e.value=o.value,e;const n=t.filter(o=>!je(o));return n.length===1?(e.value=n[0].value,n[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(a=>ue(a,i,H())))}),e)}const gr=l("$ZodUnion",(t,e)=>{S.init(t,e),N(t._zod,"optin",()=>e.options.some(n=>n._zod.optin==="optional")?"optional":void 0),N(t._zod,"optout",()=>e.options.some(n=>n._zod.optout==="optional")?"optional":void 0),N(t._zod,"values",()=>{if(e.options.every(n=>n._zod.values))return new Set(e.options.flatMap(n=>Array.from(n._zod.values)))}),N(t._zod,"pattern",()=>{if(e.options.every(n=>n._zod.pattern)){const n=e.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>Xt(o.source)).join("|")})$`)}});const r=e.options.length===1,i=e.options[0]._zod.run;t._zod.parse=(n,o)=>{if(r)return i(n,o);let a=!1;const u=[];for(const s of e.options){const c=s._zod.run({value:n.value,issues:[]},o);if(c instanceof Promise)u.push(c),a=!0;else{if(c.issues.length===0)return c;u.push(c)}}return a?Promise.all(u).then(s=>Gi(s,n,t,o)):Gi(u,n,t,o)}}),ju=l("$ZodDiscriminatedUnion",(t,e)=>{gr.init(t,e);const r=t._zod.parse;N(t._zod,"propValues",()=>{const n={};for(const o of e.options){const a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(const[u,s]of Object.entries(a)){n[u]||(n[u]=new Set);for(const c of s)n[u].add(c)}}return n});const i=ht(()=>{const n=e.options,o=new Map;for(const a of n){const u=a._zod.propValues?.[e.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(a)}"`);for(const s of u){if(o.has(s))throw new Error(`Duplicate discriminator value "${String(s)}"`);o.set(s,a)}}return o});t._zod.parse=(n,o)=>{const a=n.value;if(!Ve(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:t}),n;const u=i.value.get(a?.[e.discriminator]);return u?u._zod.run(n,o):e.unionFallback?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:a,path:[e.discriminator],inst:t}),n)}}),Tu=l("$ZodIntersection",(t,e)=>{S.init(t,e),t._zod.parse=(r,i)=>{const n=r.value,o=e.left._zod.run({value:n,issues:[]},i),a=e.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([s,c])=>qi(r,s,c)):qi(r,o,a)}});function jn(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(Ze(t)&&Ze(e)){const r=Object.keys(e),i=Object.keys(t).filter(o=>r.indexOf(o)!==-1),n={...t,...e};for(const o of i){const a=jn(t[o],e[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n[o]=a.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let i=0;i<t.length;i++){const n=t[i],o=e[i],a=jn(n,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function qi(t,e,r){if(e.issues.length&&t.issues.push(...e.issues),r.issues.length&&t.issues.push(...r.issues),je(t))return t;const i=jn(e.value,r.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return t.value=i.data,t}const pr=l("$ZodTuple",(t,e)=>{S.init(t,e);const r=e.items,i=r.length-[...r].reverse().findIndex(n=>n._zod.optin!=="optional");t._zod.parse=(n,o)=>{const a=n.value;if(!Array.isArray(a))return n.issues.push({input:a,inst:t,expected:"tuple",code:"invalid_type"}),n;n.value=[];const u=[];if(!e.rest){const c=a.length>r.length,d=a.length<i-1;if(c||d)return n.issues.push({...c?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},input:a,inst:t,origin:"array"}),n}let s=-1;for(const c of r){if(s++,s>=a.length&&s>=i)continue;const d=c._zod.run({value:a[s],issues:[]},o);d instanceof Promise?u.push(d.then(m=>zt(m,n,s))):zt(d,n,s)}if(e.rest){const c=a.slice(r.length);for(const d of c){s++;const m=e.rest._zod.run({value:d,issues:[]},o);m instanceof Promise?u.push(m.then(h=>zt(h,n,s))):zt(m,n,s)}}return u.length?Promise.all(u).then(()=>n):n}});function zt(t,e,r){t.issues.length&&e.issues.push(...oe(r,t.issues)),e.value[r]=t.value}const Uu=l("$ZodRecord",(t,e)=>{S.init(t,e),t._zod.parse=(r,i)=>{const n=r.value;if(!Ze(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:t}),r;const o=[];if(e.keyType._zod.values){const a=e.keyType._zod.values;r.value={};for(const s of a)if(typeof s=="string"||typeof s=="number"||typeof s=="symbol"){const c=e.valueType._zod.run({value:n[s],issues:[]},i);c instanceof Promise?o.push(c.then(d=>{d.issues.length&&r.issues.push(...oe(s,d.issues)),r.value[s]=d.value})):(c.issues.length&&r.issues.push(...oe(s,c.issues)),r.value[s]=c.value)}let u;for(const s in n)a.has(s)||(u=u??[],u.push(s));u&&u.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:t,keys:u})}else{r.value={};for(const a of Reflect.ownKeys(n)){if(a==="__proto__")continue;const u=e.keyType._zod.run({value:a,issues:[]},i);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(c=>ue(c,i,H())),input:a,path:[a],inst:t}),r.value[u.value]=u.value;continue}const s=e.valueType._zod.run({value:n[a],issues:[]},i);s instanceof Promise?o.push(s.then(c=>{c.issues.length&&r.issues.push(...oe(a,c.issues)),r.value[u.value]=c.value})):(s.issues.length&&r.issues.push(...oe(a,s.issues)),r.value[u.value]=s.value)}}return o.length?Promise.all(o).then(()=>r):r}}),Du=l("$ZodMap",(t,e)=>{S.init(t,e),t._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:t}),r;const o=[];r.value=new Map;for(const[a,u]of n){const s=e.keyType._zod.run({value:a,issues:[]},i),c=e.valueType._zod.run({value:u,issues:[]},i);s instanceof Promise||c instanceof Promise?o.push(Promise.all([s,c]).then(([d,m])=>{Ki(d,m,r,a,n,t,i)})):Ki(s,c,r,a,n,t,i)}return o.length?Promise.all(o).then(()=>r):r}});function Ki(t,e,r,i,n,o,a){t.issues.length&&(Lt.has(typeof i)?r.issues.push(...oe(i,t.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:t.issues.map(u=>ue(u,a,H()))})),e.issues.length&&(Lt.has(typeof i)?r.issues.push(...oe(i,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:e.issues.map(u=>ue(u,a,H()))})),r.value.set(t.value,e.value)}const Eu=l("$ZodSet",(t,e)=>{S.init(t,e),t._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:t,expected:"set",code:"invalid_type"}),r;const o=[];r.value=new Set;for(const a of n){const u=e.valueType._zod.run({value:a,issues:[]},i);u instanceof Promise?o.push(u.then(s=>Yi(s,r))):Yi(u,r)}return o.length?Promise.all(o).then(()=>r):r}});function Yi(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}const Au=l("$ZodEnum",(t,e)=>{S.init(t,e);const r=Vn(e.entries),i=new Set(r);t._zod.values=i,t._zod.pattern=new RegExp(`^(${r.filter(n=>Lt.has(typeof n)).map(n=>typeof n=="string"?ke(n):n.toString()).join("|")})$`),t._zod.parse=(n,o)=>{const a=n.value;return i.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:t}),n}}),Pu=l("$ZodLiteral",(t,e)=>{if(S.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");t._zod.values=new Set(e.values),t._zod.pattern=new RegExp(`^(${e.values.map(r=>typeof r=="string"?ke(r):r?ke(r.toString()):String(r)).join("|")})$`),t._zod.parse=(r,i)=>{const n=r.value;return t._zod.values.has(n)||r.issues.push({code:"invalid_value",values:e.values,input:n,inst:t}),r}}),Zu=l("$ZodFile",(t,e)=>{S.init(t,e),t._zod.parse=(r,i)=>{const n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:t}),r}}),Ru=l("$ZodTransform",(t,e)=>{S.init(t,e),t._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Yt(t.constructor.name);const n=e.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r));if(n instanceof Promise)throw new De;return r.value=n,r}});function Xi(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}const Cu=l("$ZodOptional",(t,e)=>{S.init(t,e),t._zod.optin="optional",t._zod.optout="optional",N(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),N(t._zod,"pattern",()=>{const r=e.innerType._zod.pattern;return r?new RegExp(`^(${Xt(r.source)})?$`):void 0}),t._zod.parse=(r,i)=>{if(e.innerType._zod.optin==="optional"){const n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Xi(o,r.value)):Xi(n,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,i)}}),Mu=l("$ZodNullable",(t,e)=>{S.init(t,e),N(t._zod,"optin",()=>e.innerType._zod.optin),N(t._zod,"optout",()=>e.innerType._zod.optout),N(t._zod,"pattern",()=>{const r=e.innerType._zod.pattern;return r?new RegExp(`^(${Xt(r.source)}|null)$`):void 0}),N(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,i)=>r.value===null?r:e.innerType._zod.run(r,i)}),Lu=l("$ZodDefault",(t,e)=>{S.init(t,e),t._zod.optin="optional",N(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>{if(i.direction==="backward")return e.innerType._zod.run(r,i);if(r.value===void 0)return r.value=e.defaultValue,r;const n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Hi(o,e)):Hi(n,e)}});function Hi(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}const Wu=l("$ZodPrefault",(t,e)=>{S.init(t,e),t._zod.optin="optional",N(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,i))}),Bu=l("$ZodNonOptional",(t,e)=>{S.init(t,e),N(t._zod,"values",()=>{const r=e.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),t._zod.parse=(r,i)=>{const n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Qi(o,t)):Qi(n,t)}});function Qi(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}const Fu=l("$ZodSuccess",(t,e)=>{S.init(t,e),t._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Yt("ZodSuccess");const n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),Ju=l("$ZodCatch",(t,e)=>{S.init(t,e),N(t._zod,"optin",()=>e.innerType._zod.optin),N(t._zod,"optout",()=>e.innerType._zod.optout),N(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>{if(i.direction==="backward")return e.innerType._zod.run(r,i);const n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=e.catchValue({...r,error:{issues:o.issues.map(a=>ue(a,i,H()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=e.catchValue({...r,error:{issues:n.issues.map(o=>ue(o,i,H()))},input:r.value}),r.issues=[]),r)}}),Vu=l("$ZodNaN",(t,e)=>{S.init(t,e),t._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)}),Gu=l("$ZodPipe",(t,e)=>{S.init(t,e),N(t._zod,"values",()=>e.in._zod.values),N(t._zod,"optin",()=>e.in._zod.optin),N(t._zod,"optout",()=>e.out._zod.optout),N(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,i)=>{if(i.direction==="backward"){const o=e.out._zod.run(r,i);return o instanceof Promise?o.then(a=>xt(a,e.in,i)):xt(o,e.in,i)}const n=e.in._zod.run(r,i);return n instanceof Promise?n.then(o=>xt(o,e.out,i)):xt(n,e.out,i)}});function xt(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}const hr=l("$ZodCodec",(t,e)=>{S.init(t,e),N(t._zod,"values",()=>e.in._zod.values),N(t._zod,"optin",()=>e.in._zod.optin),N(t._zod,"optout",()=>e.out._zod.optout),N(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){const o=e.in._zod.run(r,i);return o instanceof Promise?o.then(a=>Nt(a,e,i)):Nt(o,e,i)}else{const o=e.out._zod.run(r,i);return o instanceof Promise?o.then(a=>Nt(a,e,i)):Nt(o,e,i)}}});function Nt(t,e,r){if(t.issues.length)return t.aborted=!0,t;if((r.direction||"forward")==="forward"){const n=e.transform(t.value,t);return n instanceof Promise?n.then(o=>jt(t,o,e.out,r)):jt(t,n,e.out,r)}else{const n=e.reverseTransform(t.value,t);return n instanceof Promise?n.then(o=>jt(t,o,e.in,r)):jt(t,n,e.in,r)}}function jt(t,e,r,i){return t.issues.length?(t.aborted=!0,t):r._zod.run({value:e,issues:t.issues},i)}const qu=l("$ZodReadonly",(t,e)=>{S.init(t,e),N(t._zod,"propValues",()=>e.innerType._zod.propValues),N(t._zod,"values",()=>e.innerType._zod.values),N(t._zod,"optin",()=>e.innerType._zod.optin),N(t._zod,"optout",()=>e.innerType._zod.optout),t._zod.parse=(r,i)=>{if(i.direction==="backward")return e.innerType._zod.run(r,i);const n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(eo):eo(n)}});function eo(t){return t.value=Object.freeze(t.value),t}const Ku=l("$ZodTemplateLiteral",(t,e)=>{S.init(t,e);const r=[];for(const i of e.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);const n=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${i._zod.traits}`);const o=n.startsWith("^")?1:0,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,a))}else if(i===null||Io.has(typeof i))r.push(ke(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:t,expected:"template_literal",code:"invalid_type"}),i):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),i)}),Yu=l("$ZodFunction",(t,e)=>(S.init(t,e),t._def=e,t._zod.def=e,t.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){const n=t._def.input?xn(t._def.input,i):i,o=Reflect.apply(r,this,n);return t._def.output?xn(t._def.output,o):o}},t.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){const n=t._def.input?await Nn(t._def.input,i):i,o=await Reflect.apply(r,this,n);return t._def.output?await Nn(t._def.output,o):o}},t._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:t}),r):(t._def.output&&t._def.output._zod.def.type==="promise"?r.value=t.implementAsync(r.value):r.value=t.implement(r.value),r),t.input=(...r)=>{const i=t.constructor;return Array.isArray(r[0])?new i({type:"function",input:new pr({type:"tuple",items:r[0],rest:r[1]}),output:t._def.output}):new i({type:"function",input:r[0],output:t._def.output})},t.output=r=>{const i=t.constructor;return new i({type:"function",input:t._def.input,output:r})},t)),Xu=l("$ZodPromise",(t,e)=>{S.init(t,e),t._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>e.innerType._zod.run({value:n,issues:[]},i))}),Hu=l("$ZodLazy",(t,e)=>{S.init(t,e),N(t._zod,"innerType",()=>e.getter()),N(t._zod,"pattern",()=>t._zod.innerType._zod.pattern),N(t._zod,"propValues",()=>t._zod.innerType._zod.propValues),N(t._zod,"optin",()=>t._zod.innerType._zod.optin??void 0),N(t._zod,"optout",()=>t._zod.innerType._zod.optout??void 0),t._zod.parse=(r,i)=>t._zod.innerType._zod.run(r,i)}),Qu=l("$ZodCustom",(t,e)=>{B.init(t,e),S.init(t,e),t._zod.parse=(r,i)=>r,t._zod.check=r=>{const i=r.value,n=e.fn(i);if(n instanceof Promise)return n.then(o=>to(o,r,i,t));to(n,r,i,t)}});function to(t,e,r,i){if(!t){const n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),e.issues.push(Ge(n))}}const qd=()=>{const t={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"};return n=>{switch(n.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${n.expected}، ولكن تم إدخال ${r(n.input)}`;case"invalid_value":return n.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${k(n.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?` أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()} ${a.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()} ${a.unit}`:`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${n.prefix}"`:o.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${o.suffix}"`:o.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${o.includes}"`:o.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${o.pattern}`:`${i[o.format]??n.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${n.divisor}`;case"unrecognized_keys":return`معرف${n.keys.length>1?"ات":""} غريب${n.keys.length>1?"ة":""}: ${y(n.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${n.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${n.origin}`;default:return"مدخل غير مقبول"}}};function Kd(){return{localeError:qd()}}const Yd=()=>{const t={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${n.expected}, daxil olan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Yanlış dəyər: gözlənilən ${k(n.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()} ${a.unit??"element"}`:`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Yanlış mətn: "${o.prefix}" ilə başlamalıdır`:o.format==="ends_with"?`Yanlış mətn: "${o.suffix}" ilə bitməlidir`:o.format==="includes"?`Yanlış mətn: "${o.includes}" daxil olmalıdır`:o.format==="regex"?`Yanlış mətn: ${o.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${i[o.format]??n.format}`}case"not_multiple_of":return`Yanlış ədəd: ${n.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${n.keys.length>1?"lar":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${n.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function Xd(){return{localeError:Yd()}}function no(t,e,r,i){const n=Math.abs(t),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?e:o>=2&&o<=4?r:i}const Hd=()=>{const t={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"лік";case"object":{if(Array.isArray(n))return"масіў";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"};return n=>{switch(n.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${n.expected}, атрымана ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Няправільны ўвод: чакалася ${k(n.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);if(a){const u=Number(n.maximum),s=no(u,a.unit.one,a.unit.few,a.unit.many);return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна ${a.verb} ${o}${n.maximum.toString()} ${s}`}return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна быць ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);if(a){const u=Number(n.minimum),s=no(u,a.unit.one,a.unit.few,a.unit.many);return`Занадта малы: чакалася, што ${n.origin} павінна ${a.verb} ${o}${n.minimum.toString()} ${s}`}return`Занадта малы: чакалася, што ${n.origin} павінна быць ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${o.prefix}"`:o.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${o.suffix}"`:o.format==="includes"?`Няправільны радок: павінен змяшчаць "${o.includes}"`:o.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${o.pattern}`:`Няправільны ${i[o.format]??n.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${n.keys.length>1?"ключы":"ключ"}: ${y(n.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${n.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${n.origin}`;default:return"Няправільны ўвод"}}};function Qd(){return{localeError:Hd()}}const ef=t=>{const e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"число";case"object":{if(Array.isArray(t))return"масив";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},tf=()=>{const t={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function e(i){return t[i]??null}const r={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"};return i=>{switch(i.code){case"invalid_type":return`Невалиден вход: очакван ${i.expected}, получен ${ef(i.input)}`;case"invalid_value":return i.values.length===1?`Невалиден вход: очакван ${k(i.values[0])}`:`Невалидна опция: очаквано едно от ${y(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=e(i.origin);return o?`Твърде голямо: очаква се ${i.origin??"стойност"} да съдържа ${n}${i.maximum.toString()} ${o.unit??"елемента"}`:`Твърде голямо: очаква се ${i.origin??"стойност"} да бъде ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=e(i.origin);return o?`Твърде малко: очаква се ${i.origin} да съдържа ${n}${i.minimum.toString()} ${o.unit}`:`Твърде малко: очаква се ${i.origin} да бъде ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;if(n.format==="starts_with")return`Невалиден низ: трябва да започва с "${n.prefix}"`;if(n.format==="ends_with")return`Невалиден низ: трябва да завършва с "${n.suffix}"`;if(n.format==="includes")return`Невалиден низ: трябва да включва "${n.includes}"`;if(n.format==="regex")return`Невалиден низ: трябва да съвпада с ${n.pattern}`;let o="Невалиден";return n.format==="emoji"&&(o="Невалидно"),n.format==="datetime"&&(o="Невалидно"),n.format==="date"&&(o="Невалидна"),n.format==="time"&&(o="Невалидно"),n.format==="duration"&&(o="Невалидна"),`${o} ${r[n.format]??i.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${i.divisor}`;case"unrecognized_keys":return`Неразпознат${i.keys.length>1?"и":""} ключ${i.keys.length>1?"ове":""}: ${y(i.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${i.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${i.origin}`;default:return"Невалиден вход"}}};function nf(){return{localeError:tf()}}const rf=()=>{const t={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Tipus invàlid: s'esperava ${n.expected}, s'ha rebut ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Valor invàlid: s'esperava ${k(n.values[0])}`:`Opció invàlida: s'esperava una de ${y(n.values," o ")}`;case"too_big":{const o=n.inclusive?"com a màxim":"menys de",a=e(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingués ${o} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"com a mínim":"més de",a=e(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingués ${o} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Format invàlid: ha de començar amb "${o.prefix}"`:o.format==="ends_with"?`Format invàlid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format invàlid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${o.pattern}`:`Format invàlid per a ${i[o.format]??n.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${n.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${n.origin}`;default:return"Entrada invàlida"}}};function of(){return{localeError:rf()}}const af=()=>{const t={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"číslo";case"string":return"řetězec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(n))return"pole";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"};return n=>{switch(n.code){case"invalid_type":return`Neplatný vstup: očekáváno ${n.expected}, obdrženo ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neplatný vstup: očekáváno ${k(n.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Hodnota je příliš velká: ${n.origin??"hodnota"} musí mít ${o}${n.maximum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš velká: ${n.origin??"hodnota"} musí být ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Hodnota je příliš malá: ${n.origin??"hodnota"} musí mít ${o}${n.minimum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš malá: ${n.origin??"hodnota"} musí být ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neplatný řetězec: musí začínat na "${o.prefix}"`:o.format==="ends_with"?`Neplatný řetězec: musí končit na "${o.suffix}"`:o.format==="includes"?`Neplatný řetězec: musí obsahovat "${o.includes}"`:o.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${o.pattern}`:`Neplatný formát ${i[o.format]??n.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${n.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${y(n.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${n.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${n.origin}`;default:return"Neplatný vstup"}}};function uf(){return{localeError:af()}}const sf=()=>{const t={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},e={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};function r(a){return t[a]??null}function i(a){return e[a]??a}const n=a=>{const u=typeof a;switch(u){case"number":return Number.isNaN(a)?"NaN":"tal";case"object":return Array.isArray(a)?"liste":a===null?"null":Object.getPrototypeOf(a)!==Object.prototype&&a.constructor?a.constructor.name:"objekt"}return u},o={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return a=>{switch(a.code){case"invalid_type":return`Ugyldigt input: forventede ${i(a.expected)}, fik ${i(n(a.input))}`;case"invalid_value":return a.values.length===1?`Ugyldig værdi: forventede ${k(a.values[0])}`:`Ugyldigt valg: forventede en af følgende ${y(a.values,"|")}`;case"too_big":{const u=a.inclusive?"<=":"<",s=r(a.origin),c=i(a.origin);return s?`For stor: forventede ${c??"value"} ${s.verb} ${u} ${a.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${u} ${a.maximum.toString()}`}case"too_small":{const u=a.inclusive?">=":">",s=r(a.origin),c=i(a.origin);return s?`For lille: forventede ${c} ${s.verb} ${u} ${a.minimum.toString()} ${s.unit}`:`For lille: forventede ${c} havde ${u} ${a.minimum.toString()}`}case"invalid_format":{const u=a;return u.format==="starts_with"?`Ugyldig streng: skal starte med "${u.prefix}"`:u.format==="ends_with"?`Ugyldig streng: skal ende med "${u.suffix}"`:u.format==="includes"?`Ugyldig streng: skal indeholde "${u.includes}"`:u.format==="regex"?`Ugyldig streng: skal matche mønsteret ${u.pattern}`:`Ugyldig ${o[u.format]??a.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${a.divisor}`;case"unrecognized_keys":return`${a.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${y(a.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${a.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${a.origin}`;default:return"Ugyldigt input"}}};function cf(){return{localeError:sf()}}const lf=()=>{const t={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"Zahl";case"object":{if(Array.isArray(n))return"Array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return n=>{switch(n.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${n.expected}, erhalten ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ungültige Eingabe: erwartet ${k(n.values[0])}`:`Ungültige Option: erwartet eine von ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ungültiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ungültiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ungültiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ungültiger String: muss dem Muster ${o.pattern} entsprechen`:`Ungültig: ${i[o.format]??n.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${y(n.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${n.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${n.origin}`;default:return"Ungültige Eingabe"}}};function df(){return{localeError:lf()}}const ff=t=>{const e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},mf=()=>{const t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function e(i){return t[i]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Invalid input: expected ${i.expected}, received ${ff(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${k(i.values[0])}`:`Invalid option: expected one of ${y(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=e(i.origin);return o?`Too big: expected ${i.origin??"value"} to have ${n}${i.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=e(i.origin);return o?`Too small: expected ${i.origin} to have ${n}${i.minimum.toString()} ${o.unit}`:`Too small: expected ${i.origin} to be ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${y(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function es(){return{localeError:mf()}}const gf=t=>{const e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"nombro";case"object":{if(Array.isArray(t))return"tabelo";if(t===null)return"senvalora";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},pf=()=>{const t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(i){return t[i]??null}const r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return i=>{switch(i.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${i.expected}, riceviĝis ${gf(i.input)}`;case"invalid_value":return i.values.length===1?`Nevalida enigo: atendiĝis ${k(i.values[0])}`:`Nevalida opcio: atendiĝis unu el ${y(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=e(i.origin);return o?`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${n}${i.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=e(i.origin);return o?`Tro malgranda: atendiĝis ke ${i.origin} havu ${n}${i.minimum.toString()} ${o.unit}`:`Tro malgranda: atendiĝis ke ${i.origin} estu ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} ŝlosilo${i.keys.length>1?"j":""}: ${y(i.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}};function hf(){return{localeError:pf()}}const vf=()=>{const t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},e={string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};function r(a){return t[a]??null}function i(a){return e[a]??a}const n=a=>{const u=typeof a;switch(u){case"number":return Number.isNaN(a)?"NaN":"number";case"object":return Array.isArray(a)?"array":a===null?"null":Object.getPrototypeOf(a)!==Object.prototype?a.constructor.name:"object"}return u},o={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return a=>{switch(a.code){case"invalid_type":return`Entrada inválida: se esperaba ${i(a.expected)}, recibido ${i(n(a.input))}`;case"invalid_value":return a.values.length===1?`Entrada inválida: se esperaba ${k(a.values[0])}`:`Opción inválida: se esperaba una de ${y(a.values,"|")}`;case"too_big":{const u=a.inclusive?"<=":"<",s=r(a.origin),c=i(a.origin);return s?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${u}${a.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${u}${a.maximum.toString()}`}case"too_small":{const u=a.inclusive?">=":">",s=r(a.origin),c=i(a.origin);return s?`Demasiado pequeño: se esperaba que ${c} tuviera ${u}${a.minimum.toString()} ${s.unit}`:`Demasiado pequeño: se esperaba que ${c} fuera ${u}${a.minimum.toString()}`}case"invalid_format":{const u=a;return u.format==="starts_with"?`Cadena inválida: debe comenzar con "${u.prefix}"`:u.format==="ends_with"?`Cadena inválida: debe terminar en "${u.suffix}"`:u.format==="includes"?`Cadena inválida: debe incluir "${u.includes}"`:u.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${u.pattern}`:`Inválido ${o[u.format]??a.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${a.divisor}`;case"unrecognized_keys":return`Llave${a.keys.length>1?"s":""} desconocida${a.keys.length>1?"s":""}: ${y(a.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i(a.origin)}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i(a.origin)}`;default:return"Entrada inválida"}}};function yf(){return{localeError:vf()}}const bf=()=>{const t={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"عدد";case"object":{if(Array.isArray(n))return"آرایه";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"};return n=>{switch(n.code){case"invalid_type":return`ورودی نامعتبر: میبایست ${n.expected} میبود، ${r(n.input)} دریافت شد`;case"invalid_value":return n.values.length===1?`ورودی نامعتبر: میبایست ${k(n.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${y(n.values,"|")} میبود`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} ${a.unit??"عنصر"} باشد`:`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} باشد`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} ${a.unit} باشد`:`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} باشد`}case"invalid_format":{const o=n;return o.format==="starts_with"?`رشته نامعتبر: باید با "${o.prefix}" شروع شود`:o.format==="ends_with"?`رشته نامعتبر: باید با "${o.suffix}" تمام شود`:o.format==="includes"?`رشته نامعتبر: باید شامل "${o.includes}" باشد`:o.format==="regex"?`رشته نامعتبر: باید با الگوی ${o.pattern} مطابقت داشته باشد`:`${i[o.format]??n.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${n.divisor} باشد`;case"unrecognized_keys":return`کلید${n.keys.length>1?"های":""} ناشناس: ${y(n.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${n.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${n.origin}`;default:return"ورودی نامعتبر"}}};function $f(){return{localeError:bf()}}const wf=()=>{const t={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return n=>{switch(n.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${n.expected}, oli ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Virheellinen syöte: täytyy olla ${k(n.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Liian suuri: ${a.subject} täytyy olla ${o}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon täytyy olla ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Liian pieni: ${a.subject} täytyy olla ${o}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon täytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen syöte: täytyy sisältää "${o.includes}"`:o.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${o.pattern}`:`Virheellinen ${i[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${y(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function _f(){return{localeError:wf()}}const If=()=>{const t={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"nombre";case"object":{if(Array.isArray(n))return"tableau";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return n=>{switch(n.code){case"invalid_type":return`Entrée invalide : ${n.expected} attendu, ${r(n.input)} reçu`;case"invalid_value":return n.values.length===1?`Entrée invalide : ${k(n.values[0])} attendu`:`Option invalide : une valeur parmi ${y(n.values,"|")} attendue`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Trop grand : ${n.origin??"valeur"} doit ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"élément(s)"}`:`Trop grand : ${n.origin??"valeur"} doit être ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Trop petit : ${n.origin} doit ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${n.origin} doit être ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${o.pattern}`:`${i[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${y(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function kf(){return{localeError:If()}}const Sf=()=>{const t={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return n=>{switch(n.code){case"invalid_type":return`Entrée invalide : attendu ${n.expected}, reçu ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrée invalide : attendu ${k(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"≤":"<",a=e(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"≥":">",a=e(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au motif ${o.pattern}`:`${i[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${y(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function Of(){return{localeError:Sf()}}const zf=()=>{const t={string:{unit:"אותיות",verb:"לכלול"},file:{unit:"בייטים",verb:"לכלול"},array:{unit:"פריטים",verb:"לכלול"},set:{unit:"פריטים",verb:"לכלול"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"קלט",email:"כתובת אימייל",url:"כתובת רשת",emoji:"אימוג'י",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"תאריך וזמן ISO",date:"תאריך ISO",time:"זמן ISO",duration:"משך זמן ISO",ipv4:"כתובת IPv4",ipv6:"כתובת IPv6",cidrv4:"טווח IPv4",cidrv6:"טווח IPv6",base64:"מחרוזת בבסיס 64",base64url:"מחרוזת בבסיס 64 לכתובות רשת",json_string:"מחרוזת JSON",e164:"מספר E.164",jwt:"JWT",template_literal:"קלט"};return n=>{switch(n.code){case"invalid_type":return`קלט לא תקין: צריך ${n.expected}, התקבל ${r(n.input)}`;case"invalid_value":return n.values.length===1?`קלט לא תקין: צריך ${k(n.values[0])}`:`קלט לא תקין: צריך אחת מהאפשרויות ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`גדול מדי: ${n.origin??"value"} צריך להיות ${o}${n.maximum.toString()} ${a.unit??"elements"}`:`גדול מדי: ${n.origin??"value"} צריך להיות ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`קטן מדי: ${n.origin} צריך להיות ${o}${n.minimum.toString()} ${a.unit}`:`קטן מדי: ${n.origin} צריך להיות ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`מחרוזת לא תקינה: חייבת להתחיל ב"${o.prefix}"`:o.format==="ends_with"?`מחרוזת לא תקינה: חייבת להסתיים ב "${o.suffix}"`:o.format==="includes"?`מחרוזת לא תקינה: חייבת לכלול "${o.includes}"`:o.format==="regex"?`מחרוזת לא תקינה: חייבת להתאים לתבנית ${o.pattern}`:`${i[o.format]??n.format} לא תקין`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${n.divisor}`;case"unrecognized_keys":return`מפתח${n.keys.length>1?"ות":""} לא מזוה${n.keys.length>1?"ים":"ה"}: ${y(n.keys,", ")}`;case"invalid_key":return`מפתח לא תקין ב${n.origin}`;case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n.origin}`;default:return"קלט לא תקין"}}};function xf(){return{localeError:zf()}}const Nf=()=>{const t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"szám";case"object":{if(Array.isArray(n))return"tömb";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"};return n=>{switch(n.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${n.expected}, a kapott érték ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Érvénytelen bemenet: a várt érték ${k(n.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Túl nagy: ${n.origin??"érték"} mérete túl nagy ${o}${n.maximum.toString()} ${a.unit??"elem"}`:`Túl nagy: a bemeneti érték ${n.origin??"érték"} túl nagy: ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Túl kicsi: a bemeneti érték ${n.origin} mérete túl kicsi ${o}${n.minimum.toString()} ${a.unit}`:`Túl kicsi: a bemeneti érték ${n.origin} túl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Érvénytelen string: "${o.prefix}" értékkel kell kezdődnie`:o.format==="ends_with"?`Érvénytelen string: "${o.suffix}" értékkel kell végződnie`:o.format==="includes"?`Érvénytelen string: "${o.includes}" értéket kell tartalmaznia`:o.format==="regex"?`Érvénytelen string: ${o.pattern} mintának kell megfelelnie`:`Érvénytelen ${i[o.format]??n.format}`}case"not_multiple_of":return`Érvénytelen szám: ${n.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${n.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${n.origin}`;default:return"Érvénytelen bemenet"}}};function jf(){return{localeError:Nf()}}const Tf=()=>{const t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input tidak valid: diharapkan ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${k(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${i[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function Uf(){return{localeError:Tf()}}const Df=t=>{const e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"númer";case"object":{if(Array.isArray(t))return"fylki";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},Ef=()=>{const t={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function e(i){return t[i]??null}const r={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"};return i=>{switch(i.code){case"invalid_type":return`Rangt gildi: Þú slóst inn ${Df(i.input)} þar sem á að vera ${i.expected}`;case"invalid_value":return i.values.length===1?`Rangt gildi: gert ráð fyrir ${k(i.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${y(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=e(i.origin);return o?`Of stórt: gert er ráð fyrir að ${i.origin??"gildi"} hafi ${n}${i.maximum.toString()} ${o.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${i.origin??"gildi"} sé ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=e(i.origin);return o?`Of lítið: gert er ráð fyrir að ${i.origin} hafi ${n}${i.minimum.toString()} ${o.unit}`:`Of lítið: gert er ráð fyrir að ${i.origin} sé ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Ógildur strengur: verður að byrja á "${n.prefix}"`:n.format==="ends_with"?`Ógildur strengur: verður að enda á "${n.suffix}"`:n.format==="includes"?`Ógildur strengur: verður að innihalda "${n.includes}"`:n.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${n.pattern}`:`Rangt ${r[n.format]??i.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${i.divisor}`;case"unrecognized_keys":return`Óþekkt ${i.keys.length>1?"ir lyklar":"ur lykill"}: ${y(i.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${i.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${i.origin}`;default:return"Rangt gildi"}}};function Af(){return{localeError:Ef()}}const Pf=()=>{const t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"numero";case"object":{if(Array.isArray(n))return"vettore";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input non valido: atteso ${n.expected}, ricevuto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input non valido: atteso ${k(n.values[0])}`:`Opzione non valida: atteso uno tra ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${i[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${y(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function Zf(){return{localeError:Pf()}}const Rf=()=>{const t={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"数値";case"object":{if(Array.isArray(n))return"配列";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"};return n=>{switch(n.code){case"invalid_type":return`無効な入力: ${n.expected}が期待されましたが、${r(n.input)}が入力されました`;case"invalid_value":return n.values.length===1?`無効な入力: ${k(n.values[0])}が期待されました`:`無効な選択: ${y(n.values,"、")}のいずれかである必要があります`;case"too_big":{const o=n.inclusive?"以下である":"より小さい",a=e(n.origin);return a?`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${a.unit??"要素"}${o}必要があります`:`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${o}必要があります`}case"too_small":{const o=n.inclusive?"以上である":"より大きい",a=e(n.origin);return a?`小さすぎる値: ${n.origin}は${n.minimum.toString()}${a.unit}${o}必要があります`:`小さすぎる値: ${n.origin}は${n.minimum.toString()}${o}必要があります`}case"invalid_format":{const o=n;return o.format==="starts_with"?`無効な文字列: "${o.prefix}"で始まる必要があります`:o.format==="ends_with"?`無効な文字列: "${o.suffix}"で終わる必要があります`:o.format==="includes"?`無効な文字列: "${o.includes}"を含む必要があります`:o.format==="regex"?`無効な文字列: パターン${o.pattern}に一致する必要があります`:`無効な${i[o.format]??n.format}`}case"not_multiple_of":return`無効な数値: ${n.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${n.keys.length>1?"群":""}: ${y(n.keys,"、")}`;case"invalid_key":return`${n.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${n.origin}内の無効な値`;default:return"無効な入力"}}};function Cf(){return{localeError:Rf()}}const Mf=t=>{const e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"რიცხვი";case"object":{if(Array.isArray(t))return"მასივი";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return{string:"სტრინგი",boolean:"ბულეანი",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"ფუნქცია"}[e]??e},Lf=()=>{const t={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function e(i){return t[i]??null}const r={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"};return i=>{switch(i.code){case"invalid_type":return`არასწორი შეყვანა: მოსალოდნელი ${i.expected}, მიღებული ${Mf(i.input)}`;case"invalid_value":return i.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${k(i.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${y(i.values,"|")}-დან`;case"too_big":{const n=i.inclusive?"<=":"<",o=e(i.origin);return o?`ზედმეტად დიდი: მოსალოდნელი ${i.origin??"მნიშვნელობა"} ${o.verb} ${n}${i.maximum.toString()} ${o.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${i.origin??"მნიშვნელობა"} იყოს ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=e(i.origin);return o?`ზედმეტად პატარა: მოსალოდნელი ${i.origin} ${o.verb} ${n}${i.minimum.toString()} ${o.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${i.origin} იყოს ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`არასწორი სტრინგი: უნდა იწყებოდეს "${n.prefix}"-ით`:n.format==="ends_with"?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${n.suffix}"-ით`:n.format==="includes"?`არასწორი სტრინგი: უნდა შეიცავდეს "${n.includes}"-ს`:n.format==="regex"?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${n.pattern}`:`არასწორი ${r[n.format]??i.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${i.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${i.keys.length>1?"ები":"ი"}: ${y(i.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${i.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${i.origin}-ში`;default:return"არასწორი შეყვანა"}}};function Wf(){return{localeError:Lf()}}const Bf=()=>{const t={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":{if(Array.isArray(n))return"អារេ (Array)";if(n===null)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"};return n=>{switch(n.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${n.expected} ប៉ុន្តែទទួលបាន ${r(n.input)}`;case"invalid_value":return n.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${k(n.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()} ${a.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()} ${a.unit}`:`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${o.prefix}"`:o.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${o.suffix}"`:o.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${o.includes}"`:o.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${o.pattern}`:`មិនត្រឹមត្រូវ៖ ${i[o.format]??n.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${n.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${y(n.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function ts(){return{localeError:Bf()}}function Ff(){return ts()}const Jf=()=>{const t={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"};return n=>{switch(n.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${n.expected}, 받은 타입은 ${r(n.input)}입니다`;case"invalid_value":return n.values.length===1?`잘못된 입력: 값은 ${k(n.values[0])} 이어야 합니다`:`잘못된 옵션: ${y(n.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const o=n.inclusive?"이하":"미만",a=o==="미만"?"이어야 합니다":"여야 합니다",u=e(n.origin),s=u?.unit??"요소";return u?`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()}${s} ${o}${a}`:`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()} ${o}${a}`}case"too_small":{const o=n.inclusive?"이상":"초과",a=o==="이상"?"이어야 합니다":"여야 합니다",u=e(n.origin),s=u?.unit??"요소";return u?`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()}${s} ${o}${a}`:`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()} ${o}${a}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`잘못된 문자열: "${o.prefix}"(으)로 시작해야 합니다`:o.format==="ends_with"?`잘못된 문자열: "${o.suffix}"(으)로 끝나야 합니다`:o.format==="includes"?`잘못된 문자열: "${o.includes}"을(를) 포함해야 합니다`:o.format==="regex"?`잘못된 문자열: 정규식 ${o.pattern} 패턴과 일치해야 합니다`:`잘못된 ${i[o.format]??n.format}`}case"not_multiple_of":return`잘못된 숫자: ${n.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${y(n.keys,", ")}`;case"invalid_key":return`잘못된 키: ${n.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${n.origin}`;default:return"잘못된 입력"}}};function Vf(){return{localeError:Jf()}}const Gf=t=>it(typeof t,t),it=(t,e=void 0)=>{switch(t){case"number":return Number.isNaN(e)?"NaN":"skaičius";case"bigint":return"sveikasis skaičius";case"string":return"eilutė";case"boolean":return"loginė reikšmė";case"undefined":case"void":return"neapibrėžta reikšmė";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return e===void 0?"nežinomas objektas":e===null?"nulinė reikšmė":Array.isArray(e)?"masyvas":Object.getPrototypeOf(e)!==Object.prototype&&e.constructor?e.constructor.name:"objektas";case"null":return"nulinė reikšmė"}return t},et=t=>t.charAt(0).toUpperCase()+t.slice(1);function ro(t){const e=Math.abs(t),r=e%10,i=e%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}const qf=()=>{const t={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function e(i,n,o,a){const u=t[i]??null;return u===null?u:{unit:u.unit[n],verb:u.verb[a][o?"inclusive":"notInclusive"]}}const r={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"};return i=>{switch(i.code){case"invalid_type":return`Gautas tipas ${Gf(i.input)}, o tikėtasi - ${it(i.expected)}`;case"invalid_value":return i.values.length===1?`Privalo būti ${k(i.values[0])}`:`Privalo būti vienas iš ${y(i.values,"|")} pasirinkimų`;case"too_big":{const n=it(i.origin),o=e(i.origin,ro(Number(i.maximum)),i.inclusive??!1,"smaller");if(o?.verb)return`${et(n??i.origin??"reikšmė")} ${o.verb} ${i.maximum.toString()} ${o.unit??"elementų"}`;const a=i.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${et(n??i.origin??"reikšmė")} turi būti ${a} ${i.maximum.toString()} ${o?.unit}`}case"too_small":{const n=it(i.origin),o=e(i.origin,ro(Number(i.minimum)),i.inclusive??!1,"bigger");if(o?.verb)return`${et(n??i.origin??"reikšmė")} ${o.verb} ${i.minimum.toString()} ${o.unit??"elementų"}`;const a=i.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${et(n??i.origin??"reikšmė")} turi būti ${a} ${i.minimum.toString()} ${o?.unit}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Eilutė privalo prasidėti "${n.prefix}"`:n.format==="ends_with"?`Eilutė privalo pasibaigti "${n.suffix}"`:n.format==="includes"?`Eilutė privalo įtraukti "${n.includes}"`:n.format==="regex"?`Eilutė privalo atitikti ${n.pattern}`:`Neteisingas ${r[n.format]??i.format}`}case"not_multiple_of":return`Skaičius privalo būti ${i.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${i.keys.length>1?"i":"as"} rakt${i.keys.length>1?"ai":"as"}: ${y(i.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{const n=it(i.origin);return`${et(n??i.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function Kf(){return{localeError:qf()}}const Yf=()=>{const t={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"број";case"object":{if(Array.isArray(n))return"низа";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"};return n=>{switch(n.code){case"invalid_type":return`Грешен внес: се очекува ${n.expected}, примено ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${k(n.values[0])}`:`Грешана опција: се очекува една ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Премногу голем: се очекува ${n.origin??"вредноста"} да има ${o}${n.maximum.toString()} ${a.unit??"елементи"}`:`Премногу голем: се очекува ${n.origin??"вредноста"} да биде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Премногу мал: се очекува ${n.origin} да има ${o}${n.minimum.toString()} ${a.unit}`:`Премногу мал: се очекува ${n.origin} да биде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неважечка низа: мора да започнува со "${o.prefix}"`:o.format==="ends_with"?`Неважечка низа: мора да завршува со "${o.suffix}"`:o.format==="includes"?`Неважечка низа: мора да вклучува "${o.includes}"`:o.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${o.pattern}`:`Invalid ${i[o.format]??n.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${y(n.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${n.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${n.origin}`;default:return"Грешен внес"}}};function Xf(){return{localeError:Yf()}}const Hf=()=>{const t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"nombor";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input tidak sah: dijangka ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${k(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${i[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${y(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function Qf(){return{localeError:Hf()}}const em=()=>{const t={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"getal";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return n=>{switch(n.code){case"invalid_type":return`Ongeldige invoer: verwacht ${n.expected}, ontving ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${k(n.values[0])}`:`Ongeldige optie: verwacht één van ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Te lang: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${a.unit??"elementen"} bevat`:`Te lang: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Te kort: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${a.unit} bevat`:`Te kort: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${i[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function tm(){return{localeError:em()}}const nm=()=>{const t={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"tall";case"object":{if(Array.isArray(n))return"liste";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Ugyldig input: forventet ${n.expected}, fikk ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${k(n.values[0])}`:`Ugyldig valg: forventet en av ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ugyldig streng: må starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: må ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: må inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: må matche mønsteret ${o.pattern}`:`Ugyldig ${i[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${y(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function rm(){return{localeError:nm()}}const im=()=>{const t={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"numara";case"object":{if(Array.isArray(n))return"saf";if(n===null)return"gayb";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"};return n=>{switch(n.code){case"invalid_type":return`Fâsit giren: umulan ${n.expected}, alınan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Fâsit giren: umulan ${k(n.values[0])}`:`Fâsit tercih: mûteberler ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${a.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmalıydı.`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} ${a.unit} sahip olmalıydı.`:`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} olmalıydı.`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Fâsit metin: "${o.prefix}" ile başlamalı.`:o.format==="ends_with"?`Fâsit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`Fâsit metin: "${o.includes}" ihtivâ etmeli.`:o.format==="regex"?`Fâsit metin: ${o.pattern} nakşına uymalı.`:`Fâsit ${i[o.format]??n.format}`}case"not_multiple_of":return`Fâsit sayı: ${n.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${n.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function om(){return{localeError:im()}}const am=()=>{const t={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"عدد";case"object":{if(Array.isArray(n))return"ارې";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"};return n=>{switch(n.code){case"invalid_type":return`ناسم ورودي: باید ${n.expected} وای, مګر ${r(n.input)} ترلاسه شو`;case"invalid_value":return n.values.length===1?`ناسم ورودي: باید ${k(n.values[0])} وای`:`ناسم انتخاب: باید یو له ${y(n.values,"|")} څخه وای`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} ${a.unit??"عنصرونه"} ولري`:`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} وي`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} ${a.unit} ولري`:`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} وي`}case"invalid_format":{const o=n;return o.format==="starts_with"?`ناسم متن: باید د "${o.prefix}" سره پیل شي`:o.format==="ends_with"?`ناسم متن: باید د "${o.suffix}" سره پای ته ورسيږي`:o.format==="includes"?`ناسم متن: باید "${o.includes}" ولري`:o.format==="regex"?`ناسم متن: باید د ${o.pattern} سره مطابقت ولري`:`${i[o.format]??n.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${n.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${n.keys.length>1?"کلیډونه":"کلیډ"}: ${y(n.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${n.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${n.origin} کې`;default:return"ناسمه ورودي"}}};function um(){return{localeError:am()}}const sm=()=>{const t={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"liczba";case"object":{if(Array.isArray(n))return"tablica";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"};return n=>{switch(n.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${n.expected}, otrzymano ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${k(n.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Za duża wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.maximum.toString()} ${a.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Za mała wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.minimum.toString()} ${a.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${o.prefix}"`:o.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${o.suffix}"`:o.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${o.includes}"`:o.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${o.pattern}`:`Nieprawidłow(y/a/e) ${i[o.format]??n.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${n.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${n.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function cm(){return{localeError:sm()}}const lm=()=>{const t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"número";case"object":{if(Array.isArray(n))return"array";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Tipo inválido: esperado ${n.expected}, recebido ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inválida: esperado ${k(n.values[0])}`:`Opção inválida: esperada uma das ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Texto inválido: deve começar com "${o.prefix}"`:o.format==="ends_with"?`Texto inválido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inválido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inválido: deve corresponder ao padrão ${o.pattern}`:`${i[o.format]??n.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Chave inválida em ${n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${n.origin}`;default:return"Campo inválido"}}};function dm(){return{localeError:lm()}}function io(t,e,r,i){const n=Math.abs(t),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?e:o>=2&&o<=4?r:i}const fm=()=>{const t={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"число";case"object":{if(Array.isArray(n))return"массив";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"};return n=>{switch(n.code){case"invalid_type":return`Неверный ввод: ожидалось ${n.expected}, получено ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Неверный ввод: ожидалось ${k(n.values[0])}`:`Неверный вариант: ожидалось одно из ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);if(a){const u=Number(n.maximum),s=io(u,a.unit.one,a.unit.few,a.unit.many);return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет иметь ${o}${n.maximum.toString()} ${s}`}return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);if(a){const u=Number(n.minimum),s=io(u,a.unit.one,a.unit.few,a.unit.many);return`Слишком маленькое значение: ожидалось, что ${n.origin} будет иметь ${o}${n.minimum.toString()} ${s}`}return`Слишком маленькое значение: ожидалось, что ${n.origin} будет ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неверная строка: должна начинаться с "${o.prefix}"`:o.format==="ends_with"?`Неверная строка: должна заканчиваться на "${o.suffix}"`:o.format==="includes"?`Неверная строка: должна содержать "${o.includes}"`:o.format==="regex"?`Неверная строка: должна соответствовать шаблону ${o.pattern}`:`Неверный ${i[o.format]??n.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспознанн${n.keys.length>1?"ые":"ый"} ключ${n.keys.length>1?"и":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${n.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${n.origin}`;default:return"Неверные входные данные"}}};function mm(){return{localeError:fm()}}const gm=()=>{const t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"število";case"object":{if(Array.isArray(n))return"tabela";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"};return n=>{switch(n.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${n.expected}, prejeto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neveljaven vnos: pričakovano ${k(n.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Premajhno: pričakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${a.unit}`:`Premajhno: pričakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neveljaven niz: mora se začeti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se končati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${i[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i ključi":" ključ"}: ${y(n.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function pm(){return{localeError:gm()}}const hm=()=>{const t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"antal";case"object":{if(Array.isArray(n))return"lista";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return n=>{switch(n.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${n.expected}, fick ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ogiltig inmatning: förväntat ${k(n.values[0])}`:`Ogiltigt val: förväntade en av ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`För stor(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()} ${a.unit??"element"}`:`För stor(t): förväntat ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()} ${a.unit}`:`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ogiltig sträng: måste börja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig sträng: måste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig sträng: måste innehålla "${o.includes}"`:o.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${o.pattern}"`:`Ogiltig(t) ${i[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${y(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${n.origin??"värdet"}`;default:return"Ogiltig input"}}};function vm(){return{localeError:hm()}}const ym=()=>{const t={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"எண் அல்லாதது":"எண்";case"object":{if(Array.isArray(n))return"அணி";if(n===null)return"வெறுமை";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${n.expected}, பெறப்பட்டது ${r(n.input)}`;case"invalid_value":return n.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${k(n.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${y(n.values,"|")} இல் ஒன்று`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ${a.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const o=n;return o.format==="starts_with"?`தவறான சரம்: "${o.prefix}" இல் தொடங்க வேண்டும்`:o.format==="ends_with"?`தவறான சரம்: "${o.suffix}" இல் முடிவடைய வேண்டும்`:o.format==="includes"?`தவறான சரம்: "${o.includes}" ஐ உள்ளடக்க வேண்டும்`:o.format==="regex"?`தவறான சரம்: ${o.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${i[o.format]??n.format}`}case"not_multiple_of":return`தவறான எண்: ${n.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${n.keys.length>1?"கள்":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${n.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function bm(){return{localeError:ym()}}const $m=()=>{const t={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":{if(Array.isArray(n))return"อาร์เรย์ (Array)";if(n===null)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"};return n=>{switch(n.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${n.expected} แต่ได้รับ ${r(n.input)}`;case"invalid_value":return n.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${k(n.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"ไม่เกิน":"น้อยกว่า",a=e(n.origin);return a?`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()} ${a.unit??"รายการ"}`:`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"อย่างน้อย":"มากกว่า",a=e(n.origin);return a?`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()} ${a.unit}`:`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${o.prefix}"`:o.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${o.suffix}"`:o.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${o.includes}" อยู่ในข้อความ`:o.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${o.pattern}`:`รูปแบบไม่ถูกต้อง: ${i[o.format]??n.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${n.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${y(n.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${n.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${n.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function wm(){return{localeError:$m()}}const _m=t=>{const e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},Im=()=>{const t={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function e(i){return t[i]??null}const r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"};return i=>{switch(i.code){case"invalid_type":return`Geçersiz değer: beklenen ${i.expected}, alınan ${_m(i.input)}`;case"invalid_value":return i.values.length===1?`Geçersiz değer: beklenen ${k(i.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${y(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=e(i.origin);return o?`Çok büyük: beklenen ${i.origin??"değer"} ${n}${i.maximum.toString()} ${o.unit??"öğe"}`:`Çok büyük: beklenen ${i.origin??"değer"} ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=e(i.origin);return o?`Çok küçük: beklenen ${i.origin} ${n}${i.minimum.toString()} ${o.unit}`:`Çok küçük: beklenen ${i.origin} ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Geçersiz metin: "${n.prefix}" ile başlamalı`:n.format==="ends_with"?`Geçersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Geçersiz metin: "${n.includes}" içermeli`:n.format==="regex"?`Geçersiz metin: ${n.pattern} desenine uymalı`:`Geçersiz ${r[n.format]??i.format}`}case"not_multiple_of":return`Geçersiz sayı: ${i.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${i.keys.length>1?"lar":""}: ${y(i.keys,", ")}`;case"invalid_key":return`${i.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${i.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function km(){return{localeError:Im()}}const Sm=()=>{const t={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"число";case"object":{if(Array.isArray(n))return"масив";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"};return n=>{switch(n.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${n.expected}, отримано ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Неправильні вхідні дані: очікується ${k(n.values[0])}`:`Неправильна опція: очікується одне з ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Занадто велике: очікується, що ${n.origin??"значення"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"елементів"}`:`Занадто велике: очікується, що ${n.origin??"значення"} буде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Занадто мале: очікується, що ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Занадто мале: очікується, що ${n.origin} буде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неправильний рядок: повинен починатися з "${o.prefix}"`:o.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${o.suffix}"`:o.format==="includes"?`Неправильний рядок: повинен містити "${o.includes}"`:o.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${o.pattern}`:`Неправильний ${i[o.format]??n.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${n.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${n.keys.length>1?"і":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${n.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${n.origin}`;default:return"Неправильні вхідні дані"}}};function ns(){return{localeError:Sm()}}function Om(){return ns()}const zm=()=>{const t={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"نمبر";case"object":{if(Array.isArray(n))return"آرے";if(n===null)return"نل";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"};return n=>{switch(n.code){case"invalid_type":return`غلط ان پٹ: ${n.expected} متوقع تھا، ${r(n.input)} موصول ہوا`;case"invalid_value":return n.values.length===1?`غلط ان پٹ: ${k(n.values[0])} متوقع تھا`:`غلط آپشن: ${y(n.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`بہت بڑا: ${n.origin??"ویلیو"} کے ${o}${n.maximum.toString()} ${a.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${n.origin??"ویلیو"} کا ${o}${n.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`بہت چھوٹا: ${n.origin} کے ${o}${n.minimum.toString()} ${a.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${n.origin} کا ${o}${n.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const o=n;return o.format==="starts_with"?`غلط سٹرنگ: "${o.prefix}" سے شروع ہونا چاہیے`:o.format==="ends_with"?`غلط سٹرنگ: "${o.suffix}" پر ختم ہونا چاہیے`:o.format==="includes"?`غلط سٹرنگ: "${o.includes}" شامل ہونا چاہیے`:o.format==="regex"?`غلط سٹرنگ: پیٹرن ${o.pattern} سے میچ ہونا چاہیے`:`غلط ${i[o.format]??n.format}`}case"not_multiple_of":return`غلط نمبر: ${n.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${n.keys.length>1?"ز":""}: ${y(n.keys,"، ")}`;case"invalid_key":return`${n.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${n.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function xm(){return{localeError:zm()}}const Nm=()=>{const t={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"số";case"object":{if(Array.isArray(n))return"mảng";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"};return n=>{switch(n.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${n.expected}, nhận được ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Đầu vào không hợp lệ: mong đợi ${k(n.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Quá lớn: mong đợi ${n.origin??"giá trị"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"phần tử"}`:`Quá lớn: mong đợi ${n.origin??"giá trị"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Quá nhỏ: mong đợi ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Quá nhỏ: mong đợi ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${o.prefix}"`:o.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${o.suffix}"`:o.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${o.includes}"`:o.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${o.pattern}`:`${i[o.format]??n.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${n.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${y(n.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${n.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${n.origin}`;default:return"Đầu vào không hợp lệ"}}};function jm(){return{localeError:Nm()}}const Tm=()=>{const t={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"非数字(NaN)":"数字";case"object":{if(Array.isArray(n))return"数组";if(n===null)return"空值(null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"};return n=>{switch(n.code){case"invalid_type":return`无效输入:期望 ${n.expected},实际接收 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`无效输入:期望 ${k(n.values[0])}`:`无效选项:期望以下之一 ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()} ${a.unit??"个元素"}`:`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`无效字符串:必须以 "${o.prefix}" 开头`:o.format==="ends_with"?`无效字符串:必须以 "${o.suffix}" 结尾`:o.format==="includes"?`无效字符串:必须包含 "${o.includes}"`:o.format==="regex"?`无效字符串:必须满足正则表达式 ${o.pattern}`:`无效${i[o.format]??n.format}`}case"not_multiple_of":return`无效数字:必须是 ${n.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${n.origin} 中包含无效值(value)`;default:return"无效输入"}}};function Um(){return{localeError:Tm()}}const Dm=()=>{const t={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"};return n=>{switch(n.code){case"invalid_type":return`無效的輸入值:預期為 ${n.expected},但收到 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`無效的輸入值:預期為 ${k(n.values[0])}`:`無效的選項:預期為以下其中之一 ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()} ${a.unit??"個元素"}`:`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()} ${a.unit}`:`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`無效的字串:必須以 "${o.prefix}" 開頭`:o.format==="ends_with"?`無效的字串:必須以 "${o.suffix}" 結尾`:o.format==="includes"?`無效的字串:必須包含 "${o.includes}"`:o.format==="regex"?`無效的字串:必須符合格式 ${o.pattern}`:`無效的 ${i[o.format]??n.format}`}case"not_multiple_of":return`無效的數字:必須為 ${n.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${n.keys.length>1?"們":""}:${y(n.keys,"、")}`;case"invalid_key":return`${n.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${n.origin} 中有無效的值`;default:return"無效的輸入值"}}};function Em(){return{localeError:Dm()}}const Am=()=>{const t={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"nọ́mbà";case"object":{if(Array.isArray(n))return"akopọ";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"};return n=>{switch(n.code){case"invalid_type":return`Ìbáwọlé aṣìṣe: a ní láti fi ${n.expected}, àmọ̀ a rí ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${k(n.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Tó pọ̀ jù: a ní láti jẹ́ pé ${n.origin??"iye"} ${a.verb} ${o}${n.maximum} ${a.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${o}${n.maximum}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Kéré ju: a ní láti jẹ́ pé ${n.origin} ${a.verb} ${o}${n.minimum} ${a.unit}`:`Kéré ju: a ní láti jẹ́ ${o}${n.minimum}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${o.prefix}"`:o.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${o.suffix}"`:o.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${o.includes}"`:o.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${o.pattern}`:`Aṣìṣe: ${i[o.format]??n.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${n.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${y(n.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${n.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${n.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function Pm(){return{localeError:Am()}}const rs=Object.freeze(Object.defineProperty({__proto__:null,ar:Kd,az:Xd,be:Qd,bg:nf,ca:of,cs:uf,da:cf,de:df,en:es,eo:hf,es:yf,fa:$f,fi:_f,fr:kf,frCA:Of,he:xf,hu:jf,id:Uf,is:Af,it:Zf,ja:Cf,ka:Wf,kh:Ff,km:ts,ko:Vf,lt:Kf,mk:Xf,ms:Qf,nl:tm,no:rm,ota:om,pl:cm,ps:um,pt:dm,ru:mm,sl:pm,sv:vm,ta:bm,th:wm,tr:km,ua:Om,uk:ns,ur:xm,vi:jm,yo:Pm,zhCN:Um,zhTW:Em},Symbol.toStringTag,{value:"Module"})),is=Symbol("ZodOutput"),os=Symbol("ZodInput");class vr{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){const i=r[0];if(this._map.set(e,i),i&&typeof i=="object"&&"id"in i){if(this._idmap.has(i.id))throw new Error(`ID ${i.id} already exists in the registry`);this._idmap.set(i.id,e)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){const r=e._zod.parent;if(r){const i={...this.get(r)??{}};delete i.id;const n={...i,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function yr(){return new vr}const Te=yr();function as(t,e){return new t({type:"string",...p(e)})}function us(t,e){return new t({type:"string",coerce:!0,...p(e)})}function br(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...p(e)})}function Bt(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...p(e)})}function $r(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...p(e)})}function wr(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...p(e)})}function _r(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...p(e)})}function Ir(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...p(e)})}function tn(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...p(e)})}function kr(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...p(e)})}function Sr(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...p(e)})}function Or(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...p(e)})}function zr(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...p(e)})}function xr(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...p(e)})}function Nr(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...p(e)})}function jr(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...p(e)})}function Tr(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...p(e)})}function Ur(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...p(e)})}function Dr(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...p(e)})}function Er(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...p(e)})}function Ar(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...p(e)})}function Pr(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...p(e)})}function Zr(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...p(e)})}function Rr(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...p(e)})}const ss={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function cs(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...p(e)})}function ls(t,e){return new t({type:"string",format:"date",check:"string_format",...p(e)})}function ds(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...p(e)})}function fs(t,e){return new t({type:"string",format:"duration",check:"string_format",...p(e)})}function ms(t,e){return new t({type:"number",checks:[],...p(e)})}function gs(t,e){return new t({type:"number",coerce:!0,checks:[],...p(e)})}function ps(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...p(e)})}function hs(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...p(e)})}function vs(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...p(e)})}function ys(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...p(e)})}function bs(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...p(e)})}function $s(t,e){return new t({type:"boolean",...p(e)})}function ws(t,e){return new t({type:"boolean",coerce:!0,...p(e)})}function _s(t,e){return new t({type:"bigint",...p(e)})}function Is(t,e){return new t({type:"bigint",coerce:!0,...p(e)})}function ks(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...p(e)})}function Ss(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...p(e)})}function Os(t,e){return new t({type:"symbol",...p(e)})}function zs(t,e){return new t({type:"undefined",...p(e)})}function xs(t,e){return new t({type:"null",...p(e)})}function Ns(t){return new t({type:"any"})}function js(t){return new t({type:"unknown"})}function Ts(t,e){return new t({type:"never",...p(e)})}function Us(t,e){return new t({type:"void",...p(e)})}function Ds(t,e){return new t({type:"date",...p(e)})}function Es(t,e){return new t({type:"date",coerce:!0,...p(e)})}function As(t,e){return new t({type:"nan",...p(e)})}function Re(t,e){return new sr({check:"less_than",...p(e),value:t,inclusive:!1})}function ae(t,e){return new sr({check:"less_than",...p(e),value:t,inclusive:!0})}function Ce(t,e){return new cr({check:"greater_than",...p(e),value:t,inclusive:!1})}function Q(t,e){return new cr({check:"greater_than",...p(e),value:t,inclusive:!0})}function Ps(t){return Ce(0,t)}function Zs(t){return Re(0,t)}function Rs(t){return ae(0,t)}function Cs(t){return Q(0,t)}function dt(t,e){return new Ia({check:"multiple_of",...p(e),value:t})}function nn(t,e){return new Oa({check:"max_size",...p(e),maximum:t})}function ft(t,e){return new za({check:"min_size",...p(e),minimum:t})}function Cr(t,e){return new xa({check:"size_equals",...p(e),size:t})}function rn(t,e){return new Na({check:"max_length",...p(e),maximum:t})}function Ke(t,e){return new ja({check:"min_length",...p(e),minimum:t})}function on(t,e){return new Ta({check:"length_equals",...p(e),length:t})}function Mr(t,e){return new Ua({check:"string_format",format:"regex",...p(e),pattern:t})}function Lr(t){return new Da({check:"string_format",format:"lowercase",...p(t)})}function Wr(t){return new Ea({check:"string_format",format:"uppercase",...p(t)})}function Br(t,e){return new Aa({check:"string_format",format:"includes",...p(e),includes:t})}function Fr(t,e){return new Pa({check:"string_format",format:"starts_with",...p(e),prefix:t})}function Jr(t,e){return new Za({check:"string_format",format:"ends_with",...p(e),suffix:t})}function Ms(t,e,r){return new Ra({check:"property",property:t,schema:e,...p(r)})}function Vr(t,e){return new Ca({check:"mime_type",mime:t,...p(e)})}function We(t){return new Ma({check:"overwrite",tx:t})}function Gr(t){return We(e=>e.normalize(t))}function qr(){return We(t=>t.trim())}function Kr(){return We(t=>t.toLowerCase())}function Yr(){return We(t=>t.toUpperCase())}function Ls(t,e,r){return new t({type:"array",element:e,...p(r)})}function Zm(t,e,r){return new t({type:"union",options:e,...p(r)})}function Rm(t,e,r,i){return new t({type:"union",options:r,discriminator:e,...p(i)})}function Cm(t,e,r){return new t({type:"intersection",left:e,right:r})}function Mm(t,e,r,i){const n=r instanceof S,o=n?i:r,a=n?r:null;return new t({type:"tuple",items:e,rest:a,...p(o)})}function Lm(t,e,r,i){return new t({type:"record",keyType:e,valueType:r,...p(i)})}function Wm(t,e,r,i){return new t({type:"map",keyType:e,valueType:r,...p(i)})}function Bm(t,e,r){return new t({type:"set",valueType:e,...p(r)})}function Fm(t,e,r){const i=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new t({type:"enum",entries:i,...p(r)})}function Jm(t,e,r){return new t({type:"enum",entries:e,...p(r)})}function Vm(t,e,r){return new t({type:"literal",values:Array.isArray(e)?e:[e],...p(r)})}function Ws(t,e){return new t({type:"file",...p(e)})}function Gm(t,e){return new t({type:"transform",transform:e})}function qm(t,e){return new t({type:"optional",innerType:e})}function Km(t,e){return new t({type:"nullable",innerType:e})}function Ym(t,e,r){return new t({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():Ht(r)}})}function Xm(t,e,r){return new t({type:"nonoptional",innerType:e,...p(r)})}function Hm(t,e){return new t({type:"success",innerType:e})}function Qm(t,e,r){return new t({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}function eg(t,e,r){return new t({type:"pipe",in:e,out:r})}function tg(t,e){return new t({type:"readonly",innerType:e})}function ng(t,e,r){return new t({type:"template_literal",parts:e,...p(r)})}function rg(t,e){return new t({type:"lazy",getter:e})}function ig(t,e){return new t({type:"promise",innerType:e})}function Bs(t,e,r){const i=p(r);return i.abort??(i.abort=!0),new t({type:"custom",check:"custom",fn:e,...i})}function Fs(t,e,r){return new t({type:"custom",check:"custom",fn:e,...p(r)})}function Js(t){const e=Vs(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(Ge(i,r.value,e._zod.def));else{const n=i;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=e),n.continue??(n.continue=!e._zod.def.abort),r.issues.push(Ge(n))}},t(r.value,r)));return e}function Vs(t,e){const r=new B({check:"custom",...p(e)});return r._zod.check=t,r}function Gs(t,e){const r=p(e);let i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(b=>typeof b=="string"?b.toLowerCase():b),n=n.map(b=>typeof b=="string"?b.toLowerCase():b));const o=new Set(i),a=new Set(n),u=t.Codec??hr,s=t.Boolean??fr,c=t.String??kt,d=new c({type:"string",error:r.error}),m=new s({type:"boolean",error:r.error}),h=new u({type:"pipe",in:d,out:m,transform:((b,f)=>{let w=b;return r.case!=="sensitive"&&(w=w.toLowerCase()),o.has(w)?!0:a.has(w)?!1:(f.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:f.value,inst:h,continue:!1}),{})}),reverseTransform:((b,f)=>b===!0?i[0]||"true":n[0]||"false"),error:r.error});return h}function St(t,e,r,i={}){const n=p(i),o={...p(i),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:u=>r.test(u),...n};return r instanceof RegExp&&(o.pattern=r),new t(o)}class Tn{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??Te,this.target=e?.target??"draft-2020-12",this.unrepresentable=e?.unrepresentable??"throw",this.override=e?.override??(()=>{}),this.io=e?.io??"output",this.seen=new Map}process(e,r={path:[],schemaPath:[]}){var i;const n=e._zod.def,o={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},a=this.seen.get(e);if(a)return a.count++,r.schemaPath.includes(e)&&(a.cycle=r.path),a.schema;const u={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(e,u);const s=e._zod.toJSONSchema?.();if(s)u.schema=s;else{const m={...r,schemaPath:[...r.schemaPath,e],path:r.path},h=e._zod.parent;if(h)u.ref=h,this.process(h,m),this.seen.get(h).isParent=!0;else{const b=u.schema;switch(n.type){case"string":{const f=b;f.type="string";const{minimum:w,maximum:$,format:I,patterns:x,contentEncoding:D}=e._zod.bag;if(typeof w=="number"&&(f.minLength=w),typeof $=="number"&&(f.maxLength=$),I&&(f.format=o[I]??I,f.format===""&&delete f.format),D&&(f.contentEncoding=D),x&&x.size>0){const R=[...x];R.length===1?f.pattern=R[0].source:R.length>1&&(u.schema.allOf=[...R.map(pe=>({...this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{},pattern:pe.source}))])}break}case"number":{const f=b,{minimum:w,maximum:$,format:I,multipleOf:x,exclusiveMaximum:D,exclusiveMinimum:R}=e._zod.bag;typeof I=="string"&&I.includes("int")?f.type="integer":f.type="number",typeof R=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(f.minimum=R,f.exclusiveMinimum=!0):f.exclusiveMinimum=R),typeof w=="number"&&(f.minimum=w,typeof R=="number"&&this.target!=="draft-4"&&(R>=w?delete f.minimum:delete f.exclusiveMinimum)),typeof D=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(f.maximum=D,f.exclusiveMaximum=!0):f.exclusiveMaximum=D),typeof $=="number"&&(f.maximum=$,typeof D=="number"&&this.target!=="draft-4"&&(D<=$?delete f.maximum:delete f.exclusiveMaximum)),typeof x=="number"&&(f.multipleOf=x);break}case"boolean":{const f=b;f.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{this.target==="openapi-3.0"?(b.type="string",b.nullable=!0,b.enum=[null]):b.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{b.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const f=b,{minimum:w,maximum:$}=e._zod.bag;typeof w=="number"&&(f.minItems=w),typeof $=="number"&&(f.maxItems=$),f.type="array",f.items=this.process(n.element,{...m,path:[...m.path,"items"]});break}case"object":{const f=b;f.type="object",f.properties={};const w=n.shape;for(const x in w)f.properties[x]=this.process(w[x],{...m,path:[...m.path,"properties",x]});const $=new Set(Object.keys(w)),I=new Set([...$].filter(x=>{const D=n.shape[x]._zod;return this.io==="input"?D.optin===void 0:D.optout===void 0}));I.size>0&&(f.required=Array.from(I)),n.catchall?._zod.def.type==="never"?f.additionalProperties=!1:n.catchall?n.catchall&&(f.additionalProperties=this.process(n.catchall,{...m,path:[...m.path,"additionalProperties"]})):this.io==="output"&&(f.additionalProperties=!1);break}case"union":{const f=b,w=n.options.map(($,I)=>this.process($,{...m,path:[...m.path,"anyOf",I]}));f.anyOf=w;break}case"intersection":{const f=b,w=this.process(n.left,{...m,path:[...m.path,"allOf",0]}),$=this.process(n.right,{...m,path:[...m.path,"allOf",1]}),I=D=>"allOf"in D&&Object.keys(D).length===1,x=[...I(w)?w.allOf:[w],...I($)?$.allOf:[$]];f.allOf=x;break}case"tuple":{const f=b;f.type="array";const w=this.target==="draft-2020-12"?"prefixItems":"items",$=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",I=n.items.map((pe,Kl)=>this.process(pe,{...m,path:[...m.path,w,Kl]})),x=n.rest?this.process(n.rest,{...m,path:[...m.path,$,...this.target==="openapi-3.0"?[n.items.length]:[]]}):null;this.target==="draft-2020-12"?(f.prefixItems=I,x&&(f.items=x)):this.target==="openapi-3.0"?(f.items={anyOf:I},x&&f.items.anyOf.push(x),f.minItems=I.length,x||(f.maxItems=I.length)):(f.items=I,x&&(f.additionalItems=x));const{minimum:D,maximum:R}=e._zod.bag;typeof D=="number"&&(f.minItems=D),typeof R=="number"&&(f.maxItems=R);break}case"record":{const f=b;f.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(f.propertyNames=this.process(n.keyType,{...m,path:[...m.path,"propertyNames"]})),f.additionalProperties=this.process(n.valueType,{...m,path:[...m.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{const f=b,w=Vn(n.entries);w.every($=>typeof $=="number")&&(f.type="number"),w.every($=>typeof $=="string")&&(f.type="string"),f.enum=w;break}case"literal":{const f=b,w=[];for(const $ of n.values)if($===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof $=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");w.push(Number($))}else w.push($);if(w.length!==0)if(w.length===1){const $=w[0];f.type=$===null?"null":typeof $,this.target==="draft-4"||this.target==="openapi-3.0"?f.enum=[$]:f.const=$}else w.every($=>typeof $=="number")&&(f.type="number"),w.every($=>typeof $=="string")&&(f.type="string"),w.every($=>typeof $=="boolean")&&(f.type="string"),w.every($=>$===null)&&(f.type="null"),f.enum=w;break}case"file":{const f=b,w={type:"string",format:"binary",contentEncoding:"binary"},{minimum:$,maximum:I,mime:x}=e._zod.bag;$!==void 0&&(w.minLength=$),I!==void 0&&(w.maxLength=I),x?x.length===1?(w.contentMediaType=x[0],Object.assign(f,w)):f.anyOf=x.map(D=>({...w,contentMediaType:D})):Object.assign(f,w);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const f=this.process(n.innerType,m);this.target==="openapi-3.0"?(u.ref=n.innerType,b.nullable=!0):b.anyOf=[f,{type:"null"}];break}case"nonoptional":{this.process(n.innerType,m),u.ref=n.innerType;break}case"success":{const f=b;f.type="boolean";break}case"default":{this.process(n.innerType,m),u.ref=n.innerType,b.default=JSON.parse(JSON.stringify(n.defaultValue));break}case"prefault":{this.process(n.innerType,m),u.ref=n.innerType,this.io==="input"&&(b._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break}case"catch":{this.process(n.innerType,m),u.ref=n.innerType;let f;try{f=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}b.default=f;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const f=b,w=e._zod.pattern;if(!w)throw new Error("Pattern not found in template literal");f.type="string",f.pattern=w.source;break}case"pipe":{const f=this.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;this.process(f,m),u.ref=f;break}case"readonly":{this.process(n.innerType,m),u.ref=n.innerType,b.readOnly=!0;break}case"promise":{this.process(n.innerType,m),u.ref=n.innerType;break}case"optional":{this.process(n.innerType,m),u.ref=n.innerType;break}case"lazy":{const f=e._zod.innerType;this.process(f,m),u.ref=f;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case"function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}}}}const c=this.metadataRegistry.get(e);return c&&Object.assign(u.schema,c),this.io==="input"&&V(e)&&(delete u.schema.examples,delete u.schema.default),this.io==="input"&&u.schema._prefault&&((i=u.schema).default??(i.default=u.schema._prefault)),delete u.schema._prefault,this.seen.get(e).schema}emit(e,r){const i={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},n=this.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=d=>{const m=this.target==="draft-2020-12"?"$defs":"definitions";if(i.external){const w=i.external.registry.get(d[0])?.id,$=i.external.uri??(x=>x);if(w)return{ref:$(w)};const I=d[1].defId??d[1].schema.id??`schema${this.counter++}`;return d[1].defId=I,{defId:I,ref:`${$("__shared")}#/${m}/${I}`}}if(d[1]===n)return{ref:"#"};const b=`#/${m}/`,f=d[1].schema.id??`__schema${this.counter++}`;return{defId:f,ref:b+f}},a=d=>{if(d[1].schema.$ref)return;const m=d[1],{ref:h,defId:b}=o(d);m.def={...m.schema},b&&(m.defId=b);const f=m.schema;for(const w in f)delete f[w];f.$ref=h};if(i.cycles==="throw")for(const d of this.seen.entries()){const m=d[1];if(m.cycle)throw new Error(`Cycle detected: #/${m.cycle?.join("/")}/<root>
|
|
22
|
+
|
|
23
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of this.seen.entries()){const m=d[1];if(e===d[0]){a(d);continue}if(i.external){const b=i.external.registry.get(d[0])?.id;if(e!==d[0]&&b){a(d);continue}}if(this.metadataRegistry.get(d[0])?.id){a(d);continue}if(m.cycle){a(d);continue}if(m.count>1&&i.reused==="ref"){a(d);continue}}const u=(d,m)=>{const h=this.seen.get(d),b=h.def??h.schema,f={...b};if(h.ref===null)return;const w=h.ref;if(h.ref=null,w){u(w,m);const $=this.seen.get(w).schema;$.$ref&&(m.target==="draft-7"||m.target==="draft-4"||m.target==="openapi-3.0")?(b.allOf=b.allOf??[],b.allOf.push($)):(Object.assign(b,$),Object.assign(b,f))}h.isParent||this.override({zodSchema:d,jsonSchema:b,path:h.path??[]})};for(const d of[...this.seen.entries()].reverse())u(d[0],{target:this.target});const s={};if(this.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?s.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?s.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),i.external?.uri){const d=i.external.registry.get(e)?.id;if(!d)throw new Error("Schema is missing an `id` property");s.$id=i.external.uri(d)}Object.assign(s,n.def);const c=i.external?.defs??{};for(const d of this.seen.entries()){const m=d[1];m.def&&m.defId&&(c[m.defId]=m.def)}i.external||Object.keys(c).length>0&&(this.target==="draft-2020-12"?s.$defs=c:s.definitions=c);try{return JSON.parse(JSON.stringify(s))}catch{throw new Error("Error converting schema to JSON.")}}}function qs(t,e){if(t instanceof vr){const i=new Tn(e),n={};for(const u of t._idmap.entries()){const[s,c]=u;i.process(c)}const o={},a={registry:t,uri:e?.uri,defs:n};for(const u of t._idmap.entries()){const[s,c]=u;o[s]=i.emit(c,{...e,external:a})}if(Object.keys(n).length>0){const u=i.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[u]:n}}return{schemas:o}}const r=new Tn(e);return r.process(t),r.emit(t,e)}function V(t,e){const r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);const n=t._zod.def;switch(n.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return V(n.element,r);case"object":{for(const o in n.shape)if(V(n.shape[o],r))return!0;return!1}case"union":{for(const o of n.options)if(V(o,r))return!0;return!1}case"intersection":return V(n.left,r)||V(n.right,r);case"tuple":{for(const o of n.items)if(V(o,r))return!0;return!!(n.rest&&V(n.rest,r))}case"record":return V(n.keyType,r)||V(n.valueType,r);case"map":return V(n.keyType,r)||V(n.valueType,r);case"set":return V(n.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return V(n.innerType,r);case"lazy":return V(n.getter(),r);case"default":return V(n.innerType,r);case"prefault":return V(n.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return V(n.in,r)||V(n.out,r);case"success":return!1;case"catch":return!1;case"function":return!1}throw new Error(`Unknown schema type: ${n.type}`)}const og=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),ag=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:$u,$ZodArray:Su,$ZodAsyncError:De,$ZodBase64:su,$ZodBase64URL:lu,$ZodBigInt:mr,$ZodBigIntFormat:hu,$ZodBoolean:fr,$ZodCIDRv4:au,$ZodCIDRv6:uu,$ZodCUID:Ka,$ZodCUID2:Ya,$ZodCatch:Ju,$ZodCheck:B,$ZodCheckBigIntFormat:Sa,$ZodCheckEndsWith:Za,$ZodCheckGreaterThan:cr,$ZodCheckIncludes:Aa,$ZodCheckLengthEquals:Ta,$ZodCheckLessThan:sr,$ZodCheckLowerCase:Da,$ZodCheckMaxLength:Na,$ZodCheckMaxSize:Oa,$ZodCheckMimeType:Ca,$ZodCheckMinLength:ja,$ZodCheckMinSize:za,$ZodCheckMultipleOf:Ia,$ZodCheckNumberFormat:ka,$ZodCheckOverwrite:Ma,$ZodCheckProperty:Ra,$ZodCheckRegex:Ua,$ZodCheckSizeEquals:xa,$ZodCheckStartsWith:Pa,$ZodCheckStringFormat:It,$ZodCheckUpperCase:Ea,$ZodCodec:hr,$ZodCustom:Qu,$ZodCustomStringFormat:gu,$ZodDate:ku,$ZodDefault:Lu,$ZodDiscriminatedUnion:ju,$ZodE164:du,$ZodEmail:Ja,$ZodEmoji:Ga,$ZodEncodeError:Yt,$ZodEnum:Au,$ZodError:qn,$ZodFile:Zu,$ZodFunction:Yu,$ZodGUID:Ba,$ZodIPv4:iu,$ZodIPv6:ou,$ZodISODate:tu,$ZodISODateTime:eu,$ZodISODuration:ru,$ZodISOTime:nu,$ZodIntersection:Tu,$ZodJWT:mu,$ZodKSUID:Qa,$ZodLazy:Hu,$ZodLiteral:Pu,$ZodMap:Du,$ZodNaN:Vu,$ZodNanoID:qa,$ZodNever:_u,$ZodNonOptional:Bu,$ZodNull:bu,$ZodNullable:Mu,$ZodNumber:dr,$ZodNumberFormat:pu,$ZodObject:xu,$ZodObjectJIT:Nu,$ZodOptional:Cu,$ZodPipe:Gu,$ZodPrefault:Wu,$ZodPromise:Xu,$ZodReadonly:qu,$ZodRealError:ee,$ZodRecord:Uu,$ZodRegistry:vr,$ZodSet:Eu,$ZodString:kt,$ZodStringFormat:Z,$ZodSuccess:Fu,$ZodSymbol:vu,$ZodTemplateLiteral:Ku,$ZodTransform:Ru,$ZodTuple:pr,$ZodType:S,$ZodULID:Xa,$ZodURL:Va,$ZodUUID:Fa,$ZodUndefined:yu,$ZodUnion:gr,$ZodUnknown:wu,$ZodVoid:Iu,$ZodXID:Ha,$brand:$o,$constructor:l,$input:os,$output:is,Doc:La,JSONSchema:og,JSONSchemaGenerator:Tn,NEVER:bo,TimePrecision:ss,_any:Ns,_array:Ls,_base64:Ar,_base64url:Pr,_bigint:_s,_boolean:$s,_catch:Qm,_check:Vs,_cidrv4:Dr,_cidrv6:Er,_coercedBigint:Is,_coercedBoolean:ws,_coercedDate:Es,_coercedNumber:gs,_coercedString:us,_cuid:Or,_cuid2:zr,_custom:Bs,_date:Ds,_decode:Hn,_decodeAsync:er,_default:Ym,_discriminatedUnion:Rm,_e164:Zr,_email:br,_emoji:kr,_encode:Xn,_encodeAsync:Qn,_endsWith:Jr,_enum:Fm,_file:Ws,_float32:hs,_float64:vs,_gt:Ce,_gte:Q,_guid:Bt,_includes:Br,_int:ps,_int32:ys,_int64:ks,_intersection:Cm,_ipv4:Tr,_ipv6:Ur,_isoDate:ls,_isoDateTime:cs,_isoDuration:fs,_isoTime:ds,_jwt:Rr,_ksuid:jr,_lazy:rg,_length:on,_literal:Vm,_lowercase:Lr,_lt:Re,_lte:ae,_map:Wm,_max:ae,_maxLength:rn,_maxSize:nn,_mime:Vr,_min:Q,_minLength:Ke,_minSize:ft,_multipleOf:dt,_nan:As,_nanoid:Sr,_nativeEnum:Jm,_negative:Zs,_never:Ts,_nonnegative:Cs,_nonoptional:Xm,_nonpositive:Rs,_normalize:Gr,_null:xs,_nullable:Km,_number:ms,_optional:qm,_overwrite:We,_parse:vt,_parseAsync:yt,_pipe:eg,_positive:Ps,_promise:ig,_property:Ms,_readonly:tg,_record:Lm,_refine:Fs,_regex:Mr,_safeDecode:nr,_safeDecodeAsync:ir,_safeEncode:tr,_safeEncodeAsync:rr,_safeParse:bt,_safeParseAsync:$t,_set:Bm,_size:Cr,_startsWith:Fr,_string:as,_stringFormat:St,_stringbool:Gs,_success:Hm,_superRefine:Js,_symbol:Os,_templateLiteral:ng,_toLowerCase:Kr,_toUpperCase:Yr,_transform:Gm,_trim:qr,_tuple:Mm,_uint32:bs,_uint64:Ss,_ulid:xr,_undefined:zs,_union:Zm,_unknown:js,_uppercase:Wr,_url:tn,_uuid:$r,_uuidv4:wr,_uuidv6:_r,_uuidv7:Ir,_void:Us,_xid:Nr,clone:ie,config:H,decode:vd,decodeAsync:bd,encode:hd,encodeAsync:yd,flattenError:Kn,formatError:Yn,globalConfig:Ct,globalRegistry:Te,isValidBase64:lr,isValidBase64URL:cu,isValidJWT:fu,locales:rs,parse:xn,parseAsync:Nn,prettifyError:Mo,regexes:ur,registry:yr,safeDecode:wd,safeDecodeAsync:Id,safeEncode:$d,safeEncodeAsync:_d,safeParse:Lo,safeParseAsync:Wo,toDotPath:Co,toJSONSchema:qs,treeifyError:Ro,util:Po,version:Wa},Symbol.toStringTag,{value:"Module"})),Xr=l("ZodISODateTime",(t,e)=>{eu.init(t,e),M.init(t,e)});function Ks(t){return cs(Xr,t)}const Hr=l("ZodISODate",(t,e)=>{tu.init(t,e),M.init(t,e)});function Ys(t){return ls(Hr,t)}const Qr=l("ZodISOTime",(t,e)=>{nu.init(t,e),M.init(t,e)});function Xs(t){return ds(Qr,t)}const ei=l("ZodISODuration",(t,e)=>{ru.init(t,e),M.init(t,e)});function Hs(t){return fs(ei,t)}const ug=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:Hr,ZodISODateTime:Xr,ZodISODuration:ei,ZodISOTime:Qr,date:Ys,datetime:Ks,duration:Hs,time:Xs},Symbol.toStringTag,{value:"Module"})),Qs=(t,e)=>{qn.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>Yn(t,r)},flatten:{value:r=>Kn(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,Mt,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,Mt,2)}},isEmpty:{get(){return t.issues.length===0}}})},sg=l("ZodError",Qs),te=l("ZodError",Qs,{Parent:Error}),ec=vt(te),tc=yt(te),nc=bt(te),rc=$t(te),ic=Xn(te),oc=Hn(te),ac=Qn(te),uc=er(te),sc=tr(te),cc=nr(te),lc=rr(te),dc=ir(te),z=l("ZodType",(t,e)=>(S.init(t,e),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone(ye(e,{checks:[...e.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]})),t.clone=(r,i)=>ie(t,r,i),t.brand=()=>t,t.register=((r,i)=>(r.add(t,i),t)),t.parse=(r,i)=>ec(t,r,i,{callee:t.parse}),t.safeParse=(r,i)=>nc(t,r,i),t.parseAsync=async(r,i)=>tc(t,r,i,{callee:t.parseAsync}),t.safeParseAsync=async(r,i)=>rc(t,r,i),t.spa=t.safeParseAsync,t.encode=(r,i)=>ic(t,r,i),t.decode=(r,i)=>oc(t,r,i),t.encodeAsync=async(r,i)=>ac(t,r,i),t.decodeAsync=async(r,i)=>uc(t,r,i),t.safeEncode=(r,i)=>sc(t,r,i),t.safeDecode=(r,i)=>cc(t,r,i),t.safeEncodeAsync=async(r,i)=>lc(t,r,i),t.safeDecodeAsync=async(r,i)=>dc(t,r,i),t.refine=(r,i)=>t.check(Kc(r,i)),t.superRefine=r=>t.check(Yc(r)),t.overwrite=r=>t.check(We(r)),t.optional=()=>Jt(t),t.nullable=()=>Vt(t),t.nullish=()=>Jt(Vt(t)),t.nonoptional=r=>Zc(t,r),t.array=()=>Xe(t),t.or=r=>F([t,r]),t.and=r=>Sc(t,r),t.transform=r=>Gt(t,ki(r)),t.default=r=>Ec(t,r),t.prefault=r=>Pc(t,r),t.catch=r=>Mc(t,r),t.pipe=r=>Gt(t,r),t.readonly=()=>Bc(t),t.describe=r=>{const i=t.clone();return Te.add(i,{description:r}),i},Object.defineProperty(t,"description",{get(){return Te.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return Te.get(t);const i=t.clone();return Te.add(i,r[0]),i},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),ti=l("_ZodString",(t,e)=>{kt.init(t,e),z.init(t,e);const r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...i)=>t.check(Mr(...i)),t.includes=(...i)=>t.check(Br(...i)),t.startsWith=(...i)=>t.check(Fr(...i)),t.endsWith=(...i)=>t.check(Jr(...i)),t.min=(...i)=>t.check(Ke(...i)),t.max=(...i)=>t.check(rn(...i)),t.length=(...i)=>t.check(on(...i)),t.nonempty=(...i)=>t.check(Ke(1,...i)),t.lowercase=i=>t.check(Lr(i)),t.uppercase=i=>t.check(Wr(i)),t.trim=()=>t.check(qr()),t.normalize=(...i)=>t.check(Gr(...i)),t.toLowerCase=()=>t.check(Kr()),t.toUpperCase=()=>t.check(Yr())}),an=l("ZodString",(t,e)=>{kt.init(t,e),ti.init(t,e),t.email=r=>t.check(br(ni,r)),t.url=r=>t.check(tn(un,r)),t.jwt=r=>t.check(Rr(vi,r)),t.emoji=r=>t.check(kr(ri,r)),t.guid=r=>t.check(Bt(Ft,r)),t.uuid=r=>t.check($r(he,r)),t.uuidv4=r=>t.check(wr(he,r)),t.uuidv6=r=>t.check(_r(he,r)),t.uuidv7=r=>t.check(Ir(he,r)),t.nanoid=r=>t.check(Sr(ii,r)),t.guid=r=>t.check(Bt(Ft,r)),t.cuid=r=>t.check(Or(oi,r)),t.cuid2=r=>t.check(zr(ai,r)),t.ulid=r=>t.check(xr(ui,r)),t.base64=r=>t.check(Ar(gi,r)),t.base64url=r=>t.check(Pr(pi,r)),t.xid=r=>t.check(Nr(si,r)),t.ksuid=r=>t.check(jr(ci,r)),t.ipv4=r=>t.check(Tr(li,r)),t.ipv6=r=>t.check(Ur(di,r)),t.cidrv4=r=>t.check(Dr(fi,r)),t.cidrv6=r=>t.check(Er(mi,r)),t.e164=r=>t.check(Zr(hi,r)),t.datetime=r=>t.check(Ks(r)),t.date=r=>t.check(Ys(r)),t.time=r=>t.check(Xs(r)),t.duration=r=>t.check(Hs(r))});function A(t){return as(an,t)}const M=l("ZodStringFormat",(t,e)=>{Z.init(t,e),ti.init(t,e)}),ni=l("ZodEmail",(t,e)=>{Ja.init(t,e),M.init(t,e)});function cg(t){return br(ni,t)}const Ft=l("ZodGUID",(t,e)=>{Ba.init(t,e),M.init(t,e)});function lg(t){return Bt(Ft,t)}const he=l("ZodUUID",(t,e)=>{Fa.init(t,e),M.init(t,e)});function dg(t){return $r(he,t)}function fg(t){return wr(he,t)}function mg(t){return _r(he,t)}function gg(t){return Ir(he,t)}const un=l("ZodURL",(t,e)=>{Va.init(t,e),M.init(t,e)});function pg(t){return tn(un,t)}function hg(t){return tn(un,{protocol:/^https?$/,hostname:oa,...p(t)})}const ri=l("ZodEmoji",(t,e)=>{Ga.init(t,e),M.init(t,e)});function vg(t){return kr(ri,t)}const ii=l("ZodNanoID",(t,e)=>{qa.init(t,e),M.init(t,e)});function yg(t){return Sr(ii,t)}const oi=l("ZodCUID",(t,e)=>{Ka.init(t,e),M.init(t,e)});function bg(t){return Or(oi,t)}const ai=l("ZodCUID2",(t,e)=>{Ya.init(t,e),M.init(t,e)});function $g(t){return zr(ai,t)}const ui=l("ZodULID",(t,e)=>{Xa.init(t,e),M.init(t,e)});function wg(t){return xr(ui,t)}const si=l("ZodXID",(t,e)=>{Ha.init(t,e),M.init(t,e)});function _g(t){return Nr(si,t)}const ci=l("ZodKSUID",(t,e)=>{Qa.init(t,e),M.init(t,e)});function Ig(t){return jr(ci,t)}const li=l("ZodIPv4",(t,e)=>{iu.init(t,e),M.init(t,e)});function kg(t){return Tr(li,t)}const di=l("ZodIPv6",(t,e)=>{ou.init(t,e),M.init(t,e)});function Sg(t){return Ur(di,t)}const fi=l("ZodCIDRv4",(t,e)=>{au.init(t,e),M.init(t,e)});function Og(t){return Dr(fi,t)}const mi=l("ZodCIDRv6",(t,e)=>{uu.init(t,e),M.init(t,e)});function zg(t){return Er(mi,t)}const gi=l("ZodBase64",(t,e)=>{su.init(t,e),M.init(t,e)});function xg(t){return Ar(gi,t)}const pi=l("ZodBase64URL",(t,e)=>{lu.init(t,e),M.init(t,e)});function Ng(t){return Pr(pi,t)}const hi=l("ZodE164",(t,e)=>{du.init(t,e),M.init(t,e)});function jg(t){return Zr(hi,t)}const vi=l("ZodJWT",(t,e)=>{mu.init(t,e),M.init(t,e)});function Tg(t){return Rr(vi,t)}const Ot=l("ZodCustomStringFormat",(t,e)=>{gu.init(t,e),M.init(t,e)});function Ug(t,e,r={}){return St(Ot,t,e,r)}function Dg(t){return St(Ot,"hostname",ar,t)}function Eg(t){return St(Ot,"hex",wa,t)}function Ag(t,e){const r=e?.enc??"hex",i=`${t}_${r}`,n=ur[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return St(Ot,i,n,e)}const sn=l("ZodNumber",(t,e)=>{dr.init(t,e),z.init(t,e),t.gt=(i,n)=>t.check(Ce(i,n)),t.gte=(i,n)=>t.check(Q(i,n)),t.min=(i,n)=>t.check(Q(i,n)),t.lt=(i,n)=>t.check(Re(i,n)),t.lte=(i,n)=>t.check(ae(i,n)),t.max=(i,n)=>t.check(ae(i,n)),t.int=i=>t.check(fe(i)),t.safe=i=>t.check(fe(i)),t.positive=i=>t.check(Ce(0,i)),t.nonnegative=i=>t.check(Q(0,i)),t.negative=i=>t.check(Re(0,i)),t.nonpositive=i=>t.check(ae(0,i)),t.multipleOf=(i,n)=>t.check(dt(i,n)),t.step=(i,n)=>t.check(dt(i,n)),t.finite=()=>t;const r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function O(t){return ms(sn,t)}const Ye=l("ZodNumberFormat",(t,e)=>{pu.init(t,e),sn.init(t,e)});function fe(t){return ps(Ye,t)}function Pg(t){return hs(Ye,t)}function Zg(t){return vs(Ye,t)}function Rg(t){return ys(Ye,t)}function Cg(t){return bs(Ye,t)}const cn=l("ZodBoolean",(t,e)=>{fr.init(t,e),z.init(t,e)});function Y(t){return $s(cn,t)}const ln=l("ZodBigInt",(t,e)=>{mr.init(t,e),z.init(t,e),t.gte=(i,n)=>t.check(Q(i,n)),t.min=(i,n)=>t.check(Q(i,n)),t.gt=(i,n)=>t.check(Ce(i,n)),t.gte=(i,n)=>t.check(Q(i,n)),t.min=(i,n)=>t.check(Q(i,n)),t.lt=(i,n)=>t.check(Re(i,n)),t.lte=(i,n)=>t.check(ae(i,n)),t.max=(i,n)=>t.check(ae(i,n)),t.positive=i=>t.check(Ce(BigInt(0),i)),t.negative=i=>t.check(Re(BigInt(0),i)),t.nonpositive=i=>t.check(ae(BigInt(0),i)),t.nonnegative=i=>t.check(Q(BigInt(0),i)),t.multipleOf=(i,n)=>t.check(dt(i,n));const r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});function ve(t){return _s(ln,t)}const yi=l("ZodBigIntFormat",(t,e)=>{hu.init(t,e),ln.init(t,e)});function Mg(t){return ks(yi,t)}function Lg(t){return Ss(yi,t)}const fc=l("ZodSymbol",(t,e)=>{vu.init(t,e),z.init(t,e)});function mc(t){return Os(fc,t)}const gc=l("ZodUndefined",(t,e)=>{yu.init(t,e),z.init(t,e)});function pc(t){return zs(gc,t)}const hc=l("ZodNull",(t,e)=>{bu.init(t,e),z.init(t,e)});function bi(t){return xs(hc,t)}const vc=l("ZodAny",(t,e)=>{$u.init(t,e),z.init(t,e)});function Wg(){return Ns(vc)}const yc=l("ZodUnknown",(t,e)=>{wu.init(t,e),z.init(t,e)});function Se(){return js(yc)}const bc=l("ZodNever",(t,e)=>{_u.init(t,e),z.init(t,e)});function $i(t){return Ts(bc,t)}const $c=l("ZodVoid",(t,e)=>{Iu.init(t,e),z.init(t,e)});function Bg(t){return Us($c,t)}const wi=l("ZodDate",(t,e)=>{ku.init(t,e),z.init(t,e),t.min=(i,n)=>t.check(Q(i,n)),t.max=(i,n)=>t.check(ae(i,n));const r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});function wc(t){return Ds(wi,t)}const _c=l("ZodArray",(t,e)=>{Su.init(t,e),z.init(t,e),t.element=e.element,t.min=(r,i)=>t.check(Ke(r,i)),t.nonempty=r=>t.check(Ke(1,r)),t.max=(r,i)=>t.check(rn(r,i)),t.length=(r,i)=>t.check(on(r,i)),t.unwrap=()=>t.element});function Xe(t,e){return Ls(_c,t,e)}function Fg(t){const e=t._zod.def.shape;return J(Object.keys(e))}const dn=l("ZodObject",(t,e)=>{Nu.init(t,e),z.init(t,e),N(t,"shape",()=>e.shape),t.keyof=()=>J(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:Se()}),t.loose=()=>t.clone({...t._zod.def,catchall:Se()}),t.strict=()=>t.clone({...t._zod.def,catchall:$i()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>No(t,r),t.safeExtend=r=>jo(t,r),t.merge=r=>To(t,r),t.pick=r=>zo(t,r),t.omit=r=>xo(t,r),t.partial=(...r)=>Uo(Si,t,r[0]),t.required=(...r)=>Do(Oi,t,r[0])});function U(t,e){const r={type:"object",shape:t??{},...p(e)};return new dn(r)}function Jg(t,e){return new dn({type:"object",shape:t,catchall:$i(),...p(e)})}function Vg(t,e){return new dn({type:"object",shape:t,catchall:Se(),...p(e)})}const _i=l("ZodUnion",(t,e)=>{gr.init(t,e),z.init(t,e),t.options=e.options});function F(t,e){return new _i({type:"union",options:t,...p(e)})}const Ic=l("ZodDiscriminatedUnion",(t,e)=>{_i.init(t,e),ju.init(t,e)});function Gg(t,e,r){return new Ic({type:"union",options:e,discriminator:t,...p(r)})}const kc=l("ZodIntersection",(t,e)=>{Tu.init(t,e),z.init(t,e)});function Sc(t,e){return new kc({type:"intersection",left:t,right:e})}const Oc=l("ZodTuple",(t,e)=>{pr.init(t,e),z.init(t,e),t.rest=r=>t.clone({...t._zod.def,rest:r})});function me(t,e,r){const i=e instanceof S,n=i?r:e,o=i?e:null;return new Oc({type:"tuple",items:t,rest:o,...p(n)})}const Ii=l("ZodRecord",(t,e)=>{Uu.init(t,e),z.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function fn(t,e,r){return new Ii({type:"record",keyType:t,valueType:e,...p(r)})}function qg(t,e,r){const i=ie(t);return i._zod.values=void 0,new Ii({type:"record",keyType:i,valueType:e,...p(r)})}const zc=l("ZodMap",(t,e)=>{Du.init(t,e),z.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function Kg(t,e,r){return new zc({type:"map",keyType:t,valueType:e,...p(r)})}const xc=l("ZodSet",(t,e)=>{Eu.init(t,e),z.init(t,e),t.min=(...r)=>t.check(ft(...r)),t.nonempty=r=>t.check(ft(1,r)),t.max=(...r)=>t.check(nn(...r)),t.size=(...r)=>t.check(Cr(...r))});function Yg(t,e){return new xc({type:"set",valueType:t,...p(e)})}const mt=l("ZodEnum",(t,e)=>{Au.init(t,e),z.init(t,e),t.enum=e.entries,t.options=Object.values(e.entries);const r=new Set(Object.keys(e.entries));t.extract=(i,n)=>{const o={};for(const a of i)if(r.has(a))o[a]=e.entries[a];else throw new Error(`Key ${a} not found in enum`);return new mt({...e,checks:[],...p(n),entries:o})},t.exclude=(i,n)=>{const o={...e.entries};for(const a of i)if(r.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new mt({...e,checks:[],...p(n),entries:o})}});function J(t,e){const r=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new mt({type:"enum",entries:r,...p(e)})}function Xg(t,e){return new mt({type:"enum",entries:t,...p(e)})}const Nc=l("ZodLiteral",(t,e)=>{Pu.init(t,e),z.init(t,e),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function Hg(t,e){return new Nc({type:"literal",values:Array.isArray(t)?t:[t],...p(e)})}const jc=l("ZodFile",(t,e)=>{Zu.init(t,e),z.init(t,e),t.min=(r,i)=>t.check(ft(r,i)),t.max=(r,i)=>t.check(nn(r,i)),t.mime=(r,i)=>t.check(Vr(Array.isArray(r)?r:[r],i))});function Qg(t){return Ws(jc,t)}const Tc=l("ZodTransform",(t,e)=>{Ru.init(t,e),z.init(t,e),t._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Yt(t.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(Ge(o,r.value,e));else{const a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=t),r.issues.push(Ge(a))}};const n=e.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function ki(t){return new Tc({type:"transform",transform:t})}const Si=l("ZodOptional",(t,e)=>{Cu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Jt(t){return new Si({type:"optional",innerType:t})}const Uc=l("ZodNullable",(t,e)=>{Mu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Vt(t){return new Uc({type:"nullable",innerType:t})}function ep(t){return Jt(Vt(t))}const Dc=l("ZodDefault",(t,e)=>{Lu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function Ec(t,e){return new Dc({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():Ht(e)}})}const Ac=l("ZodPrefault",(t,e)=>{Wu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Pc(t,e){return new Ac({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():Ht(e)}})}const Oi=l("ZodNonOptional",(t,e)=>{Bu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Zc(t,e){return new Oi({type:"nonoptional",innerType:t,...p(e)})}const Rc=l("ZodSuccess",(t,e)=>{Fu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType});function tp(t){return new Rc({type:"success",innerType:t})}const Cc=l("ZodCatch",(t,e)=>{Ju.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function Mc(t,e){return new Cc({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}const Lc=l("ZodNaN",(t,e)=>{Vu.init(t,e),z.init(t,e)});function np(t){return As(Lc,t)}const zi=l("ZodPipe",(t,e)=>{Gu.init(t,e),z.init(t,e),t.in=e.in,t.out=e.out});function Gt(t,e){return new zi({type:"pipe",in:t,out:e})}const xi=l("ZodCodec",(t,e)=>{zi.init(t,e),hr.init(t,e)});function rp(t,e,r){return new xi({type:"pipe",in:t,out:e,transform:r.decode,reverseTransform:r.encode})}const Wc=l("ZodReadonly",(t,e)=>{qu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Bc(t){return new Wc({type:"readonly",innerType:t})}const Fc=l("ZodTemplateLiteral",(t,e)=>{Ku.init(t,e),z.init(t,e)});function ip(t,e){return new Fc({type:"template_literal",parts:t,...p(e)})}const Jc=l("ZodLazy",(t,e)=>{Hu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.getter()});function Vc(t){return new Jc({type:"lazy",getter:t})}const Gc=l("ZodPromise",(t,e)=>{Xu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType});function op(t){return new Gc({type:"promise",innerType:t})}const qc=l("ZodFunction",(t,e)=>{Yu.init(t,e),z.init(t,e)});function oo(t){return new qc({type:"function",input:Array.isArray(t?.input)?me(t?.input):t?.input??Xe(Se()),output:t?.output??Se()})}const mn=l("ZodCustom",(t,e)=>{Qu.init(t,e),z.init(t,e)});function ap(t){const e=new B({check:"custom"});return e._zod.check=t,e}function Ni(t,e){return Bs(mn,t??(()=>!0),e)}function Kc(t,e={}){return Fs(mn,t,e)}function Yc(t){return Js(t)}function W(t,e={error:`Input not instance of ${t.name}`}){const r=new mn({type:"custom",check:"custom",fn:i=>i instanceof t,abort:!0,...p(e)});return r._zod.bag.Class=t,r}const up=(...t)=>Gs({Codec:xi,Boolean:cn,String:an},...t);function sp(t){const e=Vc(()=>F([A(t),O(),Y(),bi(),Xe(e),fn(A(),e)]));return e}function cp(t,e){return Gt(ki(t),e)}const lp={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function dp(t){H({customError:t})}function fp(){return H().customError}var Un;Un||(Un={});function mp(t){return us(an,t)}function gp(t){return gs(sn,t)}function pp(t){return ws(cn,t)}function Xc(t){return Is(ln,t)}function hp(t){return Es(wi,t)}const vp=Object.freeze(Object.defineProperty({__proto__:null,bigint:Xc,boolean:pp,date:hp,number:gp,string:mp},Symbol.toStringTag,{value:"Module"}));H(es());const C=Object.freeze(Object.defineProperty({__proto__:null,$brand:$o,$input:os,$output:is,NEVER:bo,TimePrecision:ss,ZodAny:vc,ZodArray:_c,ZodBase64:gi,ZodBase64URL:pi,ZodBigInt:ln,ZodBigIntFormat:yi,ZodBoolean:cn,ZodCIDRv4:fi,ZodCIDRv6:mi,ZodCUID:oi,ZodCUID2:ai,ZodCatch:Cc,ZodCodec:xi,ZodCustom:mn,ZodCustomStringFormat:Ot,ZodDate:wi,ZodDefault:Dc,ZodDiscriminatedUnion:Ic,ZodE164:hi,ZodEmail:ni,ZodEmoji:ri,ZodEnum:mt,ZodError:sg,ZodFile:jc,get ZodFirstPartyTypeKind(){return Un},ZodFunction:qc,ZodGUID:Ft,ZodIPv4:li,ZodIPv6:di,ZodISODate:Hr,ZodISODateTime:Xr,ZodISODuration:ei,ZodISOTime:Qr,ZodIntersection:kc,ZodIssueCode:lp,ZodJWT:vi,ZodKSUID:ci,ZodLazy:Jc,ZodLiteral:Nc,ZodMap:zc,ZodNaN:Lc,ZodNanoID:ii,ZodNever:bc,ZodNonOptional:Oi,ZodNull:hc,ZodNullable:Uc,ZodNumber:sn,ZodNumberFormat:Ye,ZodObject:dn,ZodOptional:Si,ZodPipe:zi,ZodPrefault:Ac,ZodPromise:Gc,ZodReadonly:Wc,ZodRealError:te,ZodRecord:Ii,ZodSet:xc,ZodString:an,ZodStringFormat:M,ZodSuccess:Rc,ZodSymbol:fc,ZodTemplateLiteral:Fc,ZodTransform:Tc,ZodTuple:Oc,ZodType:z,ZodULID:ui,ZodURL:un,ZodUUID:he,ZodUndefined:gc,ZodUnion:_i,ZodUnknown:yc,ZodVoid:$c,ZodXID:si,_ZodString:ti,_default:Ec,_function:oo,any:Wg,array:Xe,base64:xg,base64url:Ng,bigint:ve,boolean:Y,catch:Mc,check:ap,cidrv4:Og,cidrv6:zg,clone:ie,codec:rp,coerce:vp,config:H,core:ag,cuid:bg,cuid2:$g,custom:Ni,date:wc,decode:oc,decodeAsync:uc,discriminatedUnion:Gg,e164:jg,email:cg,emoji:vg,encode:ic,encodeAsync:ac,endsWith:Jr,enum:J,file:Qg,flattenError:Kn,float32:Pg,float64:Zg,formatError:Yn,function:oo,getErrorMap:fp,globalRegistry:Te,gt:Ce,gte:Q,guid:lg,hash:Ag,hex:Eg,hostname:Dg,httpUrl:hg,includes:Br,instanceof:W,int:fe,int32:Rg,int64:Mg,intersection:Sc,ipv4:kg,ipv6:Sg,iso:ug,json:sp,jwt:Tg,keyof:Fg,ksuid:Ig,lazy:Vc,length:on,literal:Hg,locales:rs,looseObject:Vg,lowercase:Lr,lt:Re,lte:ae,map:Kg,maxLength:rn,maxSize:nn,mime:Vr,minLength:Ke,minSize:ft,multipleOf:dt,nan:np,nanoid:yg,nativeEnum:Xg,negative:Zs,never:$i,nonnegative:Cs,nonoptional:Zc,nonpositive:Rs,normalize:Gr,null:bi,nullable:Vt,nullish:ep,number:O,object:U,optional:Jt,overwrite:We,parse:ec,parseAsync:tc,partialRecord:qg,pipe:Gt,positive:Ps,prefault:Pc,preprocess:cp,prettifyError:Mo,promise:op,property:Ms,readonly:Bc,record:fn,refine:Kc,regex:Mr,regexes:ur,registry:yr,safeDecode:cc,safeDecodeAsync:dc,safeEncode:sc,safeEncodeAsync:lc,safeParse:nc,safeParseAsync:rc,set:Yg,setErrorMap:dp,size:Cr,startsWith:Fr,strictObject:Jg,string:A,stringFormat:Ug,stringbool:up,success:tp,superRefine:Yc,symbol:mc,templateLiteral:ip,toJSONSchema:qs,toLowerCase:Kr,toUpperCase:Yr,transform:ki,treeifyError:Ro,trim:qr,tuple:me,uint32:Cg,uint64:Lg,ulid:wg,undefined:pc,union:F,unknown:Se,uppercase:Wr,url:pg,util:Po,uuid:dg,uuidv4:fg,uuidv6:mg,uuidv7:gg,void:Bg,xid:_g},Symbol.toStringTag,{value:"Module"})),yp=t=>{const e=t.replace(/_[a-z]/g,r=>r[1].toUpperCase());return e.length>1&&e[0]===e[0].toUpperCase()&&e[1]===e[1].toUpperCase()||e.length===0?e:e[0].toLowerCase()+e.slice(1)},Hc=t=>{const e=(r,i=Dn)=>{if(typeof r=="string")return t(r);if(Array.isArray(r))return r.map(a=>e(a,i));if(!In(r))return r;i=_p(i);const n={},o=r;return"toJSON"in o&&typeof o.toJSON=="function"?e(o.toJSON(),i):(Object.keys(o).forEach(a=>{let u=o[a];const s=t(a);i.recursive&&(In(u)?uo(u)||(u=e(u,i)):i.recursiveInArray&&ao(u)&&(u=[...u].map(c=>{let d=c;return In(c)?uo(d)||(d=e(c,i)):ao(c)&&(d=e({key:c},i).key),d}))),n[s]=u}),n)};return e},Qc=Hc(yp),bp=t=>t.replace(/([a-z0-9])([A-Z])/g,(e,r,i)=>`${r}_${i.toLowerCase()}`),$p=Hc(bp),wp=[Number,String,Uint8Array],Dn={recursive:!0,recursiveInArray:!0},_p=(t=Dn)=>(t.recursive==null?t=Dn:t.recursiveInArray??=!1,t),ao=t=>t!=null&&Array.isArray(t),In=t=>t!=null&&typeof t=="object"&&!Array.isArray(t),uo=t=>wp.some(e=>t instanceof e),kn=t=>t!=null&&typeof t=="object"&&!Array.isArray(t);let Ip=class{contentType="application/json";decoder;encoder;constructor(){this.decoder=new TextDecoder,this.encoder=new TextEncoder}encode(e){return this.encoder.encode(this.encodeString(e))}decode(e,r){return this.decodeString(this.decoder.decode(e),r)}decodeString(e,r){const i=JSON.parse(e),n=Qc(i);return r!=null?r.parse(n):n}encodeString(e){const r=$p(e);return JSON.stringify(r,(i,n)=>ArrayBuffer.isView(n)?Array.from(n):typeof n=="bigint"?n.toString():n)}};const En=new Ip,re=t=>t!=null&&typeof t=="object"&&"value"in t;let He=class{value;constructor(e){this.value=e}valueOf(){return this.value}toJSON(){return this.value}toString(){return this.value.toString()}};const kp=t=>t!=null&&typeof t=="object"&&"toString"in t,Sp=(t,e=!1)=>{const r=kp(t)?"stringer":typeof t;let i;switch(r){case"string":i=(n,o)=>n.localeCompare(o);break;case"stringer":i=(n,o)=>n.toString().localeCompare(o.toString());break;case"number":i=(n,o)=>Number(n)-Number(o);break;case"bigint":i=(n,o)=>BigInt(n)-BigInt(o)>0n?1:-1;break;case"boolean":i=(n,o)=>Number(n)-Number(o);break;case"undefined":i=()=>0;break;default:return console.warn(`sortFunc: unknown type ${r}`),()=>-1}return e?Op(i):i},Op=t=>(e,r)=>t(r,e),gn=me([O(),O()]);me([ve(),ve()]);const ji=U({width:O(),height:O()}),zp=U({signedWidth:O(),signedHeight:O()}),xp=["width","height"];J(xp);const Np=["start","center","end"],jp=["signedWidth","signedHeight"];J(jp);const gt=U({x:O(),y:O()}),el=U({clientX:O(),clientY:O()}),tl=["x","y"],nl=J(tl),rl=["top","right","bottom","left"];J(rl);const Ti=["left","right"],il=J(Ti),Ui=["top","bottom"],ol=J(Ui),al=["center"],so=J(al),Tp=[...rl,...al],ul=J(Tp);J(Np);const Up=["first","last"];J(Up);const Dp=U({lower:O(),upper:O()}),Ep=U({lower:ve(),upper:ve()});F([Dp,gn]);F([Ep,gn]);J([...nl.options,...ul.options]);J(["x","left","right"]);J(["y","top","bottom"]);F([nl,ul,W(String)]);const pn=t=>(e,r)=>{if(typeof e=="bigint"){if(Ap(r))return t(e,BigInt(r));const i=t(Number(e),Number(r));return typeof i=="number"?BigInt(Math.round(i)):i}return t(Number(e),Number(r))},hn=pn((t,e)=>t-e),vn=pn((t,e)=>t+e),Ap=t=>typeof t=="bigint"?!0:Number.isInteger(t),de=pn((t,e)=>t*e),yn=pn((t,e)=>t/e),Ee=(t,e,r)=>{const i={};if(typeof e=="object"&&(r=e,e=void 0),r={makeValid:!0,...r},typeof t=="number"||typeof t=="bigint")e!=null?(i.lower=t,i.upper=e):(i.lower=typeof t=="bigint"?0n:0,i.upper=t);else if(Array.isArray(t)){if(t.length!==2)throw new Error("bounds: expected array of length 2");[i.lower,i.upper]=t}else i.lower=t.lower,i.upper=t.upper;return r?.makeValid?Pp(i):i},Pp=t=>t.lower>t.upper?{lower:t.upper,upper:t.lower}:t,co=(t,e)=>{const r=Ee(t);return e<r.lower?r.lower:e>=r.upper?r.upper-(typeof r.upper=="number"?1:1n):e},Di=t=>tl.includes(t)?t:Ui.includes(t)?"y":"x";U({x:il.or(so),y:ol.or(so)});const Zp=U({x:il,y:ol}),Ei=Object.freeze({x:"left",y:"top"}),Rp=Object.freeze({x:"right",y:"top"}),sl=Object.freeze({x:"left",y:"bottom"}),Cp=Object.freeze({x:"right",y:"bottom"}),Mp=Object.freeze({x:"center",y:"top"}),Lp=Object.freeze({x:"center",y:"bottom"}),Wp=Object.freeze({x:"right",y:"center"}),Bp=Object.freeze({x:"left",y:"center"}),cl=(t,e)=>t.x===e.x&&t.y===e.y,Fp=t=>[t.x,t.y],An=F([O(),gt,gn,ji,zp,el]),E=(t,e)=>{if(typeof t=="string"){if(e===void 0)throw new Error("The y coordinate must be given.");return t==="x"?{x:e,y:0}:{x:0,y:e}}return typeof t=="number"?{x:t,y:e??t}:Array.isArray(t)?{x:t[0],y:t[1]}:"signedWidth"in t?{x:t.signedWidth,y:t.signedHeight}:"clientX"in t?{x:t.clientX,y:t.clientY}:"width"in t?{x:t.width,y:t.height}:{x:t.x,y:t.y}},ge=Object.freeze({x:0,y:0}),ll=Object.freeze({x:1,y:1}),Jp=Object.freeze({x:1/0,y:1/0}),Vp=Object.freeze({x:NaN,y:NaN}),qt=(t,e,r=0)=>{const i=E(t),n=E(e);return r===0?i.x===n.x&&i.y===n.y:Math.abs(i.x-n.x)<=r&&Math.abs(i.y-n.y)<=r},Gp=t=>qt(t,ge),Ai=(t,e,r)=>{const i=E(t),n=E(e,r);return{x:i.x*n.x,y:i.y*n.y}},dl=(t,e)=>{const r=E(t);return{x:r.x+e,y:r.y}},fl=(t,e)=>{const r=E(t);return{x:r.x,y:r.y+e}},pt=(t,e,r,...i)=>{if(typeof e=="string"){if(typeof r!="number")throw new Error("The value must be a number.");return e==="x"?dl(t,r):fl(t,r)}if(typeof e=="object"&&"x"in e&&typeof e.x=="string"){const n=E(r),o=E(t);return e.x==="left"?n.x=-n.x:e.x==="center"&&(n.x=0),e.y==="top"?n.y=-n.y:e.y==="center"&&(n.y=0),{x:o.x+n.x,y:o.y+n.y}}return[t,e,r??ge,...i].reduce((n,o)=>{const a=E(o);return{x:n.x+a.x,y:n.y+a.y}},ge)},qp=(t,e,r)=>{const i=E(t);return e==="x"?{x:r,y:i.y}:{x:i.x,y:r}},Kp=(t,e)=>{const r=E(t),i=E(e);return Math.sqrt((r.x-i.x)**2+(r.y-i.y)**2)},Yp=(t,e)=>{const r=E(t),i=E(e);return{x:i.x-r.x,y:i.y-r.y}},Xp=t=>{const e=E(t);return Number.isNaN(e.x)||Number.isNaN(e.y)},Hp=t=>{const e=E(t);return Number.isFinite(e.x)&&Number.isFinite(e.y)},Qp=t=>{const e=E(t);return[e.x,e.y]},eh=t=>{const e=E(t);return{left:e.x,top:e.y}},Pn=(t,e=0)=>{const r=E(t);return{x:Number(r.x.toFixed(e)),y:Number(r.y.toFixed(e))}},ot=(t,e)=>{const r=E(t),i=E(e);return{x:r.x-i.x,y:r.y-i.y}},at=t=>{const e=E(t),r=Math.hypot(e.x,e.y);return r===0?{x:0,y:0}:{x:-e.y/r,y:e.x/r}},ml=t=>{const e=E(t),r=Math.hypot(e.x,e.y);return r===0?{x:0,y:0}:{x:e.x/r,y:e.y/r}},gl=(...t)=>{const e=t.reduce((r,i)=>pt(r,i),ge);return Ai(e,1/t.length)},th=(t,e)=>{const r=[];for(let i=0;i<t.length;i++){const n=t[i];let o,a,u,s;if(i===0){const c=t[i+1],d=ot(c,n);a=at(d),u=a,s=e}else if(i===t.length-1){const c=t[i-1],d=ot(n,c);o=at(d),u=o,s=e}else{const c=t[i-1],d=t[i+1],m=ot(n,c),h=ot(d,n);o=at(m),a=at(h);const b=Math.acos((m.x*h.x+m.y*h.y)/(Math.hypot(m.x,m.y)*Math.hypot(h.x,h.y))),f=Math.sin(b/2);f===0?s=e:s=e/f,u=ml(gl(o,a))}r.push(Ai(u,s))}return r},nh=t=>{const e=E(t);return{x:e.y,y:e.x}},Zn=t=>{const e=E(t);return{x:Math.round(e.x),y:Math.round(e.y)}},rh=t=>{const e=E(t);return{x:1/e.x,y:1/e.y}},Kt=Object.freeze(Object.defineProperty({__proto__:null,INFINITY:Jp,NAN:Vp,ONE:ll,ZERO:ge,average:gl,calculateMiters:th,clientXY:el,construct:E,couple:Qp,crudeZ:An,css:eh,distance:Kp,equals:qt,isFinite:Hp,isNan:Xp,isZero:Gp,normal:at,normalize:ml,reciprocal:rh,round:Zn,scale:Ai,set:qp,sub:ot,swap:nh,translate:pt,translateX:dl,translateY:fl,translation:Yp,truncate:Pn,xy:gt},Symbol.toStringTag,{value:"Module"})),Tt=F([O(),A()]),ih=U({top:Tt,left:Tt,width:Tt,height:Tt}),oh=U({left:O(),top:O(),right:O(),bottom:O()}),ah=U({one:gt,two:gt,root:Zp}),pl={one:ge,two:ge,root:Ei},uh={one:ge,two:ll,root:sl},hl=(t,e)=>({one:t.one,two:t.two,root:e??t.root}),P=(t,e,r=0,i=0,n)=>{const o={one:{...ge},two:{...ge},root:n??Ei};if(typeof t=="number"){if(typeof e!="number")throw new Error("Box constructor called with invalid arguments");return o.one={x:t,y:e},o.two={x:o.one.x+r,y:o.one.y+i},o}return"one"in t&&"two"in t&&"root"in t?{...t,root:n??t.root}:("getBoundingClientRect"in t&&(t=t.getBoundingClientRect()),"left"in t?(o.one={x:t.left,y:t.top},o.two={x:t.right,y:t.bottom},o):(o.one=t,e==null?o.two={x:o.one.x+r,y:o.one.y+i}:typeof e=="number"?o.two={x:o.one.x+e,y:o.one.y+r}:"width"in e?o.two={x:o.one.x+e.width,y:o.one.y+e.height}:"signedWidth"in e?o.two={x:o.one.x+e.signedWidth,y:o.one.y+e.signedHeight}:o.two=e,o))},sh=(t,e,r)=>{const i=P(t);if(typeof e=="string"){if(r==null)throw new Error("Invalid arguments for resize");const n=Di(e);return P(i.one,void 0,n==="x"?r:Oe(i),n==="y"?r:ze(i),i.root)}return P(i.one,e,void 0,void 0,i.root)},ch=(t,e,r=!0)=>{const i=P(t);let n=(o,a)=>o<a;return r&&(n=(o,a)=>o<=a),"one"in e?n(_e(i),_e(e))&&n(Ae(e),Ae(i))&&n(Ie(i),Ie(e))&&n(Pe(e),Pe(i)):n(_e(i),e.x)&&n(e.x,Ae(i))&&n(Ie(i),e.y)&&n(e.y,Pe(i))},lh=(t,e)=>qt(t.one,e.one)&&qt(t.two,e.two)&&cl(t.root,e.root),vl=t=>({width:Oe(t),height:ze(t)}),dh=t=>({signedWidth:bn(t),signedHeight:$n(t)}),fh=t=>({top:Ie(t),left:_e(t),width:Oe(t),height:ze(t)}),Pi=(t,e,r=!1)=>{const i=Di(e)==="y"?$n(t):bn(t);return r?i:Math.abs(i)},be=(t,e)=>{const r=P(t);return{x:e.x==="center"?Rn(r).x:Me(r,e.x),y:e.y==="center"?Rn(r).y:Me(r,e.y)}},Me=(t,e)=>{const r=P(t),i=Fp(r.root).includes(e)?Math.min:Math.max;return Ti.includes(e)?i(r.one.x,r.two.x):i(r.one.y,r.two.y)},mh=t=>$l(t)===0,Oe=t=>Pi(t,"x"),ze=t=>Pi(t,"y"),bn=t=>{const e=P(t);return e.two.x-e.one.x},$n=t=>{const e=P(t);return e.two.y-e.one.y},yl=t=>be(t,Ei),gh=t=>be(t,Mp),ph=t=>be(t,Rp),hh=t=>be(t,sl),vh=t=>be(t,Lp),yh=t=>be(t,Cp),bh=t=>be(t,Bp),$h=t=>be(t,Wp),Ae=t=>Me(t,"right"),Pe=t=>Me(t,"bottom"),_e=t=>Me(t,"left"),Ie=t=>Me(t,"top"),Rn=t=>pt(yl(t),{x:bn(t)/2,y:$n(t)/2}),Zi=t=>{const e=P(t);return e.root.x==="left"?_e(e):Ae(e)},Ri=t=>{const e=P(t);return e.root.y==="top"?Ie(e):Pe(e)},wh=t=>({x:Zi(t),y:Ri(t)}),Et=t=>{const e=P(t);return{lower:e.one.x,upper:e.two.x}},At=t=>{const e=P(t);return{lower:e.one.y,upper:e.two.y}},_h=(t,e)=>hl(t,e),Ih=(t,e)=>{const r=P(t),i=Ti.includes(e)?"x":Ui.includes(e)?"y":null;if(i===null)throw new Error(`Invalid location: ${e}`);const n=e==="top"||e==="left"?Math.min:Math.max,o={...r.one},a={...r.two};return o[i]=n(r.one[i],r.two[i]),a[i]=n(r.one[i],r.two[i]),[o,a]},kh=(t,e)=>{const r=P(t),i=P(e),n=Zi(i)+(Oe(i)-Oe(r))/2,o=Ri(i)+(ze(i)-ze(r))/2;return P({x:n,y:o},vl(r))},bl=t=>typeof t!="object"||t==null?!1:"one"in t&&"two"in t&&"root"in t,Sh=t=>Oe(t)/ze(t),Oh=(t,e,r)=>{if(typeof e=="string"){if(r==null)throw new Error("Undefined amount passed into box.translate");const n=Di(e);e=E(n,r)}const i=P(t);return P(pt(i.one,e),pt(i.two,e),void 0,void 0,i.root)},zh=(t,e)=>{const r=Math.max(_e(t),_e(e)),i=Math.max(Ie(t),Ie(e)),n=Math.min(Ae(t),Ae(e)),o=Math.min(Pe(t),Pe(e));return r>n||i>o?pl:P({x:r,y:i},{x:n,y:o},void 0,void 0,t.root)},$l=t=>Oe(t)*ze(t),xh=(t,e)=>{const r=P(t);return P(Pn(r.one,e),Pn(r.two,e),void 0,void 0,r.root)},Nh=(t,e,r,i,n,o)=>{const a={x:t,y:e},u={x:t+r,y:e+i};return n.x!==o.x&&(n.x==="center"?(a.x-=r/2,u.x-=r/2):(a.x-=r,u.x-=r)),n.y!==o.y&&(n.y==="center"?(a.y-=i/2,u.y-=i/2):(a.y-=i,u.y-=i)),P(a,u,void 0,void 0,o)},jh=t=>{const e=P(t);return P(Zn(e.one),Zn(e.two),void 0,void 0,e.root)},ut=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:uh,ZERO:pl,area:$l,areaIsZero:mh,aspect:Sh,bottom:Pe,bottomCenter:vh,bottomLeft:hh,bottomRight:yh,box:ah,center:Rn,centerLeft:bh,centerRight:$h,construct:P,constructWithAlternateRoot:Nh,contains:ch,copy:hl,css:fh,cssBox:ih,dim:Pi,dims:vl,domRect:oh,edgePoints:Ih,equals:lh,height:ze,intersection:zh,isBox:bl,left:_e,loc:Me,positionInCenter:kh,reRoot:_h,resize:sh,right:Ae,root:wh,round:jh,signedDims:dh,signedHeight:$n,signedWidth:bn,top:Ie,topCenter:gh,topLeft:yl,topRight:ph,translate:Oh,truncate:xh,width:Oe,x:Zi,xBounds:Et,xyLoc:be,y:Ri,yBounds:At},Symbol.toStringTag,{value:"Module"})),wl=U({signedWidth:O(),signedHeight:O()}),Th=F([ji,wl,gt,gn]),Uh={width:0,height:0},Dh={width:1,height:1},se=(t,e)=>typeof t=="number"?{width:t,height:e??t}:Array.isArray(t)?{width:t[0],height:t[1]}:"x"in t?{width:t.x,height:t.y}:"signedWidth"in t?{width:t.signedWidth,height:t.signedHeight}:{...t},Eh=(t,e)=>{if(e==null)return!1;const r=se(t),i=se(e);return r.width===i.width&&r.height===i.height},Ah=t=>{const e=se(t);return{width:e.height,height:e.width}},Ph=t=>{const e=se(t);return`0 0 ${e.width} ${e.height}`},Zh=t=>{const e=se(t);return[e.width,e.height]},Rh=t=>({width:Math.max(...t.map(e=>se(e).width)),height:Math.max(...t.map(e=>se(e).height))}),Ch=t=>({width:Math.min(...t.map(e=>se(e).width)),height:Math.min(...t.map(e=>se(e).height))}),Mh=(t,e)=>{const r=se(t);return{width:r.width*e,height:r.height*e}},Pt=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:Dh,ZERO:Uh,construct:se,couple:Zh,crude:Th,dimensions:ji,equals:Eh,max:Rh,min:Ch,scale:Mh,signed:wl,svgViewBox:Ph,swap:Ah},Symbol.toStringTag,{value:"Module"})),Lh=(t,e,r)=>e!==void 0&&t<e?e:r!==void 0&&t>r?r:t;U({offset:An,scale:An});U({offset:O(),scale:O()});const Wh=t=>(e,r,i,n)=>r==="dimension"?[e,i]:[e,n?i-t:i+t],Bh=t=>(e,r,i,n)=>[e,n?i/t:i*t],Fh=t=>(e,r,i)=>{if(e===null)return[t,i];const{lower:n,upper:o}=e,{lower:a,upper:u}=t,s=o-n,c=u-a;if(r==="dimension")return[t,i*(c/s)];const d=(i-n)*(c/s)+a;return[t,d]},Jh=t=>(e,r,i)=>[t,i],Vh=()=>(t,e,r)=>{if(t===null)throw new Error("cannot invert without bounds");if(e==="dimension")return[t,r];const{lower:i,upper:n}=t;return[t,n-(r-i)]},Gh=t=>(e,r,i)=>{const{lower:n,upper:o}=t;return i=Lh(i,n,o),[e,i]};let lo=class Be{ops=[];currBounds=null;currType=null;reversed=!1;constructor(){this.ops=[]}static translate(e){return new Be().translate(e)}static magnify(e){return new Be().magnify(e)}static scale(e,r){return new Be().scale(e,r)}translate(e){const r=this.new(),i=Wh(e);return i.type="translate",r.ops.push(i),r}magnify(e){const r=this.new(),i=Bh(e);return i.type="magnify",r.ops.push(i),r}scale(e,r){const i=Ee(e,r),n=this.new(),o=Fh(i);return o.type="scale",n.ops.push(o),n}clamp(e,r){const i=Ee(e,r),n=this.new(),o=Gh(i);return o.type="clamp",n.ops.push(o),n}reBound(e,r){const i=Ee(e,r),n=this.new(),o=Jh(i);return o.type="re-bound",n.ops.push(o),n}invert(){const e=Vh();e.type="invert";const r=this.new();return r.ops.push(e),r}pos(e){return this.exec("position",e)}dim(e){return this.exec("dimension",e)}new(){const e=new Be;return e.ops=this.ops.slice(),e.reversed=this.reversed,e}exec(e,r){return this.currBounds=null,this.ops.reduce(([i,n],o)=>o(i,e,n,this.reversed),[null,r])[1]}reverse(){const e=this.new();e.ops.reverse();const r=[];return e.ops.forEach((i,n)=>{if(i.type==="scale"||r.some(([a,u])=>n>=a&&n<=u))return;const o=e.ops.findIndex((a,u)=>a.type==="scale"&&u>n);o!==-1&&r.push([n,o])}),r.forEach(([i,n])=>{const o=e.ops.slice(i,n);o.unshift(e.ops[n]),e.ops.splice(i,n-i+1,...o)}),e.reversed=!e.reversed,e}get transform(){return{scale:this.dim(1),offset:this.pos(0)}}static IDENTITY=new Be},ob=class ce{x;y;currRoot;constructor(e=new lo,r=new lo,i=null){this.x=e,this.y=r,this.currRoot=i}static translate(e,r){return new ce().translate(e,r)}static translateX(e){return new ce().translateX(e)}static translateY(e){return new ce().translateY(e)}static clamp(e){return new ce().clamp(e)}static magnify(e){return new ce().magnify(e)}static scale(e){return new ce().scale(e)}static reBound(e){return new ce().reBound(e)}translate(e,r){const i=E(e,r),n=this.copy();return n.x=this.x.translate(i.x),n.y=this.y.translate(i.y),n}translateX(e){const r=this.copy();return r.x=this.x.translate(e),r}translateY(e){const r=this.copy();return r.y=this.y.translate(e),r}magnify(e){const r=this.copy();return r.x=this.x.magnify(e.x),r.y=this.y.magnify(e.y),r}scale(e){const r=this.copy();if(bl(e)){const i=this.currRoot;return r.currRoot=e.root,i!=null&&!cl(i,e.root)&&(i.x!==e.root.x&&(r.x=r.x.invert()),i.y!==e.root.y&&(r.y=r.y.invert())),r.x=r.x.scale(Et(e)),r.y=r.y.scale(At(e)),r}return r.x=r.x.scale(e.width),r.y=r.y.scale(e.height),r}reBound(e){const r=this.copy();return r.x=this.x.reBound(Et(e)),r.y=this.y.reBound(At(e)),r}clamp(e){const r=this.copy();return r.x=this.x.clamp(Et(e)),r.y=this.y.clamp(At(e)),r}copy(){const e=new ce;return e.currRoot=this.currRoot,e.x=this.x,e.y=this.y,e}reverse(){const e=this.copy();return e.x=this.x.reverse(),e.y=this.y.reverse(),e}pos(e){return{x:this.x.pos(e.x),y:this.y.pos(e.y)}}dim(e){return{x:this.x.dim(e.x),y:this.y.dim(e.y)}}box(e){return P(this.pos(e.one),this.pos(e.two),0,0,this.currRoot??e.root)}get transform(){return{scale:this.dim({x:1,y:1}),offset:this.pos({x:0,y:0})}}static IDENTITY=new ce},_l=(t,e=21)=>(r=e)=>{let i="",n=r|0;for(;n--;)i+=t[Math.random()*t.length|0];return i};const Il="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",qh=`0123456789${Il}`,kl=11,Kh=_l(Il,1),Yh=_l(qh,kl-1),Sl=()=>`${Kh()}${Yh()}`,Cn=Object.freeze(Object.defineProperty({__proto__:null,LENGTH:kl,create:Sl},Symbol.toStringTag,{value:"Module"})),Xh=(t,e)=>r=>r instanceof e||typeof r=="object"&&r!==null&&"discriminator"in r&&r.discriminator===t,Hh=J(["static","dynamic"]),Mn=2n**63n-1n,Qh=2**63-1,fo=365,Ut=30,ev=F([me([fe()]),me([fe(),fe().min(1).max(12)]),me([fe(),fe().min(1).max(12),fe().min(1).max(31)])]),Ol=(t,e)=>{const r=new v(e);if(![T.DAY,T.HOUR,T.MINUTE,T.SECOND,T.MILLISECOND,T.MICROSECOND,T.NANOSECOND].some(n=>n.equals(r)))throw new Error("Invalid argument for remainder. Must be an even TimeSpan or Timestamp");const i=t.valueOf()%r.valueOf();return t instanceof v?new v(i):new T(i)};class v extends He{constructor(e,r="UTC"){if(e==null)super(v.now().valueOf());else if(e instanceof Date)super(BigInt(e.getTime())*v.MILLISECOND.valueOf());else if(typeof e=="string")super(v.parseDateTimeString(e,r).valueOf());else if(Array.isArray(e))super(v.parseDate(e));else{let i=0n;e instanceof Number&&(e=e.valueOf()),r==="local"&&(i=v.utcOffset.valueOf()),typeof e=="number"&&(isFinite(e)?e===Qh?e=Mn:e=Math.trunc(e):(isNaN(e)&&(e=0),e===1/0?e=v.MAX:e=v.MIN)),re(e)&&(e=e.value),super(BigInt(e.valueOf())+i)}}static parseDate([e=1970,r=1,i=1]){const n=new Date(e,r-1,i,0,0,0,0);return new v(BigInt(n.getTime())*v.MILLISECOND.valueOf()).truncate(v.DAY).valueOf()}valueOf(){return this.value}static parseTimeString(e,r="UTC"){const[i,n,o]=e.split(":");let a="00",u="00";o!=null&&([a,u]=o.split("."));let s=v.hours(parseInt(i??"00")).add(v.minutes(parseInt(n??"00"))).add(v.seconds(parseInt(a??"00"))).add(v.milliseconds(parseInt(u??"00")));return r==="local"&&(s=s.add(v.utcOffset)),s.valueOf()}static parseDateTimeString(e,r="UTC"){if(!e.includes("/")&&!e.includes("-"))return v.parseTimeString(e,r);if(e.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?$/)!=null){let n=e,o=0;if(e.includes(".")){const c=e.split(".");n=c[0];const d=c[1]||"0";o=parseInt(d.padEnd(3,"0").slice(0,3))}const a=r==="local"?new Date(n.replace("T"," ")):new Date(`${n}Z`),u=BigInt(a.getTime())*v.MILLISECOND.valueOf(),s=BigInt(o)*v.MILLISECOND.valueOf();return u+s}const i=new Date(e);return e.includes(":")||i.setUTCHours(0,0,0,0),new v(BigInt(i.getTime())*v.MILLISECOND.valueOf(),r).valueOf()}toISOString(e="UTC"){return e==="UTC"?this.date().toISOString():this.sub(v.utcOffset).date().toISOString()}timeString(e=!1,r="UTC"){const i=this.toISOString(r);return e?i.slice(11,23):i.slice(11,19)}dateString(){const e=this.date(),r=e.toLocaleString("default",{month:"short"}),i=e.toLocaleString("default",{day:"numeric"});return`${r} ${i}`}static get utcOffset(){return new T(BigInt(new Date().getTimezoneOffset())*v.MINUTE.valueOf())}static since(e){return new v().span(e)}date(){return new Date(this.milliseconds)}equals(e){return this.valueOf()===new v(e).valueOf()}span(e){return this.range(e).span}range(e){return new st(this,e).makeValid()}spanRange(e){return this.range(this.add(e)).makeValid()}get isZero(){return this.valueOf()===0n}after(e){return this.valueOf()>new v(e).valueOf()}afterEq(e){return this.valueOf()>=new v(e).valueOf()}before(e){return this.valueOf()<new v(e).valueOf()}beforeEq(e){return this.valueOf()<=new v(e).valueOf()}add(e){return new v(vn(this.valueOf(),new T(e).valueOf()))}sub(e){return new v(hn(this.valueOf(),new T(e).valueOf()))}get hours(){return Number(this.valueOf())/Number(T.HOUR.valueOf())}get minutes(){return Number(this.valueOf())/Number(T.MINUTE.valueOf())}get days(){return Number(this.valueOf())/Number(T.DAY.valueOf())}get seconds(){return Number(this.valueOf())/Number(T.SECOND.valueOf())}get milliseconds(){return Number(this.valueOf())/Number(v.MILLISECOND.valueOf())}get microseconds(){return Number(this.valueOf())/Number(v.MICROSECOND.valueOf())}get nanoseconds(){return Number(this.valueOf())}get year(){return this.date().getUTCFullYear()}setYear(e){const r=this.date();return r.setUTCFullYear(e),new v(r)}get month(){return this.date().getUTCMonth()}setMonth(e){const r=this.date();return r.setUTCMonth(e),new v(r)}get day(){return this.date().getUTCDate()}setDay(e){const r=this.date();return r.setUTCDate(e),new v(r)}get hour(){return this.date().getUTCHours()}get localHour(){return this.date().getHours()}setLocalHour(e){const r=this.date();return r.setHours(e),new v(r)}setHour(e){const r=this.date();return r.setUTCHours(e),new v(r)}get minute(){return this.date().getUTCMinutes()}setMinute(e){const r=this.date();return r.setUTCMinutes(e),new v(r)}get second(){return this.date().getUTCSeconds()}setSecond(e){const r=this.date();return r.setUTCSeconds(e),new v(r)}get millisecond(){return this.date().getUTCMilliseconds()}setMillisecond(e){const r=this.date();return r.setUTCMilliseconds(e),new v(r)}toString(e="ISO",r="UTC"){switch(e){case"ISODate":return this.toISOString(r).slice(0,10);case"ISOTime":return this.toISOString(r).slice(11,23);case"time":return this.timeString(!1,r);case"preciseTime":return this.timeString(!0,r);case"date":return this.dateString();case"preciseDate":return`${this.dateString()} ${this.timeString(!0,r)}`;case"dateTime":return`${this.dateString()} ${this.timeString(!1,r)}`;default:return this.toISOString(r)}}remainder(e){return Ol(this,e)}get isToday(){return this.truncate(T.DAY).equals(v.now().truncate(T.DAY))}truncate(e){return this.sub(this.remainder(e))}formatBySpan(e){return e.greaterThanOrEqual(T.days(30))?"shortDate":e.greaterThanOrEqual(T.DAY)?"dateTime":e.greaterThanOrEqual(T.HOUR)?"time":e.greaterThanOrEqual(T.SECOND)?"preciseTime":"ISOTime"}static now(){return new v(new Date)}static max(...e){let r=v.MIN;for(const i of e){const n=new v(i);n.after(r)&&(r=n)}return r}static min(...e){let r=v.MAX;for(const i of e){const n=new v(i);n.before(r)&&(r=n)}return r}static nanoseconds(e,r="UTC"){return new v(e,r)}static NANOSECOND=v.nanoseconds(1);static microseconds(e,r="UTC"){return v.nanoseconds(e*1e3,r)}static MICROSECOND=v.microseconds(1);static milliseconds(e,r="UTC"){return v.microseconds(e*1e3,r)}static MILLISECOND=v.milliseconds(1);static seconds(e,r="UTC"){return v.milliseconds(e*1e3,r)}static SECOND=v.seconds(1);static minutes(e,r="UTC"){return v.seconds(e*60,r)}static MINUTE=v.minutes(1);static hours(e,r="UTC"){return v.minutes(e*60,r)}static HOUR=v.hours(1);static days(e,r="UTC"){return v.hours(e*24,r)}static DAY=v.days(1);static MAX=new v(Mn);static MIN=new v(0);static ZERO=new v(0);static z=F([W(v),U({value:ve()}).transform(e=>new v(e.value)),A().transform(e=>new v(BigInt(e))),O().transform(e=>new v(e)),ve().transform(e=>new v(e)),wc().transform(e=>new v(e)),Ni(e=>e instanceof T).transform(e=>new v(e)),ev.transform(e=>new v(e))]);static sort(e,r){return Number(e.valueOf()-r.valueOf())}}let T=class _ extends He{constructor(e){typeof e=="number"&&(e=Math.trunc(e.valueOf())),re(e)&&(e=e.value),super(BigInt(e.valueOf()))}static fromSeconds(e){return e instanceof _?e:e instanceof X?e.period:e instanceof v?new _(e):(re(e)&&(e=e.value),["number","bigint"].includes(typeof e)?_.seconds(e):new _(e))}static fromMilliseconds(e){return e instanceof _?e:e instanceof X?e.period:e instanceof v?new _(e):(re(e)&&(e=e.value),["number","bigint"].includes(typeof e)?_.milliseconds(e):new _(e))}valueOf(){return this.value}lessThan(e){return this.valueOf()<new _(e).valueOf()}greaterThan(e){return this.valueOf()>new _(e).valueOf()}lessThanOrEqual(e){return this.valueOf()<=new _(e).valueOf()}greaterThanOrEqual(e){return this.valueOf()>=new _(e).valueOf()}remainder(e){return Ol(this,e)}truncate(e){return new _(BigInt(Math.trunc(Number(this.valueOf()/e.valueOf())))*e.valueOf())}toString(e="full"){if(e==="semantic")return this.toSemanticString();const r=this.truncate(_.DAY),i=this.truncate(_.HOUR),n=this.truncate(_.MINUTE),o=this.truncate(_.SECOND),a=this.truncate(_.MILLISECOND),u=this.truncate(_.MICROSECOND),s=this.truncate(_.NANOSECOND),c=r,d=i.sub(r),m=n.sub(i),h=o.sub(n),b=a.sub(o),f=u.sub(a),w=s.sub(u);let $="";return c.isZero||($+=`${c.days}d `),d.isZero||($+=`${d.hours}h `),m.isZero||($+=`${m.minutes}m `),h.isZero||($+=`${h.seconds}s `),b.isZero||($+=`${b.milliseconds}ms `),f.isZero||($+=`${f.microseconds}µs `),w.isZero||($+=`${w.nanoseconds}ns`),$.trim()}toSemanticString(){const e=this.valueOf()<0n?-this.valueOf():this.valueOf(),r=new _(e),i=this.valueOf()<0n;if(r.valueOf()===0n)return"0s";if(r.lessThan(_.SECOND))return"< 1s";const n=r.days,o=r.hours,a=r.minutes,u=r.seconds,s=Math.floor(n/fo),c=Math.floor(n/Ut),d=Math.floor(n/7),m=Math.floor(n),h=Math.floor(o),b=Math.floor(a),f=Math.floor(u),w=i?"-":"";if(s>=1){let $=`${s}y`;if(s<2){const I=Math.floor(n%fo/Ut);I>0&&($+=` ${I}mo`)}return w+$}if(d>=1&&n<Ut&&n%7===0){let $=`${d}w`;const I=Math.floor(n%7),x=Math.floor(o-d*7*24);return d<2&&(I>0?$+=` ${I}d`:x>0&&x<24&&($+=` ${x}h`)),w+$}if(c>=1){let $=`${c}mo`;if(c<3){const I=Math.floor(n%Ut);I>0&&($+=` ${I}d`)}return w+$}if(d>=1){let $=`${d}w`;const I=Math.floor(n%7),x=Math.floor(o-d*7*24);return d<2&&(I>0?$+=` ${I}d`:x>0&&x<24&&($+=` ${x}h`)),w+$}if(m>=1){let $=`${m}d`;const I=Math.floor(o-m*24);return m<2&&I>0&&($+=` ${I}h`),w+$}if(h>=1){let $=`${h}h`;if(h<3){const I=Math.floor(a-h*60);I>0&&($+=` ${I}m`)}return w+$}if(b>=1){let $=`${b}m`;if(b<5){const I=Math.floor(u-b*60);I>0&&($+=` ${I}s`)}return w+$}return`${w}${f}s`}mult(e){return new _(de(this.valueOf(),e))}div(e){return new _(yn(this.valueOf(),e))}get days(){return Number(this.valueOf())/Number(_.DAY.valueOf())}get hours(){return Number(this.valueOf())/Number(_.HOUR.valueOf())}get minutes(){return Number(this.valueOf())/Number(_.MINUTE.valueOf())}get seconds(){return Number(this.valueOf())/Number(_.SECOND.valueOf())}get milliseconds(){return Number(this.valueOf())/Number(_.MILLISECOND.valueOf())}get microseconds(){return Number(this.valueOf())/Number(_.MICROSECOND.valueOf())}get nanoseconds(){return Number(this.valueOf())}get isZero(){return this.valueOf()===0n}equals(e){return this.valueOf()===new _(e).valueOf()}add(e){return new _(this.valueOf()+new _(e).valueOf())}sub(e){return new _(this.valueOf()-new _(e).valueOf())}static nanoseconds(e=1){return new _(e)}static NANOSECOND=_.nanoseconds(1);static microseconds(e=1){return _.nanoseconds(de(e,1e3))}static MICROSECOND=_.microseconds(1);static milliseconds(e=1){return _.microseconds(de(e,1e3))}static MILLISECOND=_.milliseconds(1);static seconds(e=1){return _.milliseconds(de(e,1e3))}static SECOND=_.seconds(1);static minutes(e=1){return _.seconds(de(e,60))}static MINUTE=_.minutes(1);static hours(e){return _.minutes(de(e,60))}static HOUR=_.hours(1);static days(e){return _.hours(de(e,24))}static DAY=_.days(1);static MAX=new _(Mn);static MIN=new _(0);static ZERO=new _(0);static z=F([U({value:ve()}).transform(e=>new _(e.value)),A().transform(e=>new _(BigInt(e))),O().transform(e=>new _(e)),ve().transform(e=>new _(e)),W(_),W(v).transform(e=>new _(e)),Ni(e=>e instanceof X).transform(e=>new _(e))])};class X extends He{constructor(e){re(e)&&(e=e.value),super(e.valueOf())}toString(){return`${this.valueOf()} Hz`}equals(e){return this.valueOf()===new X(e).valueOf()}get period(){return T.seconds(1/this.valueOf())}sampleCount(e){return new T(e).seconds*this.valueOf()}byteCount(e,r){return this.sampleCount(e)*new q(r).valueOf()}span(e){return T.seconds(e/this.valueOf())}byteSpan(e,r){return this.span(e.valueOf()/new q(r).valueOf())}add(e){return new X(vn(this.valueOf(),new X(e).valueOf()))}sub(e){return new X(hn(this.valueOf(),new X(e).valueOf()))}mult(e){return new X(de(this.valueOf(),e))}div(e){return new X(yn(this.valueOf(),e))}static hz(e){return new X(e)}static khz(e){return X.hz(e*1e3)}static z=F([O().transform(e=>new X(e)),W(X)])}let q=class K extends He{constructor(e){re(e)&&(e=e.value),super(e.valueOf())}length(e){return e.valueOf()/this.valueOf()}size(e){return new Ln(e*this.valueOf())}add(e){return new K(vn(this.valueOf(),new K(e).valueOf()))}sub(e){return new K(hn(this.valueOf(),new K(e).valueOf()))}mult(e){return new K(de(this.valueOf(),e))}div(e){return new K(yn(this.valueOf(),e))}static UNKNOWN=new K(0);static BIT128=new K(16);static BIT64=new K(8);static BIT32=new K(4);static BIT16=new K(2);static BIT8=new K(1);static z=F([O().transform(e=>new K(e)),W(K)])},st=class le{start;end;constructor(e,r){typeof e=="object"&&"start"in e?(this.start=new v(e.start),this.end=new v(e.end)):(this.start=new v(e),this.end=new v(r))}get span(){return new T(this.end.valueOf()-this.start.valueOf())}get isValid(){return this.start.valueOf()<=this.end.valueOf()}makeValid(){return this.isValid?this:this.swap()}get isZero(){return this.start.isZero&&this.end.isZero}get numeric(){return{start:Number(this.start.valueOf()),end:Number(this.end.valueOf())}}swap(){return new le(this.end,this.start)}get numericBounds(){return{lower:Number(this.start.valueOf()),upper:Number(this.end.valueOf())}}equals(e,r=T.ZERO){if(r.isZero)return this.start.equals(e.start)&&this.end.equals(e.end);let i=this.start.sub(e.start).valueOf(),n=this.end.sub(e.end).valueOf();return i<0&&(i=-i),n<0&&(n=-n),i<=r.valueOf()&&n<=r.valueOf()}toString(){return`${this.start.toString()} - ${this.end.toString()}`}toPrettyString(){return`${this.start.toString("preciseDate")} - ${this.span.toString()}`}overlapsWith(e,r=T.ZERO){e=e.makeValid();const i=this.makeValid();if(this.equals(e))return!0;if(e.end.equals(i.start)||i.end.equals(e.start))return!1;const n=v.max(i.start,e.start),o=v.min(i.end,e.end);return o.before(n)?!1:new T(o.sub(n)).greaterThanOrEqual(r)}contains(e){return e instanceof le?this.contains(e.start)&&this.contains(e.end):this.start.beforeEq(e)&&this.end.after(e)}boundBy(e){const r=new le(this.start,this.end);return e.start.after(this.start)&&(r.start=e.start),e.start.after(this.end)&&(r.end=e.start),e.end.before(this.end)&&(r.end=e.end),e.end.before(this.start)&&(r.start=e.end),r}static max(...e){return new le(v.min(...e.map(r=>r.start)),v.max(...e.map(r=>r.end)))}static MAX=new le(v.MIN,v.MAX);static ZERO=new le(v.ZERO,v.ZERO);static z=F([U({start:v.z,end:v.z}).transform(e=>new le(e.start,e.end)),W(le)]);static sort(e,r){return v.sort(e.start,r.start)||v.sort(e.end,r.end)}static simplify(e){return e.map(r=>r.makeValid()).sort((r,i)=>le.sort(r,i)).reduce((r,i)=>{if(i.span.isZero)return r;if(r.length===0)return r.push(i),r;const n=r[r.length-1];return n.overlapsWith(i)||n.end.equals(i.start)?n.end=v.max(n.end,i.end):r.push(i),r},[])}},L=class g extends He{constructor(e){if(re(e)&&(e=e.value),e instanceof g||typeof e=="string"||typeof e.valueOf()=="string")super(e.valueOf());else{const r=g.ARRAY_CONSTRUCTOR_DATA_TYPES.get(e.constructor.name);if(r==null)throw new Error(`unable to find data type for ${e.toString()}`);super(r.valueOf())}}get Array(){const e=g.ARRAY_CONSTRUCTORS.get(this.toString());if(e==null)throw new Error(`unable to find array constructor for ${this.valueOf()}`);return e}equals(e){return this.valueOf()===e.valueOf()}matches(...e){return e.some(r=>this.equals(r))}toString(e=!1){return e?g.SHORT_STRINGS.get(this.valueOf())??this.valueOf():this.valueOf()}get isVariable(){return this.equals(g.JSON)||this.equals(g.STRING)}get isNumeric(){return!this.isVariable&&!this.equals(g.UUID)}get isInteger(){const e=this.toString();return e.startsWith("int")||e.startsWith("uint")}get isFloat(){return this.toString().startsWith("float")}get density(){const e=g.DENSITIES.get(this.toString());if(e==null)throw new Error(`unable to find density for ${this.valueOf()}`);return e}get isUnsignedInteger(){return this.equals(g.UINT8)||this.equals(g.UINT16)||this.equals(g.UINT32)||this.equals(g.UINT64)}get isSignedInteger(){return this.equals(g.INT8)||this.equals(g.INT16)||this.equals(g.INT32)||this.equals(g.INT64)}canSafelyCastTo(e){return this.equals(e)?!0:!this.isNumeric||!e.isNumeric||this.isVariable||e.isVariable||this.isUnsignedInteger&&e.isSignedInteger?!1:this.isFloat?e.isFloat&&this.density.valueOf()<=e.density.valueOf():this.equals(g.INT32)&&e.equals(g.FLOAT64)||this.equals(g.INT8)&&e.equals(g.FLOAT32)?!0:this.isInteger&&e.isInteger?this.density.valueOf()<=e.density.valueOf()&&this.isUnsignedInteger===e.isUnsignedInteger:!1}canCastTo(e){return this.isNumeric&&e.isNumeric?!0:this.equals(e)}checkArray(e){return e.constructor===this.Array}get usesBigInt(){return g.BIG_INT_TYPES.some(e=>e.equals(this))}static UNKNOWN=new g("unknown");static FLOAT64=new g("float64");static FLOAT32=new g("float32");static INT64=new g("int64");static INT32=new g("int32");static INT16=new g("int16");static INT8=new g("int8");static UINT64=new g("uint64");static UINT32=new g("uint32");static UINT16=new g("uint16");static UINT8=new g("uint8");static BOOLEAN=new g("boolean");static TIMESTAMP=new g("timestamp");static UUID=new g("uuid");static STRING=new g("string");static JSON=new g("json");static ARRAY_CONSTRUCTORS=new Map([[g.UINT8.toString(),Uint8Array],[g.UINT16.toString(),Uint16Array],[g.UINT32.toString(),Uint32Array],[g.UINT64.toString(),BigUint64Array],[g.FLOAT32.toString(),Float32Array],[g.FLOAT64.toString(),Float64Array],[g.INT8.toString(),Int8Array],[g.INT16.toString(),Int16Array],[g.INT32.toString(),Int32Array],[g.INT64.toString(),BigInt64Array],[g.TIMESTAMP.toString(),BigInt64Array],[g.STRING.toString(),Uint8Array],[g.JSON.toString(),Uint8Array],[g.UUID.toString(),Uint8Array]]);static ARRAY_CONSTRUCTOR_DATA_TYPES=new Map([[Uint8Array.name,g.UINT8],[Uint16Array.name,g.UINT16],[Uint32Array.name,g.UINT32],[BigUint64Array.name,g.UINT64],[Float32Array.name,g.FLOAT32],[Float64Array.name,g.FLOAT64],[Int8Array.name,g.INT8],[Int16Array.name,g.INT16],[Int32Array.name,g.INT32],[BigInt64Array.name,g.INT64]]);static DENSITIES=new Map([[g.UINT8.toString(),q.BIT8],[g.UINT16.toString(),q.BIT16],[g.UINT32.toString(),q.BIT32],[g.UINT64.toString(),q.BIT64],[g.FLOAT32.toString(),q.BIT32],[g.FLOAT64.toString(),q.BIT64],[g.INT8.toString(),q.BIT8],[g.INT16.toString(),q.BIT16],[g.INT32.toString(),q.BIT32],[g.INT64.toString(),q.BIT64],[g.TIMESTAMP.toString(),q.BIT64],[g.STRING.toString(),q.UNKNOWN],[g.JSON.toString(),q.UNKNOWN],[g.UUID.toString(),q.BIT128]]);static ALL=[g.UNKNOWN,g.FLOAT64,g.FLOAT32,g.INT64,g.INT32,g.INT16,g.INT8,g.UINT64,g.UINT32,g.UINT16,g.UINT8,g.TIMESTAMP,g.UUID,g.STRING,g.JSON];static SHORT_STRINGS=new Map([[g.UINT8.toString(),"u8"],[g.UINT16.toString(),"u16"],[g.UINT32.toString(),"u32"],[g.UINT64.toString(),"u64"],[g.INT8.toString(),"i8"],[g.INT16.toString(),"i16"],[g.INT32.toString(),"i32"],[g.INT64.toString(),"i64"],[g.FLOAT32.toString(),"f32"],[g.FLOAT64.toString(),"f64"],[g.BOOLEAN.toString(),"bool"],[g.TIMESTAMP.toString(),"ts"],[g.UUID.toString(),"uuid"],[g.STRING.toString(),"str"],[g.JSON.toString(),"json"]]);static BIG_INT_TYPES=[g.INT64,g.UINT64,g.TIMESTAMP];static z=F([A().transform(e=>new g(e)),W(g)])},Ln=class j extends He{constructor(e){re(e)&&(e=e.value),super(e.valueOf())}largerThan(e){return re(e)&&(e=e.value),this.valueOf()>e.valueOf()}smallerThan(e){return re(e)&&(e=e.value),this.valueOf()<e.valueOf()}add(e){return re(e)&&(e=e.value),new j(vn(this.valueOf(),e.valueOf()))}sub(e){return re(e)&&(e=e.value),new j(hn(this.valueOf(),e.valueOf()))}mult(e){return new j(de(this.valueOf(),e))}div(e){return new j(yn(this.valueOf(),e))}truncate(e){return new j(Math.trunc(this.valueOf()/new j(e).valueOf())*new j(e).valueOf())}remainder(e){return j.bytes(this.valueOf()%new j(e).valueOf())}get gigabytes(){return this.valueOf()/j.GIGABYTE.valueOf()}get megabytes(){return this.valueOf()/j.MEGABYTE.valueOf()}get kilobytes(){return this.valueOf()/j.KILOBYTE.valueOf()}get terabytes(){return this.valueOf()/j.TERABYTE.valueOf()}toString(){const e=this.truncate(j.TERABYTE),r=this.truncate(j.GIGABYTE),i=this.truncate(j.MEGABYTE),n=this.truncate(j.KILOBYTE),o=this.truncate(j.BYTE),a=e,u=r.sub(e),s=i.sub(r),c=n.sub(i),d=o.sub(n);let m="";return a.isZero||(m+=`${a.terabytes}TB `),u.isZero||(m+=`${u.gigabytes}GB `),s.isZero||(m+=`${s.megabytes}MB `),c.isZero||(m+=`${c.kilobytes}KB `),(!d.isZero||m==="")&&(m+=`${d.valueOf()}B`),m.trim()}static bytes(e=1){return new j(e)}static BYTE=new j(1);static kilobytes(e=1){return j.bytes(new j(e).valueOf()*1e3)}static KILOBYTE=j.kilobytes(1);static megabytes(e=1){return j.kilobytes(new j(e).valueOf()*1e3)}static MEGABYTE=j.megabytes(1);static gigabytes(e=1){return j.megabytes(new j(e).valueOf()*1e3)}static GIGABYTE=j.gigabytes(1);static terabytes(e){return j.gigabytes(new j(e).valueOf()*1e3)}static TERABYTE=j.terabytes(1);static ZERO=new j(0);static z=F([O().transform(e=>new j(e)),W(j)]);get isZero(){return this.valueOf()===0}};U({start:O(),end:O()});F([W(Uint8Array),W(Uint16Array),W(Uint32Array),W(BigUint64Array),W(Float32Array),W(Float64Array),W(Int8Array),W(Int16Array),W(Int32Array),W(BigInt64Array)]);const zl=t=>{const e=typeof t;return e==="string"||e==="number"||e==="boolean"||e==="bigint"||t instanceof v||t instanceof T||t instanceof Date},tv=(t,e,r,i=0)=>t.usesBigInt&&!e.usesBigInt?Number(r)-Number(i):!t.usesBigInt&&e.usesBigInt?BigInt(r.valueOf())-BigInt(i.valueOf()):Zt(r,-i),Zt=(t,e)=>e==0?t:t==0?e:typeof t=="bigint"&&typeof e=="bigint"||typeof t=="number"&&typeof e=="number"?t+e:Number(t)+Number(e),nv=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function rv(t){return typeof t=="string"&&nv.test(t)}const G=[];for(let t=0;t<256;++t)G.push((t+256).toString(16).slice(1));function iv(t,e=0){return(G[t[e+0]]+G[t[e+1]]+G[t[e+2]]+G[t[e+3]]+"-"+G[t[e+4]]+G[t[e+5]]+"-"+G[t[e+6]]+G[t[e+7]]+"-"+G[t[e+8]]+G[t[e+9]]+"-"+G[t[e+10]]+G[t[e+11]]+G[t[e+12]]+G[t[e+13]]+G[t[e+14]]+G[t[e+15]]).toLowerCase()}function ov(t,e=0){const r=iv(t,e);if(!rv(r))throw TypeError("Stringified UUID is invalid");return r}typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const xl=(t,e)=>ov(t,e),$e=-1,av=A().transform(t=>new Uint8Array(atob(t).split("").map(e=>e.charCodeAt(0))).buffer),uv=F([bi(),pc()]).transform(()=>new Uint8Array().buffer),Wn=10,sv=(t,e)=>{if(t==="number"&&!e.isNumeric)throw new Error(`cannot convert series of type ${e.toString()} to number`);if(t==="bigint"&&!e.usesBigInt)throw new Error(`cannot convert series of type ${e.toString()} to bigint`)},Nl="sy_x_telem_series";let jl=class we{key;discriminator=Nl;dataType;sampleOffset;gl;_data;timeRange=st.ZERO;alignment=0n;alignmentMultiple=1n;cachedMin;cachedMax;writePos=$e;_refCount=0;cachedLength;_cachedIndexes;static crudeZ=U({timeRange:st.z.optional(),dataType:L.z,alignment:Xc().optional(),data:F([av,uv,W(ArrayBuffer),W(Uint8Array)]),glBufferUsage:Hh.optional().default("static").optional()});static z=we.crudeZ.transform(e=>new we(e));constructor(e){cv(e)&&(e={data:e}),e.data??=[];const{dataType:r,timeRange:i,sampleOffset:n=0,glBufferUsage:o="static",alignment:a=0n,alignmentMultiple:u=1n,key:s=Sl(),data:c}=e;if(lv(c)){const h=c;this.key=h.key,this.dataType=h.dataType,this.sampleOffset=h.sampleOffset,this.gl=h.gl,this._data=h._data,this.timeRange=h.timeRange,this.alignment=h.alignment,this.alignmentMultiple=h.alignmentMultiple,this.cachedMin=h.cachedMin,this.cachedMax=h.cachedMax,this.writePos=h.writePos,this._refCount=h._refCount,this.cachedLength=h.cachedLength;return}const d=zl(c),m=Array.isArray(c);if(r!=null)this.dataType=new L(r);else{if(c instanceof ArrayBuffer)throw new Error("cannot infer data type from an ArrayBuffer instance when constructing a Series. Please provide a data type.");if(m||d){let h=c;if(!d){if(c.length===0)throw new Error("cannot infer data type from a zero length JS array when constructing a Series. Please provide a data type.");h=c[0]}if(typeof h=="string")this.dataType=L.STRING;else if(typeof h=="number")this.dataType=L.FLOAT64;else if(typeof h=="bigint")this.dataType=L.INT64;else if(typeof h=="boolean")this.dataType=L.BOOLEAN;else if(h instanceof v||h instanceof Date||h instanceof v)this.dataType=L.TIMESTAMP;else if(typeof h=="object")this.dataType=L.JSON;else throw new Error(`cannot infer data type of ${typeof h} when constructing a Series from a JS array`)}else this.dataType=new L(c)}if(!m&&!d)this._data=c;else if(m&&c.length===0)this._data=new this.dataType.Array([]).buffer;else{let h=d?[c]:c;const b=h[0];(b instanceof v||b instanceof Date||b instanceof T)&&(h=h.map(f=>new v(f).valueOf())),this.dataType.equals(L.STRING)?(this.cachedLength=h.length,this._data=new TextEncoder().encode(`${h.join(`
|
|
24
|
+
`)}
|
|
25
|
+
`).buffer):this.dataType.equals(L.JSON)?(this.cachedLength=h.length,this._data=new TextEncoder().encode(`${h.map(f=>En.encodeString(f)).join(`
|
|
26
|
+
`)}
|
|
27
|
+
`).buffer):this.dataType.usesBigInt&&typeof b=="number"?this._data=new this.dataType.Array(h.map(f=>BigInt(Math.round(f)))).buffer:!this.dataType.usesBigInt&&typeof b=="bigint"?this._data=new this.dataType.Array(h.map(Number)).buffer:this._data=new this.dataType.Array(h).buffer}this.key=s,this.alignment=a,this.alignmentMultiple=u,this.sampleOffset=n??0,this.timeRange=i??st.ZERO,this.gl={control:null,buffer:null,prevBuffer:0,bufferUsage:o}}static alloc({capacity:e,dataType:r,...i}){if(e===0)throw new Error("[Series] - cannot allocate an array of length 0");const n=new new L(r).Array(e),o=new we({data:n.buffer,dataType:r,...i});return o.writePos=0,o}get refCount(){return this._refCount}acquire(e){this._refCount++,e!=null&&this.updateGLBuffer(e)}release(){this._refCount--,this.refCount===0&&this.gl.control!=null?this.maybeGarbageCollectGLBuffer(this.gl.control):this.refCount<0&&console.warn("cannot release a series with a negative reference count")}write(e){if(!e.dataType.equals(this.dataType))throw new Error("buffer must be of the same type as this array");return this.dataType.isVariable?this.writeVariable(e):this.writeFixed(e)}writeVariable(e){if(this.writePos===$e)return 0;const r=this.byteCapacity.valueOf()-this.writePos,i=e.subBytes(0,r);return this.writeToUnderlyingData(i),this.writePos+=i.byteLength.valueOf(),this.cachedLength!=null&&(this.cachedLength+=i.length,this.calculateCachedLength()),i.length}writeFixed(e){if(this.writePos===$e)return 0;const r=this.capacity-this.writePos,i=e.sub(0,r);return this.writeToUnderlyingData(i),this.cachedLength=void 0,this.maybeRecomputeMinMax(i),this.writePos+=i.length,i.length}writeToUnderlyingData(e){this.underlyingData.set(e.data,this.writePos)}get buffer(){return typeof this._data=="object"&&"buffer"in this._data?this._data.buffer:this._data}get underlyingData(){return new this.dataType.Array(this._data)}get data(){return this.writePos===$e?this.underlyingData:new this.dataType.Array(this._data,0,this.writePos)}toStrings(){return this.dataType.isVariable?new TextDecoder().decode(this.underlyingData).split(`
|
|
28
|
+
`).slice(0,-1):Array.from(this).map(e=>e.toString())}parseJSON(e){if(!this.dataType.equals(L.JSON))throw new Error("cannot parse non-JSON series as JSON");return this.toStrings().map(r=>e.parse(En.decodeString(r)))}get byteCapacity(){return new Ln(this.underlyingData.byteLength)}get capacity(){return this.dataType.isVariable?this.byteCapacity.valueOf():this.dataType.density.length(this.byteCapacity)}get byteLength(){return this.writePos===$e?this.byteCapacity:this.dataType.isVariable?new Ln(this.writePos):this.dataType.density.size(this.writePos)}get length(){return this.cachedLength!=null?this.cachedLength:this.dataType.isVariable?this.calculateCachedLength():this.writePos===$e?this.byteCapacity.valueOf()/this.dataType.density.valueOf():this.writePos}calculateCachedLength(){if(!this.dataType.isVariable)throw new Error("cannot calculate length of a non-variable length data type");let e=0;const r=[0];return this.data.forEach((i,n)=>{i===Wn&&(e++,r.push(n+1))}),this._cachedIndexes=r,this.cachedLength=e,e}convert(e,r=0){if(this.dataType.equals(e))return this;const i=new e.Array(this.length);for(let n=0;n<this.length;n++)i[n]=tv(this.dataType,e,this.data[n],r);return new we({data:i.buffer,dataType:e,timeRange:this.timeRange,sampleOffset:r,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment})}calcRawMax(){if(this.length===0)return-1/0;if(this.dataType.equals(L.TIMESTAMP))this.cachedMax=this.data[this.data.length-1];else if(this.dataType.usesBigInt){const e=this.data;this.cachedMax=e.reduce((r,i)=>r>i?r:i)}else{const e=this.data;this.cachedMax=e.reduce((r,i)=>r>i?r:i)}return this.cachedMax}get max(){return this.calcMax()}calcMax(){if(this.dataType.isVariable)throw new Error("cannot calculate maximum on a variable length data type");return this.writePos===0?-1/0:(this.cachedMax??=this.calcRawMax(),Zt(this.cachedMax,this.sampleOffset))}calcRawMin(){if(this.length===0)return 1/0;if(this.dataType.equals(L.TIMESTAMP))this.cachedMin=this.data[0];else if(this.dataType.usesBigInt){const e=this.data;this.cachedMin=e.reduce((r,i)=>r<i?r:i)}else{const e=this.data;this.cachedMin=e.reduce((r,i)=>r<i?r:i)}return this.cachedMin}get min(){return this.calcMin()}calcMin(){if(this.dataType.isVariable)throw new Error("cannot calculate minimum on a variable length data type");return this.writePos===0?1/0:(this.cachedMin??=this.calcRawMin(),Zt(this.cachedMin,this.sampleOffset))}get bounds(){return Ee(Number(this.min),Number(this.max),{makeValid:!1})}maybeRecomputeMinMax(e){if(this.cachedMin!=null){const r=e.cachedMin??e.calcRawMin();r<this.cachedMin&&(this.cachedMin=r)}if(this.cachedMax!=null){const r=e.cachedMax??e.calcRawMax();r>this.cachedMax&&(this.cachedMax=r)}}atAlignment(e,r){const i=Number((e-this.alignment)/this.alignmentMultiple);if(i<0||i>=this.length){if(r===!0)throw new Error(`[series] - no value at index ${i}`);return}return this.at(i,r)}at(e,r=!1){if(this.dataType.isVariable)return this.atVariable(e,r??!1);if(this.dataType.equals(L.UUID))return this.atUUID(e,r);e<0&&(e=this.length+e);const i=this.data[e];if(i==null){if(r===!0)throw new Error(`[series] - no value at index ${e}`);return}return Zt(i,this.sampleOffset)}atUUID(e,r){e<0&&(e=this.length+e);const i=xl(new Uint8Array(this.buffer,e*this.dataType.density.valueOf()));if(i==null){if(r)throw new Error(`[series] - no value at index ${e}`);return}return i}atVariable(e,r){let i=0,n=0;if(this._cachedIndexes!=null)i=this._cachedIndexes[e],n=this._cachedIndexes[e+1]-1;else{e<0&&(e=this.length+e);for(let a=0;a<this.data.length;a++)if(this.data[a]===Wn){if(e===0){n=a;break}i=a+1,e--}if(n===0&&(n=this.data.length),i>=n||e>0){if(r)throw new Error(`[series] - no value at index ${e}`);return}}const o=this.data.slice(i,n);return this.dataType.equals(L.STRING)?new TextDecoder().decode(o):Qc(JSON.parse(new TextDecoder().decode(o)))}binarySearch(e){let r=0,i=this.length-1;const n=Sp(e);for(;r<=i;){const o=Math.floor((r+i)/2),a=n(this.at(o,!0),e);if(a===0)return o;a<0?r=o+1:i=o-1}return r}updateGLBuffer(e){if(this.gl.control=e,!this.dataType.equals(L.FLOAT32)&&!this.dataType.equals(L.UINT8))throw new Error("Only FLOAT32 and UINT8 arrays can be used in WebGL");const{buffer:r,bufferUsage:i,prevBuffer:n}=this.gl;if(r==null&&(this.gl.buffer=e.createBuffer()),this.writePos!==n)if(e.bindBuffer(e.ARRAY_BUFFER,this.gl.buffer),this.writePos!==$e){n===0&&e.bufferData(e.ARRAY_BUFFER,this.byteCapacity.valueOf(),e.STATIC_DRAW);const o=this.dataType.density.size(n).valueOf(),a=this.underlyingData.slice(this.gl.prevBuffer,this.writePos);e.bufferSubData(e.ARRAY_BUFFER,o,a.buffer),this.gl.prevBuffer=this.writePos}else e.bufferData(e.ARRAY_BUFFER,this.buffer,i==="static"?e.STATIC_DRAW:e.DYNAMIC_DRAW),this.gl.prevBuffer=$e}as(e){return sv(e,this.dataType),this}get digest(){return{key:this.key,dataType:this.dataType.toString(),sampleOffset:this.sampleOffset,alignment:{lower:go(this.alignmentBounds.lower),upper:go(this.alignmentBounds.upper),multiple:this.alignmentMultiple},timeRange:this.timeRange.toString(),length:this.length,capacity:this.capacity}}get alignmentBounds(){return Ee(this.alignment,this.alignment+BigInt(this.length)*this.alignmentMultiple)}maybeGarbageCollectGLBuffer(e){this.gl.buffer!=null&&(e.deleteBuffer(this.gl.buffer),this.gl.buffer=null,this.gl.prevBuffer=0,this.gl.control=null)}get glBuffer(){if(this.gl.buffer==null)throw new Error("gl buffer not initialized");return this.gl.prevBuffer!==this.writePos&&console.warn("buffer not updated"),this.gl.buffer}[Symbol.iterator](){if(this.dataType.isVariable){const e=new dv(this);return this.dataType.equals(L.JSON)?new fv(e):e}return this.dataType.equals(L.UUID)?new mv(this):new gv(this)}slice(e,r){return this.sliceSub(!1,e,r)}sub(e,r){return this.sliceSub(!0,e,r)}subIterator(e,r){return new mo(this,e,r??this.length)}subAlignmentIterator(e,r){const i=Math.ceil(Number(e-this.alignment)/Number(this.alignmentMultiple)),n=Math.ceil(Number(r-this.alignment)/Number(this.alignmentMultiple));return new mo(this,i,n)}subBytes(e,r){if(e>=0&&(r==null||r>=this.byteLength.valueOf()))return this;const i=this.data.subarray(e,r);return new we({data:i,dataType:this.dataType,timeRange:this.timeRange,sampleOffset:this.sampleOffset,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment+BigInt(e)})}sliceSub(e,r,i){if(r<=0&&(i==null||i>=this.length))return this;let n;return e?n=this.data.subarray(r,i):n=this.data.slice(r,i),new we({data:n,dataType:this.dataType,timeRange:this.timeRange,sampleOffset:this.sampleOffset,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment+BigInt(r)})}reAlign(e){return new we({data:this.buffer,dataType:this.dataType,timeRange:st.ZERO,sampleOffset:this.sampleOffset,glBufferUsage:"static",alignment:e})}toString(){let e=`Series(${this.dataType.toString()} ${this.length} [`;if(this.length<=10)e+=Array.from(this).map(r=>r.toString());else{for(let r=0;r<5;r++)e+=`${this.at(r)?.toString()}`,e+=",";e+="...,";for(let r=-5;r<0;r++)e+=this.at(r)?.toString(),r<-1&&(e+=",")}return e+="])",e}};const cv=t=>t==null?!1:Array.isArray(t)||t instanceof ArrayBuffer||ArrayBuffer.isView(t)&&!(t instanceof DataView)||t instanceof jl?!0:zl(t),lv=Xh(Nl,jl);class mo{series;end;index;constructor(e,r,i){this.series=e;const n=Ee(0,e.length+1);this.end=co(n,i),this.index=co(n,r)}next(){return this.index>=this.end?{done:!0,value:void 0}:{done:!1,value:this.series.at(this.index++,!0)}}}let dv=class{series;index;decoder;constructor(e){if(!e.dataType.isVariable)throw new Error("cannot create a variable series iterator for a non-variable series");this.series=e,this.index=0,this.decoder=new TextDecoder}next(){const e=this.index,r=this.series.data;for(;this.index<r.length&&r[this.index]!==Wn;)this.index++;const i=this.index;return e===i?{done:!0,value:void 0}:(this.index++,{done:!1,value:this.decoder.decode(this.series.buffer.slice(e,i))})}},fv=class Tl{wrapped;static schema=fn(A(),Se());constructor(e){this.wrapped=e}next(){const e=this.wrapped.next();return e.done===!0?{done:!0,value:void 0}:{done:!1,value:En.decodeString(e.value,Tl.schema)}}};class mv{series;index;data;density;constructor(e){if(!e.dataType.equals(L.UUID))throw new Error("cannot create a UUID series iterator for a non-UUID series");this.series=e,this.index=0,this.data=new Uint8Array(e.buffer),this.density=L.UUID.density.valueOf()}next(){if(this.index>=this.series.length)return{done:!0,value:void 0};const e=xl(this.data,this.index*this.density);return this.index++,{done:!1,value:e}}}let gv=class{series;index;constructor(e){this.series=e,this.index=0}next(){return this.index>=this.series.length?{done:!0,value:void 0}:{done:!1,value:this.series.at(this.index++,!0)}}};const go=t=>{const e=t>>32n,r=t&0xffffffffn;return{domain:e,sample:r}},lt=".",pv=(t,e,r=".")=>{const i=t.split(r);return i.map((n,o)=>{const a=e(n,o,i);return a==null?null:typeof a=="string"?a:a.join(r)}).filter(n=>n!=null).join(r)},Qe=(t,e)=>{if(!Array.isArray(t))return t[e];const r=t[e];if(r!=null||t.length==0)return r;const i=t[0];if(typeof i=="object"&&"key"in i)return t.find(n=>n.key===e)},hv=(t,e)=>{const r=t.split(".");return r.forEach((i,n)=>{e=Qe(e,i),e!=null&&typeof e=="object"&&"key"in e&&(r[n]=e.key)}),r.join(".")},vv=(t,e)=>{const r=t.split(".");return e<0?r[r.length+e]:r[e]},yv=(t,e)=>{if(e.length===0)return!0;const r=t.split("."),i=e.split(".");if(i.length>r.length)return!1;for(let n=0;n<i.length;n++){const o=r[n],a=i[n];if(a!=="*"&&o!==a)return!1}return!0},Fe=t=>{const e=parseInt(t);return isNaN(e)||e<0||e.toString()!==t?null:e},Bn=(t,e)=>{for(let r=1;r<=e.length;r++){const i=e.slice(0,r).join(".");if(Qe(t,i)!=null)return[i,r]}return null},Ul=((t,e,r={optional:!1})=>{const{optional:i,getter:n=Qe}=r;if(e==="")return t;const o=e.split(".");if(o.length===1){const u=n(t,o[0]);if(u===void 0){if(i)return null;throw new Error(`Path ${e} does not exist. ${o[0]} is undefined`)}return u}const a=(u,s)=>{if(s>=o.length)return u;for(let c=o.length-s;c>=1;c--){const d=o.slice(s,s+c).join("."),m=n(u,d);if(m!==void 0){if(s+c===o.length)return m;if(m===null){if(i)return null;throw new Error(`Path ${e} does not exist. ${d} is null`)}return a(m,s+c)}}if(i)return null;throw new Error(`Path ${e} does not exist. ${o[s]} is undefined`)};return a(t,0)}),bv=(t,e)=>Ul(t,e,{optional:!0})!==null,$v=t=>{try{return structuredClone(t)}catch{return console.warn("Failed to deep copy object, falling back to JSON.parse(JSON.stringify)",t),console.trace(),JSON.parse(JSON.stringify(t))}},wv=(t,e,r="")=>{const i={},n=(o,a,u)=>{if(typeof o!=typeof a||o===null||a===null){i[u]=[o,a];return}if(typeof o=="object"&&typeof a=="object")if(Array.isArray(o)&&Array.isArray(a)){if(o.length!==a.length){i[u]=[o,a];return}for(let s=0;s<o.length;s++)n(o[s],a[s],`${u}[${s}]`)}else new Set([...Object.keys(o),...Object.keys(a)]).forEach(s=>{n(o[s],a[s],u!==""?`${u}.${s}`:s)});else o!==a&&(i[u]=[o,a])};return n(t,e,r),i},Fn=(t,e)=>{const r=Array.isArray(t),i=Array.isArray(e);if(r!==i)return!1;if(r&&i){const a=t,u=e;if(a.length!==u.length)return!1;for(let s=0;s<a.length;s++)if(!Fn(a[s],u[s]))return!1;return!0}if(t==null||e==null||typeof t!="object"||typeof e!="object")return t===e;if("equals"in t)return t.equals(e);const n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(const a of n){const u=t[a],s=e[a];if(typeof u=="object"&&typeof s=="object"){if(!Fn(u,s))return!1}else if(u!==s)return!1}return!0},Dl=(t,e)=>{if(typeof t!="object"||t==null)return t===e;const r=Object.keys(t),i=Object.keys(e);if(i.length>r.length)return!1;for(const n of i){const o=t[n],a=e[n];if(typeof o=="object"&&typeof a=="object"){if(!Dl(o,a))return!1}else if(o!==a)return!1}return!0},Jn=(t,...e)=>{if(e.length===0)return t;const r=e.shift();if(kn(t)&&kn(r))for(const i in r)try{kn(r[i])?(i in t||Object.assign(t,{[i]:{}}),Jn(t[i],r[i])):Object.assign(t,{[i]:r[i]})}catch(n){throw n instanceof TypeError?new TypeError(`.${i}: ${n.message}`):n}return Jn(t,...e)},_v=(t,e,r)=>{const i=(n,o,a)=>{if(a.def?.type==="union")return a.def.options.reduce((u,s)=>i(u,o,s),n);if(a.def?.type==="intersection"){const u=i(n,o,a.def.left);return i(u,o,a.def.right)}for(const u in o){const s=o[u];let c=a?.shape;if(c!=null)for(;c!=null;){if(c[u]!=null){const d=c[u].safeParse(s);if(d.success){n[u]=d.data;break}}c=c.def?.shape}typeof s=="object"&&!Array.isArray(s)&&s!==null&&a&&a.shape&&a.shape[u]&&(n[u]||={},i(n[u],s,a.shape[u]))}return n};return i({...t},e,r)},Iv=(t,e)=>{const r=e.split(lt);let i=t,n=0;for(;n<r.length;){if(n===r.length-1){const a=r[n];if(Array.isArray(i)){const u=parseInt(a);if(!isNaN(u)&&u<i.length){i.splice(u,1);return}const s=i[0];if(typeof s=="object"&&"key"in s){const c=i.findIndex(d=>d.key===a);if(c!==-1){i.splice(c,1);return}}return}delete i[a];return}let o=!1;if(Array.isArray(i)&&i.length>0){const a=i[0];if(typeof a=="object"&&"key"in a)for(let u=r.length-n;u>=1;u--){const s=r.slice(n,n+u).join(lt),c=i.find(d=>d.key===s);if(c!=null){if(n+u===r.length){const d=i.findIndex(m=>m.key===s);d!==-1&&i.splice(d,1);return}i=c,n+=u,o=!0;break}}}if(!o)for(let a=r.length-n;a>=1;a--){const u=r.slice(n,n+a).join(lt);if(!Array.isArray(i)&&typeof i=="object"&&i!==null&&u in i){if(n+a===r.length){delete i[u];return}i=i[u],n+=a,o=!0;break}}if(!o){const a=Qe(i,r[n]);if(a==null)return;i=a,n++}}},kv=(t,e,r)=>{const i=e.split(lt);let n=t,o=0;for(;o<i.length-1;){const a=Bn(n,i.slice(o,i.length-1));let u;a!=null?[u,o]=[a[0],o+a[1]]:(u=i[o],o++);let s=Qe(n,u);if(s==null){const c=i[o];let d=Fe(c);d==null&&c.startsWith("-")&&Fe(c.substring(1))!=null&&(d=0),s=d!=null?[]:{},n[u]=s}n=s}try{const a=i[i.length-1];if(Array.isArray(n)){let s=Fe(a);if(s==null){if(a.startsWith("-")){const c=Fe(a.substring(1));c!=null&&(s=n.length-c)}if(s==null){if(n.length===0){const d=Fe(a);if(d!=null){n[d]=r;return}}const c=n[0];if(typeof c=="object"&&"key"in c){const d=n.findIndex(m=>m.key===a);if(d!==-1){n[d]=r;return}}return}}n[s]=r;return}const u=Bn(n,[a]);if(u!=null){n[u[0]]=r;return}n[a]=r}catch(a){throw console.error("failed to set value",r,"at path",e,"on object",t),a}},Ci=Object.freeze(Object.defineProperty({__proto__:null,SEPARATOR:lt,copy:$v,defaultGetter:Qe,difference:wv,element:vv,equal:Fn,findBestKey:Bn,get:Ul,getIndex:Fe,has:bv,override:Jn,overrideValidItems:_v,partialEqual:Dl,pathsMatch:yv,remove:Iv,resolvePath:hv,set:kv,transformPath:pv},Symbol.toStringTag,{value:"Module"}));U({key:A(),value:A()});fn(F([O(),A(),mc()]),Se());const El=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null?"node":typeof window>"u"||window.document===void 0?"webworker":"browser",Sv=El(),Al=["macOS","Windows","Linux"],Ov=["macos","windows","linux"],zv={macos:"macOS",windows:"Windows",linux:"Linux"},xv=J(Al).or(J(Ov).transform(t=>zv[t])),Nv=()=>{if(typeof window>"u")return;const t=window.navigator.userAgent.toLowerCase();if(t.includes("mac"))return"macOS";if(t.includes("win"))return"Windows";if(t.includes("linux"))return"Linux"};let Sn;const jv=((t={})=>{const{force:e,default:r}=t;return e??Sn??(Sn=Nv(),Sn??r)}),Tv=Object.freeze(Object.defineProperty({__proto__:null,OPERATING_SYSTEMS:Al,RUNTIME:Sv,detect:El,getOS:jv,osZ:xv},Symbol.toStringTag,{value:"Module"})),Uv=(...t)=>t.map(Pl).join(""),Pl=t=>(t.endsWith("/")||(t+="/"),t.startsWith("/")&&(t=t.slice(1)),t),Dv=t=>t.endsWith("/")?t.slice(0,-1):t;class Rt{protocol;host;port;path;constructor({host:e,port:r,protocol:i="",pathPrefix:n=""}){this.protocol=i,this.host=e,this.port=r,this.path=Pl(n)}replace(e){return new Rt({host:e.host??this.host,port:e.port??this.port,protocol:e.protocol??this.protocol,pathPrefix:e.pathPrefix??this.path})}child(e){return new Rt({...this,pathPrefix:Uv(this.path,e)})}toString(){return Dv(`${this.protocol}://${this.host}:${this.port}/${this.path}`)}static UNKNOWN=new Rt({host:"unknown",port:0})}U({baseInterval:T.z.optional(),maxRetries:O().optional(),scale:O().optional()});const Ev=/^#?([0-9a-f]{6}|[0-9a-f]{8})$/i,Zl=A().regex(Ev),Je=O().min(0).max(255),Rl=O().min(0).max(1),Cl=me([Je,Je,Je,Rl]),Av=me([Je,Je,Je]),Pv=U({rgba255:Cl}),Zv=O().min(0).max(360),Rv=O().min(0).max(100),Cv=O().min(0).max(100),Mv=me([Zv,Rv,Cv,Rl]),Mi=F([Zl,Av,Cl,Mv,Pv]),Lv=Mi.transform(t=>Li(t)),Li=(t,e=1)=>{if(t=Mi.parse(t),typeof t=="string")return Wv(t,e);if(Array.isArray(t)){if(t.length<3||t.length>4)throw new Error(`Invalid color: [${t.join(", ")}]`);return t.length===3?[...t,e]:t}return t.rgba255},Wv=(t,e=1)=>(t=Zl.parse(t),t=Bv(t),[Dt(t,0),Dt(t,2),Dt(t,4),t.length===8?Dt(t,6)/255:e]),Dt=(t,e)=>parseInt(t.slice(e,e+2),16),Bv=t=>t.startsWith("#")?t.slice(1):t;Li("#000000");Li("#ffffff");const Fv=U({key:A(),color:Mi,position:O(),switched:Y().optional()});Xe(Fv);const Jv=U({key:A(),name:A(),color:Lv});U({key:A(),name:A(),swatches:Xe(Jv)});fe().min(0).max(255);U({name:A(),key:A()});const Vv=t=>Object.getOwnPropertySymbols(globalThis).includes(t),Gv=(t,e)=>{const r=Symbol.for(t);if(!Vv(r)){const i=e();Object.defineProperty(globalThis,r,{value:i})}return()=>globalThis[r]},Ml="sy_x_error",qv=t=>e=>e!=null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"?e.type.startsWith(t):e instanceof Error?e.message.startsWith(t):typeof e!="string"?!1:e.startsWith(t),Ll=t=>class ct extends Error{static discriminator=Ml;discriminator=ct.discriminator;static TYPE=t;type=ct.TYPE;static matches=qv(t);matches=ct.matches;constructor(r,i){super(r,i),this.name=ct.TYPE}static sub(r){return Ll(`${t}.${r}`)}},Kv=t=>{if(t==null||typeof t!="object")return!1;const e=t;if(e.discriminator!==Ml)return!1;if(!("type"in e))throw new Error(`X Error is missing its type property: ${JSON.stringify(e)}`);return!0},tt="unknown",po="nil";class Yv{providers=[];register(e){this.providers.push(e)}encode(e){if(e==null)return{type:po,data:""};if(Kv(e))for(const r of this.providers){const i=r.encode(e);if(i!=null)return i}if(e instanceof Error)return{type:tt,data:e.message};if(typeof e=="string")return{type:tt,data:e};try{return{type:tt,data:JSON.stringify(e)}}catch{return{type:tt,data:"unable to encode error information"}}}decode(e){if(e==null||e.type===po)return null;if(e.type===tt)return new ho(e.data);for(const r of this.providers){const i=r.decode(e);if(i!=null)return i}return new ho(e.data)}}Gv("synnax-error-registry",()=>new Yv);class ho extends Ll("unknown"){}U({type:A(),data:A()});const Xv=C.object({jsonrpc:C.literal("2.0"),method:C.string(),params:C.any().optional(),id:C.union([C.string(),C.number(),C.null()]).optional()}),Wl=C.object({jsonrpc:C.literal("2.0"),id:C.union([C.string(),C.number(),C.null()])}),Hv=Wl.extend({result:C.json()}),Qv=Wl.extend({error:C.object({code:C.number().int(),message:C.string().optional(),data:C.json().optional()})}),ey=C.union([Hv,Qv]);C.union([Xv,ey]);const ty=C.uuid();C.object({key:ty,name:C.string().min(1),color:C.string()});A().regex(/^\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$/);const ny=["standard","scientific","engineering"];J(ny);J(["success","info","warning","error","loading","disabled"]);U({stack:A(),error:W(Error)});const Ue="main",Wi="prerender",wn={stage:"creating",processCount:0,reserved:!1,focusCount:0,centerCount:0},Bl={...wn,key:Wi,visible:!1},ry=U({key:A(),url:A().optional(),title:A().optional(),center:Y().optional(),position:Kt.xy.optional(),size:Pt.dimensions.optional(),minSize:Pt.dimensions.optional(),maxSize:Pt.dimensions.optional(),resizable:Y().optional(),fullscreen:Y().optional(),focus:Y().optional(),maximized:Y().optional(),visible:Y().optional(),minimized:Y().optional(),decorations:Y().optional(),skipTaskbar:Y().optional(),fileDropEnabled:Y().optional(),transparent:Y().optional(),alwaysOnTop:Y().optional()}),iy=T.milliseconds(50),Fl=()=>setTimeout(()=>window.location.reload(),iy.milliseconds),Jl={label:Ue,config:{enablePrerender:!0,debug:!1,defaultWindowProps:{}},windows:{main:{...wn,key:Ue,reserved:!0}},labelKeys:{main:Ue},keyLabels:{main:Ue}},oy=(t,e)=>{if(t.type===Gl.type)return e.label!==Ue||(t.payload.label=Cn.create(),t.payload.prerenderLabel=Cn.create()),t;if("label"in t.payload)return t;let r=e.label;const i=t.payload;return i.key!=null&&(i.key in e.windows?r=i.key:r=e.keyLabels[i.key]),t.payload={...t.payload,label:r},t},ne=t=>(e,r)=>{if(!("label"in r.payload))throw new Error("Missing label");t(e,r)},Ne=(t,e=!1)=>ne((r,i)=>{let n=e;const o=r.windows[i.payload.label];if(o!=null){if(i.payload.value!=null)n=i.payload.value;else{const a=o[t];a!=null&&(n=!a)}r.windows[i.payload.label]={...o,[t]:n}}}),_n=(t,e=!1)=>(r,i)=>{const n=r.windows[i.payload.label];n!=null&&(r.windows[i.payload.label]={...n,[t]:n[t]+(e?-1:1)})},ay=t=>Object.values(t.windows).some(e=>e.key===Wi&&!e.reserved),Bi="drift",uy=(t,e,r)=>t.position!=null&&t.size!=null&&e==null?ut.topLeft(ut.positionInCenter(ut.construct(Kt.ZERO,r??Kt.ZERO),ut.construct(t.position,t.size))):e,sy=(t,{payload:e})=>{if(e.key===Wi)return;const{key:r,label:i,prerenderLabel:n}=e;if(i==null||n==null)throw new Error("[drift] - bug - missing label and prerender label");yo(t.config.debug,"reducer create window");const o=t.windows.main;if(e.position=uy(o,e.position,e.size),r in t.keyLabels){nt(t.config.debug,"window already exists, un-minimize and focus it");const s=t.keyLabels[e.key];t.windows[s].visible=!0,t.windows[s].focusCount+=1,t.windows[s].minimized=!1,t.windows[s].position=e.position,On(t.config.debug);return}const[a,u]=Object.entries(t.windows).find(([,s])=>!s.reserved)??[null,null];a!=null?(nt(t.config.debug,"using available pre-rendered window"),t.windows[a]={...u,visible:!0,reserved:!0,focusCount:1,focus:!0,...e},t.labelKeys[a]=e.key,t.keyLabels[e.key]=a):(nt(t.config.debug,"creating new window"),t.windows[i]={...t.config.defaultWindowProps,...wn,...e,reserved:!0},t.labelKeys[i]=r,t.keyLabels[r]=i),t.config.enablePrerender&&!ay(t)&&(nt(t.config.debug,"creating pre-render window"),t.windows[n]=Ci.copy({...t.config.defaultWindowProps,...Bl})),On(t.config.debug)},cy=ne((t,e)=>{const r=t.windows[e.payload.label];r!=null&&(r.stage=e.payload.stage)}),ly=ne((t,{payload:{label:e}})=>{const r=t.windows[e];r==null||r.processCount>0||(r.stage="closing",delete t.windows[e],delete t.labelKeys[e],delete t.keyLabels[r.key])}),dy=ne((t,e)=>{const r=t.windows[e.payload.label];r==null||r.processCount>0||(r.stage="reloading",Fl())}),fy=ne(_n("processCount")),my=ne((t,e)=>{_n("processCount",!0)(t,e);const r=t.windows[e.payload.label];r!=null&&r.processCount===0&&(r.stage==="reloading"?Fl():(t.windows[e.payload.label].visible=!1,delete t.windows[e.payload.label],delete t.labelKeys[e.payload.label],delete t.keyLabels[r.key]))}),gy=(t,e)=>{const r=t.windows[e.payload.key];r!=null&&(r.error=e.payload.message)},py=ne((t,e)=>{const r=t.windows[e.payload.label];r!=null&&(r.visible!==!0&&(r.visible=!0),_n("focusCount")(t,e))}),hy=Ne("minimized"),vy=Ne("maximized"),yy=Ne("visible",!0),by=Ne("fullscreen",!0),$y=ne(_n("centerCount")),wy=ne((t,e)=>{t.windows[e.payload.label].position=e.payload.position}),_y=ne((t,e)=>{t.windows[e.payload.label].size=e.payload.size}),Iy=ne((t,e)=>{t.windows[e.payload.label].minSize=e.payload.size}),ky=ne((t,e)=>{t.windows[e.payload.label].maxSize=e.payload.size}),Sy=Ne("resizable"),Oy=Ne("skipTaskbar"),zy=Ne("alwaysOnTop"),xy=ne((t,e)=>{t.windows[e.payload.label].title=e.payload.title}),Ny=Ne("decorations"),vo=(t,e)=>{const r=t.windows[e.payload.label];Ci.partialEqual(r,e.payload)||(t.windows[e.payload.label]={...r,...e.payload})},jy=(t,e)=>{if(t.config={...t.config,...e.payload},t.label=e.payload.label,t.label===Ue&&t.config.enablePrerender){const r=Cn.create();t.windows[r]={...t.config.defaultWindowProps,...Bl}}},Vl=Yl.createSlice({name:Bi,initialState:Jl,reducers:{internalSetInitial:jy,createWindow:sy,setWindowStage:cy,closeWindow:ly,registerProcess:fy,completeProcess:my,setWindowError:gy,focusWindow:py,reloadWindow:dy,setWindowMinimized:hy,setWindowMaximized:vy,setWindowVisible:yy,setWindowFullscreen:by,centerWindow:$y,setWindowPosition:wy,setWindowSize:_y,setWindowMinSize:Iy,setWindowMaxSize:ky,setWindowResizable:Sy,setWindowSkipTaskbar:Oy,setWindowAlwaysOnTop:zy,setWindowTitle:xy,setWindowDecorations:Ny,runtimeSetWindowProps:vo,setWindowProps:vo}}),{actions:{runtimeSetWindowProps:Ty,setWindowProps:Uy,createWindow:Gl,internalSetInitial:ql,setWindowStage:Dy,closeWindow:Ey,registerProcess:Ay,completeProcess:Py,setWindowError:Zy,focusWindow:Ry,reloadWindow:Cy,setWindowMinimized:My,setWindowMaximized:Ly,setWindowVisible:Wy,setWindowFullscreen:By,centerWindow:sb,setWindowPosition:Fy,setWindowSize:Jy,setWindowMinSize:Vy,setWindowMaxSize:Gy,setWindowResizable:qy,setWindowSkipTaskbar:Ky,setWindowAlwaysOnTop:Yy,setWindowTitle:Xy,setWindowDecorations:Hy}}=Vl,Qy=Vl.reducer,eb=t=>t.startsWith(Bi),tb=[ql.type],nb=(t,e)=>!t&&!tb.includes(e);exports.INITIAL_WINDOW_STATE=wn;exports.MAIN_WINDOW=Ue;exports.Q=Kt;exports.S=Tv;exports.SLICE_NAME=Bi;exports.T=Ci;exports.ZERO_SLICE_STATE=Jl;exports._=Pt;exports.a=T;exports.assignLabel=oy;exports.closeWindow=Ey;exports.completeProcess=Py;exports.createWindow=Gl;exports.focusWindow=Ry;exports.group=yo;exports.groupEnd=On;exports.internalSetInitial=ql;exports.isDriftAction=eb;exports.jt=ut;exports.log=nt;exports.reducer=Qy;exports.registerProcess=Ay;exports.reloadWindow=Cy;exports.runtimeSetWindowProps=Ty;exports.setWindowAlwaysOnTop=Yy;exports.setWindowDecorations=Hy;exports.setWindowError=Zy;exports.setWindowFullscreen=By;exports.setWindowMaxSize=Gy;exports.setWindowMaximized=Ly;exports.setWindowMinSize=Vy;exports.setWindowMinimized=My;exports.setWindowPosition=Fy;exports.setWindowProps=Uy;exports.setWindowResizable=qy;exports.setWindowSize=Jy;exports.setWindowSkipTaskbar=Ky;exports.setWindowStage=Dy;exports.setWindowTitle=Xy;exports.setWindowVisible=Wy;exports.shouldEmit=nb;exports.windowPropsZ=ry;
|