@neuvybe/jarvis 0.18.0 → 0.19.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.
Files changed (2) hide show
  1. package/dist/index.js +134 -92
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __cliCreateRequire } from 'node:module'; const require = __cliCreateRequire(import.meta.url);
3
- var rI=Object.create;var Iu=Object.defineProperty;var nI=Object.getOwnPropertyDescriptor;var iI=Object.getOwnPropertyNames;var oI=Object.getPrototypeOf,sI=Object.prototype.hasOwnProperty;var ae=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var v=(t,e)=>()=>(t&&(e=t(t=0)),e);var z=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),qe=(t,e)=>{for(var n in e)Iu(t,n,{get:e[n],enumerable:!0})},aI=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of iI(e))!sI.call(t,r)&&r!==n&&Iu(t,r,{get:()=>e[r],enumerable:!(i=nI(e,r))||i.enumerable});return t};var He=(t,e,n)=>(n=t!=null?rI(oI(t)):{},aI(e||!t||!t.__esModule?Iu(n,"default",{value:t,enumerable:!0}):n,t));function uI(t){try{return JSON.stringify(t,(e,n)=>n instanceof Error?{name:n.name,message:n.message,stack:n.stack}:n)}catch{return"[unserializable meta]"}}var $g,Eu,q,bg=v(()=>{"use strict";$g={debug:0,info:1,warn:2,error:3};Eu=class{level;constructor(e="info"){this.level=e}setLevel(e){this.level=e}getLevel(){return this.level}debug(e,n){this.emit("debug",e,n)}info(e,n){this.emit("info",e,n)}warn(e,n){this.emit("warn",e,n)}error(e,n){this.emit("error",e,n)}emit(e,n,i){if($g[e]<$g[this.level])return;let o=`[${new Date().toISOString()}] ${e.toUpperCase()}`,s=i!==void 0?`${o} ${n} ${uI(i)}`:`${o} ${n}`;e==="warn"?console.warn(s):console.error(s)}},q=new Eu});var xg=v(()=>{"use strict"});var wg,Tu=v(()=>{"use strict";wg="JARVIS_HOME"});function m(t,e,n){function i(a,u){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:u,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,u);let c=s.prototype,l=Object.keys(c);for(let d=0;d<l.length;d++){let f=l[d];f in a||(a[f]=c[f].bind(a))}}let r=n?.Parent??Object;class o extends r{}Object.defineProperty(o,"name",{value:t});function s(a){var u;let c=n?.Parent?new o:this;i(c,a),(u=c._zod).deferred??(u.deferred=[]);for(let l of c._zod.deferred)l();return c}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(s,"name",{value:t}),s}function oe(t){return t&&Object.assign(tr,t),tr}var Sg,Ou,Pu,ot,zt,tr,rr=v(()=>{Ou=Object.freeze({status:"aborted"});Pu=Symbol("zod_brand"),ot=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},zt=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Sg=globalThis).__zod_globalConfig??(Sg.__zod_globalConfig={});tr=globalThis.__zod_globalConfig});var x={};qe(x,{BIGINT_FORMAT_RANGES:()=>Mu,Class:()=>Au,NUMBER_FORMAT_RANGES:()=>Uu,aborted:()=>Lt,allowsEval:()=>Ru,assert:()=>pI,assertEqual:()=>cI,assertIs:()=>dI,assertNever:()=>fI,assertNotEqual:()=>lI,assignProp:()=>Rt,base64ToUint8Array:()=>Ig,base64urlToUint8Array:()=>PI,cached:()=>Ar,captureStackTrace:()=>co,cleanEnum:()=>OI,cleanRegex:()=>Rn,clone:()=>Ie,cloneDef:()=>mI,createTransparentProxy:()=>bI,defineLazy:()=>V,esc:()=>uo,escapeRegex:()=>Je,explicitlyAborted:()=>Fu,extend:()=>SI,finalizeIssue:()=>Ee,floatSafeRemainder:()=>zu,getElementAtPath:()=>gI,getEnumValues:()=>Nn,getLengthableOrigin:()=>jn,getParsedType:()=>$I,getSizableOrigin:()=>Ln,hexToUint8Array:()=>AI,isObject:()=>nr,isPlainObject:()=>Dt,issue:()=>zr,joinValues:()=>g,jsonStringifyReplacer:()=>Cr,merge:()=>II,mergeDefs:()=>$t,normalizeParams:()=>w,nullish:()=>Nt,numKeys:()=>_I,objectClone:()=>hI,omit:()=>wI,optionalKeys:()=>ju,parsedType:()=>b,partial:()=>EI,pick:()=>xI,prefixIssues:()=>ze,primitiveTypes:()=>Lu,promiseAllObject:()=>vI,propertyKeyTypes:()=>Dn,randomString:()=>yI,required:()=>TI,safeExtend:()=>kI,shallowClone:()=>Du,slugify:()=>Nu,stringifyPrimitive:()=>$,uint8ArrayToBase64:()=>Eg,uint8ArrayToBase64url:()=>CI,uint8ArrayToHex:()=>zI,unwrapMessage:()=>zn});function cI(t){return t}function lI(t){return t}function dI(t){}function fI(t){throw new Error("Unexpected value in exhaustive check")}function pI(t){}function Nn(t){let e=Object.values(t).filter(i=>typeof i=="number");return Object.entries(t).filter(([i,r])=>e.indexOf(+i)===-1).map(([i,r])=>r)}function g(t,e="|"){return t.map(n=>$(n)).join(e)}function Cr(t,e){return typeof e=="bigint"?e.toString():e}function Ar(t){return{get value(){{let n=t();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function Nt(t){return t==null}function Rn(t){let e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function zu(t,e){let n=t/e,i=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<r?0:n-i}function V(t,e,n){let i;Object.defineProperty(t,e,{get(){if(i!==kg)return i===void 0&&(i=kg,i=n()),i},set(r){Object.defineProperty(t,e,{value:r})},configurable:!0})}function hI(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function Rt(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function $t(...t){let e={};for(let n of t){let i=Object.getOwnPropertyDescriptors(n);Object.assign(e,i)}return Object.defineProperties({},e)}function mI(t){return $t(t._zod.def)}function gI(t,e){return e?e.reduce((n,i)=>n?.[i],t):t}function vI(t){let e=Object.keys(t),n=e.map(i=>t[i]);return Promise.all(n).then(i=>{let r={};for(let o=0;o<e.length;o++)r[e[o]]=i[o];return r})}function yI(t=10){let e="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<t;i++)n+=e[Math.floor(Math.random()*e.length)];return n}function uo(t){return JSON.stringify(t)}function Nu(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function nr(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Dt(t){if(nr(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let n=e.prototype;return!(nr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Du(t){return Dt(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function _I(t){let e=0;for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function Je(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ie(t,e,n){let i=new t._zod.constr(e??t._zod.def);return(!e||n?.parent)&&(i._zod.parent=t),i}function w(t){let 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 bI(t){let e;return new Proxy({},{get(n,i,r){return e??(e=t()),Reflect.get(e,i,r)},set(n,i,r,o){return e??(e=t()),Reflect.set(e,i,r,o)},has(n,i){return e??(e=t()),Reflect.has(e,i)},deleteProperty(n,i){return e??(e=t()),Reflect.deleteProperty(e,i)},ownKeys(n){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(n,i){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,i)},defineProperty(n,i,r){return e??(e=t()),Reflect.defineProperty(e,i,r)}})}function $(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function ju(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}function xI(t,e){let n=t._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=$t(t._zod.def,{get shape(){let s={};for(let a in e){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&(s[a]=n.shape[a])}return Rt(this,"shape",s),s},checks:[]});return Ie(t,o)}function wI(t,e){let n=t._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=$t(t._zod.def,{get shape(){let s={...t._zod.def.shape};for(let a in e){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&delete s[a]}return Rt(this,"shape",s),s},checks:[]});return Ie(t,o)}function SI(t,e){if(!Dt(e))throw new Error("Invalid input to extend: expected a plain object");let n=t._zod.def.checks;if(n&&n.length>0){let o=t._zod.def.shape;for(let s in e)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=$t(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e};return Rt(this,"shape",o),o}});return Ie(t,r)}function kI(t,e){if(!Dt(e))throw new Error("Invalid input to safeExtend: expected a plain object");let n=$t(t._zod.def,{get shape(){let i={...t._zod.def.shape,...e};return Rt(this,"shape",i),i}});return Ie(t,n)}function II(t,e){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=$t(t._zod.def,{get shape(){let i={...t._zod.def.shape,...e._zod.def.shape};return Rt(this,"shape",i),i},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return Ie(t,n)}function EI(t,e,n){let r=e._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=$t(e._zod.def,{get shape(){let a=e._zod.def.shape,u={...a};if(n)for(let c in n){if(!(c in a))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(u[c]=t?new t({type:"optional",innerType:a[c]}):a[c])}else for(let c in a)u[c]=t?new t({type:"optional",innerType:a[c]}):a[c];return Rt(this,"shape",u),u},checks:[]});return Ie(e,s)}function TI(t,e,n){let i=$t(e._zod.def,{get shape(){let r=e._zod.def.shape,o={...r};if(n)for(let s in n){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(o[s]=new t({type:"nonoptional",innerType:r[s]}))}else for(let s in r)o[s]=new t({type:"nonoptional",innerType:r[s]});return Rt(this,"shape",o),o}});return Ie(e,i)}function Lt(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue!==!0)return!0;return!1}function Fu(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue===!1)return!0;return!1}function ze(t,e){return e.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(t),n})}function zn(t){return typeof t=="string"?t:t?.message}function Ee(t,e,n){let i=t.message?t.message:zn(t.inst?._zod.def?.error?.(t))??zn(e?.error?.(t))??zn(n.customError?.(t))??zn(n.localeError?.(t))??"Invalid input",{inst:r,continue:o,input:s,...a}=t;return a.path??(a.path=[]),a.message=i,e?.reportInput&&(a.input=s),a}function Ln(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function jn(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function b(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let n=t;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return e}function zr(...t){let[e,n,i]=t;return typeof e=="string"?{message:e,code:"custom",input:n,inst:i}:{...e}}function OI(t){return Object.entries(t).filter(([e,n])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Ig(t){let e=atob(t),n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return n}function Eg(t){let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return btoa(e)}function PI(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-e.length%4)%4);return Ig(e+n)}function CI(t){return Eg(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function AI(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(e.length/2);for(let i=0;i<e.length;i+=2)n[i/2]=Number.parseInt(e.slice(i,i+2),16);return n}function zI(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var kg,co,Ru,$I,Dn,Lu,Uu,Mu,Au,N=v(()=>{rr();kg=Symbol("evaluating");co="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};Ru=Ar(()=>{if(tr.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});$I=t=>{let 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}`)}},Dn=new Set(["string","number","symbol"]),Lu=new Set(["string","number","bigint","boolean","symbol","undefined"]);Uu={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]},Mu={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};Au=class{constructor(...e){}}});function Mn(t,e=n=>n.message){let n={},i=[];for(let r of t.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(e(r))):i.push(e(r));return{formErrors:i,fieldErrors:n}}function Fn(t,e=n=>n.message){let n={_errors:[]},i=(r,o=[])=>{for(let s of r.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>i({issues:a},[...o,...s.path]));else if(s.code==="invalid_key")i({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")i({issues:s.issues},[...o,...s.path]);else{let a=[...o,...s.path];if(a.length===0)n._errors.push(e(s));else{let u=n,c=0;for(;c<a.length;){let l=a[c];c===a.length-1?(u[l]=u[l]||{_errors:[]},u[l]._errors.push(e(s))):u[l]=u[l]||{_errors:[]},u=u[l],c++}}}};return i(t),n}function Vu(t,e=n=>n.message){let n={errors:[]},i=(r,o=[])=>{var s,a;for(let u of r.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(c=>i({issues:c},[...o,...u.path]));else if(u.code==="invalid_key")i({issues:u.issues},[...o,...u.path]);else if(u.code==="invalid_element")i({issues:u.issues},[...o,...u.path]);else{let c=[...o,...u.path];if(c.length===0){n.errors.push(e(u));continue}let l=n,d=0;for(;d<c.length;){let f=c[d],p=d===c.length-1;typeof f=="string"?(l.properties??(l.properties={}),(s=l.properties)[f]??(s[f]={errors:[]}),l=l.properties[f]):(l.items??(l.items=[]),(a=l.items)[f]??(a[f]={errors:[]}),l=l.items[f]),p&&l.errors.push(e(u)),d++}}};return i(t),n}function Og(t){let e=[],n=t.map(i=>typeof i=="object"?i.key:i);for(let i of n)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 Zu(t){let e=[],n=[...t.issues].sort((i,r)=>(i.path??[]).length-(r.path??[]).length);for(let i of n)e.push(`\u2716 ${i.message}`),i.path?.length&&e.push(` \u2192 at ${Og(i.path)}`);return e.join(`
4
- `)}var Tg,Un,Ne,Bu=v(()=>{rr();N();Tg=(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,Cr,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Un=m("$ZodError",Tg),Ne=m("$ZodError",Tg,{Parent:Error})});var Nr,lo,Rr,fo,Dr,Gu,Lr,Wu,po,RI,ho,DI,mo,LI,go,jI,vo,UI,yo,MI,_o,FI,$o,VI,qu=v(()=>{rr();Bu();N();Nr=t=>(e,n,i,r)=>{let o=i?{...i,async:!1}:{async:!1},s=e._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new ot;if(s.issues.length){let a=new(r?.Err??t)(s.issues.map(u=>Ee(u,o,oe())));throw co(a,r?.callee),a}return s.value},lo=Nr(Ne),Rr=t=>async(e,n,i,r)=>{let o=i?{...i,async:!0}:{async:!0},s=e._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(r?.Err??t)(s.issues.map(u=>Ee(u,o,oe())));throw co(a,r?.callee),a}return s.value},fo=Rr(Ne),Dr=t=>(e,n,i)=>{let r=i?{...i,async:!1}:{async:!1},o=e._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new ot;return o.issues.length?{success:!1,error:new(t??Un)(o.issues.map(s=>Ee(s,r,oe())))}:{success:!0,data:o.value}},Gu=Dr(Ne),Lr=t=>async(e,n,i)=>{let r=i?{...i,async:!0}:{async:!0},o=e._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new t(o.issues.map(s=>Ee(s,r,oe())))}:{success:!0,data:o.value}},Wu=Lr(Ne),po=t=>(e,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Nr(t)(e,n,r)},RI=po(Ne),ho=t=>(e,n,i)=>Nr(t)(e,n,i),DI=ho(Ne),mo=t=>async(e,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Rr(t)(e,n,r)},LI=mo(Ne),go=t=>async(e,n,i)=>Rr(t)(e,n,i),jI=go(Ne),vo=t=>(e,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Dr(t)(e,n,r)},UI=vo(Ne),yo=t=>(e,n,i)=>Dr(t)(e,n,i),MI=yo(Ne),_o=t=>async(e,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Lr(t)(e,n,r)},FI=_o(Ne),$o=t=>async(e,n,i)=>Lr(t)(e,n,i),VI=$o(Ne)});var Fe={};qe(Fe,{base64:()=>cc,base64url:()=>bo,bigint:()=>gc,boolean:()=>yc,browserEmail:()=>KI,cidrv4:()=>ac,cidrv6:()=>uc,cuid:()=>Hu,cuid2:()=>Ju,date:()=>fc,datetime:()=>hc,domain:()=>QI,duration:()=>ec,e164:()=>dc,email:()=>rc,emoji:()=>nc,extendedDuration:()=>ZI,guid:()=>tc,hex:()=>eE,hostname:()=>XI,html5Email:()=>qI,httpProtocol:()=>lc,idnEmail:()=>JI,integer:()=>vc,ipv4:()=>ic,ipv6:()=>oc,ksuid:()=>Xu,lowercase:()=>bc,mac:()=>sc,md5_base64:()=>rE,md5_base64url:()=>nE,md5_hex:()=>tE,nanoid:()=>Qu,null:()=>_c,number:()=>xo,rfc5322Email:()=>HI,sha1_base64:()=>oE,sha1_base64url:()=>sE,sha1_hex:()=>iE,sha256_base64:()=>uE,sha256_base64url:()=>cE,sha256_hex:()=>aE,sha384_base64:()=>dE,sha384_base64url:()=>fE,sha384_hex:()=>lE,sha512_base64:()=>hE,sha512_base64url:()=>mE,sha512_hex:()=>pE,string:()=>mc,time:()=>pc,ulid:()=>Ku,undefined:()=>$c,unicodeEmail:()=>Pg,uppercase:()=>xc,uuid:()=>ir,uuid4:()=>BI,uuid6:()=>GI,uuid7:()=>WI,xid:()=>Yu});function nc(){return new RegExp(YI,"u")}function Ag(t){let 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 pc(t){return new RegExp(`^${Ag(t)}$`)}function hc(t){let e=Ag({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${e}(?:${n.join("|")})`;return new RegExp(`^${Cg}T(?:${i})$`)}function Vn(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function Zn(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var Hu,Ju,Ku,Yu,Xu,Qu,ec,ZI,tc,ir,BI,GI,WI,rc,qI,HI,Pg,JI,KI,YI,ic,oc,sc,ac,uc,cc,bo,XI,QI,lc,dc,Cg,fc,mc,gc,vc,xo,yc,_c,$c,bc,xc,eE,tE,rE,nE,iE,oE,sE,aE,uE,cE,lE,dE,fE,pE,hE,mE,wo=v(()=>{N();Hu=/^[cC][0-9a-z]{6,}$/,Ju=/^[0-9a-z]+$/,Ku=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Yu=/^[0-9a-vA-V]{20}$/,Xu=/^[A-Za-z0-9]{27}$/,Qu=/^[a-zA-Z0-9_-]{21}$/,ec=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ZI=/^[-+]?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)?)??$/,tc=/^([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})$/,ir=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)$/,BI=ir(4),GI=ir(6),WI=ir(7),rc=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,qI=/^[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])?)*$/,HI=/^(([^<>()\[\]\\.,;:\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,}))$/,Pg=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,JI=Pg,KI=/^[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])?)*$/,YI="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";ic=/^(?:(?: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])$/,oc=/^(([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}|:))$/,sc=t=>{let e=Je(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},ac=/^((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])$/,uc=/^(([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])$/,cc=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,bo=/^[A-Za-z0-9_-]*$/,XI=/^(?=.{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])?)*\.?$/,QI=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,lc=/^https?$/,dc=/^\+[1-9]\d{6,14}$/,Cg="(?:(?:\\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])))",fc=new RegExp(`^${Cg}$`);mc=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},gc=/^-?\d+n?$/,vc=/^-?\d+$/,xo=/^-?\d+(?:\.\d+)?$/,yc=/^(?:true|false)$/i,_c=/^null$/i,$c=/^undefined$/i,bc=/^[^A-Z]*$/,xc=/^[^a-z]*$/,eE=/^[0-9a-fA-F]*$/;tE=/^[0-9a-fA-F]{32}$/,rE=Vn(22,"=="),nE=Zn(22),iE=/^[0-9a-fA-F]{40}$/,oE=Vn(27,"="),sE=Zn(27),aE=/^[0-9a-fA-F]{64}$/,uE=Vn(43,"="),cE=Zn(43),lE=/^[0-9a-fA-F]{96}$/,dE=Vn(64,""),fE=Zn(64),pE=/^[0-9a-fA-F]{128}$/,hE=Vn(86,"=="),mE=Zn(86)});function zg(t,e,n){t.issues.length&&e.issues.push(...ze(n,t.issues))}var X,Ng,So,ko,wc,Sc,kc,Ic,Ec,Tc,Oc,Pc,Cc,jr,Ac,zc,Nc,Rc,Dc,Lc,jc,Uc,Mc,Io=v(()=>{rr();wo();N();X=m("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),Ng={number:"number",bigint:"bigint",object:"date"},So=m("$ZodCheckLessThan",(t,e)=>{X.init(t,e);let n=Ng[typeof e.value];t._zod.onattach.push(i=>{let r=i._zod.bag,o=(e.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<o&&(e.inclusive?r.maximum=e.value:r.exclusiveMaximum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value<=e.value:i.value<e.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),ko=m("$ZodCheckGreaterThan",(t,e)=>{X.init(t,e);let n=Ng[typeof e.value];t._zod.onattach.push(i=>{let r=i._zod.bag,o=(e.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>o&&(e.inclusive?r.minimum=e.value:r.exclusiveMinimum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value>=e.value:i.value>e.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),wc=m("$ZodCheckMultipleOf",(t,e)=>{X.init(t,e),t._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=e.value)}),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%e.value===BigInt(0):zu(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),Sc=m("$ZodCheckNumberFormat",(t,e)=>{X.init(t,e),e.format=e.format||"float64";let n=e.format?.includes("int"),i=n?"int":"number",[r,o]=Uu[e.format];t._zod.onattach.push(s=>{let a=s._zod.bag;a.format=e.format,a.minimum=r,a.maximum=o,n&&(a.pattern=vc)}),t._zod.check=s=>{let a=s.value;if(n){if(!Number.isInteger(a)){s.issues.push({expected:i,format:e.format,code:"invalid_type",continue:!1,input:a,inst:t});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,inclusive:!0,continue:!e.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,inclusive:!0,continue:!e.abort});return}}a<r&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!e.abort})}}),kc=m("$ZodCheckBigIntFormat",(t,e)=>{X.init(t,e);let[n,i]=Mu[e.format];t._zod.onattach.push(r=>{let o=r._zod.bag;o.format=e.format,o.minimum=n,o.maximum=i}),t._zod.check=r=>{let o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:t,continue:!e.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:t,continue:!e.abort})}}),Ic=m("$ZodCheckMaxSize",(t,e)=>{var n;X.init(t,e),(n=t._zod.def).when??(n.when=i=>{let r=i.value;return!Nt(r)&&r.size!==void 0}),t._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<r&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{let r=i.value;r.size<=e.maximum||i.issues.push({origin:Ln(r),code:"too_big",maximum:e.maximum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),Ec=m("$ZodCheckMinSize",(t,e)=>{var n;X.init(t,e),(n=t._zod.def).when??(n.when=i=>{let r=i.value;return!Nt(r)&&r.size!==void 0}),t._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>r&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{let r=i.value;r.size>=e.minimum||i.issues.push({origin:Ln(r),code:"too_small",minimum:e.minimum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),Tc=m("$ZodCheckSizeEquals",(t,e)=>{var n;X.init(t,e),(n=t._zod.def).when??(n.when=i=>{let r=i.value;return!Nt(r)&&r.size!==void 0}),t._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=e.size,r.maximum=e.size,r.size=e.size}),t._zod.check=i=>{let r=i.value,o=r.size;if(o===e.size)return;let s=o>e.size;i.issues.push({origin:Ln(r),...s?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),Oc=m("$ZodCheckMaxLength",(t,e)=>{var n;X.init(t,e),(n=t._zod.def).when??(n.when=i=>{let r=i.value;return!Nt(r)&&r.length!==void 0}),t._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<r&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{let r=i.value;if(r.length<=e.maximum)return;let s=jn(r);i.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),Pc=m("$ZodCheckMinLength",(t,e)=>{var n;X.init(t,e),(n=t._zod.def).when??(n.when=i=>{let r=i.value;return!Nt(r)&&r.length!==void 0}),t._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>r&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{let r=i.value;if(r.length>=e.minimum)return;let s=jn(r);i.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),Cc=m("$ZodCheckLengthEquals",(t,e)=>{var n;X.init(t,e),(n=t._zod.def).when??(n.when=i=>{let r=i.value;return!Nt(r)&&r.length!==void 0}),t._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=e.length,r.maximum=e.length,r.length=e.length}),t._zod.check=i=>{let r=i.value,o=r.length;if(o===e.length)return;let s=jn(r),a=o>e.length;i.issues.push({origin:s,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),jr=m("$ZodCheckStringFormat",(t,e)=>{var n,i;X.init(t,e),t._zod.onattach.push(r=>{let o=r._zod.bag;o.format=e.format,e.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(e.pattern))}),e.pattern?(n=t._zod).check??(n.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:e.format,input:r.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(i=t._zod).check??(i.check=()=>{})}),Ac=m("$ZodCheckRegex",(t,e)=>{jr.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),zc=m("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=bc),jr.init(t,e)}),Nc=m("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=xc),jr.init(t,e)}),Rc=m("$ZodCheckIncludes",(t,e)=>{X.init(t,e);let n=Je(e.includes),i=new RegExp(typeof e.position=="number"?`^.{${e.position}}${n}`:n);e.pattern=i,t._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),t._zod.check=r=>{r.value.includes(e.includes,e.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:r.value,inst:t,continue:!e.abort})}}),Dc=m("$ZodCheckStartsWith",(t,e)=>{X.init(t,e);let n=new RegExp(`^${Je(e.prefix)}.*`);e.pattern??(e.pattern=n),t._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),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})}}),Lc=m("$ZodCheckEndsWith",(t,e)=>{X.init(t,e);let n=new RegExp(`.*${Je(e.suffix)}$`);e.pattern??(e.pattern=n),t._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),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})}});jc=m("$ZodCheckProperty",(t,e)=>{X.init(t,e),t._zod.check=n=>{let i=e.schema._zod.run({value:n.value[e.property],issues:[]},{});if(i instanceof Promise)return i.then(r=>zg(r,n,e.property));zg(i,n,e.property)}}),Uc=m("$ZodCheckMimeType",(t,e)=>{X.init(t,e);let n=new Set(e.mime);t._zod.onattach.push(i=>{i._zod.bag.mime=e.mime}),t._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:e.mime,input:i.value.type,inst:t,continue:!e.abort})}}),Mc=m("$ZodCheckOverwrite",(t,e)=>{X.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}})});var Bn,Fc=v(()=>{Bn=class{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}let i=e.split(`
3
+ var hI=Object.create;var Ou=Object.defineProperty;var pI=Object.getOwnPropertyDescriptor;var mI=Object.getOwnPropertyNames;var gI=Object.getPrototypeOf,vI=Object.prototype.hasOwnProperty;var ae=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var v=(t,e)=>()=>(t&&(e=t(t=0)),e);var z=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),He=(t,e)=>{for(var n in e)Ou(t,n,{get:e[n],enumerable:!0})},yI=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of mI(e))!vI.call(t,r)&&r!==n&&Ou(t,r,{get:()=>e[r],enumerable:!(i=pI(e,r))||i.enumerable});return t};var Je=(t,e,n)=>(n=t!=null?hI(gI(t)):{},yI(e||!t||!t.__esModule?Ou(n,"default",{value:t,enumerable:!0}):n,t));function _I(t){try{return JSON.stringify(t,(e,n)=>n instanceof Error?{name:n.name,message:n.message,stack:n.stack}:n)}catch{return"[unserializable meta]"}}var Eg,Pu,q,Tg=v(()=>{"use strict";Eg={debug:0,info:1,warn:2,error:3};Pu=class{level;constructor(e="info"){this.level=e}setLevel(e){this.level=e}getLevel(){return this.level}debug(e,n){this.emit("debug",e,n)}info(e,n){this.emit("info",e,n)}warn(e,n){this.emit("warn",e,n)}error(e,n){this.emit("error",e,n)}emit(e,n,i){if(Eg[e]<Eg[this.level])return;let o=`[${new Date().toISOString()}] ${e.toUpperCase()}`,s=i!==void 0?`${o} ${n} ${_I(i)}`:`${o} ${n}`;e==="warn"?console.warn(s):console.error(s)}},q=new Pu});var Og=v(()=>{"use strict"});var Pg,Cu=v(()=>{"use strict";Pg="JARVIS_HOME"});function m(t,e,n){function i(a,u){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:u,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,u);let c=s.prototype,l=Object.keys(c);for(let d=0;d<l.length;d++){let f=l[d];f in a||(a[f]=c[f].bind(a))}}let r=n?.Parent??Object;class o extends r{}Object.defineProperty(o,"name",{value:t});function s(a){var u;let c=n?.Parent?new o:this;i(c,a),(u=c._zod).deferred??(u.deferred=[]);for(let l of c._zod.deferred)l();return c}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(s,"name",{value:t}),s}function oe(t){return t&&Object.assign(rr,t),rr}var Cg,Au,zu,ot,zt,rr,nr=v(()=>{Au=Object.freeze({status:"aborted"});zu=Symbol("zod_brand"),ot=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},zt=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Cg=globalThis).__zod_globalConfig??(Cg.__zod_globalConfig={});rr=globalThis.__zod_globalConfig});var x={};He(x,{BIGINT_FORMAT_RANGES:()=>Zu,Class:()=>Ru,NUMBER_FORMAT_RANGES:()=>Vu,aborted:()=>Lt,allowsEval:()=>Uu,assert:()=>SI,assertEqual:()=>bI,assertIs:()=>xI,assertNever:()=>wI,assertNotEqual:()=>$I,assignProp:()=>Rt,base64ToUint8Array:()=>zg,base64urlToUint8Array:()=>FI,cached:()=>Nr,captureStackTrace:()=>fo,cleanEnum:()=>MI,cleanRegex:()=>Ln,clone:()=>Ie,cloneDef:()=>II,createTransparentProxy:()=>AI,defineLazy:()=>V,esc:()=>lo,escapeRegex:()=>Ke,explicitlyAborted:()=>Bu,extend:()=>RI,finalizeIssue:()=>Ee,floatSafeRemainder:()=>Du,getElementAtPath:()=>EI,getEnumValues:()=>Dn,getLengthableOrigin:()=>Mn,getParsedType:()=>CI,getSizableOrigin:()=>jn,hexToUint8Array:()=>ZI,isObject:()=>ir,isPlainObject:()=>Dt,issue:()=>Rr,joinValues:()=>g,jsonStringifyReplacer:()=>zr,merge:()=>LI,mergeDefs:()=>bt,normalizeParams:()=>w,nullish:()=>Nt,numKeys:()=>PI,objectClone:()=>kI,omit:()=>NI,optionalKeys:()=>Fu,parsedType:()=>$,partial:()=>UI,pick:()=>zI,prefixIssues:()=>ze,primitiveTypes:()=>Mu,promiseAllObject:()=>TI,propertyKeyTypes:()=>Un,randomString:()=>OI,required:()=>jI,safeExtend:()=>DI,shallowClone:()=>ju,slugify:()=>Lu,stringifyPrimitive:()=>b,uint8ArrayToBase64:()=>Ng,uint8ArrayToBase64url:()=>VI,uint8ArrayToHex:()=>BI,unwrapMessage:()=>Rn});function bI(t){return t}function $I(t){return t}function xI(t){}function wI(t){throw new Error("Unexpected value in exhaustive check")}function SI(t){}function Dn(t){let e=Object.values(t).filter(i=>typeof i=="number");return Object.entries(t).filter(([i,r])=>e.indexOf(+i)===-1).map(([i,r])=>r)}function g(t,e="|"){return t.map(n=>b(n)).join(e)}function zr(t,e){return typeof e=="bigint"?e.toString():e}function Nr(t){return{get value(){{let n=t();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function Nt(t){return t==null}function Ln(t){let e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function Du(t,e){let n=t/e,i=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<r?0:n-i}function V(t,e,n){let i;Object.defineProperty(t,e,{get(){if(i!==Ag)return i===void 0&&(i=Ag,i=n()),i},set(r){Object.defineProperty(t,e,{value:r})},configurable:!0})}function kI(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function Rt(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function bt(...t){let e={};for(let n of t){let i=Object.getOwnPropertyDescriptors(n);Object.assign(e,i)}return Object.defineProperties({},e)}function II(t){return bt(t._zod.def)}function EI(t,e){return e?e.reduce((n,i)=>n?.[i],t):t}function TI(t){let e=Object.keys(t),n=e.map(i=>t[i]);return Promise.all(n).then(i=>{let r={};for(let o=0;o<e.length;o++)r[e[o]]=i[o];return r})}function OI(t=10){let e="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<t;i++)n+=e[Math.floor(Math.random()*e.length)];return n}function lo(t){return JSON.stringify(t)}function Lu(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function ir(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Dt(t){if(ir(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let n=e.prototype;return!(ir(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function ju(t){return Dt(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function PI(t){let e=0;for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function Ke(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ie(t,e,n){let i=new t._zod.constr(e??t._zod.def);return(!e||n?.parent)&&(i._zod.parent=t),i}function w(t){let 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 AI(t){let e;return new Proxy({},{get(n,i,r){return e??(e=t()),Reflect.get(e,i,r)},set(n,i,r,o){return e??(e=t()),Reflect.set(e,i,r,o)},has(n,i){return e??(e=t()),Reflect.has(e,i)},deleteProperty(n,i){return e??(e=t()),Reflect.deleteProperty(e,i)},ownKeys(n){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(n,i){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,i)},defineProperty(n,i,r){return e??(e=t()),Reflect.defineProperty(e,i,r)}})}function b(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Fu(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}function zI(t,e){let n=t._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=bt(t._zod.def,{get shape(){let s={};for(let a in e){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&(s[a]=n.shape[a])}return Rt(this,"shape",s),s},checks:[]});return Ie(t,o)}function NI(t,e){let n=t._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=bt(t._zod.def,{get shape(){let s={...t._zod.def.shape};for(let a in e){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&delete s[a]}return Rt(this,"shape",s),s},checks:[]});return Ie(t,o)}function RI(t,e){if(!Dt(e))throw new Error("Invalid input to extend: expected a plain object");let n=t._zod.def.checks;if(n&&n.length>0){let o=t._zod.def.shape;for(let s in e)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=bt(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e};return Rt(this,"shape",o),o}});return Ie(t,r)}function DI(t,e){if(!Dt(e))throw new Error("Invalid input to safeExtend: expected a plain object");let n=bt(t._zod.def,{get shape(){let i={...t._zod.def.shape,...e};return Rt(this,"shape",i),i}});return Ie(t,n)}function LI(t,e){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=bt(t._zod.def,{get shape(){let i={...t._zod.def.shape,...e._zod.def.shape};return Rt(this,"shape",i),i},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return Ie(t,n)}function UI(t,e,n){let r=e._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=bt(e._zod.def,{get shape(){let a=e._zod.def.shape,u={...a};if(n)for(let c in n){if(!(c in a))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(u[c]=t?new t({type:"optional",innerType:a[c]}):a[c])}else for(let c in a)u[c]=t?new t({type:"optional",innerType:a[c]}):a[c];return Rt(this,"shape",u),u},checks:[]});return Ie(e,s)}function jI(t,e,n){let i=bt(e._zod.def,{get shape(){let r=e._zod.def.shape,o={...r};if(n)for(let s in n){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(o[s]=new t({type:"nonoptional",innerType:r[s]}))}else for(let s in r)o[s]=new t({type:"nonoptional",innerType:r[s]});return Rt(this,"shape",o),o}});return Ie(e,i)}function Lt(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue!==!0)return!0;return!1}function Bu(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue===!1)return!0;return!1}function ze(t,e){return e.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(t),n})}function Rn(t){return typeof t=="string"?t:t?.message}function Ee(t,e,n){let i=t.message?t.message:Rn(t.inst?._zod.def?.error?.(t))??Rn(e?.error?.(t))??Rn(n.customError?.(t))??Rn(n.localeError?.(t))??"Invalid input",{inst:r,continue:o,input:s,...a}=t;return a.path??(a.path=[]),a.message=i,e?.reportInput&&(a.input=s),a}function jn(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Mn(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function $(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let n=t;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return e}function Rr(...t){let[e,n,i]=t;return typeof e=="string"?{message:e,code:"custom",input:n,inst:i}:{...e}}function MI(t){return Object.entries(t).filter(([e,n])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function zg(t){let e=atob(t),n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return n}function Ng(t){let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return btoa(e)}function FI(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-e.length%4)%4);return zg(e+n)}function VI(t){return Ng(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function ZI(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(e.length/2);for(let i=0;i<e.length;i+=2)n[i/2]=Number.parseInt(e.slice(i,i+2),16);return n}function BI(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var Ag,fo,Uu,CI,Un,Mu,Vu,Zu,Ru,N=v(()=>{nr();Ag=Symbol("evaluating");fo="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};Uu=Nr(()=>{if(rr.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});CI=t=>{let 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}`)}},Un=new Set(["string","number","symbol"]),Mu=new Set(["string","number","bigint","boolean","symbol","undefined"]);Vu={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]},Zu={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};Ru=class{constructor(...e){}}});function Vn(t,e=n=>n.message){let n={},i=[];for(let r of t.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(e(r))):i.push(e(r));return{formErrors:i,fieldErrors:n}}function Zn(t,e=n=>n.message){let n={_errors:[]},i=(r,o=[])=>{for(let s of r.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>i({issues:a},[...o,...s.path]));else if(s.code==="invalid_key")i({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")i({issues:s.issues},[...o,...s.path]);else{let a=[...o,...s.path];if(a.length===0)n._errors.push(e(s));else{let u=n,c=0;for(;c<a.length;){let l=a[c];c===a.length-1?(u[l]=u[l]||{_errors:[]},u[l]._errors.push(e(s))):u[l]=u[l]||{_errors:[]},u=u[l],c++}}}};return i(t),n}function Gu(t,e=n=>n.message){let n={errors:[]},i=(r,o=[])=>{var s,a;for(let u of r.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(c=>i({issues:c},[...o,...u.path]));else if(u.code==="invalid_key")i({issues:u.issues},[...o,...u.path]);else if(u.code==="invalid_element")i({issues:u.issues},[...o,...u.path]);else{let c=[...o,...u.path];if(c.length===0){n.errors.push(e(u));continue}let l=n,d=0;for(;d<c.length;){let f=c[d],h=d===c.length-1;typeof f=="string"?(l.properties??(l.properties={}),(s=l.properties)[f]??(s[f]={errors:[]}),l=l.properties[f]):(l.items??(l.items=[]),(a=l.items)[f]??(a[f]={errors:[]}),l=l.items[f]),h&&l.errors.push(e(u)),d++}}};return i(t),n}function Dg(t){let e=[],n=t.map(i=>typeof i=="object"?i.key:i);for(let i of n)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 Wu(t){let e=[],n=[...t.issues].sort((i,r)=>(i.path??[]).length-(r.path??[]).length);for(let i of n)e.push(`\u2716 ${i.message}`),i.path?.length&&e.push(` \u2192 at ${Dg(i.path)}`);return e.join(`
4
+ `)}var Rg,Fn,Ne,qu=v(()=>{nr();N();Rg=(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,zr,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Fn=m("$ZodError",Rg),Ne=m("$ZodError",Rg,{Parent:Error})});var Dr,ho,Lr,po,Ur,Hu,jr,Ju,mo,WI,go,qI,vo,HI,yo,JI,_o,KI,bo,YI,$o,XI,xo,QI,Ku=v(()=>{nr();qu();N();Dr=t=>(e,n,i,r)=>{let o=i?{...i,async:!1}:{async:!1},s=e._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new ot;if(s.issues.length){let a=new(r?.Err??t)(s.issues.map(u=>Ee(u,o,oe())));throw fo(a,r?.callee),a}return s.value},ho=Dr(Ne),Lr=t=>async(e,n,i,r)=>{let o=i?{...i,async:!0}:{async:!0},s=e._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(r?.Err??t)(s.issues.map(u=>Ee(u,o,oe())));throw fo(a,r?.callee),a}return s.value},po=Lr(Ne),Ur=t=>(e,n,i)=>{let r=i?{...i,async:!1}:{async:!1},o=e._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new ot;return o.issues.length?{success:!1,error:new(t??Fn)(o.issues.map(s=>Ee(s,r,oe())))}:{success:!0,data:o.value}},Hu=Ur(Ne),jr=t=>async(e,n,i)=>{let r=i?{...i,async:!0}:{async:!0},o=e._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new t(o.issues.map(s=>Ee(s,r,oe())))}:{success:!0,data:o.value}},Ju=jr(Ne),mo=t=>(e,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Dr(t)(e,n,r)},WI=mo(Ne),go=t=>(e,n,i)=>Dr(t)(e,n,i),qI=go(Ne),vo=t=>async(e,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Lr(t)(e,n,r)},HI=vo(Ne),yo=t=>async(e,n,i)=>Lr(t)(e,n,i),JI=yo(Ne),_o=t=>(e,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Ur(t)(e,n,r)},KI=_o(Ne),bo=t=>(e,n,i)=>Ur(t)(e,n,i),YI=bo(Ne),$o=t=>async(e,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return jr(t)(e,n,r)},XI=$o(Ne),xo=t=>async(e,n,i)=>jr(t)(e,n,i),QI=xo(Ne)});var Fe={};He(Fe,{base64:()=>fc,base64url:()=>wo,bigint:()=>_c,boolean:()=>$c,browserEmail:()=>aE,cidrv4:()=>lc,cidrv6:()=>dc,cuid:()=>Yu,cuid2:()=>Xu,date:()=>mc,datetime:()=>vc,domain:()=>lE,duration:()=>nc,e164:()=>pc,email:()=>oc,emoji:()=>sc,extendedDuration:()=>eE,guid:()=>ic,hex:()=>dE,hostname:()=>cE,html5Email:()=>iE,httpProtocol:()=>hc,idnEmail:()=>sE,integer:()=>bc,ipv4:()=>ac,ipv6:()=>uc,ksuid:()=>tc,lowercase:()=>Sc,mac:()=>cc,md5_base64:()=>hE,md5_base64url:()=>pE,md5_hex:()=>fE,nanoid:()=>rc,null:()=>xc,number:()=>So,rfc5322Email:()=>oE,sha1_base64:()=>gE,sha1_base64url:()=>vE,sha1_hex:()=>mE,sha256_base64:()=>_E,sha256_base64url:()=>bE,sha256_hex:()=>yE,sha384_base64:()=>xE,sha384_base64url:()=>wE,sha384_hex:()=>$E,sha512_base64:()=>kE,sha512_base64url:()=>IE,sha512_hex:()=>SE,string:()=>yc,time:()=>gc,ulid:()=>Qu,undefined:()=>wc,unicodeEmail:()=>Lg,uppercase:()=>kc,uuid:()=>or,uuid4:()=>tE,uuid6:()=>rE,uuid7:()=>nE,xid:()=>ec});function sc(){return new RegExp(uE,"u")}function jg(t){let 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 gc(t){return new RegExp(`^${jg(t)}$`)}function vc(t){let e=jg({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${e}(?:${n.join("|")})`;return new RegExp(`^${Ug}T(?:${i})$`)}function Bn(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function Gn(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var Yu,Xu,Qu,ec,tc,rc,nc,eE,ic,or,tE,rE,nE,oc,iE,oE,Lg,sE,aE,uE,ac,uc,cc,lc,dc,fc,wo,cE,lE,hc,pc,Ug,mc,yc,_c,bc,So,$c,xc,wc,Sc,kc,dE,fE,hE,pE,mE,gE,vE,yE,_E,bE,$E,xE,wE,SE,kE,IE,ko=v(()=>{N();Yu=/^[cC][0-9a-z]{6,}$/,Xu=/^[0-9a-z]+$/,Qu=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ec=/^[0-9a-vA-V]{20}$/,tc=/^[A-Za-z0-9]{27}$/,rc=/^[a-zA-Z0-9_-]{21}$/,nc=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,eE=/^[-+]?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)?)??$/,ic=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,or=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,tE=or(4),rE=or(6),nE=or(7),oc=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,iE=/^[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])?)*$/,oE=/^(([^<>()\[\]\\.,;:\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,}))$/,Lg=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,sE=Lg,aE=/^[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])?)*$/,uE="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";ac=/^(?:(?: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])$/,uc=/^(([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}|:))$/,cc=t=>{let e=Ke(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},lc=/^((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])$/,dc=/^(([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])$/,fc=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,wo=/^[A-Za-z0-9_-]*$/,cE=/^(?=.{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])?)*\.?$/,lE=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,hc=/^https?$/,pc=/^\+[1-9]\d{6,14}$/,Ug="(?:(?:\\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])))",mc=new RegExp(`^${Ug}$`);yc=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},_c=/^-?\d+n?$/,bc=/^-?\d+$/,So=/^-?\d+(?:\.\d+)?$/,$c=/^(?:true|false)$/i,xc=/^null$/i,wc=/^undefined$/i,Sc=/^[^A-Z]*$/,kc=/^[^a-z]*$/,dE=/^[0-9a-fA-F]*$/;fE=/^[0-9a-fA-F]{32}$/,hE=Bn(22,"=="),pE=Gn(22),mE=/^[0-9a-fA-F]{40}$/,gE=Bn(27,"="),vE=Gn(27),yE=/^[0-9a-fA-F]{64}$/,_E=Bn(43,"="),bE=Gn(43),$E=/^[0-9a-fA-F]{96}$/,xE=Bn(64,""),wE=Gn(64),SE=/^[0-9a-fA-F]{128}$/,kE=Bn(86,"=="),IE=Gn(86)});function Mg(t,e,n){t.issues.length&&e.issues.push(...ze(n,t.issues))}var X,Fg,Io,Eo,Ic,Ec,Tc,Oc,Pc,Cc,Ac,zc,Nc,Mr,Rc,Dc,Lc,Uc,jc,Mc,Fc,Vc,Zc,To=v(()=>{nr();ko();N();X=m("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),Fg={number:"number",bigint:"bigint",object:"date"},Io=m("$ZodCheckLessThan",(t,e)=>{X.init(t,e);let n=Fg[typeof e.value];t._zod.onattach.push(i=>{let r=i._zod.bag,o=(e.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<o&&(e.inclusive?r.maximum=e.value:r.exclusiveMaximum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value<=e.value:i.value<e.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Eo=m("$ZodCheckGreaterThan",(t,e)=>{X.init(t,e);let n=Fg[typeof e.value];t._zod.onattach.push(i=>{let r=i._zod.bag,o=(e.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>o&&(e.inclusive?r.minimum=e.value:r.exclusiveMinimum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value>=e.value:i.value>e.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Ic=m("$ZodCheckMultipleOf",(t,e)=>{X.init(t,e),t._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=e.value)}),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%e.value===BigInt(0):Du(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),Ec=m("$ZodCheckNumberFormat",(t,e)=>{X.init(t,e),e.format=e.format||"float64";let n=e.format?.includes("int"),i=n?"int":"number",[r,o]=Vu[e.format];t._zod.onattach.push(s=>{let a=s._zod.bag;a.format=e.format,a.minimum=r,a.maximum=o,n&&(a.pattern=bc)}),t._zod.check=s=>{let a=s.value;if(n){if(!Number.isInteger(a)){s.issues.push({expected:i,format:e.format,code:"invalid_type",continue:!1,input:a,inst:t});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,inclusive:!0,continue:!e.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,inclusive:!0,continue:!e.abort});return}}a<r&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!e.abort})}}),Tc=m("$ZodCheckBigIntFormat",(t,e)=>{X.init(t,e);let[n,i]=Zu[e.format];t._zod.onattach.push(r=>{let o=r._zod.bag;o.format=e.format,o.minimum=n,o.maximum=i}),t._zod.check=r=>{let o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:t,continue:!e.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:t,continue:!e.abort})}}),Oc=m("$ZodCheckMaxSize",(t,e)=>{var n;X.init(t,e),(n=t._zod.def).when??(n.when=i=>{let r=i.value;return!Nt(r)&&r.size!==void 0}),t._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<r&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{let r=i.value;r.size<=e.maximum||i.issues.push({origin:jn(r),code:"too_big",maximum:e.maximum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),Pc=m("$ZodCheckMinSize",(t,e)=>{var n;X.init(t,e),(n=t._zod.def).when??(n.when=i=>{let r=i.value;return!Nt(r)&&r.size!==void 0}),t._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>r&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{let r=i.value;r.size>=e.minimum||i.issues.push({origin:jn(r),code:"too_small",minimum:e.minimum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),Cc=m("$ZodCheckSizeEquals",(t,e)=>{var n;X.init(t,e),(n=t._zod.def).when??(n.when=i=>{let r=i.value;return!Nt(r)&&r.size!==void 0}),t._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=e.size,r.maximum=e.size,r.size=e.size}),t._zod.check=i=>{let r=i.value,o=r.size;if(o===e.size)return;let s=o>e.size;i.issues.push({origin:jn(r),...s?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),Ac=m("$ZodCheckMaxLength",(t,e)=>{var n;X.init(t,e),(n=t._zod.def).when??(n.when=i=>{let r=i.value;return!Nt(r)&&r.length!==void 0}),t._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<r&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{let r=i.value;if(r.length<=e.maximum)return;let s=Mn(r);i.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),zc=m("$ZodCheckMinLength",(t,e)=>{var n;X.init(t,e),(n=t._zod.def).when??(n.when=i=>{let r=i.value;return!Nt(r)&&r.length!==void 0}),t._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>r&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{let r=i.value;if(r.length>=e.minimum)return;let s=Mn(r);i.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),Nc=m("$ZodCheckLengthEquals",(t,e)=>{var n;X.init(t,e),(n=t._zod.def).when??(n.when=i=>{let r=i.value;return!Nt(r)&&r.length!==void 0}),t._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=e.length,r.maximum=e.length,r.length=e.length}),t._zod.check=i=>{let r=i.value,o=r.length;if(o===e.length)return;let s=Mn(r),a=o>e.length;i.issues.push({origin:s,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),Mr=m("$ZodCheckStringFormat",(t,e)=>{var n,i;X.init(t,e),t._zod.onattach.push(r=>{let o=r._zod.bag;o.format=e.format,e.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(e.pattern))}),e.pattern?(n=t._zod).check??(n.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:e.format,input:r.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(i=t._zod).check??(i.check=()=>{})}),Rc=m("$ZodCheckRegex",(t,e)=>{Mr.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Dc=m("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Sc),Mr.init(t,e)}),Lc=m("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=kc),Mr.init(t,e)}),Uc=m("$ZodCheckIncludes",(t,e)=>{X.init(t,e);let n=Ke(e.includes),i=new RegExp(typeof e.position=="number"?`^.{${e.position}}${n}`:n);e.pattern=i,t._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),t._zod.check=r=>{r.value.includes(e.includes,e.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:r.value,inst:t,continue:!e.abort})}}),jc=m("$ZodCheckStartsWith",(t,e)=>{X.init(t,e);let n=new RegExp(`^${Ke(e.prefix)}.*`);e.pattern??(e.pattern=n),t._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),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})}}),Mc=m("$ZodCheckEndsWith",(t,e)=>{X.init(t,e);let n=new RegExp(`.*${Ke(e.suffix)}$`);e.pattern??(e.pattern=n),t._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),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})}});Fc=m("$ZodCheckProperty",(t,e)=>{X.init(t,e),t._zod.check=n=>{let i=e.schema._zod.run({value:n.value[e.property],issues:[]},{});if(i instanceof Promise)return i.then(r=>Mg(r,n,e.property));Mg(i,n,e.property)}}),Vc=m("$ZodCheckMimeType",(t,e)=>{X.init(t,e);let n=new Set(e.mime);t._zod.onattach.push(i=>{i._zod.bag.mime=e.mime}),t._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:e.mime,input:i.value.type,inst:t,continue:!e.abort})}}),Zc=m("$ZodCheckOverwrite",(t,e)=>{X.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}})});var Wn,Bc=v(()=>{Wn=class{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}let i=e.split(`
5
5
  `).filter(s=>s),r=Math.min(...i.map(s=>s.length-s.trimStart().length)),o=i.map(s=>s.slice(r)).map(s=>" ".repeat(this.indent*2)+s);for(let s of o)this.content.push(s)}compile(){let e=Function,n=this?.args,r=[...(this?.content??[""]).map(o=>` ${o}`)];return new e(...n,r.join(`
6
- `))}}});var Vc,Zc=v(()=>{Vc={major:4,minor:4,patch:3}});function dl(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}function Kg(t){if(!bo.test(t))return!1;let e=t.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=e.padEnd(Math.ceil(e.length/4)*4,"=");return dl(n)}function Yg(t,e=null){try{let n=t.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||e&&(!("alg"in r)||r.alg!==e))}catch{return!1}}function Dg(t,e,n){t.issues.length&&e.issues.push(...ze(n,t.issues)),e.value[n]=t.value}function Po(t,e,n,i,r,o){let s=n in i;if(t.issues.length){if(r&&o&&!s)return;e.issues.push(...ze(n,t.issues))}if(!s&&!r){t.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}t.value===void 0?s&&(e.value[n]=void 0):e.value[n]=t.value}function Xg(t){let e=Object.keys(t.shape);for(let i of e)if(!t.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let n=ju(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(n)}}function Qg(t,e,n,i,r,o){let s=[],a=r.keySet,u=r.catchall._zod,c=u.def.type,l=u.optin==="optional",d=u.optout==="optional";for(let f in e){if(f==="__proto__"||a.has(f))continue;if(c==="never"){s.push(f);continue}let p=u.run({value:e[f],issues:[]},i);p instanceof Promise?t.push(p.then(h=>Po(h,n,f,e,l,d))):Po(p,n,f,e,l,d)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:e,inst:o}),t.length?Promise.all(t).then(()=>n):n}function Lg(t,e,n,i){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;let r=t.filter(o=>!Lt(o));return r.length===1?(e.value=r[0].value,r[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(o=>o.issues.map(s=>Ee(s,i,oe())))}),e)}function jg(t,e,n,i){let r=t.filter(o=>o.issues.length===0);return r.length===1?(e.value=r[0].value,e):(r.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(o=>o.issues.map(s=>Ee(s,i,oe())))}):e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:[],inclusive:!1}),e)}function Bc(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(Dt(t)&&Dt(e)){let n=Object.keys(e),i=Object.keys(t).filter(o=>n.indexOf(o)!==-1),r={...t,...e};for(let o of i){let s=Bc(t[o],e[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};r[o]=s.data}return{valid:!0,data:r}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<t.length;i++){let r=t[i],o=e[i],s=Bc(r,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Ug(t,e,n){let i=new Map,r;for(let a of e.issues)if(a.code==="unrecognized_keys"){r??(r=a);for(let u of a.keys)i.has(u)||i.set(u,{}),i.get(u).l=!0}else t.issues.push(a);for(let a of n.issues)if(a.code==="unrecognized_keys")for(let u of a.keys)i.has(u)||i.set(u,{}),i.get(u).r=!0;else t.issues.push(a);let o=[...i].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(o.length&&r&&t.issues.push({...r,keys:o}),Lt(t))return t;let s=Bc(e.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return t.value=s.data,t}function Mg(t,e){for(let n=t.length-1;n>=0;n--)if(t[n]._zod[e]!=="optional")return n+1;return 0}function Fg(t,e,n){t.issues.length&&e.issues.push(...ze(n,t.issues)),e.value[n]=t.value}function Vg(t,e,n,i,r){for(let o=0;o<n.length;o++){let s=t[o],a=o<i.length;if(s.issues.length){if(!a&&o>=r){e.value.length=o;break}e.issues.push(...ze(o,s.issues))}e.value[o]=s.value}for(let o=e.value.length-1;o>=i.length&&(n[o]._zod.optout==="optional"&&e.value[o]===void 0);o--)e.value.length=o;return e}function Zg(t,e,n,i,r,o,s){t.issues.length&&(Dn.has(typeof i)?n.issues.push(...ze(i,t.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:t.issues.map(a=>Ee(a,s,oe()))})),e.issues.length&&(Dn.has(typeof i)?n.issues.push(...ze(i,e.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:e.issues.map(a=>Ee(a,s,oe()))})),n.value.set(t.value,e.value)}function Bg(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}function Gg(t,e){return e===void 0&&(t.issues.length||t.fallback)?{issues:[],value:void 0}:t}function Wg(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}function qg(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}function Eo(t,e,n){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues,fallback:t.fallback},n)}function To(t,e,n){if(t.issues.length)return t.aborted=!0,t;if((n.direction||"forward")==="forward"){let r=e.transform(t.value,t);return r instanceof Promise?r.then(o=>Oo(t,o,e.out,n)):Oo(t,r,e.out,n)}else{let r=e.reverseTransform(t.value,t);return r instanceof Promise?r.then(o=>Oo(t,o,e.in,n)):Oo(t,r,e.in,n)}}function Oo(t,e,n,i){return t.issues.length?(t.aborted=!0,t):n._zod.run({value:e,issues:t.issues},i)}function Hg(t){return t.value=Object.freeze(t.value),t}function Jg(t,e,n,i){if(!t){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),e.issues.push(zr(r))}}var L,or,H,Gc,Wc,qc,Hc,Jc,Kc,Yc,Xc,Qc,el,tl,rl,nl,il,ol,sl,al,ul,cl,ll,fl,pl,hl,ml,gl,Co,vl,Gn,Ao,yl,_l,$l,bl,xl,wl,Sl,kl,Il,El,ev,Tl,Wn,Ol,Pl,Cl,zo,Al,zl,Nl,Rl,Dl,Ll,jl,No,Ul,Ml,Fl,Vl,Zl,Bl,Gl,Wl,Ro,qn,ql,Hl,Jl,Kl,Yl,Xl,Ql,ed=v(()=>{Io();rr();Fc();qu();wo();N();Zc();N();L=m("$ZodType",(t,e)=>{var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Vc;let i=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&i.unshift(t);for(let r of i)for(let o of r._zod.onattach)o(t);if(i.length===0)(n=t._zod).deferred??(n.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let r=(s,a,u)=>{let c=Lt(s),l;for(let d of a){if(d._zod.def.when){if(Fu(s)||!d._zod.def.when(s))continue}else if(c)continue;let f=s.issues.length,p=d._zod.check(s);if(p instanceof Promise&&u?.async===!1)throw new ot;if(l||p instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await p,s.issues.length!==f&&(c||(c=Lt(s,f)))});else{if(s.issues.length===f)continue;c||(c=Lt(s,f))}}return l?l.then(()=>s):s},o=(s,a,u)=>{if(Lt(s))return s.aborted=!0,s;let c=r(a,i,u);if(c instanceof Promise){if(u.async===!1)throw new ot;return c.then(l=>t._zod.parse(l,u))}return t._zod.parse(c,u)};t._zod.run=(s,a)=>{if(a.skipChecks)return t._zod.parse(s,a);if(a.direction==="backward"){let c=t._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return c instanceof Promise?c.then(l=>o(l,s,a)):o(c,s,a)}let u=t._zod.parse(s,a);if(u instanceof Promise){if(a.async===!1)throw new ot;return u.then(c=>r(c,i,a))}return r(u,i,a)}}V(t,"~standard",()=>({validate:r=>{try{let o=Gu(t,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Wu(t,r).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),or=m("$ZodString",(t,e)=>{L.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??mc(t._zod.bag),t._zod.parse=(n,i)=>{if(e.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}}),H=m("$ZodStringFormat",(t,e)=>{jr.init(t,e),or.init(t,e)}),Gc=m("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=tc),H.init(t,e)}),Wc=m("$ZodUUID",(t,e)=>{if(e.version){let 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=ir(i))}else e.pattern??(e.pattern=ir());H.init(t,e)}),qc=m("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=rc),H.init(t,e)}),Hc=m("$ZodURL",(t,e)=>{H.init(t,e),t._zod.check=n=>{try{let i=n.value.trim();if(!e.normalize&&e.protocol?.source===lc.source&&!/^https?:\/\//i.test(i)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:t,continue:!e.abort});return}let r=new URL(i);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:n.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:n.value,inst:t,continue:!e.abort})),e.normalize?n.value=r.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!e.abort})}}}),Jc=m("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=nc()),H.init(t,e)}),Kc=m("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Qu),H.init(t,e)}),Yc=m("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Hu),H.init(t,e)}),Xc=m("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Ju),H.init(t,e)}),Qc=m("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Ku),H.init(t,e)}),el=m("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Yu),H.init(t,e)}),tl=m("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Xu),H.init(t,e)}),rl=m("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=hc(e)),H.init(t,e)}),nl=m("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=fc),H.init(t,e)}),il=m("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=pc(e)),H.init(t,e)}),ol=m("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=ec),H.init(t,e)}),sl=m("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=ic),H.init(t,e),t._zod.bag.format="ipv4"}),al=m("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=oc),H.init(t,e),t._zod.bag.format="ipv6",t._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!e.abort})}}}),ul=m("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=sc(e.delimiter)),H.init(t,e),t._zod.bag.format="mac"}),cl=m("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=ac),H.init(t,e)}),ll=m("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=uc),H.init(t,e),t._zod.check=n=>{let i=n.value.split("/");try{if(i.length!==2)throw new Error;let[r,o]=i;if(!o)throw new Error;let s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!e.abort})}}});fl=m("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=cc),H.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=n=>{dl(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!e.abort})}});pl=m("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=bo),H.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=n=>{Kg(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!e.abort})}}),hl=m("$ZodE164",(t,e)=>{e.pattern??(e.pattern=dc),H.init(t,e)});ml=m("$ZodJWT",(t,e)=>{H.init(t,e),t._zod.check=n=>{Yg(n.value,e.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!e.abort})}}),gl=m("$ZodCustomStringFormat",(t,e)=>{H.init(t,e),t._zod.check=n=>{e.fn(n.value)||n.issues.push({code:"invalid_format",format:e.format,input:n.value,inst:t,continue:!e.abort})}}),Co=m("$ZodNumber",(t,e)=>{L.init(t,e),t._zod.pattern=t._zod.bag.pattern??xo,t._zod.parse=(n,i)=>{if(e.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let o=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:t,...o?{received:o}:{}}),n}}),vl=m("$ZodNumberFormat",(t,e)=>{Sc.init(t,e),Co.init(t,e)}),Gn=m("$ZodBoolean",(t,e)=>{L.init(t,e),t._zod.pattern=yc,t._zod.parse=(n,i)=>{if(e.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:t}),n}}),Ao=m("$ZodBigInt",(t,e)=>{L.init(t,e),t._zod.pattern=gc,t._zod.parse=(n,i)=>{if(e.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:t}),n}}),yl=m("$ZodBigIntFormat",(t,e)=>{kc.init(t,e),Ao.init(t,e)}),_l=m("$ZodSymbol",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:t}),n}}),$l=m("$ZodUndefined",(t,e)=>{L.init(t,e),t._zod.pattern=$c,t._zod.values=new Set([void 0]),t._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:t}),n}}),bl=m("$ZodNull",(t,e)=>{L.init(t,e),t._zod.pattern=_c,t._zod.values=new Set([null]),t._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:t}),n}}),xl=m("$ZodAny",(t,e)=>{L.init(t,e),t._zod.parse=n=>n}),wl=m("$ZodUnknown",(t,e)=>{L.init(t,e),t._zod.parse=n=>n}),Sl=m("$ZodNever",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)}),kl=m("$ZodVoid",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:t}),n}}),Il=m("$ZodDate",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>{if(e.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:t}),n}});El=m("$ZodArray",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:t}),n;n.value=Array(r.length);let o=[];for(let s=0;s<r.length;s++){let a=r[s],u=e.element._zod.run({value:a,issues:[]},i);u instanceof Promise?o.push(u.then(c=>Dg(c,n,s))):Dg(u,n,s)}return o.length?Promise.all(o).then(()=>n):n}});ev=m("$ZodObject",(t,e)=>{if(L.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let a=e.shape;Object.defineProperty(e,"shape",{get:()=>{let u={...a};return Object.defineProperty(e,"shape",{value:u}),u}})}let i=Ar(()=>Xg(e));V(t._zod,"propValues",()=>{let a=e.shape,u={};for(let c in a){let l=a[c]._zod;if(l.values){u[c]??(u[c]=new Set);for(let d of l.values)u[c].add(d)}}return u});let r=nr,o=e.catchall,s;t._zod.parse=(a,u)=>{s??(s=i.value);let c=a.value;if(!r(c))return a.issues.push({expected:"object",code:"invalid_type",input:c,inst:t}),a;a.value={};let l=[],d=s.shape;for(let f of s.keys){let p=d[f],h=p._zod.optin==="optional",_=p._zod.optout==="optional",S=p._zod.run({value:c[f],issues:[]},u);S instanceof Promise?l.push(S.then(k=>Po(k,a,f,c,h,_))):Po(S,a,f,c,h,_)}return o?Qg(l,c,a,u,i.value,t):l.length?Promise.all(l).then(()=>a):a}}),Tl=m("$ZodObjectJIT",(t,e)=>{ev.init(t,e);let n=t._zod.parse,i=Ar(()=>Xg(e)),r=f=>{let p=new Bn(["shape","payload","ctx"]),h=i.value,_=A=>{let I=uo(A);return`shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`};p.write("const input = payload.value;");let S=Object.create(null),k=0;for(let A of h.keys)S[A]=`key_${k++}`;p.write("const newResult = {};");for(let A of h.keys){let I=S[A],T=uo(A),Z=f[A],F=Z?._zod?.optin==="optional",W=Z?._zod?.optout==="optional";p.write(`const ${I} = ${_(A)};`),F&&W?p.write(`
6
+ `))}}});var Gc,Wc=v(()=>{Gc={major:4,minor:4,patch:3}});function pl(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}function nv(t){if(!wo.test(t))return!1;let e=t.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=e.padEnd(Math.ceil(e.length/4)*4,"=");return pl(n)}function iv(t,e=null){try{let n=t.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||e&&(!("alg"in r)||r.alg!==e))}catch{return!1}}function Zg(t,e,n){t.issues.length&&e.issues.push(...ze(n,t.issues)),e.value[n]=t.value}function Ao(t,e,n,i,r,o){let s=n in i;if(t.issues.length){if(r&&o&&!s)return;e.issues.push(...ze(n,t.issues))}if(!s&&!r){t.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}t.value===void 0?s&&(e.value[n]=void 0):e.value[n]=t.value}function ov(t){let e=Object.keys(t.shape);for(let i of e)if(!t.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let n=Fu(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(n)}}function sv(t,e,n,i,r,o){let s=[],a=r.keySet,u=r.catchall._zod,c=u.def.type,l=u.optin==="optional",d=u.optout==="optional";for(let f in e){if(f==="__proto__"||a.has(f))continue;if(c==="never"){s.push(f);continue}let h=u.run({value:e[f],issues:[]},i);h instanceof Promise?t.push(h.then(p=>Ao(p,n,f,e,l,d))):Ao(h,n,f,e,l,d)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:e,inst:o}),t.length?Promise.all(t).then(()=>n):n}function Bg(t,e,n,i){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;let r=t.filter(o=>!Lt(o));return r.length===1?(e.value=r[0].value,r[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(o=>o.issues.map(s=>Ee(s,i,oe())))}),e)}function Gg(t,e,n,i){let r=t.filter(o=>o.issues.length===0);return r.length===1?(e.value=r[0].value,e):(r.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(o=>o.issues.map(s=>Ee(s,i,oe())))}):e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:[],inclusive:!1}),e)}function qc(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(Dt(t)&&Dt(e)){let n=Object.keys(e),i=Object.keys(t).filter(o=>n.indexOf(o)!==-1),r={...t,...e};for(let o of i){let s=qc(t[o],e[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};r[o]=s.data}return{valid:!0,data:r}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<t.length;i++){let r=t[i],o=e[i],s=qc(r,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Wg(t,e,n){let i=new Map,r;for(let a of e.issues)if(a.code==="unrecognized_keys"){r??(r=a);for(let u of a.keys)i.has(u)||i.set(u,{}),i.get(u).l=!0}else t.issues.push(a);for(let a of n.issues)if(a.code==="unrecognized_keys")for(let u of a.keys)i.has(u)||i.set(u,{}),i.get(u).r=!0;else t.issues.push(a);let o=[...i].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(o.length&&r&&t.issues.push({...r,keys:o}),Lt(t))return t;let s=qc(e.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return t.value=s.data,t}function qg(t,e){for(let n=t.length-1;n>=0;n--)if(t[n]._zod[e]!=="optional")return n+1;return 0}function Hg(t,e,n){t.issues.length&&e.issues.push(...ze(n,t.issues)),e.value[n]=t.value}function Jg(t,e,n,i,r){for(let o=0;o<n.length;o++){let s=t[o],a=o<i.length;if(s.issues.length){if(!a&&o>=r){e.value.length=o;break}e.issues.push(...ze(o,s.issues))}e.value[o]=s.value}for(let o=e.value.length-1;o>=i.length&&(n[o]._zod.optout==="optional"&&e.value[o]===void 0);o--)e.value.length=o;return e}function Kg(t,e,n,i,r,o,s){t.issues.length&&(Un.has(typeof i)?n.issues.push(...ze(i,t.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:t.issues.map(a=>Ee(a,s,oe()))})),e.issues.length&&(Un.has(typeof i)?n.issues.push(...ze(i,e.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:e.issues.map(a=>Ee(a,s,oe()))})),n.value.set(t.value,e.value)}function Yg(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}function Xg(t,e){return e===void 0&&(t.issues.length||t.fallback)?{issues:[],value:void 0}:t}function Qg(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}function ev(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}function Oo(t,e,n){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues,fallback:t.fallback},n)}function Po(t,e,n){if(t.issues.length)return t.aborted=!0,t;if((n.direction||"forward")==="forward"){let r=e.transform(t.value,t);return r instanceof Promise?r.then(o=>Co(t,o,e.out,n)):Co(t,r,e.out,n)}else{let r=e.reverseTransform(t.value,t);return r instanceof Promise?r.then(o=>Co(t,o,e.in,n)):Co(t,r,e.in,n)}}function Co(t,e,n,i){return t.issues.length?(t.aborted=!0,t):n._zod.run({value:e,issues:t.issues},i)}function tv(t){return t.value=Object.freeze(t.value),t}function rv(t,e,n,i){if(!t){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),e.issues.push(Rr(r))}}var L,sr,H,Hc,Jc,Kc,Yc,Xc,Qc,el,tl,rl,nl,il,ol,sl,al,ul,cl,ll,dl,fl,hl,ml,gl,vl,yl,_l,zo,bl,qn,No,$l,xl,wl,Sl,kl,Il,El,Tl,Ol,Pl,av,Cl,Hn,Al,zl,Nl,Ro,Rl,Dl,Ll,Ul,jl,Ml,Fl,Do,Vl,Zl,Bl,Gl,Wl,ql,Hl,Jl,Lo,Jn,Kl,Yl,Xl,Ql,ed,td,rd,nd=v(()=>{To();nr();Bc();Ku();ko();N();Wc();N();L=m("$ZodType",(t,e)=>{var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Gc;let i=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&i.unshift(t);for(let r of i)for(let o of r._zod.onattach)o(t);if(i.length===0)(n=t._zod).deferred??(n.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let r=(s,a,u)=>{let c=Lt(s),l;for(let d of a){if(d._zod.def.when){if(Bu(s)||!d._zod.def.when(s))continue}else if(c)continue;let f=s.issues.length,h=d._zod.check(s);if(h instanceof Promise&&u?.async===!1)throw new ot;if(l||h instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await h,s.issues.length!==f&&(c||(c=Lt(s,f)))});else{if(s.issues.length===f)continue;c||(c=Lt(s,f))}}return l?l.then(()=>s):s},o=(s,a,u)=>{if(Lt(s))return s.aborted=!0,s;let c=r(a,i,u);if(c instanceof Promise){if(u.async===!1)throw new ot;return c.then(l=>t._zod.parse(l,u))}return t._zod.parse(c,u)};t._zod.run=(s,a)=>{if(a.skipChecks)return t._zod.parse(s,a);if(a.direction==="backward"){let c=t._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return c instanceof Promise?c.then(l=>o(l,s,a)):o(c,s,a)}let u=t._zod.parse(s,a);if(u instanceof Promise){if(a.async===!1)throw new ot;return u.then(c=>r(c,i,a))}return r(u,i,a)}}V(t,"~standard",()=>({validate:r=>{try{let o=Hu(t,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Ju(t,r).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),sr=m("$ZodString",(t,e)=>{L.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??yc(t._zod.bag),t._zod.parse=(n,i)=>{if(e.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}}),H=m("$ZodStringFormat",(t,e)=>{Mr.init(t,e),sr.init(t,e)}),Hc=m("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=ic),H.init(t,e)}),Jc=m("$ZodUUID",(t,e)=>{if(e.version){let 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=or(i))}else e.pattern??(e.pattern=or());H.init(t,e)}),Kc=m("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=oc),H.init(t,e)}),Yc=m("$ZodURL",(t,e)=>{H.init(t,e),t._zod.check=n=>{try{let i=n.value.trim();if(!e.normalize&&e.protocol?.source===hc.source&&!/^https?:\/\//i.test(i)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:t,continue:!e.abort});return}let r=new URL(i);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:n.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:n.value,inst:t,continue:!e.abort})),e.normalize?n.value=r.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!e.abort})}}}),Xc=m("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=sc()),H.init(t,e)}),Qc=m("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=rc),H.init(t,e)}),el=m("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Yu),H.init(t,e)}),tl=m("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Xu),H.init(t,e)}),rl=m("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Qu),H.init(t,e)}),nl=m("$ZodXID",(t,e)=>{e.pattern??(e.pattern=ec),H.init(t,e)}),il=m("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=tc),H.init(t,e)}),ol=m("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=vc(e)),H.init(t,e)}),sl=m("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=mc),H.init(t,e)}),al=m("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=gc(e)),H.init(t,e)}),ul=m("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=nc),H.init(t,e)}),cl=m("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=ac),H.init(t,e),t._zod.bag.format="ipv4"}),ll=m("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=uc),H.init(t,e),t._zod.bag.format="ipv6",t._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!e.abort})}}}),dl=m("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=cc(e.delimiter)),H.init(t,e),t._zod.bag.format="mac"}),fl=m("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=lc),H.init(t,e)}),hl=m("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=dc),H.init(t,e),t._zod.check=n=>{let i=n.value.split("/");try{if(i.length!==2)throw new Error;let[r,o]=i;if(!o)throw new Error;let s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!e.abort})}}});ml=m("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=fc),H.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=n=>{pl(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!e.abort})}});gl=m("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=wo),H.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=n=>{nv(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!e.abort})}}),vl=m("$ZodE164",(t,e)=>{e.pattern??(e.pattern=pc),H.init(t,e)});yl=m("$ZodJWT",(t,e)=>{H.init(t,e),t._zod.check=n=>{iv(n.value,e.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!e.abort})}}),_l=m("$ZodCustomStringFormat",(t,e)=>{H.init(t,e),t._zod.check=n=>{e.fn(n.value)||n.issues.push({code:"invalid_format",format:e.format,input:n.value,inst:t,continue:!e.abort})}}),zo=m("$ZodNumber",(t,e)=>{L.init(t,e),t._zod.pattern=t._zod.bag.pattern??So,t._zod.parse=(n,i)=>{if(e.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let o=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:t,...o?{received:o}:{}}),n}}),bl=m("$ZodNumberFormat",(t,e)=>{Ec.init(t,e),zo.init(t,e)}),qn=m("$ZodBoolean",(t,e)=>{L.init(t,e),t._zod.pattern=$c,t._zod.parse=(n,i)=>{if(e.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:t}),n}}),No=m("$ZodBigInt",(t,e)=>{L.init(t,e),t._zod.pattern=_c,t._zod.parse=(n,i)=>{if(e.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:t}),n}}),$l=m("$ZodBigIntFormat",(t,e)=>{Tc.init(t,e),No.init(t,e)}),xl=m("$ZodSymbol",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:t}),n}}),wl=m("$ZodUndefined",(t,e)=>{L.init(t,e),t._zod.pattern=wc,t._zod.values=new Set([void 0]),t._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:t}),n}}),Sl=m("$ZodNull",(t,e)=>{L.init(t,e),t._zod.pattern=xc,t._zod.values=new Set([null]),t._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:t}),n}}),kl=m("$ZodAny",(t,e)=>{L.init(t,e),t._zod.parse=n=>n}),Il=m("$ZodUnknown",(t,e)=>{L.init(t,e),t._zod.parse=n=>n}),El=m("$ZodNever",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)}),Tl=m("$ZodVoid",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:t}),n}}),Ol=m("$ZodDate",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>{if(e.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:t}),n}});Pl=m("$ZodArray",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:t}),n;n.value=Array(r.length);let o=[];for(let s=0;s<r.length;s++){let a=r[s],u=e.element._zod.run({value:a,issues:[]},i);u instanceof Promise?o.push(u.then(c=>Zg(c,n,s))):Zg(u,n,s)}return o.length?Promise.all(o).then(()=>n):n}});av=m("$ZodObject",(t,e)=>{if(L.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let a=e.shape;Object.defineProperty(e,"shape",{get:()=>{let u={...a};return Object.defineProperty(e,"shape",{value:u}),u}})}let i=Nr(()=>ov(e));V(t._zod,"propValues",()=>{let a=e.shape,u={};for(let c in a){let l=a[c]._zod;if(l.values){u[c]??(u[c]=new Set);for(let d of l.values)u[c].add(d)}}return u});let r=ir,o=e.catchall,s;t._zod.parse=(a,u)=>{s??(s=i.value);let c=a.value;if(!r(c))return a.issues.push({expected:"object",code:"invalid_type",input:c,inst:t}),a;a.value={};let l=[],d=s.shape;for(let f of s.keys){let h=d[f],p=h._zod.optin==="optional",_=h._zod.optout==="optional",S=h._zod.run({value:c[f],issues:[]},u);S instanceof Promise?l.push(S.then(k=>Ao(k,a,f,c,p,_))):Ao(S,a,f,c,p,_)}return o?sv(l,c,a,u,i.value,t):l.length?Promise.all(l).then(()=>a):a}}),Cl=m("$ZodObjectJIT",(t,e)=>{av.init(t,e);let n=t._zod.parse,i=Nr(()=>ov(e)),r=f=>{let h=new Wn(["shape","payload","ctx"]),p=i.value,_=A=>{let I=lo(A);return`shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`};h.write("const input = payload.value;");let S=Object.create(null),k=0;for(let A of p.keys)S[A]=`key_${k++}`;h.write("const newResult = {};");for(let A of p.keys){let I=S[A],T=lo(A),Z=f[A],F=Z?._zod?.optin==="optional",W=Z?._zod?.optout==="optional";h.write(`const ${I} = ${_(A)};`),F&&W?h.write(`
7
7
  if (${I}.issues.length) {
8
8
  if (${T} in input) {
9
9
  payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
@@ -21,7 +21,7 @@ var rI=Object.create;var Iu=Object.defineProperty;var nI=Object.getOwnPropertyDe
21
21
  newResult[${T}] = ${I}.value;
22
22
  }
23
23
 
24
- `):F?p.write(`
24
+ `):F?h.write(`
25
25
  if (${I}.issues.length) {
26
26
  payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
27
27
  ...iss,
@@ -37,7 +37,7 @@ var rI=Object.create;var Iu=Object.defineProperty;var nI=Object.getOwnPropertyDe
37
37
  newResult[${T}] = ${I}.value;
38
38
  }
39
39
 
40
- `):p.write(`
40
+ `):h.write(`
41
41
  const ${I}_present = ${T} in input;
42
42
  if (${I}.issues.length) {
43
43
  payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
@@ -62,58 +62,100 @@ var rI=Object.create;var Iu=Object.defineProperty;var nI=Object.getOwnPropertyDe
62
62
  }
63
63
  }
64
64
 
65
- `)}p.write("payload.value = newResult;"),p.write("return payload;");let C=p.compile();return(A,I)=>C(f,A,I)},o,s=nr,a=!tr.jitless,c=a&&Ru.value,l=e.catchall,d;t._zod.parse=(f,p)=>{d??(d=i.value);let h=f.value;return s(h)?a&&c&&p?.async===!1&&p.jitless!==!0?(o||(o=r(e.shape)),f=o(f,p),l?Qg([],h,f,p,d,t):f):n(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:t}),f)}});Wn=m("$ZodUnion",(t,e)=>{L.init(t,e),V(t._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),V(t._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),V(t._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),V(t._zod,"pattern",()=>{if(e.options.every(i=>i._zod.pattern)){let i=e.options.map(r=>r._zod.pattern);return new RegExp(`^(${i.map(r=>Rn(r.source)).join("|")})$`)}});let n=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,s=[];for(let a of e.options){let u=a._zod.run({value:i.value,issues:[]},r);if(u instanceof Promise)s.push(u),o=!0;else{if(u.issues.length===0)return u;s.push(u)}}return o?Promise.all(s).then(a=>Lg(a,i,t,r)):Lg(s,i,t,r)}});Ol=m("$ZodXor",(t,e)=>{Wn.init(t,e),e.inclusive=!1;let n=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,s=[];for(let a of e.options){let u=a._zod.run({value:i.value,issues:[]},r);u instanceof Promise?(s.push(u),o=!0):s.push(u)}return o?Promise.all(s).then(a=>jg(a,i,t,r)):jg(s,i,t,r)}}),Pl=m("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,Wn.init(t,e);let n=t._zod.parse;V(t._zod,"propValues",()=>{let r={};for(let o of e.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let[a,u]of Object.entries(s)){r[a]||(r[a]=new Set);for(let c of u)r[a].add(c)}}return r});let i=Ar(()=>{let r=e.options,o=new Map;for(let s of r){let a=s._zod.propValues?.[e.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let u of a){if(o.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);o.set(u,s)}}return o});t._zod.parse=(r,o)=>{let s=r.value;if(!nr(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),r;let a=i.value.get(s?.[e.discriminator]);return a?a._zod.run(r,o):e.unionFallback||o.direction==="backward"?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,options:Array.from(i.value.keys()),input:s,path:[e.discriminator],inst:t}),r)}}),Cl=m("$ZodIntersection",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>{let r=n.value,o=e.left._zod.run({value:r,issues:[]},i),s=e.right._zod.run({value:r,issues:[]},i);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([u,c])=>Ug(n,u,c)):Ug(n,o,s)}});zo=m("$ZodTuple",(t,e)=>{L.init(t,e);let n=e.items;t._zod.parse=(i,r)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:t,expected:"tuple",code:"invalid_type"}),i;i.value=[];let s=[],a=Mg(n,"optin"),u=Mg(n,"optout");if(!e.rest){if(o.length<a)return i.issues.push({code:"too_small",minimum:a,inclusive:!0,input:o,inst:t,origin:"array"}),i;o.length>n.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:o,inst:t,origin:"array"})}let c=new Array(n.length);for(let l=0;l<n.length;l++){let d=n[l]._zod.run({value:o[l],issues:[]},r);d instanceof Promise?s.push(d.then(f=>{c[l]=f})):c[l]=d}if(e.rest){let l=n.length-1,d=o.slice(n.length);for(let f of d){l++;let p=e.rest._zod.run({value:f,issues:[]},r);p instanceof Promise?s.push(p.then(h=>Fg(h,i,l))):Fg(p,i,l)}}return s.length?Promise.all(s).then(()=>Vg(c,i,n,o,u)):Vg(c,i,n,o,u)}});Al=m("$ZodRecord",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>{let r=n.value;if(!Dt(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:t}),n;let o=[],s=e.keyType._zod.values;if(s){n.value={};let a=new Set;for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){a.add(typeof c=="number"?c.toString():c);let l=e.keyType._zod.run({value:c,issues:[]},i);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(l.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(p=>Ee(p,i,oe())),input:c,path:[c],inst:t});continue}let d=l.value,f=e.valueType._zod.run({value:r[c],issues:[]},i);f instanceof Promise?o.push(f.then(p=>{p.issues.length&&n.issues.push(...ze(c,p.issues)),n.value[d]=p.value})):(f.issues.length&&n.issues.push(...ze(c,f.issues)),n.value[d]=f.value)}let u;for(let c in r)a.has(c)||(u=u??[],u.push(c));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:t,keys:u})}else{n.value={};for(let a of Reflect.ownKeys(r)){if(a==="__proto__"||!Object.prototype.propertyIsEnumerable.call(r,a))continue;let 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(typeof a=="string"&&xo.test(a)&&u.issues.length){let d=e.keyType._zod.run({value:Number(a),issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(u=d)}if(u.issues.length){e.mode==="loose"?n.value[a]=r[a]:n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(d=>Ee(d,i,oe())),input:a,path:[a],inst:t});continue}let l=e.valueType._zod.run({value:r[a],issues:[]},i);l instanceof Promise?o.push(l.then(d=>{d.issues.length&&n.issues.push(...ze(a,d.issues)),n.value[u.value]=d.value})):(l.issues.length&&n.issues.push(...ze(a,l.issues)),n.value[u.value]=l.value)}}return o.length?Promise.all(o).then(()=>n):n}}),zl=m("$ZodMap",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:t}),n;let o=[];n.value=new Map;for(let[s,a]of r){let u=e.keyType._zod.run({value:s,issues:[]},i),c=e.valueType._zod.run({value:a,issues:[]},i);u instanceof Promise||c instanceof Promise?o.push(Promise.all([u,c]).then(([l,d])=>{Zg(l,d,n,s,r,t,i)})):Zg(u,c,n,s,r,t,i)}return o.length?Promise.all(o).then(()=>n):n}});Nl=m("$ZodSet",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:t,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let s of r){let a=e.valueType._zod.run({value:s,issues:[]},i);a instanceof Promise?o.push(a.then(u=>Bg(u,n))):Bg(a,n)}return o.length?Promise.all(o).then(()=>n):n}});Rl=m("$ZodEnum",(t,e)=>{L.init(t,e);let n=Nn(e.entries),i=new Set(n);t._zod.values=i,t._zod.pattern=new RegExp(`^(${n.filter(r=>Dn.has(typeof r)).map(r=>typeof r=="string"?Je(r):r.toString()).join("|")})$`),t._zod.parse=(r,o)=>{let s=r.value;return i.has(s)||r.issues.push({code:"invalid_value",values:n,input:s,inst:t}),r}}),Dl=m("$ZodLiteral",(t,e)=>{if(L.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(e.values);t._zod.values=n,t._zod.pattern=new RegExp(`^(${e.values.map(i=>typeof i=="string"?Je(i):i?Je(i.toString()):String(i)).join("|")})$`),t._zod.parse=(i,r)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:e.values,input:o,inst:t}),i}}),Ll=m("$ZodFile",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:t}),n}}),jl=m("$ZodTransform",(t,e)=>{L.init(t,e),t._zod.optin="optional",t._zod.parse=(n,i)=>{if(i.direction==="backward")throw new zt(t.constructor.name);let r=e.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(s=>(n.value=s,n.fallback=!0,n));if(r instanceof Promise)throw new ot;return n.value=r,n.fallback=!0,n}});No=m("$ZodOptional",(t,e)=>{L.init(t,e),t._zod.optin="optional",t._zod.optout="optional",V(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),V(t._zod,"pattern",()=>{let n=e.innerType._zod.pattern;return n?new RegExp(`^(${Rn(n.source)})?$`):void 0}),t._zod.parse=(n,i)=>{if(e.innerType._zod.optin==="optional"){let r=n.value,o=e.innerType._zod.run(n,i);return o instanceof Promise?o.then(s=>Gg(s,r)):Gg(o,r)}return n.value===void 0?n:e.innerType._zod.run(n,i)}}),Ul=m("$ZodExactOptional",(t,e)=>{No.init(t,e),V(t._zod,"values",()=>e.innerType._zod.values),V(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(n,i)=>e.innerType._zod.run(n,i)}),Ml=m("$ZodNullable",(t,e)=>{L.init(t,e),V(t._zod,"optin",()=>e.innerType._zod.optin),V(t._zod,"optout",()=>e.innerType._zod.optout),V(t._zod,"pattern",()=>{let n=e.innerType._zod.pattern;return n?new RegExp(`^(${Rn(n.source)}|null)$`):void 0}),V(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(n,i)=>n.value===null?n:e.innerType._zod.run(n,i)}),Fl=m("$ZodDefault",(t,e)=>{L.init(t,e),t._zod.optin="optional",V(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,i)=>{if(i.direction==="backward")return e.innerType._zod.run(n,i);if(n.value===void 0)return n.value=e.defaultValue,n;let r=e.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>Wg(o,e)):Wg(r,e)}});Vl=m("$ZodPrefault",(t,e)=>{L.init(t,e),t._zod.optin="optional",V(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=e.defaultValue),e.innerType._zod.run(n,i))}),Zl=m("$ZodNonOptional",(t,e)=>{L.init(t,e),V(t._zod,"values",()=>{let n=e.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),t._zod.parse=(n,i)=>{let r=e.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>qg(o,t)):qg(r,t)}});Bl=m("$ZodSuccess",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>{if(i.direction==="backward")throw new zt("ZodSuccess");let r=e.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),Gl=m("$ZodCatch",(t,e)=>{L.init(t,e),t._zod.optin="optional",V(t._zod,"optout",()=>e.innerType._zod.optout),V(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,i)=>{if(i.direction==="backward")return e.innerType._zod.run(n,i);let r=e.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.value,o.issues.length&&(n.value=e.catchValue({...n,error:{issues:o.issues.map(s=>Ee(s,i,oe()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=r.value,r.issues.length&&(n.value=e.catchValue({...n,error:{issues:r.issues.map(o=>Ee(o,i,oe()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),Wl=m("$ZodNaN",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:t,expected:"nan",code:"invalid_type"}),n)}),Ro=m("$ZodPipe",(t,e)=>{L.init(t,e),V(t._zod,"values",()=>e.in._zod.values),V(t._zod,"optin",()=>e.in._zod.optin),V(t._zod,"optout",()=>e.out._zod.optout),V(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=e.out._zod.run(n,i);return o instanceof Promise?o.then(s=>Eo(s,e.in,i)):Eo(o,e.in,i)}let r=e.in._zod.run(n,i);return r instanceof Promise?r.then(o=>Eo(o,e.out,i)):Eo(r,e.out,i)}});qn=m("$ZodCodec",(t,e)=>{L.init(t,e),V(t._zod,"values",()=>e.in._zod.values),V(t._zod,"optin",()=>e.in._zod.optin),V(t._zod,"optout",()=>e.out._zod.optout),V(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let o=e.in._zod.run(n,i);return o instanceof Promise?o.then(s=>To(s,e,i)):To(o,e,i)}else{let o=e.out._zod.run(n,i);return o instanceof Promise?o.then(s=>To(s,e,i)):To(o,e,i)}}});ql=m("$ZodPreprocess",(t,e)=>{Ro.init(t,e)}),Hl=m("$ZodReadonly",(t,e)=>{L.init(t,e),V(t._zod,"propValues",()=>e.innerType._zod.propValues),V(t._zod,"values",()=>e.innerType._zod.values),V(t._zod,"optin",()=>e.innerType?._zod?.optin),V(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(n,i)=>{if(i.direction==="backward")return e.innerType._zod.run(n,i);let r=e.innerType._zod.run(n,i);return r instanceof Promise?r.then(Hg):Hg(r)}});Jl=m("$ZodTemplateLiteral",(t,e)=>{L.init(t,e);let n=[];for(let 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()}`);let r=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=r.startsWith("^")?1:0,s=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(o,s))}else if(i===null||Lu.has(typeof i))n.push(Je(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);t._zod.pattern=new RegExp(`^${n.join("")}$`),t._zod.parse=(i,r)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:t,expected:"string",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)}),Kl=m("$ZodFunction",(t,e)=>(L.init(t,e),t._def=e,t._zod.def=e,t.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...i){let r=t._def.input?lo(t._def.input,i):i,o=Reflect.apply(n,this,r);return t._def.output?lo(t._def.output,o):o}},t.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let r=t._def.input?await fo(t._def.input,i):i,o=await Reflect.apply(n,this,r);return t._def.output?await fo(t._def.output,o):o}},t._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:t}),n):(t._def.output&&t._def.output._zod.def.type==="promise"?n.value=t.implementAsync(n.value):n.value=t.implement(n.value),n),t.input=(...n)=>{let i=t.constructor;return Array.isArray(n[0])?new i({type:"function",input:new zo({type:"tuple",items:n[0],rest:n[1]}),output:t._def.output}):new i({type:"function",input:n[0],output:t._def.output})},t.output=n=>{let i=t.constructor;return new i({type:"function",input:t._def.input,output:n})},t)),Yl=m("$ZodPromise",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>e.innerType._zod.run({value:r,issues:[]},i))}),Xl=m("$ZodLazy",(t,e)=>{L.init(t,e),V(t._zod,"innerType",()=>{let n=e;return n._cachedInner||(n._cachedInner=e.getter()),n._cachedInner}),V(t._zod,"pattern",()=>t._zod.innerType?._zod?.pattern),V(t._zod,"propValues",()=>t._zod.innerType?._zod?.propValues),V(t._zod,"optin",()=>t._zod.innerType?._zod?.optin??void 0),V(t._zod,"optout",()=>t._zod.innerType?._zod?.optout??void 0),t._zod.parse=(n,i)=>t._zod.innerType._zod.run(n,i)}),Ql=m("$ZodCustom",(t,e)=>{X.init(t,e),L.init(t,e),t._zod.parse=(n,i)=>n,t._zod.check=n=>{let i=n.value,r=e.fn(i);if(r instanceof Promise)return r.then(o=>Jg(o,n,i,t));Jg(r,n,i,t)}})});function tv(){return{localeError:vE()}}var vE,rv=v(()=>{N();vE=()=>{let t={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function e(r){return t[r]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`}case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${$(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${n[o.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${g(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}}});function nv(){return{localeError:yE()}}var yE,iv=v(()=>{N();yE=()=>{let t={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function e(r){return t[r]??null}let n={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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${a}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${$(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}}});function ov(t,e,n,i){let r=Math.abs(t),o=r%10,s=r%100;return s>=11&&s<=19?i:o===1?e:o>=2&&o<=4?n:i}function sv(){return{localeError:_E()}}var _E,av=v(()=>{N();_E=()=>{let t={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function e(r){return t[r]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`}case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${$(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);if(s){let a=Number(r.maximum),u=ov(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${r.maximum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);if(s){let a=Number(r.minimum),u=ov(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${r.minimum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${g(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}}});function uv(){return{localeError:$E()}}var $E,cv=v(()=>{N();$E=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function e(r){return t[r]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${$(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${g(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}}});function lv(){return{localeError:bE()}}var bE,dv=v(()=>{N();bE=()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(r){return t[r]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",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\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${a}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${$(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${g(r.values," o ")}`;case"too_big":{let o=r.inclusive?"com a m\xE0xim":"menys de",s=e(r.origin);return s?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${o} ${r.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"com a m\xEDnim":"m\xE9s de",s=e(r.origin);return s?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${o} ${r.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}}});function fv(){return{localeError:xE()}}var xE,pv=v(()=>{N();xE=()=>{let t={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function e(r){return t[r]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 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 \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${a}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${$(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${g(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}}});function hv(){return{localeError:wE()}}var wE,mv=v(()=>{N();wE=()=>{let t={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function e(r){return t[r]??null}let n={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\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",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"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${a}`:`Ugyldigt input: forventede ${o}, fik ${a}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${$(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin),a=i[r.origin]??r.origin;return s?`For stor: forventede ${a??"value"} ${s.verb} ${o} ${r.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin),a=i[r.origin]??r.origin;return s?`For lille: forventede ${a} ${s.verb} ${o} ${r.minimum.toString()} ${s.unit}`:`For lille: forventede ${a} havde ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${g(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}}});function gv(){return{localeError:SE()}}var SE,vv=v(()=>{N();SE=()=>{let 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(r){return t[r]??null}let n={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"},i={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${a}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${$(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ist`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ist`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${g(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}}});function yv(){return{localeError:kE()}}var kE,_v=v(()=>{N();kE=()=>{let t={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function e(r){return t[r]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 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 \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return typeof r.expected=="string"&&/^[A-Z]/.test(r.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${r.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${a}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${a}`}case"invalid_value":return r.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${$(r.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.maximum.toString()} ${s.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.minimum.toString()} ${s.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${o.prefix}"`:o.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${o.suffix}"`:o.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${o.includes}"`:o.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${r.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${r.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${r.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${g(r.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${r.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${r.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}}});function Do(){return{localeError:IE()}}var IE,td=v(()=>{N();IE=()=>{let 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"},map:{unit:"entries",verb:"to have"}};function e(r){return t[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return`Invalid input: expected ${o}, received ${a}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${$(r.values[0])}`:`Invalid option: expected one of ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Too big: expected ${r.origin??"value"} to have ${o}${r.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Too small: expected ${r.origin} to have ${o}${r.minimum.toString()} ${s.unit}`:`Too small: expected ${r.origin} to be ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`Invalid discriminator value. Expected ${r.options.map(s=>`'${s}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}}});function $v(){return{localeError:EE()}}var EE,bv=v(()=>{N();EE=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(r){return t[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",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\u016Dro",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"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${a}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${$(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${o}${r.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}}});function xv(){return{localeError:TE()}}var TE,wv=v(()=>{N();TE=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(r){return t[r]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",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\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${a}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${$(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin),a=i[r.origin]??r.origin;return s?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${o}${r.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin),a=i[r.origin]??r.origin;return s?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${o}${r.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} fuera ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}}});function Sv(){return{localeError:OE()}}var OE,kv=v(()=>{N();OE=()=>{let t={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function e(r){return t[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${$(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${g(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${g(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}}});function Iv(){return{localeError:PE()}}var PE,Ev=v(()=>{N();PE=()=>{let t={string:{unit:"merkki\xE4",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\xE4iv\xE4m\xE4\xE4r\xE4n"}};function e(r){return t[r]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",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\xE4iv\xE4m\xE4\xE4r\xE4",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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${a}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${$(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${o}${r.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${o}${r.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${g(r.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\xF6te"}}}});function Tv(){return{localeError:CE()}}var CE,Ov=v(()=>{N();CE=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(r){return t[r]??null}let n={regex:"entr\xE9e",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\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${a} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${$(r.values[0])} attendu`:`Option invalide : une valeur parmi ${g(r.values,"|")} attendue`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Trop grand : ${i[r.origin]??"valeur"} doit ${s.verb} ${o}${r.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Trop petit : ${i[r.origin]??"valeur"} doit ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`Trop petit : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${g(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}}});function Pv(){return{localeError:AE()}}var AE,Cv=v(()=>{N();AE=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(r){return t[r]??null}let n={regex:"entr\xE9e",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\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${a}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${$(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u2264":"<",s=e(r.origin);return s?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${o}${r.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u2265":">",s=e(r.origin);return s?`Trop petit : attendu que ${r.origin} ait ${o}${r.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${r.origin} soit ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${g(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}}});function Av(){return{localeError:zE()}}var zE,zv=v(()=>{N();zE=()=>{let t={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},e={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=c=>c?t[c]:void 0,i=c=>{let l=n(c);return l?l.label:c??t.unknown.label},r=c=>`\u05D4${i(c)}`,o=c=>(n(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=c=>c?e[c]??null:null,a={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},u={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let l=c.expected,d=u[l??""]??i(l),f=b(c.input),p=u[f]??t[f]?.label??f;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`}case"invalid_value":{if(c.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${$(c.values[0])}`;let l=c.values.map(p=>$(p));if(c.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l[0]} \u05D0\u05D5 ${l[1]}`;let d=l[l.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let l=s(c.origin),d=r(c.origin??"value");if(c.origin==="string")return`${l?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${l?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let h=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(c.origin==="array"||c.origin==="set"){let h=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",_=c.inclusive?`${c.maximum} ${l?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${l?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${_}`.trim()}let f=c.inclusive?"<=":"<",p=o(c.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${c.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${c.maximum.toString()}`}case"too_small":{let l=s(c.origin),d=r(c.origin??"value");if(c.origin==="string")return`${l?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${l?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let h=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(c.origin==="array"||c.origin==="set"){let h=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let S=(c.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${S}`}let _=c.inclusive?`${c.minimum} ${l?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${l?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${_}`.trim()}let f=c.inclusive?">=":">",p=o(c.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${c.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${c.minimum.toString()}`}case"invalid_format":{let l=c;if(l.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${l.prefix}"`;if(l.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${l.suffix}"`;if(l.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${l.includes}"`;if(l.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${l.pattern}`;let d=a[l.format],f=d?.label??l.format,h=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${h}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${g(c.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}}});function Nv(){return{localeError:NE()}}var NE,Rv=v(()=>{N();NE=()=>{let t={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function e(r){return t[r]??null}let n={regex:"unos",email:"email 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:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${a}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${a}`}case"invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${$(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin),a=i[r.origin]??r.origin;return s?`Preveliko: o\u010Dekivano da ${a??"vrijednost"} ima ${o}${r.maximum.toString()} ${s.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${a??"vrijednost"} bude ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin),a=i[r.origin]??r.origin;return s?`Premalo: o\u010Dekivano da ${a} ima ${o}${r.minimum.toString()} ${s.unit}`:`Premalo: o\u010Dekivano da ${a} bude ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${n[o.format]??r.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${r.divisor}`;case"unrecognized_keys":return`Neprepoznat${r.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${g(r.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[r.origin]??r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[r.origin]??r.origin}`;default:return"Neispravan unos"}}}});function Dv(){return{localeError:RE()}}var RE,Lv=v(()=>{N();RE=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(r){return t[r]??null}let n={regex:"bemenet",email:"email c\xEDm",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\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${a}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${$(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${r.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${o}${r.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}}});function jv(t,e,n){return Math.abs(t)===1?e:n}function Ur(t){if(!t)return"";let e=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=t[t.length-1];return t+(e.includes(n)?"\u0576":"\u0568")}function Uv(){return{localeError:DE()}}var DE,Mv=v(()=>{N();DE=()=>{let t={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function e(r){return t[r]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`}case"invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${$(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);if(s){let a=Number(r.maximum),u=jv(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ur(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.maximum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ur(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);if(s){let a=Number(r.minimum),u=jv(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ur(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.minimum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ur(r.origin)} \u056C\u056B\u0576\u056B ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[o.format]??r.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${g(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Ur(r.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Ur(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}}});function Fv(){return{localeError:LE()}}var LE,Vv=v(()=>{N();LE=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(r){return t[r]??null}let n={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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${o}, diterima ${a}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${$(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${o}${r.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Terlalu kecil: diharapkan ${r.origin} memiliki ${o}${r.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;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}`:`${n[o.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}}});function Zv(){return{localeError:jE()}}var jE,Bv=v(()=>{N();jE=()=>{let t={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function e(r){return t[r]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",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\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",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\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${$(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${o}${r.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${o}${r.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${n[o.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${g(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}}});function Gv(){return{localeError:UE()}}var UE,Wv=v(()=>{N();UE=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(r){return t[r]??null}let n={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"},i={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${a}`:`Input non valido: atteso ${o}, ricevuto ${a}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${$(r.values[0])}`:`Opzione non valida: atteso uno tra ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Troppo grande: ${r.origin??"valore"} deve avere ${o}${r.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Troppo piccolo: ${r.origin} deve avere ${o}${r.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${r.origin} deve essere ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;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}`:`Input non valido: ${n[o.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${g(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}}});function qv(){return{localeError:ME()}}var ME,Hv=v(()=>{N();ME=()=>{let t={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function e(r){return t[r]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${$(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${g(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=e(r.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${s.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=e(r.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${s.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${g(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}}});function Jv(){return{localeError:FE()}}var FE,Kv=v(()=>{N();FE=()=>{let t={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function e(r){return t[r]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`}case"invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${$(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${g(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${o}${r.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${g(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}}});function Lo(){return{localeError:VE()}}var VE,rd=v(()=>{N();VE=()=>{let t={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function e(r){return t[r]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`}case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${$(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${g(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}}});function Yv(){return Lo()}var Xv=v(()=>{rd()});function Qv(){return{localeError:ZE()}}var ZE,ey=v(()=>{N();ZE=()=>{let t={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function e(r){return t[r]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${$(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${g(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=e(r.origin),u=a?.unit??"\uC694\uC18C";return a?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${u} ${o}${s}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${o}${s}`}case"too_small":{let o=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=e(r.origin),u=a?.unit??"\uC694\uC18C";return a?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${u} ${o}${s}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${o}${s}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${g(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}}});function ty(t){let e=Math.abs(t),n=e%10,i=e%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}function ry(){return{localeError:BE()}}var Hn,BE,ny=v(()=>{N();Hn=t=>t.charAt(0).toUpperCase()+t.slice(1);BE=()=>{let t={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function e(r,o,s,a){let u=t[r]??null;return u===null?u:{unit:u.unit[o],verb:u.verb[a][s?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to 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\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${o}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${$(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${g(r.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[r.origin]??r.origin,s=e(r.origin,ty(Number(r.maximum)),r.inclusive??!1,"smaller");if(s?.verb)return`${Hn(o??r.origin??"reik\u0161m\u0117")} ${s.verb} ${r.maximum.toString()} ${s.unit??"element\u0173"}`;let a=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Hn(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${r.maximum.toString()} ${s?.unit}`}case"too_small":{let o=i[r.origin]??r.origin,s=e(r.origin,ty(Number(r.minimum)),r.inclusive??!1,"bigger");if(s?.verb)return`${Hn(o??r.origin??"reik\u0161m\u0117")} ${s.verb} ${r.minimum.toString()} ${s.unit??"element\u0173"}`;let a=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Hn(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${r.minimum.toString()} ${s?.unit}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${g(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[r.origin]??r.origin;return`${Hn(o??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function iy(){return{localeError:GE()}}var GE,oy=v(()=>{N();GE=()=>{let t={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function e(r){return t[r]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${$(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${g(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}}});function sy(){return{localeError:WE()}}var WE,ay=v(()=>{N();WE=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(r){return t[r]??null}let n={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"},i={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${a}`:`Input tidak sah: dijangka ${o}, diterima ${a}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${$(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Terlalu besar: dijangka ${r.origin??"nilai"} ${s.verb} ${o}${r.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Terlalu kecil: dijangka ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;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}`:`${n[o.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${g(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}}});function uy(){return{localeError:qE()}}var qE,cy=v(()=>{N();qE=()=>{let t={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function e(r){return t[r]??null}let n={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"},i={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${o}, ontving ${a}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${$(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin),a=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return s?`Te ${a}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${a}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} is`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin),a=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return s?`Te ${a}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${a}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} is`}case"invalid_format":{let o=r;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: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}}});function ly(){return{localeError:HE()}}var HE,dy=v(()=>{N();HE=()=>{let t={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function e(r){return t[r]??null}let n={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\xE5de",ipv6:"IPv6-omr\xE5de",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"},i={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${a}`:`Ugyldig input: forventet ${o}, fikk ${a}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${$(r.values[0])}`:`Ugyldig valg: forventet en av ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${g(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}}});function fy(){return{localeError:JE()}}var JE,py=v(()=>{N();JE=()=>{let t={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function e(r){return t[r]??null}let n={regex:"giren",email:"epostag\xE2h",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\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${a}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${$(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=r;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}}});function hy(){return{localeError:KE()}}var KE,my=v(()=>{N();KE=()=>{let t={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function e(r){return t[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${$(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${g(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${g(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}}});function gy(){return{localeError:YE()}}var YE,vy=v(()=>{N();YE=()=>{let t={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function e(r){return t[r]??null}let n={regex:"wyra\u017Cenie",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\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${a}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${$(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}}});function yy(){return{localeError:XE()}}var XE,_y=v(()=>{N();XE=()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(r){return t[r]??null}let n={regex:"padr\xE3o",email:"endere\xE7o 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\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o 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\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${a}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${$(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${o}${r.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Muito pequeno: esperado que ${r.origin} tivesse ${o}${r.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${n[o.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}}});function $y(){return{localeError:QE()}}var QE,by=v(()=>{N();QE=()=>{let t={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function e(r){return t[r]??null}let n={regex:"intrare",email:"adres\u0103 de 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:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${a}`}case"invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${$(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} ${s.verb} ${o}${r.maximum.toString()} ${s.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} s\u0103 fie ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Prea mic: a\u0219teptat ca ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${n[o.format]??r.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${r.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${g(r.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${r.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${r.origin}`;default:return"Intrare invalid\u0103"}}}});function xy(t,e,n,i){let r=Math.abs(t),o=r%10,s=r%100;return s>=11&&s<=19?i:o===1?e:o>=2&&o<=4?n:i}function wy(){return{localeError:e1()}}var e1,Sy=v(()=>{N();e1=()=>{let t={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function e(r){return t[r]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${$(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);if(s){let a=Number(r.maximum),u=xy(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.maximum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);if(s){let a=Number(r.minimum),u=xy(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.minimum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${g(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}}});function ky(){return{localeError:t1()}}var t1,Iy=v(()=>{N();t1=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(r){return t[r]??null}let n={regex:"vnos",email:"e-po\u0161tni 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 \u010Das",date:"ISO datum",time:"ISO \u010Das",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 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${a}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${$(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${o}${r.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${o}${r.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${g(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}}});function Ey(){return{localeError:r1()}}var r1,Ty=v(()=>{N();r1=()=>{let t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function e(r){return t[r]??null}let n={regex:"regulj\xE4rt 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\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${a}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${$(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${g(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}}});function Oy(){return{localeError:n1()}}var n1,Py=v(()=>{N();n1=()=>{let t={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function e(r){return t[r]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",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 \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`}case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${$(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${g(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}}});function Cy(){return{localeError:i1()}}var i1,Ay=v(()=>{N();i1=()=>{let t={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function e(r){return t[r]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${$(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=e(r.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=e(r.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${g(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}}});function zy(){return{localeError:o1()}}var o1,Ny=v(()=>{N();o1=()=>{let t={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function e(r){return t[r]??null}let n={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\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${a}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${$(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[o.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}}});function jo(){return{localeError:s1()}}var s1,nd=v(()=>{N();s1=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function e(r){return t[r]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${$(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${o}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${g(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}}});function Ry(){return jo()}var Dy=v(()=>{nd()});function Ly(){return{localeError:a1()}}var a1,jy=v(()=>{N();a1=()=>{let t={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function e(r){return t[r]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${$(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${g(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${o}${r.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${o}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${g(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}}});function Uy(){return{localeError:u1()}}var u1,My=v(()=>{N();u1=()=>{let t={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function e(r){return t[r]??null}let n={regex:"kirish",email:"elektron pochta manzili",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 sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${a}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${$(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[o.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}}});function Fy(){return{localeError:c1()}}var c1,Vy=v(()=>{N();c1=()=>{let t={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function e(r){return t[r]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 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\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${$(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${o}${r.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${g(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}}});function Zy(){return{localeError:l1()}}var l1,By=v(()=>{N();l1=()=>{let t={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function e(r){return t[r]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${$(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}}});function Gy(){return{localeError:d1()}}var d1,Wy=v(()=>{N();d1=()=>{let t={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function e(r){return t[r]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",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 \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${a}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${$(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${g(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}}});function qy(){return{localeError:f1()}}var f1,Hy=v(()=>{N();f1=()=>{let t={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function e(r){return t[r]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",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:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=b(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${$(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${s.verb} ${o}${r.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.maximum}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${s.verb} ${o}${r.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.minimum}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${n[o.format]??r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${g(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}}});var Jn={};qe(Jn,{ar:()=>tv,az:()=>nv,be:()=>sv,bg:()=>uv,ca:()=>lv,cs:()=>fv,da:()=>hv,de:()=>gv,el:()=>yv,en:()=>Do,eo:()=>$v,es:()=>xv,fa:()=>Sv,fi:()=>Iv,fr:()=>Tv,frCA:()=>Pv,he:()=>Av,hr:()=>Nv,hu:()=>Dv,hy:()=>Uv,id:()=>Fv,is:()=>Zv,it:()=>Gv,ja:()=>qv,ka:()=>Jv,kh:()=>Yv,km:()=>Lo,ko:()=>Qv,lt:()=>ry,mk:()=>iy,ms:()=>sy,nl:()=>uy,no:()=>ly,ota:()=>fy,pl:()=>gy,ps:()=>hy,pt:()=>yy,ro:()=>$y,ru:()=>wy,sl:()=>ky,sv:()=>Ey,ta:()=>Oy,th:()=>Cy,tr:()=>zy,ua:()=>Ry,uk:()=>jo,ur:()=>Ly,uz:()=>Uy,vi:()=>Fy,yo:()=>qy,zhCN:()=>Zy,zhTW:()=>Gy});var id=v(()=>{rv();iv();av();cv();dv();pv();mv();vv();_v();td();bv();wv();kv();Ev();Ov();Cv();zv();Rv();Lv();Mv();Vv();Bv();Wv();Hv();Kv();Xv();rd();ey();ny();oy();ay();cy();dy();py();my();vy();_y();by();Sy();Iy();Ty();Py();Ay();Ny();Dy();nd();jy();My();Vy();By();Wy();Hy()});function Mo(){return new Uo}var Jy,od,sd,Uo,ve,Kn=v(()=>{od=Symbol("ZodOutput"),sd=Symbol("ZodInput"),Uo=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...n){let i=n[0];return this._map.set(e,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let n=this._map.get(e);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(e),this}get(e){let n=e._zod.parent;if(n){let i={...this.get(n)??{}};delete i.id;let r={...i,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};(Jy=globalThis).__zod_globalRegistry??(Jy.__zod_globalRegistry=Mo());ve=globalThis.__zod_globalRegistry});function ad(t,e){return new t({type:"string",...w(e)})}function ud(t,e){return new t({type:"string",coerce:!0,...w(e)})}function Fo(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...w(e)})}function Yn(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...w(e)})}function Vo(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...w(e)})}function Zo(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...w(e)})}function Bo(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...w(e)})}function Go(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...w(e)})}function Xn(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...w(e)})}function Wo(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...w(e)})}function qo(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...w(e)})}function Ho(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...w(e)})}function Jo(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...w(e)})}function Ko(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...w(e)})}function Yo(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...w(e)})}function Xo(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...w(e)})}function Qo(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...w(e)})}function es(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...w(e)})}function cd(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...w(e)})}function ts(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...w(e)})}function rs(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...w(e)})}function ns(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...w(e)})}function is(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...w(e)})}function os(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...w(e)})}function ss(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...w(e)})}function dd(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...w(e)})}function fd(t,e){return new t({type:"string",format:"date",check:"string_format",...w(e)})}function pd(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...w(e)})}function hd(t,e){return new t({type:"string",format:"duration",check:"string_format",...w(e)})}function md(t,e){return new t({type:"number",checks:[],...w(e)})}function gd(t,e){return new t({type:"number",coerce:!0,checks:[],...w(e)})}function vd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...w(e)})}function yd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...w(e)})}function _d(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...w(e)})}function $d(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...w(e)})}function bd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...w(e)})}function xd(t,e){return new t({type:"boolean",...w(e)})}function wd(t,e){return new t({type:"boolean",coerce:!0,...w(e)})}function Sd(t,e){return new t({type:"bigint",...w(e)})}function kd(t,e){return new t({type:"bigint",coerce:!0,...w(e)})}function Id(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...w(e)})}function Ed(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...w(e)})}function Td(t,e){return new t({type:"symbol",...w(e)})}function Od(t,e){return new t({type:"undefined",...w(e)})}function Pd(t,e){return new t({type:"null",...w(e)})}function Cd(t){return new t({type:"any"})}function Ad(t){return new t({type:"unknown"})}function zd(t,e){return new t({type:"never",...w(e)})}function Nd(t,e){return new t({type:"void",...w(e)})}function Rd(t,e){return new t({type:"date",...w(e)})}function Dd(t,e){return new t({type:"date",coerce:!0,...w(e)})}function Ld(t,e){return new t({type:"nan",...w(e)})}function lt(t,e){return new So({check:"less_than",...w(e),value:t,inclusive:!1})}function Ve(t,e){return new So({check:"less_than",...w(e),value:t,inclusive:!0})}function dt(t,e){return new ko({check:"greater_than",...w(e),value:t,inclusive:!1})}function Te(t,e){return new ko({check:"greater_than",...w(e),value:t,inclusive:!0})}function as(t){return dt(0,t)}function us(t){return lt(0,t)}function cs(t){return Ve(0,t)}function ls(t){return Te(0,t)}function jt(t,e){return new wc({check:"multiple_of",...w(e),value:t})}function Ut(t,e){return new Ic({check:"max_size",...w(e),maximum:t})}function ft(t,e){return new Ec({check:"min_size",...w(e),minimum:t})}function sr(t,e){return new Tc({check:"size_equals",...w(e),size:t})}function ar(t,e){return new Oc({check:"max_length",...w(e),maximum:t})}function bt(t,e){return new Pc({check:"min_length",...w(e),minimum:t})}function ur(t,e){return new Cc({check:"length_equals",...w(e),length:t})}function Mr(t,e){return new Ac({check:"string_format",format:"regex",...w(e),pattern:t})}function Fr(t){return new zc({check:"string_format",format:"lowercase",...w(t)})}function Vr(t){return new Nc({check:"string_format",format:"uppercase",...w(t)})}function Zr(t,e){return new Rc({check:"string_format",format:"includes",...w(e),includes:t})}function Br(t,e){return new Dc({check:"string_format",format:"starts_with",...w(e),prefix:t})}function Gr(t,e){return new Lc({check:"string_format",format:"ends_with",...w(e),suffix:t})}function ds(t,e,n){return new jc({check:"property",property:t,schema:e,...w(n)})}function Wr(t,e){return new Uc({check:"mime_type",mime:t,...w(e)})}function st(t){return new Mc({check:"overwrite",tx:t})}function qr(t){return st(e=>e.normalize(t))}function Hr(){return st(t=>t.trim())}function Jr(){return st(t=>t.toLowerCase())}function Kr(){return st(t=>t.toUpperCase())}function Yr(){return st(t=>Nu(t))}function jd(t,e,n){return new t({type:"array",element:e,...w(n)})}function h1(t,e,n){return new t({type:"union",options:e,...w(n)})}function m1(t,e,n){return new t({type:"union",options:e,inclusive:!1,...w(n)})}function g1(t,e,n,i){return new t({type:"union",options:n,discriminator:e,...w(i)})}function v1(t,e,n){return new t({type:"intersection",left:e,right:n})}function y1(t,e,n,i){let r=n instanceof L,o=r?i:n,s=r?n:null;return new t({type:"tuple",items:e,rest:s,...w(o)})}function _1(t,e,n,i){return new t({type:"record",keyType:e,valueType:n,...w(i)})}function $1(t,e,n,i){return new t({type:"map",keyType:e,valueType:n,...w(i)})}function b1(t,e,n){return new t({type:"set",valueType:e,...w(n)})}function x1(t,e,n){let i=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new t({type:"enum",entries:i,...w(n)})}function w1(t,e,n){return new t({type:"enum",entries:e,...w(n)})}function S1(t,e,n){return new t({type:"literal",values:Array.isArray(e)?e:[e],...w(n)})}function Ud(t,e){return new t({type:"file",...w(e)})}function k1(t,e){return new t({type:"transform",transform:e})}function I1(t,e){return new t({type:"optional",innerType:e})}function E1(t,e){return new t({type:"nullable",innerType:e})}function T1(t,e,n){return new t({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Du(n)}})}function O1(t,e,n){return new t({type:"nonoptional",innerType:e,...w(n)})}function P1(t,e){return new t({type:"success",innerType:e})}function C1(t,e,n){return new t({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}function A1(t,e,n){return new t({type:"pipe",in:e,out:n})}function z1(t,e){return new t({type:"readonly",innerType:e})}function N1(t,e,n){return new t({type:"template_literal",parts:e,...w(n)})}function R1(t,e){return new t({type:"lazy",getter:e})}function D1(t,e){return new t({type:"promise",innerType:e})}function Md(t,e,n){let i=w(n);return i.abort??(i.abort=!0),new t({type:"custom",check:"custom",fn:e,...i})}function Fd(t,e,n){return new t({type:"custom",check:"custom",fn:e,...w(n)})}function Vd(t,e){let n=Ky(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(zr(r,i.value,n._zod.def));else{let o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),i.issues.push(zr(o))}},t(i.value,i)),e);return n}function Ky(t,e){let n=new X({check:"custom",...w(e)});return n._zod.check=t,n}function Zd(t){let e=new X({check:"describe"});return e._zod.onattach=[n=>{let i=ve.get(n)??{};ve.add(n,{...i,description:t})}],e._zod.check=()=>{},e}function Bd(t){let e=new X({check:"meta"});return e._zod.onattach=[n=>{let i=ve.get(n)??{};ve.add(n,{...i,...t})}],e._zod.check=()=>{},e}function Gd(t,e){let n=w(e),i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(p=>typeof p=="string"?p.toLowerCase():p),r=r.map(p=>typeof p=="string"?p.toLowerCase():p));let o=new Set(i),s=new Set(r),a=t.Codec??qn,u=t.Boolean??Gn,c=t.String??or,l=new c({type:"string",error:n.error}),d=new u({type:"boolean",error:n.error}),f=new a({type:"pipe",in:l,out:d,transform:((p,h)=>{let _=p;return n.case!=="sensitive"&&(_=_.toLowerCase()),o.has(_)?!0:s.has(_)?!1:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:h.value,inst:f,continue:!1}),{})}),reverseTransform:((p,h)=>p===!0?i[0]||"true":r[0]||"false"),error:n.error});return f}function Xr(t,e,n,i={}){let r=w(i),o={...w(i),check:"string_format",type:"string",format:e,fn:typeof n=="function"?n:a=>n.test(a),...r};return n instanceof RegExp&&(o.pattern=n),new t(o)}var ld,Yy=v(()=>{Io();Kn();ed();N();ld={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function Mt(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??ve,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function G(t,e,n={path:[],schemaPath:[]}){var i;let r=t._zod.def,o=e.seen.get(t);if(o)return o.count++,n.schemaPath.includes(t)&&(o.cycle=n.path),o.schema;let s={schema:{},count:1,cycle:void 0,path:n.path};e.seen.set(t,s);let a=t._zod.toJSONSchema?.();if(a)s.schema=a;else{let l={...n,schemaPath:[...n.schemaPath,t],path:n.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,s.schema,l);else{let f=s.schema,p=e.processors[r.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);p(t,e,f,l)}let d=t._zod.parent;d&&(s.ref||(s.ref=d),G(d,e,l),e.seen.get(d).isParent=!0)}let u=e.metadataRegistry.get(t);return u&&Object.assign(s.schema,u),e.io==="input"&&Oe(t)&&(delete s.schema.examples,delete s.schema.default),e.io==="input"&&"_prefault"in s.schema&&((i=s.schema).default??(i.default=s.schema._prefault)),delete s.schema._prefault,e.seen.get(t).schema}function Ft(t,e){let n=t.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let s of t.seen.entries()){let a=t.metadataRegistry.get(s[0])?.id;if(a){let u=i.get(a);if(u&&u!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(a,s[0])}}let r=s=>{let a=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let d=t.external.registry.get(s[0])?.id,f=t.external.uri??(h=>h);if(d)return{ref:f(d)};let p=s[1].defId??s[1].schema.id??`schema${t.counter++}`;return s[1].defId=p,{defId:p,ref:`${f("__shared")}#/${a}/${p}`}}if(s[1]===n)return{ref:"#"};let c=`#/${a}/`,l=s[1].schema.id??`__schema${t.counter++}`;return{defId:l,ref:c+l}},o=s=>{if(s[1].schema.$ref)return;let a=s[1],{ref:u,defId:c}=r(s);a.def={...a.schema},c&&(a.defId=c);let l=a.schema;for(let d in l)delete l[d];l.$ref=u};if(t.cycles==="throw")for(let s of t.seen.entries()){let a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
65
+ `)}h.write("payload.value = newResult;"),h.write("return payload;");let C=h.compile();return(A,I)=>C(f,A,I)},o,s=ir,a=!rr.jitless,c=a&&Uu.value,l=e.catchall,d;t._zod.parse=(f,h)=>{d??(d=i.value);let p=f.value;return s(p)?a&&c&&h?.async===!1&&h.jitless!==!0?(o||(o=r(e.shape)),f=o(f,h),l?sv([],p,f,h,d,t):f):n(f,h):(f.issues.push({expected:"object",code:"invalid_type",input:p,inst:t}),f)}});Hn=m("$ZodUnion",(t,e)=>{L.init(t,e),V(t._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),V(t._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),V(t._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),V(t._zod,"pattern",()=>{if(e.options.every(i=>i._zod.pattern)){let i=e.options.map(r=>r._zod.pattern);return new RegExp(`^(${i.map(r=>Ln(r.source)).join("|")})$`)}});let n=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,s=[];for(let a of e.options){let u=a._zod.run({value:i.value,issues:[]},r);if(u instanceof Promise)s.push(u),o=!0;else{if(u.issues.length===0)return u;s.push(u)}}return o?Promise.all(s).then(a=>Bg(a,i,t,r)):Bg(s,i,t,r)}});Al=m("$ZodXor",(t,e)=>{Hn.init(t,e),e.inclusive=!1;let n=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,s=[];for(let a of e.options){let u=a._zod.run({value:i.value,issues:[]},r);u instanceof Promise?(s.push(u),o=!0):s.push(u)}return o?Promise.all(s).then(a=>Gg(a,i,t,r)):Gg(s,i,t,r)}}),zl=m("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,Hn.init(t,e);let n=t._zod.parse;V(t._zod,"propValues",()=>{let r={};for(let o of e.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let[a,u]of Object.entries(s)){r[a]||(r[a]=new Set);for(let c of u)r[a].add(c)}}return r});let i=Nr(()=>{let r=e.options,o=new Map;for(let s of r){let a=s._zod.propValues?.[e.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let u of a){if(o.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);o.set(u,s)}}return o});t._zod.parse=(r,o)=>{let s=r.value;if(!ir(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),r;let a=i.value.get(s?.[e.discriminator]);return a?a._zod.run(r,o):e.unionFallback||o.direction==="backward"?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,options:Array.from(i.value.keys()),input:s,path:[e.discriminator],inst:t}),r)}}),Nl=m("$ZodIntersection",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>{let r=n.value,o=e.left._zod.run({value:r,issues:[]},i),s=e.right._zod.run({value:r,issues:[]},i);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([u,c])=>Wg(n,u,c)):Wg(n,o,s)}});Ro=m("$ZodTuple",(t,e)=>{L.init(t,e);let n=e.items;t._zod.parse=(i,r)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:t,expected:"tuple",code:"invalid_type"}),i;i.value=[];let s=[],a=qg(n,"optin"),u=qg(n,"optout");if(!e.rest){if(o.length<a)return i.issues.push({code:"too_small",minimum:a,inclusive:!0,input:o,inst:t,origin:"array"}),i;o.length>n.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:o,inst:t,origin:"array"})}let c=new Array(n.length);for(let l=0;l<n.length;l++){let d=n[l]._zod.run({value:o[l],issues:[]},r);d instanceof Promise?s.push(d.then(f=>{c[l]=f})):c[l]=d}if(e.rest){let l=n.length-1,d=o.slice(n.length);for(let f of d){l++;let h=e.rest._zod.run({value:f,issues:[]},r);h instanceof Promise?s.push(h.then(p=>Hg(p,i,l))):Hg(h,i,l)}}return s.length?Promise.all(s).then(()=>Jg(c,i,n,o,u)):Jg(c,i,n,o,u)}});Rl=m("$ZodRecord",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>{let r=n.value;if(!Dt(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:t}),n;let o=[],s=e.keyType._zod.values;if(s){n.value={};let a=new Set;for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){a.add(typeof c=="number"?c.toString():c);let l=e.keyType._zod.run({value:c,issues:[]},i);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(l.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(h=>Ee(h,i,oe())),input:c,path:[c],inst:t});continue}let d=l.value,f=e.valueType._zod.run({value:r[c],issues:[]},i);f instanceof Promise?o.push(f.then(h=>{h.issues.length&&n.issues.push(...ze(c,h.issues)),n.value[d]=h.value})):(f.issues.length&&n.issues.push(...ze(c,f.issues)),n.value[d]=f.value)}let u;for(let c in r)a.has(c)||(u=u??[],u.push(c));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:t,keys:u})}else{n.value={};for(let a of Reflect.ownKeys(r)){if(a==="__proto__"||!Object.prototype.propertyIsEnumerable.call(r,a))continue;let 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(typeof a=="string"&&So.test(a)&&u.issues.length){let d=e.keyType._zod.run({value:Number(a),issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(u=d)}if(u.issues.length){e.mode==="loose"?n.value[a]=r[a]:n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(d=>Ee(d,i,oe())),input:a,path:[a],inst:t});continue}let l=e.valueType._zod.run({value:r[a],issues:[]},i);l instanceof Promise?o.push(l.then(d=>{d.issues.length&&n.issues.push(...ze(a,d.issues)),n.value[u.value]=d.value})):(l.issues.length&&n.issues.push(...ze(a,l.issues)),n.value[u.value]=l.value)}}return o.length?Promise.all(o).then(()=>n):n}}),Dl=m("$ZodMap",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:t}),n;let o=[];n.value=new Map;for(let[s,a]of r){let u=e.keyType._zod.run({value:s,issues:[]},i),c=e.valueType._zod.run({value:a,issues:[]},i);u instanceof Promise||c instanceof Promise?o.push(Promise.all([u,c]).then(([l,d])=>{Kg(l,d,n,s,r,t,i)})):Kg(u,c,n,s,r,t,i)}return o.length?Promise.all(o).then(()=>n):n}});Ll=m("$ZodSet",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:t,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let s of r){let a=e.valueType._zod.run({value:s,issues:[]},i);a instanceof Promise?o.push(a.then(u=>Yg(u,n))):Yg(a,n)}return o.length?Promise.all(o).then(()=>n):n}});Ul=m("$ZodEnum",(t,e)=>{L.init(t,e);let n=Dn(e.entries),i=new Set(n);t._zod.values=i,t._zod.pattern=new RegExp(`^(${n.filter(r=>Un.has(typeof r)).map(r=>typeof r=="string"?Ke(r):r.toString()).join("|")})$`),t._zod.parse=(r,o)=>{let s=r.value;return i.has(s)||r.issues.push({code:"invalid_value",values:n,input:s,inst:t}),r}}),jl=m("$ZodLiteral",(t,e)=>{if(L.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(e.values);t._zod.values=n,t._zod.pattern=new RegExp(`^(${e.values.map(i=>typeof i=="string"?Ke(i):i?Ke(i.toString()):String(i)).join("|")})$`),t._zod.parse=(i,r)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:e.values,input:o,inst:t}),i}}),Ml=m("$ZodFile",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:t}),n}}),Fl=m("$ZodTransform",(t,e)=>{L.init(t,e),t._zod.optin="optional",t._zod.parse=(n,i)=>{if(i.direction==="backward")throw new zt(t.constructor.name);let r=e.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(s=>(n.value=s,n.fallback=!0,n));if(r instanceof Promise)throw new ot;return n.value=r,n.fallback=!0,n}});Do=m("$ZodOptional",(t,e)=>{L.init(t,e),t._zod.optin="optional",t._zod.optout="optional",V(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),V(t._zod,"pattern",()=>{let n=e.innerType._zod.pattern;return n?new RegExp(`^(${Ln(n.source)})?$`):void 0}),t._zod.parse=(n,i)=>{if(e.innerType._zod.optin==="optional"){let r=n.value,o=e.innerType._zod.run(n,i);return o instanceof Promise?o.then(s=>Xg(s,r)):Xg(o,r)}return n.value===void 0?n:e.innerType._zod.run(n,i)}}),Vl=m("$ZodExactOptional",(t,e)=>{Do.init(t,e),V(t._zod,"values",()=>e.innerType._zod.values),V(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(n,i)=>e.innerType._zod.run(n,i)}),Zl=m("$ZodNullable",(t,e)=>{L.init(t,e),V(t._zod,"optin",()=>e.innerType._zod.optin),V(t._zod,"optout",()=>e.innerType._zod.optout),V(t._zod,"pattern",()=>{let n=e.innerType._zod.pattern;return n?new RegExp(`^(${Ln(n.source)}|null)$`):void 0}),V(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(n,i)=>n.value===null?n:e.innerType._zod.run(n,i)}),Bl=m("$ZodDefault",(t,e)=>{L.init(t,e),t._zod.optin="optional",V(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,i)=>{if(i.direction==="backward")return e.innerType._zod.run(n,i);if(n.value===void 0)return n.value=e.defaultValue,n;let r=e.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>Qg(o,e)):Qg(r,e)}});Gl=m("$ZodPrefault",(t,e)=>{L.init(t,e),t._zod.optin="optional",V(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=e.defaultValue),e.innerType._zod.run(n,i))}),Wl=m("$ZodNonOptional",(t,e)=>{L.init(t,e),V(t._zod,"values",()=>{let n=e.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),t._zod.parse=(n,i)=>{let r=e.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>ev(o,t)):ev(r,t)}});ql=m("$ZodSuccess",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>{if(i.direction==="backward")throw new zt("ZodSuccess");let r=e.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),Hl=m("$ZodCatch",(t,e)=>{L.init(t,e),t._zod.optin="optional",V(t._zod,"optout",()=>e.innerType._zod.optout),V(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,i)=>{if(i.direction==="backward")return e.innerType._zod.run(n,i);let r=e.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.value,o.issues.length&&(n.value=e.catchValue({...n,error:{issues:o.issues.map(s=>Ee(s,i,oe()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=r.value,r.issues.length&&(n.value=e.catchValue({...n,error:{issues:r.issues.map(o=>Ee(o,i,oe()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),Jl=m("$ZodNaN",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:t,expected:"nan",code:"invalid_type"}),n)}),Lo=m("$ZodPipe",(t,e)=>{L.init(t,e),V(t._zod,"values",()=>e.in._zod.values),V(t._zod,"optin",()=>e.in._zod.optin),V(t._zod,"optout",()=>e.out._zod.optout),V(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=e.out._zod.run(n,i);return o instanceof Promise?o.then(s=>Oo(s,e.in,i)):Oo(o,e.in,i)}let r=e.in._zod.run(n,i);return r instanceof Promise?r.then(o=>Oo(o,e.out,i)):Oo(r,e.out,i)}});Jn=m("$ZodCodec",(t,e)=>{L.init(t,e),V(t._zod,"values",()=>e.in._zod.values),V(t._zod,"optin",()=>e.in._zod.optin),V(t._zod,"optout",()=>e.out._zod.optout),V(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let o=e.in._zod.run(n,i);return o instanceof Promise?o.then(s=>Po(s,e,i)):Po(o,e,i)}else{let o=e.out._zod.run(n,i);return o instanceof Promise?o.then(s=>Po(s,e,i)):Po(o,e,i)}}});Kl=m("$ZodPreprocess",(t,e)=>{Lo.init(t,e)}),Yl=m("$ZodReadonly",(t,e)=>{L.init(t,e),V(t._zod,"propValues",()=>e.innerType._zod.propValues),V(t._zod,"values",()=>e.innerType._zod.values),V(t._zod,"optin",()=>e.innerType?._zod?.optin),V(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(n,i)=>{if(i.direction==="backward")return e.innerType._zod.run(n,i);let r=e.innerType._zod.run(n,i);return r instanceof Promise?r.then(tv):tv(r)}});Xl=m("$ZodTemplateLiteral",(t,e)=>{L.init(t,e);let n=[];for(let 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()}`);let r=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=r.startsWith("^")?1:0,s=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(o,s))}else if(i===null||Mu.has(typeof i))n.push(Ke(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);t._zod.pattern=new RegExp(`^${n.join("")}$`),t._zod.parse=(i,r)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:t,expected:"string",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)}),Ql=m("$ZodFunction",(t,e)=>(L.init(t,e),t._def=e,t._zod.def=e,t.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...i){let r=t._def.input?ho(t._def.input,i):i,o=Reflect.apply(n,this,r);return t._def.output?ho(t._def.output,o):o}},t.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let r=t._def.input?await po(t._def.input,i):i,o=await Reflect.apply(n,this,r);return t._def.output?await po(t._def.output,o):o}},t._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:t}),n):(t._def.output&&t._def.output._zod.def.type==="promise"?n.value=t.implementAsync(n.value):n.value=t.implement(n.value),n),t.input=(...n)=>{let i=t.constructor;return Array.isArray(n[0])?new i({type:"function",input:new Ro({type:"tuple",items:n[0],rest:n[1]}),output:t._def.output}):new i({type:"function",input:n[0],output:t._def.output})},t.output=n=>{let i=t.constructor;return new i({type:"function",input:t._def.input,output:n})},t)),ed=m("$ZodPromise",(t,e)=>{L.init(t,e),t._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>e.innerType._zod.run({value:r,issues:[]},i))}),td=m("$ZodLazy",(t,e)=>{L.init(t,e),V(t._zod,"innerType",()=>{let n=e;return n._cachedInner||(n._cachedInner=e.getter()),n._cachedInner}),V(t._zod,"pattern",()=>t._zod.innerType?._zod?.pattern),V(t._zod,"propValues",()=>t._zod.innerType?._zod?.propValues),V(t._zod,"optin",()=>t._zod.innerType?._zod?.optin??void 0),V(t._zod,"optout",()=>t._zod.innerType?._zod?.optout??void 0),t._zod.parse=(n,i)=>t._zod.innerType._zod.run(n,i)}),rd=m("$ZodCustom",(t,e)=>{X.init(t,e),L.init(t,e),t._zod.parse=(n,i)=>n,t._zod.check=n=>{let i=n.value,r=e.fn(i);if(r instanceof Promise)return r.then(o=>rv(o,n,i,t));rv(r,n,i,t)}})});function uv(){return{localeError:TE()}}var TE,cv=v(()=>{N();TE=()=>{let t={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function e(r){return t[r]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`}case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${b(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${n[o.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${g(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}}});function lv(){return{localeError:OE()}}var OE,dv=v(()=>{N();OE=()=>{let t={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function e(r){return t[r]??null}let n={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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${a}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${b(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}}});function fv(t,e,n,i){let r=Math.abs(t),o=r%10,s=r%100;return s>=11&&s<=19?i:o===1?e:o>=2&&o<=4?n:i}function hv(){return{localeError:PE()}}var PE,pv=v(()=>{N();PE=()=>{let t={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function e(r){return t[r]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`}case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${b(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);if(s){let a=Number(r.maximum),u=fv(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${r.maximum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);if(s){let a=Number(r.minimum),u=fv(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${r.minimum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${g(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}}});function mv(){return{localeError:CE()}}var CE,gv=v(()=>{N();CE=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function e(r){return t[r]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${b(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${g(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}}});function vv(){return{localeError:AE()}}var AE,yv=v(()=>{N();AE=()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(r){return t[r]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",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\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${a}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${b(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${g(r.values," o ")}`;case"too_big":{let o=r.inclusive?"com a m\xE0xim":"menys de",s=e(r.origin);return s?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${o} ${r.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"com a m\xEDnim":"m\xE9s de",s=e(r.origin);return s?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${o} ${r.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}}});function _v(){return{localeError:zE()}}var zE,bv=v(()=>{N();zE=()=>{let t={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function e(r){return t[r]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 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 \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${a}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${b(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${g(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}}});function $v(){return{localeError:NE()}}var NE,xv=v(()=>{N();NE=()=>{let t={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function e(r){return t[r]??null}let n={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\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",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"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${a}`:`Ugyldigt input: forventede ${o}, fik ${a}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${b(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin),a=i[r.origin]??r.origin;return s?`For stor: forventede ${a??"value"} ${s.verb} ${o} ${r.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin),a=i[r.origin]??r.origin;return s?`For lille: forventede ${a} ${s.verb} ${o} ${r.minimum.toString()} ${s.unit}`:`For lille: forventede ${a} havde ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${g(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}}});function wv(){return{localeError:RE()}}var RE,Sv=v(()=>{N();RE=()=>{let 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(r){return t[r]??null}let n={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"},i={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${a}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${b(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ist`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ist`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${g(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}}});function kv(){return{localeError:DE()}}var DE,Iv=v(()=>{N();DE=()=>{let t={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function e(r){return t[r]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 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 \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return typeof r.expected=="string"&&/^[A-Z]/.test(r.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${r.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${a}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${a}`}case"invalid_value":return r.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${b(r.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.maximum.toString()} ${s.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.minimum.toString()} ${s.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${o.prefix}"`:o.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${o.suffix}"`:o.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${o.includes}"`:o.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${r.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${r.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${r.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${g(r.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${r.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${r.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}}});function Uo(){return{localeError:LE()}}var LE,id=v(()=>{N();LE=()=>{let 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"},map:{unit:"entries",verb:"to have"}};function e(r){return t[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return`Invalid input: expected ${o}, received ${a}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${b(r.values[0])}`:`Invalid option: expected one of ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Too big: expected ${r.origin??"value"} to have ${o}${r.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Too small: expected ${r.origin} to have ${o}${r.minimum.toString()} ${s.unit}`:`Too small: expected ${r.origin} to be ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`Invalid discriminator value. Expected ${r.options.map(s=>`'${s}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}}});function Ev(){return{localeError:UE()}}var UE,Tv=v(()=>{N();UE=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(r){return t[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",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\u016Dro",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"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${a}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${b(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${o}${r.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}}});function Ov(){return{localeError:jE()}}var jE,Pv=v(()=>{N();jE=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(r){return t[r]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",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\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${a}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${b(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin),a=i[r.origin]??r.origin;return s?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${o}${r.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin),a=i[r.origin]??r.origin;return s?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${o}${r.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} fuera ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}}});function Cv(){return{localeError:ME()}}var ME,Av=v(()=>{N();ME=()=>{let t={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function e(r){return t[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${b(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${g(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${g(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}}});function zv(){return{localeError:FE()}}var FE,Nv=v(()=>{N();FE=()=>{let t={string:{unit:"merkki\xE4",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\xE4iv\xE4m\xE4\xE4r\xE4n"}};function e(r){return t[r]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",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\xE4iv\xE4m\xE4\xE4r\xE4",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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${a}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${b(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${o}${r.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${o}${r.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${g(r.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\xF6te"}}}});function Rv(){return{localeError:VE()}}var VE,Dv=v(()=>{N();VE=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(r){return t[r]??null}let n={regex:"entr\xE9e",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\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${a} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${b(r.values[0])} attendu`:`Option invalide : une valeur parmi ${g(r.values,"|")} attendue`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Trop grand : ${i[r.origin]??"valeur"} doit ${s.verb} ${o}${r.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Trop petit : ${i[r.origin]??"valeur"} doit ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`Trop petit : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${g(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}}});function Lv(){return{localeError:ZE()}}var ZE,Uv=v(()=>{N();ZE=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(r){return t[r]??null}let n={regex:"entr\xE9e",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\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${a}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${b(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u2264":"<",s=e(r.origin);return s?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${o}${r.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u2265":">",s=e(r.origin);return s?`Trop petit : attendu que ${r.origin} ait ${o}${r.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${r.origin} soit ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${g(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}}});function jv(){return{localeError:BE()}}var BE,Mv=v(()=>{N();BE=()=>{let t={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},e={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=c=>c?t[c]:void 0,i=c=>{let l=n(c);return l?l.label:c??t.unknown.label},r=c=>`\u05D4${i(c)}`,o=c=>(n(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=c=>c?e[c]??null:null,a={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},u={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let l=c.expected,d=u[l??""]??i(l),f=$(c.input),h=u[f]??t[f]?.label??f;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`}case"invalid_value":{if(c.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${b(c.values[0])}`;let l=c.values.map(h=>b(h));if(c.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l[0]} \u05D0\u05D5 ${l[1]}`;let d=l[l.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let l=s(c.origin),d=r(c.origin??"value");if(c.origin==="string")return`${l?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${l?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let p=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}`}if(c.origin==="array"||c.origin==="set"){let p=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",_=c.inclusive?`${c.maximum} ${l?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${l?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${_}`.trim()}let f=c.inclusive?"<=":"<",h=o(c.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${d} ${h} ${f}${c.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${h} ${f}${c.maximum.toString()}`}case"too_small":{let l=s(c.origin),d=r(c.origin??"value");if(c.origin==="string")return`${l?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${l?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let p=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}`}if(c.origin==="array"||c.origin==="set"){let p=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let S=(c.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${S}`}let _=c.inclusive?`${c.minimum} ${l?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${l?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${_}`.trim()}let f=c.inclusive?">=":">",h=o(c.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${d} ${h} ${f}${c.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${h} ${f}${c.minimum.toString()}`}case"invalid_format":{let l=c;if(l.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${l.prefix}"`;if(l.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${l.suffix}"`;if(l.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${l.includes}"`;if(l.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${l.pattern}`;let d=a[l.format],f=d?.label??l.format,p=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${p}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${g(c.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}}});function Fv(){return{localeError:GE()}}var GE,Vv=v(()=>{N();GE=()=>{let t={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function e(r){return t[r]??null}let n={regex:"unos",email:"email 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:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${a}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${a}`}case"invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${b(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin),a=i[r.origin]??r.origin;return s?`Preveliko: o\u010Dekivano da ${a??"vrijednost"} ima ${o}${r.maximum.toString()} ${s.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${a??"vrijednost"} bude ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin),a=i[r.origin]??r.origin;return s?`Premalo: o\u010Dekivano da ${a} ima ${o}${r.minimum.toString()} ${s.unit}`:`Premalo: o\u010Dekivano da ${a} bude ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${n[o.format]??r.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${r.divisor}`;case"unrecognized_keys":return`Neprepoznat${r.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${g(r.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[r.origin]??r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[r.origin]??r.origin}`;default:return"Neispravan unos"}}}});function Zv(){return{localeError:WE()}}var WE,Bv=v(()=>{N();WE=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(r){return t[r]??null}let n={regex:"bemenet",email:"email c\xEDm",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\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${a}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${b(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${r.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${o}${r.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}}});function Gv(t,e,n){return Math.abs(t)===1?e:n}function Fr(t){if(!t)return"";let e=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=t[t.length-1];return t+(e.includes(n)?"\u0576":"\u0568")}function Wv(){return{localeError:qE()}}var qE,qv=v(()=>{N();qE=()=>{let t={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function e(r){return t[r]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`}case"invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${b(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);if(s){let a=Number(r.maximum),u=Gv(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Fr(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.maximum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Fr(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);if(s){let a=Number(r.minimum),u=Gv(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Fr(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.minimum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Fr(r.origin)} \u056C\u056B\u0576\u056B ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[o.format]??r.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${g(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Fr(r.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Fr(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}}});function Hv(){return{localeError:HE()}}var HE,Jv=v(()=>{N();HE=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(r){return t[r]??null}let n={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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${o}, diterima ${a}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${b(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${o}${r.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Terlalu kecil: diharapkan ${r.origin} memiliki ${o}${r.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;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}`:`${n[o.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}}});function Kv(){return{localeError:JE()}}var JE,Yv=v(()=>{N();JE=()=>{let t={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function e(r){return t[r]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",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\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",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\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${b(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${o}${r.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${o}${r.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${n[o.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${g(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}}});function Xv(){return{localeError:KE()}}var KE,Qv=v(()=>{N();KE=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(r){return t[r]??null}let n={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"},i={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${a}`:`Input non valido: atteso ${o}, ricevuto ${a}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${b(r.values[0])}`:`Opzione non valida: atteso uno tra ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Troppo grande: ${r.origin??"valore"} deve avere ${o}${r.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Troppo piccolo: ${r.origin} deve avere ${o}${r.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${r.origin} deve essere ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;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}`:`Input non valido: ${n[o.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${g(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}}});function ey(){return{localeError:YE()}}var YE,ty=v(()=>{N();YE=()=>{let t={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function e(r){return t[r]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${b(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${g(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=e(r.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${s.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=e(r.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${s.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${g(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}}});function ry(){return{localeError:XE()}}var XE,ny=v(()=>{N();XE=()=>{let t={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function e(r){return t[r]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`}case"invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${b(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${g(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${o}${r.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${g(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}}});function jo(){return{localeError:QE()}}var QE,od=v(()=>{N();QE=()=>{let t={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function e(r){return t[r]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`}case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${b(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${g(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}}});function iy(){return jo()}var oy=v(()=>{od()});function sy(){return{localeError:e1()}}var e1,ay=v(()=>{N();e1=()=>{let t={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function e(r){return t[r]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${b(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${g(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=e(r.origin),u=a?.unit??"\uC694\uC18C";return a?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${u} ${o}${s}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${o}${s}`}case"too_small":{let o=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=e(r.origin),u=a?.unit??"\uC694\uC18C";return a?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${u} ${o}${s}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${o}${s}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${g(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}}});function uy(t){let e=Math.abs(t),n=e%10,i=e%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}function cy(){return{localeError:t1()}}var Kn,t1,ly=v(()=>{N();Kn=t=>t.charAt(0).toUpperCase()+t.slice(1);t1=()=>{let t={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function e(r,o,s,a){let u=t[r]??null;return u===null?u:{unit:u.unit[o],verb:u.verb[a][s?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to 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\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${o}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${b(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${g(r.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[r.origin]??r.origin,s=e(r.origin,uy(Number(r.maximum)),r.inclusive??!1,"smaller");if(s?.verb)return`${Kn(o??r.origin??"reik\u0161m\u0117")} ${s.verb} ${r.maximum.toString()} ${s.unit??"element\u0173"}`;let a=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Kn(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${r.maximum.toString()} ${s?.unit}`}case"too_small":{let o=i[r.origin]??r.origin,s=e(r.origin,uy(Number(r.minimum)),r.inclusive??!1,"bigger");if(s?.verb)return`${Kn(o??r.origin??"reik\u0161m\u0117")} ${s.verb} ${r.minimum.toString()} ${s.unit??"element\u0173"}`;let a=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Kn(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${r.minimum.toString()} ${s?.unit}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${g(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[r.origin]??r.origin;return`${Kn(o??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function dy(){return{localeError:r1()}}var r1,fy=v(()=>{N();r1=()=>{let t={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function e(r){return t[r]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${b(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${g(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}}});function hy(){return{localeError:n1()}}var n1,py=v(()=>{N();n1=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(r){return t[r]??null}let n={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"},i={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${a}`:`Input tidak sah: dijangka ${o}, diterima ${a}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${b(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Terlalu besar: dijangka ${r.origin??"nilai"} ${s.verb} ${o}${r.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Terlalu kecil: dijangka ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;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}`:`${n[o.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${g(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}}});function my(){return{localeError:i1()}}var i1,gy=v(()=>{N();i1=()=>{let t={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function e(r){return t[r]??null}let n={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"},i={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${o}, ontving ${a}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${b(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin),a=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return s?`Te ${a}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${a}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} is`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin),a=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return s?`Te ${a}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${a}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} is`}case"invalid_format":{let o=r;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: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}}});function vy(){return{localeError:o1()}}var o1,yy=v(()=>{N();o1=()=>{let t={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function e(r){return t[r]??null}let n={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\xE5de",ipv6:"IPv6-omr\xE5de",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"},i={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${a}`:`Ugyldig input: forventet ${o}, fikk ${a}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${b(r.values[0])}`:`Ugyldig valg: forventet en av ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${g(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}}});function _y(){return{localeError:s1()}}var s1,by=v(()=>{N();s1=()=>{let t={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function e(r){return t[r]??null}let n={regex:"giren",email:"epostag\xE2h",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\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${a}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${b(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=r;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}}});function $y(){return{localeError:a1()}}var a1,xy=v(()=>{N();a1=()=>{let t={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function e(r){return t[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${b(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${g(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${g(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}}});function wy(){return{localeError:u1()}}var u1,Sy=v(()=>{N();u1=()=>{let t={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function e(r){return t[r]??null}let n={regex:"wyra\u017Cenie",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\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${a}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${b(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}}});function ky(){return{localeError:c1()}}var c1,Iy=v(()=>{N();c1=()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(r){return t[r]??null}let n={regex:"padr\xE3o",email:"endere\xE7o 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\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o 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\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${a}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${b(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${o}${r.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Muito pequeno: esperado que ${r.origin} tivesse ${o}${r.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${n[o.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}}});function Ey(){return{localeError:l1()}}var l1,Ty=v(()=>{N();l1=()=>{let t={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function e(r){return t[r]??null}let n={regex:"intrare",email:"adres\u0103 de 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:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${a}`}case"invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${b(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} ${s.verb} ${o}${r.maximum.toString()} ${s.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} s\u0103 fie ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Prea mic: a\u0219teptat ca ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${n[o.format]??r.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${r.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${g(r.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${r.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${r.origin}`;default:return"Intrare invalid\u0103"}}}});function Oy(t,e,n,i){let r=Math.abs(t),o=r%10,s=r%100;return s>=11&&s<=19?i:o===1?e:o>=2&&o<=4?n:i}function Py(){return{localeError:d1()}}var d1,Cy=v(()=>{N();d1=()=>{let t={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function e(r){return t[r]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${b(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);if(s){let a=Number(r.maximum),u=Oy(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.maximum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);if(s){let a=Number(r.minimum),u=Oy(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.minimum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${g(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}}});function Ay(){return{localeError:f1()}}var f1,zy=v(()=>{N();f1=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(r){return t[r]??null}let n={regex:"vnos",email:"e-po\u0161tni 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 \u010Das",date:"ISO datum",time:"ISO \u010Das",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 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${a}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${b(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${o}${r.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${o}${r.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${g(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}}});function Ny(){return{localeError:h1()}}var h1,Ry=v(()=>{N();h1=()=>{let t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function e(r){return t[r]??null}let n={regex:"regulj\xE4rt 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\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${a}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${b(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${g(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}}});function Dy(){return{localeError:p1()}}var p1,Ly=v(()=>{N();p1=()=>{let t={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function e(r){return t[r]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",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 \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`}case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${b(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${g(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}}});function Uy(){return{localeError:m1()}}var m1,jy=v(()=>{N();m1=()=>{let t={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function e(r){return t[r]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${b(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=e(r.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=e(r.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${g(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}}});function My(){return{localeError:g1()}}var g1,Fy=v(()=>{N();g1=()=>{let t={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function e(r){return t[r]??null}let n={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\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${a}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${b(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[o.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}}});function Mo(){return{localeError:v1()}}var v1,sd=v(()=>{N();v1=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function e(r){return t[r]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${b(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${o}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${g(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}}});function Vy(){return Mo()}var Zy=v(()=>{sd()});function By(){return{localeError:y1()}}var y1,Gy=v(()=>{N();y1=()=>{let t={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function e(r){return t[r]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${b(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${g(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${o}${r.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${o}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${g(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}}});function Wy(){return{localeError:_1()}}var _1,qy=v(()=>{N();_1=()=>{let t={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function e(r){return t[r]??null}let n={regex:"kirish",email:"elektron pochta manzili",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 sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${a}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${b(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[o.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}}});function Hy(){return{localeError:b1()}}var b1,Jy=v(()=>{N();b1=()=>{let t={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function e(r){return t[r]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 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\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${b(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${o}${r.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${g(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}}});function Ky(){return{localeError:$1()}}var $1,Yy=v(()=>{N();$1=()=>{let t={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function e(r){return t[r]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${b(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}}});function Xy(){return{localeError:x1()}}var x1,Qy=v(()=>{N();x1=()=>{let t={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function e(r){return t[r]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",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 \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${a}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${b(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${g(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}}});function e_(){return{localeError:w1()}}var w1,t_=v(()=>{N();w1=()=>{let t={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function e(r){return t[r]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",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:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=$(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${b(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${g(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=e(r.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${s.verb} ${o}${r.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.maximum}`}case"too_small":{let o=r.inclusive?">=":">",s=e(r.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${s.verb} ${o}${r.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.minimum}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${n[o.format]??r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${g(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}}});var Yn={};He(Yn,{ar:()=>uv,az:()=>lv,be:()=>hv,bg:()=>mv,ca:()=>vv,cs:()=>_v,da:()=>$v,de:()=>wv,el:()=>kv,en:()=>Uo,eo:()=>Ev,es:()=>Ov,fa:()=>Cv,fi:()=>zv,fr:()=>Rv,frCA:()=>Lv,he:()=>jv,hr:()=>Fv,hu:()=>Zv,hy:()=>Wv,id:()=>Hv,is:()=>Kv,it:()=>Xv,ja:()=>ey,ka:()=>ry,kh:()=>iy,km:()=>jo,ko:()=>sy,lt:()=>cy,mk:()=>dy,ms:()=>hy,nl:()=>my,no:()=>vy,ota:()=>_y,pl:()=>wy,ps:()=>$y,pt:()=>ky,ro:()=>Ey,ru:()=>Py,sl:()=>Ay,sv:()=>Ny,ta:()=>Dy,th:()=>Uy,tr:()=>My,ua:()=>Vy,uk:()=>Mo,ur:()=>By,uz:()=>Wy,vi:()=>Hy,yo:()=>e_,zhCN:()=>Ky,zhTW:()=>Xy});var ad=v(()=>{cv();dv();pv();gv();yv();bv();xv();Sv();Iv();id();Tv();Pv();Av();Nv();Dv();Uv();Mv();Vv();Bv();qv();Jv();Yv();Qv();ty();ny();oy();od();ay();ly();fy();py();gy();yy();by();xy();Sy();Iy();Ty();Cy();zy();Ry();Ly();jy();Fy();Zy();sd();Gy();qy();Jy();Yy();Qy();t_()});function Vo(){return new Fo}var r_,ud,cd,Fo,ve,Xn=v(()=>{ud=Symbol("ZodOutput"),cd=Symbol("ZodInput"),Fo=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...n){let i=n[0];return this._map.set(e,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let n=this._map.get(e);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(e),this}get(e){let n=e._zod.parent;if(n){let i={...this.get(n)??{}};delete i.id;let r={...i,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};(r_=globalThis).__zod_globalRegistry??(r_.__zod_globalRegistry=Vo());ve=globalThis.__zod_globalRegistry});function ld(t,e){return new t({type:"string",...w(e)})}function dd(t,e){return new t({type:"string",coerce:!0,...w(e)})}function Zo(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...w(e)})}function Qn(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...w(e)})}function Bo(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...w(e)})}function Go(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...w(e)})}function Wo(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...w(e)})}function qo(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...w(e)})}function ei(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...w(e)})}function Ho(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...w(e)})}function Jo(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...w(e)})}function Ko(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...w(e)})}function Yo(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...w(e)})}function Xo(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...w(e)})}function Qo(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...w(e)})}function es(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...w(e)})}function ts(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...w(e)})}function rs(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...w(e)})}function fd(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...w(e)})}function ns(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...w(e)})}function is(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...w(e)})}function os(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...w(e)})}function ss(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...w(e)})}function as(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...w(e)})}function us(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...w(e)})}function pd(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...w(e)})}function md(t,e){return new t({type:"string",format:"date",check:"string_format",...w(e)})}function gd(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...w(e)})}function vd(t,e){return new t({type:"string",format:"duration",check:"string_format",...w(e)})}function yd(t,e){return new t({type:"number",checks:[],...w(e)})}function _d(t,e){return new t({type:"number",coerce:!0,checks:[],...w(e)})}function bd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...w(e)})}function $d(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...w(e)})}function xd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...w(e)})}function wd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...w(e)})}function Sd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...w(e)})}function kd(t,e){return new t({type:"boolean",...w(e)})}function Id(t,e){return new t({type:"boolean",coerce:!0,...w(e)})}function Ed(t,e){return new t({type:"bigint",...w(e)})}function Td(t,e){return new t({type:"bigint",coerce:!0,...w(e)})}function Od(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...w(e)})}function Pd(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...w(e)})}function Cd(t,e){return new t({type:"symbol",...w(e)})}function Ad(t,e){return new t({type:"undefined",...w(e)})}function zd(t,e){return new t({type:"null",...w(e)})}function Nd(t){return new t({type:"any"})}function Rd(t){return new t({type:"unknown"})}function Dd(t,e){return new t({type:"never",...w(e)})}function Ld(t,e){return new t({type:"void",...w(e)})}function Ud(t,e){return new t({type:"date",...w(e)})}function jd(t,e){return new t({type:"date",coerce:!0,...w(e)})}function Md(t,e){return new t({type:"nan",...w(e)})}function lt(t,e){return new Io({check:"less_than",...w(e),value:t,inclusive:!1})}function Ve(t,e){return new Io({check:"less_than",...w(e),value:t,inclusive:!0})}function dt(t,e){return new Eo({check:"greater_than",...w(e),value:t,inclusive:!1})}function Te(t,e){return new Eo({check:"greater_than",...w(e),value:t,inclusive:!0})}function cs(t){return dt(0,t)}function ls(t){return lt(0,t)}function ds(t){return Ve(0,t)}function fs(t){return Te(0,t)}function Ut(t,e){return new Ic({check:"multiple_of",...w(e),value:t})}function jt(t,e){return new Oc({check:"max_size",...w(e),maximum:t})}function ft(t,e){return new Pc({check:"min_size",...w(e),minimum:t})}function ar(t,e){return new Cc({check:"size_equals",...w(e),size:t})}function ur(t,e){return new Ac({check:"max_length",...w(e),maximum:t})}function $t(t,e){return new zc({check:"min_length",...w(e),minimum:t})}function cr(t,e){return new Nc({check:"length_equals",...w(e),length:t})}function Vr(t,e){return new Rc({check:"string_format",format:"regex",...w(e),pattern:t})}function Zr(t){return new Dc({check:"string_format",format:"lowercase",...w(t)})}function Br(t){return new Lc({check:"string_format",format:"uppercase",...w(t)})}function Gr(t,e){return new Uc({check:"string_format",format:"includes",...w(e),includes:t})}function Wr(t,e){return new jc({check:"string_format",format:"starts_with",...w(e),prefix:t})}function qr(t,e){return new Mc({check:"string_format",format:"ends_with",...w(e),suffix:t})}function hs(t,e,n){return new Fc({check:"property",property:t,schema:e,...w(n)})}function Hr(t,e){return new Vc({check:"mime_type",mime:t,...w(e)})}function st(t){return new Zc({check:"overwrite",tx:t})}function Jr(t){return st(e=>e.normalize(t))}function Kr(){return st(t=>t.trim())}function Yr(){return st(t=>t.toLowerCase())}function Xr(){return st(t=>t.toUpperCase())}function Qr(){return st(t=>Lu(t))}function Fd(t,e,n){return new t({type:"array",element:e,...w(n)})}function k1(t,e,n){return new t({type:"union",options:e,...w(n)})}function I1(t,e,n){return new t({type:"union",options:e,inclusive:!1,...w(n)})}function E1(t,e,n,i){return new t({type:"union",options:n,discriminator:e,...w(i)})}function T1(t,e,n){return new t({type:"intersection",left:e,right:n})}function O1(t,e,n,i){let r=n instanceof L,o=r?i:n,s=r?n:null;return new t({type:"tuple",items:e,rest:s,...w(o)})}function P1(t,e,n,i){return new t({type:"record",keyType:e,valueType:n,...w(i)})}function C1(t,e,n,i){return new t({type:"map",keyType:e,valueType:n,...w(i)})}function A1(t,e,n){return new t({type:"set",valueType:e,...w(n)})}function z1(t,e,n){let i=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new t({type:"enum",entries:i,...w(n)})}function N1(t,e,n){return new t({type:"enum",entries:e,...w(n)})}function R1(t,e,n){return new t({type:"literal",values:Array.isArray(e)?e:[e],...w(n)})}function Vd(t,e){return new t({type:"file",...w(e)})}function D1(t,e){return new t({type:"transform",transform:e})}function L1(t,e){return new t({type:"optional",innerType:e})}function U1(t,e){return new t({type:"nullable",innerType:e})}function j1(t,e,n){return new t({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():ju(n)}})}function M1(t,e,n){return new t({type:"nonoptional",innerType:e,...w(n)})}function F1(t,e){return new t({type:"success",innerType:e})}function V1(t,e,n){return new t({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}function Z1(t,e,n){return new t({type:"pipe",in:e,out:n})}function B1(t,e){return new t({type:"readonly",innerType:e})}function G1(t,e,n){return new t({type:"template_literal",parts:e,...w(n)})}function W1(t,e){return new t({type:"lazy",getter:e})}function q1(t,e){return new t({type:"promise",innerType:e})}function Zd(t,e,n){let i=w(n);return i.abort??(i.abort=!0),new t({type:"custom",check:"custom",fn:e,...i})}function Bd(t,e,n){return new t({type:"custom",check:"custom",fn:e,...w(n)})}function Gd(t,e){let n=n_(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(Rr(r,i.value,n._zod.def));else{let o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),i.issues.push(Rr(o))}},t(i.value,i)),e);return n}function n_(t,e){let n=new X({check:"custom",...w(e)});return n._zod.check=t,n}function Wd(t){let e=new X({check:"describe"});return e._zod.onattach=[n=>{let i=ve.get(n)??{};ve.add(n,{...i,description:t})}],e._zod.check=()=>{},e}function qd(t){let e=new X({check:"meta"});return e._zod.onattach=[n=>{let i=ve.get(n)??{};ve.add(n,{...i,...t})}],e._zod.check=()=>{},e}function Hd(t,e){let n=w(e),i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(h=>typeof h=="string"?h.toLowerCase():h),r=r.map(h=>typeof h=="string"?h.toLowerCase():h));let o=new Set(i),s=new Set(r),a=t.Codec??Jn,u=t.Boolean??qn,c=t.String??sr,l=new c({type:"string",error:n.error}),d=new u({type:"boolean",error:n.error}),f=new a({type:"pipe",in:l,out:d,transform:((h,p)=>{let _=h;return n.case!=="sensitive"&&(_=_.toLowerCase()),o.has(_)?!0:s.has(_)?!1:(p.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:p.value,inst:f,continue:!1}),{})}),reverseTransform:((h,p)=>h===!0?i[0]||"true":r[0]||"false"),error:n.error});return f}function en(t,e,n,i={}){let r=w(i),o={...w(i),check:"string_format",type:"string",format:e,fn:typeof n=="function"?n:a=>n.test(a),...r};return n instanceof RegExp&&(o.pattern=n),new t(o)}var hd,i_=v(()=>{To();Xn();nd();N();hd={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function Mt(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??ve,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function G(t,e,n={path:[],schemaPath:[]}){var i;let r=t._zod.def,o=e.seen.get(t);if(o)return o.count++,n.schemaPath.includes(t)&&(o.cycle=n.path),o.schema;let s={schema:{},count:1,cycle:void 0,path:n.path};e.seen.set(t,s);let a=t._zod.toJSONSchema?.();if(a)s.schema=a;else{let l={...n,schemaPath:[...n.schemaPath,t],path:n.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,s.schema,l);else{let f=s.schema,h=e.processors[r.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);h(t,e,f,l)}let d=t._zod.parent;d&&(s.ref||(s.ref=d),G(d,e,l),e.seen.get(d).isParent=!0)}let u=e.metadataRegistry.get(t);return u&&Object.assign(s.schema,u),e.io==="input"&&Oe(t)&&(delete s.schema.examples,delete s.schema.default),e.io==="input"&&"_prefault"in s.schema&&((i=s.schema).default??(i.default=s.schema._prefault)),delete s.schema._prefault,e.seen.get(t).schema}function Ft(t,e){let n=t.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let s of t.seen.entries()){let a=t.metadataRegistry.get(s[0])?.id;if(a){let u=i.get(a);if(u&&u!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(a,s[0])}}let r=s=>{let a=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let d=t.external.registry.get(s[0])?.id,f=t.external.uri??(p=>p);if(d)return{ref:f(d)};let h=s[1].defId??s[1].schema.id??`schema${t.counter++}`;return s[1].defId=h,{defId:h,ref:`${f("__shared")}#/${a}/${h}`}}if(s[1]===n)return{ref:"#"};let c=`#/${a}/`,l=s[1].schema.id??`__schema${t.counter++}`;return{defId:l,ref:c+l}},o=s=>{if(s[1].schema.$ref)return;let a=s[1],{ref:u,defId:c}=r(s);a.def={...a.schema},c&&(a.defId=c);let l=a.schema;for(let d in l)delete l[d];l.$ref=u};if(t.cycles==="throw")for(let s of t.seen.entries()){let a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
66
66
 
67
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of t.seen.entries()){let a=s[1];if(e===s[0]){o(s);continue}if(t.external){let c=t.external.registry.get(s[0])?.id;if(e!==s[0]&&c){o(s);continue}}if(t.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1&&t.reused==="ref"){o(s);continue}}}function Vt(t,e){let n=t.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=a=>{let u=t.seen.get(a);if(u.ref===null)return;let c=u.def??u.schema,l={...c},d=u.ref;if(u.ref=null,d){i(d);let p=t.seen.get(d),h=p.schema;if(h.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(h)):Object.assign(c,h),Object.assign(c,l),a._zod.parent===d)for(let S in c)S==="$ref"||S==="allOf"||S in l||delete c[S];if(h.$ref&&p.def)for(let S in c)S==="$ref"||S==="allOf"||S in p.def&&JSON.stringify(c[S])===JSON.stringify(p.def[S])&&delete c[S]}let f=a._zod.parent;if(f&&f!==d){i(f);let p=t.seen.get(f);if(p?.schema.$ref&&(c.$ref=p.schema.$ref,p.def))for(let h in c)h==="$ref"||h==="allOf"||h in p.def&&JSON.stringify(c[h])===JSON.stringify(p.def[h])&&delete c[h]}t.override({zodSchema:a,jsonSchema:c,path:u.path??[]})};for(let a of[...t.seen.entries()].reverse())i(a[0]);let r={};if(t.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let a=t.external.registry.get(e)?.id;if(!a)throw new Error("Schema is missing an `id` property");r.$id=t.external.uri(a)}Object.assign(r,n.def??n.schema);let o=t.metadataRegistry.get(e)?.id;o!==void 0&&r.id===o&&delete r.id;let s=t.external?.defs??{};for(let a of t.seen.entries()){let u=a[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,s[u.defId]=u.def)}t.external||Object.keys(s).length>0&&(t.target==="draft-2020-12"?r.$defs=s:r.definitions=s);try{let a=JSON.parse(JSON.stringify(r));return Object.defineProperty(a,"~standard",{value:{...e["~standard"],jsonSchema:{input:Qr(e,"input",t.processors),output:Qr(e,"output",t.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function Oe(t,e){let n=e??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);let i=t._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return Oe(i.element,n);if(i.type==="set")return Oe(i.valueType,n);if(i.type==="lazy")return Oe(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return Oe(i.innerType,n);if(i.type==="intersection")return Oe(i.left,n)||Oe(i.right,n);if(i.type==="record"||i.type==="map")return Oe(i.keyType,n)||Oe(i.valueType,n);if(i.type==="pipe")return t._zod.traits.has("$ZodCodec")?!0:Oe(i.in,n)||Oe(i.out,n);if(i.type==="object"){for(let r in i.shape)if(Oe(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(Oe(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(Oe(r,n))return!0;return!!(i.rest&&Oe(i.rest,n))}return!1}var Wd,Qr,Qn=v(()=>{Kn();Wd=(t,e={})=>n=>{let i=Mt({...n,processors:e});return G(t,i),Ft(i,t),Vt(i,t)},Qr=(t,e,n={})=>i=>{let{libraryOptions:r,target:o}=i??{},s=Mt({...r??{},target:o,io:e,processors:n});return G(t,s),Ft(s,t),Vt(s,t)}});function ms(t,e){if("_idmap"in t){let i=t,r=Mt({...e,processors:fs}),o={};for(let u of i._idmap.entries()){let[c,l]=u;G(l,r)}let s={},a={registry:i,uri:e?.uri,defs:o};r.external=a;for(let u of i._idmap.entries()){let[c,l]=u;Ft(r,l),s[c]=Vt(r,l)}if(Object.keys(o).length>0){let u=r.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[u]:o}}return{schemas:s}}let n=Mt({...e,processors:fs});return G(t,n),Ft(n,t),Vt(n,t)}var L1,qd,Hd,Jd,Kd,Yd,Xd,Qd,ef,tf,rf,nf,of,sf,af,uf,cf,lf,df,ff,pf,hf,mf,gf,vf,yf,ps,_f,$f,bf,xf,wf,Sf,kf,If,Ef,Tf,Of,hs,Pf,fs,ei=v(()=>{Qn();N();L1={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},qd=(t,e,n,i)=>{let r=n;r.type="string";let{minimum:o,maximum:s,format:a,patterns:u,contentEncoding:c}=t._zod.bag;if(typeof o=="number"&&(r.minLength=o),typeof s=="number"&&(r.maxLength=s),a&&(r.format=L1[a]??a,r.format===""&&delete r.format,a==="time"&&delete r.format),c&&(r.contentEncoding=c),u&&u.size>0){let l=[...u];l.length===1?r.pattern=l[0].source:l.length>1&&(r.allOf=[...l.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Hd=(t,e,n,i)=>{let r=n,{minimum:o,maximum:s,format:a,multipleOf:u,exclusiveMaximum:c,exclusiveMinimum:l}=t._zod.bag;typeof a=="string"&&a.includes("int")?r.type="integer":r.type="number";let d=typeof l=="number"&&l>=(o??Number.NEGATIVE_INFINITY),f=typeof c=="number"&&c<=(s??Number.POSITIVE_INFINITY),p=e.target==="draft-04"||e.target==="openapi-3.0";d?p?(r.minimum=l,r.exclusiveMinimum=!0):r.exclusiveMinimum=l:typeof o=="number"&&(r.minimum=o),f?p?(r.maximum=c,r.exclusiveMaximum=!0):r.exclusiveMaximum=c:typeof s=="number"&&(r.maximum=s),typeof u=="number"&&(r.multipleOf=u)},Jd=(t,e,n,i)=>{n.type="boolean"},Kd=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Yd=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Xd=(t,e,n,i)=>{e.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Qd=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},ef=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},tf=(t,e,n,i)=>{n.not={}},rf=(t,e,n,i)=>{},nf=(t,e,n,i)=>{},of=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},sf=(t,e,n,i)=>{let r=t._zod.def,o=Nn(r.entries);o.every(s=>typeof s=="number")&&(n.type="number"),o.every(s=>typeof s=="string")&&(n.type="string"),n.enum=o},af=(t,e,n,i)=>{let r=t._zod.def,o=[];for(let s of r.values)if(s===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){let s=o[0];n.type=s===null?"null":typeof s,e.target==="draft-04"||e.target==="openapi-3.0"?n.enum=[s]:n.const=s}else o.every(s=>typeof s=="number")&&(n.type="number"),o.every(s=>typeof s=="string")&&(n.type="string"),o.every(s=>typeof s=="boolean")&&(n.type="boolean"),o.every(s=>s===null)&&(n.type="null"),n.enum=o},uf=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},cf=(t,e,n,i)=>{let r=n,o=t._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},lf=(t,e,n,i)=>{let r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:u}=t._zod.bag;s!==void 0&&(o.minLength=s),a!==void 0&&(o.maxLength=a),u?u.length===1?(o.contentMediaType=u[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=u.map(c=>({contentMediaType:c}))):Object.assign(r,o)},df=(t,e,n,i)=>{n.type="boolean"},ff=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},pf=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},hf=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},mf=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},gf=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},vf=(t,e,n,i)=>{let r=n,o=t._zod.def,{minimum:s,maximum:a}=t._zod.bag;typeof s=="number"&&(r.minItems=s),typeof a=="number"&&(r.maxItems=a),r.type="array",r.items=G(o.element,e,{...i,path:[...i.path,"items"]})},yf=(t,e,n,i)=>{let r=n,o=t._zod.def;r.type="object",r.properties={};let s=o.shape;for(let c in s)r.properties[c]=G(s[c],e,{...i,path:[...i.path,"properties",c]});let a=new Set(Object.keys(s)),u=new Set([...a].filter(c=>{let l=o.shape[c]._zod;return e.io==="input"?l.optin===void 0:l.optout===void 0}));u.size>0&&(r.required=Array.from(u)),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=G(o.catchall,e,{...i,path:[...i.path,"additionalProperties"]})):e.io==="output"&&(r.additionalProperties=!1)},ps=(t,e,n,i)=>{let r=t._zod.def,o=r.inclusive===!1,s=r.options.map((a,u)=>G(a,e,{...i,path:[...i.path,o?"oneOf":"anyOf",u]}));o?n.oneOf=s:n.anyOf=s},_f=(t,e,n,i)=>{let r=t._zod.def,o=G(r.left,e,{...i,path:[...i.path,"allOf",0]}),s=G(r.right,e,{...i,path:[...i.path,"allOf",1]}),a=c=>"allOf"in c&&Object.keys(c).length===1,u=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];n.allOf=u},$f=(t,e,n,i)=>{let r=n,o=t._zod.def;r.type="array";let s=e.target==="draft-2020-12"?"prefixItems":"items",a=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",u=o.items.map((f,p)=>G(f,e,{...i,path:[...i.path,s,p]})),c=o.rest?G(o.rest,e,{...i,path:[...i.path,a,...e.target==="openapi-3.0"?[o.items.length]:[]]}):null;e.target==="draft-2020-12"?(r.prefixItems=u,c&&(r.items=c)):e.target==="openapi-3.0"?(r.items={anyOf:u},c&&r.items.anyOf.push(c),r.minItems=u.length,c||(r.maxItems=u.length)):(r.items=u,c&&(r.additionalItems=c));let{minimum:l,maximum:d}=t._zod.bag;typeof l=="number"&&(r.minItems=l),typeof d=="number"&&(r.maxItems=d)},bf=(t,e,n,i)=>{let r=n,o=t._zod.def;r.type="object";let s=o.keyType,u=s._zod.bag?.patterns;if(o.mode==="loose"&&u&&u.size>0){let l=G(o.valueType,e,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let d of u)r.patternProperties[d.source]=l}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(r.propertyNames=G(o.keyType,e,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=G(o.valueType,e,{...i,path:[...i.path,"additionalProperties"]});let c=s._zod.values;if(c){let l=[...c].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(r.required=l)}},xf=(t,e,n,i)=>{let r=t._zod.def,o=G(r.innerType,e,i),s=e.seen.get(t);e.target==="openapi-3.0"?(s.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},wf=(t,e,n,i)=>{let r=t._zod.def;G(r.innerType,e,i);let o=e.seen.get(t);o.ref=r.innerType},Sf=(t,e,n,i)=>{let r=t._zod.def;G(r.innerType,e,i);let o=e.seen.get(t);o.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},kf=(t,e,n,i)=>{let r=t._zod.def;G(r.innerType,e,i);let o=e.seen.get(t);o.ref=r.innerType,e.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},If=(t,e,n,i)=>{let r=t._zod.def;G(r.innerType,e,i);let o=e.seen.get(t);o.ref=r.innerType;let s;try{s=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},Ef=(t,e,n,i)=>{let r=t._zod.def,o=r.in._zod.traits.has("$ZodTransform"),s=e.io==="input"?o?r.out:r.in:r.out;G(s,e,i);let a=e.seen.get(t);a.ref=s},Tf=(t,e,n,i)=>{let r=t._zod.def;G(r.innerType,e,i);let o=e.seen.get(t);o.ref=r.innerType,n.readOnly=!0},Of=(t,e,n,i)=>{let r=t._zod.def;G(r.innerType,e,i);let o=e.seen.get(t);o.ref=r.innerType},hs=(t,e,n,i)=>{let r=t._zod.def;G(r.innerType,e,i);let o=e.seen.get(t);o.ref=r.innerType},Pf=(t,e,n,i)=>{let r=t._zod.innerType;G(r,e,i);let o=e.seen.get(t);o.ref=r},fs={string:qd,number:Hd,boolean:Jd,bigint:Kd,symbol:Yd,null:Xd,undefined:Qd,void:ef,never:tf,any:rf,unknown:nf,date:of,enum:sf,literal:af,nan:uf,template_literal:cf,file:lf,success:df,custom:ff,function:pf,transform:hf,map:mf,set:gf,array:vf,object:yf,union:ps,intersection:_f,tuple:$f,record:bf,nullable:xf,nonoptional:wf,default:Sf,prefault:kf,catch:If,pipe:Ef,readonly:Tf,promise:Of,optional:hs,lazy:Pf}});var gs,Xy=v(()=>{ei();Qn();gs=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let n=e?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=Mt({processors:fs,target:n,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,n={path:[],schemaPath:[]}){return G(e,this.ctx,n)}emit(e,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),Ft(this.ctx,e);let i=Vt(this.ctx,e),{"~standard":r,...o}=i;return o}}});var Qy={};var e_=v(()=>{});var xt={};qe(xt,{$ZodAny:()=>xl,$ZodArray:()=>El,$ZodAsyncError:()=>ot,$ZodBase64:()=>fl,$ZodBase64URL:()=>pl,$ZodBigInt:()=>Ao,$ZodBigIntFormat:()=>yl,$ZodBoolean:()=>Gn,$ZodCIDRv4:()=>cl,$ZodCIDRv6:()=>ll,$ZodCUID:()=>Yc,$ZodCUID2:()=>Xc,$ZodCatch:()=>Gl,$ZodCheck:()=>X,$ZodCheckBigIntFormat:()=>kc,$ZodCheckEndsWith:()=>Lc,$ZodCheckGreaterThan:()=>ko,$ZodCheckIncludes:()=>Rc,$ZodCheckLengthEquals:()=>Cc,$ZodCheckLessThan:()=>So,$ZodCheckLowerCase:()=>zc,$ZodCheckMaxLength:()=>Oc,$ZodCheckMaxSize:()=>Ic,$ZodCheckMimeType:()=>Uc,$ZodCheckMinLength:()=>Pc,$ZodCheckMinSize:()=>Ec,$ZodCheckMultipleOf:()=>wc,$ZodCheckNumberFormat:()=>Sc,$ZodCheckOverwrite:()=>Mc,$ZodCheckProperty:()=>jc,$ZodCheckRegex:()=>Ac,$ZodCheckSizeEquals:()=>Tc,$ZodCheckStartsWith:()=>Dc,$ZodCheckStringFormat:()=>jr,$ZodCheckUpperCase:()=>Nc,$ZodCodec:()=>qn,$ZodCustom:()=>Ql,$ZodCustomStringFormat:()=>gl,$ZodDate:()=>Il,$ZodDefault:()=>Fl,$ZodDiscriminatedUnion:()=>Pl,$ZodE164:()=>hl,$ZodEmail:()=>qc,$ZodEmoji:()=>Jc,$ZodEncodeError:()=>zt,$ZodEnum:()=>Rl,$ZodError:()=>Un,$ZodExactOptional:()=>Ul,$ZodFile:()=>Ll,$ZodFunction:()=>Kl,$ZodGUID:()=>Gc,$ZodIPv4:()=>sl,$ZodIPv6:()=>al,$ZodISODate:()=>nl,$ZodISODateTime:()=>rl,$ZodISODuration:()=>ol,$ZodISOTime:()=>il,$ZodIntersection:()=>Cl,$ZodJWT:()=>ml,$ZodKSUID:()=>tl,$ZodLazy:()=>Xl,$ZodLiteral:()=>Dl,$ZodMAC:()=>ul,$ZodMap:()=>zl,$ZodNaN:()=>Wl,$ZodNanoID:()=>Kc,$ZodNever:()=>Sl,$ZodNonOptional:()=>Zl,$ZodNull:()=>bl,$ZodNullable:()=>Ml,$ZodNumber:()=>Co,$ZodNumberFormat:()=>vl,$ZodObject:()=>ev,$ZodObjectJIT:()=>Tl,$ZodOptional:()=>No,$ZodPipe:()=>Ro,$ZodPrefault:()=>Vl,$ZodPreprocess:()=>ql,$ZodPromise:()=>Yl,$ZodReadonly:()=>Hl,$ZodRealError:()=>Ne,$ZodRecord:()=>Al,$ZodRegistry:()=>Uo,$ZodSet:()=>Nl,$ZodString:()=>or,$ZodStringFormat:()=>H,$ZodSuccess:()=>Bl,$ZodSymbol:()=>_l,$ZodTemplateLiteral:()=>Jl,$ZodTransform:()=>jl,$ZodTuple:()=>zo,$ZodType:()=>L,$ZodULID:()=>Qc,$ZodURL:()=>Hc,$ZodUUID:()=>Wc,$ZodUndefined:()=>$l,$ZodUnion:()=>Wn,$ZodUnknown:()=>wl,$ZodVoid:()=>kl,$ZodXID:()=>el,$ZodXor:()=>Ol,$brand:()=>Pu,$constructor:()=>m,$input:()=>sd,$output:()=>od,Doc:()=>Bn,JSONSchema:()=>Qy,JSONSchemaGenerator:()=>gs,NEVER:()=>Ou,TimePrecision:()=>ld,_any:()=>Cd,_array:()=>jd,_base64:()=>ns,_base64url:()=>is,_bigint:()=>Sd,_boolean:()=>xd,_catch:()=>C1,_check:()=>Ky,_cidrv4:()=>ts,_cidrv6:()=>rs,_coercedBigint:()=>kd,_coercedBoolean:()=>wd,_coercedDate:()=>Dd,_coercedNumber:()=>gd,_coercedString:()=>ud,_cuid:()=>Ho,_cuid2:()=>Jo,_custom:()=>Md,_date:()=>Rd,_decode:()=>ho,_decodeAsync:()=>go,_default:()=>T1,_discriminatedUnion:()=>g1,_e164:()=>os,_email:()=>Fo,_emoji:()=>Wo,_encode:()=>po,_encodeAsync:()=>mo,_endsWith:()=>Gr,_enum:()=>x1,_file:()=>Ud,_float32:()=>yd,_float64:()=>_d,_gt:()=>dt,_gte:()=>Te,_guid:()=>Yn,_includes:()=>Zr,_int:()=>vd,_int32:()=>$d,_int64:()=>Id,_intersection:()=>v1,_ipv4:()=>Qo,_ipv6:()=>es,_isoDate:()=>fd,_isoDateTime:()=>dd,_isoDuration:()=>hd,_isoTime:()=>pd,_jwt:()=>ss,_ksuid:()=>Xo,_lazy:()=>R1,_length:()=>ur,_literal:()=>S1,_lowercase:()=>Fr,_lt:()=>lt,_lte:()=>Ve,_mac:()=>cd,_map:()=>$1,_max:()=>Ve,_maxLength:()=>ar,_maxSize:()=>Ut,_mime:()=>Wr,_min:()=>Te,_minLength:()=>bt,_minSize:()=>ft,_multipleOf:()=>jt,_nan:()=>Ld,_nanoid:()=>qo,_nativeEnum:()=>w1,_negative:()=>us,_never:()=>zd,_nonnegative:()=>ls,_nonoptional:()=>O1,_nonpositive:()=>cs,_normalize:()=>qr,_null:()=>Pd,_nullable:()=>E1,_number:()=>md,_optional:()=>I1,_overwrite:()=>st,_parse:()=>Nr,_parseAsync:()=>Rr,_pipe:()=>A1,_positive:()=>as,_promise:()=>D1,_property:()=>ds,_readonly:()=>z1,_record:()=>_1,_refine:()=>Fd,_regex:()=>Mr,_safeDecode:()=>yo,_safeDecodeAsync:()=>$o,_safeEncode:()=>vo,_safeEncodeAsync:()=>_o,_safeParse:()=>Dr,_safeParseAsync:()=>Lr,_set:()=>b1,_size:()=>sr,_slugify:()=>Yr,_startsWith:()=>Br,_string:()=>ad,_stringFormat:()=>Xr,_stringbool:()=>Gd,_success:()=>P1,_superRefine:()=>Vd,_symbol:()=>Td,_templateLiteral:()=>N1,_toLowerCase:()=>Jr,_toUpperCase:()=>Kr,_transform:()=>k1,_trim:()=>Hr,_tuple:()=>y1,_uint32:()=>bd,_uint64:()=>Ed,_ulid:()=>Ko,_undefined:()=>Od,_union:()=>h1,_unknown:()=>Ad,_uppercase:()=>Vr,_url:()=>Xn,_uuid:()=>Vo,_uuidv4:()=>Zo,_uuidv6:()=>Bo,_uuidv7:()=>Go,_void:()=>Nd,_xid:()=>Yo,_xor:()=>m1,clone:()=>Ie,config:()=>oe,createStandardJSONSchemaMethod:()=>Qr,createToJSONSchemaMethod:()=>Wd,decode:()=>DI,decodeAsync:()=>jI,describe:()=>Zd,encode:()=>RI,encodeAsync:()=>LI,extractDefs:()=>Ft,finalize:()=>Vt,flattenError:()=>Mn,formatError:()=>Fn,globalConfig:()=>tr,globalRegistry:()=>ve,initializeContext:()=>Mt,isValidBase64:()=>dl,isValidBase64URL:()=>Kg,isValidJWT:()=>Yg,locales:()=>Jn,meta:()=>Bd,parse:()=>lo,parseAsync:()=>fo,prettifyError:()=>Zu,process:()=>G,regexes:()=>Fe,registry:()=>Mo,safeDecode:()=>MI,safeDecodeAsync:()=>VI,safeEncode:()=>UI,safeEncodeAsync:()=>FI,safeParse:()=>Gu,safeParseAsync:()=>Wu,toDotPath:()=>Og,toJSONSchema:()=>ms,treeifyError:()=>Vu,util:()=>x,version:()=>Vc});var Ze=v(()=>{rr();qu();Bu();ed();Io();Zc();N();wo();id();Kn();Fc();Yy();Qn();ei();Xy();e_()});var vs={};qe(vs,{endsWith:()=>Gr,gt:()=>dt,gte:()=>Te,includes:()=>Zr,length:()=>ur,lowercase:()=>Fr,lt:()=>lt,lte:()=>Ve,maxLength:()=>ar,maxSize:()=>Ut,mime:()=>Wr,minLength:()=>bt,minSize:()=>ft,multipleOf:()=>jt,negative:()=>us,nonnegative:()=>ls,nonpositive:()=>cs,normalize:()=>qr,overwrite:()=>st,positive:()=>as,property:()=>ds,regex:()=>Mr,size:()=>sr,slugify:()=>Yr,startsWith:()=>Br,toLowerCase:()=>Jr,toUpperCase:()=>Kr,trim:()=>Hr,uppercase:()=>Vr});var ys=v(()=>{Ze()});var en={};qe(en,{ZodISODate:()=>$s,ZodISODateTime:()=>_s,ZodISODuration:()=>xs,ZodISOTime:()=>bs,date:()=>Af,datetime:()=>Cf,duration:()=>Nf,time:()=>zf});function Cf(t){return dd(_s,t)}function Af(t){return fd($s,t)}function zf(t){return pd(bs,t)}function Nf(t){return hd(xs,t)}var _s,$s,bs,xs,ti=v(()=>{Ze();ni();_s=m("ZodISODateTime",(t,e)=>{rl.init(t,e),J.init(t,e)});$s=m("ZodISODate",(t,e)=>{nl.init(t,e),J.init(t,e)});bs=m("ZodISOTime",(t,e)=>{il.init(t,e),J.init(t,e)});xs=m("ZodISODuration",(t,e)=>{ol.init(t,e),J.init(t,e)})});var t_,U1,Re,Rf=v(()=>{Ze();Ze();N();t_=(t,e)=>{Un.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:n=>Fn(t,n)},flatten:{value:n=>Mn(t,n)},addIssue:{value:n=>{t.issues.push(n),t.message=JSON.stringify(t.issues,Cr,2)}},addIssues:{value:n=>{t.issues.push(...n),t.message=JSON.stringify(t.issues,Cr,2)}},isEmpty:{get(){return t.issues.length===0}}})},U1=m("ZodError",t_),Re=m("ZodError",t_,{Parent:Error})});var Df,Lf,jf,Uf,Mf,Ff,Vf,Zf,Bf,Gf,Wf,qf,Hf=v(()=>{Ze();Rf();Df=Nr(Re),Lf=Rr(Re),jf=Dr(Re),Uf=Lr(Re),Mf=po(Re),Ff=ho(Re),Vf=mo(Re),Zf=go(Re),Bf=vo(Re),Gf=yo(Re),Wf=_o(Re),qf=$o(Re)});var ri={};qe(ri,{ZodAny:()=>rp,ZodArray:()=>sp,ZodBase64:()=>js,ZodBase64URL:()=>Us,ZodBigInt:()=>un,ZodBigIntFormat:()=>Vs,ZodBoolean:()=>an,ZodCIDRv4:()=>Ds,ZodCIDRv6:()=>Ls,ZodCUID:()=>Os,ZodCUID2:()=>Ps,ZodCatch:()=>Tp,ZodCodec:()=>mi,ZodCustom:()=>gi,ZodCustomStringFormat:()=>on,ZodDate:()=>li,ZodDefault:()=>xp,ZodDiscriminatedUnion:()=>up,ZodE164:()=>Ms,ZodEmail:()=>Is,ZodEmoji:()=>Es,ZodEnum:()=>rn,ZodExactOptional:()=>_p,ZodFile:()=>vp,ZodFunction:()=>jp,ZodGUID:()=>oi,ZodIPv4:()=>Ns,ZodIPv6:()=>Rs,ZodIntersection:()=>cp,ZodJWT:()=>Fs,ZodKSUID:()=>zs,ZodLazy:()=>Rp,ZodLiteral:()=>gp,ZodMAC:()=>Jf,ZodMap:()=>hp,ZodNaN:()=>Pp,ZodNanoID:()=>Ts,ZodNever:()=>ip,ZodNonOptional:()=>Hs,ZodNull:()=>ep,ZodNullable:()=>bp,ZodNumber:()=>sn,ZodNumberFormat:()=>lr,ZodObject:()=>fi,ZodOptional:()=>qs,ZodPipe:()=>hi,ZodPrefault:()=>Sp,ZodPreprocess:()=>Cp,ZodPromise:()=>Lp,ZodReadonly:()=>Ap,ZodRecord:()=>tn,ZodSet:()=>mp,ZodString:()=>nn,ZodStringFormat:()=>J,ZodSuccess:()=>Ep,ZodSymbol:()=>Xf,ZodTemplateLiteral:()=>Np,ZodTransform:()=>yp,ZodTuple:()=>dp,ZodType:()=>U,ZodULID:()=>Cs,ZodURL:()=>ci,ZodUUID:()=>pt,ZodUndefined:()=>Qf,ZodUnion:()=>pi,ZodUnknown:()=>np,ZodVoid:()=>op,ZodXID:()=>As,ZodXor:()=>ap,_ZodString:()=>ks,_default:()=>wp,_function:()=>c$,any:()=>M_,array:()=>di,base64:()=>w_,base64url:()=>S_,bigint:()=>R_,boolean:()=>Yf,catch:()=>Op,check:()=>l$,cidrv4:()=>b_,cidrv6:()=>x_,codec:()=>o$,cuid:()=>p_,cuid2:()=>h_,custom:()=>d$,date:()=>V_,describe:()=>f$,discriminatedUnion:()=>H_,e164:()=>k_,email:()=>n_,emoji:()=>d_,enum:()=>Gs,exactOptional:()=>$p,file:()=>t$,float32:()=>C_,float64:()=>A_,function:()=>c$,guid:()=>i_,hash:()=>P_,hex:()=>O_,hostname:()=>T_,httpUrl:()=>l_,instanceof:()=>h$,int:()=>ws,int32:()=>z_,int64:()=>D_,intersection:()=>lp,invertCodec:()=>s$,ipv4:()=>y_,ipv6:()=>$_,json:()=>g$,jwt:()=>I_,keyof:()=>Z_,ksuid:()=>v_,lazy:()=>Dp,literal:()=>e$,looseObject:()=>W_,looseRecord:()=>K_,mac:()=>__,map:()=>Y_,meta:()=>p$,nan:()=>i$,nanoid:()=>f_,nativeEnum:()=>Q_,never:()=>Zs,nonoptional:()=>Ip,null:()=>tp,nullable:()=>ai,nullish:()=>r$,number:()=>Kf,object:()=>B_,optional:()=>si,partialRecord:()=>J_,pipe:()=>Ss,prefault:()=>kp,preprocess:()=>v$,promise:()=>u$,readonly:()=>zp,record:()=>pp,refine:()=>Up,set:()=>X_,strictObject:()=>G_,string:()=>ii,stringFormat:()=>E_,stringbool:()=>m$,success:()=>n$,superRefine:()=>Mp,symbol:()=>j_,templateLiteral:()=>a$,transform:()=>Ws,tuple:()=>fp,uint32:()=>N_,uint64:()=>L_,ulid:()=>m_,undefined:()=>U_,union:()=>Bs,unknown:()=>cr,url:()=>c_,uuid:()=>o_,uuidv4:()=>s_,uuidv6:()=>a_,uuidv7:()=>u_,void:()=>F_,xid:()=>g_,xor:()=>q_});function ui(t,e,n){let i=Object.getPrototypeOf(t),r=r_.get(i);if(r||(r=new Set,r_.set(i,r)),!r.has(e)){r.add(e);for(let o in n){let s=n[o];Object.defineProperty(i,o,{configurable:!0,enumerable:!1,get(){let a=s.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}}function ii(t){return ad(nn,t)}function n_(t){return Fo(Is,t)}function i_(t){return Yn(oi,t)}function o_(t){return Vo(pt,t)}function s_(t){return Zo(pt,t)}function a_(t){return Bo(pt,t)}function u_(t){return Go(pt,t)}function c_(t){return Xn(ci,t)}function l_(t){return Xn(ci,{protocol:Fe.httpProtocol,hostname:Fe.domain,...x.normalizeParams(t)})}function d_(t){return Wo(Es,t)}function f_(t){return qo(Ts,t)}function p_(t){return Ho(Os,t)}function h_(t){return Jo(Ps,t)}function m_(t){return Ko(Cs,t)}function g_(t){return Yo(As,t)}function v_(t){return Xo(zs,t)}function y_(t){return Qo(Ns,t)}function __(t){return cd(Jf,t)}function $_(t){return es(Rs,t)}function b_(t){return ts(Ds,t)}function x_(t){return rs(Ls,t)}function w_(t){return ns(js,t)}function S_(t){return is(Us,t)}function k_(t){return os(Ms,t)}function I_(t){return ss(Fs,t)}function E_(t,e,n={}){return Xr(on,t,e,n)}function T_(t){return Xr(on,"hostname",Fe.hostname,t)}function O_(t){return Xr(on,"hex",Fe.hex,t)}function P_(t,e){let n=e?.enc??"hex",i=`${t}_${n}`,r=Fe[i];if(!r)throw new Error(`Unrecognized hash format: ${i}`);return Xr(on,i,r,e)}function Kf(t){return md(sn,t)}function ws(t){return vd(lr,t)}function C_(t){return yd(lr,t)}function A_(t){return _d(lr,t)}function z_(t){return $d(lr,t)}function N_(t){return bd(lr,t)}function Yf(t){return xd(an,t)}function R_(t){return Sd(un,t)}function D_(t){return Id(Vs,t)}function L_(t){return Ed(Vs,t)}function j_(t){return Td(Xf,t)}function U_(t){return Od(Qf,t)}function tp(t){return Pd(ep,t)}function M_(){return Cd(rp)}function cr(){return Ad(np)}function Zs(t){return zd(ip,t)}function F_(t){return Nd(op,t)}function V_(t){return Rd(li,t)}function di(t,e){return jd(sp,t,e)}function Z_(t){let e=t._zod.def.shape;return Gs(Object.keys(e))}function B_(t,e){let n={type:"object",shape:t??{},...x.normalizeParams(e)};return new fi(n)}function G_(t,e){return new fi({type:"object",shape:t,catchall:Zs(),...x.normalizeParams(e)})}function W_(t,e){return new fi({type:"object",shape:t,catchall:cr(),...x.normalizeParams(e)})}function Bs(t,e){return new pi({type:"union",options:t,...x.normalizeParams(e)})}function q_(t,e){return new ap({type:"union",options:t,inclusive:!1,...x.normalizeParams(e)})}function H_(t,e,n){return new up({type:"union",options:e,discriminator:t,...x.normalizeParams(n)})}function lp(t,e){return new cp({type:"intersection",left:t,right:e})}function fp(t,e,n){let i=e instanceof L,r=i?n:e,o=i?e:null;return new dp({type:"tuple",items:t,rest:o,...x.normalizeParams(r)})}function pp(t,e,n){return!e||!e._zod?new tn({type:"record",keyType:ii(),valueType:t,...x.normalizeParams(e)}):new tn({type:"record",keyType:t,valueType:e,...x.normalizeParams(n)})}function J_(t,e,n){let i=Ie(t);return i._zod.values=void 0,new tn({type:"record",keyType:i,valueType:e,...x.normalizeParams(n)})}function K_(t,e,n){return new tn({type:"record",keyType:t,valueType:e,mode:"loose",...x.normalizeParams(n)})}function Y_(t,e,n){return new hp({type:"map",keyType:t,valueType:e,...x.normalizeParams(n)})}function X_(t,e){return new mp({type:"set",valueType:t,...x.normalizeParams(e)})}function Gs(t,e){let n=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new rn({type:"enum",entries:n,...x.normalizeParams(e)})}function Q_(t,e){return new rn({type:"enum",entries:t,...x.normalizeParams(e)})}function e$(t,e){return new gp({type:"literal",values:Array.isArray(t)?t:[t],...x.normalizeParams(e)})}function t$(t){return Ud(vp,t)}function Ws(t){return new yp({type:"transform",transform:t})}function si(t){return new qs({type:"optional",innerType:t})}function $p(t){return new _p({type:"optional",innerType:t})}function ai(t){return new bp({type:"nullable",innerType:t})}function r$(t){return si(ai(t))}function wp(t,e){return new xp({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():x.shallowClone(e)}})}function kp(t,e){return new Sp({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():x.shallowClone(e)}})}function Ip(t,e){return new Hs({type:"nonoptional",innerType:t,...x.normalizeParams(e)})}function n$(t){return new Ep({type:"success",innerType:t})}function Op(t,e){return new Tp({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}function i$(t){return Ld(Pp,t)}function Ss(t,e){return new hi({type:"pipe",in:t,out:e})}function o$(t,e,n){return new mi({type:"pipe",in:t,out:e,transform:n.decode,reverseTransform:n.encode})}function s$(t){let e=t._zod.def;return new mi({type:"pipe",in:e.out,out:e.in,transform:e.reverseTransform,reverseTransform:e.transform})}function zp(t){return new Ap({type:"readonly",innerType:t})}function a$(t,e){return new Np({type:"template_literal",parts:t,...x.normalizeParams(e)})}function Dp(t){return new Rp({type:"lazy",getter:t})}function u$(t){return new Lp({type:"promise",innerType:t})}function c$(t){return new jp({type:"function",input:Array.isArray(t?.input)?fp(t?.input):t?.input??di(cr()),output:t?.output??cr()})}function l$(t){let e=new X({check:"custom"});return e._zod.check=t,e}function d$(t,e){return Md(gi,t??(()=>!0),e)}function Up(t,e={}){return Fd(gi,t,e)}function Mp(t,e){return Vd(t,e)}function h$(t,e={}){let n=new gi({type:"custom",check:"custom",fn:i=>i instanceof t,abort:!0,...x.normalizeParams(e)});return n._zod.bag.Class=t,n._zod.check=i=>{i.value instanceof t||i.issues.push({code:"invalid_type",expected:t.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}function g$(t){let e=Dp(()=>Bs([ii(t),Kf(),Yf(),tp(),di(e),pp(ii(),e)]));return e}function v$(t,e){return new Cp({type:"pipe",in:Ws(t),out:e})}var r_,U,ks,nn,J,Is,oi,pt,ci,Es,Ts,Os,Ps,Cs,As,zs,Ns,Jf,Rs,Ds,Ls,js,Us,Ms,Fs,on,sn,lr,an,un,Vs,Xf,Qf,ep,rp,np,ip,op,li,sp,fi,pi,ap,up,cp,dp,tn,hp,mp,rn,gp,vp,yp,qs,_p,bp,xp,Sp,Hs,Ep,Tp,Pp,hi,mi,Cp,Ap,Np,Rp,Lp,jp,gi,f$,p$,m$,ni=v(()=>{Ze();Ze();ei();Qn();ys();ti();Hf();r_=new WeakMap;U=m("ZodType",(t,e)=>(L.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:Qr(t,"input"),output:Qr(t,"output")}}),t.toJSONSchema=Wd(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.parse=(n,i)=>Df(t,n,i,{callee:t.parse}),t.safeParse=(n,i)=>jf(t,n,i),t.parseAsync=async(n,i)=>Lf(t,n,i,{callee:t.parseAsync}),t.safeParseAsync=async(n,i)=>Uf(t,n,i),t.spa=t.safeParseAsync,t.encode=(n,i)=>Mf(t,n,i),t.decode=(n,i)=>Ff(t,n,i),t.encodeAsync=async(n,i)=>Vf(t,n,i),t.decodeAsync=async(n,i)=>Zf(t,n,i),t.safeEncode=(n,i)=>Bf(t,n,i),t.safeDecode=(n,i)=>Gf(t,n,i),t.safeEncodeAsync=async(n,i)=>Wf(t,n,i),t.safeDecodeAsync=async(n,i)=>qf(t,n,i),ui(t,"ZodType",{check(...n){let i=this.def;return this.clone(x.mergeDefs(i,{checks:[...i.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,i){return Ie(this,n,i)},brand(){return this},register(n,i){return n.add(this,i),this},refine(n,i){return this.check(Up(n,i))},superRefine(n,i){return this.check(Mp(n,i))},overwrite(n){return this.check(st(n))},optional(){return si(this)},exactOptional(){return $p(this)},nullable(){return ai(this)},nullish(){return si(ai(this))},nonoptional(n){return Ip(this,n)},array(){return di(this)},or(n){return Bs([this,n])},and(n){return lp(this,n)},transform(n){return Ss(this,Ws(n))},default(n){return wp(this,n)},prefault(n){return kp(this,n)},catch(n){return Op(this,n)},pipe(n){return Ss(this,n)},readonly(){return zp(this)},describe(n){let i=this.clone();return ve.add(i,{description:n}),i},meta(...n){if(n.length===0)return ve.get(this);let i=this.clone();return ve.add(i,n[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(t,"description",{get(){return ve.get(t)?.description},configurable:!0}),t)),ks=m("_ZodString",(t,e)=>{or.init(t,e),U.init(t,e),t._zod.processJSONSchema=(i,r,o)=>qd(t,i,r,o);let n=t._zod.bag;t.format=n.format??null,t.minLength=n.minimum??null,t.maxLength=n.maximum??null,ui(t,"_ZodString",{regex(...i){return this.check(Mr(...i))},includes(...i){return this.check(Zr(...i))},startsWith(...i){return this.check(Br(...i))},endsWith(...i){return this.check(Gr(...i))},min(...i){return this.check(bt(...i))},max(...i){return this.check(ar(...i))},length(...i){return this.check(ur(...i))},nonempty(...i){return this.check(bt(1,...i))},lowercase(i){return this.check(Fr(i))},uppercase(i){return this.check(Vr(i))},trim(){return this.check(Hr())},normalize(...i){return this.check(qr(...i))},toLowerCase(){return this.check(Jr())},toUpperCase(){return this.check(Kr())},slugify(){return this.check(Yr())}})}),nn=m("ZodString",(t,e)=>{or.init(t,e),ks.init(t,e),t.email=n=>t.check(Fo(Is,n)),t.url=n=>t.check(Xn(ci,n)),t.jwt=n=>t.check(ss(Fs,n)),t.emoji=n=>t.check(Wo(Es,n)),t.guid=n=>t.check(Yn(oi,n)),t.uuid=n=>t.check(Vo(pt,n)),t.uuidv4=n=>t.check(Zo(pt,n)),t.uuidv6=n=>t.check(Bo(pt,n)),t.uuidv7=n=>t.check(Go(pt,n)),t.nanoid=n=>t.check(qo(Ts,n)),t.guid=n=>t.check(Yn(oi,n)),t.cuid=n=>t.check(Ho(Os,n)),t.cuid2=n=>t.check(Jo(Ps,n)),t.ulid=n=>t.check(Ko(Cs,n)),t.base64=n=>t.check(ns(js,n)),t.base64url=n=>t.check(is(Us,n)),t.xid=n=>t.check(Yo(As,n)),t.ksuid=n=>t.check(Xo(zs,n)),t.ipv4=n=>t.check(Qo(Ns,n)),t.ipv6=n=>t.check(es(Rs,n)),t.cidrv4=n=>t.check(ts(Ds,n)),t.cidrv6=n=>t.check(rs(Ls,n)),t.e164=n=>t.check(os(Ms,n)),t.datetime=n=>t.check(Cf(n)),t.date=n=>t.check(Af(n)),t.time=n=>t.check(zf(n)),t.duration=n=>t.check(Nf(n))});J=m("ZodStringFormat",(t,e)=>{H.init(t,e),ks.init(t,e)}),Is=m("ZodEmail",(t,e)=>{qc.init(t,e),J.init(t,e)});oi=m("ZodGUID",(t,e)=>{Gc.init(t,e),J.init(t,e)});pt=m("ZodUUID",(t,e)=>{Wc.init(t,e),J.init(t,e)});ci=m("ZodURL",(t,e)=>{Hc.init(t,e),J.init(t,e)});Es=m("ZodEmoji",(t,e)=>{Jc.init(t,e),J.init(t,e)});Ts=m("ZodNanoID",(t,e)=>{Kc.init(t,e),J.init(t,e)});Os=m("ZodCUID",(t,e)=>{Yc.init(t,e),J.init(t,e)});Ps=m("ZodCUID2",(t,e)=>{Xc.init(t,e),J.init(t,e)});Cs=m("ZodULID",(t,e)=>{Qc.init(t,e),J.init(t,e)});As=m("ZodXID",(t,e)=>{el.init(t,e),J.init(t,e)});zs=m("ZodKSUID",(t,e)=>{tl.init(t,e),J.init(t,e)});Ns=m("ZodIPv4",(t,e)=>{sl.init(t,e),J.init(t,e)});Jf=m("ZodMAC",(t,e)=>{ul.init(t,e),J.init(t,e)});Rs=m("ZodIPv6",(t,e)=>{al.init(t,e),J.init(t,e)});Ds=m("ZodCIDRv4",(t,e)=>{cl.init(t,e),J.init(t,e)});Ls=m("ZodCIDRv6",(t,e)=>{ll.init(t,e),J.init(t,e)});js=m("ZodBase64",(t,e)=>{fl.init(t,e),J.init(t,e)});Us=m("ZodBase64URL",(t,e)=>{pl.init(t,e),J.init(t,e)});Ms=m("ZodE164",(t,e)=>{hl.init(t,e),J.init(t,e)});Fs=m("ZodJWT",(t,e)=>{ml.init(t,e),J.init(t,e)});on=m("ZodCustomStringFormat",(t,e)=>{gl.init(t,e),J.init(t,e)});sn=m("ZodNumber",(t,e)=>{Co.init(t,e),U.init(t,e),t._zod.processJSONSchema=(i,r,o)=>Hd(t,i,r,o),ui(t,"ZodNumber",{gt(i,r){return this.check(dt(i,r))},gte(i,r){return this.check(Te(i,r))},min(i,r){return this.check(Te(i,r))},lt(i,r){return this.check(lt(i,r))},lte(i,r){return this.check(Ve(i,r))},max(i,r){return this.check(Ve(i,r))},int(i){return this.check(ws(i))},safe(i){return this.check(ws(i))},positive(i){return this.check(dt(0,i))},nonnegative(i){return this.check(Te(0,i))},negative(i){return this.check(lt(0,i))},nonpositive(i){return this.check(Ve(0,i))},multipleOf(i,r){return this.check(jt(i,r))},step(i,r){return this.check(jt(i,r))},finite(){return this}});let n=t._zod.bag;t.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),t.isFinite=!0,t.format=n.format??null});lr=m("ZodNumberFormat",(t,e)=>{vl.init(t,e),sn.init(t,e)});an=m("ZodBoolean",(t,e)=>{Gn.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Jd(t,n,i,r)});un=m("ZodBigInt",(t,e)=>{Ao.init(t,e),U.init(t,e),t._zod.processJSONSchema=(i,r,o)=>Kd(t,i,r,o),t.gte=(i,r)=>t.check(Te(i,r)),t.min=(i,r)=>t.check(Te(i,r)),t.gt=(i,r)=>t.check(dt(i,r)),t.gte=(i,r)=>t.check(Te(i,r)),t.min=(i,r)=>t.check(Te(i,r)),t.lt=(i,r)=>t.check(lt(i,r)),t.lte=(i,r)=>t.check(Ve(i,r)),t.max=(i,r)=>t.check(Ve(i,r)),t.positive=i=>t.check(dt(BigInt(0),i)),t.negative=i=>t.check(lt(BigInt(0),i)),t.nonpositive=i=>t.check(Ve(BigInt(0),i)),t.nonnegative=i=>t.check(Te(BigInt(0),i)),t.multipleOf=(i,r)=>t.check(jt(i,r));let n=t._zod.bag;t.minValue=n.minimum??null,t.maxValue=n.maximum??null,t.format=n.format??null});Vs=m("ZodBigIntFormat",(t,e)=>{yl.init(t,e),un.init(t,e)});Xf=m("ZodSymbol",(t,e)=>{_l.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Yd(t,n,i,r)});Qf=m("ZodUndefined",(t,e)=>{$l.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Qd(t,n,i,r)});ep=m("ZodNull",(t,e)=>{bl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Xd(t,n,i,r)});rp=m("ZodAny",(t,e)=>{xl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>rf(t,n,i,r)});np=m("ZodUnknown",(t,e)=>{wl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>nf(t,n,i,r)});ip=m("ZodNever",(t,e)=>{Sl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>tf(t,n,i,r)});op=m("ZodVoid",(t,e)=>{kl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>ef(t,n,i,r)});li=m("ZodDate",(t,e)=>{Il.init(t,e),U.init(t,e),t._zod.processJSONSchema=(i,r,o)=>of(t,i,r,o),t.min=(i,r)=>t.check(Te(i,r)),t.max=(i,r)=>t.check(Ve(i,r));let n=t._zod.bag;t.minDate=n.minimum?new Date(n.minimum):null,t.maxDate=n.maximum?new Date(n.maximum):null});sp=m("ZodArray",(t,e)=>{El.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>vf(t,n,i,r),t.element=e.element,ui(t,"ZodArray",{min(n,i){return this.check(bt(n,i))},nonempty(n){return this.check(bt(1,n))},max(n,i){return this.check(ar(n,i))},length(n,i){return this.check(ur(n,i))},unwrap(){return this.element}})});fi=m("ZodObject",(t,e)=>{Tl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>yf(t,n,i,r),x.defineLazy(t,"shape",()=>e.shape),ui(t,"ZodObject",{keyof(){return Gs(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:cr()})},loose(){return this.clone({...this._zod.def,catchall:cr()})},strict(){return this.clone({...this._zod.def,catchall:Zs()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return x.extend(this,n)},safeExtend(n){return x.safeExtend(this,n)},merge(n){return x.merge(this,n)},pick(n){return x.pick(this,n)},omit(n){return x.omit(this,n)},partial(...n){return x.partial(qs,this,n[0])},required(...n){return x.required(Hs,this,n[0])}})});pi=m("ZodUnion",(t,e)=>{Wn.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>ps(t,n,i,r),t.options=e.options});ap=m("ZodXor",(t,e)=>{pi.init(t,e),Ol.init(t,e),t._zod.processJSONSchema=(n,i,r)=>ps(t,n,i,r),t.options=e.options});up=m("ZodDiscriminatedUnion",(t,e)=>{pi.init(t,e),Pl.init(t,e)});cp=m("ZodIntersection",(t,e)=>{Cl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>_f(t,n,i,r)});dp=m("ZodTuple",(t,e)=>{zo.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>$f(t,n,i,r),t.rest=n=>t.clone({...t._zod.def,rest:n})});tn=m("ZodRecord",(t,e)=>{Al.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>bf(t,n,i,r),t.keyType=e.keyType,t.valueType=e.valueType});hp=m("ZodMap",(t,e)=>{zl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>mf(t,n,i,r),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...n)=>t.check(ft(...n)),t.nonempty=n=>t.check(ft(1,n)),t.max=(...n)=>t.check(Ut(...n)),t.size=(...n)=>t.check(sr(...n))});mp=m("ZodSet",(t,e)=>{Nl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>gf(t,n,i,r),t.min=(...n)=>t.check(ft(...n)),t.nonempty=n=>t.check(ft(1,n)),t.max=(...n)=>t.check(Ut(...n)),t.size=(...n)=>t.check(sr(...n))});rn=m("ZodEnum",(t,e)=>{Rl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(i,r,o)=>sf(t,i,r,o),t.enum=e.entries,t.options=Object.values(e.entries);let n=new Set(Object.keys(e.entries));t.extract=(i,r)=>{let o={};for(let s of i)if(n.has(s))o[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new rn({...e,checks:[],...x.normalizeParams(r),entries:o})},t.exclude=(i,r)=>{let o={...e.entries};for(let s of i)if(n.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new rn({...e,checks:[],...x.normalizeParams(r),entries:o})}});gp=m("ZodLiteral",(t,e)=>{Dl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>af(t,n,i,r),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]}})});vp=m("ZodFile",(t,e)=>{Ll.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>lf(t,n,i,r),t.min=(n,i)=>t.check(ft(n,i)),t.max=(n,i)=>t.check(Ut(n,i)),t.mime=(n,i)=>t.check(Wr(Array.isArray(n)?n:[n],i))});yp=m("ZodTransform",(t,e)=>{jl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>hf(t,n,i,r),t._zod.parse=(n,i)=>{if(i.direction==="backward")throw new zt(t.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(x.issue(o,n.value,e));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),n.issues.push(x.issue(s))}};let r=e.transform(n.value,n);return r instanceof Promise?r.then(o=>(n.value=o,n.fallback=!0,n)):(n.value=r,n.fallback=!0,n)}});qs=m("ZodOptional",(t,e)=>{No.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>hs(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});_p=m("ZodExactOptional",(t,e)=>{Ul.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>hs(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});bp=m("ZodNullable",(t,e)=>{Ml.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>xf(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});xp=m("ZodDefault",(t,e)=>{Fl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Sf(t,n,i,r),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});Sp=m("ZodPrefault",(t,e)=>{Vl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>kf(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});Hs=m("ZodNonOptional",(t,e)=>{Zl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>wf(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});Ep=m("ZodSuccess",(t,e)=>{Bl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>df(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});Tp=m("ZodCatch",(t,e)=>{Gl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>If(t,n,i,r),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});Pp=m("ZodNaN",(t,e)=>{Wl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>uf(t,n,i,r)});hi=m("ZodPipe",(t,e)=>{Ro.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Ef(t,n,i,r),t.in=e.in,t.out=e.out});mi=m("ZodCodec",(t,e)=>{hi.init(t,e),qn.init(t,e)});Cp=m("ZodPreprocess",(t,e)=>{hi.init(t,e),ql.init(t,e)}),Ap=m("ZodReadonly",(t,e)=>{Hl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Tf(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});Np=m("ZodTemplateLiteral",(t,e)=>{Jl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>cf(t,n,i,r)});Rp=m("ZodLazy",(t,e)=>{Xl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Pf(t,n,i,r),t.unwrap=()=>t._zod.def.getter()});Lp=m("ZodPromise",(t,e)=>{Yl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Of(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});jp=m("ZodFunction",(t,e)=>{Kl.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>pf(t,n,i,r)});gi=m("ZodCustom",(t,e)=>{Ql.init(t,e),U.init(t,e),t._zod.processJSONSchema=(n,i,r)=>ff(t,n,i,r)});f$=Zd,p$=Bd;m$=(...t)=>Gd({Codec:mi,Boolean:an,String:nn},...t)});function V1(t){oe({customError:t})}function Z1(){return oe().customError}var F1,Fp,y$=v(()=>{Ze();F1={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"};Fp||(Fp={})});function G1(t,e){let n=t.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":e??"draft-2020-12"}function W1(t,e){if(!t.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=t.slice(1).split("/").filter(Boolean);if(n.length===0)return e.rootSchema;let i=e.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let r=n[1];if(!r||!e.defs[r])throw new Error(`Reference not found: ${t}`);return e.defs[r]}throw new Error(`Reference not found: ${t}`)}function _$(t,e){if(t.not!==void 0){if(typeof t.not=="object"&&Object.keys(t.not).length===0)return E.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(t.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(t.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(t.if!==void 0||t.then!==void 0||t.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(t.dependentSchemas!==void 0||t.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(t.$ref){let r=t.$ref;if(e.refs.has(r))return e.refs.get(r);if(e.processing.has(r))return E.lazy(()=>{if(!e.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return e.refs.get(r)});e.processing.add(r);let o=W1(r,e),s=xe(o,e);return e.refs.set(r,s),e.processing.delete(r),s}if(t.enum!==void 0){let r=t.enum;if(e.version==="openapi-3.0"&&t.nullable===!0&&r.length===1&&r[0]===null)return E.null();if(r.length===0)return E.never();if(r.length===1)return E.literal(r[0]);if(r.every(s=>typeof s=="string"))return E.enum(r);let o=r.map(s=>E.literal(s));return o.length<2?o[0]:E.union([o[0],o[1],...o.slice(2)])}if(t.const!==void 0)return E.literal(t.const);let n=t.type;if(Array.isArray(n)){let r=n.map(o=>{let s={...t,type:o};return _$(s,e)});return r.length===0?E.never():r.length===1?r[0]:E.union(r)}if(!n)return E.any();let i;switch(n){case"string":{let r=E.string();if(t.format){let o=t.format;o==="email"?r=r.check(E.email()):o==="uri"||o==="uri-reference"?r=r.check(E.url()):o==="uuid"||o==="guid"?r=r.check(E.uuid()):o==="date-time"?r=r.check(E.iso.datetime()):o==="date"?r=r.check(E.iso.date()):o==="time"?r=r.check(E.iso.time()):o==="duration"?r=r.check(E.iso.duration()):o==="ipv4"?r=r.check(E.ipv4()):o==="ipv6"?r=r.check(E.ipv6()):o==="mac"?r=r.check(E.mac()):o==="cidr"?r=r.check(E.cidrv4()):o==="cidr-v6"?r=r.check(E.cidrv6()):o==="base64"?r=r.check(E.base64()):o==="base64url"?r=r.check(E.base64url()):o==="e164"?r=r.check(E.e164()):o==="jwt"?r=r.check(E.jwt()):o==="emoji"?r=r.check(E.emoji()):o==="nanoid"?r=r.check(E.nanoid()):o==="cuid"?r=r.check(E.cuid()):o==="cuid2"?r=r.check(E.cuid2()):o==="ulid"?r=r.check(E.ulid()):o==="xid"?r=r.check(E.xid()):o==="ksuid"&&(r=r.check(E.ksuid()))}typeof t.minLength=="number"&&(r=r.min(t.minLength)),typeof t.maxLength=="number"&&(r=r.max(t.maxLength)),t.pattern&&(r=r.regex(new RegExp(t.pattern))),i=r;break}case"number":case"integer":{let r=n==="integer"?E.number().int():E.number();typeof t.minimum=="number"&&(r=r.min(t.minimum)),typeof t.maximum=="number"&&(r=r.max(t.maximum)),typeof t.exclusiveMinimum=="number"?r=r.gt(t.exclusiveMinimum):t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(r=r.gt(t.minimum)),typeof t.exclusiveMaximum=="number"?r=r.lt(t.exclusiveMaximum):t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(r=r.lt(t.maximum)),typeof t.multipleOf=="number"&&(r=r.multipleOf(t.multipleOf)),i=r;break}case"boolean":{i=E.boolean();break}case"null":{i=E.null();break}case"object":{let r={},o=t.properties||{},s=new Set(t.required||[]);for(let[u,c]of Object.entries(o)){let l=xe(c,e);r[u]=s.has(u)?l:l.optional()}if(t.propertyNames){let u=xe(t.propertyNames,e),c=t.additionalProperties&&typeof t.additionalProperties=="object"?xe(t.additionalProperties,e):E.any();if(Object.keys(r).length===0){i=E.record(u,c);break}let l=E.object(r).passthrough(),d=E.looseRecord(u,c);i=E.intersection(l,d);break}if(t.patternProperties){let u=t.patternProperties,c=Object.keys(u),l=[];for(let f of c){let p=xe(u[f],e),h=E.string().regex(new RegExp(f));l.push(E.looseRecord(h,p))}let d=[];if(Object.keys(r).length>0&&d.push(E.object(r).passthrough()),d.push(...l),d.length===0)i=E.object({}).passthrough();else if(d.length===1)i=d[0];else{let f=E.intersection(d[0],d[1]);for(let p=2;p<d.length;p++)f=E.intersection(f,d[p]);i=f}break}let a=E.object(r);t.additionalProperties===!1?i=a.strict():typeof t.additionalProperties=="object"?i=a.catchall(xe(t.additionalProperties,e)):i=a.passthrough();break}case"array":{let r=t.prefixItems,o=t.items;if(r&&Array.isArray(r)){let s=r.map(u=>xe(u,e)),a=o&&typeof o=="object"&&!Array.isArray(o)?xe(o,e):void 0;a?i=E.tuple(s).rest(a):i=E.tuple(s),typeof t.minItems=="number"&&(i=i.check(E.minLength(t.minItems))),typeof t.maxItems=="number"&&(i=i.check(E.maxLength(t.maxItems)))}else if(Array.isArray(o)){let s=o.map(u=>xe(u,e)),a=t.additionalItems&&typeof t.additionalItems=="object"?xe(t.additionalItems,e):void 0;a?i=E.tuple(s).rest(a):i=E.tuple(s),typeof t.minItems=="number"&&(i=i.check(E.minLength(t.minItems))),typeof t.maxItems=="number"&&(i=i.check(E.maxLength(t.maxItems)))}else if(o!==void 0){let s=xe(o,e),a=E.array(s);typeof t.minItems=="number"&&(a=a.min(t.minItems)),typeof t.maxItems=="number"&&(a=a.max(t.maxItems)),i=a}else i=E.array(E.any());break}default:throw new Error(`Unsupported type: ${n}`)}return i}function xe(t,e){if(typeof t=="boolean")return t?E.any():E.never();let n=_$(t,e),i=t.type||t.enum!==void 0||t.const!==void 0;if(t.anyOf&&Array.isArray(t.anyOf)){let a=t.anyOf.map(c=>xe(c,e)),u=E.union(a);n=i?E.intersection(n,u):u}if(t.oneOf&&Array.isArray(t.oneOf)){let a=t.oneOf.map(c=>xe(c,e)),u=E.xor(a);n=i?E.intersection(n,u):u}if(t.allOf&&Array.isArray(t.allOf))if(t.allOf.length===0)n=i?n:E.any();else{let a=i?n:xe(t.allOf[0],e),u=i?0:1;for(let c=u;c<t.allOf.length;c++)a=E.intersection(a,xe(t.allOf[c],e));n=a}t.nullable===!0&&e.version==="openapi-3.0"&&(n=E.nullable(n)),t.readOnly===!0&&(n=E.readonly(n)),t.default!==void 0&&(n=n.default(t.default));let r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of o)a in t&&(r[a]=t[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in t&&(r[a]=t[a]);for(let a of Object.keys(t))B1.has(a)||(r[a]=t[a]);return Object.keys(r).length>0&&e.registry.add(n,r),t.description&&(n=n.describe(t.description)),n}function $$(t,e){if(typeof t=="boolean")return t?E.any():E.never();let n;try{n=JSON.parse(JSON.stringify(t))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=G1(n,e?.defaultTarget),r=n.$defs||n.definitions||{},o={version:i,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:e?.registry??ve};return xe(n,o)}var E,B1,b$=v(()=>{Kn();ys();ti();ni();E={...ri,...vs,iso:en},B1=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var Vp={};qe(Vp,{bigint:()=>K1,boolean:()=>J1,date:()=>Y1,number:()=>H1,string:()=>q1});function q1(t){return ud(nn,t)}function H1(t){return gd(sn,t)}function J1(t){return wd(an,t)}function K1(t){return kd(un,t)}function Y1(t){return Dd(li,t)}var x$=v(()=>{Ze();ni()});var me={};qe(me,{$brand:()=>Pu,$input:()=>sd,$output:()=>od,NEVER:()=>Ou,TimePrecision:()=>ld,ZodAny:()=>rp,ZodArray:()=>sp,ZodBase64:()=>js,ZodBase64URL:()=>Us,ZodBigInt:()=>un,ZodBigIntFormat:()=>Vs,ZodBoolean:()=>an,ZodCIDRv4:()=>Ds,ZodCIDRv6:()=>Ls,ZodCUID:()=>Os,ZodCUID2:()=>Ps,ZodCatch:()=>Tp,ZodCodec:()=>mi,ZodCustom:()=>gi,ZodCustomStringFormat:()=>on,ZodDate:()=>li,ZodDefault:()=>xp,ZodDiscriminatedUnion:()=>up,ZodE164:()=>Ms,ZodEmail:()=>Is,ZodEmoji:()=>Es,ZodEnum:()=>rn,ZodError:()=>U1,ZodExactOptional:()=>_p,ZodFile:()=>vp,ZodFirstPartyTypeKind:()=>Fp,ZodFunction:()=>jp,ZodGUID:()=>oi,ZodIPv4:()=>Ns,ZodIPv6:()=>Rs,ZodISODate:()=>$s,ZodISODateTime:()=>_s,ZodISODuration:()=>xs,ZodISOTime:()=>bs,ZodIntersection:()=>cp,ZodIssueCode:()=>F1,ZodJWT:()=>Fs,ZodKSUID:()=>zs,ZodLazy:()=>Rp,ZodLiteral:()=>gp,ZodMAC:()=>Jf,ZodMap:()=>hp,ZodNaN:()=>Pp,ZodNanoID:()=>Ts,ZodNever:()=>ip,ZodNonOptional:()=>Hs,ZodNull:()=>ep,ZodNullable:()=>bp,ZodNumber:()=>sn,ZodNumberFormat:()=>lr,ZodObject:()=>fi,ZodOptional:()=>qs,ZodPipe:()=>hi,ZodPrefault:()=>Sp,ZodPreprocess:()=>Cp,ZodPromise:()=>Lp,ZodReadonly:()=>Ap,ZodRealError:()=>Re,ZodRecord:()=>tn,ZodSet:()=>mp,ZodString:()=>nn,ZodStringFormat:()=>J,ZodSuccess:()=>Ep,ZodSymbol:()=>Xf,ZodTemplateLiteral:()=>Np,ZodTransform:()=>yp,ZodTuple:()=>dp,ZodType:()=>U,ZodULID:()=>Cs,ZodURL:()=>ci,ZodUUID:()=>pt,ZodUndefined:()=>Qf,ZodUnion:()=>pi,ZodUnknown:()=>np,ZodVoid:()=>op,ZodXID:()=>As,ZodXor:()=>ap,_ZodString:()=>ks,_default:()=>wp,_function:()=>c$,any:()=>M_,array:()=>di,base64:()=>w_,base64url:()=>S_,bigint:()=>R_,boolean:()=>Yf,catch:()=>Op,check:()=>l$,cidrv4:()=>b_,cidrv6:()=>x_,clone:()=>Ie,codec:()=>o$,coerce:()=>Vp,config:()=>oe,core:()=>xt,cuid:()=>p_,cuid2:()=>h_,custom:()=>d$,date:()=>V_,decode:()=>Ff,decodeAsync:()=>Zf,describe:()=>f$,discriminatedUnion:()=>H_,e164:()=>k_,email:()=>n_,emoji:()=>d_,encode:()=>Mf,encodeAsync:()=>Vf,endsWith:()=>Gr,enum:()=>Gs,exactOptional:()=>$p,file:()=>t$,flattenError:()=>Mn,float32:()=>C_,float64:()=>A_,formatError:()=>Fn,fromJSONSchema:()=>$$,function:()=>c$,getErrorMap:()=>Z1,globalRegistry:()=>ve,gt:()=>dt,gte:()=>Te,guid:()=>i_,hash:()=>P_,hex:()=>O_,hostname:()=>T_,httpUrl:()=>l_,includes:()=>Zr,instanceof:()=>h$,int:()=>ws,int32:()=>z_,int64:()=>D_,intersection:()=>lp,invertCodec:()=>s$,ipv4:()=>y_,ipv6:()=>$_,iso:()=>en,json:()=>g$,jwt:()=>I_,keyof:()=>Z_,ksuid:()=>v_,lazy:()=>Dp,length:()=>ur,literal:()=>e$,locales:()=>Jn,looseObject:()=>W_,looseRecord:()=>K_,lowercase:()=>Fr,lt:()=>lt,lte:()=>Ve,mac:()=>__,map:()=>Y_,maxLength:()=>ar,maxSize:()=>Ut,meta:()=>p$,mime:()=>Wr,minLength:()=>bt,minSize:()=>ft,multipleOf:()=>jt,nan:()=>i$,nanoid:()=>f_,nativeEnum:()=>Q_,negative:()=>us,never:()=>Zs,nonnegative:()=>ls,nonoptional:()=>Ip,nonpositive:()=>cs,normalize:()=>qr,null:()=>tp,nullable:()=>ai,nullish:()=>r$,number:()=>Kf,object:()=>B_,optional:()=>si,overwrite:()=>st,parse:()=>Df,parseAsync:()=>Lf,partialRecord:()=>J_,pipe:()=>Ss,positive:()=>as,prefault:()=>kp,preprocess:()=>v$,prettifyError:()=>Zu,promise:()=>u$,property:()=>ds,readonly:()=>zp,record:()=>pp,refine:()=>Up,regex:()=>Mr,regexes:()=>Fe,registry:()=>Mo,safeDecode:()=>Gf,safeDecodeAsync:()=>qf,safeEncode:()=>Bf,safeEncodeAsync:()=>Wf,safeParse:()=>jf,safeParseAsync:()=>Uf,set:()=>X_,setErrorMap:()=>V1,size:()=>sr,slugify:()=>Yr,startsWith:()=>Br,strictObject:()=>G_,string:()=>ii,stringFormat:()=>E_,stringbool:()=>m$,success:()=>n$,superRefine:()=>Mp,symbol:()=>j_,templateLiteral:()=>a$,toJSONSchema:()=>ms,toLowerCase:()=>Jr,toUpperCase:()=>Kr,transform:()=>Ws,treeifyError:()=>Vu,trim:()=>Hr,tuple:()=>fp,uint32:()=>N_,uint64:()=>L_,ulid:()=>m_,undefined:()=>U_,union:()=>Bs,unknown:()=>cr,uppercase:()=>Vr,url:()=>c_,util:()=>x,uuid:()=>o_,uuidv4:()=>s_,uuidv6:()=>a_,uuidv7:()=>u_,void:()=>F_,xid:()=>g_,xor:()=>q_});var Zp=v(()=>{Ze();ni();ys();Rf();Hf();y$();Ze();td();Ze();ei();b$();id();ti();ti();x$();oe(Do())});var w$=v(()=>{Zp();Zp()});var X1,Js,dr,S$=v(()=>{"use strict";w$();X1=me.enum(["debug","info","warn","error"]),Js=me.object({provider:me.string(),model:me.string(),gateway:me.string().nullable().optional()}),dr=me.object({version:me.number().default(1),routes:me.object({stt:Js.optional(),tts:Js.optional(),text:Js.optional(),embedding:Js.optional()}).optional(),secrets:me.record(me.string(),me.string()).optional(),defaults:me.object({logLevel:X1.default("info"),modality:me.enum(["voice","text"]).default("voice")}).default({logLevel:"info",modality:"voice"}),upgrade:me.object({auto:me.boolean().default(!1)}).default({auto:!1})})});var De=v(()=>{"use strict";bg();xg();Tu();S$()});import{mkdirSync as Q1}from"node:fs";import{homedir as eT}from"node:os";import{join as k$,resolve as tT}from"node:path";var Bp,Ke,cn=v(()=>{"use strict";Tu();Bp=class{dirName=".jarvis";dir(){let e=process.env[wg]?.trim();return e?tT(e):k$(eT(),this.dirName)}resolve(...e){return k$(this.dir(),...e)}ensureDir(){let e=this.dir();return Q1(e,{recursive:!0,mode:448}),e}},Ke=new Bp});import{chmodSync as rT,existsSync as nT,readFileSync as iT,writeFileSync as oT}from"node:fs";function E$(t){switch(t){case"debug":case"info":case"warn":case"error":return t;default:return}}var I$,fr,Gp=v(()=>{"use strict";De();cn();I$="config.json",fr=class t{home;config;constructor(e=Ke){this.home=e,this.config=this.load()}configPath(){return this.home.resolve(I$)}load(){let e=this.configPath(),n=nT(e)?this.readFile(e):{},i=dr.safeParse(n);if(!i.success)throw new Error(`invalid Jarvis config at ${e}: ${i.error.message}`);return i.data}readFile(e){let n;try{n=iT(e,"utf8")}catch(i){throw new Error(`could not read Jarvis config at ${e}`,{cause:i})}try{return JSON.parse(n)}catch(i){throw new Error(`Jarvis config at ${e} is not valid JSON`,{cause:i})}}resolved(){return this.config}get logLevel(){return E$(process.env.JARVIS_LOG_LEVEL)??E$(process.env.LOG_LEVEL)??this.config.defaults.logLevel}secret(e){return this.config.secrets?.[e]}save(e){t.persist(this.home,e)}static persist(e,n){let i=dr.parse(n);e.ensureDir();let r=e.resolve(I$);oT(r,JSON.stringify(i,null,2)+`
68
- `,{mode:384}),rT(r,384)}}});function lT(t,e){let n=t;for(let i of e){if(n===null||typeof n!="object")return;n=n[i]}return n}function dT(t,e,n){let i=t;for(let r=0;r<e.length-1;r++){let o=e[r],s=i[o];(s===null||typeof s!="object")&&(i[o]={}),i=i[o]}i[e[e.length-1]]=n}function fT(t,e){let n=t;for(let r=0;r<e.length-1;r++){let o=n[e[r]];if(o===null||typeof o!="object")return!1;n=o}let i=e[e.length-1];return i in n?(delete n[i],!0):!1}var sT,aT,uT,cT,Be,Wp=v(()=>{"use strict";De();cn();Gp();sT="<set>",aT=new Set(["upgrade.auto"]),uT=new Set(["version"]),cT=new Set(["__proto__","prototype","constructor"]),Be=class{home;constructor(e=Ke){this.home=e}freshResolver(){return new fr(this.home)}resolved(){return this.freshResolver().resolved()}list(){return this.redact(this.freshResolver().resolved())}get(e){return lT(this.list(),this.parsePath(e))}set(e,n){let i=this.parsePath(e);this.assertMutable(e);let r=this.freshResolver(),o=structuredClone(r.resolved());dT(o,i,this.coerce(e,n)),r.save(this.validate(o,e))}unset(e){let n=this.parsePath(e);this.assertMutable(e);let i=this.freshResolver(),r=structuredClone(i.resolved());if(!fT(r,n))throw new Error(`nothing to unset: '${e}' is not set`);i.save(this.validate(r,e))}write(e){fr.persist(this.home,e)}validate(e,n){let i=dr.safeParse(e);if(i.success)return i.data;let r=i.error.issues.map(s=>`${s.path.join(".")}: ${s.message}`).join("; "),o=n.startsWith("routes.")?" A route needs both a provider and a model - run 'jarvis init' to configure one.":"";throw new Error(`'${n}' would make the config invalid (${r}).${o}`)}coerce(e,n){if(aT.has(e)){if(n==="true")return!0;if(n==="false")return!1;throw new Error(`'${e}' expects 'true' or 'false', got '${n}'`)}return n}assertMutable(e){if(uT.has(e))throw new Error(`'${e}' is managed by Jarvis and cannot be changed`)}parsePath(e){let n=e.split(".");if(e.length===0||n.some(i=>i.length===0||cT.has(i)))throw new Error(`invalid config path: '${e}'`);return n}redact(e){let n=structuredClone(e);if(n.secrets)for(let i of Object.keys(n.secrets))n.secrets[i]=sT;return n}}});async function*O$(t,e={}){let{signal:n,idleTimeoutMs:i}=e,r=t.getReader(),o=new TextDecoder,s="",a=[];try{for(;;){let{value:u,done:c}=await pT(r,n,i);if(c)break;s+=o.decode(u,{stream:!0});let l;for(;(l=s.indexOf(`
67
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of t.seen.entries()){let a=s[1];if(e===s[0]){o(s);continue}if(t.external){let c=t.external.registry.get(s[0])?.id;if(e!==s[0]&&c){o(s);continue}}if(t.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1&&t.reused==="ref"){o(s);continue}}}function Vt(t,e){let n=t.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=a=>{let u=t.seen.get(a);if(u.ref===null)return;let c=u.def??u.schema,l={...c},d=u.ref;if(u.ref=null,d){i(d);let h=t.seen.get(d),p=h.schema;if(p.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(p)):Object.assign(c,p),Object.assign(c,l),a._zod.parent===d)for(let S in c)S==="$ref"||S==="allOf"||S in l||delete c[S];if(p.$ref&&h.def)for(let S in c)S==="$ref"||S==="allOf"||S in h.def&&JSON.stringify(c[S])===JSON.stringify(h.def[S])&&delete c[S]}let f=a._zod.parent;if(f&&f!==d){i(f);let h=t.seen.get(f);if(h?.schema.$ref&&(c.$ref=h.schema.$ref,h.def))for(let p in c)p==="$ref"||p==="allOf"||p in h.def&&JSON.stringify(c[p])===JSON.stringify(h.def[p])&&delete c[p]}t.override({zodSchema:a,jsonSchema:c,path:u.path??[]})};for(let a of[...t.seen.entries()].reverse())i(a[0]);let r={};if(t.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let a=t.external.registry.get(e)?.id;if(!a)throw new Error("Schema is missing an `id` property");r.$id=t.external.uri(a)}Object.assign(r,n.def??n.schema);let o=t.metadataRegistry.get(e)?.id;o!==void 0&&r.id===o&&delete r.id;let s=t.external?.defs??{};for(let a of t.seen.entries()){let u=a[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,s[u.defId]=u.def)}t.external||Object.keys(s).length>0&&(t.target==="draft-2020-12"?r.$defs=s:r.definitions=s);try{let a=JSON.parse(JSON.stringify(r));return Object.defineProperty(a,"~standard",{value:{...e["~standard"],jsonSchema:{input:tn(e,"input",t.processors),output:tn(e,"output",t.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function Oe(t,e){let n=e??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);let i=t._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return Oe(i.element,n);if(i.type==="set")return Oe(i.valueType,n);if(i.type==="lazy")return Oe(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return Oe(i.innerType,n);if(i.type==="intersection")return Oe(i.left,n)||Oe(i.right,n);if(i.type==="record"||i.type==="map")return Oe(i.keyType,n)||Oe(i.valueType,n);if(i.type==="pipe")return t._zod.traits.has("$ZodCodec")?!0:Oe(i.in,n)||Oe(i.out,n);if(i.type==="object"){for(let r in i.shape)if(Oe(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(Oe(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(Oe(r,n))return!0;return!!(i.rest&&Oe(i.rest,n))}return!1}var Jd,tn,ti=v(()=>{Xn();Jd=(t,e={})=>n=>{let i=Mt({...n,processors:e});return G(t,i),Ft(i,t),Vt(i,t)},tn=(t,e,n={})=>i=>{let{libraryOptions:r,target:o}=i??{},s=Mt({...r??{},target:o,io:e,processors:n});return G(t,s),Ft(s,t),Vt(s,t)}});function vs(t,e){if("_idmap"in t){let i=t,r=Mt({...e,processors:ps}),o={};for(let u of i._idmap.entries()){let[c,l]=u;G(l,r)}let s={},a={registry:i,uri:e?.uri,defs:o};r.external=a;for(let u of i._idmap.entries()){let[c,l]=u;Ft(r,l),s[c]=Vt(r,l)}if(Object.keys(o).length>0){let u=r.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[u]:o}}return{schemas:s}}let n=Mt({...e,processors:ps});return G(t,n),Ft(n,t),Vt(n,t)}var H1,Kd,Yd,Xd,Qd,ef,tf,rf,nf,of,sf,af,uf,cf,lf,df,ff,hf,pf,mf,gf,vf,yf,_f,bf,$f,ms,xf,wf,Sf,kf,If,Ef,Tf,Of,Pf,Cf,Af,gs,zf,ps,ri=v(()=>{ti();N();H1={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Kd=(t,e,n,i)=>{let r=n;r.type="string";let{minimum:o,maximum:s,format:a,patterns:u,contentEncoding:c}=t._zod.bag;if(typeof o=="number"&&(r.minLength=o),typeof s=="number"&&(r.maxLength=s),a&&(r.format=H1[a]??a,r.format===""&&delete r.format,a==="time"&&delete r.format),c&&(r.contentEncoding=c),u&&u.size>0){let l=[...u];l.length===1?r.pattern=l[0].source:l.length>1&&(r.allOf=[...l.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Yd=(t,e,n,i)=>{let r=n,{minimum:o,maximum:s,format:a,multipleOf:u,exclusiveMaximum:c,exclusiveMinimum:l}=t._zod.bag;typeof a=="string"&&a.includes("int")?r.type="integer":r.type="number";let d=typeof l=="number"&&l>=(o??Number.NEGATIVE_INFINITY),f=typeof c=="number"&&c<=(s??Number.POSITIVE_INFINITY),h=e.target==="draft-04"||e.target==="openapi-3.0";d?h?(r.minimum=l,r.exclusiveMinimum=!0):r.exclusiveMinimum=l:typeof o=="number"&&(r.minimum=o),f?h?(r.maximum=c,r.exclusiveMaximum=!0):r.exclusiveMaximum=c:typeof s=="number"&&(r.maximum=s),typeof u=="number"&&(r.multipleOf=u)},Xd=(t,e,n,i)=>{n.type="boolean"},Qd=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},ef=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},tf=(t,e,n,i)=>{e.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},rf=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},nf=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},of=(t,e,n,i)=>{n.not={}},sf=(t,e,n,i)=>{},af=(t,e,n,i)=>{},uf=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},cf=(t,e,n,i)=>{let r=t._zod.def,o=Dn(r.entries);o.every(s=>typeof s=="number")&&(n.type="number"),o.every(s=>typeof s=="string")&&(n.type="string"),n.enum=o},lf=(t,e,n,i)=>{let r=t._zod.def,o=[];for(let s of r.values)if(s===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){let s=o[0];n.type=s===null?"null":typeof s,e.target==="draft-04"||e.target==="openapi-3.0"?n.enum=[s]:n.const=s}else o.every(s=>typeof s=="number")&&(n.type="number"),o.every(s=>typeof s=="string")&&(n.type="string"),o.every(s=>typeof s=="boolean")&&(n.type="boolean"),o.every(s=>s===null)&&(n.type="null"),n.enum=o},df=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},ff=(t,e,n,i)=>{let r=n,o=t._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},hf=(t,e,n,i)=>{let r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:u}=t._zod.bag;s!==void 0&&(o.minLength=s),a!==void 0&&(o.maxLength=a),u?u.length===1?(o.contentMediaType=u[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=u.map(c=>({contentMediaType:c}))):Object.assign(r,o)},pf=(t,e,n,i)=>{n.type="boolean"},mf=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},gf=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},vf=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},yf=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},_f=(t,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},bf=(t,e,n,i)=>{let r=n,o=t._zod.def,{minimum:s,maximum:a}=t._zod.bag;typeof s=="number"&&(r.minItems=s),typeof a=="number"&&(r.maxItems=a),r.type="array",r.items=G(o.element,e,{...i,path:[...i.path,"items"]})},$f=(t,e,n,i)=>{let r=n,o=t._zod.def;r.type="object",r.properties={};let s=o.shape;for(let c in s)r.properties[c]=G(s[c],e,{...i,path:[...i.path,"properties",c]});let a=new Set(Object.keys(s)),u=new Set([...a].filter(c=>{let l=o.shape[c]._zod;return e.io==="input"?l.optin===void 0:l.optout===void 0}));u.size>0&&(r.required=Array.from(u)),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=G(o.catchall,e,{...i,path:[...i.path,"additionalProperties"]})):e.io==="output"&&(r.additionalProperties=!1)},ms=(t,e,n,i)=>{let r=t._zod.def,o=r.inclusive===!1,s=r.options.map((a,u)=>G(a,e,{...i,path:[...i.path,o?"oneOf":"anyOf",u]}));o?n.oneOf=s:n.anyOf=s},xf=(t,e,n,i)=>{let r=t._zod.def,o=G(r.left,e,{...i,path:[...i.path,"allOf",0]}),s=G(r.right,e,{...i,path:[...i.path,"allOf",1]}),a=c=>"allOf"in c&&Object.keys(c).length===1,u=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];n.allOf=u},wf=(t,e,n,i)=>{let r=n,o=t._zod.def;r.type="array";let s=e.target==="draft-2020-12"?"prefixItems":"items",a=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",u=o.items.map((f,h)=>G(f,e,{...i,path:[...i.path,s,h]})),c=o.rest?G(o.rest,e,{...i,path:[...i.path,a,...e.target==="openapi-3.0"?[o.items.length]:[]]}):null;e.target==="draft-2020-12"?(r.prefixItems=u,c&&(r.items=c)):e.target==="openapi-3.0"?(r.items={anyOf:u},c&&r.items.anyOf.push(c),r.minItems=u.length,c||(r.maxItems=u.length)):(r.items=u,c&&(r.additionalItems=c));let{minimum:l,maximum:d}=t._zod.bag;typeof l=="number"&&(r.minItems=l),typeof d=="number"&&(r.maxItems=d)},Sf=(t,e,n,i)=>{let r=n,o=t._zod.def;r.type="object";let s=o.keyType,u=s._zod.bag?.patterns;if(o.mode==="loose"&&u&&u.size>0){let l=G(o.valueType,e,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let d of u)r.patternProperties[d.source]=l}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(r.propertyNames=G(o.keyType,e,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=G(o.valueType,e,{...i,path:[...i.path,"additionalProperties"]});let c=s._zod.values;if(c){let l=[...c].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(r.required=l)}},kf=(t,e,n,i)=>{let r=t._zod.def,o=G(r.innerType,e,i),s=e.seen.get(t);e.target==="openapi-3.0"?(s.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},If=(t,e,n,i)=>{let r=t._zod.def;G(r.innerType,e,i);let o=e.seen.get(t);o.ref=r.innerType},Ef=(t,e,n,i)=>{let r=t._zod.def;G(r.innerType,e,i);let o=e.seen.get(t);o.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},Tf=(t,e,n,i)=>{let r=t._zod.def;G(r.innerType,e,i);let o=e.seen.get(t);o.ref=r.innerType,e.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},Of=(t,e,n,i)=>{let r=t._zod.def;G(r.innerType,e,i);let o=e.seen.get(t);o.ref=r.innerType;let s;try{s=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},Pf=(t,e,n,i)=>{let r=t._zod.def,o=r.in._zod.traits.has("$ZodTransform"),s=e.io==="input"?o?r.out:r.in:r.out;G(s,e,i);let a=e.seen.get(t);a.ref=s},Cf=(t,e,n,i)=>{let r=t._zod.def;G(r.innerType,e,i);let o=e.seen.get(t);o.ref=r.innerType,n.readOnly=!0},Af=(t,e,n,i)=>{let r=t._zod.def;G(r.innerType,e,i);let o=e.seen.get(t);o.ref=r.innerType},gs=(t,e,n,i)=>{let r=t._zod.def;G(r.innerType,e,i);let o=e.seen.get(t);o.ref=r.innerType},zf=(t,e,n,i)=>{let r=t._zod.innerType;G(r,e,i);let o=e.seen.get(t);o.ref=r},ps={string:Kd,number:Yd,boolean:Xd,bigint:Qd,symbol:ef,null:tf,undefined:rf,void:nf,never:of,any:sf,unknown:af,date:uf,enum:cf,literal:lf,nan:df,template_literal:ff,file:hf,success:pf,custom:mf,function:gf,transform:vf,map:yf,set:_f,array:bf,object:$f,union:ms,intersection:xf,tuple:wf,record:Sf,nullable:kf,nonoptional:If,default:Ef,prefault:Tf,catch:Of,pipe:Pf,readonly:Cf,promise:Af,optional:gs,lazy:zf}});var ys,o_=v(()=>{ri();ti();ys=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let n=e?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=Mt({processors:ps,target:n,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,n={path:[],schemaPath:[]}){return G(e,this.ctx,n)}emit(e,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),Ft(this.ctx,e);let i=Vt(this.ctx,e),{"~standard":r,...o}=i;return o}}});var s_={};var a_=v(()=>{});var xt={};He(xt,{$ZodAny:()=>kl,$ZodArray:()=>Pl,$ZodAsyncError:()=>ot,$ZodBase64:()=>ml,$ZodBase64URL:()=>gl,$ZodBigInt:()=>No,$ZodBigIntFormat:()=>$l,$ZodBoolean:()=>qn,$ZodCIDRv4:()=>fl,$ZodCIDRv6:()=>hl,$ZodCUID:()=>el,$ZodCUID2:()=>tl,$ZodCatch:()=>Hl,$ZodCheck:()=>X,$ZodCheckBigIntFormat:()=>Tc,$ZodCheckEndsWith:()=>Mc,$ZodCheckGreaterThan:()=>Eo,$ZodCheckIncludes:()=>Uc,$ZodCheckLengthEquals:()=>Nc,$ZodCheckLessThan:()=>Io,$ZodCheckLowerCase:()=>Dc,$ZodCheckMaxLength:()=>Ac,$ZodCheckMaxSize:()=>Oc,$ZodCheckMimeType:()=>Vc,$ZodCheckMinLength:()=>zc,$ZodCheckMinSize:()=>Pc,$ZodCheckMultipleOf:()=>Ic,$ZodCheckNumberFormat:()=>Ec,$ZodCheckOverwrite:()=>Zc,$ZodCheckProperty:()=>Fc,$ZodCheckRegex:()=>Rc,$ZodCheckSizeEquals:()=>Cc,$ZodCheckStartsWith:()=>jc,$ZodCheckStringFormat:()=>Mr,$ZodCheckUpperCase:()=>Lc,$ZodCodec:()=>Jn,$ZodCustom:()=>rd,$ZodCustomStringFormat:()=>_l,$ZodDate:()=>Ol,$ZodDefault:()=>Bl,$ZodDiscriminatedUnion:()=>zl,$ZodE164:()=>vl,$ZodEmail:()=>Kc,$ZodEmoji:()=>Xc,$ZodEncodeError:()=>zt,$ZodEnum:()=>Ul,$ZodError:()=>Fn,$ZodExactOptional:()=>Vl,$ZodFile:()=>Ml,$ZodFunction:()=>Ql,$ZodGUID:()=>Hc,$ZodIPv4:()=>cl,$ZodIPv6:()=>ll,$ZodISODate:()=>sl,$ZodISODateTime:()=>ol,$ZodISODuration:()=>ul,$ZodISOTime:()=>al,$ZodIntersection:()=>Nl,$ZodJWT:()=>yl,$ZodKSUID:()=>il,$ZodLazy:()=>td,$ZodLiteral:()=>jl,$ZodMAC:()=>dl,$ZodMap:()=>Dl,$ZodNaN:()=>Jl,$ZodNanoID:()=>Qc,$ZodNever:()=>El,$ZodNonOptional:()=>Wl,$ZodNull:()=>Sl,$ZodNullable:()=>Zl,$ZodNumber:()=>zo,$ZodNumberFormat:()=>bl,$ZodObject:()=>av,$ZodObjectJIT:()=>Cl,$ZodOptional:()=>Do,$ZodPipe:()=>Lo,$ZodPrefault:()=>Gl,$ZodPreprocess:()=>Kl,$ZodPromise:()=>ed,$ZodReadonly:()=>Yl,$ZodRealError:()=>Ne,$ZodRecord:()=>Rl,$ZodRegistry:()=>Fo,$ZodSet:()=>Ll,$ZodString:()=>sr,$ZodStringFormat:()=>H,$ZodSuccess:()=>ql,$ZodSymbol:()=>xl,$ZodTemplateLiteral:()=>Xl,$ZodTransform:()=>Fl,$ZodTuple:()=>Ro,$ZodType:()=>L,$ZodULID:()=>rl,$ZodURL:()=>Yc,$ZodUUID:()=>Jc,$ZodUndefined:()=>wl,$ZodUnion:()=>Hn,$ZodUnknown:()=>Il,$ZodVoid:()=>Tl,$ZodXID:()=>nl,$ZodXor:()=>Al,$brand:()=>zu,$constructor:()=>m,$input:()=>cd,$output:()=>ud,Doc:()=>Wn,JSONSchema:()=>s_,JSONSchemaGenerator:()=>ys,NEVER:()=>Au,TimePrecision:()=>hd,_any:()=>Nd,_array:()=>Fd,_base64:()=>os,_base64url:()=>ss,_bigint:()=>Ed,_boolean:()=>kd,_catch:()=>V1,_check:()=>n_,_cidrv4:()=>ns,_cidrv6:()=>is,_coercedBigint:()=>Td,_coercedBoolean:()=>Id,_coercedDate:()=>jd,_coercedNumber:()=>_d,_coercedString:()=>dd,_cuid:()=>Ko,_cuid2:()=>Yo,_custom:()=>Zd,_date:()=>Ud,_decode:()=>go,_decodeAsync:()=>yo,_default:()=>j1,_discriminatedUnion:()=>E1,_e164:()=>as,_email:()=>Zo,_emoji:()=>Ho,_encode:()=>mo,_encodeAsync:()=>vo,_endsWith:()=>qr,_enum:()=>z1,_file:()=>Vd,_float32:()=>$d,_float64:()=>xd,_gt:()=>dt,_gte:()=>Te,_guid:()=>Qn,_includes:()=>Gr,_int:()=>bd,_int32:()=>wd,_int64:()=>Od,_intersection:()=>T1,_ipv4:()=>ts,_ipv6:()=>rs,_isoDate:()=>md,_isoDateTime:()=>pd,_isoDuration:()=>vd,_isoTime:()=>gd,_jwt:()=>us,_ksuid:()=>es,_lazy:()=>W1,_length:()=>cr,_literal:()=>R1,_lowercase:()=>Zr,_lt:()=>lt,_lte:()=>Ve,_mac:()=>fd,_map:()=>C1,_max:()=>Ve,_maxLength:()=>ur,_maxSize:()=>jt,_mime:()=>Hr,_min:()=>Te,_minLength:()=>$t,_minSize:()=>ft,_multipleOf:()=>Ut,_nan:()=>Md,_nanoid:()=>Jo,_nativeEnum:()=>N1,_negative:()=>ls,_never:()=>Dd,_nonnegative:()=>fs,_nonoptional:()=>M1,_nonpositive:()=>ds,_normalize:()=>Jr,_null:()=>zd,_nullable:()=>U1,_number:()=>yd,_optional:()=>L1,_overwrite:()=>st,_parse:()=>Dr,_parseAsync:()=>Lr,_pipe:()=>Z1,_positive:()=>cs,_promise:()=>q1,_property:()=>hs,_readonly:()=>B1,_record:()=>P1,_refine:()=>Bd,_regex:()=>Vr,_safeDecode:()=>bo,_safeDecodeAsync:()=>xo,_safeEncode:()=>_o,_safeEncodeAsync:()=>$o,_safeParse:()=>Ur,_safeParseAsync:()=>jr,_set:()=>A1,_size:()=>ar,_slugify:()=>Qr,_startsWith:()=>Wr,_string:()=>ld,_stringFormat:()=>en,_stringbool:()=>Hd,_success:()=>F1,_superRefine:()=>Gd,_symbol:()=>Cd,_templateLiteral:()=>G1,_toLowerCase:()=>Yr,_toUpperCase:()=>Xr,_transform:()=>D1,_trim:()=>Kr,_tuple:()=>O1,_uint32:()=>Sd,_uint64:()=>Pd,_ulid:()=>Xo,_undefined:()=>Ad,_union:()=>k1,_unknown:()=>Rd,_uppercase:()=>Br,_url:()=>ei,_uuid:()=>Bo,_uuidv4:()=>Go,_uuidv6:()=>Wo,_uuidv7:()=>qo,_void:()=>Ld,_xid:()=>Qo,_xor:()=>I1,clone:()=>Ie,config:()=>oe,createStandardJSONSchemaMethod:()=>tn,createToJSONSchemaMethod:()=>Jd,decode:()=>qI,decodeAsync:()=>JI,describe:()=>Wd,encode:()=>WI,encodeAsync:()=>HI,extractDefs:()=>Ft,finalize:()=>Vt,flattenError:()=>Vn,formatError:()=>Zn,globalConfig:()=>rr,globalRegistry:()=>ve,initializeContext:()=>Mt,isValidBase64:()=>pl,isValidBase64URL:()=>nv,isValidJWT:()=>iv,locales:()=>Yn,meta:()=>qd,parse:()=>ho,parseAsync:()=>po,prettifyError:()=>Wu,process:()=>G,regexes:()=>Fe,registry:()=>Vo,safeDecode:()=>YI,safeDecodeAsync:()=>QI,safeEncode:()=>KI,safeEncodeAsync:()=>XI,safeParse:()=>Hu,safeParseAsync:()=>Ju,toDotPath:()=>Dg,toJSONSchema:()=>vs,treeifyError:()=>Gu,util:()=>x,version:()=>Gc});var Ze=v(()=>{nr();Ku();qu();nd();To();Wc();N();ko();ad();Xn();Bc();i_();ti();ri();o_();a_()});var _s={};He(_s,{endsWith:()=>qr,gt:()=>dt,gte:()=>Te,includes:()=>Gr,length:()=>cr,lowercase:()=>Zr,lt:()=>lt,lte:()=>Ve,maxLength:()=>ur,maxSize:()=>jt,mime:()=>Hr,minLength:()=>$t,minSize:()=>ft,multipleOf:()=>Ut,negative:()=>ls,nonnegative:()=>fs,nonpositive:()=>ds,normalize:()=>Jr,overwrite:()=>st,positive:()=>cs,property:()=>hs,regex:()=>Vr,size:()=>ar,slugify:()=>Qr,startsWith:()=>Wr,toLowerCase:()=>Yr,toUpperCase:()=>Xr,trim:()=>Kr,uppercase:()=>Br});var bs=v(()=>{Ze()});var rn={};He(rn,{ZodISODate:()=>xs,ZodISODateTime:()=>$s,ZodISODuration:()=>Ss,ZodISOTime:()=>ws,date:()=>Rf,datetime:()=>Nf,duration:()=>Lf,time:()=>Df});function Nf(t){return pd($s,t)}function Rf(t){return md(xs,t)}function Df(t){return gd(ws,t)}function Lf(t){return vd(Ss,t)}var $s,xs,ws,Ss,ni=v(()=>{Ze();oi();$s=m("ZodISODateTime",(t,e)=>{ol.init(t,e),J.init(t,e)});xs=m("ZodISODate",(t,e)=>{sl.init(t,e),J.init(t,e)});ws=m("ZodISOTime",(t,e)=>{al.init(t,e),J.init(t,e)});Ss=m("ZodISODuration",(t,e)=>{ul.init(t,e),J.init(t,e)})});var u_,K1,Re,Uf=v(()=>{Ze();Ze();N();u_=(t,e)=>{Fn.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:n=>Zn(t,n)},flatten:{value:n=>Vn(t,n)},addIssue:{value:n=>{t.issues.push(n),t.message=JSON.stringify(t.issues,zr,2)}},addIssues:{value:n=>{t.issues.push(...n),t.message=JSON.stringify(t.issues,zr,2)}},isEmpty:{get(){return t.issues.length===0}}})},K1=m("ZodError",u_),Re=m("ZodError",u_,{Parent:Error})});var jf,Mf,Ff,Vf,Zf,Bf,Gf,Wf,qf,Hf,Jf,Kf,Yf=v(()=>{Ze();Uf();jf=Dr(Re),Mf=Lr(Re),Ff=Ur(Re),Vf=jr(Re),Zf=mo(Re),Bf=go(Re),Gf=vo(Re),Wf=yo(Re),qf=_o(Re),Hf=bo(Re),Jf=$o(Re),Kf=xo(Re)});var ii={};He(ii,{ZodAny:()=>oh,ZodArray:()=>ch,ZodBase64:()=>Ms,ZodBase64URL:()=>Fs,ZodBigInt:()=>ln,ZodBigIntFormat:()=>Bs,ZodBoolean:()=>cn,ZodCIDRv4:()=>Us,ZodCIDRv6:()=>js,ZodCUID:()=>Cs,ZodCUID2:()=>As,ZodCatch:()=>Ch,ZodCodec:()=>vi,ZodCustom:()=>yi,ZodCustomStringFormat:()=>an,ZodDate:()=>fi,ZodDefault:()=>kh,ZodDiscriminatedUnion:()=>dh,ZodE164:()=>Vs,ZodEmail:()=>Ts,ZodEmoji:()=>Os,ZodEnum:()=>on,ZodExactOptional:()=>xh,ZodFile:()=>bh,ZodFunction:()=>Fh,ZodGUID:()=>ai,ZodIPv4:()=>Ds,ZodIPv6:()=>Ls,ZodIntersection:()=>fh,ZodJWT:()=>Zs,ZodKSUID:()=>Rs,ZodLazy:()=>Uh,ZodLiteral:()=>_h,ZodMAC:()=>Xf,ZodMap:()=>vh,ZodNaN:()=>zh,ZodNanoID:()=>Ps,ZodNever:()=>ah,ZodNonOptional:()=>Ks,ZodNull:()=>nh,ZodNullable:()=>Sh,ZodNumber:()=>un,ZodNumberFormat:()=>dr,ZodObject:()=>pi,ZodOptional:()=>Js,ZodPipe:()=>gi,ZodPrefault:()=>Eh,ZodPreprocess:()=>Nh,ZodPromise:()=>Mh,ZodReadonly:()=>Rh,ZodRecord:()=>nn,ZodSet:()=>yh,ZodString:()=>sn,ZodStringFormat:()=>J,ZodSuccess:()=>Ph,ZodSymbol:()=>th,ZodTemplateLiteral:()=>Lh,ZodTransform:()=>$h,ZodTuple:()=>ph,ZodType:()=>j,ZodULID:()=>zs,ZodURL:()=>di,ZodUUID:()=>ht,ZodUndefined:()=>rh,ZodUnion:()=>mi,ZodUnknown:()=>sh,ZodVoid:()=>uh,ZodXID:()=>Ns,ZodXor:()=>lh,_ZodString:()=>Es,_default:()=>Ih,_function:()=>gb,any:()=>q_,array:()=>hi,base64:()=>P_,base64url:()=>C_,bigint:()=>V_,boolean:()=>eh,catch:()=>Ah,check:()=>vb,cidrv4:()=>T_,cidrv6:()=>O_,codec:()=>fb,cuid:()=>b_,cuid2:()=>$_,custom:()=>yb,date:()=>J_,describe:()=>_b,discriminatedUnion:()=>tb,e164:()=>A_,email:()=>l_,emoji:()=>y_,enum:()=>qs,exactOptional:()=>wh,file:()=>ub,float32:()=>U_,float64:()=>j_,function:()=>gb,guid:()=>d_,hash:()=>L_,hex:()=>D_,hostname:()=>R_,httpUrl:()=>v_,instanceof:()=>$b,int:()=>ks,int32:()=>M_,int64:()=>Z_,intersection:()=>hh,invertCodec:()=>hb,ipv4:()=>k_,ipv6:()=>E_,json:()=>wb,jwt:()=>z_,keyof:()=>K_,ksuid:()=>S_,lazy:()=>jh,literal:()=>ab,looseObject:()=>Q_,looseRecord:()=>nb,mac:()=>I_,map:()=>ib,meta:()=>bb,nan:()=>db,nanoid:()=>__,nativeEnum:()=>sb,never:()=>Gs,nonoptional:()=>Oh,null:()=>ih,nullable:()=>ci,nullish:()=>cb,number:()=>Qf,object:()=>Y_,optional:()=>ui,partialRecord:()=>rb,pipe:()=>Is,prefault:()=>Th,preprocess:()=>Sb,promise:()=>mb,readonly:()=>Dh,record:()=>gh,refine:()=>Vh,set:()=>ob,strictObject:()=>X_,string:()=>si,stringFormat:()=>N_,stringbool:()=>xb,success:()=>lb,superRefine:()=>Zh,symbol:()=>G_,templateLiteral:()=>pb,transform:()=>Hs,tuple:()=>mh,uint32:()=>F_,uint64:()=>B_,ulid:()=>x_,undefined:()=>W_,union:()=>Ws,unknown:()=>lr,url:()=>g_,uuid:()=>f_,uuidv4:()=>h_,uuidv6:()=>p_,uuidv7:()=>m_,void:()=>H_,xid:()=>w_,xor:()=>eb});function li(t,e,n){let i=Object.getPrototypeOf(t),r=c_.get(i);if(r||(r=new Set,c_.set(i,r)),!r.has(e)){r.add(e);for(let o in n){let s=n[o];Object.defineProperty(i,o,{configurable:!0,enumerable:!1,get(){let a=s.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}}function si(t){return ld(sn,t)}function l_(t){return Zo(Ts,t)}function d_(t){return Qn(ai,t)}function f_(t){return Bo(ht,t)}function h_(t){return Go(ht,t)}function p_(t){return Wo(ht,t)}function m_(t){return qo(ht,t)}function g_(t){return ei(di,t)}function v_(t){return ei(di,{protocol:Fe.httpProtocol,hostname:Fe.domain,...x.normalizeParams(t)})}function y_(t){return Ho(Os,t)}function __(t){return Jo(Ps,t)}function b_(t){return Ko(Cs,t)}function $_(t){return Yo(As,t)}function x_(t){return Xo(zs,t)}function w_(t){return Qo(Ns,t)}function S_(t){return es(Rs,t)}function k_(t){return ts(Ds,t)}function I_(t){return fd(Xf,t)}function E_(t){return rs(Ls,t)}function T_(t){return ns(Us,t)}function O_(t){return is(js,t)}function P_(t){return os(Ms,t)}function C_(t){return ss(Fs,t)}function A_(t){return as(Vs,t)}function z_(t){return us(Zs,t)}function N_(t,e,n={}){return en(an,t,e,n)}function R_(t){return en(an,"hostname",Fe.hostname,t)}function D_(t){return en(an,"hex",Fe.hex,t)}function L_(t,e){let n=e?.enc??"hex",i=`${t}_${n}`,r=Fe[i];if(!r)throw new Error(`Unrecognized hash format: ${i}`);return en(an,i,r,e)}function Qf(t){return yd(un,t)}function ks(t){return bd(dr,t)}function U_(t){return $d(dr,t)}function j_(t){return xd(dr,t)}function M_(t){return wd(dr,t)}function F_(t){return Sd(dr,t)}function eh(t){return kd(cn,t)}function V_(t){return Ed(ln,t)}function Z_(t){return Od(Bs,t)}function B_(t){return Pd(Bs,t)}function G_(t){return Cd(th,t)}function W_(t){return Ad(rh,t)}function ih(t){return zd(nh,t)}function q_(){return Nd(oh)}function lr(){return Rd(sh)}function Gs(t){return Dd(ah,t)}function H_(t){return Ld(uh,t)}function J_(t){return Ud(fi,t)}function hi(t,e){return Fd(ch,t,e)}function K_(t){let e=t._zod.def.shape;return qs(Object.keys(e))}function Y_(t,e){let n={type:"object",shape:t??{},...x.normalizeParams(e)};return new pi(n)}function X_(t,e){return new pi({type:"object",shape:t,catchall:Gs(),...x.normalizeParams(e)})}function Q_(t,e){return new pi({type:"object",shape:t,catchall:lr(),...x.normalizeParams(e)})}function Ws(t,e){return new mi({type:"union",options:t,...x.normalizeParams(e)})}function eb(t,e){return new lh({type:"union",options:t,inclusive:!1,...x.normalizeParams(e)})}function tb(t,e,n){return new dh({type:"union",options:e,discriminator:t,...x.normalizeParams(n)})}function hh(t,e){return new fh({type:"intersection",left:t,right:e})}function mh(t,e,n){let i=e instanceof L,r=i?n:e,o=i?e:null;return new ph({type:"tuple",items:t,rest:o,...x.normalizeParams(r)})}function gh(t,e,n){return!e||!e._zod?new nn({type:"record",keyType:si(),valueType:t,...x.normalizeParams(e)}):new nn({type:"record",keyType:t,valueType:e,...x.normalizeParams(n)})}function rb(t,e,n){let i=Ie(t);return i._zod.values=void 0,new nn({type:"record",keyType:i,valueType:e,...x.normalizeParams(n)})}function nb(t,e,n){return new nn({type:"record",keyType:t,valueType:e,mode:"loose",...x.normalizeParams(n)})}function ib(t,e,n){return new vh({type:"map",keyType:t,valueType:e,...x.normalizeParams(n)})}function ob(t,e){return new yh({type:"set",valueType:t,...x.normalizeParams(e)})}function qs(t,e){let n=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new on({type:"enum",entries:n,...x.normalizeParams(e)})}function sb(t,e){return new on({type:"enum",entries:t,...x.normalizeParams(e)})}function ab(t,e){return new _h({type:"literal",values:Array.isArray(t)?t:[t],...x.normalizeParams(e)})}function ub(t){return Vd(bh,t)}function Hs(t){return new $h({type:"transform",transform:t})}function ui(t){return new Js({type:"optional",innerType:t})}function wh(t){return new xh({type:"optional",innerType:t})}function ci(t){return new Sh({type:"nullable",innerType:t})}function cb(t){return ui(ci(t))}function Ih(t,e){return new kh({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():x.shallowClone(e)}})}function Th(t,e){return new Eh({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():x.shallowClone(e)}})}function Oh(t,e){return new Ks({type:"nonoptional",innerType:t,...x.normalizeParams(e)})}function lb(t){return new Ph({type:"success",innerType:t})}function Ah(t,e){return new Ch({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}function db(t){return Md(zh,t)}function Is(t,e){return new gi({type:"pipe",in:t,out:e})}function fb(t,e,n){return new vi({type:"pipe",in:t,out:e,transform:n.decode,reverseTransform:n.encode})}function hb(t){let e=t._zod.def;return new vi({type:"pipe",in:e.out,out:e.in,transform:e.reverseTransform,reverseTransform:e.transform})}function Dh(t){return new Rh({type:"readonly",innerType:t})}function pb(t,e){return new Lh({type:"template_literal",parts:t,...x.normalizeParams(e)})}function jh(t){return new Uh({type:"lazy",getter:t})}function mb(t){return new Mh({type:"promise",innerType:t})}function gb(t){return new Fh({type:"function",input:Array.isArray(t?.input)?mh(t?.input):t?.input??hi(lr()),output:t?.output??lr()})}function vb(t){let e=new X({check:"custom"});return e._zod.check=t,e}function yb(t,e){return Zd(yi,t??(()=>!0),e)}function Vh(t,e={}){return Bd(yi,t,e)}function Zh(t,e){return Gd(t,e)}function $b(t,e={}){let n=new yi({type:"custom",check:"custom",fn:i=>i instanceof t,abort:!0,...x.normalizeParams(e)});return n._zod.bag.Class=t,n._zod.check=i=>{i.value instanceof t||i.issues.push({code:"invalid_type",expected:t.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}function wb(t){let e=jh(()=>Ws([si(t),Qf(),eh(),ih(),hi(e),gh(si(),e)]));return e}function Sb(t,e){return new Nh({type:"pipe",in:Hs(t),out:e})}var c_,j,Es,sn,J,Ts,ai,ht,di,Os,Ps,Cs,As,zs,Ns,Rs,Ds,Xf,Ls,Us,js,Ms,Fs,Vs,Zs,an,un,dr,cn,ln,Bs,th,rh,nh,oh,sh,ah,uh,fi,ch,pi,mi,lh,dh,fh,ph,nn,vh,yh,on,_h,bh,$h,Js,xh,Sh,kh,Eh,Ks,Ph,Ch,zh,gi,vi,Nh,Rh,Lh,Uh,Mh,Fh,yi,_b,bb,xb,oi=v(()=>{Ze();Ze();ri();ti();bs();ni();Yf();c_=new WeakMap;j=m("ZodType",(t,e)=>(L.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:tn(t,"input"),output:tn(t,"output")}}),t.toJSONSchema=Jd(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.parse=(n,i)=>jf(t,n,i,{callee:t.parse}),t.safeParse=(n,i)=>Ff(t,n,i),t.parseAsync=async(n,i)=>Mf(t,n,i,{callee:t.parseAsync}),t.safeParseAsync=async(n,i)=>Vf(t,n,i),t.spa=t.safeParseAsync,t.encode=(n,i)=>Zf(t,n,i),t.decode=(n,i)=>Bf(t,n,i),t.encodeAsync=async(n,i)=>Gf(t,n,i),t.decodeAsync=async(n,i)=>Wf(t,n,i),t.safeEncode=(n,i)=>qf(t,n,i),t.safeDecode=(n,i)=>Hf(t,n,i),t.safeEncodeAsync=async(n,i)=>Jf(t,n,i),t.safeDecodeAsync=async(n,i)=>Kf(t,n,i),li(t,"ZodType",{check(...n){let i=this.def;return this.clone(x.mergeDefs(i,{checks:[...i.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,i){return Ie(this,n,i)},brand(){return this},register(n,i){return n.add(this,i),this},refine(n,i){return this.check(Vh(n,i))},superRefine(n,i){return this.check(Zh(n,i))},overwrite(n){return this.check(st(n))},optional(){return ui(this)},exactOptional(){return wh(this)},nullable(){return ci(this)},nullish(){return ui(ci(this))},nonoptional(n){return Oh(this,n)},array(){return hi(this)},or(n){return Ws([this,n])},and(n){return hh(this,n)},transform(n){return Is(this,Hs(n))},default(n){return Ih(this,n)},prefault(n){return Th(this,n)},catch(n){return Ah(this,n)},pipe(n){return Is(this,n)},readonly(){return Dh(this)},describe(n){let i=this.clone();return ve.add(i,{description:n}),i},meta(...n){if(n.length===0)return ve.get(this);let i=this.clone();return ve.add(i,n[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(t,"description",{get(){return ve.get(t)?.description},configurable:!0}),t)),Es=m("_ZodString",(t,e)=>{sr.init(t,e),j.init(t,e),t._zod.processJSONSchema=(i,r,o)=>Kd(t,i,r,o);let n=t._zod.bag;t.format=n.format??null,t.minLength=n.minimum??null,t.maxLength=n.maximum??null,li(t,"_ZodString",{regex(...i){return this.check(Vr(...i))},includes(...i){return this.check(Gr(...i))},startsWith(...i){return this.check(Wr(...i))},endsWith(...i){return this.check(qr(...i))},min(...i){return this.check($t(...i))},max(...i){return this.check(ur(...i))},length(...i){return this.check(cr(...i))},nonempty(...i){return this.check($t(1,...i))},lowercase(i){return this.check(Zr(i))},uppercase(i){return this.check(Br(i))},trim(){return this.check(Kr())},normalize(...i){return this.check(Jr(...i))},toLowerCase(){return this.check(Yr())},toUpperCase(){return this.check(Xr())},slugify(){return this.check(Qr())}})}),sn=m("ZodString",(t,e)=>{sr.init(t,e),Es.init(t,e),t.email=n=>t.check(Zo(Ts,n)),t.url=n=>t.check(ei(di,n)),t.jwt=n=>t.check(us(Zs,n)),t.emoji=n=>t.check(Ho(Os,n)),t.guid=n=>t.check(Qn(ai,n)),t.uuid=n=>t.check(Bo(ht,n)),t.uuidv4=n=>t.check(Go(ht,n)),t.uuidv6=n=>t.check(Wo(ht,n)),t.uuidv7=n=>t.check(qo(ht,n)),t.nanoid=n=>t.check(Jo(Ps,n)),t.guid=n=>t.check(Qn(ai,n)),t.cuid=n=>t.check(Ko(Cs,n)),t.cuid2=n=>t.check(Yo(As,n)),t.ulid=n=>t.check(Xo(zs,n)),t.base64=n=>t.check(os(Ms,n)),t.base64url=n=>t.check(ss(Fs,n)),t.xid=n=>t.check(Qo(Ns,n)),t.ksuid=n=>t.check(es(Rs,n)),t.ipv4=n=>t.check(ts(Ds,n)),t.ipv6=n=>t.check(rs(Ls,n)),t.cidrv4=n=>t.check(ns(Us,n)),t.cidrv6=n=>t.check(is(js,n)),t.e164=n=>t.check(as(Vs,n)),t.datetime=n=>t.check(Nf(n)),t.date=n=>t.check(Rf(n)),t.time=n=>t.check(Df(n)),t.duration=n=>t.check(Lf(n))});J=m("ZodStringFormat",(t,e)=>{H.init(t,e),Es.init(t,e)}),Ts=m("ZodEmail",(t,e)=>{Kc.init(t,e),J.init(t,e)});ai=m("ZodGUID",(t,e)=>{Hc.init(t,e),J.init(t,e)});ht=m("ZodUUID",(t,e)=>{Jc.init(t,e),J.init(t,e)});di=m("ZodURL",(t,e)=>{Yc.init(t,e),J.init(t,e)});Os=m("ZodEmoji",(t,e)=>{Xc.init(t,e),J.init(t,e)});Ps=m("ZodNanoID",(t,e)=>{Qc.init(t,e),J.init(t,e)});Cs=m("ZodCUID",(t,e)=>{el.init(t,e),J.init(t,e)});As=m("ZodCUID2",(t,e)=>{tl.init(t,e),J.init(t,e)});zs=m("ZodULID",(t,e)=>{rl.init(t,e),J.init(t,e)});Ns=m("ZodXID",(t,e)=>{nl.init(t,e),J.init(t,e)});Rs=m("ZodKSUID",(t,e)=>{il.init(t,e),J.init(t,e)});Ds=m("ZodIPv4",(t,e)=>{cl.init(t,e),J.init(t,e)});Xf=m("ZodMAC",(t,e)=>{dl.init(t,e),J.init(t,e)});Ls=m("ZodIPv6",(t,e)=>{ll.init(t,e),J.init(t,e)});Us=m("ZodCIDRv4",(t,e)=>{fl.init(t,e),J.init(t,e)});js=m("ZodCIDRv6",(t,e)=>{hl.init(t,e),J.init(t,e)});Ms=m("ZodBase64",(t,e)=>{ml.init(t,e),J.init(t,e)});Fs=m("ZodBase64URL",(t,e)=>{gl.init(t,e),J.init(t,e)});Vs=m("ZodE164",(t,e)=>{vl.init(t,e),J.init(t,e)});Zs=m("ZodJWT",(t,e)=>{yl.init(t,e),J.init(t,e)});an=m("ZodCustomStringFormat",(t,e)=>{_l.init(t,e),J.init(t,e)});un=m("ZodNumber",(t,e)=>{zo.init(t,e),j.init(t,e),t._zod.processJSONSchema=(i,r,o)=>Yd(t,i,r,o),li(t,"ZodNumber",{gt(i,r){return this.check(dt(i,r))},gte(i,r){return this.check(Te(i,r))},min(i,r){return this.check(Te(i,r))},lt(i,r){return this.check(lt(i,r))},lte(i,r){return this.check(Ve(i,r))},max(i,r){return this.check(Ve(i,r))},int(i){return this.check(ks(i))},safe(i){return this.check(ks(i))},positive(i){return this.check(dt(0,i))},nonnegative(i){return this.check(Te(0,i))},negative(i){return this.check(lt(0,i))},nonpositive(i){return this.check(Ve(0,i))},multipleOf(i,r){return this.check(Ut(i,r))},step(i,r){return this.check(Ut(i,r))},finite(){return this}});let n=t._zod.bag;t.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),t.isFinite=!0,t.format=n.format??null});dr=m("ZodNumberFormat",(t,e)=>{bl.init(t,e),un.init(t,e)});cn=m("ZodBoolean",(t,e)=>{qn.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Xd(t,n,i,r)});ln=m("ZodBigInt",(t,e)=>{No.init(t,e),j.init(t,e),t._zod.processJSONSchema=(i,r,o)=>Qd(t,i,r,o),t.gte=(i,r)=>t.check(Te(i,r)),t.min=(i,r)=>t.check(Te(i,r)),t.gt=(i,r)=>t.check(dt(i,r)),t.gte=(i,r)=>t.check(Te(i,r)),t.min=(i,r)=>t.check(Te(i,r)),t.lt=(i,r)=>t.check(lt(i,r)),t.lte=(i,r)=>t.check(Ve(i,r)),t.max=(i,r)=>t.check(Ve(i,r)),t.positive=i=>t.check(dt(BigInt(0),i)),t.negative=i=>t.check(lt(BigInt(0),i)),t.nonpositive=i=>t.check(Ve(BigInt(0),i)),t.nonnegative=i=>t.check(Te(BigInt(0),i)),t.multipleOf=(i,r)=>t.check(Ut(i,r));let n=t._zod.bag;t.minValue=n.minimum??null,t.maxValue=n.maximum??null,t.format=n.format??null});Bs=m("ZodBigIntFormat",(t,e)=>{$l.init(t,e),ln.init(t,e)});th=m("ZodSymbol",(t,e)=>{xl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>ef(t,n,i,r)});rh=m("ZodUndefined",(t,e)=>{wl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>rf(t,n,i,r)});nh=m("ZodNull",(t,e)=>{Sl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>tf(t,n,i,r)});oh=m("ZodAny",(t,e)=>{kl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>sf(t,n,i,r)});sh=m("ZodUnknown",(t,e)=>{Il.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>af(t,n,i,r)});ah=m("ZodNever",(t,e)=>{El.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>of(t,n,i,r)});uh=m("ZodVoid",(t,e)=>{Tl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>nf(t,n,i,r)});fi=m("ZodDate",(t,e)=>{Ol.init(t,e),j.init(t,e),t._zod.processJSONSchema=(i,r,o)=>uf(t,i,r,o),t.min=(i,r)=>t.check(Te(i,r)),t.max=(i,r)=>t.check(Ve(i,r));let n=t._zod.bag;t.minDate=n.minimum?new Date(n.minimum):null,t.maxDate=n.maximum?new Date(n.maximum):null});ch=m("ZodArray",(t,e)=>{Pl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>bf(t,n,i,r),t.element=e.element,li(t,"ZodArray",{min(n,i){return this.check($t(n,i))},nonempty(n){return this.check($t(1,n))},max(n,i){return this.check(ur(n,i))},length(n,i){return this.check(cr(n,i))},unwrap(){return this.element}})});pi=m("ZodObject",(t,e)=>{Cl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>$f(t,n,i,r),x.defineLazy(t,"shape",()=>e.shape),li(t,"ZodObject",{keyof(){return qs(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:lr()})},loose(){return this.clone({...this._zod.def,catchall:lr()})},strict(){return this.clone({...this._zod.def,catchall:Gs()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return x.extend(this,n)},safeExtend(n){return x.safeExtend(this,n)},merge(n){return x.merge(this,n)},pick(n){return x.pick(this,n)},omit(n){return x.omit(this,n)},partial(...n){return x.partial(Js,this,n[0])},required(...n){return x.required(Ks,this,n[0])}})});mi=m("ZodUnion",(t,e)=>{Hn.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>ms(t,n,i,r),t.options=e.options});lh=m("ZodXor",(t,e)=>{mi.init(t,e),Al.init(t,e),t._zod.processJSONSchema=(n,i,r)=>ms(t,n,i,r),t.options=e.options});dh=m("ZodDiscriminatedUnion",(t,e)=>{mi.init(t,e),zl.init(t,e)});fh=m("ZodIntersection",(t,e)=>{Nl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>xf(t,n,i,r)});ph=m("ZodTuple",(t,e)=>{Ro.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>wf(t,n,i,r),t.rest=n=>t.clone({...t._zod.def,rest:n})});nn=m("ZodRecord",(t,e)=>{Rl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Sf(t,n,i,r),t.keyType=e.keyType,t.valueType=e.valueType});vh=m("ZodMap",(t,e)=>{Dl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>yf(t,n,i,r),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...n)=>t.check(ft(...n)),t.nonempty=n=>t.check(ft(1,n)),t.max=(...n)=>t.check(jt(...n)),t.size=(...n)=>t.check(ar(...n))});yh=m("ZodSet",(t,e)=>{Ll.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>_f(t,n,i,r),t.min=(...n)=>t.check(ft(...n)),t.nonempty=n=>t.check(ft(1,n)),t.max=(...n)=>t.check(jt(...n)),t.size=(...n)=>t.check(ar(...n))});on=m("ZodEnum",(t,e)=>{Ul.init(t,e),j.init(t,e),t._zod.processJSONSchema=(i,r,o)=>cf(t,i,r,o),t.enum=e.entries,t.options=Object.values(e.entries);let n=new Set(Object.keys(e.entries));t.extract=(i,r)=>{let o={};for(let s of i)if(n.has(s))o[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new on({...e,checks:[],...x.normalizeParams(r),entries:o})},t.exclude=(i,r)=>{let o={...e.entries};for(let s of i)if(n.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new on({...e,checks:[],...x.normalizeParams(r),entries:o})}});_h=m("ZodLiteral",(t,e)=>{jl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>lf(t,n,i,r),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]}})});bh=m("ZodFile",(t,e)=>{Ml.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>hf(t,n,i,r),t.min=(n,i)=>t.check(ft(n,i)),t.max=(n,i)=>t.check(jt(n,i)),t.mime=(n,i)=>t.check(Hr(Array.isArray(n)?n:[n],i))});$h=m("ZodTransform",(t,e)=>{Fl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>vf(t,n,i,r),t._zod.parse=(n,i)=>{if(i.direction==="backward")throw new zt(t.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(x.issue(o,n.value,e));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),n.issues.push(x.issue(s))}};let r=e.transform(n.value,n);return r instanceof Promise?r.then(o=>(n.value=o,n.fallback=!0,n)):(n.value=r,n.fallback=!0,n)}});Js=m("ZodOptional",(t,e)=>{Do.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>gs(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});xh=m("ZodExactOptional",(t,e)=>{Vl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>gs(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});Sh=m("ZodNullable",(t,e)=>{Zl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>kf(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});kh=m("ZodDefault",(t,e)=>{Bl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Ef(t,n,i,r),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});Eh=m("ZodPrefault",(t,e)=>{Gl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Tf(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});Ks=m("ZodNonOptional",(t,e)=>{Wl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>If(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});Ph=m("ZodSuccess",(t,e)=>{ql.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>pf(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});Ch=m("ZodCatch",(t,e)=>{Hl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Of(t,n,i,r),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});zh=m("ZodNaN",(t,e)=>{Jl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>df(t,n,i,r)});gi=m("ZodPipe",(t,e)=>{Lo.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Pf(t,n,i,r),t.in=e.in,t.out=e.out});vi=m("ZodCodec",(t,e)=>{gi.init(t,e),Jn.init(t,e)});Nh=m("ZodPreprocess",(t,e)=>{gi.init(t,e),Kl.init(t,e)}),Rh=m("ZodReadonly",(t,e)=>{Yl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Cf(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});Lh=m("ZodTemplateLiteral",(t,e)=>{Xl.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>ff(t,n,i,r)});Uh=m("ZodLazy",(t,e)=>{td.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>zf(t,n,i,r),t.unwrap=()=>t._zod.def.getter()});Mh=m("ZodPromise",(t,e)=>{ed.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Af(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});Fh=m("ZodFunction",(t,e)=>{Ql.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>gf(t,n,i,r)});yi=m("ZodCustom",(t,e)=>{rd.init(t,e),j.init(t,e),t._zod.processJSONSchema=(n,i,r)=>mf(t,n,i,r)});_b=Wd,bb=qd;xb=(...t)=>Hd({Codec:vi,Boolean:cn,String:sn},...t)});function Q1(t){oe({customError:t})}function eT(){return oe().customError}var X1,Bh,kb=v(()=>{Ze();X1={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"};Bh||(Bh={})});function rT(t,e){let n=t.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":e??"draft-2020-12"}function nT(t,e){if(!t.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=t.slice(1).split("/").filter(Boolean);if(n.length===0)return e.rootSchema;let i=e.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let r=n[1];if(!r||!e.defs[r])throw new Error(`Reference not found: ${t}`);return e.defs[r]}throw new Error(`Reference not found: ${t}`)}function Ib(t,e){if(t.not!==void 0){if(typeof t.not=="object"&&Object.keys(t.not).length===0)return E.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(t.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(t.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(t.if!==void 0||t.then!==void 0||t.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(t.dependentSchemas!==void 0||t.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(t.$ref){let r=t.$ref;if(e.refs.has(r))return e.refs.get(r);if(e.processing.has(r))return E.lazy(()=>{if(!e.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return e.refs.get(r)});e.processing.add(r);let o=nT(r,e),s=xe(o,e);return e.refs.set(r,s),e.processing.delete(r),s}if(t.enum!==void 0){let r=t.enum;if(e.version==="openapi-3.0"&&t.nullable===!0&&r.length===1&&r[0]===null)return E.null();if(r.length===0)return E.never();if(r.length===1)return E.literal(r[0]);if(r.every(s=>typeof s=="string"))return E.enum(r);let o=r.map(s=>E.literal(s));return o.length<2?o[0]:E.union([o[0],o[1],...o.slice(2)])}if(t.const!==void 0)return E.literal(t.const);let n=t.type;if(Array.isArray(n)){let r=n.map(o=>{let s={...t,type:o};return Ib(s,e)});return r.length===0?E.never():r.length===1?r[0]:E.union(r)}if(!n)return E.any();let i;switch(n){case"string":{let r=E.string();if(t.format){let o=t.format;o==="email"?r=r.check(E.email()):o==="uri"||o==="uri-reference"?r=r.check(E.url()):o==="uuid"||o==="guid"?r=r.check(E.uuid()):o==="date-time"?r=r.check(E.iso.datetime()):o==="date"?r=r.check(E.iso.date()):o==="time"?r=r.check(E.iso.time()):o==="duration"?r=r.check(E.iso.duration()):o==="ipv4"?r=r.check(E.ipv4()):o==="ipv6"?r=r.check(E.ipv6()):o==="mac"?r=r.check(E.mac()):o==="cidr"?r=r.check(E.cidrv4()):o==="cidr-v6"?r=r.check(E.cidrv6()):o==="base64"?r=r.check(E.base64()):o==="base64url"?r=r.check(E.base64url()):o==="e164"?r=r.check(E.e164()):o==="jwt"?r=r.check(E.jwt()):o==="emoji"?r=r.check(E.emoji()):o==="nanoid"?r=r.check(E.nanoid()):o==="cuid"?r=r.check(E.cuid()):o==="cuid2"?r=r.check(E.cuid2()):o==="ulid"?r=r.check(E.ulid()):o==="xid"?r=r.check(E.xid()):o==="ksuid"&&(r=r.check(E.ksuid()))}typeof t.minLength=="number"&&(r=r.min(t.minLength)),typeof t.maxLength=="number"&&(r=r.max(t.maxLength)),t.pattern&&(r=r.regex(new RegExp(t.pattern))),i=r;break}case"number":case"integer":{let r=n==="integer"?E.number().int():E.number();typeof t.minimum=="number"&&(r=r.min(t.minimum)),typeof t.maximum=="number"&&(r=r.max(t.maximum)),typeof t.exclusiveMinimum=="number"?r=r.gt(t.exclusiveMinimum):t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(r=r.gt(t.minimum)),typeof t.exclusiveMaximum=="number"?r=r.lt(t.exclusiveMaximum):t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(r=r.lt(t.maximum)),typeof t.multipleOf=="number"&&(r=r.multipleOf(t.multipleOf)),i=r;break}case"boolean":{i=E.boolean();break}case"null":{i=E.null();break}case"object":{let r={},o=t.properties||{},s=new Set(t.required||[]);for(let[u,c]of Object.entries(o)){let l=xe(c,e);r[u]=s.has(u)?l:l.optional()}if(t.propertyNames){let u=xe(t.propertyNames,e),c=t.additionalProperties&&typeof t.additionalProperties=="object"?xe(t.additionalProperties,e):E.any();if(Object.keys(r).length===0){i=E.record(u,c);break}let l=E.object(r).passthrough(),d=E.looseRecord(u,c);i=E.intersection(l,d);break}if(t.patternProperties){let u=t.patternProperties,c=Object.keys(u),l=[];for(let f of c){let h=xe(u[f],e),p=E.string().regex(new RegExp(f));l.push(E.looseRecord(p,h))}let d=[];if(Object.keys(r).length>0&&d.push(E.object(r).passthrough()),d.push(...l),d.length===0)i=E.object({}).passthrough();else if(d.length===1)i=d[0];else{let f=E.intersection(d[0],d[1]);for(let h=2;h<d.length;h++)f=E.intersection(f,d[h]);i=f}break}let a=E.object(r);t.additionalProperties===!1?i=a.strict():typeof t.additionalProperties=="object"?i=a.catchall(xe(t.additionalProperties,e)):i=a.passthrough();break}case"array":{let r=t.prefixItems,o=t.items;if(r&&Array.isArray(r)){let s=r.map(u=>xe(u,e)),a=o&&typeof o=="object"&&!Array.isArray(o)?xe(o,e):void 0;a?i=E.tuple(s).rest(a):i=E.tuple(s),typeof t.minItems=="number"&&(i=i.check(E.minLength(t.minItems))),typeof t.maxItems=="number"&&(i=i.check(E.maxLength(t.maxItems)))}else if(Array.isArray(o)){let s=o.map(u=>xe(u,e)),a=t.additionalItems&&typeof t.additionalItems=="object"?xe(t.additionalItems,e):void 0;a?i=E.tuple(s).rest(a):i=E.tuple(s),typeof t.minItems=="number"&&(i=i.check(E.minLength(t.minItems))),typeof t.maxItems=="number"&&(i=i.check(E.maxLength(t.maxItems)))}else if(o!==void 0){let s=xe(o,e),a=E.array(s);typeof t.minItems=="number"&&(a=a.min(t.minItems)),typeof t.maxItems=="number"&&(a=a.max(t.maxItems)),i=a}else i=E.array(E.any());break}default:throw new Error(`Unsupported type: ${n}`)}return i}function xe(t,e){if(typeof t=="boolean")return t?E.any():E.never();let n=Ib(t,e),i=t.type||t.enum!==void 0||t.const!==void 0;if(t.anyOf&&Array.isArray(t.anyOf)){let a=t.anyOf.map(c=>xe(c,e)),u=E.union(a);n=i?E.intersection(n,u):u}if(t.oneOf&&Array.isArray(t.oneOf)){let a=t.oneOf.map(c=>xe(c,e)),u=E.xor(a);n=i?E.intersection(n,u):u}if(t.allOf&&Array.isArray(t.allOf))if(t.allOf.length===0)n=i?n:E.any();else{let a=i?n:xe(t.allOf[0],e),u=i?0:1;for(let c=u;c<t.allOf.length;c++)a=E.intersection(a,xe(t.allOf[c],e));n=a}t.nullable===!0&&e.version==="openapi-3.0"&&(n=E.nullable(n)),t.readOnly===!0&&(n=E.readonly(n)),t.default!==void 0&&(n=n.default(t.default));let r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of o)a in t&&(r[a]=t[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in t&&(r[a]=t[a]);for(let a of Object.keys(t))tT.has(a)||(r[a]=t[a]);return Object.keys(r).length>0&&e.registry.add(n,r),t.description&&(n=n.describe(t.description)),n}function Eb(t,e){if(typeof t=="boolean")return t?E.any():E.never();let n;try{n=JSON.parse(JSON.stringify(t))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=rT(n,e?.defaultTarget),r=n.$defs||n.definitions||{},o={version:i,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:e?.registry??ve};return xe(n,o)}var E,tT,Tb=v(()=>{Xn();bs();ni();oi();E={...ii,..._s,iso:rn},tT=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var Gh={};He(Gh,{bigint:()=>aT,boolean:()=>sT,date:()=>uT,number:()=>oT,string:()=>iT});function iT(t){return dd(sn,t)}function oT(t){return _d(un,t)}function sT(t){return Id(cn,t)}function aT(t){return Td(ln,t)}function uT(t){return jd(fi,t)}var Ob=v(()=>{Ze();oi()});var me={};He(me,{$brand:()=>zu,$input:()=>cd,$output:()=>ud,NEVER:()=>Au,TimePrecision:()=>hd,ZodAny:()=>oh,ZodArray:()=>ch,ZodBase64:()=>Ms,ZodBase64URL:()=>Fs,ZodBigInt:()=>ln,ZodBigIntFormat:()=>Bs,ZodBoolean:()=>cn,ZodCIDRv4:()=>Us,ZodCIDRv6:()=>js,ZodCUID:()=>Cs,ZodCUID2:()=>As,ZodCatch:()=>Ch,ZodCodec:()=>vi,ZodCustom:()=>yi,ZodCustomStringFormat:()=>an,ZodDate:()=>fi,ZodDefault:()=>kh,ZodDiscriminatedUnion:()=>dh,ZodE164:()=>Vs,ZodEmail:()=>Ts,ZodEmoji:()=>Os,ZodEnum:()=>on,ZodError:()=>K1,ZodExactOptional:()=>xh,ZodFile:()=>bh,ZodFirstPartyTypeKind:()=>Bh,ZodFunction:()=>Fh,ZodGUID:()=>ai,ZodIPv4:()=>Ds,ZodIPv6:()=>Ls,ZodISODate:()=>xs,ZodISODateTime:()=>$s,ZodISODuration:()=>Ss,ZodISOTime:()=>ws,ZodIntersection:()=>fh,ZodIssueCode:()=>X1,ZodJWT:()=>Zs,ZodKSUID:()=>Rs,ZodLazy:()=>Uh,ZodLiteral:()=>_h,ZodMAC:()=>Xf,ZodMap:()=>vh,ZodNaN:()=>zh,ZodNanoID:()=>Ps,ZodNever:()=>ah,ZodNonOptional:()=>Ks,ZodNull:()=>nh,ZodNullable:()=>Sh,ZodNumber:()=>un,ZodNumberFormat:()=>dr,ZodObject:()=>pi,ZodOptional:()=>Js,ZodPipe:()=>gi,ZodPrefault:()=>Eh,ZodPreprocess:()=>Nh,ZodPromise:()=>Mh,ZodReadonly:()=>Rh,ZodRealError:()=>Re,ZodRecord:()=>nn,ZodSet:()=>yh,ZodString:()=>sn,ZodStringFormat:()=>J,ZodSuccess:()=>Ph,ZodSymbol:()=>th,ZodTemplateLiteral:()=>Lh,ZodTransform:()=>$h,ZodTuple:()=>ph,ZodType:()=>j,ZodULID:()=>zs,ZodURL:()=>di,ZodUUID:()=>ht,ZodUndefined:()=>rh,ZodUnion:()=>mi,ZodUnknown:()=>sh,ZodVoid:()=>uh,ZodXID:()=>Ns,ZodXor:()=>lh,_ZodString:()=>Es,_default:()=>Ih,_function:()=>gb,any:()=>q_,array:()=>hi,base64:()=>P_,base64url:()=>C_,bigint:()=>V_,boolean:()=>eh,catch:()=>Ah,check:()=>vb,cidrv4:()=>T_,cidrv6:()=>O_,clone:()=>Ie,codec:()=>fb,coerce:()=>Gh,config:()=>oe,core:()=>xt,cuid:()=>b_,cuid2:()=>$_,custom:()=>yb,date:()=>J_,decode:()=>Bf,decodeAsync:()=>Wf,describe:()=>_b,discriminatedUnion:()=>tb,e164:()=>A_,email:()=>l_,emoji:()=>y_,encode:()=>Zf,encodeAsync:()=>Gf,endsWith:()=>qr,enum:()=>qs,exactOptional:()=>wh,file:()=>ub,flattenError:()=>Vn,float32:()=>U_,float64:()=>j_,formatError:()=>Zn,fromJSONSchema:()=>Eb,function:()=>gb,getErrorMap:()=>eT,globalRegistry:()=>ve,gt:()=>dt,gte:()=>Te,guid:()=>d_,hash:()=>L_,hex:()=>D_,hostname:()=>R_,httpUrl:()=>v_,includes:()=>Gr,instanceof:()=>$b,int:()=>ks,int32:()=>M_,int64:()=>Z_,intersection:()=>hh,invertCodec:()=>hb,ipv4:()=>k_,ipv6:()=>E_,iso:()=>rn,json:()=>wb,jwt:()=>z_,keyof:()=>K_,ksuid:()=>S_,lazy:()=>jh,length:()=>cr,literal:()=>ab,locales:()=>Yn,looseObject:()=>Q_,looseRecord:()=>nb,lowercase:()=>Zr,lt:()=>lt,lte:()=>Ve,mac:()=>I_,map:()=>ib,maxLength:()=>ur,maxSize:()=>jt,meta:()=>bb,mime:()=>Hr,minLength:()=>$t,minSize:()=>ft,multipleOf:()=>Ut,nan:()=>db,nanoid:()=>__,nativeEnum:()=>sb,negative:()=>ls,never:()=>Gs,nonnegative:()=>fs,nonoptional:()=>Oh,nonpositive:()=>ds,normalize:()=>Jr,null:()=>ih,nullable:()=>ci,nullish:()=>cb,number:()=>Qf,object:()=>Y_,optional:()=>ui,overwrite:()=>st,parse:()=>jf,parseAsync:()=>Mf,partialRecord:()=>rb,pipe:()=>Is,positive:()=>cs,prefault:()=>Th,preprocess:()=>Sb,prettifyError:()=>Wu,promise:()=>mb,property:()=>hs,readonly:()=>Dh,record:()=>gh,refine:()=>Vh,regex:()=>Vr,regexes:()=>Fe,registry:()=>Vo,safeDecode:()=>Hf,safeDecodeAsync:()=>Kf,safeEncode:()=>qf,safeEncodeAsync:()=>Jf,safeParse:()=>Ff,safeParseAsync:()=>Vf,set:()=>ob,setErrorMap:()=>Q1,size:()=>ar,slugify:()=>Qr,startsWith:()=>Wr,strictObject:()=>X_,string:()=>si,stringFormat:()=>N_,stringbool:()=>xb,success:()=>lb,superRefine:()=>Zh,symbol:()=>G_,templateLiteral:()=>pb,toJSONSchema:()=>vs,toLowerCase:()=>Yr,toUpperCase:()=>Xr,transform:()=>Hs,treeifyError:()=>Gu,trim:()=>Kr,tuple:()=>mh,uint32:()=>F_,uint64:()=>B_,ulid:()=>x_,undefined:()=>W_,union:()=>Ws,unknown:()=>lr,uppercase:()=>Br,url:()=>g_,util:()=>x,uuid:()=>f_,uuidv4:()=>h_,uuidv6:()=>p_,uuidv7:()=>m_,void:()=>H_,xid:()=>w_,xor:()=>eb});var Wh=v(()=>{Ze();oi();bs();Uf();Yf();kb();Ze();id();Ze();ri();Tb();ad();ni();ni();Ob();oe(Uo())});var Pb=v(()=>{Wh();Wh()});var cT,Ys,fr,Cb=v(()=>{"use strict";Pb();cT=me.enum(["debug","info","warn","error"]),Ys=me.object({provider:me.string(),model:me.string(),gateway:me.string().nullable().optional()}),fr=me.object({version:me.number().default(1),routes:me.object({stt:Ys.optional(),tts:Ys.optional(),text:Ys.optional(),embedding:Ys.optional()}).optional(),secrets:me.record(me.string(),me.string()).optional(),defaults:me.object({logLevel:cT.default("info"),modality:me.enum(["voice","text"]).default("voice")}).default({logLevel:"info",modality:"voice"}),upgrade:me.object({auto:me.boolean().default(!1)}).default({auto:!1})})});var De=v(()=>{"use strict";Tg();Og();Cu();Cb()});import{mkdirSync as lT}from"node:fs";import{homedir as dT}from"node:os";import{join as Ab,resolve as fT}from"node:path";var qh,Be,hr=v(()=>{"use strict";Cu();qh=class{dirName=".jarvis";dir(){let e=process.env[Pg]?.trim();return e?fT(e):Ab(dT(),this.dirName)}resolve(...e){return Ab(this.dir(),...e)}ensureDir(){let e=this.dir();return lT(e,{recursive:!0,mode:448}),e}},Be=new qh});import{chmodSync as hT,existsSync as pT,readFileSync as mT,writeFileSync as gT}from"node:fs";function Nb(t){switch(t){case"debug":case"info":case"warn":case"error":return t;default:return}}var zb,pr,Hh=v(()=>{"use strict";De();hr();zb="config.json",pr=class t{home;config;constructor(e=Be){this.home=e,this.config=this.load()}configPath(){return this.home.resolve(zb)}load(){let e=this.configPath(),n=pT(e)?this.readFile(e):{},i=fr.safeParse(n);if(!i.success)throw new Error(`invalid Jarvis config at ${e}: ${i.error.message}`);return i.data}readFile(e){let n;try{n=mT(e,"utf8")}catch(i){throw new Error(`could not read Jarvis config at ${e}`,{cause:i})}try{return JSON.parse(n)}catch(i){throw new Error(`Jarvis config at ${e} is not valid JSON`,{cause:i})}}resolved(){return this.config}get logLevel(){return Nb(process.env.JARVIS_LOG_LEVEL)??Nb(process.env.LOG_LEVEL)??this.config.defaults.logLevel}secret(e){return this.config.secrets?.[e]}save(e){t.persist(this.home,e)}static persist(e,n){let i=fr.parse(n);e.ensureDir();let r=e.resolve(zb);gT(r,JSON.stringify(i,null,2)+`
68
+ `,{mode:384}),hT(r,384)}}});function $T(t,e){let n=t;for(let i of e){if(n===null||typeof n!="object")return;n=n[i]}return n}function xT(t,e,n){let i=t;for(let r=0;r<e.length-1;r++){let o=e[r],s=i[o];(s===null||typeof s!="object")&&(i[o]={}),i=i[o]}i[e[e.length-1]]=n}function wT(t,e){let n=t;for(let r=0;r<e.length-1;r++){let o=n[e[r]];if(o===null||typeof o!="object")return!1;n=o}let i=e[e.length-1];return i in n?(delete n[i],!0):!1}var vT,yT,_T,bT,Ge,Jh=v(()=>{"use strict";De();hr();Hh();vT="<set>",yT=new Set(["upgrade.auto"]),_T=new Set(["version"]),bT=new Set(["__proto__","prototype","constructor"]),Ge=class{home;constructor(e=Be){this.home=e}freshResolver(){return new pr(this.home)}resolved(){return this.freshResolver().resolved()}list(){return this.redact(this.freshResolver().resolved())}get(e){return $T(this.list(),this.parsePath(e))}set(e,n){let i=this.parsePath(e);this.assertMutable(e);let r=this.freshResolver(),o=structuredClone(r.resolved());xT(o,i,this.coerce(e,n)),r.save(this.validate(o,e))}unset(e){let n=this.parsePath(e);this.assertMutable(e);let i=this.freshResolver(),r=structuredClone(i.resolved());if(!wT(r,n))throw new Error(`nothing to unset: '${e}' is not set`);i.save(this.validate(r,e))}write(e){pr.persist(this.home,e)}validate(e,n){let i=fr.safeParse(e);if(i.success)return i.data;let r=i.error.issues.map(s=>`${s.path.join(".")}: ${s.message}`).join("; "),o=n.startsWith("routes.")?" A route needs both a provider and a model - run 'jarvis init' to configure one.":"";throw new Error(`'${n}' would make the config invalid (${r}).${o}`)}coerce(e,n){if(yT.has(e)){if(n==="true")return!0;if(n==="false")return!1;throw new Error(`'${e}' expects 'true' or 'false', got '${n}'`)}return n}assertMutable(e){if(_T.has(e))throw new Error(`'${e}' is managed by Jarvis and cannot be changed`)}parsePath(e){let n=e.split(".");if(e.length===0||n.some(i=>i.length===0||bT.has(i)))throw new Error(`invalid config path: '${e}'`);return n}redact(e){let n=structuredClone(e);if(n.secrets)for(let i of Object.keys(n.secrets))n.secrets[i]=vT;return n}}});async function*Db(t,e={}){let{signal:n,idleTimeoutMs:i}=e,r=t.getReader(),o=new TextDecoder,s="",a=[];try{for(;;){let{value:u,done:c}=await ST(r,n,i);if(c)break;s+=o.decode(u,{stream:!0});let l;for(;(l=s.indexOf(`
69
69
  `))!==-1;){let d=s.slice(0,l);if(s=s.slice(l+1),d.endsWith("\r")&&(d=d.slice(0,-1)),d===""){a.length>0&&(yield a.join(`
70
- `),a=[]);continue}if(d.startsWith(":"))continue;let f=d.indexOf(":");if((f===-1?d:d.slice(0,f))!=="data")continue;let h=f===-1?"":d.slice(f+1);h.startsWith(" ")&&(h=h.slice(1)),a.push(h)}}}finally{r.cancel().catch(()=>{})}}function pT(t,e,n){return e?.aborted?Promise.reject(T$(e)):new Promise((i,r)=>{let o=!1,s=c=>{o||(o=!0,u!==void 0&&clearTimeout(u),e?.removeEventListener("abort",a),c())},a=()=>s(()=>r(T$(e))),u=n!==void 0?setTimeout(()=>s(()=>r(new Ks(n))),n):void 0;e?.addEventListener("abort",a,{once:!0}),t.read().then(c=>s(()=>i(c)),c=>s(()=>r(hT(c))))})}function T$(t){let e=t?.reason;return e instanceof Error?e:new Error("text stream aborted")}function hT(t){return t instanceof Error?t:new Error(String(t))}var Ks,qp=v(()=>{"use strict";Ks=class extends Error{constructor(e){super(`text stream idle for ${e}ms`),this.name="IdleTimeoutError"}}});var Zt,Hp=v(()=>{"use strict";Zt=class extends Error{status;constructor(e,n){super(e),this.status=n,this.name="TextAdapterError"}}});function P$(t){try{return JSON.parse(t)}catch{return}}function ln(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)?t:void 0}function _T(t){return Array.isArray(t)?t:void 0}function C$(t){let e=ln(t)?.message;return typeof e=="string"?e:"unknown error"}var Xs,mT,gT,vT,yT,Ys,vi,yi,Jp=v(()=>{"use strict";qp();Hp();Xs=3e4,mT=4096,gT="https://api.anthropic.com/v1/messages",vT="2023-06-01",yT="https://api.openai.com/v1/chat/completions",Ys=class{key;fetchImpl;idleTimeoutMs;constructor(e,n=fetch,i=Xs){this.key=e,this.fetchImpl=n,this.idleTimeoutMs=i}async*stream(e){let{url:n,init:i}=this.buildRequest(e),r=await this.fetchImpl(n,{...i,signal:e.signal});if(!r.ok)throw new Zt(`text provider request failed (HTTP ${r.status})`,r.status);if(!r.body)throw new Zt("text provider response had no body");for await(let o of O$(r.body,{signal:e.signal,idleTimeoutMs:this.idleTimeoutMs})){if(this.isDone(o))return;let s=this.decode(o);s&&(yield s)}}},vi=class extends Ys{buildRequest(e){let n={model:e.model,max_tokens:mT,stream:!0,messages:e.messages.map(i=>({role:i.role,content:i.content})),...e.system!==void 0&&{system:e.system}};return{url:gT,init:{method:"POST",headers:{"x-api-key":this.key,"anthropic-version":vT,"content-type":"application/json"},body:JSON.stringify(n)}}}isDone(){return!1}decode(e){let n=ln(P$(e));if(!n)return null;if(n.type==="error")throw new Zt(`anthropic stream error: ${C$(n.error)}`);if(n.type==="content_block_delta"){let i=ln(n.delta);if(i?.type==="text_delta"&&typeof i.text=="string")return{type:"text",text:i.text}}return null}},yi=class extends Ys{buildRequest(e){let n=e.system!==void 0?[{role:"system",content:e.system},...e.messages]:e.messages,i={model:e.model,stream:!0,messages:n};return{url:yT,init:{method:"POST",headers:{Authorization:`Bearer ${this.key}`,"content-type":"application/json"},body:JSON.stringify(i)}}}isDone(e){return e==="[DONE]"}decode(e){let n=ln(P$(e));if(!n)return null;if(n.error)throw new Zt(`openai stream error: ${C$(n.error)}`);let i=_T(n.choices),r=i?ln(i[0])?.delta:void 0,o=ln(r)?.content;return typeof o=="string"&&o.length>0?{type:"text",text:o}:null}}});var _i,Kp=v(()=>{"use strict";Jp();_i=class{fetchImpl;idleTimeoutMs;constructor(e=fetch,n=Xs){this.fetchImpl=e,this.idleTimeoutMs=n}textAdapter(e,n){switch(e.provider){case"anthropic":return new vi(n,this.fetchImpl,this.idleTimeoutMs);case"openai":return new yi(n,this.fetchImpl,this.idleTimeoutMs);default:throw new Error(`no text adapter for provider '${e.provider}'`)}}}});var Le,A$=v(()=>{"use strict";Le=class extends Error{commandId;reason;constructor(e,n,i){super(i??`send rejected (${n}) for command ${e}`),this.commandId=e,this.reason=n,this.name="SessionSendError"}}});var z$=v(()=>{"use strict"});var $i=v(()=>{"use strict";A$();z$()});var N$,bi,Yp=v(()=>{"use strict";N$="You are Jarvis, a voice-first personal agent and a continuous, trusted collaborator - not a disposable chat assistant. You help with software engineering work. Be concise, direct, and technical; skip filler and preamble. When you are unsure, say so plainly rather than guessing. You reason and explain; you do not yet take actions or use tools, so propose the next steps for the human to run rather than claiming to have run them.",bi=class{adapter;model;systemPrompt;history=[];constructor(e,n,i=N$){this.adapter=e,this.model=n,this.systemPrompt=i}async*run(e,n){if(e.trim()==="")return;let i=this.assemble(e),r="";for await(let o of this.adapter.stream({model:this.model,system:this.systemPrompt,messages:i,...n!==void 0&&{signal:n}}))r+=o.text,yield o;this.history.push({role:"user",content:e},{role:"assistant",content:r})}historySnapshot(){return[...this.history]}assemble(e){return[...this.history,{role:"user",content:e}]}}});var Qs,R$=v(()=>{"use strict";Qs=class{buffer=[];pending=null;closed=!1;push(e){if(this.closed)return;let n=this.pending;if(n){this.pending=null,n({value:e,done:!1});return}this.buffer.push(e)}close(){if(this.closed)return;this.closed=!0;let e=this.pending;e&&(this.pending=null,e({value:void 0,done:!0}))}async*drain(){for(;;){if(this.buffer.length>0){yield this.buffer.shift();continue}if(this.closed)return;let e=await new Promise(n=>{this.pending=n});if(e.done)return;yield e.value}}}});var $T,bT,D$,xi,Xp=v(()=>{"use strict";$T=new Set([".","!","?"]),bT=new Set([",",";",":"]),D$={minClauseLength:12},xi=class{buffer="";minClauseLength;constructor(e=D$){this.minClauseLength=e.minClauseLength}push(e){this.buffer+=e;let n=[];for(let i=this.findBoundary();i!==-1;i=this.findBoundary()){let r=this.buffer.slice(0,i+1).trim();this.buffer=this.buffer.slice(i+1).replace(/^\s+/,""),r.length>0&&n.push(r)}return n}flush(){let e=this.buffer.trim();return this.buffer="",e.length>0?[e]:[]}findBoundary(){for(let e=0;e<this.buffer.length;e++){let n=this.buffer[e];if(n===`
71
- `)return e;let i=e+1<this.buffer.length?this.buffer[e+1]:"";if(i!==""&&/\s/.test(i)&&($T.has(n)||bT.has(n)&&e+1>=this.minClauseLength))return e}return-1}}});var wi,Qp=v(()=>{"use strict";wi=class{nextId=1;timers=new Map;now(){return Date.now()}setTimer(e,n){let i=this.nextId++,r=setTimeout(()=>{this.timers.delete(i),n()},e);return this.timers.set(i,r),i}clearTimer(e){let n=this.timers.get(e);n!==void 0&&(clearTimeout(n),this.timers.delete(e))}}});function Bt(t,e){let n=Math.floor(t.byteLength/2);if(n===0)return!1;let i=new DataView(t.buffer,t.byteOffset,t.byteLength),r=0;for(let o=0;o<n;o++){let s=i.getInt16(o*2,!0)/32768;r+=s*s}return Math.sqrt(r/n)>=e}function xT(t){let e=t.byteLength>>1,n=new DataView(t.buffer,t.byteOffset,t.byteLength),i=new Int16Array(e);for(let r=0;r<e;r++)i[r]=n.getInt16(r*2,!0);return i}var ea,Si,ki,Ii=v(()=>{"use strict";De();ea=.02;Si=class{threshold;constructor(e){this.threshold=e}classify(e,n){n(Bt(e,this.threshold))}},ki=class{vad;speechThreshold;energyThreshold;log;degraded=!1;announced=!1;disposed=!1;constructor(e,n={}){this.vad=e,this.speechThreshold=n.speechThreshold??.5,this.energyThreshold=n.energyThreshold??ea,this.log=n.log??q}classify(e,n){if(this.degraded){this.announce("energy (fallback)"),n(Bt(e,this.energyThreshold));return}this.vad.process(xT(e)).then(i=>{if(!this.disposed){this.announce("silero");for(let r of i)n(r>=this.speechThreshold)}},i=>{this.disposed||(this.degrade(i),this.announce("energy (fallback)"),n(Bt(e,this.energyThreshold)))})}reset(){!this.degraded&&!this.disposed&&this.vad.reset()}prewarm(){this.degraded||this.disposed||this.vad.load().then(()=>{},e=>this.degrade(e))}dispose(){return this.disposed=!0,this.vad.dispose()}degrade(e){this.degraded||this.disposed||(this.degraded=!0,this.log.debug("frame classifier DEGRADED to energy (fallback) - silero vad failed; turn-end classifies on RMS energy for the rest of the session",{error:e instanceof Error?e.message:String(e)}))}announce(e){this.announced||(this.announced=!0,this.log.debug(`frame classifier: ${e}`))}}});var ta,pr,dn,wT,L$,eh=v(()=>{ta=new Map,pr=[],dn=(t,e,n)=>{if(e&&typeof e.init=="function"&&typeof e.createInferenceSessionHandler=="function"){let i=ta.get(t);if(i===void 0)ta.set(t,{backend:e,priority:n});else{if(i.priority>n)return;if(i.priority===n&&i.backend!==e)throw new Error(`cannot register backend "${t}" using priority ${n}`)}if(n>=0){let r=pr.indexOf(t);r!==-1&&pr.splice(r,1);for(let o=0;o<pr.length;o++)if(ta.get(pr[o]).priority<=n){pr.splice(o,0,t);return}pr.push(t)}return}throw new TypeError("not a valid backend")},wT=async t=>{let e=ta.get(t);if(!e)return"backend not found.";if(e.initialized)return e.backend;if(e.aborted)return e.error;{let n=!!e.initPromise;try{return n||(e.initPromise=e.backend.init(t)),await e.initPromise,e.initialized=!0,e.backend}catch(i){return n||(e.error=`${i}`,e.aborted=!0),e.error}finally{delete e.initPromise}}},L$=async t=>{let e=t.executionProviders||[],n=e.map(u=>typeof u=="string"?u:u.name),i=n.length===0?pr:n,r,o=[],s=new Set;for(let u of i){let c=await wT(u);typeof c=="string"?o.push({name:u,err:c}):(r||(r=c),r===c&&s.add(u))}if(!r)throw new Error(`no available backend found. ERR: ${o.map(u=>`[${u.name}] ${u.err}`).join(", ")}`);for(let{name:u,err:c}of o)n.includes(u)&&console.warn(`removing requested execution provider "${u}" from session options because it is not available: ${c}`);let a=e.filter(u=>s.has(typeof u=="string"?u:u.name));return[r,new Proxy(t,{get:(u,c)=>c==="executionProviders"?a:Reflect.get(u,c)})]}});var j$=v(()=>{eh()});var U$,M$=v(()=>{U$="1.26.0"});var F$,de,th=v(()=>{M$();F$="warning",de={wasm:{},webgl:{},webgpu:{},versions:{common:U$},set logLevel(t){if(t!==void 0){if(typeof t!="string"||["verbose","info","warning","error","fatal"].indexOf(t)===-1)throw new Error(`Unsupported logging level: ${t}`);F$=t}},get logLevel(){return F$}};Object.defineProperty(de,"logLevel",{enumerable:!0})});var ie,V$=v(()=>{th();ie=de});var Z$,B$,G$=v(()=>{Z$=(t,e)=>{let n=typeof document<"u"?document.createElement("canvas"):new OffscreenCanvas(1,1);n.width=t.dims[3],n.height=t.dims[2];let i=n.getContext("2d");if(i!=null){let r,o;e?.tensorLayout!==void 0&&e.tensorLayout==="NHWC"?(r=t.dims[2],o=t.dims[3]):(r=t.dims[3],o=t.dims[2]);let s=e?.format!==void 0?e.format:"RGB",a=e?.norm,u,c;a===void 0||a.mean===void 0?u=[255,255,255,255]:typeof a.mean=="number"?u=[a.mean,a.mean,a.mean,a.mean]:(u=[a.mean[0],a.mean[1],a.mean[2],0],a.mean[3]!==void 0&&(u[3]=a.mean[3])),a===void 0||a.bias===void 0?c=[0,0,0,0]:typeof a.bias=="number"?c=[a.bias,a.bias,a.bias,a.bias]:(c=[a.bias[0],a.bias[1],a.bias[2],0],a.bias[3]!==void 0&&(c[3]=a.bias[3]));let l=o*r,d=0,f=l,p=l*2,h=-1;s==="RGBA"?(d=0,f=l,p=l*2,h=l*3):s==="RGB"?(d=0,f=l,p=l*2):s==="RBG"&&(d=0,p=l,f=l*2);for(let _=0;_<o;_++)for(let S=0;S<r;S++){let k=(t.data[d++]-c[0])*u[0],C=(t.data[f++]-c[1])*u[1],A=(t.data[p++]-c[2])*u[2],I=h===-1?255:(t.data[h++]-c[3])*u[3];i.fillStyle="rgba("+k+","+C+","+A+","+I+")",i.fillRect(S,_,1,1)}if("toDataURL"in n)return n.toDataURL();throw new Error("toDataURL is not supported")}else throw new Error("Can not access image data")},B$=(t,e)=>{let n=typeof document<"u"?document.createElement("canvas").getContext("2d"):new OffscreenCanvas(1,1).getContext("2d"),i;if(n!=null){let r,o,s;e?.tensorLayout!==void 0&&e.tensorLayout==="NHWC"?(r=t.dims[2],o=t.dims[1],s=t.dims[3]):(r=t.dims[3],o=t.dims[2],s=t.dims[1]);let a=e!==void 0&&e.format!==void 0?e.format:"RGB",u=e?.norm,c,l;u===void 0||u.mean===void 0?c=[255,255,255,255]:typeof u.mean=="number"?c=[u.mean,u.mean,u.mean,u.mean]:(c=[u.mean[0],u.mean[1],u.mean[2],255],u.mean[3]!==void 0&&(c[3]=u.mean[3])),u===void 0||u.bias===void 0?l=[0,0,0,0]:typeof u.bias=="number"?l=[u.bias,u.bias,u.bias,u.bias]:(l=[u.bias[0],u.bias[1],u.bias[2],0],u.bias[3]!==void 0&&(l[3]=u.bias[3]));let d=o*r;if(e!==void 0&&(e.format!==void 0&&s===4&&e.format!=="RGBA"||s===3&&e.format!=="RGB"&&e.format!=="BGR"))throw new Error("Tensor format doesn't match input tensor dims");let f=4,p=0,h=1,_=2,S=3,k=0,C=d,A=d*2,I=-1;a==="RGBA"?(k=0,C=d,A=d*2,I=d*3):a==="RGB"?(k=0,C=d,A=d*2):a==="RBG"&&(k=0,A=d,C=d*2),i=n.createImageData(r,o);for(let T=0;T<o*r;p+=f,h+=f,_+=f,S+=f,T++)i.data[p]=(t.data[k++]-l[0])*c[0],i.data[h]=(t.data[C++]-l[1])*c[1],i.data[_]=(t.data[A++]-l[2])*c[2],i.data[S]=I===-1?255:(t.data[I++]-l[3])*c[3]}else throw new Error("Can not access image data");return i}});var rh,W$,q$,H$,J$,K$,Y$=v(()=>{ra();rh=(t,e)=>{if(t===void 0)throw new Error("Image buffer must be defined");if(e.height===void 0||e.width===void 0)throw new Error("Image height and width must be defined");if(e.tensorLayout==="NHWC")throw new Error("NHWC Tensor layout is not supported yet");let{height:n,width:i}=e,r=e.norm??{mean:255,bias:0},o,s;typeof r.mean=="number"?o=[r.mean,r.mean,r.mean,r.mean]:o=[r.mean[0],r.mean[1],r.mean[2],r.mean[3]??255],typeof r.bias=="number"?s=[r.bias,r.bias,r.bias,r.bias]:s=[r.bias[0],r.bias[1],r.bias[2],r.bias[3]??0];let a=e.format!==void 0?e.format:"RGBA",u=e.tensorFormat!==void 0&&e.tensorFormat!==void 0?e.tensorFormat:"RGB",c=n*i,l=u==="RGBA"?new Float32Array(c*4):new Float32Array(c*3),d=4,f=0,p=1,h=2,_=3,S=0,k=c,C=c*2,A=-1;a==="RGB"&&(d=3,f=0,p=1,h=2,_=-1),u==="RGBA"?A=c*3:u==="RBG"?(S=0,C=c,k=c*2):u==="BGR"&&(C=0,k=c,S=c*2);for(let T=0;T<c;T++,f+=d,h+=d,p+=d,_+=d)l[S++]=(t[f]+s[0])/o[0],l[k++]=(t[p]+s[1])/o[1],l[C++]=(t[h]+s[2])/o[2],A!==-1&&_!==-1&&(l[A++]=(t[_]+s[3])/o[3]);return u==="RGBA"?new ye("float32",l,[1,4,n,i]):new ye("float32",l,[1,3,n,i])},W$=async(t,e)=>{let n=typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement,i=typeof ImageData<"u"&&t instanceof ImageData,r=typeof ImageBitmap<"u"&&t instanceof ImageBitmap,o=typeof t=="string",s,a=e??{},u=()=>{if(typeof document<"u")return document.createElement("canvas");if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(1,1);throw new Error("Canvas is not supported")},c=l=>typeof HTMLCanvasElement<"u"&&l instanceof HTMLCanvasElement||l instanceof OffscreenCanvas?l.getContext("2d"):null;if(n){let l=u();l.width=t.width,l.height=t.height;let d=c(l);if(d!=null){let f=t.height,p=t.width;if(e!==void 0&&e.resizedHeight!==void 0&&e.resizedWidth!==void 0&&(f=e.resizedHeight,p=e.resizedWidth),e!==void 0){if(a=e,e.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");a.tensorFormat="RGBA",a.height=f,a.width=p}else a.tensorFormat="RGBA",a.height=f,a.width=p;d.drawImage(t,0,0),s=d.getImageData(0,0,p,f).data}else throw new Error("Can not access image data")}else if(i){let l,d;if(e!==void 0&&e.resizedWidth!==void 0&&e.resizedHeight!==void 0?(l=e.resizedHeight,d=e.resizedWidth):(l=t.height,d=t.width),e!==void 0&&(a=e),a.format="RGBA",a.height=l,a.width=d,e!==void 0){let f=u();f.width=d,f.height=l;let p=c(f);if(p!=null)p.putImageData(t,0,0),s=p.getImageData(0,0,d,l).data;else throw new Error("Can not access image data")}else s=t.data}else if(r){if(e===void 0)throw new Error("Please provide image config with format for Imagebitmap");let l=u();l.width=t.width,l.height=t.height;let d=c(l);if(d!=null){let f=t.height,p=t.width;return d.drawImage(t,0,0,p,f),s=d.getImageData(0,0,p,f).data,a.height=f,a.width=p,rh(s,a)}else throw new Error("Can not access image data")}else{if(o)return new Promise((l,d)=>{let f=u(),p=c(f);if(!t||!p)return d();let h=new Image;h.crossOrigin="Anonymous",h.src=t,h.onload=()=>{f.width=h.width,f.height=h.height,p.drawImage(h,0,0,f.width,f.height);let _=p.getImageData(0,0,f.width,f.height);a.height=f.height,a.width=f.width,l(rh(_.data,a))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(s!==void 0)return rh(s,a);throw new Error("Input data provided is not supported - aborted tensor creation")},q$=(t,e)=>{let{width:n,height:i,download:r,dispose:o}=e,s=[1,i,n,4];return new ye({location:"texture",type:"float32",texture:t,dims:s,download:r,dispose:o})},H$=(t,e)=>{let{dataType:n,dims:i,download:r,dispose:o}=e;return new ye({location:"gpu-buffer",type:n??"float32",gpuBuffer:t,dims:i,download:r,dispose:o})},J$=(t,e)=>{let{dataType:n,dims:i,download:r,dispose:o}=e;return new ye({location:"ml-tensor",type:n??"float32",mlTensor:t,dims:i,download:r,dispose:o})},K$=(t,e,n)=>new ye({location:"cpu-pinned",type:t,data:e,dims:n??[e.length]})});var hr,Ei,X$,Q$,eb=v(()=>{hr=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array],["int4",Uint8Array],["uint4",Uint8Array]]),Ei=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]),X$=!1,Q$=()=>{if(!X$){X$=!0;let t=typeof BigInt64Array<"u"&&BigInt64Array.from,e=typeof BigUint64Array<"u"&&BigUint64Array.from,n=globalThis.Float16Array,i=typeof n<"u"&&n.from;t&&(hr.set("int64",BigInt64Array),Ei.set(BigInt64Array,"int64")),e&&(hr.set("uint64",BigUint64Array),Ei.set(BigUint64Array,"uint64")),i?(hr.set("float16",n),Ei.set(n,"float16")):hr.set("float16",Uint16Array)}}});var tb,rb,nb=v(()=>{ra();tb=t=>{let e=1;for(let n=0;n<t.length;n++){let i=t[n];if(typeof i!="number"||!Number.isSafeInteger(i))throw new TypeError(`dims[${n}] must be an integer, got: ${i}`);if(i<0)throw new RangeError(`dims[${n}] must be a non-negative integer, got: ${i}`);e*=i}return e},rb=(t,e)=>{switch(t.location){case"cpu":return new ye(t.type,t.data,e);case"cpu-pinned":return new ye({location:"cpu-pinned",data:t.data,type:t.type,dims:e});case"texture":return new ye({location:"texture",texture:t.texture,type:t.type,dims:e});case"gpu-buffer":return new ye({location:"gpu-buffer",gpuBuffer:t.gpuBuffer,type:t.type,dims:e});case"ml-tensor":return new ye({location:"ml-tensor",mlTensor:t.mlTensor,type:t.type,dims:e});default:throw new Error(`tensorReshape: tensor location ${t.location} is not supported`)}}});var ye,ra=v(()=>{G$();Y$();eb();nb();ye=class{constructor(e,n,i){Q$();let r,o;if(typeof e=="object"&&"location"in e)switch(this.dataLocation=e.location,r=e.type,o=e.dims,e.location){case"cpu-pinned":{let a=hr.get(r);if(!a)throw new TypeError(`unsupported type "${r}" to create tensor from pinned buffer`);if(!(e.data instanceof a))throw new TypeError(`buffer should be of type ${a.name}`);this.cpuData=e.data;break}case"texture":{if(r!=="float32")throw new TypeError(`unsupported type "${r}" to create tensor from texture`);this.gpuTextureData=e.texture,this.downloader=e.download,this.disposer=e.dispose;break}case"gpu-buffer":{if(r!=="float32"&&r!=="float16"&&r!=="int32"&&r!=="int64"&&r!=="uint32"&&r!=="uint8"&&r!=="bool"&&r!=="uint4"&&r!=="int4")throw new TypeError(`unsupported type "${r}" to create tensor from gpu buffer`);this.gpuBufferData=e.gpuBuffer,this.downloader=e.download,this.disposer=e.dispose;break}case"ml-tensor":{if(r!=="float32"&&r!=="float16"&&r!=="int32"&&r!=="int64"&&r!=="uint32"&&r!=="uint64"&&r!=="int8"&&r!=="uint8"&&r!=="bool"&&r!=="uint4"&&r!=="int4")throw new TypeError(`unsupported type "${r}" to create tensor from MLTensor`);this.mlTensorData=e.mlTensor,this.downloader=e.download,this.disposer=e.dispose;break}default:throw new Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let a,u;if(typeof e=="string")if(r=e,u=i,e==="string"){if(!Array.isArray(n))throw new TypeError("A string tensor's data must be a string array.");a=n}else{let c=hr.get(e);if(c===void 0)throw new TypeError(`Unsupported tensor type: ${e}.`);if(Array.isArray(n)){if(e==="float16"&&c===Uint16Array||e==="uint4"||e==="int4")throw new TypeError(`Creating a ${e} tensor from number array is not supported. Please use ${c.name} as data.`);e==="uint64"||e==="int64"?a=c.from(n,BigInt):a=c.from(n)}else if(n instanceof c)a=n;else if(n instanceof Uint8ClampedArray)if(e==="uint8")a=Uint8Array.from(n);else throw new TypeError("A Uint8ClampedArray tensor's data must be type of uint8");else if(e==="float16"&&n instanceof Uint16Array&&c!==Uint16Array)a=new globalThis.Float16Array(n.buffer,n.byteOffset,n.length);else throw new TypeError(`A ${r} tensor's data must be type of ${c}`)}else if(u=n,Array.isArray(e)){if(e.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");let c=typeof e[0];if(c==="string")r="string",a=e;else if(c==="boolean")r="bool",a=Uint8Array.from(e);else throw new TypeError(`Invalid element type of data array: ${c}.`)}else if(e instanceof Uint8ClampedArray)r="uint8",a=Uint8Array.from(e);else{let c=Ei.get(e.constructor);if(c===void 0)throw new TypeError(`Unsupported type for tensor data: ${e.constructor}.`);r=c,a=e}if(u===void 0)u=[a.length];else if(!Array.isArray(u))throw new TypeError("A tensor's dims must be a number array");o=u,this.cpuData=a,this.dataLocation="cpu"}let s=tb(o);if(this.cpuData&&s!==this.cpuData.length&&!((r==="uint4"||r==="int4")&&Math.ceil(s/2)===this.cpuData.length))throw new Error(`Tensor's size(${s}) does not match data length(${this.cpuData.length}).`);this.type=r,this.dims=o,this.size=s}static async fromImage(e,n){return W$(e,n)}static fromTexture(e,n){return q$(e,n)}static fromGpuBuffer(e,n){return H$(e,n)}static fromMLTensor(e,n){return J$(e,n)}static fromPinnedBuffer(e,n,i){return K$(e,n,i)}toDataURL(e){return Z$(this,e)}toImageData(e){return B$(this,e)}get data(){if(this.ensureValid(),!this.cpuData)throw new Error("The data is not on CPU. Use `getData()` to download GPU data to CPU, or use `texture` or `gpuBuffer` property to access the GPU data directly.");return this.cpuData}get location(){return this.dataLocation}get texture(){if(this.ensureValid(),!this.gpuTextureData)throw new Error("The data is not stored as a WebGL texture.");return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw new Error("The data is not stored as a WebGPU buffer.");return this.gpuBufferData}get mlTensor(){if(this.ensureValid(),!this.mlTensorData)throw new Error("The data is not stored as a WebNN MLTensor.");return this.mlTensorData}async getData(e){switch(this.ensureValid(),this.dataLocation){case"cpu":case"cpu-pinned":return this.data;case"texture":case"gpu-buffer":case"ml-tensor":{if(!this.downloader)throw new Error("The current tensor is not created with a specified data downloader.");if(this.isDownloading)throw new Error("The current tensor is being downloaded.");try{this.isDownloading=!0;let n=await this.downloader();return this.downloader=void 0,this.dataLocation="cpu",this.cpuData=n,e&&this.disposer&&(this.disposer(),this.disposer=void 0),n}finally{this.isDownloading=!1}}default:throw new Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw new Error("The current tensor is being downloaded.");this.disposer&&(this.disposer(),this.disposer=void 0),this.cpuData=void 0,this.gpuTextureData=void 0,this.gpuBufferData=void 0,this.mlTensorData=void 0,this.downloader=void 0,this.isDownloading=void 0,this.dataLocation="none"}ensureValid(){if(this.dataLocation==="none")throw new Error("The tensor is disposed.")}reshape(e){if(this.ensureValid(),this.downloader||this.disposer)throw new Error("Cannot reshape a tensor that owns GPU resource.");return rb(this,e)}}});var Ye,nh=v(()=>{ra();Ye=ye});var ih,ib,Gt,Wt,qt,Ht,oh=v(()=>{th();ih=(t,e)=>{(typeof de.trace>"u"?!de.wasm.trace:!de.trace)||console.timeStamp(`${t}::ORT::${e}`)},ib=(t,e)=>{let n=new Error().stack?.split(/\r\n|\r|\n/g)||[],i=!1;for(let r=0;r<n.length;r++){if(i&&!n[r].includes("TRACE_FUNC")){let o=`FUNC_${t}::${n[r].trim().split(" ")[1]}`;e&&(o+=`::${e}`),ih("CPU",o);return}n[r].includes("TRACE_FUNC")&&(i=!0)}},Gt=t=>{(typeof de.trace>"u"?!de.wasm.trace:!de.trace)||ib("BEGIN",t)},Wt=t=>{(typeof de.trace>"u"?!de.wasm.trace:!de.trace)||ib("END",t)},qt=t=>{(typeof de.trace>"u"?!de.wasm.trace:!de.trace)||console.time(`ORT::${t}`)},Ht=t=>{(typeof de.trace>"u"?!de.wasm.trace:!de.trace)||console.timeEnd(`ORT::${t}`)}});var na,ob=v(()=>{eh();nh();oh();na=class t{constructor(e){this.handler=e}async run(e,n,i){Gt(),qt("InferenceSession.run");let r={},o={};if(typeof e!="object"||e===null||e instanceof Ye||Array.isArray(e))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let s=!0;if(typeof n=="object"){if(n===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(n instanceof Ye)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(n)){if(n.length===0)throw new TypeError("'fetches' cannot be an empty array.");s=!1;for(let c of n){if(typeof c!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(c)===-1)throw new RangeError(`'fetches' contains invalid output name: ${c}.`);r[c]=null}if(typeof i=="object"&&i!==null)o=i;else if(typeof i<"u")throw new TypeError("'options' must be an object.")}else{let c=!1,l=Object.getOwnPropertyNames(n);for(let d of this.outputNames)if(l.indexOf(d)!==-1){let f=n[d];(f===null||f instanceof Ye)&&(c=!0,s=!1,r[d]=f)}if(c){if(typeof i=="object"&&i!==null)o=i;else if(typeof i<"u")throw new TypeError("'options' must be an object.")}else o=n}}else if(typeof n<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(let c of this.inputNames)if(typeof e[c]>"u")throw new Error(`input '${c}' is missing in 'feeds'.`);if(s)for(let c of this.outputNames)r[c]=null;let a=await this.handler.run(e,r,o),u={};for(let c in a)if(Object.hasOwnProperty.call(a,c)){let l=a[c];l instanceof Ye?u[c]=l:u[c]=new Ye(l.type,l.data,l.dims)}return Ht("InferenceSession.run"),Wt(),u}async release(){return this.handler.dispose()}static async create(e,n,i,r){Gt(),qt("InferenceSession.create");let o,s={};if(typeof e=="string"){if(o=e,typeof n=="object"&&n!==null)s=n;else if(typeof n<"u")throw new TypeError("'options' must be an object.")}else if(e instanceof Uint8Array){if(o=e,typeof n=="object"&&n!==null)s=n;else if(typeof n<"u")throw new TypeError("'options' must be an object.")}else if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer){let l=e,d=0,f=e.byteLength;if(typeof n=="object"&&n!==null)s=n;else if(typeof n=="number"){if(d=n,!Number.isSafeInteger(d))throw new RangeError("'byteOffset' must be an integer.");if(d<0||d>=l.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${l.byteLength}).`);if(f=e.byteLength-d,typeof i=="number"){if(f=i,!Number.isSafeInteger(f))throw new RangeError("'byteLength' must be an integer.");if(f<=0||d+f>l.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${l.byteLength-d}].`);if(typeof r=="object"&&r!==null)s=r;else if(typeof r<"u")throw new TypeError("'options' must be an object.")}else if(typeof i<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof n<"u")throw new TypeError("'options' must be an object.");o=new Uint8Array(l,d,f)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");let[a,u]=await L$(s),c=await a.createInferenceSessionHandler(o,u);return Ht("InferenceSession.create"),Wt(),new t(c)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}get inputMetadata(){return this.handler.inputMetadata}get outputMetadata(){return this.handler.outputMetadata}}});var sb,ab=v(()=>{ob();sb=na});var ub=v(()=>{});var cb=v(()=>{});var lb=v(()=>{});var db=v(()=>{});var sh={};qe(sh,{InferenceSession:()=>sb,TRACE:()=>ih,TRACE_EVENT_BEGIN:()=>qt,TRACE_EVENT_END:()=>Ht,TRACE_FUNC_BEGIN:()=>Gt,TRACE_FUNC_END:()=>Wt,Tensor:()=>Ye,env:()=>ie,registerBackend:()=>dn});var Jt=v(()=>{j$();V$();ab();nh();ub();cb();oh();lb();db()});var rx={};qe(rx,{InferenceSession:()=>sb,TRACE:()=>ih,TRACE_EVENT_BEGIN:()=>qt,TRACE_EVENT_END:()=>Ht,TRACE_FUNC_BEGIN:()=>Gt,TRACE_FUNC_END:()=>Wt,Tensor:()=>Ye,default:()=>LT,env:()=>ie,registerBackend:()=>dn});import{createRequire as ST}from"module";var fn,bh,kT,IT,ET,vh,Xe,TT,OT,PT,mn,xh,ah,fb,pb,wt,Tb,uh,hb,mb,gb,vb,ch,Ob,Pb,lh,ia,Ti,dh,yb,_b,$b,Cb,ee,Oi,at,aa,K,wh,Ab,CT,bb,xb,wb,mr,Sb,zb,AT,pn,sa,hn,Nb,Rb,Sh,kh,Db,Lb,ua,jb,kb,Ub,Mb,gr,Ib,fh,yh,Fb,Vb,ph,Zb,Bb,zT,oa,hh,mh,Gb,Wb,qb,Hb,Jb,Kb,Yb,Xb,gh,Eb,Qb,NT,ex,_h,$h,tx,RT,DT,LT,nx=v(()=>{Jt();Jt();Jt();Jt();Jt();Jt();Jt();fn=ST(import.meta.url),bh=Object.defineProperty,kT=Object.getOwnPropertyDescriptor,IT=Object.getOwnPropertyNames,ET=Object.prototype.hasOwnProperty,vh=(t=>typeof fn<"u"?fn:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof fn<"u"?fn:e)[n]}):t)(function(t){if(typeof fn<"u")return fn.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),Xe=(t,e)=>()=>(t&&(e=t(t=0)),e),TT=(t,e)=>{for(var n in e)bh(t,n,{get:e[n],enumerable:!0})},OT=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of IT(e))!ET.call(t,r)&&r!==n&&bh(t,r,{get:()=>e[r],enumerable:!(i=kT(e,r))||i.enumerable});return t},PT=t=>OT(bh({},"__esModule",{value:!0}),t),xh=Xe(()=>{"use strict";mn=!!(typeof process<"u"&&process.versions&&process.versions.node)}),Pb=Xe(()=>{"use strict";xh(),ah=mn||typeof location>"u"?void 0:location.origin,fb=import.meta.url>"file:"&&import.meta.url<"file;",pb=()=>{if(!mn){if(fb){let t=URL;return new URL(new t("ort.node.min.mjs",import.meta.url).href,ah).href}return import.meta.url}},wt=pb(),Tb=()=>{if(wt&&!wt.startsWith("blob:"))return wt.substring(0,wt.lastIndexOf("/")+1)},uh=(t,e)=>{try{let n=e??wt;return(n?new URL(t,n):new URL(t)).origin===ah}catch{return!1}},hb=(t,e)=>{let n=e??wt;try{return(n?new URL(t,n):new URL(t)).href}catch{return}},mb=(t,e)=>`${e??"./"}${t}`,gb=async t=>{let e=await(await fetch(t,{credentials:"same-origin"})).blob();return URL.createObjectURL(e)},vb=async t=>(await import(t)).default,ch=void 0,Ob=async(t,e,n,i)=>{let r=ch&&!(t||e);if(r)if(wt)r=uh(wt)||i&&!n;else if(i&&!n)r=!0;else throw new Error("cannot determine the script source URL.");if(r)return[void 0,ch];{let o="ort-wasm-simd-threaded.mjs",s=t??hb(o,e),a=!mn&&n&&s&&!uh(s,e),u=a?await gb(s):s??mb(o,e);return[a?u:void 0,await vb(u)]}}}),Oi=Xe(()=>{"use strict";Pb(),ia=!1,Ti=!1,dh=!1,yb=()=>{if(typeof SharedArrayBuffer>"u")return!1;try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch{return!1}},_b=()=>{try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,30,1,28,0,65,0,253,15,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,186,1,26,11]))}catch{return!1}},$b=()=>{try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,19,1,17,0,65,1,253,15,65,2,253,15,65,3,253,15,253,147,2,11]))}catch{return!1}},Cb=async t=>{if(ia)return Promise.resolve();if(Ti)throw new Error("multiple calls to 'initializeWebAssembly()' detected.");if(dh)throw new Error("previous call to 'initializeWebAssembly()' failed.");Ti=!0;let e=t.initTimeout,n=t.numThreads;if(t.simd!==!1){if(t.simd==="relaxed"){if(!$b())throw new Error("Relaxed WebAssembly SIMD is not supported in the current environment.")}else if(!_b())throw new Error("WebAssembly SIMD is not supported in the current environment.")}let i=yb();n>1&&!i&&(typeof self<"u"&&!self.crossOriginIsolated&&console.warn("env.wasm.numThreads is set to "+n+", but this will not work unless you enable crossOriginIsolated mode. See https://web.dev/cross-origin-isolation-guide/ for more info."),console.warn("WebAssembly multi-threading is not supported in the current environment. Falling back to single-threading."),t.numThreads=n=1);let r=t.wasmPaths,o=typeof r=="string"?r:void 0,s=r?.mjs,a=s?.href??s,u=r?.wasm,c=u?.href??u,l=t.wasmBinary,[d,f]=await Ob(a,o,n>1,!!l||!!c),p=!1,h=[];if(e>0&&h.push(new Promise(_=>{setTimeout(()=>{p=!0,_()},e)})),h.push(new Promise((_,S)=>{let k={numThreads:n};if(l)k.wasmBinary=l,k.locateFile=C=>C;else if(c||o)k.locateFile=C=>c??o+C;else if(a&&a.indexOf("blob:")!==0)k.locateFile=C=>new URL(C,a).href;else if(d){let C=Tb();C&&(k.locateFile=A=>C+A)}f(k).then(C=>{Ti=!1,ia=!0,lh=C,_(),d&&URL.revokeObjectURL(d)},C=>{Ti=!1,dh=!0,S(C)})})),await Promise.race(h),p)throw new Error(`WebAssembly backend initializing failed due to timeout: ${e}ms`)},ee=()=>{if(ia&&lh)return lh;throw new Error("WebAssembly is not initialized yet.")}}),wh=Xe(()=>{"use strict";Oi(),at=(t,e)=>{let n=ee(),i=n.lengthBytesUTF8(t)+1,r=n._malloc(i);return n.stringToUTF8(t,r,i),e.push(r),r},aa=(t,e,n,i)=>{if(typeof t=="object"&&t!==null){if(n.has(t))throw new Error("Circular reference in options");n.add(t)}Object.entries(t).forEach(([r,o])=>{let s=e?e+r:r;if(typeof o=="object")aa(o,s+".",n,i);else if(typeof o=="string"||typeof o=="number")i(s,o.toString());else if(typeof o=="boolean")i(s,o?"1":"0");else throw new Error(`Can't handle extra config type: ${typeof o}`)})},K=t=>{let e=ee(),n=e.stackSave();try{let i=e.PTR_SIZE,r=e.stackAlloc(2*i);e._OrtGetLastError(r,r+i);let o=Number(e.getValue(r,i===4?"i32":"i64")),s=e.getValue(r+i,"*"),a=s?e.UTF8ToString(s):"";throw new Error(`${t} ERROR_CODE: ${o}, ERROR_MESSAGE: ${a}`)}finally{e.stackRestore(n)}}}),CT=Xe(()=>{"use strict";Oi(),wh(),Ab=t=>{let e=ee(),n=0,i=[],r=t||{};try{if(t?.logSeverityLevel===void 0)r.logSeverityLevel=2;else if(typeof t.logSeverityLevel!="number"||!Number.isInteger(t.logSeverityLevel)||t.logSeverityLevel<0||t.logSeverityLevel>4)throw new Error(`log severity level is not valid: ${t.logSeverityLevel}`);if(t?.logVerbosityLevel===void 0)r.logVerbosityLevel=0;else if(typeof t.logVerbosityLevel!="number"||!Number.isInteger(t.logVerbosityLevel))throw new Error(`log verbosity level is not valid: ${t.logVerbosityLevel}`);t?.terminate===void 0&&(r.terminate=!1);let o=0;return t?.tag!==void 0&&(o=at(t.tag,i)),n=e._OrtCreateRunOptions(r.logSeverityLevel,r.logVerbosityLevel,!!r.terminate,o),n===0&&K("Can't create run options."),t?.extra!==void 0&&aa(t.extra,"",new WeakSet,(s,a)=>{let u=at(s,i),c=at(a,i);e._OrtAddRunConfigEntry(n,u,c)!==0&&K(`Can't set a run config entry: ${s} - ${a}.`)}),[n,i]}catch(o){throw n!==0&&e._OrtReleaseRunOptions(n),i.forEach(s=>e._free(s)),o}}}),AT=Xe(()=>{"use strict";Oi(),wh(),bb=t=>{switch(t){case"disabled":return 0;case"basic":return 1;case"extended":return 2;case"layout":return 3;case"all":return 99;default:throw new Error(`unsupported graph optimization level: ${t}`)}},xb=t=>{switch(t){case"sequential":return 0;case"parallel":return 1;default:throw new Error(`unsupported execution mode: ${t}`)}},wb=t=>{t.extra||(t.extra={}),t.extra.session||(t.extra.session={});let e=t.extra.session;e.use_ort_model_bytes_directly||(e.use_ort_model_bytes_directly="1"),t.executionProviders&&t.executionProviders.some(n=>(typeof n=="string"?n:n.name)==="webgpu")&&(t.enableMemPattern=!1)},mr=(t,e,n,i)=>{let r=at(e,i),o=at(n,i);ee()._OrtAddSessionConfigEntry(t,r,o)!==0&&K(`Can't set a session config entry: ${e} - ${n}.`)},Sb=async(t,e,n)=>{let i=e.executionProviders;for(let r of i){let o=typeof r=="string"?r:r.name,s=[];switch(o){case"webnn":if(o="WEBNN",mr(t,"session.disable_quant_qdq","1",n),mr(t,"session.disable_qdq_constant_folding","1",n),typeof r!="string"){let d=r?.deviceType;d&&mr(t,"deviceType",d,n)}break;case"webgpu":if(o="JS",typeof r!="string"){let d=r;if(d?.preferredLayout){if(d.preferredLayout!=="NCHW"&&d.preferredLayout!=="NHWC")throw new Error(`preferredLayout must be either 'NCHW' or 'NHWC': ${d.preferredLayout}`);mr(t,"preferredLayout",d.preferredLayout,n)}}break;case"wasm":case"cpu":continue;default:throw new Error(`not supported execution provider: ${o}`)}let a=at(o,n),u=s.length,c=0,l=0;if(u>0){c=ee()._malloc(u*ee().PTR_SIZE),n.push(c),l=ee()._malloc(u*ee().PTR_SIZE),n.push(l);for(let d=0;d<u;d++)ee().setValue(c+d*ee().PTR_SIZE,s[d][0],"*"),ee().setValue(l+d*ee().PTR_SIZE,s[d][1],"*")}await ee()._OrtAppendExecutionProvider(t,a,c,l,u)!==0&&K(`Can't append execution provider: ${o}.`)}},zb=async t=>{let e=ee(),n=0,i=[],r=t||{};wb(r);try{let o=bb(r.graphOptimizationLevel??"all"),s=xb(r.executionMode??"sequential"),a=typeof r.logId=="string"?at(r.logId,i):0,u=r.logSeverityLevel??2;if(!Number.isInteger(u)||u<0||u>4)throw new Error(`log severity level is not valid: ${u}`);let c=r.logVerbosityLevel??0;if(!Number.isInteger(c)||c<0||c>4)throw new Error(`log verbosity level is not valid: ${c}`);let l=typeof r.optimizedModelFilePath=="string"?at(r.optimizedModelFilePath,i):0;if(n=e._OrtCreateSessionOptions(o,!!r.enableCpuMemArena,!!r.enableMemPattern,s,!!r.enableProfiling,0,a,u,c,l),n===0&&K("Can't create session options."),r.executionProviders&&await Sb(n,r,i),r.enableGraphCapture!==void 0){if(typeof r.enableGraphCapture!="boolean")throw new Error(`enableGraphCapture must be a boolean value: ${r.enableGraphCapture}`);mr(n,"enableGraphCapture",r.enableGraphCapture.toString(),i)}if(r.freeDimensionOverrides)for(let[d,f]of Object.entries(r.freeDimensionOverrides)){if(typeof d!="string")throw new Error(`free dimension override name must be a string: ${d}`);if(typeof f!="number"||!Number.isInteger(f)||f<0)throw new Error(`free dimension override value must be a non-negative integer: ${f}`);let p=at(d,i);e._OrtAddFreeDimensionOverride(n,p,f)!==0&&K(`Can't set a free dimension override: ${d} - ${f}.`)}return r.extra!==void 0&&aa(r.extra,"",new WeakSet,(d,f)=>{mr(n,d,f,i)}),[n,i]}catch(o){throw n!==0&&e._OrtReleaseSessionOptions(n)!==0&&K("Can't release session options."),i.forEach(s=>e._free(s)),o}}}),Lb=Xe(()=>{"use strict";pn=t=>{switch(t){case"int8":return 3;case"uint8":return 2;case"bool":return 9;case"int16":return 5;case"uint16":return 4;case"int32":return 6;case"uint32":return 12;case"float16":return 10;case"float32":return 1;case"float64":return 11;case"string":return 8;case"int64":return 7;case"uint64":return 13;case"int4":return 22;case"uint4":return 21;default:throw new Error(`unsupported data type: ${t}`)}},sa=t=>{switch(t){case 3:return"int8";case 2:return"uint8";case 9:return"bool";case 5:return"int16";case 4:return"uint16";case 6:return"int32";case 12:return"uint32";case 10:return"float16";case 1:return"float32";case 11:return"float64";case 8:return"string";case 7:return"int64";case 13:return"uint64";case 22:return"int4";case 21:return"uint4";default:throw new Error(`unsupported data type: ${t}`)}},hn=(t,e)=>{let n=[-1,4,1,1,2,2,4,8,-1,1,2,8,4,8,-1,-1,-1,-1,-1,-1,-1,.5,.5][t],i=typeof e=="number"?e:e.reduce((r,o)=>r*o,1);return n>0?Math.ceil(i*n):void 0},Nb=t=>{switch(t){case"float16":return typeof Float16Array<"u"&&Float16Array.from?Float16Array:Uint16Array;case"float32":return Float32Array;case"uint8":return Uint8Array;case"int8":return Int8Array;case"uint16":return Uint16Array;case"int16":return Int16Array;case"int32":return Int32Array;case"bool":return Uint8Array;case"float64":return Float64Array;case"uint32":return Uint32Array;case"int64":return BigInt64Array;case"uint64":return BigUint64Array;default:throw new Error(`unsupported type: ${t}`)}},Rb=t=>{switch(t){case"verbose":return 0;case"info":return 1;case"warning":return 2;case"error":return 3;case"fatal":return 4;default:throw new Error(`unsupported logging level: ${t}`)}},Sh=t=>t==="float32"||t==="float16"||t==="int32"||t==="int64"||t==="uint32"||t==="uint8"||t==="bool"||t==="uint4"||t==="int4",kh=t=>t==="float32"||t==="float16"||t==="int32"||t==="int64"||t==="uint32"||t==="uint64"||t==="int8"||t==="uint8"||t==="bool"||t==="uint4"||t==="int4",Db=t=>{switch(t){case"none":return 0;case"cpu":return 1;case"cpu-pinned":return 2;case"texture":return 3;case"gpu-buffer":return 4;case"ml-tensor":return 5;default:throw new Error(`unsupported data location: ${t}`)}}}),jb=Xe(()=>{"use strict";xh(),ua=async t=>{if(typeof t=="string")if(mn)try{let{readFile:e}=vh("node:fs/promises");return new Uint8Array(await e(t))}catch(e){if(e.code==="ERR_FS_FILE_TOO_LARGE"){let{createReadStream:n}=vh("node:fs"),i=n(t),r=[];for await(let o of i)r.push(o);return new Uint8Array(Buffer.concat(r))}throw e}else{let e=await fetch(t);if(!e.ok)throw new Error(`failed to load external data file: ${t}`);let n=e.headers.get("Content-Length"),i=n?parseInt(n,10):0;if(i<1073741824)return new Uint8Array(await e.arrayBuffer());{if(!e.body)throw new Error(`failed to load external data file: ${t}, no response body.`);let r=e.body.getReader(),o;try{o=new ArrayBuffer(i)}catch(a){if(a instanceof RangeError){let u=Math.ceil(i/65536);o=new WebAssembly.Memory({initial:u,maximum:u}).buffer}else throw a}let s=0;for(;;){let{done:a,value:u}=await r.read();if(a)break;let c=u.byteLength;new Uint8Array(o,s,c).set(u),s+=c}return new Uint8Array(o,0,i)}}else return t instanceof Blob?new Uint8Array(await t.arrayBuffer()):t instanceof Uint8Array?t:new Uint8Array(t)}}),zT=Xe(()=>{"use strict";CT(),AT(),Lb(),Oi(),wh(),jb(),kb=(t,e)=>{ee()._OrtInit(t,e)!==0&&K("Can't initialize onnxruntime.")},Ub=async t=>{kb(t.wasm.numThreads,Rb(t.logLevel))},Mb=async(t,e)=>{ee().asyncInit?.();let n=t.webgpu.adapter;if(e==="webgpu"){if(typeof navigator>"u"||!navigator.gpu)throw new Error("WebGPU is not supported in current environment");if(n){if(typeof n.limits!="object"||typeof n.features!="object"||typeof n.requestDevice!="function")throw new Error("Invalid GPU adapter set in `env.webgpu.adapter`. It must be a GPUAdapter object.")}else{let i=t.webgpu.powerPreference;if(i!==void 0&&i!=="low-power"&&i!=="high-performance")throw new Error(`Invalid powerPreference setting: "${i}"`);let r=t.webgpu.forceFallbackAdapter;if(r!==void 0&&typeof r!="boolean")throw new Error(`Invalid forceFallbackAdapter setting: "${r}"`);if(n=await navigator.gpu.requestAdapter({powerPreference:i,forceFallbackAdapter:r}),!n)throw new Error('Failed to get GPU adapter. You may need to enable flag "--enable-unsafe-webgpu" if you are using Chrome.')}}if(e==="webnn"&&(typeof navigator>"u"||!navigator.ml))throw new Error("WebNN is not supported in current environment")},gr=new Map,Ib=t=>{let e=ee(),n=e.stackSave();try{let i=e.PTR_SIZE,r=e.stackAlloc(2*i);e._OrtGetInputOutputCount(t,r,r+i)!==0&&K("Can't get session input/output count.");let o=i===4?"i32":"i64";return[Number(e.getValue(r,o)),Number(e.getValue(r+i,o))]}finally{e.stackRestore(n)}},fh=(t,e)=>{let n=ee(),i=n.stackSave(),r=0;try{let o=n.PTR_SIZE,s=n.stackAlloc(2*o);n._OrtGetInputOutputMetadata(t,e,s,s+o)!==0&&K("Can't get session input/output metadata.");let a=Number(n.getValue(s,"*"));r=Number(n.getValue(s+o,"*"));let u=n.HEAP32[r/4];if(u===0)return[a,0];let c=n.HEAPU32[r/4+1],l=[];for(let d=0;d<c;d++){let f=Number(n.getValue(r+8+d*o,"*"));l.push(f!==0?n.UTF8ToString(f):Number(n.getValue(r+8+(d+c)*o,"*")))}return[a,u,l]}finally{n.stackRestore(i),r!==0&&n._OrtFree(r)}},yh=t=>{let e=ee(),n=e._malloc(t.byteLength);if(n===0)throw new Error(`Can't create a session. failed to allocate a buffer of size ${t.byteLength}.`);return e.HEAPU8.set(t,n),[n,t.byteLength]},Fb=async(t,e)=>{let n,i,r=ee();Array.isArray(t)?[n,i]=t:t.buffer===r.HEAPU8.buffer?[n,i]=[t.byteOffset,t.byteLength]:[n,i]=yh(t);let o=0,s=0,a=0,u=[],c=[],l=[];try{if([s,u]=await zb(e),e?.externalData&&r.mountExternalData){let A=[];for(let I of e.externalData){let T=typeof I=="string"?I:I.path;A.push(ua(typeof I=="string"?I:I.data).then(Z=>{r.mountExternalData(T,Z)}))}await Promise.all(A)}for(let A of e?.executionProviders??[])if((typeof A=="string"?A:A.name)==="webnn"){if(r.shouldTransferToMLTensor=!1,typeof A!="string"){let I=A,T=I?.context,Z=I?.gpuDevice,F=I?.deviceType,W=I?.powerPreference;T?r.currentContext=T:Z?r.currentContext=await r.webnnCreateMLContext(Z):r.currentContext=await r.webnnCreateMLContext({deviceType:F,powerPreference:W})}else r.currentContext=await r.webnnCreateMLContext();break}o=await r._OrtCreateSession(n,i,s),r.webgpuOnCreateSession?.(o),o===0&&K("Can't create a session."),r.jsepOnCreateSession?.(),r.currentContext&&(r.webnnRegisterMLContext(o,r.currentContext),r.currentContext=void 0,r.shouldTransferToMLTensor=!0);let[d,f]=Ib(o),p=!!e?.enableGraphCapture,h=[],_=[],S=[],k=[],C=[];for(let A=0;A<d;A++){let[I,T,Z]=fh(o,A);I===0&&K("Can't get an input name."),c.push(I);let F=r.UTF8ToString(I);h.push(F),S.push(T===0?{name:F,isTensor:!1}:{name:F,isTensor:!0,type:sa(T),shape:Z})}for(let A=0;A<f;A++){let[I,T,Z]=fh(o,A+d);I===0&&K("Can't get an output name."),l.push(I);let F=r.UTF8ToString(I);_.push(F),k.push(T===0?{name:F,isTensor:!1}:{name:F,isTensor:!0,type:sa(T),shape:Z})}return gr.set(o,[o,c,l,null,p,!1]),[o,h,_,S,k]}catch(d){throw c.forEach(f=>r._OrtFree(f)),l.forEach(f=>r._OrtFree(f)),a!==0&&r._OrtReleaseBinding(a)!==0&&K("Can't release IO binding."),o!==0&&r._OrtReleaseSession(o)!==0&&K("Can't release session."),d}finally{r._free(n),s!==0&&r._OrtReleaseSessionOptions(s)!==0&&K("Can't release session options."),u.forEach(d=>r._free(d)),r.unmountExternalData?.()}},Vb=t=>{let e=ee(),n=gr.get(t);if(!n)throw new Error(`cannot release session. invalid session id: ${t}`);let[i,r,o,s,a]=n;s&&(a&&e._OrtClearBoundOutputs(s.handle)!==0&&K("Can't clear bound outputs."),e._OrtReleaseBinding(s.handle)!==0&&K("Can't release IO binding.")),e.jsepOnReleaseSession?.(t),e.webnnOnReleaseSession?.(t),e.webgpuOnReleaseSession?.(t),r.forEach(u=>e._OrtFree(u)),o.forEach(u=>e._OrtFree(u)),e._OrtReleaseSession(i)!==0&&K("Can't release session."),gr.delete(t)},ph=async(t,e,n,i,r,o,s=!1)=>{if(!t){e.push(0);return}let a=ee(),u=a.PTR_SIZE,c=t[0],l=t[1],d=t[3],f=d,p,h;if(c==="string"&&(d==="gpu-buffer"||d==="ml-tensor"))throw new Error("String tensor is not supported on GPU.");if(s&&d!=="gpu-buffer")throw new Error(`External buffer must be provided for input/output index ${o} when enableGraphCapture is true.`);if(d==="gpu-buffer"){let k=t[2].gpuBuffer;h=hn(pn(c),l);{let C=a.jsepRegisterBuffer;if(!C)throw new Error('Tensor location "gpu-buffer" is not supported without using WebGPU.');p=C(i,o,k,h)}}else if(d==="ml-tensor"){let k=t[2].mlTensor;h=hn(pn(c),l);let C=a.webnnRegisterMLTensor;if(!C)throw new Error('Tensor location "ml-tensor" is not supported without using WebNN.');p=C(i,k,pn(c),l)}else{let k=t[2];if(Array.isArray(k)){h=u*k.length,p=a._malloc(h),n.push(p);for(let C=0;C<k.length;C++){if(typeof k[C]!="string")throw new TypeError(`tensor data at index ${C} is not a string`);a.setValue(p+C*u,at(k[C],n),"*")}}else{let C=a.webnnIsGraphInput,A=a.webnnIsGraphOutput;if(c!=="string"&&C&&A){let I=a.UTF8ToString(r);if(C(i,I)||A(i,I)){let T=pn(c);h=hn(T,l),f="ml-tensor";let Z=a.webnnCreateTemporaryTensor,F=a.webnnUploadTensor;if(!Z||!F)throw new Error('Tensor location "ml-tensor" is not supported without using WebNN.');let W=await Z(i,T,l);F(W,new Uint8Array(k.buffer,k.byteOffset,k.byteLength)),p=W}else h=k.byteLength,p=a._malloc(h),n.push(p),a.HEAPU8.set(new Uint8Array(k.buffer,k.byteOffset,h),p)}else h=k.byteLength,p=a._malloc(h),n.push(p),a.HEAPU8.set(new Uint8Array(k.buffer,k.byteOffset,h),p)}}let _=a.stackSave(),S=a.stackAlloc(4*l.length);try{l.forEach((C,A)=>a.setValue(S+A*u,C,u===4?"i32":"i64"));let k=a._OrtCreateTensor(pn(c),p,h,S,l.length,Db(f));k===0&&K(`Can't create tensor for input/output. session=${i}, index=${o}.`),e.push(k)}finally{a.stackRestore(_)}},Zb=async(t,e,n,i,r,o)=>{let s=ee(),a=s.PTR_SIZE,u=gr.get(t);if(!u)throw new Error(`cannot run inference. invalid session id: ${t}`);let c=u[0],l=u[1],d=u[2],f=u[3],p=u[4],h=u[5],_=e.length,S=i.length,k=0,C=[],A=[],I=[],T=[],Z=[],F=s.stackSave(),W=s.stackAlloc(_*a),ne=s.stackAlloc(_*a),be=s.stackAlloc(S*a),pe=s.stackAlloc(S*a);try{[k,C]=Ab(o),qt("wasm prepareInputOutputTensor");for(let D=0;D<_;D++)await ph(n[D],A,T,t,l[e[D]],e[D],p);for(let D=0;D<S;D++)await ph(r[D],I,T,t,d[i[D]],_+i[D],p);Ht("wasm prepareInputOutputTensor");for(let D=0;D<_;D++)s.setValue(W+D*a,A[D],"*"),s.setValue(ne+D*a,l[e[D]],"*");for(let D=0;D<S;D++)s.setValue(be+D*a,I[D],"*"),s.setValue(pe+D*a,d[i[D]],"*");s.jsepOnRunStart?.(c),s.webnnOnRunStart?.(c);let Se;Se=await s._OrtRun(c,ne,W,_,pe,S,be,k),Se!==0&&K("failed to call OrtRun().");let ke=[],Q=[];qt("wasm ProcessOutputTensor");for(let D=0;D<S;D++){let ce=Number(s.getValue(be+D*a,"*"));if(ce===I[D]||Z.includes(I[D])){ke.push(r[D]),ce!==I[D]&&s._OrtReleaseTensor(ce)!==0&&K("Can't release tensor.");continue}let it=s.stackSave(),Ue=s.stackAlloc(4*a),Pr=!1,le,Me=0;try{s._OrtGetTensorData(ce,Ue,Ue+a,Ue+2*a,Ue+3*a)!==0&&K(`Can't access output tensor data on index ${D}.`);let ku=a===4?"i32":"i64",ao=Number(s.getValue(Ue,ku));Me=s.getValue(Ue+a,"*");let _g=s.getValue(Ue+a*2,"*"),Qk=Number(s.getValue(Ue+a*3,ku)),Ct=[];for(let he=0;he<Qk;he++)Ct.push(Number(s.getValue(_g+he*a,ku)));s._OrtFree(_g)!==0&&K("Can't free memory for tensor dims.");let At=Ct.reduce((he,se)=>he*se,1);le=sa(ao);let An=f?.outputPreferredLocations[i[D]];if(le==="string"){if(An==="gpu-buffer"||An==="ml-tensor")throw new Error("String tensor is not supported on GPU.");let he=[];for(let se=0;se<At;se++){let _t=s.getValue(Me+se*a,"*"),eI=s.getValue(Me+(se+1)*a,"*"),tI=se===At-1?void 0:eI-_t;he.push(s.UTF8ToString(_t,tI))}ke.push([le,Ct,he,"cpu"])}else if(An==="gpu-buffer"&&At>0){let he=s.jsepGetBuffer;if(!he)throw new Error('preferredLocation "gpu-buffer" is not supported without using WebGPU.');let se=he(Me),_t=hn(ao,At);if(_t===void 0||!Sh(le))throw new Error(`Unsupported data type: ${le}`);Pr=!0,ke.push([le,Ct,{gpuBuffer:se,download:s.jsepCreateDownloader(se,_t,le),dispose:()=>{s._OrtReleaseTensor(ce)!==0&&K("Can't release tensor.")}},"gpu-buffer"])}else if(An==="ml-tensor"&&At>0){let he=s.webnnEnsureTensor,se=s.webnnIsGraphInputOutputTypeSupported;if(!he||!se)throw new Error('preferredLocation "ml-tensor" is not supported without using WebNN.');if(hn(ao,At)===void 0||!kh(le))throw new Error(`Unsupported data type: ${le}`);if(!se(t,le,!1))throw new Error(`preferredLocation "ml-tensor" for ${le} output is not supported by current WebNN Context.`);let _t=await he(t,Me,ao,Ct,!1);Pr=!0,ke.push([le,Ct,{mlTensor:_t,download:s.webnnCreateMLTensorDownloader(Me,le),dispose:()=>{s.webnnReleaseTensorId(Me),s._OrtReleaseTensor(ce)}},"ml-tensor"])}else if(An==="ml-tensor-cpu-output"&&At>0){let he=s.webnnCreateMLTensorDownloader(Me,le)(),se=ke.length;Pr=!0,Q.push((async()=>{let _t=[se,await he];return s.webnnReleaseTensorId(Me),s._OrtReleaseTensor(ce),_t})()),ke.push([le,Ct,[],"cpu"])}else{let he=Nb(le),se=new he(At);new Uint8Array(se.buffer,se.byteOffset,se.byteLength).set(s.HEAPU8.subarray(Me,Me+se.byteLength)),ke.push([le,Ct,se,"cpu"])}}finally{s.stackRestore(it),le==="string"&&Me&&s._free(Me),Pr||s._OrtReleaseTensor(ce)}}f&&!p&&(s._OrtClearBoundOutputs(f.handle)!==0&&K("Can't clear bound outputs."),gr.set(t,[c,l,d,f,p,!1]));for(let[D,ce]of await Promise.all(Q))ke[D][2]=ce;return Ht("wasm ProcessOutputTensor"),ke}finally{s.webnnOnRunEnd?.(c),s.stackRestore(F),A.forEach(Se=>s._OrtReleaseTensor(Se)),I.forEach(Se=>s._OrtReleaseTensor(Se)),T.forEach(Se=>s._free(Se)),k!==0&&s._OrtReleaseRunOptions(k),C.forEach(Se=>s._free(Se))}},Bb=t=>{let e=ee(),n=gr.get(t);if(!n)throw new Error("invalid session id");let i=n[0],r=e._OrtEndProfiling(i);r===0&&K("Can't get an profile file name."),e._OrtFree(r)}}),Xb=Xe(()=>{"use strict";zT(),Oi(),Pb(),oa=!1,hh=!1,mh=!1,Gb=async()=>{if(!hh){if(oa)throw new Error("multiple calls to 'initWasm()' detected.");if(mh)throw new Error("previous call to 'initWasm()' failed.");oa=!0;try{await Cb(ie.wasm),await Ub(ie),hh=!0}catch(t){throw mh=!0,t}finally{oa=!1}}},Wb=async t=>{await Mb(ie,t)},qb=async t=>yh(t),Hb=async(t,e)=>Fb(t,e),Jb=async t=>{Vb(t)},Kb=async(t,e,n,i,r,o)=>Zb(t,e,n,i,r,o),Yb=async t=>{Bb(t)}}),NT=Xe(()=>{"use strict";Xb(),Lb(),xh(),jb(),gh=(t,e)=>{switch(t.location){case"cpu":return[t.type,t.dims,t.data,"cpu"];case"gpu-buffer":return[t.type,t.dims,{gpuBuffer:t.gpuBuffer},"gpu-buffer"];case"ml-tensor":return[t.type,t.dims,{mlTensor:t.mlTensor},"ml-tensor"];default:throw new Error(`invalid data location: ${t.location} for ${e()}`)}},Eb=t=>{switch(t[3]){case"cpu":return new Ye(t[0],t[2],t[1]);case"gpu-buffer":{let e=t[0];if(!Sh(e))throw new Error(`not supported data type: ${e} for deserializing GPU tensor`);let{gpuBuffer:n,download:i,dispose:r}=t[2];return Ye.fromGpuBuffer(n,{dataType:e,dims:t[1],download:i,dispose:r})}case"ml-tensor":{let e=t[0];if(!kh(e))throw new Error(`not supported data type: ${e} for deserializing MLTensor tensor`);let{mlTensor:n,download:i,dispose:r}=t[2];return Ye.fromMLTensor(n,{dataType:e,dims:t[1],download:i,dispose:r})}default:throw new Error(`invalid data location: ${t[3]}`)}},Qb=class{async fetchModelAndCopyToWasmMemory(t){return qb(await ua(t))}async loadModel(t,e){Gt();let n;typeof t=="string"?mn?n=await ua(t):n=await this.fetchModelAndCopyToWasmMemory(t):n=t,[this.sessionId,this.inputNames,this.outputNames,this.inputMetadata,this.outputMetadata]=await Hb(n,e),Wt()}async dispose(){return Jb(this.sessionId)}async run(t,e,n){Gt();let i=[],r=[];Object.entries(t).forEach(d=>{let f=d[0],p=d[1],h=this.inputNames.indexOf(f);if(h===-1)throw new Error(`invalid input '${f}'`);i.push(p),r.push(h)});let o=[],s=[];Object.entries(e).forEach(d=>{let f=d[0],p=d[1],h=this.outputNames.indexOf(f);if(h===-1)throw new Error(`invalid output '${f}'`);o.push(p),s.push(h)});let a=i.map((d,f)=>gh(d,()=>`input "${this.inputNames[r[f]]}"`)),u=o.map((d,f)=>d?gh(d,()=>`output "${this.outputNames[s[f]]}"`):null),c=await Kb(this.sessionId,r,a,s,u,n),l={};for(let d=0;d<c.length;d++)l[this.outputNames[s[d]]]=o[d]??Eb(c[d]);return Wt(),l}startProfiling(){}endProfiling(){Yb(this.sessionId)}}}),ex={};TT(ex,{OnnxruntimeWebAssemblyBackend:()=>$h,initializeFlags:()=>_h,wasmBackend:()=>tx});RT=Xe(()=>{"use strict";Xb(),NT(),_h=()=>{(typeof ie.wasm.initTimeout!="number"||ie.wasm.initTimeout<0)&&(ie.wasm.initTimeout=0);let t=ie.wasm.simd;if(typeof t!="boolean"&&t!==void 0&&t!=="fixed"&&t!=="relaxed"&&(console.warn(`Property "env.wasm.simd" is set to unknown value "${t}". Reset it to \`false\` and ignore SIMD feature checking.`),ie.wasm.simd=!1),typeof ie.wasm.proxy!="boolean"&&(ie.wasm.proxy=!1),typeof ie.wasm.trace!="boolean"&&(ie.wasm.trace=!1),typeof ie.wasm.numThreads!="number"||!Number.isInteger(ie.wasm.numThreads)||ie.wasm.numThreads<=0)if(typeof self<"u"&&!self.crossOriginIsolated)ie.wasm.numThreads=1;else{let e=typeof navigator>"u"?vh("node:os").cpus().length:navigator.hardwareConcurrency;ie.wasm.numThreads=Math.min(4,Math.ceil((e||1)/2))}},$h=class{async init(t){_h(),await Gb(),await Wb(t)}async createInferenceSessionHandler(t,e){let n=new Qb;return await n.loadModel(t,e),n}},tx=new $h}),DT="1.26.0",LT=sh;{let t=(RT(),PT(ex)).wasmBackend;dn("cpu",t,10),dn("wasm",t,10)}Object.defineProperty(ie.versions,"web",{value:DT,enumerable:!0})});import{existsSync as jT}from"node:fs";import{createRequire as UT}from"node:module";import{dirname as MT,join as FT,sep as ix}from"node:path";import{fileURLToPath as VT,pathToFileURL as ZT}from"node:url";async function ca(){let t=await Promise.resolve().then(()=>(nx(),rx));return t.default??t}function la(t,e){t.env.wasm.numThreads=1,t.env.wasm.wasmPaths=GT(e)}function BT(t){return[new URL("./",t),new URL("../",t)].map(e=>VT(e))}function GT(t=import.meta.url){let e=BT(t);try{e.push(MT(UT(t).resolve("onnxruntime-web")))}catch{}let n=null;for(let i of e){let r=ox.filter(o=>!jT(FT(i,o)));if(r.length===0)return WT(i);r.length<ox.length&&n===null&&(n={dir:i,missing:r})}throw n!==null?new Error(`ort-web WASM runtime at '${n.dir}' is missing '${n.missing.join("', '")}' - the .wasm and its .mjs glue must be copied together`):new Error(`ort-web WASM runtime ('${sx}' + '${ax}') not found beside the bundle or in node_modules`)}function WT(t){return ZT(t.endsWith(ix)?t:t+ix).href}var sx,ax,ox,Ih=v(()=>{"use strict";sx="ort-wasm-simd-threaded.wasm",ax="ort-wasm-simd-threaded.mjs",ox=[sx,ax]});import{existsSync as qT}from"node:fs";import{fileURLToPath as HT}from"node:url";function Eh(t,e){return[new URL(`../../assets/${t}`,e),new URL(`./assets/${t}`,e),new URL(`../assets/${t}`,e)].map(n=>HT(n))}function da(t,e,n,i={}){let r=i.baseUrl??n,o=i.exists??qT,s="envPath"in i?i.envPath:process.env[e];if(s&&o(s))return s;let a=Eh(t,r);for(let u of a)if(o(u))return u;throw new Error(`model '${t}' not found. Tried: ${a.join(", ")}. Set ${e} to override.`)}var Th=v(()=>{"use strict"});function Oh(t={}){return da(ux,cx,import.meta.url,t)}var ux,cx,Ph=v(()=>{"use strict";Th();ux="silero_vad.onnx",cx="JARVIS_SILERO_VAD_MODEL_PATH"});var gn,Pi,lx,vr,Ch=v(()=>{"use strict";Ih();Ph();gn=512,Pi=64,lx=256,vr=class{modelPath;sessionPromise=null;session=null;ort=null;disposed=!1;pending=new Int16Array(gn);pendingLen=0;state=new Float32Array(lx);context=new Float32Array(Pi);chain=Promise.resolve();constructor(e={}){this.modelPath=e.modelPath}process(e){if(this.disposed)return Promise.reject(new Error("SileroVadRunner is disposed"));let n=this.chain.then(()=>this.runWindows(e));return this.chain=n.then(()=>{},()=>{}),n}reset(){this.chain=this.chain.then(()=>{this.pendingLen=0,this.state=new Float32Array(lx),this.context.fill(0)})}load(){return this.disposed?Promise.reject(new Error("SileroVadRunner is disposed")):this.ensureSession().then(()=>{})}prewarm(){this.disposed||this.ensureSession().catch(()=>{})}async dispose(){this.disposed=!0,this.pendingLen=0;let e=this.session;this.session=null,this.sessionPromise=null,this.ort=null,e&&await e.release()}async runWindows(e){if(this.disposed)throw new Error("SileroVadRunner is disposed");if(e.length===0)return[];let n=await this.ensureSession(),i=this.ort;if(!i)throw new Error("onnxruntime-web failed to load");let r=[],o=0;for(;;){let s=Math.min(gn-this.pendingLen,e.length-o);if(s>0&&(this.pending.set(e.subarray(o,o+s),this.pendingLen),this.pendingLen+=s,o+=s),this.pendingLen<gn)break;this.pendingLen=0,r.push(await this.inferWindow(n,i))}return r}async inferWindow(e,n){let i=new Float32Array(Pi+gn);i.set(this.context,0);for(let a=0;a<gn;a++)i[Pi+a]=this.pending[a]/32768;let r=await e.run({input:new n.Tensor("float32",i,[1,i.length]),state:new n.Tensor("float32",this.state,[2,1,128]),sr:new n.Tensor("int64",BigInt64Array.from([16000n]),[])});if(this.disposed)throw new Error("SileroVadRunner is disposed");let o=r[e.outputNames[0]].data;this.state=r[e.outputNames[1]].data,this.context.set(i.subarray(i.length-Pi));let s=o[0];if(!Number.isFinite(s))throw new Error("silero vad produced a non-finite output");return s<0?0:s>1?1:s}ensureSession(){return this.sessionPromise?this.sessionPromise:(this.sessionPromise=this.loadSession(),this.sessionPromise)}async loadSession(){let e=await ca();this.ort=e,la(e);let n=this.modelPath??Oh(),i=await e.InferenceSession.create(n,{executionProviders:["wasm"],graphOptimizationLevel:"all",executionMode:"sequential"});if(this.disposed)throw await i.release(),new Error("SileroVadRunner is disposed");return this.session=i,i}}});function JT(t){let e=1;for(;e<t;)e<<=1;return e}var Ah,fa,dx=v(()=>{"use strict";Ah=class{size;rev;cos;sin;constructor(e){if(e<2||(e&e-1)!==0)throw new Error(`Radix2Fft size must be a power of two >= 2, got ${e}`);this.size=e;let n=Math.log2(e);this.rev=new Uint32Array(e);for(let r=0;r<e;r++){let o=0;for(let s=0;s<n;s++)o|=(r>>s&1)<<n-1-s;this.rev[r]=o}let i=e>>1;this.cos=new Float64Array(i),this.sin=new Float64Array(i);for(let r=0;r<i;r++){let o=2*Math.PI*r/e;this.cos[r]=Math.cos(o),this.sin[r]=Math.sin(o)}}transform(e,n,i){let r=this.size,o=this.rev;for(let s=0;s<r;s++){let a=o[s];if(a>s){let u=e[s];e[s]=e[a],e[a]=u;let c=n[s];n[s]=n[a],n[a]=c}}for(let s=2;s<=r;s<<=1){let a=s>>1,u=r/s;for(let c=0;c<r;c+=s)for(let l=0;l<a;l++){let d=l*u,f=this.cos[d],p=i?this.sin[d]:-this.sin[d],h=c+l,_=h+a,S=e[_]*f-n[_]*p,k=e[_]*p+n[_]*f;e[_]=e[h]-S,n[_]=n[h]-k,e[h]+=S,n[h]+=k}}if(i){let s=1/r;for(let a=0;a<r;a++)e[a]*=s,n[a]*=s}}};fa=class{n;bins;m;fft;chirpCos;chirpSin;bRe;bIm;aRe;aIm;constructor(e){if(e<2)throw new Error(`PowerSpectrum length must be >= 2, got ${e}`);this.n=e,this.bins=(e>>1)+1,this.m=JT(2*e-1),this.fft=new Ah(this.m),this.chirpCos=new Float64Array(e),this.chirpSin=new Float64Array(e);for(let n=0;n<e;n++){let i=n*n%(2*e),r=Math.PI*i/e;this.chirpCos[n]=Math.cos(r),this.chirpSin[n]=Math.sin(r)}this.bRe=new Float64Array(this.m),this.bIm=new Float64Array(this.m);for(let n=0;n<e;n++){let i=this.chirpCos[n],r=this.chirpSin[n];this.bRe[n]=i,this.bIm[n]=r,n!==0&&(this.bRe[this.m-n]=i,this.bIm[this.m-n]=r)}this.fft.transform(this.bRe,this.bIm,!1),this.aRe=new Float64Array(this.m),this.aIm=new Float64Array(this.m)}computePower(e,n){let{n:i,m:r,aRe:o,aIm:s}=this;o.fill(0),s.fill(0);for(let a=0;a<i;a++){let u=e[a];o[a]=u*this.chirpCos[a],s[a]=-u*this.chirpSin[a]}this.fft.transform(o,s,!1);for(let a=0;a<r;a++){let u=o[a],c=s[a],l=this.bRe[a],d=this.bIm[a];o[a]=u*l-c*d,s[a]=u*d+c*l}this.fft.transform(o,s,!0);for(let a=0;a<this.bins;a++){let u=o[a],c=s[a];n[a]=u*u+c*c}}}});function hx(t){let i=27/Math.log(6.4);return t>=1e3?15+Math.log(t/1e3)*i:3*t/200}function XT(t){let i=Math.log(6.4)/27;return t>=15?1e3*Math.exp(i*(t-15)):200*t/3}function mx(t,e,n){let i=new Float64Array(n),r=n>1?(e-t)/(n-1):0;for(let o=0;o<n;o++)i[o]=t+o*r;return n>1&&(i[n-1]=e),i}function QT(){let t=hx(0),e=hx(zh/2),n=mx(t,e,St+2),i=new Float64Array(St+2);for(let a=0;a<n.length;a++)i[a]=XT(n[a]);let r=mx(0,zh/2,Ci),o=new Float64Array(St+1);for(let a=0;a<St+1;a++)o[a]=i[a+1]-i[a];let s=[];for(let a=0;a<St;a++){let u=2/(i[a+2]-i[a]),c=new Float64Array(Ci),l=Ci,d=0;for(let f=0;f<Ci;f++){let p=-(i[a]-r[f])/o[a],h=(i[a+2]-r[f])/o[a+1],_=Math.max(0,Math.min(p,h))*u;c[f]=_,_>0&&(f<l&&(l=f),d=f+1)}l>d&&(l=d=0),s.push({lo:l,hi:d,weights:c.slice(l,d)})}return s}function eO(){let t=new Float64Array(ut);for(let e=0;e<ut;e++)t[e]=.5-.5*Math.cos(2*Math.PI*e/ut);return t}var zh,ut,KT,St,Ci,fx,YT,px,je,yr,Nh,Ai,pa=v(()=>{"use strict";dx();zh=16e3,ut=400,KT=160,St=80,Ci=(ut>>1)+1,fx=1e-10,YT=1e-7,px=32768,je=zh*8,yr=800,Nh=St;Ai=class{hann=eO();filters=QT();spectrum=new fa(ut);padded=new Float64Array(je+ut);frame=new Float64Array(ut);power=new Float64Array(Ci);logBuf=new Float64Array(St*yr);fromPcm16(e){return this.window(e),this.normalize(),this.reflectPad(),this.melSpectrogram()}window(e){let n=this.padded,i=ut/2,r=e.length;if(r>=je){let o=r-je;for(let s=0;s<je;s++)n[i+s]=e[o+s]/px}else{let o=je-r;for(let s=0;s<o;s++)n[i+s]=0;for(let s=0;s<r;s++)n[i+o+s]=e[s]/px}}normalize(){let e=this.padded,n=ut/2,i=je,r=0;for(let a=0;a<i;a++)r+=e[n+a];r/=i;let o=0;for(let a=0;a<i;a++){let u=e[n+a]-r;o+=u*u}o/=i;let s=1/Math.sqrt(o+YT);for(let a=0;a<i;a++)e[n+a]=(e[n+a]-r)*s}reflectPad(){let e=this.padded,n=ut/2,i=je;for(let r=0;r<n;r++)e[r]=e[n+(n-r)],e[n+i+r]=e[n+(i-2-r)]}melSpectrogram(){let{padded:e,frame:n,power:i,hann:r,filters:o,logBuf:s}=this;for(let l=0;l<yr;l++){let d=l*KT;for(let f=0;f<ut;f++)n[f]=e[d+f]*r[f];this.spectrum.computePower(n,i);for(let f=0;f<St;f++){let{lo:p,hi:h,weights:_}=o[f],S=0;for(let k=p;k<h;k++)S+=_[k-p]*i[k];s[f*yr+l]=Math.log10(S<fx?fx:S)}}let a=-1/0;for(let l of s)l>a&&(a=l);let u=a-8,c=new Float32Array(St*yr);for(let l=0;l<s.length;l++){let d=s[l]<u?u:s[l];c[l]=(d+4)/4}return c}}});function tO(t){return t.toLowerCase().replace(/[.,!?;:]+$/g,"").trim()}function Rh(t,e){return e.some(n=>vx(t,n))}function vx(t,e){if(!t.endsWith(e))return!1;let n=t.length-e.length-1;return n<0||t[n]===" "}function rO(t,e){let n=nO(t);return n===""?null:e.find(i=>iO(n,i))??null}function nO(t){let e=/^.*[.!?]\s+/s.exec(t);return(e?t.slice(e[0].length):t).trim()}function iO(t,e){for(let n=t.indexOf(e);n!==-1;n=t.indexOf(e,n+1)){let i=n===0||!gx(t[n-1]),r=n+e.length===t.length||!gx(t[n+e.length]);if(i&&r)return!0}return!1}function gx(t){return/[a-z0-9']/.test(t)}var ha,zi,Dh=v(()=>{"use strict";Ii();Ii();ha={silenceEnergyThreshold:ea,shortSilenceMs:500,longSilenceMs:1400,reopenGraceMs:400,stopSecsMs:3e4,heldBudgetLadderMs:[4e3,8e3],heldCeilingMs:12e4,strongHoldCues:["hold on","hang on","give me a sec","give me a second","one moment","one sec","one second","let me think","let me see","let me look"],weakHoldCues:["actually","wait"],commitCues:["that's it","go ahead","what do you think"]},zi=class{clock;config;classifier;telemetry=null;phase="listening";inSilence=!1;silenceStartedAt=null;firstSpeechAt=null;budgetOwner="baseline";armedBudgetMs=null;lastRawPartial="";lastNormPartial="";strongHoldCue=null;held=!1;heldLadderStep=0;heldCeilingDeadlineAtMs=null;commitCb;silenceTimer=null;graceTimer=null;stopTimer=null;ceilingTimer=null;constructor(e,n={},i){this.clock=e,this.config={...ha,...n},this.classifier=i??new Si(this.config.silenceEnergyThreshold)}onAudioFrame(e){this.phase==="committed"||this.phase==="disposed"||this.classifier.classify(e,this.applyVerdict)}applyVerdict=e=>{this.phase==="committed"||this.phase==="disposed"||(e?this.handleSpeech():this.handleSilence())};onPartial(e){if(this.phase==="committed"||this.phase==="disposed")return;if(this.lastRawPartial=e.trim(),this.lastNormPartial=tO(e),Rh(this.lastNormPartial,this.config.commitCues)){this.commit("lexical");return}let n=this.strongHoldCue;if(this.strongHoldCue=rO(this.lastNormPartial,this.config.strongHoldCues),this.strongHoldCue!==null){if(this.strongHoldCue!==n){this.telemetry?.strongHoldRecognized(this.strongHoldCue),this.held||this.enterHeld(this.strongHoldCue);return}if(this.held)return;if(vx(this.lastNormPartial,this.strongHoldCue)){this.enterHeld(this.strongHoldCue);return}this.holdFloor();return}if(Rh(this.lastNormPartial,this.config.weakHoldCues)){if(this.held)return;this.holdFloor()}}onCommit(e){this.commitCb=e}attachTelemetry(e){this.telemetry=e}dispose(){this.phase="disposed",this.clearAllTimers()}holdFloor(){this.clearSilenceTimer(),this.phase==="tentative"&&(this.clearGraceTimer(),this.phase="listening"),this.inSilence=!1}handleSpeech(){this.held?(this.inSilence&&(this.exitHeld("speech"),this.clearStopTimer(),this.stopTimer=this.clock.setTimer(this.config.stopSecsMs,()=>this.commit("stop_cap"))),this.firstSpeechAt??=this.clock.now()):this.firstSpeechAt===null&&(this.firstSpeechAt=this.clock.now(),this.stopTimer=this.clock.setTimer(this.config.stopSecsMs,()=>this.commit("stop_cap"))),this.clearSilenceTimer(),this.phase==="tentative"&&(this.clearGraceTimer(),this.phase="listening"),this.inSilence=!1}handleSilence(){this.firstSpeechAt===null||this.phase!=="listening"||this.inSilence||(this.inSilence=!0,this.silenceStartedAt=this.clock.now(),this.budgetOwner="baseline",this.armedBudgetMs=this.held?this.heldLadderBudgetMs():this.silenceBudgetMs(),this.silenceTimer=this.clock.setTimer(this.armedBudgetMs,()=>this.onSilenceBudgetElapsed()),this.onSilenceDetected())}silenceBudgetMs(){return this.isCompleteSounding()?this.config.shortSilenceMs:this.config.longSilenceMs}onSilenceDetected(){}canRefineBudget(){return this.phase==="listening"&&this.inSilence}rearmSilence(e){if(this.phase!=="listening"||!this.inSilence||this.silenceStartedAt===null||this.held)return;e!==this.armedBudgetMs&&(this.budgetOwner="smart_turn"),this.armedBudgetMs=e,this.clearSilenceTimer();let n=e-(this.clock.now()-this.silenceStartedAt);n<=0?this.onSilenceBudgetElapsed():this.silenceTimer=this.clock.setTimer(n,()=>this.onSilenceBudgetElapsed())}onSilenceBudgetElapsed(){if(this.silenceTimer=null,this.phase==="listening"){if(this.held){this.heldLadderStep+=1;let e=this.heldLadderBudgetMs();this.armedBudgetMs=e,this.silenceTimer=this.clock.setTimer(e,()=>this.onSilenceBudgetElapsed()),this.telemetry?.heldLadderRearmed(e);return}this.phase="tentative",this.graceTimer=this.clock.setTimer(this.config.reopenGraceMs,()=>{this.graceTimer=null,this.commit(this.budgetOwner)})}}isCompleteSounding(){return this.strongHoldCue!==null?!1:/[.!?]$/.test(this.lastRawPartial)?!0:Rh(this.lastNormPartial,this.config.commitCues)}enterHeld(e){this.held=!0,this.heldLadderStep=0,this.clearStopTimer(),this.heldCeilingDeadlineAtMs??=this.clock.now()+this.config.heldCeilingMs,this.telemetry?.heldEntered(e);let n=this.heldCeilingDeadlineAtMs-this.clock.now();if(n<=0){this.commit("held_ceiling");return}this.ceilingTimer=this.clock.setTimer(n,()=>this.commit("held_ceiling")),this.holdFloor()}exitHeld(e){this.held=!1,this.clearCeilingTimer(),this.telemetry?.heldExited(e)}heldLadderBudgetMs(){let e=this.config.heldBudgetLadderMs;return e[Math.min(this.heldLadderStep,e.length-1)]??this.config.longSilenceMs}commit(e){this.phase==="committed"||this.phase==="disposed"||(this.held&&this.exitHeld(e==="held_ceiling"?"ceiling":"commit_cue"),this.phase="committed",this.clearAllTimers(),this.telemetry?.endpointerCommitted(e,this.inSilence?this.silenceStartedAt:null),this.commitCb?.())}clearSilenceTimer(){this.silenceTimer!==null&&(this.clock.clearTimer(this.silenceTimer),this.silenceTimer=null)}clearGraceTimer(){this.graceTimer!==null&&(this.clock.clearTimer(this.graceTimer),this.graceTimer=null)}clearStopTimer(){this.stopTimer!==null&&(this.clock.clearTimer(this.stopTimer),this.stopTimer=null)}clearCeilingTimer(){this.ceilingTimer!==null&&(this.clock.clearTimer(this.ceilingTimer),this.ceilingTimer=null)}clearAllTimers(){this.clearSilenceTimer(),this.clearGraceTimer(),this.clearStopTimer(),this.clearCeilingTimer()}}});var yx,Ni,Lh=v(()=>{"use strict";pa();Dh();yx={...ha,commitThreshold:.65,holdThreshold:.35},Ni=class extends zi{smartConfig;inference;buffer=new Int16Array(je*2);bufferLen=0;silenceEpoch=0;degraded=!1;smartDisposed=!1;constructor(e,n,i={},r){super(e,i,r),this.smartConfig={...yx,...i},this.inference=n}onAudioFrame(e){this.appendToBuffer(e),super.onAudioFrame(e)}dispose(){this.smartDisposed=!0,this.bufferLen=0,super.dispose()}onSilenceDetected(){if(this.silenceEpoch+=1,this.degraded||this.smartDisposed)return;let e=this.silenceEpoch,n=this.snapshotBuffer();this.runInference(n,e)}async runInference(e,n){let i=this.clock.now(),r;try{r=await this.inference.infer(e)}catch(s){let a=this.degraded;this.degraded=!0,!a&&!this.smartDisposed&&this.telemetry?.smartTurnDegraded(this.clock.now()-i,s);return}let o=this.clock.now()-i;if(this.smartDisposed||n!==this.silenceEpoch||!this.canRefineBudget()){this.telemetry?.smartTurnResolved(r,o,"stale");return}r>=this.smartConfig.commitThreshold?(this.telemetry?.smartTurnResolved(r,o,"shorten"),this.rearmSilence(this.smartConfig.shortSilenceMs)):r<=this.smartConfig.holdThreshold?(this.telemetry?.smartTurnResolved(r,o,"extend"),this.rearmSilence(this.smartConfig.longSilenceMs)):this.telemetry?.smartTurnResolved(r,o,"inconclusive")}appendToBuffer(e){let n=e.byteLength>>1;if(n===0)return;let i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=n>je?n-je:0,o=n-r;if(this.bufferLen+o>this.buffer.length){let s=Math.min(this.bufferLen,je);this.buffer.copyWithin(0,this.bufferLen-s,this.bufferLen),this.bufferLen=s}for(let s=r;s<n;s++)this.buffer[this.bufferLen++]=i.getInt16(s*2,!0)}snapshotBuffer(){let e=Math.max(0,this.bufferLen-je);return this.buffer.slice(e,this.bufferLen)}}});function jh(t={}){return da(_x,$x,import.meta.url,t)}var _x,$x,Uh=v(()=>{"use strict";Th();_x="smart-turn-v3.1-cpu.onnx",$x="JARVIS_SMART_TURN_MODEL_PATH"});var Ri,Mh=v(()=>{"use strict";pa();Ih();Uh();Ri=class{logMel;modelPath;sessionPromise=null;session=null;ort=null;disposed=!1;constructor(e={}){this.logMel=e.logMel??new Ai,this.modelPath=e.modelPath}async infer(e){if(this.disposed)throw new Error("SmartTurnRunner is disposed");let n=await this.ensureSession(),i=this.ort;if(!i)throw new Error("onnxruntime-web failed to load");let r=this.logMel.fromPcm16(e),o=new i.Tensor("float32",r,[1,Nh,yr]),s=await n.run({input_features:o});if(this.disposed)throw new Error("SmartTurnRunner is disposed");let a=n.outputNames[0],c=s[a].data[0];if(!Number.isFinite(c))throw new Error("smart-turn produced a non-finite output");return c<0?0:c>1?1:c}prewarm(){this.disposed||this.ensureSession().catch(()=>{})}async dispose(){this.disposed=!0;let e=this.session;this.session=null,this.sessionPromise=null,this.ort=null,e&&await e.release()}ensureSession(){return this.sessionPromise?this.sessionPromise:(this.sessionPromise=this.load(),this.sessionPromise)}async load(){let e=await ca();this.ort=e,la(e);let n=this.modelPath??jh(),i=await e.InferenceSession.create(n,{executionProviders:["wasm"],graphOptimizationLevel:"all",executionMode:"sequential"});if(this.disposed)throw await i.release(),new Error("SmartTurnRunner is disposed");return this.session=i,i}}});var bx,Fh,Vh=v(()=>{"use strict";bx="21m00Tcm4TlvDq8ikWAM",Fh={id:"jarvis-primary",engineVoice:{"elevenlabs-flash":{kind:"preset",voiceId:bx}}}});var ma,xx=v(()=>{"use strict";De();ma=class{turnId;openedAtMs;log;terminal=!1;heldOpen=!1;decider=null;silenceOnsetAtMs=null;commitAtMs=null;asrFinalAtMs=null;transcriptLength=null;firstDeltaAtMs=null;firstAudioAtMs=null;constructor(e,n,i=q){this.turnId=e,this.openedAtMs=n,this.log=i}endpointerCommitted(e,n){this.decider===null&&(this.decider=e,this.silenceOnsetAtMs=n)}smartTurnResolved(e,n,i){this.log.debug("smart-turn P(complete)",{turnId:this.turnId,probability:e,inferenceMs:n,outcome:i})}smartTurnDegraded(e,n){this.log.debug("smart-turn DEGRADED to baseline - inference failed; this turn endpoints on baseline timers only",{turnId:this.turnId,inferenceMs:e,error:n instanceof Error?n.message:String(n)})}strongHoldRecognized(e){this.log.debug("lexical STRONG hold recognized - completeness vetoed, silence budget biases long",{turnId:this.turnId,cue:e})}heldEntered(e){this.heldOpen=!0,this.log.debug("floor-held mode entered - silence budgets escalate, stop cap suspended",{turnId:this.turnId,cue:e})}heldLadderRearmed(e){this.log.debug("held silence budget re-armed at the next ladder step",{turnId:this.turnId,budgetMs:e})}heldExited(e){this.heldOpen=!1,this.log.debug("floor-held mode exited",{turnId:this.turnId,reason:e})}committed(e,n){this.commitAtMs===null&&(n==="ptt"&&this.heldOpen&&this.heldExited("ptt"),this.commitAtMs=e,n==="ptt"&&(this.decider??="ptt"))}asrFinalResolved(e,n){this.asrFinalAtMs===null&&(this.asrFinalAtMs=e,this.transcriptLength=n)}firstReasonerDelta(e){this.firstDeltaAtMs??=e}firstTtsAudio(e){this.firstAudioAtMs??=e}completed(e){this.terminal||(this.terminal=!0,this.log.debug("voice turn summary",{turnId:this.turnId,decider:this.decider,silenceToCommitMs:this.spanMs(this.silenceOnsetAtMs,this.commitAtMs),commitToFinalMs:this.spanMs(this.commitAtMs,this.asrFinalAtMs),finalToFirstDeltaMs:this.spanMs(this.asrFinalAtMs,this.firstDeltaAtMs),firstDeltaToFirstAudioMs:this.spanMs(this.firstDeltaAtMs,this.firstAudioAtMs),totalMs:e-this.openedAtMs,transcriptLength:this.transcriptLength}))}blank(e){this.terminal||(this.terminal=!0,this.log.debug("voice turn blank - terminated silently (no transcribed speech)",{turnId:this.turnId,decider:this.decider,silenceToCommitMs:this.spanMs(this.silenceOnsetAtMs,this.commitAtMs),commitToFinalMs:this.spanMs(this.commitAtMs,this.asrFinalAtMs),totalMs:e-this.openedAtMs,transcriptLength:this.transcriptLength}))}spanMs(e,n){return e===null||n===null?null:n-e}}});var wx,Sx,ga,kx=v(()=>{"use strict";xx();wx=16e3,Sx="pcm_s16le",ga=class{deps;asrStream;ttsStream=null;reasonAbort=new AbortController;phase="capturing";settled=!1;finalizing=!1;lastFrameAtMs;timeline;constructor(e){this.deps=e,this.lastFrameAtMs=e.startMs,this.timeline=new ma(e.turnId,e.clock.now()),e.controller.attachTelemetry?.(this.timeline),this.asrStream=e.asrEngine.open({sampleRate:wx,encoding:Sx,emitPartials:!0}),this.asrStream.onTranscript(n=>this.handleTranscript(n)),this.asrStream.onError(n=>this.finishError("turn_failed",n)),e.controller.onCommit(()=>this.finalize(this.lastFrameAtMs,"controller")),e.emit({type:"state",turnId:e.turnId,state:"processing"})}pushFrame(e,n){this.phase!=="capturing"||this.settled||(this.lastFrameAtMs=n,this.asrStream.pushAudio(e),this.deps.controller.onAudioFrame(e))}endAudio(e){this.finalize(e,"ptt")}cancel(){this.settled||(this.settled=!0,this.phase="cancelled",this.deps.controller.dispose(),this.reasonAbort.abort(),this.asrStream.abort(),this.ttsStream?.cancel(),this.deps.onComplete())}handleTranscript(e){this.phase!=="capturing"||this.settled||e.isFinal||(this.deps.emit({type:"transcript.partial",turnId:this.deps.turnId,text:e.text}),this.deps.controller.onPartial(e.text))}finalize(e,n){this.phase!=="capturing"||this.finalizing||this.settled||(this.finalizing=!0,this.timeline.committed(this.deps.clock.now(),n),this.deps.controller.dispose(),this.finalizeAndRespond(e))}async finalizeAndRespond(e){let n;try{n=await this.asrStream.end()}catch(r){if(this.settled)return;this.finishError("turn_failed",r);return}if(this.settled)return;if(this.timeline.asrFinalResolved(this.deps.clock.now(),n.text.length),n.text.trim()===""){this.finishBlank();return}this.phase="responding";let i=this.buildUserTurn(n.text,e);this.deps.emit({type:"turn.final",turnId:this.deps.turnId,turn:i,...this.deps.commandId!==void 0&&{commandId:this.deps.commandId}}),this.deps.emit({type:"state",turnId:this.deps.turnId,state:"responding"});try{await this.respond(i.text)}catch(r){if(this.settled)return;this.finishError("turn_failed",r);return}this.settled||this.finishDone()}async respond(e){let n=!1,i=!1,r=this.deps.ttsEngine.speak({voice:this.deps.voice,sampleRate:wx,encoding:Sx});this.ttsStream=r,r.onAudio(o=>{this.settled||(i||(i=!0,this.timeline.firstTtsAudio(this.deps.clock.now())),this.deps.emit({type:"response.audio",turnId:this.deps.turnId,audio:o}))}),r.onError(o=>this.finishError("turn_failed",o));for await(let o of this.deps.reasoner.run(e,this.reasonAbort.signal)){if(this.settled)return;n||(n=!0,this.timeline.firstReasonerDelta(this.deps.clock.now())),this.deps.emit({type:"response.delta",turnId:this.deps.turnId,text:o.text});for(let s of this.deps.segmenter.push(o.text))r.pushText(s)}if(!this.settled){for(let o of this.deps.segmenter.flush())r.pushText(o);await r.end()}}finishBlank(){this.settled||(this.settled=!0,this.timeline.blank(this.deps.clock.now()),this.deps.onComplete())}finishDone(){this.settled||(this.settled=!0,this.timeline.completed(this.deps.clock.now()),this.deps.emit({type:"response.done",turnId:this.deps.turnId}),this.deps.onComplete())}finishError(e,n){this.settled||(this.settled=!0,this.deps.controller.dispose(),this.reasonAbort.abort(),this.ttsStream?.cancel(),this.deps.emit({type:"error",turnId:this.deps.turnId,...this.deps.commandId!==void 0&&{commandId:this.deps.commandId},reason:e,message:n instanceof Error?n.message:String(n)}),this.deps.onComplete())}buildUserTurn(e,n){return{source:"voice",turnId:this.deps.turnId,sessionId:this.deps.sessionId,deviceId:this.deps.deviceId,text:e,startMs:this.deps.startMs,endMs:n,...this.deps.projectId!==void 0&&{projectId:this.deps.projectId}}}}});import{randomUUID as Zh}from"node:crypto";var vn,Di,va,Ix=v(()=>{"use strict";$i();Yp();R$();Xp();Qp();Ii();Ch();Lh();Mh();Vh();kx();vn=class extends Error{constructor(e){super(e),this.name="ReasonerUnavailableError"}},Di=class extends Error{constructor(e){super(e),this.name="VoiceUnavailableError"}},va=class{deps;sessionId;deviceId;projectId;queue=new Qs;closed=!1;eventsConsumed=!1;inFlight=!1;reasoner=null;turnAbort=null;voiceTurn=null;voiceTurnFailed=!1;voiceEngines=null;clock;newTurnController;newSmartTurnInference;newFrameClassifier;newSegmenter;voiceIdentity;smartTurnInference=null;frameClassifier=null;constructor(e,n,i){this.deps=i,this.sessionId=e,this.deviceId=n.deviceId,this.projectId=n.projectId,this.clock=i.clock??new wi,this.newSmartTurnInference=i.createSmartTurnInference??(()=>new Ri),this.newFrameClassifier=i.createFrameClassifier??(()=>new ki(new vr)),this.newTurnController=i.createTurnController??(r=>{let o=this.ensureFrameClassifier();return o.reset?.(),new Ni(r,this.ensureSmartTurnInference(),{},o)}),this.newSegmenter=i.createSegmenter??(()=>new xi),this.voiceIdentity=i.voiceIdentity??Fh,this.emit({type:"session.ready"})}async send(e){let{commandId:n}=e;if(this.closed)throw new Le(n,"closed");if(e.sessionId!==this.sessionId)throw new Le(n,"invalid","command sessionId does not match session");switch(e.type){case"input.text":this.acceptTextInput(e);return;case"input.audio.frame":this.acceptAudioFrame(e);return;case"input.audio.end":this.endAudioInput(e);return;case"turn.cancel":this.cancelTurn(e);return;case"session.close":return this.close();case"approval.resolve":throw new Le(n,"unsupported");default:throw new Le(n,"invalid")}}events(){if(this.eventsConsumed)throw new Error("CoreSession.events() supports a single consumer in v0.1");return this.eventsConsumed=!0,this.queue.drain()}close(){if(!this.closed){this.closed=!0,this.turnAbort?.abort(),this.voiceTurn?.cancel();let e=this.smartTurnInference;this.smartTurnInference=null;let n=this.frameClassifier;this.frameClassifier=null,this.queue.close();let i=[];if(e&&i.push(e.dispose().catch(()=>{})),n?.dispose&&i.push(n.dispose().catch(()=>{})),i.length>0)return Promise.all(i).then(()=>{})}return Promise.resolve()}acceptTextInput(e){if(e.text.trim().length===0)throw new Le(e.commandId,"invalid","input.text requires non-empty text");if(this.inFlight)throw new Le(e.commandId,"backpressured","a turn is already in progress (one turn at a time in v0.1)");this.inFlight=!0;let n=Zh();this.emit({type:"turn.accepted",turnId:n,clientTurnId:e.clientTurnId,source:"text",commandId:e.commandId}),this.emit({type:"turn.final",turnId:n,turn:this.toTextUserTurn(n,e),commandId:e.commandId}),this.runTextTurn(n,e)}async runTextTurn(e,n){let i=new AbortController;this.turnAbort=i;try{let r=this.ensureReasoner();this.emit({type:"state",turnId:e,state:"responding"});for await(let o of r.run(n.text,i.signal))this.emit({type:"response.delta",turnId:e,text:o.text});this.emit({type:"response.done",turnId:e})}catch(r){let o=r instanceof vn?"no_text_route":"turn_failed";this.emit({type:"error",turnId:e,commandId:n.commandId,reason:o,message:r instanceof Error?r.message:String(r)})}finally{this.inFlight=!1,this.turnAbort=null}}acceptAudioFrame(e){if(this.voiceTurn){this.voiceTurn.pushFrame(e.audio,e.atMs);return}if(this.voiceTurnFailed)return;if(this.inFlight)throw new Le(e.commandId,"backpressured","a turn is already in progress (one turn at a time in v0.1)");this.inFlight=!0;let n=Zh();this.emit({type:"turn.accepted",turnId:n,clientTurnId:e.clientTurnId,source:"voice",commandId:e.commandId});let i=this.resolveVoicePipeline(n,e.commandId);if(!i){this.voiceTurnFailed=!0;return}this.voiceTurn=new ga({turnId:n,sessionId:this.sessionId,deviceId:this.deviceId,...this.projectId!==void 0&&{projectId:this.projectId},commandId:e.commandId,startMs:e.atMs,asrEngine:i.engines.asrEngine,ttsEngine:i.engines.ttsEngine,voice:this.voiceIdentity,reasoner:i.reasoner,controller:this.newTurnController(this.clock),segmenter:this.newSegmenter(),clock:this.clock,emit:r=>this.emit(r),onComplete:()=>this.completeVoiceTurn()}),this.smartTurnInference?.prewarm?.(),this.frameClassifier?.prewarm?.(),this.voiceTurn.pushFrame(e.audio,e.atMs)}endAudioInput(e){if(this.voiceTurnFailed){this.resetVoiceFailure();return}this.voiceTurn?.endAudio(e.atMs)}cancelTurn(e){if(this.voiceTurnFailed){this.resetVoiceFailure();return}this.voiceTurn?.cancel()}completeVoiceTurn(){this.voiceTurn=null,this.inFlight=!1}resetVoiceFailure(){this.voiceTurnFailed=!1}resolveVoicePipeline(e,n){let i;try{i=this.ensureVoiceEngines()}catch(o){return this.emitTurnError(e,n,"no_voice_route",o),null}let r;try{r=this.ensureReasoner()}catch(o){let s=o instanceof vn?"no_text_route":"turn_failed";return this.emitTurnError(e,n,s,o),null}return{engines:i,reasoner:r}}ensureVoiceEngines(){if(this.voiceEngines)return this.voiceEngines;if(!this.deps.voiceRegistry)throw new Di("voice is not available in this core build");let e=this.deps.configService.resolved(),n=e.routes?.stt,i=e.routes?.tts;if(!n||!i)throw new Di("no voice route configured - run 'jarvis init' to set routes.stt and routes.tts");let r=e.secrets?.[n.provider],o=e.secrets?.[i.provider];if(!r||!o){let u=r?i.provider:n.provider;throw new Di(`no API key for voice provider '${u}' - run 'jarvis init' to add it`)}let s=this.deps.voiceRegistry.asrEngine({provider:n.provider,model:n.model},r),a=this.deps.voiceRegistry.ttsEngine({provider:i.provider,model:i.model},o);return this.voiceEngines={asrEngine:s,ttsEngine:a},this.voiceEngines}ensureSmartTurnInference(){return this.smartTurnInference??=this.newSmartTurnInference(),this.smartTurnInference}ensureFrameClassifier(){return this.frameClassifier??=this.newFrameClassifier(),this.frameClassifier}ensureReasoner(){if(this.reasoner)return this.reasoner;let e=this.deps.configService.resolved(),n=e.routes?.text;if(!n)throw new vn("no text model is configured - run 'jarvis init' to set routes.text");let i=e.secrets?.[n.provider];if(!i)throw new vn(`no API key for text provider '${n.provider}' - run 'jarvis init' to add it`);let r=this.deps.registry.textAdapter({provider:n.provider,model:n.model},i);return this.reasoner=new bi(r,n.model,this.deps.systemPrompt),this.reasoner}toTextUserTurn(e,n){return{source:"text",turnId:e,sessionId:this.sessionId,deviceId:this.deviceId,text:n.text,atMs:n.atMs,...this.projectId!==void 0&&{projectId:this.projectId}}}emitTurnError(e,n,i,r){this.emit({type:"error",turnId:e,commandId:n,reason:i,message:r instanceof Error?r.message:String(r)}),this.inFlight=!1}emit(e){this.queue.push({...e,sessionId:this.sessionId,eventId:Zh(),atMs:Date.now()})}}});function ya(t){try{let e=JSON.parse(t);return typeof e=="object"&&e!==null?e:void 0}catch{return}}function Bh(t){return typeof t=="string"?t:""}function _a(t){let e=t.message_type;return typeof e=="string"&&(oO.has(e)||e.endsWith("_error"))?e:typeof t.error=="string"&&t.error.length>0?"error":null}function Ex(t){return Buffer.from(t).toString("base64")}function Tx(t){return new Uint8Array(Buffer.from(t,"base64"))}function $a(t,e){return new Error(`${t} connection error: ${e.message}`)}var oO,Gh=v(()=>{"use strict";oO=new Set(["error","auth_error","quota_exceeded","rate_limited"])});function sO(t,e,n){let i=new URL(t);i.searchParams.set("model_id",e),i.searchParams.set("audio_format",aO(n)),i.searchParams.set("commit_strategy","manual"),n.language&&i.searchParams.set("language_code",n.language);for(let r of n.biasTerms??[])i.searchParams.append("keyterms",r);return i.toString()}function aO(t){return t.encoding==="pcm_s16le"?`pcm_${t.sampleRate}`:"pcm_16000"}var Ox,Li,Wh,qh=v(()=>{"use strict";Gh();Ox="wss://api.elevenlabs.io/v1/speech-to-text/realtime",Li=class{apiKey;socketFactory;model;endpoint;id="elevenlabs-scribe";constructor(e,n,i,r=Ox){this.apiKey=e,this.socketFactory=n,this.model=i,this.endpoint=r}open(e){return new Wh(this.apiKey,this.socketFactory,this.model,this.endpoint,e)}},Wh=class{opts;socket;opened=!1;aborted=!1;closed=!1;pending=[];committed=[];transcriptCb;errorCb;endPending=null;commitRequested=!1;constructor(e,n,i,r,o){this.opts=o,this.socket=n(sO(r,i,o),{"xi-api-key":e}),this.socket.onOpen(()=>this.handleOpen()),this.socket.onMessage(s=>this.handleMessage(s)),this.socket.onError(s=>this.handleError(s)),this.socket.onClose(()=>this.handleClose())}pushAudio(e){if(!(this.aborted||this.closed||this.commitRequested)){if(!this.opened){this.pending.push(e);return}this.sendChunk(e,!1)}}onTranscript(e){this.transcriptCb=e}onError(e){this.errorCb=e}end(){return this.aborted?Promise.reject(new Error("ASR stream already aborted")):this.endPending?Promise.reject(new Error("ASR end() already in progress")):new Promise((e,n)=>{this.endPending={resolve:e,reject:n},this.commitRequested=!0,this.opened&&this.sendCommit()})}abort(){if(this.aborted=!0,this.endPending){let{reject:e}=this.endPending;this.endPending=null,e(new Error("ASR stream aborted"))}return this.teardown(),Promise.resolve()}handleOpen(){if(!(this.aborted||this.closed)){this.opened=!0;for(let e of this.pending)this.sendChunk(e,!1);this.pending.length=0,this.commitRequested&&this.sendCommit()}}handleMessage(e){if(this.aborted||this.closed)return;let n=ya(e);if(!n)return;let i=_a(n);if(i){this.handleError(new Error(`stream error (${i})`));return}let r=n.message_type;if(r==="partial_transcript"){this.opts.emitPartials&&this.transcriptCb?.({text:Bh(n.text),isFinal:!1,startMs:0});return}if(r==="committed_transcript"||r==="committed_transcript_with_timestamps"){let o=Bh(n.text);o.length>0&&this.committed.push(o),this.endPending&&this.resolveEnd()}}handleError(e){if(this.closed)return;let n=$a("ElevenLabs ASR",e);if(this.endPending){let{reject:i}=this.endPending;this.endPending=null,i(n)}this.errorCb?.(n),this.teardown()}handleClose(){if(this.closed)return;this.closed=!0;let e=new Error("ElevenLabs ASR connection closed unexpectedly");if(this.endPending){let{reject:n}=this.endPending;this.endPending=null,n(e)}this.errorCb?.(e)}resolveEnd(){if(!this.endPending)return;let e={text:this.committed.join(" ").trim(),isFinal:!0,startMs:0};this.transcriptCb?.(e);let{resolve:n}=this.endPending;this.endPending=null,this.teardown(),n(e)}sendChunk(e,n){this.socket.send(JSON.stringify({message_type:"input_audio_chunk",audio_base_64:Ex(e),commit:n,sample_rate:this.opts.sampleRate}))}sendCommit(){this.sendChunk(new Uint8Array(0),!0)}teardown(){this.closed||(this.closed=!0,this.socket.close())}}});import{randomUUID as uO}from"node:crypto";function lO(t,e){let n=t.engineVoice[e];if(!n)throw new Error(`voice '${t.id}' has no '${e}' engineVoice mapping`);if(n.kind!=="preset")throw new Error(`the ${e} adapter needs a preset voiceId for '${t.id}', got kind '${n.kind}'`);return n.voiceId}function dO(t,e,n,i){let r=new URL(t.replace("{voice_id}",encodeURIComponent(e)));return r.searchParams.set("model_id",n),r.searchParams.set("output_format",fO(i)),r.searchParams.set("auto_mode","true"),r.toString()}function fO(t){return t.encoding==="pcm_s16le"?`pcm_${t.sampleRate}`:"pcm_16000"}var Px,cO,ji,Hh,Jh=v(()=>{"use strict";Gh();Px="wss://api.elevenlabs.io/v1/text-to-speech/{voice_id}/multi-stream-input",cO={stability:.5,similarity_boost:.75,use_speaker_boost:!0},ji=class{apiKey;socketFactory;model;endpointTemplate;id="elevenlabs-flash";constructor(e,n,i,r=Px){this.apiKey=e,this.socketFactory=n,this.model=i,this.endpointTemplate=r}speak(e){return new Hh(this.apiKey,this.socketFactory,this.model,this.endpointTemplate,this.id,e)}},Hh=class{socket;contextId=uO();opened=!1;cancelled=!1;closed=!1;endRequested=!1;closeContextSent=!1;pending=[];audioCb;errorCb;endPending=null;constructor(e,n,i,r,o,s){let a=lO(s.voice,o);this.socket=n(dO(r,a,i,s),{"xi-api-key":e}),this.socket.onOpen(()=>this.handleOpen()),this.socket.onMessage(u=>this.handleMessage(u)),this.socket.onError(u=>this.handleError(u)),this.socket.onClose(()=>this.handleClose())}pushText(e){if(!(this.cancelled||this.closed||this.endRequested)){if(!this.opened){this.pending.push(e);return}this.sendText(e)}}onAudio(e){this.audioCb=e}onError(e){this.errorCb=e}end(){return this.cancelled||this.closed?Promise.resolve():this.endPending?Promise.reject(new Error("TTS end() already in progress")):new Promise((e,n)=>{this.endPending={resolve:e,reject:n},this.endRequested=!0,this.opened&&this.sendEndOfContext()})}cancel(){if(this.cancelled||this.closed)return this.cancelled=!0,Promise.resolve();if(this.cancelled=!0,this.endPending){let{resolve:e}=this.endPending;this.endPending=null,e()}return this.opened&&this.sendCloseContext(),this.teardown(),Promise.resolve()}handleOpen(){if(!(this.cancelled||this.closed)){this.opened=!0,this.sendInit();for(let e of this.pending)this.sendText(e);this.pending.length=0,this.endRequested&&this.sendEndOfContext()}}handleMessage(e){if(this.cancelled||this.closed)return;let n=ya(e);if(!n)return;let i=_a(n);if(i){this.handleError(new Error(`stream error (${i})`));return}typeof n.audio=="string"&&n.audio.length>0&&this.audioCb?.(Tx(n.audio)),(n.isFinal===!0||n.is_final===!0)&&this.resolveEnd()}handleError(e){if(this.closed)return;let n=$a("ElevenLabs TTS",e);if(this.endPending){let{reject:i}=this.endPending;this.endPending=null,i(n)}this.errorCb?.(n),this.teardown()}handleClose(){if(this.closed)return;this.closed=!0;let e=new Error("ElevenLabs TTS connection closed unexpectedly");if(this.endPending){let{reject:n}=this.endPending;this.endPending=null,n(e)}this.errorCb?.(e)}resolveEnd(){if(!this.endPending)return;let{resolve:e}=this.endPending;this.endPending=null,this.teardown(),e()}sendInit(){this.socket.send(JSON.stringify({text:" ",voice_settings:cO,context_id:this.contextId}))}sendText(e){let n=e.endsWith(" ")?e:`${e} `;this.socket.send(JSON.stringify({text:n,context_id:this.contextId}))}sendEndOfContext(){this.sendFlush(),this.sendCloseContext()}sendFlush(){this.socket.send(JSON.stringify({context_id:this.contextId,text:"",flush:!0}))}sendCloseContext(){this.closeContextSent||(this.closeContextSent=!0,this.socket.send(JSON.stringify({context_id:this.contextId,close_context:!0})))}teardown(){this.closed||(this.closed=!0,this.socket.close())}}});var kt=z((k2,zx)=>{"use strict";var Cx=["nodebuffer","arraybuffer","fragments"],Ax=typeof Blob<"u";Ax&&Cx.push("blob");zx.exports={BINARY_TYPES:Cx,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Ax,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var Ui=z((I2,ba)=>{"use strict";var{EMPTY_BUFFER:pO}=kt(),Kh=Buffer[Symbol.species];function hO(t,e){if(t.length===0)return pO;if(t.length===1)return t[0];let n=Buffer.allocUnsafe(e),i=0;for(let r=0;r<t.length;r++){let o=t[r];n.set(o,i),i+=o.length}return i<e?new Kh(n.buffer,n.byteOffset,i):n}function Nx(t,e,n,i,r){for(let o=0;o<r;o++)n[i+o]=t[o]^e[o&3]}function Rx(t,e){for(let n=0;n<t.length;n++)t[n]^=e[n&3]}function mO(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)}function Yh(t){if(Yh.readOnly=!0,Buffer.isBuffer(t))return t;let e;return t instanceof ArrayBuffer?e=new Kh(t):ArrayBuffer.isView(t)?e=new Kh(t.buffer,t.byteOffset,t.byteLength):(e=Buffer.from(t),Yh.readOnly=!1),e}ba.exports={concat:hO,mask:Nx,toArrayBuffer:mO,toBuffer:Yh,unmask:Rx};if(!process.env.WS_NO_BUFFER_UTIL)try{let t=ae("bufferutil");ba.exports.mask=function(e,n,i,r,o){o<48?Nx(e,n,i,r,o):t.mask(e,n,i,r,o)},ba.exports.unmask=function(e,n){e.length<32?Rx(e,n):t.unmask(e,n)}}catch{}});var jx=z((E2,Lx)=>{"use strict";var Dx=Symbol("kDone"),Xh=Symbol("kRun"),Qh=class{constructor(e){this[Dx]=()=>{this.pending--,this[Xh]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Xh]()}[Xh](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Dx])}}};Lx.exports=Qh});var $n=z((T2,Vx)=>{"use strict";var Mi=ae("zlib"),Ux=Ui(),gO=jx(),{kStatusCode:Mx}=kt(),vO=Buffer[Symbol.species],yO=Buffer.from([0,0,255,255]),wa=Symbol("permessage-deflate"),It=Symbol("total-length"),yn=Symbol("callback"),Kt=Symbol("buffers"),_n=Symbol("error"),xa,em=class{constructor(e){if(this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!xa){let n=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;xa=new gO(n)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[yn];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let n=this._options,i=e.find(r=>!(n.serverNoContextTakeover===!1&&r.server_no_context_takeover||r.server_max_window_bits&&(n.serverMaxWindowBits===!1||typeof n.serverMaxWindowBits=="number"&&n.serverMaxWindowBits>r.server_max_window_bits)||typeof n.clientMaxWindowBits=="number"&&!r.client_max_window_bits));if(!i)throw new Error("None of the extension offers can be accepted");return n.serverNoContextTakeover&&(i.server_no_context_takeover=!0),n.clientNoContextTakeover&&(i.client_no_context_takeover=!0),typeof n.serverMaxWindowBits=="number"&&(i.server_max_window_bits=n.serverMaxWindowBits),typeof n.clientMaxWindowBits=="number"?i.client_max_window_bits=n.clientMaxWindowBits:(i.client_max_window_bits===!0||n.clientMaxWindowBits===!1)&&delete i.client_max_window_bits,i}acceptAsClient(e){let n=e[0];if(this._options.clientNoContextTakeover===!1&&n.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!n.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(n.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&n.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return n}normalizeParams(e){return e.forEach(n=>{Object.keys(n).forEach(i=>{let r=n[i];if(r.length>1)throw new Error(`Parameter "${i}" must have only a single value`);if(r=r[0],i==="client_max_window_bits"){if(r!==!0){let o=+r;if(!Number.isInteger(o)||o<8||o>15)throw new TypeError(`Invalid value for parameter "${i}": ${r}`);r=o}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${i}": ${r}`)}else if(i==="server_max_window_bits"){let o=+r;if(!Number.isInteger(o)||o<8||o>15)throw new TypeError(`Invalid value for parameter "${i}": ${r}`);r=o}else if(i==="client_no_context_takeover"||i==="server_no_context_takeover"){if(r!==!0)throw new TypeError(`Invalid value for parameter "${i}": ${r}`)}else throw new Error(`Unknown parameter "${i}"`);n[i]=r})}),e}decompress(e,n,i){xa.add(r=>{this._decompress(e,n,(o,s)=>{r(),i(o,s)})})}compress(e,n,i){xa.add(r=>{this._compress(e,n,(o,s)=>{r(),i(o,s)})})}_decompress(e,n,i){let r=this._isServer?"client":"server";if(!this._inflate){let o=`${r}_max_window_bits`,s=typeof this.params[o]!="number"?Mi.Z_DEFAULT_WINDOWBITS:this.params[o];this._inflate=Mi.createInflateRaw({...this._options.zlibInflateOptions,windowBits:s}),this._inflate[wa]=this,this._inflate[It]=0,this._inflate[Kt]=[],this._inflate.on("error",$O),this._inflate.on("data",Fx)}this._inflate[yn]=i,this._inflate.write(e),n&&this._inflate.write(yO),this._inflate.flush(()=>{let o=this._inflate[_n];if(o){this._inflate.close(),this._inflate=null,i(o);return}let s=Ux.concat(this._inflate[Kt],this._inflate[It]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[It]=0,this._inflate[Kt]=[],n&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),i(null,s)})}_compress(e,n,i){let r=this._isServer?"server":"client";if(!this._deflate){let o=`${r}_max_window_bits`,s=typeof this.params[o]!="number"?Mi.Z_DEFAULT_WINDOWBITS:this.params[o];this._deflate=Mi.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:s}),this._deflate[It]=0,this._deflate[Kt]=[],this._deflate.on("data",_O)}this._deflate[yn]=i,this._deflate.write(e),this._deflate.flush(Mi.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let o=Ux.concat(this._deflate[Kt],this._deflate[It]);n&&(o=new vO(o.buffer,o.byteOffset,o.length-4)),this._deflate[yn]=null,this._deflate[It]=0,this._deflate[Kt]=[],n&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),i(null,o)})}};Vx.exports=em;function _O(t){this[Kt].push(t),this[It]+=t.length}function Fx(t){if(this[It]+=t.length,this[wa]._maxPayload<1||this[It]<=this[wa]._maxPayload){this[Kt].push(t);return}this[_n]=new RangeError("Max payload size exceeded"),this[_n].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[_n][Mx]=1009,this.removeListener("data",Fx),this.reset()}function $O(t){if(this[wa]._inflate=null,this[_n]){this[yn](this[_n]);return}t[Mx]=1007,this[yn](t)}});var bn=z((O2,Sa)=>{"use strict";var{isUtf8:Zx}=ae("buffer"),{hasBlob:bO}=kt(),xO=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function wO(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function tm(t){let e=t.length,n=0;for(;n<e;)if((t[n]&128)===0)n++;else if((t[n]&224)===192){if(n+1===e||(t[n+1]&192)!==128||(t[n]&254)===192)return!1;n+=2}else if((t[n]&240)===224){if(n+2>=e||(t[n+1]&192)!==128||(t[n+2]&192)!==128||t[n]===224&&(t[n+1]&224)===128||t[n]===237&&(t[n+1]&224)===160)return!1;n+=3}else if((t[n]&248)===240){if(n+3>=e||(t[n+1]&192)!==128||(t[n+2]&192)!==128||(t[n+3]&192)!==128||t[n]===240&&(t[n+1]&240)===128||t[n]===244&&t[n+1]>143||t[n]>244)return!1;n+=4}else return!1;return!0}function SO(t){return bO&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&(t[Symbol.toStringTag]==="Blob"||t[Symbol.toStringTag]==="File")}Sa.exports={isBlob:SO,isValidStatusCode:wO,isValidUTF8:tm,tokenChars:xO};if(Zx)Sa.exports.isValidUTF8=function(t){return t.length<24?tm(t):Zx(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=ae("utf-8-validate");Sa.exports.isValidUTF8=function(e){return e.length<32?tm(e):t(e)}}catch{}});var sm=z((P2,Kx)=>{"use strict";var{Writable:kO}=ae("stream"),Bx=$n(),{BINARY_TYPES:IO,EMPTY_BUFFER:Gx,kStatusCode:EO,kWebSocket:TO}=kt(),{concat:rm,toArrayBuffer:OO,unmask:PO}=Ui(),{isValidStatusCode:CO,isValidUTF8:Wx}=bn(),ka=Buffer[Symbol.species],Qe=0,qx=1,Hx=2,Jx=3,nm=4,im=5,Ia=6,om=class extends kO{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||IO[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=e.maxBufferedChunks|0,this._maxFragments=e.maxFragments|0,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[TO]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=Qe}_write(e,n,i){if(this._opcode===8&&this._state==Qe)return i();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){i(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(i)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let i=this._buffers[0];return this._buffers[0]=new ka(i.buffer,i.byteOffset+e,i.length-e),new ka(i.buffer,i.byteOffset,e)}let n=Buffer.allocUnsafe(e);do{let i=this._buffers[0],r=n.length-e;e>=i.length?n.set(this._buffers.shift(),r):(n.set(new Uint8Array(i.buffer,i.byteOffset,e),r),this._buffers[0]=new ka(i.buffer,i.byteOffset+e,i.length-e)),e-=i.length}while(e>0);return n}startLoop(e){this._loop=!0;do switch(this._state){case Qe:this.getInfo(e);break;case qx:this.getPayloadLength16(e);break;case Hx:this.getPayloadLength64(e);break;case Jx:this.getMask();break;case nm:this.getData(e);break;case im:case Ia:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let n=this.consume(2);if((n[0]&48)!==0){let r=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(r);return}let i=(n[0]&64)===64;if(i&&!this._extensions[Bx.extensionName]){let r=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(r);return}if(this._fin=(n[0]&128)===128,this._opcode=n[0]&15,this._payloadLength=n[1]&127,this._opcode===0){if(i){let r=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(r);return}if(!this._fragmented){let r=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(r);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let r=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(r);return}this._compressed=i}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let r=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(r);return}if(i){let r=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(r);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let r=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(r);return}}else{let r=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(r);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(n[1]&128)===128,this._isServer){if(!this._masked){let r=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(r);return}}else if(this._masked){let r=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(r);return}this._payloadLength===126?this._state=qx:this._payloadLength===127?this._state=Hx:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let n=this.consume(8),i=n.readUInt32BE(0);if(i>Math.pow(2,21)-1){let r=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(r);return}this._payloadLength=i*Math.pow(2,32)+n.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let n=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(n);return}this._masked?this._state=Jx:this._state=nm}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=nm}getData(e){let n=Gx;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}n=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&PO(n,this._mask)}if(this._opcode>7){this.controlMessage(n,e);return}if(this._compressed){this._state=im,this.decompress(n,e);return}if(n.length){if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let i=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");e(i);return}this._messageLength=this._totalPayloadLength,this._fragments.push(n)}this.dataMessage(e)}decompress(e,n){this._extensions[Bx.extensionName].decompress(e,this._fin,(r,o)=>{if(r)return n(r);if(o.length){if(this._messageLength+=o.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let s=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");n(s);return}if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let s=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");n(s);return}this._fragments.push(o)}this.dataMessage(n),this._state===Qe&&this.startLoop(n)})}dataMessage(e){if(!this._fin){this._state=Qe;return}let n=this._messageLength,i=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let r;this._binaryType==="nodebuffer"?r=rm(i,n):this._binaryType==="arraybuffer"?r=OO(rm(i,n)):this._binaryType==="blob"?r=new Blob(i):r=i,this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=Qe):(this._state=Ia,setImmediate(()=>{this.emit("message",r,!0),this._state=Qe,this.startLoop(e)}))}else{let r=rm(i,n);if(!this._skipUTF8Validation&&!Wx(r)){let o=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(o);return}this._state===im||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=Qe):(this._state=Ia,setImmediate(()=>{this.emit("message",r,!1),this._state=Qe,this.startLoop(e)}))}}controlMessage(e,n){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,Gx),this.end();else{let i=e.readUInt16BE(0);if(!CO(i)){let o=this.createError(RangeError,`invalid status code ${i}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");n(o);return}let r=new ka(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Wx(r)){let o=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");n(o);return}this._loop=!1,this.emit("conclude",i,r),this.end()}this._state=Qe;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=Qe):(this._state=Ia,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=Qe,this.startLoop(n)}))}createError(e,n,i,r,o){this._loop=!1,this._errored=!0;let s=new e(i?`Invalid WebSocket frame: ${n}`:n);return Error.captureStackTrace(s,this.createError),s.code=o,s[EO]=r,s}};Kx.exports=om});var cm=z((A2,Qx)=>{"use strict";var{Duplex:C2}=ae("stream"),{randomFillSync:AO}=ae("crypto"),{types:{isUint8Array:zO}}=ae("util"),Yx=$n(),{EMPTY_BUFFER:NO,kWebSocket:RO,NOOP:DO}=kt(),{isBlob:xn,isValidStatusCode:LO}=bn(),{mask:Xx,toBuffer:_r}=Ui(),et=Symbol("kByteLength"),jO=Buffer.alloc(4),Ea=8*1024,$r,wn=Ea,ct=0,UO=1,MO=2,am=class t{constructor(e,n,i){this._extensions=n||{},i&&(this._generateMask=i,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=ct,this.onerror=DO,this[RO]=void 0}static frame(e,n){let i,r=!1,o=2,s=!1;n.mask&&(i=n.maskBuffer||jO,n.generateMask?n.generateMask(i):(wn===Ea&&($r===void 0&&($r=Buffer.alloc(Ea)),AO($r,0,Ea),wn=0),i[0]=$r[wn++],i[1]=$r[wn++],i[2]=$r[wn++],i[3]=$r[wn++]),s=(i[0]|i[1]|i[2]|i[3])===0,o=6);let a;typeof e=="string"?(!n.mask||s)&&n[et]!==void 0?a=n[et]:(e=Buffer.from(e),a=e.length):(a=e.length,r=n.mask&&n.readOnly&&!s);let u=a;a>=65536?(o+=8,u=127):a>125&&(o+=2,u=126);let c=Buffer.allocUnsafe(r?a+o:o);return c[0]=n.fin?n.opcode|128:n.opcode,n.rsv1&&(c[0]|=64),c[1]=u,u===126?c.writeUInt16BE(a,2):u===127&&(c[2]=c[3]=0,c.writeUIntBE(a,4,6)),n.mask?(c[1]|=128,c[o-4]=i[0],c[o-3]=i[1],c[o-2]=i[2],c[o-1]=i[3],s?[c,e]:r?(Xx(e,i,c,o,a),[c]):(Xx(e,i,e,0,a),[c,e])):[c,e]}close(e,n,i,r){let o;if(e===void 0)o=NO;else{if(typeof e!="number"||!LO(e))throw new TypeError("First argument must be a valid error code number");if(n===void 0||!n.length)o=Buffer.allocUnsafe(2),o.writeUInt16BE(e,0);else{let a=Buffer.byteLength(n);if(a>123)throw new RangeError("The message must not be greater than 123 bytes");if(o=Buffer.allocUnsafe(2+a),o.writeUInt16BE(e,0),typeof n=="string")o.write(n,2);else if(zO(n))o.set(n,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let s={[et]:o.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==ct?this.enqueue([this.dispatch,o,!1,s,r]):this.sendFrame(t.frame(o,s),r)}ping(e,n,i){let r,o;if(typeof e=="string"?(r=Buffer.byteLength(e),o=!1):xn(e)?(r=e.size,o=!1):(e=_r(e),r=e.length,o=_r.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");let s={[et]:r,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};xn(e)?this._state!==ct?this.enqueue([this.getBlobData,e,!1,s,i]):this.getBlobData(e,!1,s,i):this._state!==ct?this.enqueue([this.dispatch,e,!1,s,i]):this.sendFrame(t.frame(e,s),i)}pong(e,n,i){let r,o;if(typeof e=="string"?(r=Buffer.byteLength(e),o=!1):xn(e)?(r=e.size,o=!1):(e=_r(e),r=e.length,o=_r.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");let s={[et]:r,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};xn(e)?this._state!==ct?this.enqueue([this.getBlobData,e,!1,s,i]):this.getBlobData(e,!1,s,i):this._state!==ct?this.enqueue([this.dispatch,e,!1,s,i]):this.sendFrame(t.frame(e,s),i)}send(e,n,i){let r=this._extensions[Yx.extensionName],o=n.binary?2:1,s=n.compress,a,u;typeof e=="string"?(a=Buffer.byteLength(e),u=!1):xn(e)?(a=e.size,u=!1):(e=_r(e),a=e.length,u=_r.readOnly),this._firstFragment?(this._firstFragment=!1,s&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(s=a>=r._threshold),this._compress=s):(s=!1,o=0),n.fin&&(this._firstFragment=!0);let c={[et]:a,fin:n.fin,generateMask:this._generateMask,mask:n.mask,maskBuffer:this._maskBuffer,opcode:o,readOnly:u,rsv1:s};xn(e)?this._state!==ct?this.enqueue([this.getBlobData,e,this._compress,c,i]):this.getBlobData(e,this._compress,c,i):this._state!==ct?this.enqueue([this.dispatch,e,this._compress,c,i]):this.dispatch(e,this._compress,c,i)}getBlobData(e,n,i,r){this._bufferedBytes+=i[et],this._state=MO,e.arrayBuffer().then(o=>{if(this._socket.destroyed){let a=new Error("The socket was closed while the blob was being read");process.nextTick(um,this,a,r);return}this._bufferedBytes-=i[et];let s=_r(o);n?this.dispatch(s,n,i,r):(this._state=ct,this.sendFrame(t.frame(s,i),r),this.dequeue())}).catch(o=>{process.nextTick(FO,this,o,r)})}dispatch(e,n,i,r){if(!n){this.sendFrame(t.frame(e,i),r);return}let o=this._extensions[Yx.extensionName];this._bufferedBytes+=i[et],this._state=UO,o.compress(e,i.fin,(s,a)=>{if(this._socket.destroyed){let u=new Error("The socket was closed while data was being compressed");um(this,u,r);return}this._bufferedBytes-=i[et],this._state=ct,i.readOnly=!1,this.sendFrame(t.frame(a,i),r),this.dequeue()})}dequeue(){for(;this._state===ct&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][et],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][et],this._queue.push(e)}sendFrame(e,n){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],n),this._socket.uncork()):this._socket.write(e[0],n)}};Qx.exports=am;function um(t,e,n){typeof n=="function"&&n(e);for(let i=0;i<t._queue.length;i++){let r=t._queue[i],o=r[r.length-1];typeof o=="function"&&o(e)}}function FO(t,e,n){um(t,e,n),t.onerror(e)}});var uw=z((z2,aw)=>{"use strict";var{kForOnEventAttribute:Fi,kListener:lm}=kt(),ew=Symbol("kCode"),tw=Symbol("kData"),rw=Symbol("kError"),nw=Symbol("kMessage"),iw=Symbol("kReason"),Sn=Symbol("kTarget"),ow=Symbol("kType"),sw=Symbol("kWasClean"),Et=class{constructor(e){this[Sn]=null,this[ow]=e}get target(){return this[Sn]}get type(){return this[ow]}};Object.defineProperty(Et.prototype,"target",{enumerable:!0});Object.defineProperty(Et.prototype,"type",{enumerable:!0});var br=class extends Et{constructor(e,n={}){super(e),this[ew]=n.code===void 0?0:n.code,this[iw]=n.reason===void 0?"":n.reason,this[sw]=n.wasClean===void 0?!1:n.wasClean}get code(){return this[ew]}get reason(){return this[iw]}get wasClean(){return this[sw]}};Object.defineProperty(br.prototype,"code",{enumerable:!0});Object.defineProperty(br.prototype,"reason",{enumerable:!0});Object.defineProperty(br.prototype,"wasClean",{enumerable:!0});var kn=class extends Et{constructor(e,n={}){super(e),this[rw]=n.error===void 0?null:n.error,this[nw]=n.message===void 0?"":n.message}get error(){return this[rw]}get message(){return this[nw]}};Object.defineProperty(kn.prototype,"error",{enumerable:!0});Object.defineProperty(kn.prototype,"message",{enumerable:!0});var Vi=class extends Et{constructor(e,n={}){super(e),this[tw]=n.data===void 0?null:n.data}get data(){return this[tw]}};Object.defineProperty(Vi.prototype,"data",{enumerable:!0});var VO={addEventListener(t,e,n={}){for(let r of this.listeners(t))if(!n[Fi]&&r[lm]===e&&!r[Fi])return;let i;if(t==="message")i=function(o,s){let a=new Vi("message",{data:s?o:o.toString()});a[Sn]=this,Ta(e,this,a)};else if(t==="close")i=function(o,s){let a=new br("close",{code:o,reason:s.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});a[Sn]=this,Ta(e,this,a)};else if(t==="error")i=function(o){let s=new kn("error",{error:o,message:o.message});s[Sn]=this,Ta(e,this,s)};else if(t==="open")i=function(){let o=new Et("open");o[Sn]=this,Ta(e,this,o)};else return;i[Fi]=!!n[Fi],i[lm]=e,n.once?this.once(t,i):this.on(t,i)},removeEventListener(t,e){for(let n of this.listeners(t))if(n[lm]===e&&!n[Fi]){this.removeListener(t,n);break}}};aw.exports={CloseEvent:br,ErrorEvent:kn,Event:Et,EventTarget:VO,MessageEvent:Vi};function Ta(t,e,n){typeof t=="object"&&t.handleEvent?t.handleEvent.call(t,n):t.call(e,n)}});var Oa=z((N2,cw)=>{"use strict";var{tokenChars:Zi}=bn();function ht(t,e,n){t[e]===void 0?t[e]=[n]:t[e].push(n)}function ZO(t){let e=Object.create(null),n=Object.create(null),i=!1,r=!1,o=!1,s,a,u=-1,c=-1,l=-1,d=0;for(;d<t.length;d++)if(c=t.charCodeAt(d),s===void 0)if(l===-1&&Zi[c]===1)u===-1&&(u=d);else if(d!==0&&(c===32||c===9))l===-1&&u!==-1&&(l=d);else if(c===59||c===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${d}`);l===-1&&(l=d);let p=t.slice(u,l);c===44?(ht(e,p,n),n=Object.create(null)):s=p,u=l=-1}else throw new SyntaxError(`Unexpected character at index ${d}`);else if(a===void 0)if(l===-1&&Zi[c]===1)u===-1&&(u=d);else if(c===32||c===9)l===-1&&u!==-1&&(l=d);else if(c===59||c===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${d}`);l===-1&&(l=d),ht(n,t.slice(u,l),!0),c===44&&(ht(e,s,n),n=Object.create(null),s=void 0),u=l=-1}else if(c===61&&u!==-1&&l===-1)a=t.slice(u,d),u=l=-1;else throw new SyntaxError(`Unexpected character at index ${d}`);else if(r){if(Zi[c]!==1)throw new SyntaxError(`Unexpected character at index ${d}`);u===-1?u=d:i||(i=!0),r=!1}else if(o)if(Zi[c]===1)u===-1&&(u=d);else if(c===34&&u!==-1)o=!1,l=d;else if(c===92)r=!0;else throw new SyntaxError(`Unexpected character at index ${d}`);else if(c===34&&t.charCodeAt(d-1)===61)o=!0;else if(l===-1&&Zi[c]===1)u===-1&&(u=d);else if(u!==-1&&(c===32||c===9))l===-1&&(l=d);else if(c===59||c===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${d}`);l===-1&&(l=d);let p=t.slice(u,l);i&&(p=p.replace(/\\/g,""),i=!1),ht(n,a,p),c===44&&(ht(e,s,n),n=Object.create(null),s=void 0),a=void 0,u=l=-1}else throw new SyntaxError(`Unexpected character at index ${d}`);if(u===-1||o||c===32||c===9)throw new SyntaxError("Unexpected end of input");l===-1&&(l=d);let f=t.slice(u,l);return s===void 0?ht(e,f,n):(a===void 0?ht(n,f,!0):i?ht(n,a,f.replace(/\\/g,"")):ht(n,a,f),ht(e,s,n)),e}function BO(t){return Object.keys(t).map(e=>{let n=t[e];return Array.isArray(n)||(n=[n]),n.map(i=>[e].concat(Object.keys(i).map(r=>{let o=i[r];return Array.isArray(o)||(o=[o]),o.map(s=>s===!0?r:`${r}=${s}`).join("; ")})).join("; ")).join(", ")}).join(", ")}cw.exports={format:BO,parse:ZO}});var za=z((L2,bw)=>{"use strict";var GO=ae("events"),WO=ae("https"),qO=ae("http"),fw=ae("net"),HO=ae("tls"),{randomBytes:JO,createHash:KO}=ae("crypto"),{Duplex:R2,Readable:D2}=ae("stream"),{URL:dm}=ae("url"),Yt=$n(),YO=sm(),XO=cm(),{isBlob:QO}=bn(),{BINARY_TYPES:lw,CLOSE_TIMEOUT:eP,EMPTY_BUFFER:Pa,GUID:tP,kForOnEventAttribute:fm,kListener:rP,kStatusCode:nP,kWebSocket:ge,NOOP:pw}=kt(),{EventTarget:{addEventListener:iP,removeEventListener:oP}}=uw(),{format:sP,parse:aP}=Oa(),{toBuffer:uP}=Ui(),hw=Symbol("kAborted"),pm=[8,13],Tt=["CONNECTING","OPEN","CLOSING","CLOSED"],cP=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,re=class t extends GO{constructor(e,n,i){super(),this._binaryType=lw[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Pa,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=t.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,n===void 0?n=[]:Array.isArray(n)||(typeof n=="object"&&n!==null?(i=n,n=[]):n=[n]),mw(this,e,n,i)):(this._autoPong=i.autoPong,this._closeTimeout=i.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){lw.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,n,i){let r=new YO({allowSynchronousEvents:i.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:i.maxBufferedChunks,maxFragments:i.maxFragments,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation}),o=new XO(e,this._extensions,i.generateMask);this._receiver=r,this._sender=o,this._socket=e,r[ge]=this,o[ge]=this,e[ge]=this,r.on("conclude",fP),r.on("drain",pP),r.on("error",hP),r.on("message",mP),r.on("ping",gP),r.on("pong",vP),o.onerror=yP,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),n.length>0&&e.unshift(n),e.on("close",yw),e.on("data",Aa),e.on("end",_w),e.on("error",$w),this._readyState=t.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Yt.extensionName]&&this._extensions[Yt.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,n){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){Ge(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===t.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=t.CLOSING,this._sender.close(e,n,!this._isServer,i=>{i||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),vw(this)}}pause(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,n,i){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=n=void 0):typeof n=="function"&&(i=n,n=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){hm(this,e,i);return}n===void 0&&(n=!this._isServer),this._sender.ping(e||Pa,n,i)}pong(e,n,i){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=n=void 0):typeof n=="function"&&(i=n,n=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){hm(this,e,i);return}n===void 0&&(n=!this._isServer),this._sender.pong(e||Pa,n,i)}resume(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,n,i){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof n=="function"&&(i=n,n={}),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){hm(this,e,i);return}let r={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...n};this._extensions[Yt.extensionName]||(r.compress=!1),this._sender.send(e||Pa,r,i)}terminate(){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){Ge(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=t.CLOSING,this._socket.destroy())}}};Object.defineProperty(re,"CONNECTING",{enumerable:!0,value:Tt.indexOf("CONNECTING")});Object.defineProperty(re.prototype,"CONNECTING",{enumerable:!0,value:Tt.indexOf("CONNECTING")});Object.defineProperty(re,"OPEN",{enumerable:!0,value:Tt.indexOf("OPEN")});Object.defineProperty(re.prototype,"OPEN",{enumerable:!0,value:Tt.indexOf("OPEN")});Object.defineProperty(re,"CLOSING",{enumerable:!0,value:Tt.indexOf("CLOSING")});Object.defineProperty(re.prototype,"CLOSING",{enumerable:!0,value:Tt.indexOf("CLOSING")});Object.defineProperty(re,"CLOSED",{enumerable:!0,value:Tt.indexOf("CLOSED")});Object.defineProperty(re.prototype,"CLOSED",{enumerable:!0,value:Tt.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(re.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(re.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[fm])return e[rP];return null},set(e){for(let n of this.listeners(t))if(n[fm]){this.removeListener(t,n);break}typeof e=="function"&&this.addEventListener(t,e,{[fm]:!0})}})});re.prototype.addEventListener=iP;re.prototype.removeEventListener=oP;bw.exports=re;function mw(t,e,n,i){let r={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:eP,protocolVersion:pm[1],maxBufferedChunks:1048576,maxFragments:131072,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...i,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=r.autoPong,t._closeTimeout=r.closeTimeout,!pm.includes(r.protocolVersion))throw new RangeError(`Unsupported protocol version: ${r.protocolVersion} (supported versions: ${pm.join(", ")})`);let o;if(e instanceof dm)o=e;else try{o=new dm(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}o.protocol==="http:"?o.protocol="ws:":o.protocol==="https:"&&(o.protocol="wss:"),t._url=o.href;let s=o.protocol==="wss:",a=o.protocol==="ws+unix:",u;if(o.protocol!=="ws:"&&!s&&!a?u=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:a&&!o.pathname?u="The URL's pathname is empty":o.hash&&(u="The URL contains a fragment identifier"),u){let _=new SyntaxError(u);if(t._redirects===0)throw _;Ca(t,_);return}let c=s?443:80,l=JO(16).toString("base64"),d=s?WO.request:qO.request,f=new Set,p;if(r.createConnection=r.createConnection||(s?dP:lP),r.defaultPort=r.defaultPort||c,r.port=o.port||c,r.host=o.hostname.startsWith("[")?o.hostname.slice(1,-1):o.hostname,r.headers={...r.headers,"Sec-WebSocket-Version":r.protocolVersion,"Sec-WebSocket-Key":l,Connection:"Upgrade",Upgrade:"websocket"},r.path=o.pathname+o.search,r.timeout=r.handshakeTimeout,r.perMessageDeflate&&(p=new Yt({...r.perMessageDeflate,isServer:!1,maxPayload:r.maxPayload}),r.headers["Sec-WebSocket-Extensions"]=sP({[Yt.extensionName]:p.offer()})),n.length){for(let _ of n){if(typeof _!="string"||!cP.test(_)||f.has(_))throw new SyntaxError("An invalid or duplicated subprotocol was specified");f.add(_)}r.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(r.origin&&(r.protocolVersion<13?r.headers["Sec-WebSocket-Origin"]=r.origin:r.headers.Origin=r.origin),(o.username||o.password)&&(r.auth=`${o.username}:${o.password}`),a){let _=r.path.split(":");r.socketPath=_[0],r.path=_[1]}let h;if(r.followRedirects){if(t._redirects===0){t._originalIpc=a,t._originalSecure=s,t._originalHostOrSocketPath=a?r.socketPath:o.host;let _=i&&i.headers;if(i={...i,headers:{}},_)for(let[S,k]of Object.entries(_))i.headers[S.toLowerCase()]=k}else if(t.listenerCount("redirect")===0){let _=a?t._originalIpc?r.socketPath===t._originalHostOrSocketPath:!1:t._originalIpc?!1:o.host===t._originalHostOrSocketPath;(!_||t._originalSecure&&!s)&&(delete r.headers.authorization,delete r.headers.cookie,_||delete r.headers.host,r.auth=void 0)}r.auth&&!i.headers.authorization&&(i.headers.authorization="Basic "+Buffer.from(r.auth).toString("base64")),h=t._req=d(r),t._redirects&&t.emit("redirect",t.url,h)}else h=t._req=d(r);r.timeout&&h.on("timeout",()=>{Ge(t,h,"Opening handshake has timed out")}),h.on("error",_=>{h===null||h[hw]||(h=t._req=null,Ca(t,_))}),h.on("response",_=>{let S=_.headers.location,k=_.statusCode;if(S&&r.followRedirects&&k>=300&&k<400){if(++t._redirects>r.maxRedirects){Ge(t,h,"Maximum redirects exceeded");return}h.abort();let C;try{C=new dm(S,e)}catch{let I=new SyntaxError(`Invalid URL: ${S}`);Ca(t,I);return}mw(t,C,n,i)}else t.emit("unexpected-response",h,_)||Ge(t,h,`Unexpected server response: ${_.statusCode}`)}),h.on("upgrade",(_,S,k)=>{if(t.emit("upgrade",_),t.readyState!==re.CONNECTING)return;h=t._req=null;let C=_.headers.upgrade;if(C===void 0||C.toLowerCase()!=="websocket"){Ge(t,S,"Invalid Upgrade header");return}let A=KO("sha1").update(l+tP).digest("base64");if(_.headers["sec-websocket-accept"]!==A){Ge(t,S,"Invalid Sec-WebSocket-Accept header");return}let I=_.headers["sec-websocket-protocol"],T;if(I!==void 0?f.size?f.has(I)||(T="Server sent an invalid subprotocol"):T="Server sent a subprotocol but none was requested":f.size&&(T="Server sent no subprotocol"),T){Ge(t,S,T);return}I&&(t._protocol=I);let Z=_.headers["sec-websocket-extensions"];if(Z!==void 0){if(!p){Ge(t,S,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let F;try{F=aP(Z)}catch{Ge(t,S,"Invalid Sec-WebSocket-Extensions header");return}let W=Object.keys(F);if(W.length!==1||W[0]!==Yt.extensionName){Ge(t,S,"Server indicated an extension that was not requested");return}try{p.accept(F[Yt.extensionName])}catch{Ge(t,S,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[Yt.extensionName]=p}t.setSocket(S,k,{allowSynchronousEvents:r.allowSynchronousEvents,generateMask:r.generateMask,maxBufferedChunks:r.maxBufferedChunks,maxFragments:r.maxFragments,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation})}),r.finishRequest?r.finishRequest(h,t):h.end()}function Ca(t,e){t._readyState=re.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}function lP(t){return t.path=t.socketPath,fw.connect(t)}function dP(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=fw.isIP(t.host)?"":t.host),HO.connect(t)}function Ge(t,e,n){t._readyState=re.CLOSING;let i=new Error(n);Error.captureStackTrace(i,Ge),e.setHeader?(e[hw]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(Ca,t,i)):(e.destroy(i),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function hm(t,e,n){if(e){let i=QO(e)?e.size:uP(e).length;t._socket?t._sender._bufferedBytes+=i:t._bufferedAmount+=i}if(n){let i=new Error(`WebSocket is not open: readyState ${t.readyState} (${Tt[t.readyState]})`);process.nextTick(n,i)}}function fP(t,e){let n=this[ge];n._closeFrameReceived=!0,n._closeMessage=e,n._closeCode=t,n._socket[ge]!==void 0&&(n._socket.removeListener("data",Aa),process.nextTick(gw,n._socket),t===1005?n.close():n.close(t,e))}function pP(){let t=this[ge];t.isPaused||t._socket.resume()}function hP(t){let e=this[ge];e._socket[ge]!==void 0&&(e._socket.removeListener("data",Aa),process.nextTick(gw,e._socket),e.close(t[nP])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}function dw(){this[ge].emitClose()}function mP(t,e){this[ge].emit("message",t,e)}function gP(t){let e=this[ge];e._autoPong&&e.pong(t,!this._isServer,pw),e.emit("ping",t)}function vP(t){this[ge].emit("pong",t)}function gw(t){t.resume()}function yP(t){let e=this[ge];e.readyState!==re.CLOSED&&(e.readyState===re.OPEN&&(e._readyState=re.CLOSING,vw(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}function vw(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),t._closeTimeout)}function yw(){let t=this[ge];if(this.removeListener("close",yw),this.removeListener("data",Aa),this.removeListener("end",_w),t._readyState=re.CLOSING,!this._readableState.endEmitted&&!t._closeFrameReceived&&!t._receiver._writableState.errorEmitted&&this._readableState.length!==0){let e=this.read(this._readableState.length);t._receiver.write(e)}t._receiver.end(),this[ge]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",dw),t._receiver.on("finish",dw))}function Aa(t){this[ge]._receiver.write(t)||this.pause()}function _w(){let t=this[ge];t._readyState=re.CLOSING,t._receiver.end(),this.end()}function $w(){let t=this[ge];this.removeListener("error",$w),this.on("error",pw),t&&(t._readyState=re.CLOSING,this.destroy())}});var kw=z((U2,Sw)=>{"use strict";var j2=za(),{Duplex:_P}=ae("stream");function xw(t){t.emit("close")}function $P(){!this.destroyed&&this._writableState.finished&&this.destroy()}function ww(t){this.removeListener("error",ww),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}function bP(t,e){let n=!0,i=new _P({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",function(o,s){let a=!s&&i._readableState.objectMode?o.toString():o;i.push(a)||t.pause()}),t.once("error",function(o){i.destroyed||(n=!1,i.destroy(o))}),t.once("close",function(){i.destroyed||i.push(null)}),i._destroy=function(r,o){if(t.readyState===t.CLOSED){o(r),process.nextTick(xw,i);return}let s=!1;t.once("error",function(u){s=!0,o(u)}),t.once("close",function(){s||o(r),process.nextTick(xw,i)}),n&&t.terminate()},i._final=function(r){if(t.readyState===t.CONNECTING){t.once("open",function(){i._final(r)});return}t._socket!==null&&(t._socket._writableState.finished?(r(),i._readableState.endEmitted&&i.destroy()):(t._socket.once("finish",function(){r()}),t.close()))},i._read=function(){t.isPaused&&t.resume()},i._write=function(r,o,s){if(t.readyState===t.CONNECTING){t.once("open",function(){i._write(r,o,s)});return}t.send(r,s)},i.on("end",$P),i.on("error",ww),i}Sw.exports=bP});var mm=z((M2,Iw)=>{"use strict";var{tokenChars:xP}=bn();function wP(t){let e=new Set,n=-1,i=-1,r=0;for(r;r<t.length;r++){let s=t.charCodeAt(r);if(i===-1&&xP[s]===1)n===-1&&(n=r);else if(r!==0&&(s===32||s===9))i===-1&&n!==-1&&(i=r);else if(s===44){if(n===-1)throw new SyntaxError(`Unexpected character at index ${r}`);i===-1&&(i=r);let a=t.slice(n,i);if(e.has(a))throw new SyntaxError(`The "${a}" subprotocol is duplicated`);e.add(a),n=i=-1}else throw new SyntaxError(`Unexpected character at index ${r}`)}if(n===-1||i!==-1)throw new SyntaxError("Unexpected end of input");let o=t.slice(n,r);if(e.has(o))throw new SyntaxError(`The "${o}" subprotocol is duplicated`);return e.add(o),e}Iw.exports={parse:wP}});var zw=z((V2,Aw)=>{"use strict";var SP=ae("events"),Na=ae("http"),{Duplex:F2}=ae("stream"),{createHash:kP}=ae("crypto"),Ew=Oa(),xr=$n(),IP=mm(),EP=za(),{CLOSE_TIMEOUT:TP,GUID:OP,kWebSocket:PP}=kt(),CP=/^[+/0-9A-Za-z]{22}==$/,Tw=0,Ow=1,Cw=2,gm=class extends SP{constructor(e,n){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:1024*1024,maxFragments:128*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:TP,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:EP,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=Na.createServer((i,r)=>{let o=Na.STATUS_CODES[426];r.writeHead(426,{"Content-Length":o.length,"Content-Type":"text/plain"}),r.end(o)}),this._server.listen(e.port,e.host,e.backlog,n)):e.server&&(this._server=e.server),this._server){let i=this.emit.bind(this,"connection");this._removeListeners=AP(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(r,o,s)=>{this.handleUpgrade(r,o,s,i)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=Tw}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===Cw){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(Bi,this);return}if(e&&this.once("close",e),this._state!==Ow)if(this._state=Ow,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(Bi,this):process.nextTick(Bi,this);else{let n=this._server;this._removeListeners(),this._removeListeners=this._server=null,n.close(()=>{Bi(this)})}}shouldHandle(e){if(this.options.path){let n=e.url.indexOf("?");if((n!==-1?e.url.slice(0,n):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,n,i,r){n.on("error",Pw);let o=e.headers["sec-websocket-key"],s=e.headers.upgrade,a=+e.headers["sec-websocket-version"];if(e.method!=="GET"){wr(this,e,n,405,"Invalid HTTP method");return}if(s===void 0||s.toLowerCase()!=="websocket"){wr(this,e,n,400,"Invalid Upgrade header");return}if(o===void 0||!CP.test(o)){wr(this,e,n,400,"Missing or invalid Sec-WebSocket-Key header");return}if(a!==13&&a!==8){wr(this,e,n,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(e)){Gi(n,400);return}let u=e.headers["sec-websocket-protocol"],c=new Set;if(u!==void 0)try{c=IP.parse(u)}catch{wr(this,e,n,400,"Invalid Sec-WebSocket-Protocol header");return}let l=e.headers["sec-websocket-extensions"],d={};if(this.options.perMessageDeflate&&l!==void 0){let f=new xr({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let p=Ew.parse(l);p[xr.extensionName]&&(f.accept(p[xr.extensionName]),d[xr.extensionName]=f)}catch{wr(this,e,n,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let f={origin:e.headers[`${a===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(f,(p,h,_,S)=>{if(!p)return Gi(n,h||401,_,S);this.completeUpgrade(d,o,c,e,n,i,r)});return}if(!this.options.verifyClient(f))return Gi(n,401)}this.completeUpgrade(d,o,c,e,n,i,r)}completeUpgrade(e,n,i,r,o,s,a){if(!o.readable||!o.writable)return o.destroy();if(o[PP])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>Tw)return Gi(o,503);let c=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${kP("sha1").update(n+OP).digest("base64")}`],l=new this.options.WebSocket(null,void 0,this.options);if(i.size){let d=this.options.handleProtocols?this.options.handleProtocols(i,r):i.values().next().value;d&&(c.push(`Sec-WebSocket-Protocol: ${d}`),l._protocol=d)}if(e[xr.extensionName]){let d=e[xr.extensionName].params,f=Ew.format({[xr.extensionName]:[d]});c.push(`Sec-WebSocket-Extensions: ${f}`),l._extensions=e}this.emit("headers",c,r),o.write(c.concat(`\r
70
+ `),a=[]);continue}if(d.startsWith(":"))continue;let f=d.indexOf(":");if((f===-1?d:d.slice(0,f))!=="data")continue;let p=f===-1?"":d.slice(f+1);p.startsWith(" ")&&(p=p.slice(1)),a.push(p)}}}finally{r.cancel().catch(()=>{})}}function ST(t,e,n){return e?.aborted?Promise.reject(Rb(e)):new Promise((i,r)=>{let o=!1,s=c=>{o||(o=!0,u!==void 0&&clearTimeout(u),e?.removeEventListener("abort",a),c())},a=()=>s(()=>r(Rb(e))),u=n!==void 0?setTimeout(()=>s(()=>r(new Xs(n))),n):void 0;e?.addEventListener("abort",a,{once:!0}),t.read().then(c=>s(()=>i(c)),c=>s(()=>r(kT(c))))})}function Rb(t){let e=t?.reason;return e instanceof Error?e:new Error("text stream aborted")}function kT(t){return t instanceof Error?t:new Error(String(t))}var Xs,Kh=v(()=>{"use strict";Xs=class extends Error{constructor(e){super(`text stream idle for ${e}ms`),this.name="IdleTimeoutError"}}});var Zt,Yh=v(()=>{"use strict";Zt=class extends Error{status;constructor(e,n){super(e),this.status=n,this.name="TextAdapterError"}}});function Lb(t){try{return JSON.parse(t)}catch{return}}function dn(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)?t:void 0}function PT(t){return Array.isArray(t)?t:void 0}function Ub(t){let e=dn(t)?.message;return typeof e=="string"?e:"unknown error"}var ea,IT,ET,TT,OT,Qs,_i,bi,Xh=v(()=>{"use strict";Kh();Yh();ea=3e4,IT=4096,ET="https://api.anthropic.com/v1/messages",TT="2023-06-01",OT="https://api.openai.com/v1/chat/completions",Qs=class{key;fetchImpl;idleTimeoutMs;constructor(e,n=fetch,i=ea){this.key=e,this.fetchImpl=n,this.idleTimeoutMs=i}async*stream(e){let{url:n,init:i}=this.buildRequest(e),r=await this.fetchImpl(n,{...i,signal:e.signal});if(!r.ok)throw new Zt(`text provider request failed (HTTP ${r.status})`,r.status);if(!r.body)throw new Zt("text provider response had no body");for await(let o of Db(r.body,{signal:e.signal,idleTimeoutMs:this.idleTimeoutMs})){if(this.isDone(o))return;let s=this.decode(o);s&&(yield s)}}},_i=class extends Qs{buildRequest(e){let n={model:e.model,max_tokens:IT,stream:!0,messages:e.messages.map(i=>({role:i.role,content:i.content})),...e.system!==void 0&&{system:e.system}};return{url:ET,init:{method:"POST",headers:{"x-api-key":this.key,"anthropic-version":TT,"content-type":"application/json"},body:JSON.stringify(n)}}}isDone(){return!1}decode(e){let n=dn(Lb(e));if(!n)return null;if(n.type==="error")throw new Zt(`anthropic stream error: ${Ub(n.error)}`);if(n.type==="content_block_delta"){let i=dn(n.delta);if(i?.type==="text_delta"&&typeof i.text=="string")return{type:"text",text:i.text}}return null}},bi=class extends Qs{buildRequest(e){let n=e.system!==void 0?[{role:"system",content:e.system},...e.messages]:e.messages,i={model:e.model,stream:!0,messages:n};return{url:OT,init:{method:"POST",headers:{Authorization:`Bearer ${this.key}`,"content-type":"application/json"},body:JSON.stringify(i)}}}isDone(e){return e==="[DONE]"}decode(e){let n=dn(Lb(e));if(!n)return null;if(n.error)throw new Zt(`openai stream error: ${Ub(n.error)}`);let i=PT(n.choices),r=i?dn(i[0])?.delta:void 0,o=dn(r)?.content;return typeof o=="string"&&o.length>0?{type:"text",text:o}:null}}});var $i,Qh=v(()=>{"use strict";Xh();$i=class{fetchImpl;idleTimeoutMs;constructor(e=fetch,n=ea){this.fetchImpl=e,this.idleTimeoutMs=n}textAdapter(e,n){switch(e.provider){case"anthropic":return new _i(n,this.fetchImpl,this.idleTimeoutMs);case"openai":return new bi(n,this.fetchImpl,this.idleTimeoutMs);default:throw new Error(`no text adapter for provider '${e.provider}'`)}}}});var Le,jb=v(()=>{"use strict";Le=class extends Error{commandId;reason;constructor(e,n,i){super(i??`send rejected (${n}) for command ${e}`),this.commandId=e,this.reason=n,this.name="SessionSendError"}}});var Mb=v(()=>{"use strict"});var xi=v(()=>{"use strict";jb();Mb()});var Fb,wi,ep=v(()=>{"use strict";Fb="You are Jarvis, a voice-first personal agent and a continuous, trusted collaborator - not a disposable chat assistant. You help with software engineering work. Be concise, direct, and technical; skip filler and preamble. When you are unsure, say so plainly rather than guessing. You reason and explain; you do not yet take actions or use tools, so propose the next steps for the human to run rather than claiming to have run them.",wi=class{adapter;model;systemPrompt;history=[];constructor(e,n,i=Fb){this.adapter=e,this.model=n,this.systemPrompt=i}async*run(e,n){if(e.trim()==="")return;let i=this.assemble(e),r="";for await(let o of this.adapter.stream({model:this.model,system:this.systemPrompt,messages:i,...n!==void 0&&{signal:n}}))r+=o.text,yield o;this.history.push({role:"user",content:e},{role:"assistant",content:r})}historySnapshot(){return[...this.history]}assemble(e){return[...this.history,{role:"user",content:e}]}}});var ta,Vb=v(()=>{"use strict";ta=class{buffer=[];pending=null;closed=!1;push(e){if(this.closed)return;let n=this.pending;if(n){this.pending=null,n({value:e,done:!1});return}this.buffer.push(e)}close(){if(this.closed)return;this.closed=!0;let e=this.pending;e&&(this.pending=null,e({value:void 0,done:!0}))}async*drain(){for(;;){if(this.buffer.length>0){yield this.buffer.shift();continue}if(this.closed)return;let e=await new Promise(n=>{this.pending=n});if(e.done)return;yield e.value}}}});var CT,AT,Zb,Si,tp=v(()=>{"use strict";CT=new Set([".","!","?"]),AT=new Set([",",";",":"]),Zb={minClauseLength:12},Si=class{buffer="";minClauseLength;constructor(e=Zb){this.minClauseLength=e.minClauseLength}push(e){this.buffer+=e;let n=[];for(let i=this.findBoundary();i!==-1;i=this.findBoundary()){let r=this.buffer.slice(0,i+1).trim();this.buffer=this.buffer.slice(i+1).replace(/^\s+/,""),r.length>0&&n.push(r)}return n}flush(){let e=this.buffer.trim();return this.buffer="",e.length>0?[e]:[]}findBoundary(){for(let e=0;e<this.buffer.length;e++){let n=this.buffer[e];if(n===`
71
+ `)return e;let i=e+1<this.buffer.length?this.buffer[e+1]:"";if(i!==""&&/\s/.test(i)&&(CT.has(n)||AT.has(n)&&e+1>=this.minClauseLength))return e}return-1}}});var ki,rp=v(()=>{"use strict";ki=class{nextId=1;timers=new Map;now(){return Date.now()}setTimer(e,n){let i=this.nextId++,r=setTimeout(()=>{this.timers.delete(i),n()},e);return this.timers.set(i,r),i}clearTimer(e){let n=this.timers.get(e);n!==void 0&&(clearTimeout(n),this.timers.delete(e))}}});function Bt(t,e){let n=Math.floor(t.byteLength/2);if(n===0)return!1;let i=new DataView(t.buffer,t.byteOffset,t.byteLength),r=0;for(let o=0;o<n;o++){let s=i.getInt16(o*2,!0)/32768;r+=s*s}return Math.sqrt(r/n)>=e}function zT(t){let e=t.byteLength>>1,n=new DataView(t.buffer,t.byteOffset,t.byteLength),i=new Int16Array(e);for(let r=0;r<e;r++)i[r]=n.getInt16(r*2,!0);return i}var ra,Ii,Ei,Ti=v(()=>{"use strict";De();ra=.02;Ii=class{threshold;constructor(e){this.threshold=e}classify(e,n){n(Bt(e,this.threshold))}},Ei=class{vad;speechThreshold;energyThreshold;log;degraded=!1;announced=!1;disposed=!1;constructor(e,n={}){this.vad=e,this.speechThreshold=n.speechThreshold??.5,this.energyThreshold=n.energyThreshold??ra,this.log=n.log??q}classify(e,n){if(this.degraded){this.announce("energy (fallback)"),n(Bt(e,this.energyThreshold));return}this.vad.process(zT(e)).then(i=>{if(!this.disposed){this.announce("silero");for(let r of i)n(r>=this.speechThreshold)}},i=>{this.disposed||(this.degrade(i),this.announce("energy (fallback)"),n(Bt(e,this.energyThreshold)))})}reset(){!this.degraded&&!this.disposed&&this.vad.reset()}prewarm(){this.degraded||this.disposed||this.vad.load().then(()=>{},e=>this.degrade(e))}dispose(){return this.disposed=!0,this.vad.dispose()}degrade(e){this.degraded||this.disposed||(this.degraded=!0,this.log.debug("frame classifier DEGRADED to energy (fallback) - silero vad failed; turn-end classifies on RMS energy for the rest of the session",{error:e instanceof Error?e.message:String(e)}))}announce(e){this.announced||(this.announced=!0,this.log.debug(`frame classifier: ${e}`))}}});var na,mr,fn,NT,Bb,np=v(()=>{na=new Map,mr=[],fn=(t,e,n)=>{if(e&&typeof e.init=="function"&&typeof e.createInferenceSessionHandler=="function"){let i=na.get(t);if(i===void 0)na.set(t,{backend:e,priority:n});else{if(i.priority>n)return;if(i.priority===n&&i.backend!==e)throw new Error(`cannot register backend "${t}" using priority ${n}`)}if(n>=0){let r=mr.indexOf(t);r!==-1&&mr.splice(r,1);for(let o=0;o<mr.length;o++)if(na.get(mr[o]).priority<=n){mr.splice(o,0,t);return}mr.push(t)}return}throw new TypeError("not a valid backend")},NT=async t=>{let e=na.get(t);if(!e)return"backend not found.";if(e.initialized)return e.backend;if(e.aborted)return e.error;{let n=!!e.initPromise;try{return n||(e.initPromise=e.backend.init(t)),await e.initPromise,e.initialized=!0,e.backend}catch(i){return n||(e.error=`${i}`,e.aborted=!0),e.error}finally{delete e.initPromise}}},Bb=async t=>{let e=t.executionProviders||[],n=e.map(u=>typeof u=="string"?u:u.name),i=n.length===0?mr:n,r,o=[],s=new Set;for(let u of i){let c=await NT(u);typeof c=="string"?o.push({name:u,err:c}):(r||(r=c),r===c&&s.add(u))}if(!r)throw new Error(`no available backend found. ERR: ${o.map(u=>`[${u.name}] ${u.err}`).join(", ")}`);for(let{name:u,err:c}of o)n.includes(u)&&console.warn(`removing requested execution provider "${u}" from session options because it is not available: ${c}`);let a=e.filter(u=>s.has(typeof u=="string"?u:u.name));return[r,new Proxy(t,{get:(u,c)=>c==="executionProviders"?a:Reflect.get(u,c)})]}});var Gb=v(()=>{np()});var Wb,qb=v(()=>{Wb="1.26.0"});var Hb,de,ip=v(()=>{qb();Hb="warning",de={wasm:{},webgl:{},webgpu:{},versions:{common:Wb},set logLevel(t){if(t!==void 0){if(typeof t!="string"||["verbose","info","warning","error","fatal"].indexOf(t)===-1)throw new Error(`Unsupported logging level: ${t}`);Hb=t}},get logLevel(){return Hb}};Object.defineProperty(de,"logLevel",{enumerable:!0})});var ie,Jb=v(()=>{ip();ie=de});var Kb,Yb,Xb=v(()=>{Kb=(t,e)=>{let n=typeof document<"u"?document.createElement("canvas"):new OffscreenCanvas(1,1);n.width=t.dims[3],n.height=t.dims[2];let i=n.getContext("2d");if(i!=null){let r,o;e?.tensorLayout!==void 0&&e.tensorLayout==="NHWC"?(r=t.dims[2],o=t.dims[3]):(r=t.dims[3],o=t.dims[2]);let s=e?.format!==void 0?e.format:"RGB",a=e?.norm,u,c;a===void 0||a.mean===void 0?u=[255,255,255,255]:typeof a.mean=="number"?u=[a.mean,a.mean,a.mean,a.mean]:(u=[a.mean[0],a.mean[1],a.mean[2],0],a.mean[3]!==void 0&&(u[3]=a.mean[3])),a===void 0||a.bias===void 0?c=[0,0,0,0]:typeof a.bias=="number"?c=[a.bias,a.bias,a.bias,a.bias]:(c=[a.bias[0],a.bias[1],a.bias[2],0],a.bias[3]!==void 0&&(c[3]=a.bias[3]));let l=o*r,d=0,f=l,h=l*2,p=-1;s==="RGBA"?(d=0,f=l,h=l*2,p=l*3):s==="RGB"?(d=0,f=l,h=l*2):s==="RBG"&&(d=0,h=l,f=l*2);for(let _=0;_<o;_++)for(let S=0;S<r;S++){let k=(t.data[d++]-c[0])*u[0],C=(t.data[f++]-c[1])*u[1],A=(t.data[h++]-c[2])*u[2],I=p===-1?255:(t.data[p++]-c[3])*u[3];i.fillStyle="rgba("+k+","+C+","+A+","+I+")",i.fillRect(S,_,1,1)}if("toDataURL"in n)return n.toDataURL();throw new Error("toDataURL is not supported")}else throw new Error("Can not access image data")},Yb=(t,e)=>{let n=typeof document<"u"?document.createElement("canvas").getContext("2d"):new OffscreenCanvas(1,1).getContext("2d"),i;if(n!=null){let r,o,s;e?.tensorLayout!==void 0&&e.tensorLayout==="NHWC"?(r=t.dims[2],o=t.dims[1],s=t.dims[3]):(r=t.dims[3],o=t.dims[2],s=t.dims[1]);let a=e!==void 0&&e.format!==void 0?e.format:"RGB",u=e?.norm,c,l;u===void 0||u.mean===void 0?c=[255,255,255,255]:typeof u.mean=="number"?c=[u.mean,u.mean,u.mean,u.mean]:(c=[u.mean[0],u.mean[1],u.mean[2],255],u.mean[3]!==void 0&&(c[3]=u.mean[3])),u===void 0||u.bias===void 0?l=[0,0,0,0]:typeof u.bias=="number"?l=[u.bias,u.bias,u.bias,u.bias]:(l=[u.bias[0],u.bias[1],u.bias[2],0],u.bias[3]!==void 0&&(l[3]=u.bias[3]));let d=o*r;if(e!==void 0&&(e.format!==void 0&&s===4&&e.format!=="RGBA"||s===3&&e.format!=="RGB"&&e.format!=="BGR"))throw new Error("Tensor format doesn't match input tensor dims");let f=4,h=0,p=1,_=2,S=3,k=0,C=d,A=d*2,I=-1;a==="RGBA"?(k=0,C=d,A=d*2,I=d*3):a==="RGB"?(k=0,C=d,A=d*2):a==="RBG"&&(k=0,A=d,C=d*2),i=n.createImageData(r,o);for(let T=0;T<o*r;h+=f,p+=f,_+=f,S+=f,T++)i.data[h]=(t.data[k++]-l[0])*c[0],i.data[p]=(t.data[C++]-l[1])*c[1],i.data[_]=(t.data[A++]-l[2])*c[2],i.data[S]=I===-1?255:(t.data[I++]-l[3])*c[3]}else throw new Error("Can not access image data");return i}});var op,Qb,e$,t$,r$,n$,i$=v(()=>{ia();op=(t,e)=>{if(t===void 0)throw new Error("Image buffer must be defined");if(e.height===void 0||e.width===void 0)throw new Error("Image height and width must be defined");if(e.tensorLayout==="NHWC")throw new Error("NHWC Tensor layout is not supported yet");let{height:n,width:i}=e,r=e.norm??{mean:255,bias:0},o,s;typeof r.mean=="number"?o=[r.mean,r.mean,r.mean,r.mean]:o=[r.mean[0],r.mean[1],r.mean[2],r.mean[3]??255],typeof r.bias=="number"?s=[r.bias,r.bias,r.bias,r.bias]:s=[r.bias[0],r.bias[1],r.bias[2],r.bias[3]??0];let a=e.format!==void 0?e.format:"RGBA",u=e.tensorFormat!==void 0&&e.tensorFormat!==void 0?e.tensorFormat:"RGB",c=n*i,l=u==="RGBA"?new Float32Array(c*4):new Float32Array(c*3),d=4,f=0,h=1,p=2,_=3,S=0,k=c,C=c*2,A=-1;a==="RGB"&&(d=3,f=0,h=1,p=2,_=-1),u==="RGBA"?A=c*3:u==="RBG"?(S=0,C=c,k=c*2):u==="BGR"&&(C=0,k=c,S=c*2);for(let T=0;T<c;T++,f+=d,p+=d,h+=d,_+=d)l[S++]=(t[f]+s[0])/o[0],l[k++]=(t[h]+s[1])/o[1],l[C++]=(t[p]+s[2])/o[2],A!==-1&&_!==-1&&(l[A++]=(t[_]+s[3])/o[3]);return u==="RGBA"?new ye("float32",l,[1,4,n,i]):new ye("float32",l,[1,3,n,i])},Qb=async(t,e)=>{let n=typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement,i=typeof ImageData<"u"&&t instanceof ImageData,r=typeof ImageBitmap<"u"&&t instanceof ImageBitmap,o=typeof t=="string",s,a=e??{},u=()=>{if(typeof document<"u")return document.createElement("canvas");if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(1,1);throw new Error("Canvas is not supported")},c=l=>typeof HTMLCanvasElement<"u"&&l instanceof HTMLCanvasElement||l instanceof OffscreenCanvas?l.getContext("2d"):null;if(n){let l=u();l.width=t.width,l.height=t.height;let d=c(l);if(d!=null){let f=t.height,h=t.width;if(e!==void 0&&e.resizedHeight!==void 0&&e.resizedWidth!==void 0&&(f=e.resizedHeight,h=e.resizedWidth),e!==void 0){if(a=e,e.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");a.tensorFormat="RGBA",a.height=f,a.width=h}else a.tensorFormat="RGBA",a.height=f,a.width=h;d.drawImage(t,0,0),s=d.getImageData(0,0,h,f).data}else throw new Error("Can not access image data")}else if(i){let l,d;if(e!==void 0&&e.resizedWidth!==void 0&&e.resizedHeight!==void 0?(l=e.resizedHeight,d=e.resizedWidth):(l=t.height,d=t.width),e!==void 0&&(a=e),a.format="RGBA",a.height=l,a.width=d,e!==void 0){let f=u();f.width=d,f.height=l;let h=c(f);if(h!=null)h.putImageData(t,0,0),s=h.getImageData(0,0,d,l).data;else throw new Error("Can not access image data")}else s=t.data}else if(r){if(e===void 0)throw new Error("Please provide image config with format for Imagebitmap");let l=u();l.width=t.width,l.height=t.height;let d=c(l);if(d!=null){let f=t.height,h=t.width;return d.drawImage(t,0,0,h,f),s=d.getImageData(0,0,h,f).data,a.height=f,a.width=h,op(s,a)}else throw new Error("Can not access image data")}else{if(o)return new Promise((l,d)=>{let f=u(),h=c(f);if(!t||!h)return d();let p=new Image;p.crossOrigin="Anonymous",p.src=t,p.onload=()=>{f.width=p.width,f.height=p.height,h.drawImage(p,0,0,f.width,f.height);let _=h.getImageData(0,0,f.width,f.height);a.height=f.height,a.width=f.width,l(op(_.data,a))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(s!==void 0)return op(s,a);throw new Error("Input data provided is not supported - aborted tensor creation")},e$=(t,e)=>{let{width:n,height:i,download:r,dispose:o}=e,s=[1,i,n,4];return new ye({location:"texture",type:"float32",texture:t,dims:s,download:r,dispose:o})},t$=(t,e)=>{let{dataType:n,dims:i,download:r,dispose:o}=e;return new ye({location:"gpu-buffer",type:n??"float32",gpuBuffer:t,dims:i,download:r,dispose:o})},r$=(t,e)=>{let{dataType:n,dims:i,download:r,dispose:o}=e;return new ye({location:"ml-tensor",type:n??"float32",mlTensor:t,dims:i,download:r,dispose:o})},n$=(t,e,n)=>new ye({location:"cpu-pinned",type:t,data:e,dims:n??[e.length]})});var gr,Oi,o$,s$,a$=v(()=>{gr=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array],["int4",Uint8Array],["uint4",Uint8Array]]),Oi=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]),o$=!1,s$=()=>{if(!o$){o$=!0;let t=typeof BigInt64Array<"u"&&BigInt64Array.from,e=typeof BigUint64Array<"u"&&BigUint64Array.from,n=globalThis.Float16Array,i=typeof n<"u"&&n.from;t&&(gr.set("int64",BigInt64Array),Oi.set(BigInt64Array,"int64")),e&&(gr.set("uint64",BigUint64Array),Oi.set(BigUint64Array,"uint64")),i?(gr.set("float16",n),Oi.set(n,"float16")):gr.set("float16",Uint16Array)}}});var u$,c$,l$=v(()=>{ia();u$=t=>{let e=1;for(let n=0;n<t.length;n++){let i=t[n];if(typeof i!="number"||!Number.isSafeInteger(i))throw new TypeError(`dims[${n}] must be an integer, got: ${i}`);if(i<0)throw new RangeError(`dims[${n}] must be a non-negative integer, got: ${i}`);e*=i}return e},c$=(t,e)=>{switch(t.location){case"cpu":return new ye(t.type,t.data,e);case"cpu-pinned":return new ye({location:"cpu-pinned",data:t.data,type:t.type,dims:e});case"texture":return new ye({location:"texture",texture:t.texture,type:t.type,dims:e});case"gpu-buffer":return new ye({location:"gpu-buffer",gpuBuffer:t.gpuBuffer,type:t.type,dims:e});case"ml-tensor":return new ye({location:"ml-tensor",mlTensor:t.mlTensor,type:t.type,dims:e});default:throw new Error(`tensorReshape: tensor location ${t.location} is not supported`)}}});var ye,ia=v(()=>{Xb();i$();a$();l$();ye=class{constructor(e,n,i){s$();let r,o;if(typeof e=="object"&&"location"in e)switch(this.dataLocation=e.location,r=e.type,o=e.dims,e.location){case"cpu-pinned":{let a=gr.get(r);if(!a)throw new TypeError(`unsupported type "${r}" to create tensor from pinned buffer`);if(!(e.data instanceof a))throw new TypeError(`buffer should be of type ${a.name}`);this.cpuData=e.data;break}case"texture":{if(r!=="float32")throw new TypeError(`unsupported type "${r}" to create tensor from texture`);this.gpuTextureData=e.texture,this.downloader=e.download,this.disposer=e.dispose;break}case"gpu-buffer":{if(r!=="float32"&&r!=="float16"&&r!=="int32"&&r!=="int64"&&r!=="uint32"&&r!=="uint8"&&r!=="bool"&&r!=="uint4"&&r!=="int4")throw new TypeError(`unsupported type "${r}" to create tensor from gpu buffer`);this.gpuBufferData=e.gpuBuffer,this.downloader=e.download,this.disposer=e.dispose;break}case"ml-tensor":{if(r!=="float32"&&r!=="float16"&&r!=="int32"&&r!=="int64"&&r!=="uint32"&&r!=="uint64"&&r!=="int8"&&r!=="uint8"&&r!=="bool"&&r!=="uint4"&&r!=="int4")throw new TypeError(`unsupported type "${r}" to create tensor from MLTensor`);this.mlTensorData=e.mlTensor,this.downloader=e.download,this.disposer=e.dispose;break}default:throw new Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let a,u;if(typeof e=="string")if(r=e,u=i,e==="string"){if(!Array.isArray(n))throw new TypeError("A string tensor's data must be a string array.");a=n}else{let c=gr.get(e);if(c===void 0)throw new TypeError(`Unsupported tensor type: ${e}.`);if(Array.isArray(n)){if(e==="float16"&&c===Uint16Array||e==="uint4"||e==="int4")throw new TypeError(`Creating a ${e} tensor from number array is not supported. Please use ${c.name} as data.`);e==="uint64"||e==="int64"?a=c.from(n,BigInt):a=c.from(n)}else if(n instanceof c)a=n;else if(n instanceof Uint8ClampedArray)if(e==="uint8")a=Uint8Array.from(n);else throw new TypeError("A Uint8ClampedArray tensor's data must be type of uint8");else if(e==="float16"&&n instanceof Uint16Array&&c!==Uint16Array)a=new globalThis.Float16Array(n.buffer,n.byteOffset,n.length);else throw new TypeError(`A ${r} tensor's data must be type of ${c}`)}else if(u=n,Array.isArray(e)){if(e.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");let c=typeof e[0];if(c==="string")r="string",a=e;else if(c==="boolean")r="bool",a=Uint8Array.from(e);else throw new TypeError(`Invalid element type of data array: ${c}.`)}else if(e instanceof Uint8ClampedArray)r="uint8",a=Uint8Array.from(e);else{let c=Oi.get(e.constructor);if(c===void 0)throw new TypeError(`Unsupported type for tensor data: ${e.constructor}.`);r=c,a=e}if(u===void 0)u=[a.length];else if(!Array.isArray(u))throw new TypeError("A tensor's dims must be a number array");o=u,this.cpuData=a,this.dataLocation="cpu"}let s=u$(o);if(this.cpuData&&s!==this.cpuData.length&&!((r==="uint4"||r==="int4")&&Math.ceil(s/2)===this.cpuData.length))throw new Error(`Tensor's size(${s}) does not match data length(${this.cpuData.length}).`);this.type=r,this.dims=o,this.size=s}static async fromImage(e,n){return Qb(e,n)}static fromTexture(e,n){return e$(e,n)}static fromGpuBuffer(e,n){return t$(e,n)}static fromMLTensor(e,n){return r$(e,n)}static fromPinnedBuffer(e,n,i){return n$(e,n,i)}toDataURL(e){return Kb(this,e)}toImageData(e){return Yb(this,e)}get data(){if(this.ensureValid(),!this.cpuData)throw new Error("The data is not on CPU. Use `getData()` to download GPU data to CPU, or use `texture` or `gpuBuffer` property to access the GPU data directly.");return this.cpuData}get location(){return this.dataLocation}get texture(){if(this.ensureValid(),!this.gpuTextureData)throw new Error("The data is not stored as a WebGL texture.");return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw new Error("The data is not stored as a WebGPU buffer.");return this.gpuBufferData}get mlTensor(){if(this.ensureValid(),!this.mlTensorData)throw new Error("The data is not stored as a WebNN MLTensor.");return this.mlTensorData}async getData(e){switch(this.ensureValid(),this.dataLocation){case"cpu":case"cpu-pinned":return this.data;case"texture":case"gpu-buffer":case"ml-tensor":{if(!this.downloader)throw new Error("The current tensor is not created with a specified data downloader.");if(this.isDownloading)throw new Error("The current tensor is being downloaded.");try{this.isDownloading=!0;let n=await this.downloader();return this.downloader=void 0,this.dataLocation="cpu",this.cpuData=n,e&&this.disposer&&(this.disposer(),this.disposer=void 0),n}finally{this.isDownloading=!1}}default:throw new Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw new Error("The current tensor is being downloaded.");this.disposer&&(this.disposer(),this.disposer=void 0),this.cpuData=void 0,this.gpuTextureData=void 0,this.gpuBufferData=void 0,this.mlTensorData=void 0,this.downloader=void 0,this.isDownloading=void 0,this.dataLocation="none"}ensureValid(){if(this.dataLocation==="none")throw new Error("The tensor is disposed.")}reshape(e){if(this.ensureValid(),this.downloader||this.disposer)throw new Error("Cannot reshape a tensor that owns GPU resource.");return c$(this,e)}}});var Ye,sp=v(()=>{ia();Ye=ye});var ap,d$,Gt,Wt,qt,Ht,up=v(()=>{ip();ap=(t,e)=>{(typeof de.trace>"u"?!de.wasm.trace:!de.trace)||console.timeStamp(`${t}::ORT::${e}`)},d$=(t,e)=>{let n=new Error().stack?.split(/\r\n|\r|\n/g)||[],i=!1;for(let r=0;r<n.length;r++){if(i&&!n[r].includes("TRACE_FUNC")){let o=`FUNC_${t}::${n[r].trim().split(" ")[1]}`;e&&(o+=`::${e}`),ap("CPU",o);return}n[r].includes("TRACE_FUNC")&&(i=!0)}},Gt=t=>{(typeof de.trace>"u"?!de.wasm.trace:!de.trace)||d$("BEGIN",t)},Wt=t=>{(typeof de.trace>"u"?!de.wasm.trace:!de.trace)||d$("END",t)},qt=t=>{(typeof de.trace>"u"?!de.wasm.trace:!de.trace)||console.time(`ORT::${t}`)},Ht=t=>{(typeof de.trace>"u"?!de.wasm.trace:!de.trace)||console.timeEnd(`ORT::${t}`)}});var oa,f$=v(()=>{np();sp();up();oa=class t{constructor(e){this.handler=e}async run(e,n,i){Gt(),qt("InferenceSession.run");let r={},o={};if(typeof e!="object"||e===null||e instanceof Ye||Array.isArray(e))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let s=!0;if(typeof n=="object"){if(n===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(n instanceof Ye)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(n)){if(n.length===0)throw new TypeError("'fetches' cannot be an empty array.");s=!1;for(let c of n){if(typeof c!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(c)===-1)throw new RangeError(`'fetches' contains invalid output name: ${c}.`);r[c]=null}if(typeof i=="object"&&i!==null)o=i;else if(typeof i<"u")throw new TypeError("'options' must be an object.")}else{let c=!1,l=Object.getOwnPropertyNames(n);for(let d of this.outputNames)if(l.indexOf(d)!==-1){let f=n[d];(f===null||f instanceof Ye)&&(c=!0,s=!1,r[d]=f)}if(c){if(typeof i=="object"&&i!==null)o=i;else if(typeof i<"u")throw new TypeError("'options' must be an object.")}else o=n}}else if(typeof n<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(let c of this.inputNames)if(typeof e[c]>"u")throw new Error(`input '${c}' is missing in 'feeds'.`);if(s)for(let c of this.outputNames)r[c]=null;let a=await this.handler.run(e,r,o),u={};for(let c in a)if(Object.hasOwnProperty.call(a,c)){let l=a[c];l instanceof Ye?u[c]=l:u[c]=new Ye(l.type,l.data,l.dims)}return Ht("InferenceSession.run"),Wt(),u}async release(){return this.handler.dispose()}static async create(e,n,i,r){Gt(),qt("InferenceSession.create");let o,s={};if(typeof e=="string"){if(o=e,typeof n=="object"&&n!==null)s=n;else if(typeof n<"u")throw new TypeError("'options' must be an object.")}else if(e instanceof Uint8Array){if(o=e,typeof n=="object"&&n!==null)s=n;else if(typeof n<"u")throw new TypeError("'options' must be an object.")}else if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer){let l=e,d=0,f=e.byteLength;if(typeof n=="object"&&n!==null)s=n;else if(typeof n=="number"){if(d=n,!Number.isSafeInteger(d))throw new RangeError("'byteOffset' must be an integer.");if(d<0||d>=l.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${l.byteLength}).`);if(f=e.byteLength-d,typeof i=="number"){if(f=i,!Number.isSafeInteger(f))throw new RangeError("'byteLength' must be an integer.");if(f<=0||d+f>l.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${l.byteLength-d}].`);if(typeof r=="object"&&r!==null)s=r;else if(typeof r<"u")throw new TypeError("'options' must be an object.")}else if(typeof i<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof n<"u")throw new TypeError("'options' must be an object.");o=new Uint8Array(l,d,f)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");let[a,u]=await Bb(s),c=await a.createInferenceSessionHandler(o,u);return Ht("InferenceSession.create"),Wt(),new t(c)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}get inputMetadata(){return this.handler.inputMetadata}get outputMetadata(){return this.handler.outputMetadata}}});var h$,p$=v(()=>{f$();h$=oa});var m$=v(()=>{});var g$=v(()=>{});var v$=v(()=>{});var y$=v(()=>{});var cp={};He(cp,{InferenceSession:()=>h$,TRACE:()=>ap,TRACE_EVENT_BEGIN:()=>qt,TRACE_EVENT_END:()=>Ht,TRACE_FUNC_BEGIN:()=>Gt,TRACE_FUNC_END:()=>Wt,Tensor:()=>Ye,env:()=>ie,registerBackend:()=>fn});var Jt=v(()=>{Gb();Jb();p$();sp();m$();g$();up();v$();y$()});var cx={};He(cx,{InferenceSession:()=>h$,TRACE:()=>ap,TRACE_EVENT_BEGIN:()=>qt,TRACE_EVENT_END:()=>Ht,TRACE_FUNC_BEGIN:()=>Gt,TRACE_FUNC_END:()=>Wt,Tensor:()=>Ye,default:()=>HT,env:()=>ie,registerBackend:()=>fn});import{createRequire as RT}from"module";var hn,Sp,DT,LT,UT,bp,Xe,jT,MT,FT,gn,kp,lp,_$,b$,wt,R$,dp,$$,x$,w$,S$,fp,D$,L$,hp,sa,Pi,pp,k$,I$,E$,U$,ee,Ci,at,ca,K,Ip,j$,VT,T$,O$,P$,vr,C$,M$,ZT,pn,ua,mn,F$,V$,Ep,Tp,Z$,B$,la,G$,A$,W$,q$,yr,z$,mp,$p,H$,J$,gp,K$,Y$,BT,aa,vp,yp,X$,Q$,ex,tx,rx,nx,ix,ox,_p,N$,sx,GT,ax,xp,wp,ux,WT,qT,HT,lx=v(()=>{Jt();Jt();Jt();Jt();Jt();Jt();Jt();hn=RT(import.meta.url),Sp=Object.defineProperty,DT=Object.getOwnPropertyDescriptor,LT=Object.getOwnPropertyNames,UT=Object.prototype.hasOwnProperty,bp=(t=>typeof hn<"u"?hn:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof hn<"u"?hn:e)[n]}):t)(function(t){if(typeof hn<"u")return hn.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),Xe=(t,e)=>()=>(t&&(e=t(t=0)),e),jT=(t,e)=>{for(var n in e)Sp(t,n,{get:e[n],enumerable:!0})},MT=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of LT(e))!UT.call(t,r)&&r!==n&&Sp(t,r,{get:()=>e[r],enumerable:!(i=DT(e,r))||i.enumerable});return t},FT=t=>MT(Sp({},"__esModule",{value:!0}),t),kp=Xe(()=>{"use strict";gn=!!(typeof process<"u"&&process.versions&&process.versions.node)}),L$=Xe(()=>{"use strict";kp(),lp=gn||typeof location>"u"?void 0:location.origin,_$=import.meta.url>"file:"&&import.meta.url<"file;",b$=()=>{if(!gn){if(_$){let t=URL;return new URL(new t("ort.node.min.mjs",import.meta.url).href,lp).href}return import.meta.url}},wt=b$(),R$=()=>{if(wt&&!wt.startsWith("blob:"))return wt.substring(0,wt.lastIndexOf("/")+1)},dp=(t,e)=>{try{let n=e??wt;return(n?new URL(t,n):new URL(t)).origin===lp}catch{return!1}},$$=(t,e)=>{let n=e??wt;try{return(n?new URL(t,n):new URL(t)).href}catch{return}},x$=(t,e)=>`${e??"./"}${t}`,w$=async t=>{let e=await(await fetch(t,{credentials:"same-origin"})).blob();return URL.createObjectURL(e)},S$=async t=>(await import(t)).default,fp=void 0,D$=async(t,e,n,i)=>{let r=fp&&!(t||e);if(r)if(wt)r=dp(wt)||i&&!n;else if(i&&!n)r=!0;else throw new Error("cannot determine the script source URL.");if(r)return[void 0,fp];{let o="ort-wasm-simd-threaded.mjs",s=t??$$(o,e),a=!gn&&n&&s&&!dp(s,e),u=a?await w$(s):s??x$(o,e);return[a?u:void 0,await S$(u)]}}}),Ci=Xe(()=>{"use strict";L$(),sa=!1,Pi=!1,pp=!1,k$=()=>{if(typeof SharedArrayBuffer>"u")return!1;try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch{return!1}},I$=()=>{try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,30,1,28,0,65,0,253,15,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,186,1,26,11]))}catch{return!1}},E$=()=>{try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,19,1,17,0,65,1,253,15,65,2,253,15,65,3,253,15,253,147,2,11]))}catch{return!1}},U$=async t=>{if(sa)return Promise.resolve();if(Pi)throw new Error("multiple calls to 'initializeWebAssembly()' detected.");if(pp)throw new Error("previous call to 'initializeWebAssembly()' failed.");Pi=!0;let e=t.initTimeout,n=t.numThreads;if(t.simd!==!1){if(t.simd==="relaxed"){if(!E$())throw new Error("Relaxed WebAssembly SIMD is not supported in the current environment.")}else if(!I$())throw new Error("WebAssembly SIMD is not supported in the current environment.")}let i=k$();n>1&&!i&&(typeof self<"u"&&!self.crossOriginIsolated&&console.warn("env.wasm.numThreads is set to "+n+", but this will not work unless you enable crossOriginIsolated mode. See https://web.dev/cross-origin-isolation-guide/ for more info."),console.warn("WebAssembly multi-threading is not supported in the current environment. Falling back to single-threading."),t.numThreads=n=1);let r=t.wasmPaths,o=typeof r=="string"?r:void 0,s=r?.mjs,a=s?.href??s,u=r?.wasm,c=u?.href??u,l=t.wasmBinary,[d,f]=await D$(a,o,n>1,!!l||!!c),h=!1,p=[];if(e>0&&p.push(new Promise(_=>{setTimeout(()=>{h=!0,_()},e)})),p.push(new Promise((_,S)=>{let k={numThreads:n};if(l)k.wasmBinary=l,k.locateFile=C=>C;else if(c||o)k.locateFile=C=>c??o+C;else if(a&&a.indexOf("blob:")!==0)k.locateFile=C=>new URL(C,a).href;else if(d){let C=R$();C&&(k.locateFile=A=>C+A)}f(k).then(C=>{Pi=!1,sa=!0,hp=C,_(),d&&URL.revokeObjectURL(d)},C=>{Pi=!1,pp=!0,S(C)})})),await Promise.race(p),h)throw new Error(`WebAssembly backend initializing failed due to timeout: ${e}ms`)},ee=()=>{if(sa&&hp)return hp;throw new Error("WebAssembly is not initialized yet.")}}),Ip=Xe(()=>{"use strict";Ci(),at=(t,e)=>{let n=ee(),i=n.lengthBytesUTF8(t)+1,r=n._malloc(i);return n.stringToUTF8(t,r,i),e.push(r),r},ca=(t,e,n,i)=>{if(typeof t=="object"&&t!==null){if(n.has(t))throw new Error("Circular reference in options");n.add(t)}Object.entries(t).forEach(([r,o])=>{let s=e?e+r:r;if(typeof o=="object")ca(o,s+".",n,i);else if(typeof o=="string"||typeof o=="number")i(s,o.toString());else if(typeof o=="boolean")i(s,o?"1":"0");else throw new Error(`Can't handle extra config type: ${typeof o}`)})},K=t=>{let e=ee(),n=e.stackSave();try{let i=e.PTR_SIZE,r=e.stackAlloc(2*i);e._OrtGetLastError(r,r+i);let o=Number(e.getValue(r,i===4?"i32":"i64")),s=e.getValue(r+i,"*"),a=s?e.UTF8ToString(s):"";throw new Error(`${t} ERROR_CODE: ${o}, ERROR_MESSAGE: ${a}`)}finally{e.stackRestore(n)}}}),VT=Xe(()=>{"use strict";Ci(),Ip(),j$=t=>{let e=ee(),n=0,i=[],r=t||{};try{if(t?.logSeverityLevel===void 0)r.logSeverityLevel=2;else if(typeof t.logSeverityLevel!="number"||!Number.isInteger(t.logSeverityLevel)||t.logSeverityLevel<0||t.logSeverityLevel>4)throw new Error(`log severity level is not valid: ${t.logSeverityLevel}`);if(t?.logVerbosityLevel===void 0)r.logVerbosityLevel=0;else if(typeof t.logVerbosityLevel!="number"||!Number.isInteger(t.logVerbosityLevel))throw new Error(`log verbosity level is not valid: ${t.logVerbosityLevel}`);t?.terminate===void 0&&(r.terminate=!1);let o=0;return t?.tag!==void 0&&(o=at(t.tag,i)),n=e._OrtCreateRunOptions(r.logSeverityLevel,r.logVerbosityLevel,!!r.terminate,o),n===0&&K("Can't create run options."),t?.extra!==void 0&&ca(t.extra,"",new WeakSet,(s,a)=>{let u=at(s,i),c=at(a,i);e._OrtAddRunConfigEntry(n,u,c)!==0&&K(`Can't set a run config entry: ${s} - ${a}.`)}),[n,i]}catch(o){throw n!==0&&e._OrtReleaseRunOptions(n),i.forEach(s=>e._free(s)),o}}}),ZT=Xe(()=>{"use strict";Ci(),Ip(),T$=t=>{switch(t){case"disabled":return 0;case"basic":return 1;case"extended":return 2;case"layout":return 3;case"all":return 99;default:throw new Error(`unsupported graph optimization level: ${t}`)}},O$=t=>{switch(t){case"sequential":return 0;case"parallel":return 1;default:throw new Error(`unsupported execution mode: ${t}`)}},P$=t=>{t.extra||(t.extra={}),t.extra.session||(t.extra.session={});let e=t.extra.session;e.use_ort_model_bytes_directly||(e.use_ort_model_bytes_directly="1"),t.executionProviders&&t.executionProviders.some(n=>(typeof n=="string"?n:n.name)==="webgpu")&&(t.enableMemPattern=!1)},vr=(t,e,n,i)=>{let r=at(e,i),o=at(n,i);ee()._OrtAddSessionConfigEntry(t,r,o)!==0&&K(`Can't set a session config entry: ${e} - ${n}.`)},C$=async(t,e,n)=>{let i=e.executionProviders;for(let r of i){let o=typeof r=="string"?r:r.name,s=[];switch(o){case"webnn":if(o="WEBNN",vr(t,"session.disable_quant_qdq","1",n),vr(t,"session.disable_qdq_constant_folding","1",n),typeof r!="string"){let d=r?.deviceType;d&&vr(t,"deviceType",d,n)}break;case"webgpu":if(o="JS",typeof r!="string"){let d=r;if(d?.preferredLayout){if(d.preferredLayout!=="NCHW"&&d.preferredLayout!=="NHWC")throw new Error(`preferredLayout must be either 'NCHW' or 'NHWC': ${d.preferredLayout}`);vr(t,"preferredLayout",d.preferredLayout,n)}}break;case"wasm":case"cpu":continue;default:throw new Error(`not supported execution provider: ${o}`)}let a=at(o,n),u=s.length,c=0,l=0;if(u>0){c=ee()._malloc(u*ee().PTR_SIZE),n.push(c),l=ee()._malloc(u*ee().PTR_SIZE),n.push(l);for(let d=0;d<u;d++)ee().setValue(c+d*ee().PTR_SIZE,s[d][0],"*"),ee().setValue(l+d*ee().PTR_SIZE,s[d][1],"*")}await ee()._OrtAppendExecutionProvider(t,a,c,l,u)!==0&&K(`Can't append execution provider: ${o}.`)}},M$=async t=>{let e=ee(),n=0,i=[],r=t||{};P$(r);try{let o=T$(r.graphOptimizationLevel??"all"),s=O$(r.executionMode??"sequential"),a=typeof r.logId=="string"?at(r.logId,i):0,u=r.logSeverityLevel??2;if(!Number.isInteger(u)||u<0||u>4)throw new Error(`log severity level is not valid: ${u}`);let c=r.logVerbosityLevel??0;if(!Number.isInteger(c)||c<0||c>4)throw new Error(`log verbosity level is not valid: ${c}`);let l=typeof r.optimizedModelFilePath=="string"?at(r.optimizedModelFilePath,i):0;if(n=e._OrtCreateSessionOptions(o,!!r.enableCpuMemArena,!!r.enableMemPattern,s,!!r.enableProfiling,0,a,u,c,l),n===0&&K("Can't create session options."),r.executionProviders&&await C$(n,r,i),r.enableGraphCapture!==void 0){if(typeof r.enableGraphCapture!="boolean")throw new Error(`enableGraphCapture must be a boolean value: ${r.enableGraphCapture}`);vr(n,"enableGraphCapture",r.enableGraphCapture.toString(),i)}if(r.freeDimensionOverrides)for(let[d,f]of Object.entries(r.freeDimensionOverrides)){if(typeof d!="string")throw new Error(`free dimension override name must be a string: ${d}`);if(typeof f!="number"||!Number.isInteger(f)||f<0)throw new Error(`free dimension override value must be a non-negative integer: ${f}`);let h=at(d,i);e._OrtAddFreeDimensionOverride(n,h,f)!==0&&K(`Can't set a free dimension override: ${d} - ${f}.`)}return r.extra!==void 0&&ca(r.extra,"",new WeakSet,(d,f)=>{vr(n,d,f,i)}),[n,i]}catch(o){throw n!==0&&e._OrtReleaseSessionOptions(n)!==0&&K("Can't release session options."),i.forEach(s=>e._free(s)),o}}}),B$=Xe(()=>{"use strict";pn=t=>{switch(t){case"int8":return 3;case"uint8":return 2;case"bool":return 9;case"int16":return 5;case"uint16":return 4;case"int32":return 6;case"uint32":return 12;case"float16":return 10;case"float32":return 1;case"float64":return 11;case"string":return 8;case"int64":return 7;case"uint64":return 13;case"int4":return 22;case"uint4":return 21;default:throw new Error(`unsupported data type: ${t}`)}},ua=t=>{switch(t){case 3:return"int8";case 2:return"uint8";case 9:return"bool";case 5:return"int16";case 4:return"uint16";case 6:return"int32";case 12:return"uint32";case 10:return"float16";case 1:return"float32";case 11:return"float64";case 8:return"string";case 7:return"int64";case 13:return"uint64";case 22:return"int4";case 21:return"uint4";default:throw new Error(`unsupported data type: ${t}`)}},mn=(t,e)=>{let n=[-1,4,1,1,2,2,4,8,-1,1,2,8,4,8,-1,-1,-1,-1,-1,-1,-1,.5,.5][t],i=typeof e=="number"?e:e.reduce((r,o)=>r*o,1);return n>0?Math.ceil(i*n):void 0},F$=t=>{switch(t){case"float16":return typeof Float16Array<"u"&&Float16Array.from?Float16Array:Uint16Array;case"float32":return Float32Array;case"uint8":return Uint8Array;case"int8":return Int8Array;case"uint16":return Uint16Array;case"int16":return Int16Array;case"int32":return Int32Array;case"bool":return Uint8Array;case"float64":return Float64Array;case"uint32":return Uint32Array;case"int64":return BigInt64Array;case"uint64":return BigUint64Array;default:throw new Error(`unsupported type: ${t}`)}},V$=t=>{switch(t){case"verbose":return 0;case"info":return 1;case"warning":return 2;case"error":return 3;case"fatal":return 4;default:throw new Error(`unsupported logging level: ${t}`)}},Ep=t=>t==="float32"||t==="float16"||t==="int32"||t==="int64"||t==="uint32"||t==="uint8"||t==="bool"||t==="uint4"||t==="int4",Tp=t=>t==="float32"||t==="float16"||t==="int32"||t==="int64"||t==="uint32"||t==="uint64"||t==="int8"||t==="uint8"||t==="bool"||t==="uint4"||t==="int4",Z$=t=>{switch(t){case"none":return 0;case"cpu":return 1;case"cpu-pinned":return 2;case"texture":return 3;case"gpu-buffer":return 4;case"ml-tensor":return 5;default:throw new Error(`unsupported data location: ${t}`)}}}),G$=Xe(()=>{"use strict";kp(),la=async t=>{if(typeof t=="string")if(gn)try{let{readFile:e}=bp("node:fs/promises");return new Uint8Array(await e(t))}catch(e){if(e.code==="ERR_FS_FILE_TOO_LARGE"){let{createReadStream:n}=bp("node:fs"),i=n(t),r=[];for await(let o of i)r.push(o);return new Uint8Array(Buffer.concat(r))}throw e}else{let e=await fetch(t);if(!e.ok)throw new Error(`failed to load external data file: ${t}`);let n=e.headers.get("Content-Length"),i=n?parseInt(n,10):0;if(i<1073741824)return new Uint8Array(await e.arrayBuffer());{if(!e.body)throw new Error(`failed to load external data file: ${t}, no response body.`);let r=e.body.getReader(),o;try{o=new ArrayBuffer(i)}catch(a){if(a instanceof RangeError){let u=Math.ceil(i/65536);o=new WebAssembly.Memory({initial:u,maximum:u}).buffer}else throw a}let s=0;for(;;){let{done:a,value:u}=await r.read();if(a)break;let c=u.byteLength;new Uint8Array(o,s,c).set(u),s+=c}return new Uint8Array(o,0,i)}}else return t instanceof Blob?new Uint8Array(await t.arrayBuffer()):t instanceof Uint8Array?t:new Uint8Array(t)}}),BT=Xe(()=>{"use strict";VT(),ZT(),B$(),Ci(),Ip(),G$(),A$=(t,e)=>{ee()._OrtInit(t,e)!==0&&K("Can't initialize onnxruntime.")},W$=async t=>{A$(t.wasm.numThreads,V$(t.logLevel))},q$=async(t,e)=>{ee().asyncInit?.();let n=t.webgpu.adapter;if(e==="webgpu"){if(typeof navigator>"u"||!navigator.gpu)throw new Error("WebGPU is not supported in current environment");if(n){if(typeof n.limits!="object"||typeof n.features!="object"||typeof n.requestDevice!="function")throw new Error("Invalid GPU adapter set in `env.webgpu.adapter`. It must be a GPUAdapter object.")}else{let i=t.webgpu.powerPreference;if(i!==void 0&&i!=="low-power"&&i!=="high-performance")throw new Error(`Invalid powerPreference setting: "${i}"`);let r=t.webgpu.forceFallbackAdapter;if(r!==void 0&&typeof r!="boolean")throw new Error(`Invalid forceFallbackAdapter setting: "${r}"`);if(n=await navigator.gpu.requestAdapter({powerPreference:i,forceFallbackAdapter:r}),!n)throw new Error('Failed to get GPU adapter. You may need to enable flag "--enable-unsafe-webgpu" if you are using Chrome.')}}if(e==="webnn"&&(typeof navigator>"u"||!navigator.ml))throw new Error("WebNN is not supported in current environment")},yr=new Map,z$=t=>{let e=ee(),n=e.stackSave();try{let i=e.PTR_SIZE,r=e.stackAlloc(2*i);e._OrtGetInputOutputCount(t,r,r+i)!==0&&K("Can't get session input/output count.");let o=i===4?"i32":"i64";return[Number(e.getValue(r,o)),Number(e.getValue(r+i,o))]}finally{e.stackRestore(n)}},mp=(t,e)=>{let n=ee(),i=n.stackSave(),r=0;try{let o=n.PTR_SIZE,s=n.stackAlloc(2*o);n._OrtGetInputOutputMetadata(t,e,s,s+o)!==0&&K("Can't get session input/output metadata.");let a=Number(n.getValue(s,"*"));r=Number(n.getValue(s+o,"*"));let u=n.HEAP32[r/4];if(u===0)return[a,0];let c=n.HEAPU32[r/4+1],l=[];for(let d=0;d<c;d++){let f=Number(n.getValue(r+8+d*o,"*"));l.push(f!==0?n.UTF8ToString(f):Number(n.getValue(r+8+(d+c)*o,"*")))}return[a,u,l]}finally{n.stackRestore(i),r!==0&&n._OrtFree(r)}},$p=t=>{let e=ee(),n=e._malloc(t.byteLength);if(n===0)throw new Error(`Can't create a session. failed to allocate a buffer of size ${t.byteLength}.`);return e.HEAPU8.set(t,n),[n,t.byteLength]},H$=async(t,e)=>{let n,i,r=ee();Array.isArray(t)?[n,i]=t:t.buffer===r.HEAPU8.buffer?[n,i]=[t.byteOffset,t.byteLength]:[n,i]=$p(t);let o=0,s=0,a=0,u=[],c=[],l=[];try{if([s,u]=await M$(e),e?.externalData&&r.mountExternalData){let A=[];for(let I of e.externalData){let T=typeof I=="string"?I:I.path;A.push(la(typeof I=="string"?I:I.data).then(Z=>{r.mountExternalData(T,Z)}))}await Promise.all(A)}for(let A of e?.executionProviders??[])if((typeof A=="string"?A:A.name)==="webnn"){if(r.shouldTransferToMLTensor=!1,typeof A!="string"){let I=A,T=I?.context,Z=I?.gpuDevice,F=I?.deviceType,W=I?.powerPreference;T?r.currentContext=T:Z?r.currentContext=await r.webnnCreateMLContext(Z):r.currentContext=await r.webnnCreateMLContext({deviceType:F,powerPreference:W})}else r.currentContext=await r.webnnCreateMLContext();break}o=await r._OrtCreateSession(n,i,s),r.webgpuOnCreateSession?.(o),o===0&&K("Can't create a session."),r.jsepOnCreateSession?.(),r.currentContext&&(r.webnnRegisterMLContext(o,r.currentContext),r.currentContext=void 0,r.shouldTransferToMLTensor=!0);let[d,f]=z$(o),h=!!e?.enableGraphCapture,p=[],_=[],S=[],k=[],C=[];for(let A=0;A<d;A++){let[I,T,Z]=mp(o,A);I===0&&K("Can't get an input name."),c.push(I);let F=r.UTF8ToString(I);p.push(F),S.push(T===0?{name:F,isTensor:!1}:{name:F,isTensor:!0,type:ua(T),shape:Z})}for(let A=0;A<f;A++){let[I,T,Z]=mp(o,A+d);I===0&&K("Can't get an output name."),l.push(I);let F=r.UTF8ToString(I);_.push(F),k.push(T===0?{name:F,isTensor:!1}:{name:F,isTensor:!0,type:ua(T),shape:Z})}return yr.set(o,[o,c,l,null,h,!1]),[o,p,_,S,k]}catch(d){throw c.forEach(f=>r._OrtFree(f)),l.forEach(f=>r._OrtFree(f)),a!==0&&r._OrtReleaseBinding(a)!==0&&K("Can't release IO binding."),o!==0&&r._OrtReleaseSession(o)!==0&&K("Can't release session."),d}finally{r._free(n),s!==0&&r._OrtReleaseSessionOptions(s)!==0&&K("Can't release session options."),u.forEach(d=>r._free(d)),r.unmountExternalData?.()}},J$=t=>{let e=ee(),n=yr.get(t);if(!n)throw new Error(`cannot release session. invalid session id: ${t}`);let[i,r,o,s,a]=n;s&&(a&&e._OrtClearBoundOutputs(s.handle)!==0&&K("Can't clear bound outputs."),e._OrtReleaseBinding(s.handle)!==0&&K("Can't release IO binding.")),e.jsepOnReleaseSession?.(t),e.webnnOnReleaseSession?.(t),e.webgpuOnReleaseSession?.(t),r.forEach(u=>e._OrtFree(u)),o.forEach(u=>e._OrtFree(u)),e._OrtReleaseSession(i)!==0&&K("Can't release session."),yr.delete(t)},gp=async(t,e,n,i,r,o,s=!1)=>{if(!t){e.push(0);return}let a=ee(),u=a.PTR_SIZE,c=t[0],l=t[1],d=t[3],f=d,h,p;if(c==="string"&&(d==="gpu-buffer"||d==="ml-tensor"))throw new Error("String tensor is not supported on GPU.");if(s&&d!=="gpu-buffer")throw new Error(`External buffer must be provided for input/output index ${o} when enableGraphCapture is true.`);if(d==="gpu-buffer"){let k=t[2].gpuBuffer;p=mn(pn(c),l);{let C=a.jsepRegisterBuffer;if(!C)throw new Error('Tensor location "gpu-buffer" is not supported without using WebGPU.');h=C(i,o,k,p)}}else if(d==="ml-tensor"){let k=t[2].mlTensor;p=mn(pn(c),l);let C=a.webnnRegisterMLTensor;if(!C)throw new Error('Tensor location "ml-tensor" is not supported without using WebNN.');h=C(i,k,pn(c),l)}else{let k=t[2];if(Array.isArray(k)){p=u*k.length,h=a._malloc(p),n.push(h);for(let C=0;C<k.length;C++){if(typeof k[C]!="string")throw new TypeError(`tensor data at index ${C} is not a string`);a.setValue(h+C*u,at(k[C],n),"*")}}else{let C=a.webnnIsGraphInput,A=a.webnnIsGraphOutput;if(c!=="string"&&C&&A){let I=a.UTF8ToString(r);if(C(i,I)||A(i,I)){let T=pn(c);p=mn(T,l),f="ml-tensor";let Z=a.webnnCreateTemporaryTensor,F=a.webnnUploadTensor;if(!Z||!F)throw new Error('Tensor location "ml-tensor" is not supported without using WebNN.');let W=await Z(i,T,l);F(W,new Uint8Array(k.buffer,k.byteOffset,k.byteLength)),h=W}else p=k.byteLength,h=a._malloc(p),n.push(h),a.HEAPU8.set(new Uint8Array(k.buffer,k.byteOffset,p),h)}else p=k.byteLength,h=a._malloc(p),n.push(h),a.HEAPU8.set(new Uint8Array(k.buffer,k.byteOffset,p),h)}}let _=a.stackSave(),S=a.stackAlloc(4*l.length);try{l.forEach((C,A)=>a.setValue(S+A*u,C,u===4?"i32":"i64"));let k=a._OrtCreateTensor(pn(c),h,p,S,l.length,Z$(f));k===0&&K(`Can't create tensor for input/output. session=${i}, index=${o}.`),e.push(k)}finally{a.stackRestore(_)}},K$=async(t,e,n,i,r,o)=>{let s=ee(),a=s.PTR_SIZE,u=yr.get(t);if(!u)throw new Error(`cannot run inference. invalid session id: ${t}`);let c=u[0],l=u[1],d=u[2],f=u[3],h=u[4],p=u[5],_=e.length,S=i.length,k=0,C=[],A=[],I=[],T=[],Z=[],F=s.stackSave(),W=s.stackAlloc(_*a),ne=s.stackAlloc(_*a),$e=s.stackAlloc(S*a),he=s.stackAlloc(S*a);try{[k,C]=j$(o),qt("wasm prepareInputOutputTensor");for(let D=0;D<_;D++)await gp(n[D],A,T,t,l[e[D]],e[D],h);for(let D=0;D<S;D++)await gp(r[D],I,T,t,d[i[D]],_+i[D],h);Ht("wasm prepareInputOutputTensor");for(let D=0;D<_;D++)s.setValue(W+D*a,A[D],"*"),s.setValue(ne+D*a,l[e[D]],"*");for(let D=0;D<S;D++)s.setValue($e+D*a,I[D],"*"),s.setValue(he+D*a,d[i[D]],"*");s.jsepOnRunStart?.(c),s.webnnOnRunStart?.(c);let Se;Se=await s._OrtRun(c,ne,W,_,he,S,$e,k),Se!==0&&K("failed to call OrtRun().");let ke=[],Q=[];qt("wasm ProcessOutputTensor");for(let D=0;D<S;D++){let ce=Number(s.getValue($e+D*a,"*"));if(ce===I[D]||Z.includes(I[D])){ke.push(r[D]),ce!==I[D]&&s._OrtReleaseTensor(ce)!==0&&K("Can't release tensor.");continue}let it=s.stackSave(),je=s.stackAlloc(4*a),Ar=!1,le,Me=0;try{s._OrtGetTensorData(ce,je,je+a,je+2*a,je+3*a)!==0&&K(`Can't access output tensor data on index ${D}.`);let Tu=a===4?"i32":"i64",co=Number(s.getValue(je,Tu));Me=s.getValue(je+a,"*");let Ig=s.getValue(je+a*2,"*"),lI=Number(s.getValue(je+a*3,Tu)),Ct=[];for(let pe=0;pe<lI;pe++)Ct.push(Number(s.getValue(Ig+pe*a,Tu)));s._OrtFree(Ig)!==0&&K("Can't free memory for tensor dims.");let At=Ct.reduce((pe,se)=>pe*se,1);le=ua(co);let Nn=f?.outputPreferredLocations[i[D]];if(le==="string"){if(Nn==="gpu-buffer"||Nn==="ml-tensor")throw new Error("String tensor is not supported on GPU.");let pe=[];for(let se=0;se<At;se++){let _t=s.getValue(Me+se*a,"*"),dI=s.getValue(Me+(se+1)*a,"*"),fI=se===At-1?void 0:dI-_t;pe.push(s.UTF8ToString(_t,fI))}ke.push([le,Ct,pe,"cpu"])}else if(Nn==="gpu-buffer"&&At>0){let pe=s.jsepGetBuffer;if(!pe)throw new Error('preferredLocation "gpu-buffer" is not supported without using WebGPU.');let se=pe(Me),_t=mn(co,At);if(_t===void 0||!Ep(le))throw new Error(`Unsupported data type: ${le}`);Ar=!0,ke.push([le,Ct,{gpuBuffer:se,download:s.jsepCreateDownloader(se,_t,le),dispose:()=>{s._OrtReleaseTensor(ce)!==0&&K("Can't release tensor.")}},"gpu-buffer"])}else if(Nn==="ml-tensor"&&At>0){let pe=s.webnnEnsureTensor,se=s.webnnIsGraphInputOutputTypeSupported;if(!pe||!se)throw new Error('preferredLocation "ml-tensor" is not supported without using WebNN.');if(mn(co,At)===void 0||!Tp(le))throw new Error(`Unsupported data type: ${le}`);if(!se(t,le,!1))throw new Error(`preferredLocation "ml-tensor" for ${le} output is not supported by current WebNN Context.`);let _t=await pe(t,Me,co,Ct,!1);Ar=!0,ke.push([le,Ct,{mlTensor:_t,download:s.webnnCreateMLTensorDownloader(Me,le),dispose:()=>{s.webnnReleaseTensorId(Me),s._OrtReleaseTensor(ce)}},"ml-tensor"])}else if(Nn==="ml-tensor-cpu-output"&&At>0){let pe=s.webnnCreateMLTensorDownloader(Me,le)(),se=ke.length;Ar=!0,Q.push((async()=>{let _t=[se,await pe];return s.webnnReleaseTensorId(Me),s._OrtReleaseTensor(ce),_t})()),ke.push([le,Ct,[],"cpu"])}else{let pe=F$(le),se=new pe(At);new Uint8Array(se.buffer,se.byteOffset,se.byteLength).set(s.HEAPU8.subarray(Me,Me+se.byteLength)),ke.push([le,Ct,se,"cpu"])}}finally{s.stackRestore(it),le==="string"&&Me&&s._free(Me),Ar||s._OrtReleaseTensor(ce)}}f&&!h&&(s._OrtClearBoundOutputs(f.handle)!==0&&K("Can't clear bound outputs."),yr.set(t,[c,l,d,f,h,!1]));for(let[D,ce]of await Promise.all(Q))ke[D][2]=ce;return Ht("wasm ProcessOutputTensor"),ke}finally{s.webnnOnRunEnd?.(c),s.stackRestore(F),A.forEach(Se=>s._OrtReleaseTensor(Se)),I.forEach(Se=>s._OrtReleaseTensor(Se)),T.forEach(Se=>s._free(Se)),k!==0&&s._OrtReleaseRunOptions(k),C.forEach(Se=>s._free(Se))}},Y$=t=>{let e=ee(),n=yr.get(t);if(!n)throw new Error("invalid session id");let i=n[0],r=e._OrtEndProfiling(i);r===0&&K("Can't get an profile file name."),e._OrtFree(r)}}),ox=Xe(()=>{"use strict";BT(),Ci(),L$(),aa=!1,vp=!1,yp=!1,X$=async()=>{if(!vp){if(aa)throw new Error("multiple calls to 'initWasm()' detected.");if(yp)throw new Error("previous call to 'initWasm()' failed.");aa=!0;try{await U$(ie.wasm),await W$(ie),vp=!0}catch(t){throw yp=!0,t}finally{aa=!1}}},Q$=async t=>{await q$(ie,t)},ex=async t=>$p(t),tx=async(t,e)=>H$(t,e),rx=async t=>{J$(t)},nx=async(t,e,n,i,r,o)=>K$(t,e,n,i,r,o),ix=async t=>{Y$(t)}}),GT=Xe(()=>{"use strict";ox(),B$(),kp(),G$(),_p=(t,e)=>{switch(t.location){case"cpu":return[t.type,t.dims,t.data,"cpu"];case"gpu-buffer":return[t.type,t.dims,{gpuBuffer:t.gpuBuffer},"gpu-buffer"];case"ml-tensor":return[t.type,t.dims,{mlTensor:t.mlTensor},"ml-tensor"];default:throw new Error(`invalid data location: ${t.location} for ${e()}`)}},N$=t=>{switch(t[3]){case"cpu":return new Ye(t[0],t[2],t[1]);case"gpu-buffer":{let e=t[0];if(!Ep(e))throw new Error(`not supported data type: ${e} for deserializing GPU tensor`);let{gpuBuffer:n,download:i,dispose:r}=t[2];return Ye.fromGpuBuffer(n,{dataType:e,dims:t[1],download:i,dispose:r})}case"ml-tensor":{let e=t[0];if(!Tp(e))throw new Error(`not supported data type: ${e} for deserializing MLTensor tensor`);let{mlTensor:n,download:i,dispose:r}=t[2];return Ye.fromMLTensor(n,{dataType:e,dims:t[1],download:i,dispose:r})}default:throw new Error(`invalid data location: ${t[3]}`)}},sx=class{async fetchModelAndCopyToWasmMemory(t){return ex(await la(t))}async loadModel(t,e){Gt();let n;typeof t=="string"?gn?n=await la(t):n=await this.fetchModelAndCopyToWasmMemory(t):n=t,[this.sessionId,this.inputNames,this.outputNames,this.inputMetadata,this.outputMetadata]=await tx(n,e),Wt()}async dispose(){return rx(this.sessionId)}async run(t,e,n){Gt();let i=[],r=[];Object.entries(t).forEach(d=>{let f=d[0],h=d[1],p=this.inputNames.indexOf(f);if(p===-1)throw new Error(`invalid input '${f}'`);i.push(h),r.push(p)});let o=[],s=[];Object.entries(e).forEach(d=>{let f=d[0],h=d[1],p=this.outputNames.indexOf(f);if(p===-1)throw new Error(`invalid output '${f}'`);o.push(h),s.push(p)});let a=i.map((d,f)=>_p(d,()=>`input "${this.inputNames[r[f]]}"`)),u=o.map((d,f)=>d?_p(d,()=>`output "${this.outputNames[s[f]]}"`):null),c=await nx(this.sessionId,r,a,s,u,n),l={};for(let d=0;d<c.length;d++)l[this.outputNames[s[d]]]=o[d]??N$(c[d]);return Wt(),l}startProfiling(){}endProfiling(){ix(this.sessionId)}}}),ax={};jT(ax,{OnnxruntimeWebAssemblyBackend:()=>wp,initializeFlags:()=>xp,wasmBackend:()=>ux});WT=Xe(()=>{"use strict";ox(),GT(),xp=()=>{(typeof ie.wasm.initTimeout!="number"||ie.wasm.initTimeout<0)&&(ie.wasm.initTimeout=0);let t=ie.wasm.simd;if(typeof t!="boolean"&&t!==void 0&&t!=="fixed"&&t!=="relaxed"&&(console.warn(`Property "env.wasm.simd" is set to unknown value "${t}". Reset it to \`false\` and ignore SIMD feature checking.`),ie.wasm.simd=!1),typeof ie.wasm.proxy!="boolean"&&(ie.wasm.proxy=!1),typeof ie.wasm.trace!="boolean"&&(ie.wasm.trace=!1),typeof ie.wasm.numThreads!="number"||!Number.isInteger(ie.wasm.numThreads)||ie.wasm.numThreads<=0)if(typeof self<"u"&&!self.crossOriginIsolated)ie.wasm.numThreads=1;else{let e=typeof navigator>"u"?bp("node:os").cpus().length:navigator.hardwareConcurrency;ie.wasm.numThreads=Math.min(4,Math.ceil((e||1)/2))}},wp=class{async init(t){xp(),await X$(),await Q$(t)}async createInferenceSessionHandler(t,e){let n=new sx;return await n.loadModel(t,e),n}},ux=new wp}),qT="1.26.0",HT=cp;{let t=(WT(),FT(ax)).wasmBackend;fn("cpu",t,10),fn("wasm",t,10)}Object.defineProperty(ie.versions,"web",{value:qT,enumerable:!0})});import{existsSync as JT}from"node:fs";import{createRequire as KT}from"node:module";import{dirname as YT,join as XT,sep as dx}from"node:path";import{fileURLToPath as QT,pathToFileURL as eO}from"node:url";async function da(){let t=await Promise.resolve().then(()=>(lx(),cx));return t.default??t}function fa(t,e){t.env.wasm.numThreads=1,t.env.wasm.wasmPaths=rO(e)}function tO(t){return[new URL("./",t),new URL("../",t)].map(e=>QT(e))}function rO(t=import.meta.url){let e=tO(t);try{e.push(YT(KT(t).resolve("onnxruntime-web")))}catch{}let n=null;for(let i of e){let r=fx.filter(o=>!JT(XT(i,o)));if(r.length===0)return nO(i);r.length<fx.length&&n===null&&(n={dir:i,missing:r})}throw n!==null?new Error(`ort-web WASM runtime at '${n.dir}' is missing '${n.missing.join("', '")}' - the .wasm and its .mjs glue must be copied together`):new Error(`ort-web WASM runtime ('${hx}' + '${px}') not found beside the bundle or in node_modules`)}function nO(t){return eO(t.endsWith(dx)?t:t+dx).href}var hx,px,fx,Op=v(()=>{"use strict";hx="ort-wasm-simd-threaded.wasm",px="ort-wasm-simd-threaded.mjs",fx=[hx,px]});import{existsSync as iO}from"node:fs";import{fileURLToPath as oO}from"node:url";function Pp(t,e){return[new URL(`../../assets/${t}`,e),new URL(`./assets/${t}`,e),new URL(`../assets/${t}`,e)].map(n=>oO(n))}function ha(t,e,n,i={}){let r=i.baseUrl??n,o=i.exists??iO,s="envPath"in i?i.envPath:process.env[e];if(s&&o(s))return s;let a=Pp(t,r);for(let u of a)if(o(u))return u;throw new Error(`model '${t}' not found. Tried: ${a.join(", ")}. Set ${e} to override.`)}var Cp=v(()=>{"use strict"});function Ap(t={}){return ha(mx,gx,import.meta.url,t)}var mx,gx,zp=v(()=>{"use strict";Cp();mx="silero_vad.onnx",gx="JARVIS_SILERO_VAD_MODEL_PATH"});var vn,Ai,vx,_r,Np=v(()=>{"use strict";Op();zp();vn=512,Ai=64,vx=256,_r=class{modelPath;sessionPromise=null;session=null;ort=null;disposed=!1;pending=new Int16Array(vn);pendingLen=0;state=new Float32Array(vx);context=new Float32Array(Ai);chain=Promise.resolve();constructor(e={}){this.modelPath=e.modelPath}process(e){if(this.disposed)return Promise.reject(new Error("SileroVadRunner is disposed"));let n=this.chain.then(()=>this.runWindows(e));return this.chain=n.then(()=>{},()=>{}),n}reset(){this.chain=this.chain.then(()=>{this.pendingLen=0,this.state=new Float32Array(vx),this.context.fill(0)})}load(){return this.disposed?Promise.reject(new Error("SileroVadRunner is disposed")):this.ensureSession().then(()=>{})}prewarm(){this.disposed||this.ensureSession().catch(()=>{})}async dispose(){this.disposed=!0,this.pendingLen=0;let e=this.session;this.session=null,this.sessionPromise=null,this.ort=null,e&&await e.release()}async runWindows(e){if(this.disposed)throw new Error("SileroVadRunner is disposed");if(e.length===0)return[];let n=await this.ensureSession(),i=this.ort;if(!i)throw new Error("onnxruntime-web failed to load");let r=[],o=0;for(;;){let s=Math.min(vn-this.pendingLen,e.length-o);if(s>0&&(this.pending.set(e.subarray(o,o+s),this.pendingLen),this.pendingLen+=s,o+=s),this.pendingLen<vn)break;this.pendingLen=0,r.push(await this.inferWindow(n,i))}return r}async inferWindow(e,n){let i=new Float32Array(Ai+vn);i.set(this.context,0);for(let a=0;a<vn;a++)i[Ai+a]=this.pending[a]/32768;let r=await e.run({input:new n.Tensor("float32",i,[1,i.length]),state:new n.Tensor("float32",this.state,[2,1,128]),sr:new n.Tensor("int64",BigInt64Array.from([16000n]),[])});if(this.disposed)throw new Error("SileroVadRunner is disposed");let o=r[e.outputNames[0]].data;this.state=r[e.outputNames[1]].data,this.context.set(i.subarray(i.length-Ai));let s=o[0];if(!Number.isFinite(s))throw new Error("silero vad produced a non-finite output");return s<0?0:s>1?1:s}ensureSession(){return this.sessionPromise?this.sessionPromise:(this.sessionPromise=this.loadSession(),this.sessionPromise)}async loadSession(){let e=await da();this.ort=e,fa(e);let n=this.modelPath??Ap(),i=await e.InferenceSession.create(n,{executionProviders:["wasm"],graphOptimizationLevel:"all",executionMode:"sequential"});if(this.disposed)throw await i.release(),new Error("SileroVadRunner is disposed");return this.session=i,i}}});function sO(t){let e=1;for(;e<t;)e<<=1;return e}var Rp,pa,yx=v(()=>{"use strict";Rp=class{size;rev;cos;sin;constructor(e){if(e<2||(e&e-1)!==0)throw new Error(`Radix2Fft size must be a power of two >= 2, got ${e}`);this.size=e;let n=Math.log2(e);this.rev=new Uint32Array(e);for(let r=0;r<e;r++){let o=0;for(let s=0;s<n;s++)o|=(r>>s&1)<<n-1-s;this.rev[r]=o}let i=e>>1;this.cos=new Float64Array(i),this.sin=new Float64Array(i);for(let r=0;r<i;r++){let o=2*Math.PI*r/e;this.cos[r]=Math.cos(o),this.sin[r]=Math.sin(o)}}transform(e,n,i){let r=this.size,o=this.rev;for(let s=0;s<r;s++){let a=o[s];if(a>s){let u=e[s];e[s]=e[a],e[a]=u;let c=n[s];n[s]=n[a],n[a]=c}}for(let s=2;s<=r;s<<=1){let a=s>>1,u=r/s;for(let c=0;c<r;c+=s)for(let l=0;l<a;l++){let d=l*u,f=this.cos[d],h=i?this.sin[d]:-this.sin[d],p=c+l,_=p+a,S=e[_]*f-n[_]*h,k=e[_]*h+n[_]*f;e[_]=e[p]-S,n[_]=n[p]-k,e[p]+=S,n[p]+=k}}if(i){let s=1/r;for(let a=0;a<r;a++)e[a]*=s,n[a]*=s}}};pa=class{n;bins;m;fft;chirpCos;chirpSin;bRe;bIm;aRe;aIm;constructor(e){if(e<2)throw new Error(`PowerSpectrum length must be >= 2, got ${e}`);this.n=e,this.bins=(e>>1)+1,this.m=sO(2*e-1),this.fft=new Rp(this.m),this.chirpCos=new Float64Array(e),this.chirpSin=new Float64Array(e);for(let n=0;n<e;n++){let i=n*n%(2*e),r=Math.PI*i/e;this.chirpCos[n]=Math.cos(r),this.chirpSin[n]=Math.sin(r)}this.bRe=new Float64Array(this.m),this.bIm=new Float64Array(this.m);for(let n=0;n<e;n++){let i=this.chirpCos[n],r=this.chirpSin[n];this.bRe[n]=i,this.bIm[n]=r,n!==0&&(this.bRe[this.m-n]=i,this.bIm[this.m-n]=r)}this.fft.transform(this.bRe,this.bIm,!1),this.aRe=new Float64Array(this.m),this.aIm=new Float64Array(this.m)}computePower(e,n){let{n:i,m:r,aRe:o,aIm:s}=this;o.fill(0),s.fill(0);for(let a=0;a<i;a++){let u=e[a];o[a]=u*this.chirpCos[a],s[a]=-u*this.chirpSin[a]}this.fft.transform(o,s,!1);for(let a=0;a<r;a++){let u=o[a],c=s[a],l=this.bRe[a],d=this.bIm[a];o[a]=u*l-c*d,s[a]=u*d+c*l}this.fft.transform(o,s,!0);for(let a=0;a<this.bins;a++){let u=o[a],c=s[a];n[a]=u*u+c*c}}}});function $x(t){let i=27/Math.log(6.4);return t>=1e3?15+Math.log(t/1e3)*i:3*t/200}function cO(t){let i=Math.log(6.4)/27;return t>=15?1e3*Math.exp(i*(t-15)):200*t/3}function xx(t,e,n){let i=new Float64Array(n),r=n>1?(e-t)/(n-1):0;for(let o=0;o<n;o++)i[o]=t+o*r;return n>1&&(i[n-1]=e),i}function lO(){let t=$x(0),e=$x(Dp/2),n=xx(t,e,St+2),i=new Float64Array(St+2);for(let a=0;a<n.length;a++)i[a]=cO(n[a]);let r=xx(0,Dp/2,zi),o=new Float64Array(St+1);for(let a=0;a<St+1;a++)o[a]=i[a+1]-i[a];let s=[];for(let a=0;a<St;a++){let u=2/(i[a+2]-i[a]),c=new Float64Array(zi),l=zi,d=0;for(let f=0;f<zi;f++){let h=-(i[a]-r[f])/o[a],p=(i[a+2]-r[f])/o[a+1],_=Math.max(0,Math.min(h,p))*u;c[f]=_,_>0&&(f<l&&(l=f),d=f+1)}l>d&&(l=d=0),s.push({lo:l,hi:d,weights:c.slice(l,d)})}return s}function dO(){let t=new Float64Array(ut);for(let e=0;e<ut;e++)t[e]=.5-.5*Math.cos(2*Math.PI*e/ut);return t}var Dp,ut,aO,St,zi,_x,uO,bx,Ue,br,Lp,Ni,ma=v(()=>{"use strict";yx();Dp=16e3,ut=400,aO=160,St=80,zi=(ut>>1)+1,_x=1e-10,uO=1e-7,bx=32768,Ue=Dp*8,br=800,Lp=St;Ni=class{hann=dO();filters=lO();spectrum=new pa(ut);padded=new Float64Array(Ue+ut);frame=new Float64Array(ut);power=new Float64Array(zi);logBuf=new Float64Array(St*br);fromPcm16(e){return this.window(e),this.normalize(),this.reflectPad(),this.melSpectrogram()}window(e){let n=this.padded,i=ut/2,r=e.length;if(r>=Ue){let o=r-Ue;for(let s=0;s<Ue;s++)n[i+s]=e[o+s]/bx}else{let o=Ue-r;for(let s=0;s<o;s++)n[i+s]=0;for(let s=0;s<r;s++)n[i+o+s]=e[s]/bx}}normalize(){let e=this.padded,n=ut/2,i=Ue,r=0;for(let a=0;a<i;a++)r+=e[n+a];r/=i;let o=0;for(let a=0;a<i;a++){let u=e[n+a]-r;o+=u*u}o/=i;let s=1/Math.sqrt(o+uO);for(let a=0;a<i;a++)e[n+a]=(e[n+a]-r)*s}reflectPad(){let e=this.padded,n=ut/2,i=Ue;for(let r=0;r<n;r++)e[r]=e[n+(n-r)],e[n+i+r]=e[n+(i-2-r)]}melSpectrogram(){let{padded:e,frame:n,power:i,hann:r,filters:o,logBuf:s}=this;for(let l=0;l<br;l++){let d=l*aO;for(let f=0;f<ut;f++)n[f]=e[d+f]*r[f];this.spectrum.computePower(n,i);for(let f=0;f<St;f++){let{lo:h,hi:p,weights:_}=o[f],S=0;for(let k=h;k<p;k++)S+=_[k-h]*i[k];s[f*br+l]=Math.log10(S<_x?_x:S)}}let a=-1/0;for(let l of s)l>a&&(a=l);let u=a-8,c=new Float32Array(St*br);for(let l=0;l<s.length;l++){let d=s[l]<u?u:s[l];c[l]=(d+4)/4}return c}}});function fO(t){return t.toLowerCase().replace(/[.,!?;:]+$/g,"").trim()}function Up(t,e){return e.some(n=>Sx(t,n))}function Sx(t,e){if(!t.endsWith(e))return!1;let n=t.length-e.length-1;return n<0||t[n]===" "}function hO(t,e){let n=pO(t);return n===""?null:e.find(i=>mO(n,i))??null}function pO(t){let e=/^.*[.!?]\s+/s.exec(t);return(e?t.slice(e[0].length):t).trim()}function mO(t,e){for(let n=t.indexOf(e);n!==-1;n=t.indexOf(e,n+1)){let i=n===0||!wx(t[n-1]),r=n+e.length===t.length||!wx(t[n+e.length]);if(i&&r)return!0}return!1}function wx(t){return/[a-z0-9']/.test(t)}var ga,Ri,jp=v(()=>{"use strict";Ti();Ti();ga={silenceEnergyThreshold:ra,shortSilenceMs:500,longSilenceMs:1400,reopenGraceMs:400,stopSecsMs:3e4,heldBudgetLadderMs:[4e3,8e3],heldCeilingMs:12e4,strongHoldCues:["hold on","hang on","give me a sec","give me a second","one moment","one sec","one second","let me think","let me see","let me look"],weakHoldCues:["actually","wait"],commitCues:["that's it","go ahead","what do you think"]},Ri=class{clock;config;classifier;telemetry=null;phase="listening";inSilence=!1;silenceStartedAt=null;firstSpeechAt=null;budgetOwner="baseline";armedBudgetMs=null;lastRawPartial="";lastNormPartial="";strongHoldCue=null;held=!1;heldLadderStep=0;heldCeilingDeadlineAtMs=null;commitCb;silenceTimer=null;graceTimer=null;stopTimer=null;ceilingTimer=null;constructor(e,n={},i){this.clock=e,this.config={...ga,...n},this.classifier=i??new Ii(this.config.silenceEnergyThreshold)}onAudioFrame(e){this.phase==="committed"||this.phase==="disposed"||this.classifier.classify(e,this.applyVerdict)}applyVerdict=e=>{this.phase==="committed"||this.phase==="disposed"||(e?this.handleSpeech():this.handleSilence())};onPartial(e){if(this.phase==="committed"||this.phase==="disposed")return;if(this.lastRawPartial=e.trim(),this.lastNormPartial=fO(e),Up(this.lastNormPartial,this.config.commitCues)){this.commit("lexical");return}let n=this.strongHoldCue;if(this.strongHoldCue=hO(this.lastNormPartial,this.config.strongHoldCues),this.strongHoldCue!==null){if(this.strongHoldCue!==n){this.telemetry?.strongHoldRecognized(this.strongHoldCue),this.held||this.enterHeld(this.strongHoldCue);return}if(this.held)return;if(Sx(this.lastNormPartial,this.strongHoldCue)){this.enterHeld(this.strongHoldCue);return}this.holdFloor();return}if(Up(this.lastNormPartial,this.config.weakHoldCues)){if(this.held)return;this.holdFloor()}}onCommit(e){this.commitCb=e}attachTelemetry(e){this.telemetry=e}dispose(){this.phase="disposed",this.clearAllTimers()}holdFloor(){this.clearSilenceTimer(),this.phase==="tentative"&&(this.clearGraceTimer(),this.phase="listening"),this.inSilence=!1}handleSpeech(){this.held?(this.inSilence&&(this.exitHeld("speech"),this.clearStopTimer(),this.stopTimer=this.clock.setTimer(this.config.stopSecsMs,()=>this.commit("stop_cap"))),this.firstSpeechAt??=this.clock.now()):this.firstSpeechAt===null&&(this.firstSpeechAt=this.clock.now(),this.stopTimer=this.clock.setTimer(this.config.stopSecsMs,()=>this.commit("stop_cap"))),this.clearSilenceTimer(),this.phase==="tentative"&&(this.clearGraceTimer(),this.phase="listening"),this.inSilence=!1}handleSilence(){this.firstSpeechAt===null||this.phase!=="listening"||this.inSilence||(this.inSilence=!0,this.silenceStartedAt=this.clock.now(),this.budgetOwner="baseline",this.armedBudgetMs=this.held?this.heldLadderBudgetMs():this.silenceBudgetMs(),this.silenceTimer=this.clock.setTimer(this.armedBudgetMs,()=>this.onSilenceBudgetElapsed()),this.onSilenceDetected())}silenceBudgetMs(){return this.isCompleteSounding()?this.config.shortSilenceMs:this.config.longSilenceMs}onSilenceDetected(){}canRefineBudget(){return this.phase==="listening"&&this.inSilence}canApplySemanticVerdict(){return(this.phase==="listening"||this.phase==="tentative")&&this.inSilence}isHeld(){return this.held}heldAllowanceExhausted(){return this.heldCeilingDeadlineAtMs!==null&&this.heldCeilingDeadlineAtMs-this.clock.now()<=0}livePartial(){return this.lastRawPartial}rearmSilence(e,n="smart_turn"){if(!this.inSilence||this.silenceStartedAt===null||this.phase!=="listening"&&this.phase!=="tentative"||this.held)return;let i=e-(this.clock.now()-this.silenceStartedAt);if(this.phase==="tentative"){if(i<=0)return;this.clearGraceTimer(),this.phase="listening"}e!==this.armedBudgetMs&&(this.budgetOwner=n),this.armedBudgetMs=e,this.clearSilenceTimer(),i<=0?this.onSilenceBudgetElapsed():this.silenceTimer=this.clock.setTimer(i,()=>this.onSilenceBudgetElapsed())}onSilenceBudgetElapsed(){if(this.silenceTimer=null,this.phase==="listening"){if(this.held){this.heldLadderStep+=1;let e=this.heldLadderBudgetMs();this.armedBudgetMs=e,this.silenceTimer=this.clock.setTimer(e,()=>this.onSilenceBudgetElapsed()),this.telemetry?.heldLadderRearmed(e);return}this.phase="tentative",this.graceTimer=this.clock.setTimer(this.config.reopenGraceMs,()=>{this.graceTimer=null,this.commit(this.budgetOwner)})}}isCompleteSounding(){return this.strongHoldCue!==null?!1:/[.!?]$/.test(this.lastRawPartial)?!0:Up(this.lastNormPartial,this.config.commitCues)}enterHeld(e){if(this.held)return;this.held=!0,this.heldLadderStep=0,this.clearStopTimer(),this.heldCeilingDeadlineAtMs??=this.clock.now()+this.config.heldCeilingMs,this.telemetry?.heldEntered(e);let n=this.heldCeilingDeadlineAtMs-this.clock.now();if(n<=0){this.commit("held_ceiling");return}this.ceilingTimer=this.clock.setTimer(n,()=>this.commit("held_ceiling")),this.holdFloor()}resumeHeldSilence(){!this.held||this.phase!=="listening"||this.inSilence||this.firstSpeechAt===null||this.silenceStartedAt===null||(this.inSilence=!0,this.budgetOwner="baseline",this.armedBudgetMs=this.heldLadderBudgetMs(),this.silenceTimer=this.clock.setTimer(this.armedBudgetMs,()=>this.onSilenceBudgetElapsed()))}exitHeld(e){this.held=!1,this.clearCeilingTimer(),this.telemetry?.heldExited(e)}heldLadderBudgetMs(){let e=this.config.heldBudgetLadderMs;return e[Math.min(this.heldLadderStep,e.length-1)]??this.config.longSilenceMs}commit(e){this.phase==="committed"||this.phase==="disposed"||(this.held&&this.exitHeld(e==="held_ceiling"?"ceiling":"commit_cue"),this.phase="committed",this.clearAllTimers(),this.telemetry?.endpointerCommitted(e,this.inSilence?this.silenceStartedAt:null),this.commitCb?.())}clearSilenceTimer(){this.silenceTimer!==null&&(this.clock.clearTimer(this.silenceTimer),this.silenceTimer=null)}clearGraceTimer(){this.graceTimer!==null&&(this.clock.clearTimer(this.graceTimer),this.graceTimer=null)}clearStopTimer(){this.stopTimer!==null&&(this.clock.clearTimer(this.stopTimer),this.stopTimer=null)}clearCeilingTimer(){this.ceilingTimer!==null&&(this.clock.clearTimer(this.ceilingTimer),this.ceilingTimer=null)}clearAllTimers(){this.clearSilenceTimer(),this.clearGraceTimer(),this.clearStopTimer(),this.clearCeilingTimer()}}});var kx,Di,Mp=v(()=>{"use strict";ma();jp();kx={...ga,commitThreshold:.65,holdThreshold:.35},Di=class extends Ri{smartConfig;inference;buffer=new Int16Array(Ue*2);bufferLen=0;silenceEpoch=0;degraded=!1;smartDisposed=!1;semantics;evaluatedEpoch=0;evaluationAbort=new AbortController;constructor(e,n,i={},r,o){super(e,i,r),this.smartConfig={...kx,...i},this.inference=n,o&&(this.semantics=o)}onAudioFrame(e){this.appendToBuffer(e),super.onAudioFrame(e)}dispose(){this.smartDisposed=!0,this.bufferLen=0,this.evaluationAbort.abort(),super.dispose()}onSilenceDetected(){if(this.silenceEpoch+=1,this.degraded||this.smartDisposed)return;let e=this.silenceEpoch,n=this.snapshotBuffer();this.runInference(n,e)}async runInference(e,n){let i=this.clock.now(),r;try{r=await this.inference.infer(e)}catch(s){let a=this.degraded;this.degraded=!0,!a&&!this.smartDisposed&&this.telemetry?.smartTurnDegraded(this.clock.now()-i,s);return}let o=this.clock.now()-i;if(this.smartDisposed||n!==this.silenceEpoch||!this.canRefineBudget()){this.telemetry?.smartTurnResolved(r,o,"stale");return}r>=this.smartConfig.commitThreshold?(this.telemetry?.smartTurnResolved(r,o,"shorten"),this.rearmSilence(this.smartConfig.shortSilenceMs)):r<=this.smartConfig.holdThreshold?(this.telemetry?.smartTurnResolved(r,o,"extend"),this.rearmSilence(this.smartConfig.longSilenceMs)):(this.telemetry?.smartTurnResolved(r,o,"inconclusive"),this.maybeEvaluateTurn(n))}maybeEvaluateTurn(e){if(!this.semantics||this.evaluatedEpoch===e||this.isHeld())return;let n=this.livePartial();n!==""&&(this.evaluatedEpoch=e,this.runEvaluation(this.semantics,n,e))}async runEvaluation(e,n,i){this.telemetry?.evaluatorFired?.();let r=this.clock.now(),o;try{o=await e.evaluator.evaluate({recentTurns:e.recentTurns(),livePartial:n},this.evaluationAbort.signal)}catch(a){this.smartDisposed||this.telemetry?.evaluatorFailed?.(this.clock.now()-r,a);return}let s=this.clock.now()-r;if(this.smartDisposed||i!==this.silenceEpoch||!this.canApplySemanticVerdict()){this.telemetry?.evaluatorResolved?.(o.verdict,o.confidence,s,"stale");return}if(this.telemetry?.evaluatorResolved?.(o.verdict,o.confidence,s,"applied"),o.verdict==="done")this.rearmSilence(this.smartConfig.shortSilenceMs,"semantic");else if(o.verdict==="mid_thought")this.rearmSilence(this.smartConfig.longSilenceMs,"semantic");else{if(this.heldAllowanceExhausted())return;this.enterHeld("semantic"),this.resumeHeldSilence()}}appendToBuffer(e){let n=e.byteLength>>1;if(n===0)return;let i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=n>Ue?n-Ue:0,o=n-r;if(this.bufferLen+o>this.buffer.length){let s=Math.min(this.bufferLen,Ue);this.buffer.copyWithin(0,this.bufferLen-s,this.bufferLen),this.bufferLen=s}for(let s=r;s<n;s++)this.buffer[this.bufferLen++]=i.getInt16(s*2,!0)}snapshotBuffer(){let e=Math.max(0,this.bufferLen-Ue);return this.buffer.slice(e,this.bufferLen)}}});function Fp(t={}){return ha(Ix,Ex,import.meta.url,t)}var Ix,Ex,Vp=v(()=>{"use strict";Cp();Ix="smart-turn-v3.1-cpu.onnx",Ex="JARVIS_SMART_TURN_MODEL_PATH"});var Li,Zp=v(()=>{"use strict";ma();Op();Vp();Li=class{logMel;modelPath;sessionPromise=null;session=null;ort=null;disposed=!1;constructor(e={}){this.logMel=e.logMel??new Ni,this.modelPath=e.modelPath}async infer(e){if(this.disposed)throw new Error("SmartTurnRunner is disposed");let n=await this.ensureSession(),i=this.ort;if(!i)throw new Error("onnxruntime-web failed to load");let r=this.logMel.fromPcm16(e),o=new i.Tensor("float32",r,[1,Lp,br]),s=await n.run({input_features:o});if(this.disposed)throw new Error("SmartTurnRunner is disposed");let a=n.outputNames[0],c=s[a].data[0];if(!Number.isFinite(c))throw new Error("smart-turn produced a non-finite output");return c<0?0:c>1?1:c}prewarm(){this.disposed||this.ensureSession().catch(()=>{})}async dispose(){this.disposed=!0;let e=this.session;this.session=null,this.sessionPromise=null,this.ort=null,e&&await e.release()}ensureSession(){return this.sessionPromise?this.sessionPromise:(this.sessionPromise=this.load(),this.sessionPromise)}async load(){let e=await da();this.ort=e,fa(e);let n=this.modelPath??Fp(),i=await e.InferenceSession.create(n,{executionProviders:["wasm"],graphOptimizationLevel:"all",executionMode:"sequential"});if(this.disposed)throw await i.release(),new Error("SmartTurnRunner is disposed");return this.session=i,i}}});function xO(t){let e=[];if(t.recentTurns.length>0){e.push("Recent conversation:");for(let n of t.recentTurns)e.push(`${n.role==="assistant"?"Assistant":"User"}: ${n.text}`)}else e.push("Recent conversation: (none)");return e.push(""),e.push("Live partial transcript (the user is speaking right now):"),e.push(JSON.stringify(t.livePartial)),e.join(`
72
+ `)}function wO(t){let e=Bp(t)?.content,n=(Array.isArray(e)?e:[]).map(l=>Bp(l)).filter(l=>l?.type==="text").map(l=>typeof l?.text=="string"?l.text:"").join(""),i=Tx+n;i.includes("}")||(i+="}");let r=i.indexOf("{"),o=i.lastIndexOf("}");if(r===-1||o<=r)throw new Kt("turn evaluator reply carried no JSON object");let s;try{s=JSON.parse(i.slice(r,o+1))}catch{throw new Kt("turn evaluator reply was not valid JSON")}let a=Bp(s),u=a?.verdict;if(typeof u!="string"||!bO.includes(u))throw new Kt("turn evaluator reply carried an unknown verdict");let c=a?.confidence;if(typeof c!="number"||!Number.isFinite(c)||c<0||c>1)throw new Kt("turn evaluator confidence missing or out of range");return{verdict:u,confidence:c}}function Bp(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)?t:void 0}var gO,vO,yO,Tx,_O,bO,$O,Kt,va,Ox=v(()=>{"use strict";gO="claude-haiku-4-5-20251001",vO="https://api.anthropic.com/v1/messages",yO="2023-06-01",Tx='{"verdict":"',_O=["}"],bO=["done","mid_thought","hold_floor"],$O=`You are the semantic turn evaluator inside a real-time voice assistant's
73
+ turn-taking system. The user is speaking; a streaming ASR produces a live
74
+ partial transcript. Your only job is to judge whether the user's turn reads
75
+ as finished. You advise a policy layer; you never answer the user.
76
+
77
+ Given the recent conversation (may be empty) and the live partial, classify
78
+ the user's current state as exactly one of:
79
+
80
+ - "done" - the utterance reads complete: the user finished their thought and
81
+ expects the assistant to take the floor now. Complete statements,
82
+ questions, commands, answers, and greetings are done - even short ones.
83
+ - "mid_thought" - the user paused mid-utterance and will continue speaking
84
+ within a couple of seconds: a trailing conjunction or filler ("so", "um",
85
+ "and then"), an unfinished clause, or an answer that covers only part of
86
+ what the assistant just asked.
87
+ - "hold_floor" - the user is asking for the floor to be HELD open: they
88
+ signalled they need time to think, read, or do something ("give me a
89
+ minute to dig through my notes", "hold that thought", "don't answer yet")
90
+ and want the assistant to stay silent until they come back.
91
+
92
+ Rules:
93
+
94
+ 1. hold_floor requires the INTENT to pause the conversation. Hold-ish words
95
+ in other roles are not holds: "the hold on the account expired" (noun),
96
+ "it worked for a second" (duration), "wait times are down" (noun) are
97
+ ordinary content. Classify by what the sentence DOES, not by the words it
98
+ contains.
99
+ 2. ASR text is imperfect: casing and punctuation may be wrong or missing,
100
+ and the partial may cut off mid-word. A trailing period does not mean
101
+ done; a missing one does not mean mid_thought.
102
+ 3. Use the conversation context. A partial that answers only part of a
103
+ multi-part question is mid_thought. A complete answer to what was asked
104
+ is done even if very short.
105
+ 4. A wrong hold_floor is the most expensive mistake: it freezes the
106
+ assistant. When torn between hold_floor and anything else, pick
107
+ hold_floor only if the floor request is explicit. When torn between done
108
+ and mid_thought on a trailing filler or connective, prefer mid_thought.
109
+
110
+ Output exactly one line of strict JSON and nothing else:
111
+ {"verdict":"done"|"mid_thought"|"hold_floor","confidence":<number 0..1>}
112
+ confidence is your certainty in the verdict.
113
+ `,Kt=class extends Error{status;constructor(e,n){super(e),this.status=n,this.name="TurnEvaluatorError"}},va=class{key;fetchImpl;timeoutMs;constructor(e,n=fetch,i=2e3){this.key=e,this.fetchImpl=n,this.timeoutMs=i}async evaluate(e,n){let i={model:gO,max_tokens:64,temperature:0,stop_sequences:_O,system:$O,messages:[{role:"user",content:xO(e)},{role:"assistant",content:Tx}]},r=await this.fetchImpl(vO,{method:"POST",headers:{"x-api-key":this.key,"anthropic-version":yO,"content-type":"application/json"},body:JSON.stringify(i),signal:AbortSignal.any([n,AbortSignal.timeout(this.timeoutMs)])});if(!r.ok)throw new Kt(`turn evaluator request failed (HTTP ${r.status})`,r.status);let o;try{o=await r.json()}catch{throw new Kt("turn evaluator response body was not JSON")}return wO(o)}}});var Px,Gp,Wp=v(()=>{"use strict";Px="21m00Tcm4TlvDq8ikWAM",Gp={id:"jarvis-primary",engineVoice:{"elevenlabs-flash":{kind:"preset",voiceId:Px}}}});var ya,Cx=v(()=>{"use strict";De();ya=class{turnId;openedAtMs;log;terminal=!1;heldOpen=!1;decider=null;silenceOnsetAtMs=null;commitAtMs=null;asrFinalAtMs=null;transcriptLength=null;firstDeltaAtMs=null;firstAudioAtMs=null;constructor(e,n,i=q){this.turnId=e,this.openedAtMs=n,this.log=i}endpointerCommitted(e,n){this.decider===null&&(this.decider=e,this.silenceOnsetAtMs=n)}smartTurnResolved(e,n,i){this.log.debug("smart-turn P(complete)",{turnId:this.turnId,probability:e,inferenceMs:n,outcome:i})}smartTurnDegraded(e,n){this.log.debug("smart-turn DEGRADED to baseline - inference failed; this turn endpoints on baseline timers only",{turnId:this.turnId,inferenceMs:e,error:n instanceof Error?n.message:String(n)})}strongHoldRecognized(e){this.log.debug("lexical STRONG hold recognized - completeness vetoed, silence budget biases long",{turnId:this.turnId,cue:e})}heldEntered(e){this.heldOpen=!0,this.log.debug("floor-held mode entered - silence budgets escalate, stop cap suspended",{turnId:this.turnId,cue:e})}heldLadderRearmed(e){this.log.debug("held silence budget re-armed at the next ladder step",{turnId:this.turnId,budgetMs:e})}heldExited(e){this.heldOpen=!1,this.log.debug("floor-held mode exited",{turnId:this.turnId,reason:e})}evaluatorFired(){this.log.debug("semantic evaluator fired - smart-turn inconclusive during a live silence episode",{turnId:this.turnId})}evaluatorResolved(e,n,i,r){this.log.debug("semantic evaluator resolved",{turnId:this.turnId,verdict:e,confidence:n,latencyMs:i,outcome:r})}evaluatorFailed(e,n){this.log.debug("semantic evaluator failed - no signal; this episode endpoints as armed",{turnId:this.turnId,latencyMs:e,error:n instanceof Error?n.message:String(n)})}committed(e,n){this.commitAtMs===null&&(n==="ptt"&&this.heldOpen&&this.heldExited("ptt"),this.commitAtMs=e,n==="ptt"&&(this.decider??="ptt"))}asrFinalResolved(e,n){this.asrFinalAtMs===null&&(this.asrFinalAtMs=e,this.transcriptLength=n)}firstReasonerDelta(e){this.firstDeltaAtMs??=e}firstTtsAudio(e){this.firstAudioAtMs??=e}completed(e){this.terminal||(this.terminal=!0,this.log.debug("voice turn summary",{turnId:this.turnId,decider:this.decider,silenceToCommitMs:this.spanMs(this.silenceOnsetAtMs,this.commitAtMs),commitToFinalMs:this.spanMs(this.commitAtMs,this.asrFinalAtMs),finalToFirstDeltaMs:this.spanMs(this.asrFinalAtMs,this.firstDeltaAtMs),firstDeltaToFirstAudioMs:this.spanMs(this.firstDeltaAtMs,this.firstAudioAtMs),totalMs:e-this.openedAtMs,transcriptLength:this.transcriptLength}))}blank(e){this.terminal||(this.terminal=!0,this.log.debug("voice turn blank - terminated silently (no transcribed speech)",{turnId:this.turnId,decider:this.decider,silenceToCommitMs:this.spanMs(this.silenceOnsetAtMs,this.commitAtMs),commitToFinalMs:this.spanMs(this.commitAtMs,this.asrFinalAtMs),totalMs:e-this.openedAtMs,transcriptLength:this.transcriptLength}))}spanMs(e,n){return e===null||n===null?null:n-e}}});var Ax,zx,_a,Nx=v(()=>{"use strict";Cx();Ax=16e3,zx="pcm_s16le",_a=class{deps;asrStream;ttsStream=null;reasonAbort=new AbortController;phase="capturing";settled=!1;finalizing=!1;lastFrameAtMs;timeline;constructor(e){this.deps=e,this.lastFrameAtMs=e.startMs,this.timeline=new ya(e.turnId,e.clock.now()),e.controller.attachTelemetry?.(this.timeline),this.asrStream=e.asrEngine.open({sampleRate:Ax,encoding:zx,emitPartials:!0}),this.asrStream.onTranscript(n=>this.handleTranscript(n)),this.asrStream.onError(n=>this.finishError("turn_failed",n)),e.controller.onCommit(()=>this.finalize(this.lastFrameAtMs,"controller")),e.emit({type:"state",turnId:e.turnId,state:"processing"})}pushFrame(e,n){this.phase!=="capturing"||this.settled||(this.lastFrameAtMs=n,this.asrStream.pushAudio(e),this.deps.controller.onAudioFrame(e))}endAudio(e){this.finalize(e,"ptt")}cancel(){this.settled||(this.settled=!0,this.phase="cancelled",this.deps.controller.dispose(),this.reasonAbort.abort(),this.asrStream.abort(),this.ttsStream?.cancel(),this.deps.onComplete())}handleTranscript(e){this.phase!=="capturing"||this.settled||e.isFinal||(this.deps.emit({type:"transcript.partial",turnId:this.deps.turnId,text:e.text}),this.deps.controller.onPartial(e.text))}finalize(e,n){this.phase!=="capturing"||this.finalizing||this.settled||(this.finalizing=!0,this.timeline.committed(this.deps.clock.now(),n),this.deps.controller.dispose(),this.finalizeAndRespond(e))}async finalizeAndRespond(e){let n;try{n=await this.asrStream.end()}catch(r){if(this.settled)return;this.finishError("turn_failed",r);return}if(this.settled)return;if(this.timeline.asrFinalResolved(this.deps.clock.now(),n.text.length),n.text.trim()===""){this.finishBlank();return}this.phase="responding";let i=this.buildUserTurn(n.text,e);this.deps.emit({type:"turn.final",turnId:this.deps.turnId,turn:i,...this.deps.commandId!==void 0&&{commandId:this.deps.commandId}}),this.deps.emit({type:"state",turnId:this.deps.turnId,state:"responding"});try{await this.respond(i.text)}catch(r){if(this.settled)return;this.finishError("turn_failed",r);return}this.settled||this.finishDone()}async respond(e){let n=!1,i=!1,r=this.deps.ttsEngine.speak({voice:this.deps.voice,sampleRate:Ax,encoding:zx});this.ttsStream=r,r.onAudio(o=>{this.settled||(i||(i=!0,this.timeline.firstTtsAudio(this.deps.clock.now())),this.deps.emit({type:"response.audio",turnId:this.deps.turnId,audio:o}))}),r.onError(o=>this.finishError("turn_failed",o));for await(let o of this.deps.reasoner.run(e,this.reasonAbort.signal)){if(this.settled)return;n||(n=!0,this.timeline.firstReasonerDelta(this.deps.clock.now())),this.deps.emit({type:"response.delta",turnId:this.deps.turnId,text:o.text});for(let s of this.deps.segmenter.push(o.text))r.pushText(s)}if(!this.settled){for(let o of this.deps.segmenter.flush())r.pushText(o);await r.end()}}finishBlank(){this.settled||(this.settled=!0,this.timeline.blank(this.deps.clock.now()),this.deps.onComplete())}finishDone(){this.settled||(this.settled=!0,this.timeline.completed(this.deps.clock.now()),this.deps.emit({type:"response.done",turnId:this.deps.turnId}),this.deps.onComplete())}finishError(e,n){this.settled||(this.settled=!0,this.deps.controller.dispose(),this.reasonAbort.abort(),this.ttsStream?.cancel(),this.deps.emit({type:"error",turnId:this.deps.turnId,...this.deps.commandId!==void 0&&{commandId:this.deps.commandId},reason:e,message:n instanceof Error?n.message:String(n)}),this.deps.onComplete())}buildUserTurn(e,n){return{source:"voice",turnId:this.deps.turnId,sessionId:this.deps.sessionId,deviceId:this.deps.deviceId,text:e,startMs:this.deps.startMs,endMs:n,...this.deps.projectId!==void 0&&{projectId:this.deps.projectId}}}}});import{randomUUID as qp}from"node:crypto";var SO,yn,Ui,ba,Rx=v(()=>{"use strict";xi();ep();Vb();tp();rp();Ti();Np();Mp();Zp();Ox();Wp();Nx();SO=6,yn=class extends Error{constructor(e){super(e),this.name="ReasonerUnavailableError"}},Ui=class extends Error{constructor(e){super(e),this.name="VoiceUnavailableError"}},ba=class{deps;sessionId;deviceId;projectId;queue=new ta;closed=!1;eventsConsumed=!1;inFlight=!1;reasoner=null;reasonerRoute=null;turnAbort=null;voiceTurn=null;voiceTurnFailed=!1;voiceEngines=null;clock;newTurnController;newSmartTurnInference;newFrameClassifier;newTurnEvaluator;newSegmenter;voiceIdentity;smartTurnInference=null;frameClassifier=null;turnEvaluator=void 0;constructor(e,n,i){this.deps=i,this.sessionId=e,this.deviceId=n.deviceId,this.projectId=n.projectId,this.clock=i.clock??new ki,this.newSmartTurnInference=i.createSmartTurnInference??(()=>new Li),this.newFrameClassifier=i.createFrameClassifier??(()=>new Ei(new _r)),this.newTurnEvaluator=i.createTurnEvaluator??(r=>new va(r)),this.newTurnController=i.createTurnController??(r=>{let o=this.ensureFrameClassifier();return o.reset?.(),new Di(r,this.ensureSmartTurnInference(),{},o,this.semanticHook())}),this.newSegmenter=i.createSegmenter??(()=>new Si),this.voiceIdentity=i.voiceIdentity??Gp,this.emit({type:"session.ready"})}async send(e){let{commandId:n}=e;if(this.closed)throw new Le(n,"closed");if(e.sessionId!==this.sessionId)throw new Le(n,"invalid","command sessionId does not match session");switch(e.type){case"input.text":this.acceptTextInput(e);return;case"input.audio.frame":this.acceptAudioFrame(e);return;case"input.audio.end":this.endAudioInput(e);return;case"turn.cancel":this.cancelTurn(e);return;case"session.close":return this.close();case"approval.resolve":throw new Le(n,"unsupported");default:throw new Le(n,"invalid")}}events(){if(this.eventsConsumed)throw new Error("CoreSession.events() supports a single consumer in v0.1");return this.eventsConsumed=!0,this.queue.drain()}close(){if(!this.closed){this.closed=!0,this.turnAbort?.abort(),this.voiceTurn?.cancel();let e=this.smartTurnInference;this.smartTurnInference=null;let n=this.frameClassifier;this.frameClassifier=null;let i=this.turnEvaluator;this.turnEvaluator=null,this.queue.close();let r=[];if(e&&r.push(e.dispose().catch(()=>{})),n?.dispose&&r.push(n.dispose().catch(()=>{})),i?.dispose&&r.push(i.dispose().catch(()=>{})),r.length>0)return Promise.all(r).then(()=>{})}return Promise.resolve()}acceptTextInput(e){if(e.text.trim().length===0)throw new Le(e.commandId,"invalid","input.text requires non-empty text");if(this.inFlight)throw new Le(e.commandId,"backpressured","a turn is already in progress (one turn at a time in v0.1)");this.inFlight=!0;let n=qp();this.emit({type:"turn.accepted",turnId:n,clientTurnId:e.clientTurnId,source:"text",commandId:e.commandId}),this.emit({type:"turn.final",turnId:n,turn:this.toTextUserTurn(n,e),commandId:e.commandId}),this.runTextTurn(n,e)}async runTextTurn(e,n){let i=new AbortController;this.turnAbort=i;try{let r=this.ensureReasoner();this.emit({type:"state",turnId:e,state:"responding"});for await(let o of r.run(n.text,i.signal))this.emit({type:"response.delta",turnId:e,text:o.text});this.emit({type:"response.done",turnId:e})}catch(r){let o=r instanceof yn?"no_text_route":"turn_failed";this.emit({type:"error",turnId:e,commandId:n.commandId,reason:o,message:r instanceof Error?r.message:String(r)})}finally{this.inFlight=!1,this.turnAbort=null}}acceptAudioFrame(e){if(this.voiceTurn){this.voiceTurn.pushFrame(e.audio,e.atMs);return}if(this.voiceTurnFailed)return;if(this.inFlight)throw new Le(e.commandId,"backpressured","a turn is already in progress (one turn at a time in v0.1)");this.inFlight=!0;let n=qp();this.emit({type:"turn.accepted",turnId:n,clientTurnId:e.clientTurnId,source:"voice",commandId:e.commandId});let i=this.resolveVoicePipeline(n,e.commandId);if(!i){this.voiceTurnFailed=!0;return}this.voiceTurn=new _a({turnId:n,sessionId:this.sessionId,deviceId:this.deviceId,...this.projectId!==void 0&&{projectId:this.projectId},commandId:e.commandId,startMs:e.atMs,asrEngine:i.engines.asrEngine,ttsEngine:i.engines.ttsEngine,voice:this.voiceIdentity,reasoner:i.reasoner,controller:this.newTurnController(this.clock),segmenter:this.newSegmenter(),clock:this.clock,emit:r=>this.emit(r),onComplete:()=>this.completeVoiceTurn()}),this.smartTurnInference?.prewarm?.(),this.frameClassifier?.prewarm?.(),this.voiceTurn.pushFrame(e.audio,e.atMs)}endAudioInput(e){if(this.voiceTurnFailed){this.resetVoiceFailure();return}this.voiceTurn?.endAudio(e.atMs)}cancelTurn(e){if(this.voiceTurnFailed){this.resetVoiceFailure();return}this.voiceTurn?.cancel()}completeVoiceTurn(){this.voiceTurn=null,this.inFlight=!1}resetVoiceFailure(){this.voiceTurnFailed=!1}resolveVoicePipeline(e,n){let i;try{i=this.ensureVoiceEngines()}catch(o){return this.emitTurnError(e,n,"no_voice_route",o),null}let r;try{r=this.ensureReasoner()}catch(o){let s=o instanceof yn?"no_text_route":"turn_failed";return this.emitTurnError(e,n,s,o),null}return{engines:i,reasoner:r}}ensureVoiceEngines(){if(this.voiceEngines)return this.voiceEngines;if(!this.deps.voiceRegistry)throw new Ui("voice is not available in this core build");let e=this.deps.configService.resolved(),n=e.routes?.stt,i=e.routes?.tts;if(!n||!i)throw new Ui("no voice route configured - run 'jarvis init' to set routes.stt and routes.tts");let r=e.secrets?.[n.provider],o=e.secrets?.[i.provider];if(!r||!o){let u=r?i.provider:n.provider;throw new Ui(`no API key for voice provider '${u}' - run 'jarvis init' to add it`)}let s=this.deps.voiceRegistry.asrEngine({provider:n.provider,model:n.model},r),a=this.deps.voiceRegistry.ttsEngine({provider:i.provider,model:i.model},o);return this.voiceEngines={asrEngine:s,ttsEngine:a},this.voiceEngines}ensureSmartTurnInference(){return this.smartTurnInference??=this.newSmartTurnInference(),this.smartTurnInference}ensureFrameClassifier(){return this.frameClassifier??=this.newFrameClassifier(),this.frameClassifier}semanticHook(){if(this.turnEvaluator===void 0){let n=this.reasonerRoute;this.turnEvaluator=n?.provider==="anthropic"?this.newTurnEvaluator(n.key):null}return this.turnEvaluator===null?void 0:{evaluator:this.turnEvaluator,recentTurns:()=>{let n=[];for(let i of this.reasoner?.historySnapshot()??[])(i.role==="user"||i.role==="assistant")&&n.push({role:i.role,text:i.content});return n.slice(-SO)}}}ensureReasoner(){if(this.reasoner)return this.reasoner;let e=this.deps.configService.resolved(),n=e.routes?.text;if(!n)throw new yn("no text model is configured - run 'jarvis init' to set routes.text");let i=e.secrets?.[n.provider];if(!i)throw new yn(`no API key for text provider '${n.provider}' - run 'jarvis init' to add it`);let r=this.deps.registry.textAdapter({provider:n.provider,model:n.model},i);return this.reasoner=new wi(r,n.model,this.deps.systemPrompt),this.reasonerRoute={provider:n.provider,key:i},this.reasoner}toTextUserTurn(e,n){return{source:"text",turnId:e,sessionId:this.sessionId,deviceId:this.deviceId,text:n.text,atMs:n.atMs,...this.projectId!==void 0&&{projectId:this.projectId}}}emitTurnError(e,n,i,r){this.emit({type:"error",turnId:e,commandId:n,reason:i,message:r instanceof Error?r.message:String(r)}),this.inFlight=!1}emit(e){this.queue.push({...e,sessionId:this.sessionId,eventId:qp(),atMs:Date.now()})}}});function $a(t){try{let e=JSON.parse(t);return typeof e=="object"&&e!==null?e:void 0}catch{return}}function Hp(t){return typeof t=="string"?t:""}function xa(t){let e=t.message_type;return typeof e=="string"&&(kO.has(e)||e.endsWith("_error"))?e:typeof t.error=="string"&&t.error.length>0?"error":null}function Dx(t){return Buffer.from(t).toString("base64")}function Lx(t){return new Uint8Array(Buffer.from(t,"base64"))}function wa(t,e){return new Error(`${t} connection error: ${e.message}`)}var kO,Jp=v(()=>{"use strict";kO=new Set(["error","auth_error","quota_exceeded","rate_limited"])});function IO(t,e,n){let i=new URL(t);i.searchParams.set("model_id",e),i.searchParams.set("audio_format",EO(n)),i.searchParams.set("commit_strategy","manual"),n.language&&i.searchParams.set("language_code",n.language);for(let r of n.biasTerms??[])i.searchParams.append("keyterms",r);return i.toString()}function EO(t){return t.encoding==="pcm_s16le"?`pcm_${t.sampleRate}`:"pcm_16000"}var Ux,ji,Kp,Yp=v(()=>{"use strict";Jp();Ux="wss://api.elevenlabs.io/v1/speech-to-text/realtime",ji=class{apiKey;socketFactory;model;endpoint;id="elevenlabs-scribe";constructor(e,n,i,r=Ux){this.apiKey=e,this.socketFactory=n,this.model=i,this.endpoint=r}open(e){return new Kp(this.apiKey,this.socketFactory,this.model,this.endpoint,e)}},Kp=class{opts;socket;opened=!1;aborted=!1;closed=!1;pending=[];committed=[];transcriptCb;errorCb;endPending=null;commitRequested=!1;constructor(e,n,i,r,o){this.opts=o,this.socket=n(IO(r,i,o),{"xi-api-key":e}),this.socket.onOpen(()=>this.handleOpen()),this.socket.onMessage(s=>this.handleMessage(s)),this.socket.onError(s=>this.handleError(s)),this.socket.onClose(()=>this.handleClose())}pushAudio(e){if(!(this.aborted||this.closed||this.commitRequested)){if(!this.opened){this.pending.push(e);return}this.sendChunk(e,!1)}}onTranscript(e){this.transcriptCb=e}onError(e){this.errorCb=e}end(){return this.aborted?Promise.reject(new Error("ASR stream already aborted")):this.endPending?Promise.reject(new Error("ASR end() already in progress")):new Promise((e,n)=>{this.endPending={resolve:e,reject:n},this.commitRequested=!0,this.opened&&this.sendCommit()})}abort(){if(this.aborted=!0,this.endPending){let{reject:e}=this.endPending;this.endPending=null,e(new Error("ASR stream aborted"))}return this.teardown(),Promise.resolve()}handleOpen(){if(!(this.aborted||this.closed)){this.opened=!0;for(let e of this.pending)this.sendChunk(e,!1);this.pending.length=0,this.commitRequested&&this.sendCommit()}}handleMessage(e){if(this.aborted||this.closed)return;let n=$a(e);if(!n)return;let i=xa(n);if(i){this.handleError(new Error(`stream error (${i})`));return}let r=n.message_type;if(r==="partial_transcript"){this.opts.emitPartials&&this.transcriptCb?.({text:Hp(n.text),isFinal:!1,startMs:0});return}if(r==="committed_transcript"||r==="committed_transcript_with_timestamps"){let o=Hp(n.text);o.length>0&&this.committed.push(o),this.endPending&&this.resolveEnd()}}handleError(e){if(this.closed)return;let n=wa("ElevenLabs ASR",e);if(this.endPending){let{reject:i}=this.endPending;this.endPending=null,i(n)}this.errorCb?.(n),this.teardown()}handleClose(){if(this.closed)return;this.closed=!0;let e=new Error("ElevenLabs ASR connection closed unexpectedly");if(this.endPending){let{reject:n}=this.endPending;this.endPending=null,n(e)}this.errorCb?.(e)}resolveEnd(){if(!this.endPending)return;let e={text:this.committed.join(" ").trim(),isFinal:!0,startMs:0};this.transcriptCb?.(e);let{resolve:n}=this.endPending;this.endPending=null,this.teardown(),n(e)}sendChunk(e,n){this.socket.send(JSON.stringify({message_type:"input_audio_chunk",audio_base_64:Dx(e),commit:n,sample_rate:this.opts.sampleRate}))}sendCommit(){this.sendChunk(new Uint8Array(0),!0)}teardown(){this.closed||(this.closed=!0,this.socket.close())}}});import{randomUUID as TO}from"node:crypto";function PO(t,e){let n=t.engineVoice[e];if(!n)throw new Error(`voice '${t.id}' has no '${e}' engineVoice mapping`);if(n.kind!=="preset")throw new Error(`the ${e} adapter needs a preset voiceId for '${t.id}', got kind '${n.kind}'`);return n.voiceId}function CO(t,e,n,i){let r=new URL(t.replace("{voice_id}",encodeURIComponent(e)));return r.searchParams.set("model_id",n),r.searchParams.set("output_format",AO(i)),r.searchParams.set("auto_mode","true"),r.toString()}function AO(t){return t.encoding==="pcm_s16le"?`pcm_${t.sampleRate}`:"pcm_16000"}var jx,OO,Mi,Xp,Qp=v(()=>{"use strict";Jp();jx="wss://api.elevenlabs.io/v1/text-to-speech/{voice_id}/multi-stream-input",OO={stability:.5,similarity_boost:.75,use_speaker_boost:!0},Mi=class{apiKey;socketFactory;model;endpointTemplate;id="elevenlabs-flash";constructor(e,n,i,r=jx){this.apiKey=e,this.socketFactory=n,this.model=i,this.endpointTemplate=r}speak(e){return new Xp(this.apiKey,this.socketFactory,this.model,this.endpointTemplate,this.id,e)}},Xp=class{socket;contextId=TO();opened=!1;cancelled=!1;closed=!1;endRequested=!1;closeContextSent=!1;pending=[];audioCb;errorCb;endPending=null;constructor(e,n,i,r,o,s){let a=PO(s.voice,o);this.socket=n(CO(r,a,i,s),{"xi-api-key":e}),this.socket.onOpen(()=>this.handleOpen()),this.socket.onMessage(u=>this.handleMessage(u)),this.socket.onError(u=>this.handleError(u)),this.socket.onClose(()=>this.handleClose())}pushText(e){if(!(this.cancelled||this.closed||this.endRequested)){if(!this.opened){this.pending.push(e);return}this.sendText(e)}}onAudio(e){this.audioCb=e}onError(e){this.errorCb=e}end(){return this.cancelled||this.closed?Promise.resolve():this.endPending?Promise.reject(new Error("TTS end() already in progress")):new Promise((e,n)=>{this.endPending={resolve:e,reject:n},this.endRequested=!0,this.opened&&this.sendEndOfContext()})}cancel(){if(this.cancelled||this.closed)return this.cancelled=!0,Promise.resolve();if(this.cancelled=!0,this.endPending){let{resolve:e}=this.endPending;this.endPending=null,e()}return this.opened&&this.sendCloseContext(),this.teardown(),Promise.resolve()}handleOpen(){if(!(this.cancelled||this.closed)){this.opened=!0,this.sendInit();for(let e of this.pending)this.sendText(e);this.pending.length=0,this.endRequested&&this.sendEndOfContext()}}handleMessage(e){if(this.cancelled||this.closed)return;let n=$a(e);if(!n)return;let i=xa(n);if(i){this.handleError(new Error(`stream error (${i})`));return}typeof n.audio=="string"&&n.audio.length>0&&this.audioCb?.(Lx(n.audio)),(n.isFinal===!0||n.is_final===!0)&&this.resolveEnd()}handleError(e){if(this.closed)return;let n=wa("ElevenLabs TTS",e);if(this.endPending){let{reject:i}=this.endPending;this.endPending=null,i(n)}this.errorCb?.(n),this.teardown()}handleClose(){if(this.closed)return;this.closed=!0;let e=new Error("ElevenLabs TTS connection closed unexpectedly");if(this.endPending){let{reject:n}=this.endPending;this.endPending=null,n(e)}this.errorCb?.(e)}resolveEnd(){if(!this.endPending)return;let{resolve:e}=this.endPending;this.endPending=null,this.teardown(),e()}sendInit(){this.socket.send(JSON.stringify({text:" ",voice_settings:OO,context_id:this.contextId}))}sendText(e){let n=e.endsWith(" ")?e:`${e} `;this.socket.send(JSON.stringify({text:n,context_id:this.contextId}))}sendEndOfContext(){this.sendFlush(),this.sendCloseContext()}sendFlush(){this.socket.send(JSON.stringify({context_id:this.contextId,text:"",flush:!0}))}sendCloseContext(){this.closeContextSent||(this.closeContextSent=!0,this.socket.send(JSON.stringify({context_id:this.contextId,close_context:!0})))}teardown(){this.closed||(this.closed=!0,this.socket.close())}}});var kt=z((Xj,Vx)=>{"use strict";var Mx=["nodebuffer","arraybuffer","fragments"],Fx=typeof Blob<"u";Fx&&Mx.push("blob");Vx.exports={BINARY_TYPES:Mx,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Fx,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var Fi=z((Qj,Sa)=>{"use strict";var{EMPTY_BUFFER:zO}=kt(),em=Buffer[Symbol.species];function NO(t,e){if(t.length===0)return zO;if(t.length===1)return t[0];let n=Buffer.allocUnsafe(e),i=0;for(let r=0;r<t.length;r++){let o=t[r];n.set(o,i),i+=o.length}return i<e?new em(n.buffer,n.byteOffset,i):n}function Zx(t,e,n,i,r){for(let o=0;o<r;o++)n[i+o]=t[o]^e[o&3]}function Bx(t,e){for(let n=0;n<t.length;n++)t[n]^=e[n&3]}function RO(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)}function tm(t){if(tm.readOnly=!0,Buffer.isBuffer(t))return t;let e;return t instanceof ArrayBuffer?e=new em(t):ArrayBuffer.isView(t)?e=new em(t.buffer,t.byteOffset,t.byteLength):(e=Buffer.from(t),tm.readOnly=!1),e}Sa.exports={concat:NO,mask:Zx,toArrayBuffer:RO,toBuffer:tm,unmask:Bx};if(!process.env.WS_NO_BUFFER_UTIL)try{let t=ae("bufferutil");Sa.exports.mask=function(e,n,i,r,o){o<48?Zx(e,n,i,r,o):t.mask(e,n,i,r,o)},Sa.exports.unmask=function(e,n){e.length<32?Bx(e,n):t.unmask(e,n)}}catch{}});var qx=z((e2,Wx)=>{"use strict";var Gx=Symbol("kDone"),rm=Symbol("kRun"),nm=class{constructor(e){this[Gx]=()=>{this.pending--,this[rm]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[rm]()}[rm](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Gx])}}};Wx.exports=nm});var $n=z((t2,Yx)=>{"use strict";var Vi=ae("zlib"),Hx=Fi(),DO=qx(),{kStatusCode:Jx}=kt(),LO=Buffer[Symbol.species],UO=Buffer.from([0,0,255,255]),Ia=Symbol("permessage-deflate"),It=Symbol("total-length"),_n=Symbol("callback"),Yt=Symbol("buffers"),bn=Symbol("error"),ka,im=class{constructor(e){if(this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!ka){let n=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;ka=new DO(n)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[_n];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let n=this._options,i=e.find(r=>!(n.serverNoContextTakeover===!1&&r.server_no_context_takeover||r.server_max_window_bits&&(n.serverMaxWindowBits===!1||typeof n.serverMaxWindowBits=="number"&&n.serverMaxWindowBits>r.server_max_window_bits)||typeof n.clientMaxWindowBits=="number"&&!r.client_max_window_bits));if(!i)throw new Error("None of the extension offers can be accepted");return n.serverNoContextTakeover&&(i.server_no_context_takeover=!0),n.clientNoContextTakeover&&(i.client_no_context_takeover=!0),typeof n.serverMaxWindowBits=="number"&&(i.server_max_window_bits=n.serverMaxWindowBits),typeof n.clientMaxWindowBits=="number"?i.client_max_window_bits=n.clientMaxWindowBits:(i.client_max_window_bits===!0||n.clientMaxWindowBits===!1)&&delete i.client_max_window_bits,i}acceptAsClient(e){let n=e[0];if(this._options.clientNoContextTakeover===!1&&n.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!n.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(n.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&n.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return n}normalizeParams(e){return e.forEach(n=>{Object.keys(n).forEach(i=>{let r=n[i];if(r.length>1)throw new Error(`Parameter "${i}" must have only a single value`);if(r=r[0],i==="client_max_window_bits"){if(r!==!0){let o=+r;if(!Number.isInteger(o)||o<8||o>15)throw new TypeError(`Invalid value for parameter "${i}": ${r}`);r=o}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${i}": ${r}`)}else if(i==="server_max_window_bits"){let o=+r;if(!Number.isInteger(o)||o<8||o>15)throw new TypeError(`Invalid value for parameter "${i}": ${r}`);r=o}else if(i==="client_no_context_takeover"||i==="server_no_context_takeover"){if(r!==!0)throw new TypeError(`Invalid value for parameter "${i}": ${r}`)}else throw new Error(`Unknown parameter "${i}"`);n[i]=r})}),e}decompress(e,n,i){ka.add(r=>{this._decompress(e,n,(o,s)=>{r(),i(o,s)})})}compress(e,n,i){ka.add(r=>{this._compress(e,n,(o,s)=>{r(),i(o,s)})})}_decompress(e,n,i){let r=this._isServer?"client":"server";if(!this._inflate){let o=`${r}_max_window_bits`,s=typeof this.params[o]!="number"?Vi.Z_DEFAULT_WINDOWBITS:this.params[o];this._inflate=Vi.createInflateRaw({...this._options.zlibInflateOptions,windowBits:s}),this._inflate[Ia]=this,this._inflate[It]=0,this._inflate[Yt]=[],this._inflate.on("error",MO),this._inflate.on("data",Kx)}this._inflate[_n]=i,this._inflate.write(e),n&&this._inflate.write(UO),this._inflate.flush(()=>{let o=this._inflate[bn];if(o){this._inflate.close(),this._inflate=null,i(o);return}let s=Hx.concat(this._inflate[Yt],this._inflate[It]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[It]=0,this._inflate[Yt]=[],n&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),i(null,s)})}_compress(e,n,i){let r=this._isServer?"server":"client";if(!this._deflate){let o=`${r}_max_window_bits`,s=typeof this.params[o]!="number"?Vi.Z_DEFAULT_WINDOWBITS:this.params[o];this._deflate=Vi.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:s}),this._deflate[It]=0,this._deflate[Yt]=[],this._deflate.on("data",jO)}this._deflate[_n]=i,this._deflate.write(e),this._deflate.flush(Vi.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let o=Hx.concat(this._deflate[Yt],this._deflate[It]);n&&(o=new LO(o.buffer,o.byteOffset,o.length-4)),this._deflate[_n]=null,this._deflate[It]=0,this._deflate[Yt]=[],n&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),i(null,o)})}};Yx.exports=im;function jO(t){this[Yt].push(t),this[It]+=t.length}function Kx(t){if(this[It]+=t.length,this[Ia]._maxPayload<1||this[It]<=this[Ia]._maxPayload){this[Yt].push(t);return}this[bn]=new RangeError("Max payload size exceeded"),this[bn].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[bn][Jx]=1009,this.removeListener("data",Kx),this.reset()}function MO(t){if(this[Ia]._inflate=null,this[bn]){this[_n](this[bn]);return}t[Jx]=1007,this[_n](t)}});var xn=z((r2,Ea)=>{"use strict";var{isUtf8:Xx}=ae("buffer"),{hasBlob:FO}=kt(),VO=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function ZO(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function om(t){let e=t.length,n=0;for(;n<e;)if((t[n]&128)===0)n++;else if((t[n]&224)===192){if(n+1===e||(t[n+1]&192)!==128||(t[n]&254)===192)return!1;n+=2}else if((t[n]&240)===224){if(n+2>=e||(t[n+1]&192)!==128||(t[n+2]&192)!==128||t[n]===224&&(t[n+1]&224)===128||t[n]===237&&(t[n+1]&224)===160)return!1;n+=3}else if((t[n]&248)===240){if(n+3>=e||(t[n+1]&192)!==128||(t[n+2]&192)!==128||(t[n+3]&192)!==128||t[n]===240&&(t[n+1]&240)===128||t[n]===244&&t[n+1]>143||t[n]>244)return!1;n+=4}else return!1;return!0}function BO(t){return FO&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&(t[Symbol.toStringTag]==="Blob"||t[Symbol.toStringTag]==="File")}Ea.exports={isBlob:BO,isValidStatusCode:ZO,isValidUTF8:om,tokenChars:VO};if(Xx)Ea.exports.isValidUTF8=function(t){return t.length<24?om(t):Xx(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=ae("utf-8-validate");Ea.exports.isValidUTF8=function(e){return e.length<32?om(e):t(e)}}catch{}});var lm=z((n2,ow)=>{"use strict";var{Writable:GO}=ae("stream"),Qx=$n(),{BINARY_TYPES:WO,EMPTY_BUFFER:ew,kStatusCode:qO,kWebSocket:HO}=kt(),{concat:sm,toArrayBuffer:JO,unmask:KO}=Fi(),{isValidStatusCode:YO,isValidUTF8:tw}=xn(),Ta=Buffer[Symbol.species],Qe=0,rw=1,nw=2,iw=3,am=4,um=5,Oa=6,cm=class extends GO{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||WO[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=e.maxBufferedChunks|0,this._maxFragments=e.maxFragments|0,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[HO]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=Qe}_write(e,n,i){if(this._opcode===8&&this._state==Qe)return i();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){i(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(i)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let i=this._buffers[0];return this._buffers[0]=new Ta(i.buffer,i.byteOffset+e,i.length-e),new Ta(i.buffer,i.byteOffset,e)}let n=Buffer.allocUnsafe(e);do{let i=this._buffers[0],r=n.length-e;e>=i.length?n.set(this._buffers.shift(),r):(n.set(new Uint8Array(i.buffer,i.byteOffset,e),r),this._buffers[0]=new Ta(i.buffer,i.byteOffset+e,i.length-e)),e-=i.length}while(e>0);return n}startLoop(e){this._loop=!0;do switch(this._state){case Qe:this.getInfo(e);break;case rw:this.getPayloadLength16(e);break;case nw:this.getPayloadLength64(e);break;case iw:this.getMask();break;case am:this.getData(e);break;case um:case Oa:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let n=this.consume(2);if((n[0]&48)!==0){let r=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(r);return}let i=(n[0]&64)===64;if(i&&!this._extensions[Qx.extensionName]){let r=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(r);return}if(this._fin=(n[0]&128)===128,this._opcode=n[0]&15,this._payloadLength=n[1]&127,this._opcode===0){if(i){let r=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(r);return}if(!this._fragmented){let r=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(r);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let r=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(r);return}this._compressed=i}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let r=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(r);return}if(i){let r=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(r);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let r=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(r);return}}else{let r=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(r);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(n[1]&128)===128,this._isServer){if(!this._masked){let r=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(r);return}}else if(this._masked){let r=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(r);return}this._payloadLength===126?this._state=rw:this._payloadLength===127?this._state=nw:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let n=this.consume(8),i=n.readUInt32BE(0);if(i>Math.pow(2,21)-1){let r=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(r);return}this._payloadLength=i*Math.pow(2,32)+n.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let n=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(n);return}this._masked?this._state=iw:this._state=am}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=am}getData(e){let n=ew;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}n=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&KO(n,this._mask)}if(this._opcode>7){this.controlMessage(n,e);return}if(this._compressed){this._state=um,this.decompress(n,e);return}if(n.length){if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let i=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");e(i);return}this._messageLength=this._totalPayloadLength,this._fragments.push(n)}this.dataMessage(e)}decompress(e,n){this._extensions[Qx.extensionName].decompress(e,this._fin,(r,o)=>{if(r)return n(r);if(o.length){if(this._messageLength+=o.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let s=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");n(s);return}if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let s=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");n(s);return}this._fragments.push(o)}this.dataMessage(n),this._state===Qe&&this.startLoop(n)})}dataMessage(e){if(!this._fin){this._state=Qe;return}let n=this._messageLength,i=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let r;this._binaryType==="nodebuffer"?r=sm(i,n):this._binaryType==="arraybuffer"?r=JO(sm(i,n)):this._binaryType==="blob"?r=new Blob(i):r=i,this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=Qe):(this._state=Oa,setImmediate(()=>{this.emit("message",r,!0),this._state=Qe,this.startLoop(e)}))}else{let r=sm(i,n);if(!this._skipUTF8Validation&&!tw(r)){let o=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(o);return}this._state===um||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=Qe):(this._state=Oa,setImmediate(()=>{this.emit("message",r,!1),this._state=Qe,this.startLoop(e)}))}}controlMessage(e,n){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,ew),this.end();else{let i=e.readUInt16BE(0);if(!YO(i)){let o=this.createError(RangeError,`invalid status code ${i}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");n(o);return}let r=new Ta(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!tw(r)){let o=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");n(o);return}this._loop=!1,this.emit("conclude",i,r),this.end()}this._state=Qe;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=Qe):(this._state=Oa,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=Qe,this.startLoop(n)}))}createError(e,n,i,r,o){this._loop=!1,this._errored=!0;let s=new e(i?`Invalid WebSocket frame: ${n}`:n);return Error.captureStackTrace(s,this.createError),s.code=o,s[qO]=r,s}};ow.exports=cm});var hm=z((o2,uw)=>{"use strict";var{Duplex:i2}=ae("stream"),{randomFillSync:XO}=ae("crypto"),{types:{isUint8Array:QO}}=ae("util"),sw=$n(),{EMPTY_BUFFER:eP,kWebSocket:tP,NOOP:rP}=kt(),{isBlob:wn,isValidStatusCode:nP}=xn(),{mask:aw,toBuffer:$r}=Fi(),et=Symbol("kByteLength"),iP=Buffer.alloc(4),Pa=8*1024,xr,Sn=Pa,ct=0,oP=1,sP=2,dm=class t{constructor(e,n,i){this._extensions=n||{},i&&(this._generateMask=i,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=ct,this.onerror=rP,this[tP]=void 0}static frame(e,n){let i,r=!1,o=2,s=!1;n.mask&&(i=n.maskBuffer||iP,n.generateMask?n.generateMask(i):(Sn===Pa&&(xr===void 0&&(xr=Buffer.alloc(Pa)),XO(xr,0,Pa),Sn=0),i[0]=xr[Sn++],i[1]=xr[Sn++],i[2]=xr[Sn++],i[3]=xr[Sn++]),s=(i[0]|i[1]|i[2]|i[3])===0,o=6);let a;typeof e=="string"?(!n.mask||s)&&n[et]!==void 0?a=n[et]:(e=Buffer.from(e),a=e.length):(a=e.length,r=n.mask&&n.readOnly&&!s);let u=a;a>=65536?(o+=8,u=127):a>125&&(o+=2,u=126);let c=Buffer.allocUnsafe(r?a+o:o);return c[0]=n.fin?n.opcode|128:n.opcode,n.rsv1&&(c[0]|=64),c[1]=u,u===126?c.writeUInt16BE(a,2):u===127&&(c[2]=c[3]=0,c.writeUIntBE(a,4,6)),n.mask?(c[1]|=128,c[o-4]=i[0],c[o-3]=i[1],c[o-2]=i[2],c[o-1]=i[3],s?[c,e]:r?(aw(e,i,c,o,a),[c]):(aw(e,i,e,0,a),[c,e])):[c,e]}close(e,n,i,r){let o;if(e===void 0)o=eP;else{if(typeof e!="number"||!nP(e))throw new TypeError("First argument must be a valid error code number");if(n===void 0||!n.length)o=Buffer.allocUnsafe(2),o.writeUInt16BE(e,0);else{let a=Buffer.byteLength(n);if(a>123)throw new RangeError("The message must not be greater than 123 bytes");if(o=Buffer.allocUnsafe(2+a),o.writeUInt16BE(e,0),typeof n=="string")o.write(n,2);else if(QO(n))o.set(n,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let s={[et]:o.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==ct?this.enqueue([this.dispatch,o,!1,s,r]):this.sendFrame(t.frame(o,s),r)}ping(e,n,i){let r,o;if(typeof e=="string"?(r=Buffer.byteLength(e),o=!1):wn(e)?(r=e.size,o=!1):(e=$r(e),r=e.length,o=$r.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");let s={[et]:r,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};wn(e)?this._state!==ct?this.enqueue([this.getBlobData,e,!1,s,i]):this.getBlobData(e,!1,s,i):this._state!==ct?this.enqueue([this.dispatch,e,!1,s,i]):this.sendFrame(t.frame(e,s),i)}pong(e,n,i){let r,o;if(typeof e=="string"?(r=Buffer.byteLength(e),o=!1):wn(e)?(r=e.size,o=!1):(e=$r(e),r=e.length,o=$r.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");let s={[et]:r,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};wn(e)?this._state!==ct?this.enqueue([this.getBlobData,e,!1,s,i]):this.getBlobData(e,!1,s,i):this._state!==ct?this.enqueue([this.dispatch,e,!1,s,i]):this.sendFrame(t.frame(e,s),i)}send(e,n,i){let r=this._extensions[sw.extensionName],o=n.binary?2:1,s=n.compress,a,u;typeof e=="string"?(a=Buffer.byteLength(e),u=!1):wn(e)?(a=e.size,u=!1):(e=$r(e),a=e.length,u=$r.readOnly),this._firstFragment?(this._firstFragment=!1,s&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(s=a>=r._threshold),this._compress=s):(s=!1,o=0),n.fin&&(this._firstFragment=!0);let c={[et]:a,fin:n.fin,generateMask:this._generateMask,mask:n.mask,maskBuffer:this._maskBuffer,opcode:o,readOnly:u,rsv1:s};wn(e)?this._state!==ct?this.enqueue([this.getBlobData,e,this._compress,c,i]):this.getBlobData(e,this._compress,c,i):this._state!==ct?this.enqueue([this.dispatch,e,this._compress,c,i]):this.dispatch(e,this._compress,c,i)}getBlobData(e,n,i,r){this._bufferedBytes+=i[et],this._state=sP,e.arrayBuffer().then(o=>{if(this._socket.destroyed){let a=new Error("The socket was closed while the blob was being read");process.nextTick(fm,this,a,r);return}this._bufferedBytes-=i[et];let s=$r(o);n?this.dispatch(s,n,i,r):(this._state=ct,this.sendFrame(t.frame(s,i),r),this.dequeue())}).catch(o=>{process.nextTick(aP,this,o,r)})}dispatch(e,n,i,r){if(!n){this.sendFrame(t.frame(e,i),r);return}let o=this._extensions[sw.extensionName];this._bufferedBytes+=i[et],this._state=oP,o.compress(e,i.fin,(s,a)=>{if(this._socket.destroyed){let u=new Error("The socket was closed while data was being compressed");fm(this,u,r);return}this._bufferedBytes-=i[et],this._state=ct,i.readOnly=!1,this.sendFrame(t.frame(a,i),r),this.dequeue()})}dequeue(){for(;this._state===ct&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][et],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][et],this._queue.push(e)}sendFrame(e,n){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],n),this._socket.uncork()):this._socket.write(e[0],n)}};uw.exports=dm;function fm(t,e,n){typeof n=="function"&&n(e);for(let i=0;i<t._queue.length;i++){let r=t._queue[i],o=r[r.length-1];typeof o=="function"&&o(e)}}function aP(t,e,n){fm(t,e,n),t.onerror(e)}});var vw=z((s2,gw)=>{"use strict";var{kForOnEventAttribute:Zi,kListener:pm}=kt(),cw=Symbol("kCode"),lw=Symbol("kData"),dw=Symbol("kError"),fw=Symbol("kMessage"),hw=Symbol("kReason"),kn=Symbol("kTarget"),pw=Symbol("kType"),mw=Symbol("kWasClean"),Et=class{constructor(e){this[kn]=null,this[pw]=e}get target(){return this[kn]}get type(){return this[pw]}};Object.defineProperty(Et.prototype,"target",{enumerable:!0});Object.defineProperty(Et.prototype,"type",{enumerable:!0});var wr=class extends Et{constructor(e,n={}){super(e),this[cw]=n.code===void 0?0:n.code,this[hw]=n.reason===void 0?"":n.reason,this[mw]=n.wasClean===void 0?!1:n.wasClean}get code(){return this[cw]}get reason(){return this[hw]}get wasClean(){return this[mw]}};Object.defineProperty(wr.prototype,"code",{enumerable:!0});Object.defineProperty(wr.prototype,"reason",{enumerable:!0});Object.defineProperty(wr.prototype,"wasClean",{enumerable:!0});var In=class extends Et{constructor(e,n={}){super(e),this[dw]=n.error===void 0?null:n.error,this[fw]=n.message===void 0?"":n.message}get error(){return this[dw]}get message(){return this[fw]}};Object.defineProperty(In.prototype,"error",{enumerable:!0});Object.defineProperty(In.prototype,"message",{enumerable:!0});var Bi=class extends Et{constructor(e,n={}){super(e),this[lw]=n.data===void 0?null:n.data}get data(){return this[lw]}};Object.defineProperty(Bi.prototype,"data",{enumerable:!0});var uP={addEventListener(t,e,n={}){for(let r of this.listeners(t))if(!n[Zi]&&r[pm]===e&&!r[Zi])return;let i;if(t==="message")i=function(o,s){let a=new Bi("message",{data:s?o:o.toString()});a[kn]=this,Ca(e,this,a)};else if(t==="close")i=function(o,s){let a=new wr("close",{code:o,reason:s.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});a[kn]=this,Ca(e,this,a)};else if(t==="error")i=function(o){let s=new In("error",{error:o,message:o.message});s[kn]=this,Ca(e,this,s)};else if(t==="open")i=function(){let o=new Et("open");o[kn]=this,Ca(e,this,o)};else return;i[Zi]=!!n[Zi],i[pm]=e,n.once?this.once(t,i):this.on(t,i)},removeEventListener(t,e){for(let n of this.listeners(t))if(n[pm]===e&&!n[Zi]){this.removeListener(t,n);break}}};gw.exports={CloseEvent:wr,ErrorEvent:In,Event:Et,EventTarget:uP,MessageEvent:Bi};function Ca(t,e,n){typeof t=="object"&&t.handleEvent?t.handleEvent.call(t,n):t.call(e,n)}});var Aa=z((a2,yw)=>{"use strict";var{tokenChars:Gi}=xn();function pt(t,e,n){t[e]===void 0?t[e]=[n]:t[e].push(n)}function cP(t){let e=Object.create(null),n=Object.create(null),i=!1,r=!1,o=!1,s,a,u=-1,c=-1,l=-1,d=0;for(;d<t.length;d++)if(c=t.charCodeAt(d),s===void 0)if(l===-1&&Gi[c]===1)u===-1&&(u=d);else if(d!==0&&(c===32||c===9))l===-1&&u!==-1&&(l=d);else if(c===59||c===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${d}`);l===-1&&(l=d);let h=t.slice(u,l);c===44?(pt(e,h,n),n=Object.create(null)):s=h,u=l=-1}else throw new SyntaxError(`Unexpected character at index ${d}`);else if(a===void 0)if(l===-1&&Gi[c]===1)u===-1&&(u=d);else if(c===32||c===9)l===-1&&u!==-1&&(l=d);else if(c===59||c===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${d}`);l===-1&&(l=d),pt(n,t.slice(u,l),!0),c===44&&(pt(e,s,n),n=Object.create(null),s=void 0),u=l=-1}else if(c===61&&u!==-1&&l===-1)a=t.slice(u,d),u=l=-1;else throw new SyntaxError(`Unexpected character at index ${d}`);else if(r){if(Gi[c]!==1)throw new SyntaxError(`Unexpected character at index ${d}`);u===-1?u=d:i||(i=!0),r=!1}else if(o)if(Gi[c]===1)u===-1&&(u=d);else if(c===34&&u!==-1)o=!1,l=d;else if(c===92)r=!0;else throw new SyntaxError(`Unexpected character at index ${d}`);else if(c===34&&t.charCodeAt(d-1)===61)o=!0;else if(l===-1&&Gi[c]===1)u===-1&&(u=d);else if(u!==-1&&(c===32||c===9))l===-1&&(l=d);else if(c===59||c===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${d}`);l===-1&&(l=d);let h=t.slice(u,l);i&&(h=h.replace(/\\/g,""),i=!1),pt(n,a,h),c===44&&(pt(e,s,n),n=Object.create(null),s=void 0),a=void 0,u=l=-1}else throw new SyntaxError(`Unexpected character at index ${d}`);if(u===-1||o||c===32||c===9)throw new SyntaxError("Unexpected end of input");l===-1&&(l=d);let f=t.slice(u,l);return s===void 0?pt(e,f,n):(a===void 0?pt(n,f,!0):i?pt(n,a,f.replace(/\\/g,"")):pt(n,a,f),pt(e,s,n)),e}function lP(t){return Object.keys(t).map(e=>{let n=t[e];return Array.isArray(n)||(n=[n]),n.map(i=>[e].concat(Object.keys(i).map(r=>{let o=i[r];return Array.isArray(o)||(o=[o]),o.map(s=>s===!0?r:`${r}=${s}`).join("; ")})).join("; ")).join(", ")}).join(", ")}yw.exports={format:lP,parse:cP}});var Da=z((l2,Pw)=>{"use strict";var dP=ae("events"),fP=ae("https"),hP=ae("http"),$w=ae("net"),pP=ae("tls"),{randomBytes:mP,createHash:gP}=ae("crypto"),{Duplex:u2,Readable:c2}=ae("stream"),{URL:mm}=ae("url"),Xt=$n(),vP=lm(),yP=hm(),{isBlob:_P}=xn(),{BINARY_TYPES:_w,CLOSE_TIMEOUT:bP,EMPTY_BUFFER:za,GUID:$P,kForOnEventAttribute:gm,kListener:xP,kStatusCode:wP,kWebSocket:ge,NOOP:xw}=kt(),{EventTarget:{addEventListener:SP,removeEventListener:kP}}=vw(),{format:IP,parse:EP}=Aa(),{toBuffer:TP}=Fi(),ww=Symbol("kAborted"),vm=[8,13],Tt=["CONNECTING","OPEN","CLOSING","CLOSED"],OP=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,re=class t extends dP{constructor(e,n,i){super(),this._binaryType=_w[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=za,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=t.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,n===void 0?n=[]:Array.isArray(n)||(typeof n=="object"&&n!==null?(i=n,n=[]):n=[n]),Sw(this,e,n,i)):(this._autoPong=i.autoPong,this._closeTimeout=i.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){_w.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,n,i){let r=new vP({allowSynchronousEvents:i.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:i.maxBufferedChunks,maxFragments:i.maxFragments,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation}),o=new yP(e,this._extensions,i.generateMask);this._receiver=r,this._sender=o,this._socket=e,r[ge]=this,o[ge]=this,e[ge]=this,r.on("conclude",AP),r.on("drain",zP),r.on("error",NP),r.on("message",RP),r.on("ping",DP),r.on("pong",LP),o.onerror=UP,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),n.length>0&&e.unshift(n),e.on("close",Ew),e.on("data",Ra),e.on("end",Tw),e.on("error",Ow),this._readyState=t.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Xt.extensionName]&&this._extensions[Xt.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,n){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){We(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===t.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=t.CLOSING,this._sender.close(e,n,!this._isServer,i=>{i||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),Iw(this)}}pause(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,n,i){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=n=void 0):typeof n=="function"&&(i=n,n=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){ym(this,e,i);return}n===void 0&&(n=!this._isServer),this._sender.ping(e||za,n,i)}pong(e,n,i){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=n=void 0):typeof n=="function"&&(i=n,n=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){ym(this,e,i);return}n===void 0&&(n=!this._isServer),this._sender.pong(e||za,n,i)}resume(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,n,i){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof n=="function"&&(i=n,n={}),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){ym(this,e,i);return}let r={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...n};this._extensions[Xt.extensionName]||(r.compress=!1),this._sender.send(e||za,r,i)}terminate(){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){We(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=t.CLOSING,this._socket.destroy())}}};Object.defineProperty(re,"CONNECTING",{enumerable:!0,value:Tt.indexOf("CONNECTING")});Object.defineProperty(re.prototype,"CONNECTING",{enumerable:!0,value:Tt.indexOf("CONNECTING")});Object.defineProperty(re,"OPEN",{enumerable:!0,value:Tt.indexOf("OPEN")});Object.defineProperty(re.prototype,"OPEN",{enumerable:!0,value:Tt.indexOf("OPEN")});Object.defineProperty(re,"CLOSING",{enumerable:!0,value:Tt.indexOf("CLOSING")});Object.defineProperty(re.prototype,"CLOSING",{enumerable:!0,value:Tt.indexOf("CLOSING")});Object.defineProperty(re,"CLOSED",{enumerable:!0,value:Tt.indexOf("CLOSED")});Object.defineProperty(re.prototype,"CLOSED",{enumerable:!0,value:Tt.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(re.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(re.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[gm])return e[xP];return null},set(e){for(let n of this.listeners(t))if(n[gm]){this.removeListener(t,n);break}typeof e=="function"&&this.addEventListener(t,e,{[gm]:!0})}})});re.prototype.addEventListener=SP;re.prototype.removeEventListener=kP;Pw.exports=re;function Sw(t,e,n,i){let r={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:bP,protocolVersion:vm[1],maxBufferedChunks:1048576,maxFragments:131072,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...i,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=r.autoPong,t._closeTimeout=r.closeTimeout,!vm.includes(r.protocolVersion))throw new RangeError(`Unsupported protocol version: ${r.protocolVersion} (supported versions: ${vm.join(", ")})`);let o;if(e instanceof mm)o=e;else try{o=new mm(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}o.protocol==="http:"?o.protocol="ws:":o.protocol==="https:"&&(o.protocol="wss:"),t._url=o.href;let s=o.protocol==="wss:",a=o.protocol==="ws+unix:",u;if(o.protocol!=="ws:"&&!s&&!a?u=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:a&&!o.pathname?u="The URL's pathname is empty":o.hash&&(u="The URL contains a fragment identifier"),u){let _=new SyntaxError(u);if(t._redirects===0)throw _;Na(t,_);return}let c=s?443:80,l=mP(16).toString("base64"),d=s?fP.request:hP.request,f=new Set,h;if(r.createConnection=r.createConnection||(s?CP:PP),r.defaultPort=r.defaultPort||c,r.port=o.port||c,r.host=o.hostname.startsWith("[")?o.hostname.slice(1,-1):o.hostname,r.headers={...r.headers,"Sec-WebSocket-Version":r.protocolVersion,"Sec-WebSocket-Key":l,Connection:"Upgrade",Upgrade:"websocket"},r.path=o.pathname+o.search,r.timeout=r.handshakeTimeout,r.perMessageDeflate&&(h=new Xt({...r.perMessageDeflate,isServer:!1,maxPayload:r.maxPayload}),r.headers["Sec-WebSocket-Extensions"]=IP({[Xt.extensionName]:h.offer()})),n.length){for(let _ of n){if(typeof _!="string"||!OP.test(_)||f.has(_))throw new SyntaxError("An invalid or duplicated subprotocol was specified");f.add(_)}r.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(r.origin&&(r.protocolVersion<13?r.headers["Sec-WebSocket-Origin"]=r.origin:r.headers.Origin=r.origin),(o.username||o.password)&&(r.auth=`${o.username}:${o.password}`),a){let _=r.path.split(":");r.socketPath=_[0],r.path=_[1]}let p;if(r.followRedirects){if(t._redirects===0){t._originalIpc=a,t._originalSecure=s,t._originalHostOrSocketPath=a?r.socketPath:o.host;let _=i&&i.headers;if(i={...i,headers:{}},_)for(let[S,k]of Object.entries(_))i.headers[S.toLowerCase()]=k}else if(t.listenerCount("redirect")===0){let _=a?t._originalIpc?r.socketPath===t._originalHostOrSocketPath:!1:t._originalIpc?!1:o.host===t._originalHostOrSocketPath;(!_||t._originalSecure&&!s)&&(delete r.headers.authorization,delete r.headers.cookie,_||delete r.headers.host,r.auth=void 0)}r.auth&&!i.headers.authorization&&(i.headers.authorization="Basic "+Buffer.from(r.auth).toString("base64")),p=t._req=d(r),t._redirects&&t.emit("redirect",t.url,p)}else p=t._req=d(r);r.timeout&&p.on("timeout",()=>{We(t,p,"Opening handshake has timed out")}),p.on("error",_=>{p===null||p[ww]||(p=t._req=null,Na(t,_))}),p.on("response",_=>{let S=_.headers.location,k=_.statusCode;if(S&&r.followRedirects&&k>=300&&k<400){if(++t._redirects>r.maxRedirects){We(t,p,"Maximum redirects exceeded");return}p.abort();let C;try{C=new mm(S,e)}catch{let I=new SyntaxError(`Invalid URL: ${S}`);Na(t,I);return}Sw(t,C,n,i)}else t.emit("unexpected-response",p,_)||We(t,p,`Unexpected server response: ${_.statusCode}`)}),p.on("upgrade",(_,S,k)=>{if(t.emit("upgrade",_),t.readyState!==re.CONNECTING)return;p=t._req=null;let C=_.headers.upgrade;if(C===void 0||C.toLowerCase()!=="websocket"){We(t,S,"Invalid Upgrade header");return}let A=gP("sha1").update(l+$P).digest("base64");if(_.headers["sec-websocket-accept"]!==A){We(t,S,"Invalid Sec-WebSocket-Accept header");return}let I=_.headers["sec-websocket-protocol"],T;if(I!==void 0?f.size?f.has(I)||(T="Server sent an invalid subprotocol"):T="Server sent a subprotocol but none was requested":f.size&&(T="Server sent no subprotocol"),T){We(t,S,T);return}I&&(t._protocol=I);let Z=_.headers["sec-websocket-extensions"];if(Z!==void 0){if(!h){We(t,S,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let F;try{F=EP(Z)}catch{We(t,S,"Invalid Sec-WebSocket-Extensions header");return}let W=Object.keys(F);if(W.length!==1||W[0]!==Xt.extensionName){We(t,S,"Server indicated an extension that was not requested");return}try{h.accept(F[Xt.extensionName])}catch{We(t,S,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[Xt.extensionName]=h}t.setSocket(S,k,{allowSynchronousEvents:r.allowSynchronousEvents,generateMask:r.generateMask,maxBufferedChunks:r.maxBufferedChunks,maxFragments:r.maxFragments,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation})}),r.finishRequest?r.finishRequest(p,t):p.end()}function Na(t,e){t._readyState=re.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}function PP(t){return t.path=t.socketPath,$w.connect(t)}function CP(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=$w.isIP(t.host)?"":t.host),pP.connect(t)}function We(t,e,n){t._readyState=re.CLOSING;let i=new Error(n);Error.captureStackTrace(i,We),e.setHeader?(e[ww]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(Na,t,i)):(e.destroy(i),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function ym(t,e,n){if(e){let i=_P(e)?e.size:TP(e).length;t._socket?t._sender._bufferedBytes+=i:t._bufferedAmount+=i}if(n){let i=new Error(`WebSocket is not open: readyState ${t.readyState} (${Tt[t.readyState]})`);process.nextTick(n,i)}}function AP(t,e){let n=this[ge];n._closeFrameReceived=!0,n._closeMessage=e,n._closeCode=t,n._socket[ge]!==void 0&&(n._socket.removeListener("data",Ra),process.nextTick(kw,n._socket),t===1005?n.close():n.close(t,e))}function zP(){let t=this[ge];t.isPaused||t._socket.resume()}function NP(t){let e=this[ge];e._socket[ge]!==void 0&&(e._socket.removeListener("data",Ra),process.nextTick(kw,e._socket),e.close(t[wP])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}function bw(){this[ge].emitClose()}function RP(t,e){this[ge].emit("message",t,e)}function DP(t){let e=this[ge];e._autoPong&&e.pong(t,!this._isServer,xw),e.emit("ping",t)}function LP(t){this[ge].emit("pong",t)}function kw(t){t.resume()}function UP(t){let e=this[ge];e.readyState!==re.CLOSED&&(e.readyState===re.OPEN&&(e._readyState=re.CLOSING,Iw(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}function Iw(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),t._closeTimeout)}function Ew(){let t=this[ge];if(this.removeListener("close",Ew),this.removeListener("data",Ra),this.removeListener("end",Tw),t._readyState=re.CLOSING,!this._readableState.endEmitted&&!t._closeFrameReceived&&!t._receiver._writableState.errorEmitted&&this._readableState.length!==0){let e=this.read(this._readableState.length);t._receiver.write(e)}t._receiver.end(),this[ge]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",bw),t._receiver.on("finish",bw))}function Ra(t){this[ge]._receiver.write(t)||this.pause()}function Tw(){let t=this[ge];t._readyState=re.CLOSING,t._receiver.end(),this.end()}function Ow(){let t=this[ge];this.removeListener("error",Ow),this.on("error",xw),t&&(t._readyState=re.CLOSING,this.destroy())}});var Nw=z((f2,zw)=>{"use strict";var d2=Da(),{Duplex:jP}=ae("stream");function Cw(t){t.emit("close")}function MP(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Aw(t){this.removeListener("error",Aw),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}function FP(t,e){let n=!0,i=new jP({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",function(o,s){let a=!s&&i._readableState.objectMode?o.toString():o;i.push(a)||t.pause()}),t.once("error",function(o){i.destroyed||(n=!1,i.destroy(o))}),t.once("close",function(){i.destroyed||i.push(null)}),i._destroy=function(r,o){if(t.readyState===t.CLOSED){o(r),process.nextTick(Cw,i);return}let s=!1;t.once("error",function(u){s=!0,o(u)}),t.once("close",function(){s||o(r),process.nextTick(Cw,i)}),n&&t.terminate()},i._final=function(r){if(t.readyState===t.CONNECTING){t.once("open",function(){i._final(r)});return}t._socket!==null&&(t._socket._writableState.finished?(r(),i._readableState.endEmitted&&i.destroy()):(t._socket.once("finish",function(){r()}),t.close()))},i._read=function(){t.isPaused&&t.resume()},i._write=function(r,o,s){if(t.readyState===t.CONNECTING){t.once("open",function(){i._write(r,o,s)});return}t.send(r,s)},i.on("end",MP),i.on("error",Aw),i}zw.exports=FP});var _m=z((h2,Rw)=>{"use strict";var{tokenChars:VP}=xn();function ZP(t){let e=new Set,n=-1,i=-1,r=0;for(r;r<t.length;r++){let s=t.charCodeAt(r);if(i===-1&&VP[s]===1)n===-1&&(n=r);else if(r!==0&&(s===32||s===9))i===-1&&n!==-1&&(i=r);else if(s===44){if(n===-1)throw new SyntaxError(`Unexpected character at index ${r}`);i===-1&&(i=r);let a=t.slice(n,i);if(e.has(a))throw new SyntaxError(`The "${a}" subprotocol is duplicated`);e.add(a),n=i=-1}else throw new SyntaxError(`Unexpected character at index ${r}`)}if(n===-1||i!==-1)throw new SyntaxError("Unexpected end of input");let o=t.slice(n,r);if(e.has(o))throw new SyntaxError(`The "${o}" subprotocol is duplicated`);return e.add(o),e}Rw.exports={parse:ZP}});var Vw=z((m2,Fw)=>{"use strict";var BP=ae("events"),La=ae("http"),{Duplex:p2}=ae("stream"),{createHash:GP}=ae("crypto"),Dw=Aa(),Sr=$n(),WP=_m(),qP=Da(),{CLOSE_TIMEOUT:HP,GUID:JP,kWebSocket:KP}=kt(),YP=/^[+/0-9A-Za-z]{22}==$/,Lw=0,Uw=1,Mw=2,bm=class extends BP{constructor(e,n){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:1024*1024,maxFragments:128*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:HP,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:qP,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=La.createServer((i,r)=>{let o=La.STATUS_CODES[426];r.writeHead(426,{"Content-Length":o.length,"Content-Type":"text/plain"}),r.end(o)}),this._server.listen(e.port,e.host,e.backlog,n)):e.server&&(this._server=e.server),this._server){let i=this.emit.bind(this,"connection");this._removeListeners=XP(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(r,o,s)=>{this.handleUpgrade(r,o,s,i)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=Lw}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===Mw){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(Wi,this);return}if(e&&this.once("close",e),this._state!==Uw)if(this._state=Uw,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(Wi,this):process.nextTick(Wi,this);else{let n=this._server;this._removeListeners(),this._removeListeners=this._server=null,n.close(()=>{Wi(this)})}}shouldHandle(e){if(this.options.path){let n=e.url.indexOf("?");if((n!==-1?e.url.slice(0,n):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,n,i,r){n.on("error",jw);let o=e.headers["sec-websocket-key"],s=e.headers.upgrade,a=+e.headers["sec-websocket-version"];if(e.method!=="GET"){kr(this,e,n,405,"Invalid HTTP method");return}if(s===void 0||s.toLowerCase()!=="websocket"){kr(this,e,n,400,"Invalid Upgrade header");return}if(o===void 0||!YP.test(o)){kr(this,e,n,400,"Missing or invalid Sec-WebSocket-Key header");return}if(a!==13&&a!==8){kr(this,e,n,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(e)){qi(n,400);return}let u=e.headers["sec-websocket-protocol"],c=new Set;if(u!==void 0)try{c=WP.parse(u)}catch{kr(this,e,n,400,"Invalid Sec-WebSocket-Protocol header");return}let l=e.headers["sec-websocket-extensions"],d={};if(this.options.perMessageDeflate&&l!==void 0){let f=new Sr({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let h=Dw.parse(l);h[Sr.extensionName]&&(f.accept(h[Sr.extensionName]),d[Sr.extensionName]=f)}catch{kr(this,e,n,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let f={origin:e.headers[`${a===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(f,(h,p,_,S)=>{if(!h)return qi(n,p||401,_,S);this.completeUpgrade(d,o,c,e,n,i,r)});return}if(!this.options.verifyClient(f))return qi(n,401)}this.completeUpgrade(d,o,c,e,n,i,r)}completeUpgrade(e,n,i,r,o,s,a){if(!o.readable||!o.writable)return o.destroy();if(o[KP])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>Lw)return qi(o,503);let c=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${GP("sha1").update(n+JP).digest("base64")}`],l=new this.options.WebSocket(null,void 0,this.options);if(i.size){let d=this.options.handleProtocols?this.options.handleProtocols(i,r):i.values().next().value;d&&(c.push(`Sec-WebSocket-Protocol: ${d}`),l._protocol=d)}if(e[Sr.extensionName]){let d=e[Sr.extensionName].params,f=Dw.format({[Sr.extensionName]:[d]});c.push(`Sec-WebSocket-Extensions: ${f}`),l._extensions=e}this.emit("headers",c,r),o.write(c.concat(`\r
72
114
  `).join(`\r
73
- `)),o.removeListener("error",Pw),l.setSocket(o,s,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(l),l.on("close",()=>{this.clients.delete(l),this._shouldEmitClose&&!this.clients.size&&process.nextTick(Bi,this)})),a(l,r)}};Aw.exports=gm;function AP(t,e){for(let n of Object.keys(e))t.on(n,e[n]);return function(){for(let i of Object.keys(e))t.removeListener(i,e[i])}}function Bi(t){t._state=Cw,t.emit("close")}function Pw(){this.destroy()}function Gi(t,e,n,i){n=n||Na.STATUS_CODES[e],i={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(n),...i},t.once("finish",t.destroy),t.end(`HTTP/1.1 ${e} ${Na.STATUS_CODES[e]}\r
115
+ `)),o.removeListener("error",jw),l.setSocket(o,s,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(l),l.on("close",()=>{this.clients.delete(l),this._shouldEmitClose&&!this.clients.size&&process.nextTick(Wi,this)})),a(l,r)}};Fw.exports=bm;function XP(t,e){for(let n of Object.keys(e))t.on(n,e[n]);return function(){for(let i of Object.keys(e))t.removeListener(i,e[i])}}function Wi(t){t._state=Mw,t.emit("close")}function jw(){this.destroy()}function qi(t,e,n,i){n=n||La.STATUS_CODES[e],i={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(n),...i},t.once("finish",t.destroy),t.end(`HTTP/1.1 ${e} ${La.STATUS_CODES[e]}\r
74
116
  `+Object.keys(i).map(r=>`${r}: ${i[r]}`).join(`\r
75
117
  `)+`\r
76
118
  \r
77
- `+n)}function wr(t,e,n,i,r,o){if(t.listenerCount("wsClientError")){let s=new Error(r);Error.captureStackTrace(s,wr),t.emit("wsClientError",s,n,e)}else Gi(n,i,r,o)}});var zP,NP,RP,DP,LP,jP,vm,UP,Nw=v(()=>{zP=He(kw(),1),NP=He(Oa(),1),RP=He($n(),1),DP=He(sm(),1),LP=He(cm(),1),jP=He(mm(),1),vm=He(za(),1),UP=He(zw(),1)});function MP(t){return Array.isArray(t)?Buffer.concat(t).toString("utf8"):Buffer.isBuffer(t)?t.toString("utf8"):Buffer.from(t).toString("utf8")}var ym,_m=v(()=>{"use strict";Nw();ym=(t,e)=>{let n=new vm.default(t,{headers:e});return{send:i=>n.send(i),close:()=>n.close(),onOpen:i=>{n.on("open",i)},onMessage:i=>{n.on("message",r=>i(MP(r)))},onError:i=>{n.on("error",i)},onClose:i=>{n.on("close",()=>i())}}}});var Wi,$m=v(()=>{"use strict";qh();Jh();_m();Wi=class{socketFactory;constructor(e=ym){this.socketFactory=e}asrEngine(e,n){if(e.provider==="elevenlabs")return new Li(n,this.socketFactory,e.model);throw new Error(`no stt adapter for provider '${e.provider}'`)}ttsEngine(e,n){if(e.provider==="elevenlabs")return new ji(n,this.socketFactory,e.model);throw new Error(`no tts adapter for provider '${e.provider}'`)}}});import{randomUUID as FP}from"node:crypto";function xm(t={}){let e=new fr;q.setLevel(e.logLevel),q.debug("core created",{logLevel:e.logLevel});let n={configService:t.configService??new Be,registry:t.registry??new _i(t.fetchImpl),voiceRegistry:t.voiceRegistry??new Wi(t.voiceSocketFactory),...t.systemPrompt!==void 0&&{systemPrompt:t.systemPrompt},...t.voiceIdentity!==void 0&&{voiceIdentity:t.voiceIdentity},...t.createTurnController!==void 0&&{createTurnController:t.createTurnController},...t.createSmartTurnInference!==void 0&&{createSmartTurnInference:t.createSmartTurnInference},...t.createFrameClassifier!==void 0&&{createFrameClassifier:t.createFrameClassifier},...t.createSegmenter!==void 0&&{createSegmenter:t.createSegmenter},...t.clock!==void 0&&{clock:t.clock}};return new bm(n)}var VP,ZP,bm,Rw=v(()=>{"use strict";De();Gp();Wp();Kp();Ix();$m();VP="jarvis-core",ZP="0.1.0-dev",bm=class{deps;constructor(e){this.deps=e}describe(){return Promise.resolve({name:VP,version:ZP})}openSession(e){let n=FP();return q.debug("core opened session",{sessionId:n,capabilities:e.clientCapabilities}),Promise.resolve(new va(n,e,this.deps))}}});function Ra(t){return t>=200&&t<300?{ok:!0,status:"valid"}:t===401||t===403?{ok:!1,status:"invalid",detail:`key rejected (HTTP ${t})`}:{ok:!1,status:"unreachable",detail:`unexpected response (HTTP ${t})`}}function BP(t){return t instanceof Error?t.name==="TimeoutError"||t.name==="AbortError"?"request timed out":t.message:"network error"}var GP,WP,qP,HP,JP,In,Dw=v(()=>{"use strict";GP=async(t,e,n)=>{let i=await e("https://api.openai.com/v1/models",{headers:{Authorization:`Bearer ${t}`},signal:n});return Ra(i.status)},WP=async(t,e,n)=>{let i=await e("https://api.anthropic.com/v1/models",{headers:{"x-api-key":t,"anthropic-version":"2023-06-01"},signal:n});return Ra(i.status)},qP=async(t,e,n)=>{let i=await e("https://api.deepgram.com/v1/projects",{headers:{Authorization:`Token ${t}`},signal:n});return Ra(i.status)},HP=async(t,e,n)=>{let i=await e("https://api.elevenlabs.io/v1/user",{headers:{"xi-api-key":t},signal:n});return i.status===401||i.status===403?{ok:!1,status:"unverifiable",detail:"an ElevenLabs key scoped to the voice endpoints cannot reach a free validation endpoint; it will be confirmed at first use"}:Ra(i.status)},JP={elevenlabs:{capabilities:["stt","tts"],defaultModel:{stt:"scribe_v2_realtime",tts:"eleven_flash_v2_5"},keyEnv:"ELEVENLABS_API_KEY",probe:HP},anthropic:{capabilities:["text"],defaultModel:{text:"claude-opus-4-8"},keyEnv:"ANTHROPIC_API_KEY",probe:WP},openai:{capabilities:["text","stt","tts","embedding"],defaultModel:{text:"gpt-4o",stt:"whisper-1",tts:"tts-1",embedding:"text-embedding-3-small"},keyEnv:"OPENAI_API_KEY",probe:GP},deepgram:{capabilities:["stt"],defaultModel:{stt:"nova-2"},keyEnv:"DEEPGRAM_API_KEY",probe:qP}},In=class{fetchImpl;timeoutMs=3e3;providers;constructor(e=fetch){this.fetchImpl=e,this.providers=JP}async probe(e,n,i){let r=this.providers[e]?.probe;if(!r)return{ok:!1,status:"unimplemented",detail:`no probe for provider '${e}'`};let o=i?.signal??AbortSignal.timeout(this.timeoutMs);try{return await r(n,this.fetchImpl,o)}catch(s){return{ok:!1,status:"unreachable",detail:BP(s)}}}providersFor(e){return Object.keys(this.providers).filter(n=>this.providers[n].capabilities.includes(e))}defaultModel(e,n){return this.providers[e]?.defaultModel[n]}}});var Da=v(()=>{"use strict";Rw();Wp();Dw();Kp();Jp();Yp();Hp();qp();_m();qh();Jh();$m();Vh();Dh();Lh();Mh();Ii();Ch();Ph();pa();Uh();Xp();Qp()});var On=z((uM,Fw)=>{"use strict";var oC="2.0.0",sC=Number.MAX_SAFE_INTEGER||9007199254740991,aC=16,uC=250,cC=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Fw.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:aC,MAX_SAFE_BUILD_LENGTH:uC,MAX_SAFE_INTEGER:sC,RELEASE_TYPES:cC,SEMVER_SPEC_VERSION:oC,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Ji=z((cM,Vw)=>{"use strict";var lC=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Vw.exports=lC});var Pn=z((gt,Zw)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:km,MAX_SAFE_BUILD_LENGTH:dC,MAX_LENGTH:fC}=On(),pC=Ji();gt=Zw.exports={};var hC=gt.re=[],mC=gt.safeRe=[],O=gt.src=[],gC=gt.safeSrc=[],P=gt.t={},vC=0,Im="[a-zA-Z0-9-]",yC=[["\\s",1],["\\d",fC],[Im,dC]],_C=t=>{for(let[e,n]of yC)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t},j=(t,e,n)=>{let i=_C(e),r=vC++;pC(t,r,e),P[t]=r,O[r]=e,gC[r]=i,hC[r]=new RegExp(e,n?"g":void 0),mC[r]=new RegExp(i,n?"g":void 0)};j("NUMERICIDENTIFIER","0|[1-9]\\d*");j("NUMERICIDENTIFIERLOOSE","\\d+");j("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Im}*`);j("MAINVERSION",`(${O[P.NUMERICIDENTIFIER]})\\.(${O[P.NUMERICIDENTIFIER]})\\.(${O[P.NUMERICIDENTIFIER]})`);j("MAINVERSIONLOOSE",`(${O[P.NUMERICIDENTIFIERLOOSE]})\\.(${O[P.NUMERICIDENTIFIERLOOSE]})\\.(${O[P.NUMERICIDENTIFIERLOOSE]})`);j("PRERELEASEIDENTIFIER",`(?:${O[P.NONNUMERICIDENTIFIER]}|${O[P.NUMERICIDENTIFIER]})`);j("PRERELEASEIDENTIFIERLOOSE",`(?:${O[P.NONNUMERICIDENTIFIER]}|${O[P.NUMERICIDENTIFIERLOOSE]})`);j("PRERELEASE",`(?:-(${O[P.PRERELEASEIDENTIFIER]}(?:\\.${O[P.PRERELEASEIDENTIFIER]})*))`);j("PRERELEASELOOSE",`(?:-?(${O[P.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${O[P.PRERELEASEIDENTIFIERLOOSE]})*))`);j("BUILDIDENTIFIER",`${Im}+`);j("BUILD",`(?:\\+(${O[P.BUILDIDENTIFIER]}(?:\\.${O[P.BUILDIDENTIFIER]})*))`);j("FULLPLAIN",`v?${O[P.MAINVERSION]}${O[P.PRERELEASE]}?${O[P.BUILD]}?`);j("FULL",`^${O[P.FULLPLAIN]}$`);j("LOOSEPLAIN",`[v=\\s]*${O[P.MAINVERSIONLOOSE]}${O[P.PRERELEASELOOSE]}?${O[P.BUILD]}?`);j("LOOSE",`^${O[P.LOOSEPLAIN]}$`);j("GTLT","((?:<|>)?=?)");j("XRANGEIDENTIFIERLOOSE",`${O[P.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);j("XRANGEIDENTIFIER",`${O[P.NUMERICIDENTIFIER]}|x|X|\\*`);j("XRANGEPLAIN",`[v=\\s]*(${O[P.XRANGEIDENTIFIER]})(?:\\.(${O[P.XRANGEIDENTIFIER]})(?:\\.(${O[P.XRANGEIDENTIFIER]})(?:${O[P.PRERELEASE]})?${O[P.BUILD]}?)?)?`);j("XRANGEPLAINLOOSE",`[v=\\s]*(${O[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${O[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${O[P.XRANGEIDENTIFIERLOOSE]})(?:${O[P.PRERELEASELOOSE]})?${O[P.BUILD]}?)?)?`);j("XRANGE",`^${O[P.GTLT]}\\s*${O[P.XRANGEPLAIN]}$`);j("XRANGELOOSE",`^${O[P.GTLT]}\\s*${O[P.XRANGEPLAINLOOSE]}$`);j("COERCEPLAIN",`(^|[^\\d])(\\d{1,${km}})(?:\\.(\\d{1,${km}}))?(?:\\.(\\d{1,${km}}))?`);j("COERCE",`${O[P.COERCEPLAIN]}(?:$|[^\\d])`);j("COERCEFULL",O[P.COERCEPLAIN]+`(?:${O[P.PRERELEASE]})?(?:${O[P.BUILD]})?(?:$|[^\\d])`);j("COERCERTL",O[P.COERCE],!0);j("COERCERTLFULL",O[P.COERCEFULL],!0);j("LONETILDE","(?:~>?)");j("TILDETRIM",`(\\s*)${O[P.LONETILDE]}\\s+`,!0);gt.tildeTrimReplace="$1~";j("TILDE",`^${O[P.LONETILDE]}${O[P.XRANGEPLAIN]}$`);j("TILDELOOSE",`^${O[P.LONETILDE]}${O[P.XRANGEPLAINLOOSE]}$`);j("LONECARET","(?:\\^)");j("CARETTRIM",`(\\s*)${O[P.LONECARET]}\\s+`,!0);gt.caretTrimReplace="$1^";j("CARET",`^${O[P.LONECARET]}${O[P.XRANGEPLAIN]}$`);j("CARETLOOSE",`^${O[P.LONECARET]}${O[P.XRANGEPLAINLOOSE]}$`);j("COMPARATORLOOSE",`^${O[P.GTLT]}\\s*(${O[P.LOOSEPLAIN]})$|^$`);j("COMPARATOR",`^${O[P.GTLT]}\\s*(${O[P.FULLPLAIN]})$|^$`);j("COMPARATORTRIM",`(\\s*)${O[P.GTLT]}\\s*(${O[P.LOOSEPLAIN]}|${O[P.XRANGEPLAIN]})`,!0);gt.comparatorTrimReplace="$1$2$3";j("HYPHENRANGE",`^\\s*(${O[P.XRANGEPLAIN]})\\s+-\\s+(${O[P.XRANGEPLAIN]})\\s*$`);j("HYPHENRANGELOOSE",`^\\s*(${O[P.XRANGEPLAINLOOSE]})\\s+-\\s+(${O[P.XRANGEPLAINLOOSE]})\\s*$`);j("STAR","(<|>)?=?\\s*\\*");j("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");j("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Fa=z((lM,Bw)=>{"use strict";var $C=Object.freeze({loose:!0}),bC=Object.freeze({}),xC=t=>t?typeof t!="object"?$C:t:bC;Bw.exports=xC});var Em=z((dM,qw)=>{"use strict";var Gw=/^[0-9]+$/,Ww=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let n=Gw.test(t),i=Gw.test(e);return n&&i&&(t=+t,e=+e),t===e?0:n&&!i?-1:i&&!n?1:t<e?-1:1},wC=(t,e)=>Ww(e,t);qw.exports={compareIdentifiers:Ww,rcompareIdentifiers:wC}});var _e=z((fM,Jw)=>{"use strict";var Va=Ji(),{MAX_LENGTH:Hw,MAX_SAFE_INTEGER:Za}=On(),{safeRe:Ba,t:Ga}=Pn(),SC=Fa(),{compareIdentifiers:Tm}=Em(),kC=(t,e)=>{let n=e.split(".");if(n.length>t.length)return!1;for(let i=0;i<n.length;i++)if(Tm(t[i],n[i])!==0)return!1;return!0},Om=class t{constructor(e,n){if(n=SC(n),e instanceof t){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Hw)throw new TypeError(`version is longer than ${Hw} characters`);Va("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let i=e.trim().match(n.loose?Ba[Ga.LOOSE]:Ba[Ga.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>Za||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Za||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Za||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(r=>{if(/^[0-9]+$/.test(r)){let o=+r;if(o>=0&&o<Za)return o}return r}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Va("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{let i=this.prerelease[n],r=e.prerelease[n];if(Va("prerelease compare",n,i,r),i===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(i===void 0)return-1;if(i===r)continue;return Tm(i,r)}while(++n)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let n=0;do{let i=this.build[n],r=e.build[n];if(Va("build compare",n,i,r),i===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(i===void 0)return-1;if(i===r)continue;return Tm(i,r)}while(++n)}inc(e,n,i){if(e.startsWith("pre")){if(!n&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(n){let r=`-${n}`.match(this.options.loose?Ba[Ga.PRERELEASELOOSE]:Ba[Ga.PRERELEASE]);if(!r||r[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,i),this.inc("pre",n,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,i),this.inc("pre",n,i);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let r=Number(i)?1:0;if(this.prerelease.length===0)this.prerelease=[r];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(n===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(n){let o=[n,r];if(i===!1&&(o=[n]),kC(this.prerelease,n)){let s=this.prerelease[n.split(".").length];isNaN(s)&&(this.prerelease=o)}else this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Jw.exports=Om});var Xt=z((pM,Yw)=>{"use strict";var Kw=_e(),IC=(t,e,n=!1)=>{if(t instanceof Kw)return t;try{return new Kw(t,e)}catch(i){if(!n)return null;throw i}};Yw.exports=IC});var Qw=z((hM,Xw)=>{"use strict";var EC=Xt(),TC=(t,e)=>{let n=EC(t,e);return n?n.version:null};Xw.exports=TC});var tS=z((mM,eS)=>{"use strict";var OC=Xt(),PC=(t,e)=>{let n=OC(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};eS.exports=PC});var iS=z((gM,nS)=>{"use strict";var rS=_e(),CC=(t,e,n,i,r)=>{typeof n=="string"&&(r=i,i=n,n=void 0);try{return new rS(t instanceof rS?t.version:t,n).inc(e,i,r).version}catch{return null}};nS.exports=CC});var aS=z((vM,sS)=>{"use strict";var oS=Xt(),AC=(t,e)=>{let n=oS(t,null,!0),i=oS(e,null,!0),r=n.compare(i);if(r===0)return null;let o=r>0,s=o?n:i,a=o?i:n,u=!!s.prerelease.length;if(!!a.prerelease.length&&!u){if(!a.patch&&!a.minor)return"major";if(a.compareMain(s)===0)return a.minor&&!a.patch?"minor":"patch"}let l=u?"pre":"";return n.major!==i.major?l+"major":n.minor!==i.minor?l+"minor":n.patch!==i.patch?l+"patch":"prerelease"};sS.exports=AC});var cS=z((yM,uS)=>{"use strict";var zC=_e(),NC=(t,e)=>new zC(t,e).major;uS.exports=NC});var dS=z((_M,lS)=>{"use strict";var RC=_e(),DC=(t,e)=>new RC(t,e).minor;lS.exports=DC});var pS=z(($M,fS)=>{"use strict";var LC=_e(),jC=(t,e)=>new LC(t,e).patch;fS.exports=jC});var mS=z((bM,hS)=>{"use strict";var UC=Xt(),MC=(t,e)=>{let n=UC(t,e);return n&&n.prerelease.length?n.prerelease:null};hS.exports=MC});var tt=z((xM,vS)=>{"use strict";var gS=_e(),FC=(t,e,n)=>new gS(t,n).compare(new gS(e,n));vS.exports=FC});var _S=z((wM,yS)=>{"use strict";var VC=tt(),ZC=(t,e,n)=>VC(e,t,n);yS.exports=ZC});var bS=z((SM,$S)=>{"use strict";var BC=tt(),GC=(t,e)=>BC(t,e,!0);$S.exports=GC});var Wa=z((kM,wS)=>{"use strict";var xS=_e(),WC=(t,e,n)=>{let i=new xS(t,n),r=new xS(e,n);return i.compare(r)||i.compareBuild(r)};wS.exports=WC});var kS=z((IM,SS)=>{"use strict";var qC=Wa(),HC=(t,e)=>t.sort((n,i)=>qC(n,i,e));SS.exports=HC});var ES=z((EM,IS)=>{"use strict";var JC=Wa(),KC=(t,e)=>t.sort((n,i)=>JC(i,n,e));IS.exports=KC});var Ki=z((TM,TS)=>{"use strict";var YC=tt(),XC=(t,e,n)=>YC(t,e,n)>0;TS.exports=XC});var qa=z((OM,OS)=>{"use strict";var QC=tt(),eA=(t,e,n)=>QC(t,e,n)<0;OS.exports=eA});var Pm=z((PM,PS)=>{"use strict";var tA=tt(),rA=(t,e,n)=>tA(t,e,n)===0;PS.exports=rA});var Cm=z((CM,CS)=>{"use strict";var nA=tt(),iA=(t,e,n)=>nA(t,e,n)!==0;CS.exports=iA});var Ha=z((AM,AS)=>{"use strict";var oA=tt(),sA=(t,e,n)=>oA(t,e,n)>=0;AS.exports=sA});var Ja=z((zM,zS)=>{"use strict";var aA=tt(),uA=(t,e,n)=>aA(t,e,n)<=0;zS.exports=uA});var Am=z((NM,NS)=>{"use strict";var cA=Pm(),lA=Cm(),dA=Ki(),fA=Ha(),pA=qa(),hA=Ja(),mA=(t,e,n,i)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return cA(t,n,i);case"!=":return lA(t,n,i);case">":return dA(t,n,i);case">=":return fA(t,n,i);case"<":return pA(t,n,i);case"<=":return hA(t,n,i);default:throw new TypeError(`Invalid operator: ${e}`)}};NS.exports=mA});var DS=z((RM,RS)=>{"use strict";var gA=_e(),vA=Xt(),{safeRe:Ka,t:Ya}=Pn(),yA=(t,e)=>{if(t instanceof gA)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(e.includePrerelease?Ka[Ya.COERCEFULL]:Ka[Ya.COERCE]);else{let u=e.includePrerelease?Ka[Ya.COERCERTLFULL]:Ka[Ya.COERCERTL],c;for(;(c=u.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||c.index+c[0].length!==n.index+n[0].length)&&(n=c),u.lastIndex=c.index+c[1].length+c[2].length;u.lastIndex=-1}if(n===null)return null;let i=n[2],r=n[3]||"0",o=n[4]||"0",s=e.includePrerelease&&n[5]?`-${n[5]}`:"",a=e.includePrerelease&&n[6]?`+${n[6]}`:"";return vA(`${i}.${r}.${o}${s}${a}`,e)};RS.exports=yA});var jS=z((DM,LS)=>{"use strict";var _A=Xt(),$A=On(),bA=_e(),xA=(t,e,n)=>{if(!$A.RELEASE_TYPES.includes(e))return null;let i=wA(t,n);return i&&SA(i,e)},wA=(t,e)=>{let n=t instanceof bA?t.version:t;return _A(n,e)},SA=(t,e)=>{if(kA(e))return t.version;switch(t.prerelease=[],e){case"major":t.minor=0,t.patch=0;break;case"minor":t.patch=0;break}return t.format()},kA=t=>t.startsWith("pre");LS.exports=xA});var MS=z((LM,US)=>{"use strict";var zm=class{constructor(){this.max=1e3,this.map=new Map}get(e){let n=this.map.get(e);if(n!==void 0)return this.map.delete(e),this.map.set(e,n),n}delete(e){return this.map.delete(e)}set(e,n){if(!this.delete(e)&&n!==void 0){if(this.map.size>=this.max){let r=this.map.keys().next().value;this.delete(r)}this.map.set(e,n)}return this}};US.exports=zm});var rt=z((jM,BS)=>{"use strict";var IA=/\s+/g,Nm=class t{constructor(e,n){if(n=TA(n),e instanceof t)return e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease?e:new t(e.raw,n);if(e instanceof Rm)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=e.trim().replace(IA," "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(r=>!VS(r[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let r of this.set)if(r.length===1&&LA(r[0])){this.set=[r];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let n=this.set[e];for(let i=0;i<n.length;i++)i>0&&(this.formatted+=" "),this.formatted+=n[i].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(DA,"");let i=((this.options.includePrerelease&&NA)|(this.options.loose&&RA))+":"+e,r=FS.get(i);if(r)return r;let o=this.options.loose,s=o?Pe[$e.HYPHENRANGELOOSE]:Pe[$e.HYPHENRANGE];e=e.replace(s,qA(this.options.includePrerelease)),te("hyphen replace",e),e=e.replace(Pe[$e.COMPARATORTRIM],CA),te("comparator trim",e),e=e.replace(Pe[$e.TILDETRIM],AA),te("tilde trim",e),e=e.replace(Pe[$e.CARETTRIM],zA),te("caret trim",e);let a=e.split(" ").map(d=>jA(d,this.options)).join(" ").split(/\s+/).map(d=>WA(d,this.options));o&&(a=a.filter(d=>(te("loose invalid filter",d,this.options),!!d.match(Pe[$e.COMPARATORLOOSE])))),te("range list",a);let u=new Map,c=a.map(d=>new Rm(d,this.options));for(let d of c){if(VS(d))return[d];u.set(d.value,d)}u.size>1&&u.has("")&&u.delete("");let l=[...u.values()];return FS.set(i,l),l}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(i=>ZS(i,n)&&e.set.some(r=>ZS(r,n)&&i.every(o=>r.every(s=>o.intersects(s,n)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new OA(e,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(HA(this.set[n],e,this.options))return!0;return!1}};BS.exports=Nm;var EA=MS(),FS=new EA,TA=Fa(),Rm=Yi(),te=Ji(),OA=_e(),{safeRe:Pe,src:PA,t:$e,comparatorTrimReplace:CA,tildeTrimReplace:AA,caretTrimReplace:zA}=Pn(),{FLAG_INCLUDE_PRERELEASE:NA,FLAG_LOOSE:RA}=On(),DA=new RegExp(PA[$e.BUILD],"g"),VS=t=>t.value==="<0.0.0-0",LA=t=>t.value==="",ZS=(t,e)=>{let n=!0,i=t.slice(),r=i.pop();for(;n&&i.length;)n=i.every(o=>r.intersects(o,e)),r=i.pop();return n},jA=(t,e)=>(t=t.replace(Pe[$e.BUILD],""),te("comp",t,e),t=FA(t,e),te("caret",t),t=UA(t,e),te("tildes",t),t=ZA(t,e),te("xrange",t),t=GA(t,e),te("stars",t),t),Ce=t=>!t||t.toLowerCase()==="x"||t==="*",UA=(t,e)=>t.trim().split(/\s+/).map(n=>MA(n,e)).join(" "),MA=(t,e)=>{let n=e.loose?Pe[$e.TILDELOOSE]:Pe[$e.TILDE];return t.replace(n,(i,r,o,s,a)=>{te("tilde",t,i,r,o,s,a);let u;return Ce(r)?u="":Ce(o)?u=`>=${r}.0.0 <${+r+1}.0.0-0`:Ce(s)?u=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?(te("replaceTilde pr",a),u=`>=${r}.${o}.${s}-${a} <${r}.${+o+1}.0-0`):u=`>=${r}.${o}.${s} <${r}.${+o+1}.0-0`,te("tilde return",u),u})},FA=(t,e)=>t.trim().split(/\s+/).map(n=>VA(n,e)).join(" "),VA=(t,e)=>{te("caret",t,e);let n=e.loose?Pe[$e.CARETLOOSE]:Pe[$e.CARET],i=e.includePrerelease?"-0":"";return t.replace(n,(r,o,s,a,u)=>{te("caret",t,r,o,s,a,u);let c;return Ce(o)?c="":Ce(s)?c=`>=${o}.0.0${i} <${+o+1}.0.0-0`:Ce(a)?o==="0"?c=`>=${o}.${s}.0${i} <${o}.${+s+1}.0-0`:c=`>=${o}.${s}.0${i} <${+o+1}.0.0-0`:u?(te("replaceCaret pr",u),o==="0"?s==="0"?c=`>=${o}.${s}.${a}-${u} <${o}.${s}.${+a+1}-0`:c=`>=${o}.${s}.${a}-${u} <${o}.${+s+1}.0-0`:c=`>=${o}.${s}.${a}-${u} <${+o+1}.0.0-0`):(te("no pr"),o==="0"?s==="0"?c=`>=${o}.${s}.${a}${i} <${o}.${s}.${+a+1}-0`:c=`>=${o}.${s}.${a}${i} <${o}.${+s+1}.0-0`:c=`>=${o}.${s}.${a} <${+o+1}.0.0-0`),te("caret return",c),c})},ZA=(t,e)=>(te("replaceXRanges",t,e),t.split(/\s+/).map(n=>BA(n,e)).join(" ")),BA=(t,e)=>{t=t.trim();let n=e.loose?Pe[$e.XRANGELOOSE]:Pe[$e.XRANGE];return t.replace(n,(i,r,o,s,a,u)=>{te("xRange",t,i,r,o,s,a,u);let c=Ce(o),l=c||Ce(s),d=l||Ce(a),f=d;return r==="="&&f&&(r=""),u=e.includePrerelease?"-0":"",c?r===">"||r==="<"?i="<0.0.0-0":i="*":r&&f?(l&&(s=0),a=0,r===">"?(r=">=",l?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):r==="<="&&(r="<",l?o=+o+1:s=+s+1),r==="<"&&(u="-0"),i=`${r+o}.${s}.${a}${u}`):l?i=`>=${o}.0.0${u} <${+o+1}.0.0-0`:d&&(i=`>=${o}.${s}.0${u} <${o}.${+s+1}.0-0`),te("xRange return",i),i})},GA=(t,e)=>(te("replaceStars",t,e),t.trim().replace(Pe[$e.STAR],"")),WA=(t,e)=>(te("replaceGTE0",t,e),t.trim().replace(Pe[e.includePrerelease?$e.GTE0PRE:$e.GTE0],"")),qA=t=>(e,n,i,r,o,s,a,u,c,l,d,f)=>(Ce(i)?n="":Ce(r)?n=`>=${i}.0.0${t?"-0":""}`:Ce(o)?n=`>=${i}.${r}.0${t?"-0":""}`:s?n=`>=${n}`:n=`>=${n}${t?"-0":""}`,Ce(c)?u="":Ce(l)?u=`<${+c+1}.0.0-0`:Ce(d)?u=`<${c}.${+l+1}.0-0`:f?u=`<=${c}.${l}.${d}-${f}`:t?u=`<${c}.${l}.${+d+1}-0`:u=`<=${u}`,`${n} ${u}`.trim()),HA=(t,e,n)=>{for(let i=0;i<t.length;i++)if(!t[i].test(e))return!1;if(e.prerelease.length&&!n.includePrerelease){for(let i=0;i<t.length;i++)if(te(t[i].semver),t[i].semver!==Rm.ANY&&t[i].semver.prerelease.length>0){let r=t[i].semver;if(r.major===e.major&&r.minor===e.minor&&r.patch===e.patch)return!0}return!1}return!0}});var Yi=z((UM,KS)=>{"use strict";var Xi=Symbol("SemVer ANY"),jm=class t{static get ANY(){return Xi}constructor(e,n){if(n=GS(n),e instanceof t){if(e.loose===!!n.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Lm("comparator",e,n),this.options=n,this.loose=!!n.loose,this.parse(e),this.semver===Xi?this.value="":this.value=this.operator+this.semver.version,Lm("comp",this)}parse(e){let n=this.options.loose?WS[qS.COMPARATORLOOSE]:WS[qS.COMPARATOR],i=e.match(n);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new HS(i[2],this.options.loose):this.semver=Xi}toString(){return this.value}test(e){if(Lm("Comparator.test",e,this.options.loose),this.semver===Xi||e===Xi)return!0;if(typeof e=="string")try{e=new HS(e,this.options)}catch{return!1}return Dm(e,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new JS(e.value,n).test(this.value):e.operator===""?e.value===""?!0:new JS(this.value,n).test(e.semver):(n=GS(n),n.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Dm(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Dm(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};KS.exports=jm;var GS=Fa(),{safeRe:WS,t:qS}=Pn(),Dm=Am(),Lm=Ji(),HS=_e(),JS=rt()});var Qi=z((MM,YS)=>{"use strict";var JA=rt(),KA=(t,e,n)=>{try{e=new JA(e,n)}catch{return!1}return e.test(t)};YS.exports=KA});var QS=z((FM,XS)=>{"use strict";var YA=rt(),XA=(t,e)=>new YA(t,e).set.map(n=>n.map(i=>i.value).join(" ").trim().split(" "));XS.exports=XA});var t0=z((VM,e0)=>{"use strict";var QA=_e(),ez=rt(),tz=(t,e,n)=>{let i=null,r=null,o=null;try{o=new ez(e,n)}catch{return null}return t.forEach(s=>{o.test(s)&&(!i||r.compare(s)===-1)&&(i=s,r=new QA(i,n))}),i};e0.exports=tz});var n0=z((ZM,r0)=>{"use strict";var rz=_e(),nz=rt(),iz=(t,e,n)=>{let i=null,r=null,o=null;try{o=new nz(e,n)}catch{return null}return t.forEach(s=>{o.test(s)&&(!i||r.compare(s)===1)&&(i=s,r=new rz(i,n))}),i};r0.exports=iz});var s0=z((BM,o0)=>{"use strict";var Um=_e(),oz=rt(),i0=Ki(),sz=(t,e)=>{t=new oz(t,e);let n=new Um("0.0.0");if(t.test(n)||(n=new Um("0.0.0-0"),t.test(n)))return n;n=null;for(let i=0;i<t.set.length;++i){let r=t.set[i],o=null;r.forEach(s=>{let a=new Um(s.semver.version);switch(s.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||i0(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),o&&(!n||i0(n,o))&&(n=o)}return n&&t.test(n)?n:null};o0.exports=sz});var u0=z((GM,a0)=>{"use strict";var az=rt(),uz=(t,e)=>{try{return new az(t,e).range||"*"}catch{return null}};a0.exports=uz});var Xa=z((WM,f0)=>{"use strict";var cz=_e(),d0=Yi(),{ANY:lz}=d0,dz=rt(),fz=Qi(),c0=Ki(),l0=qa(),pz=Ja(),hz=Ha(),mz=(t,e,n,i)=>{t=new cz(t,i),e=new dz(e,i);let r,o,s,a,u;switch(n){case">":r=c0,o=pz,s=l0,a=">",u=">=";break;case"<":r=l0,o=hz,s=c0,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(fz(t,e,i))return!1;for(let c=0;c<e.set.length;++c){let l=e.set[c],d=null,f=null;if(l.forEach(p=>{p.semver===lz&&(p=new d0(">=0.0.0")),d=d||p,f=f||p,r(p.semver,d.semver,i)?d=p:s(p.semver,f.semver,i)&&(f=p)}),d.operator===a||d.operator===u||(!f.operator||f.operator===a)&&o(t,f.semver))return!1;if(f.operator===u&&s(t,f.semver))return!1}return!0};f0.exports=mz});var h0=z((qM,p0)=>{"use strict";var gz=Xa(),vz=(t,e,n)=>gz(t,e,">",n);p0.exports=vz});var g0=z((HM,m0)=>{"use strict";var yz=Xa(),_z=(t,e,n)=>yz(t,e,"<",n);m0.exports=_z});var _0=z((JM,y0)=>{"use strict";var v0=rt(),$z=(t,e,n)=>(t=new v0(t,n),e=new v0(e,n),t.intersects(e,n));y0.exports=$z});var b0=z((KM,$0)=>{"use strict";var bz=Qi(),xz=tt();$0.exports=(t,e,n)=>{let i=[],r=null,o=null,s=t.sort((l,d)=>xz(l,d,n));for(let l of s)bz(l,e,n)?(o=l,r||(r=l)):(o&&i.push([r,o]),o=null,r=null);r&&i.push([r,null]);let a=[];for(let[l,d]of i)l===d?a.push(l):!d&&l===s[0]?a.push("*"):d?l===s[0]?a.push(`<=${d}`):a.push(`${l} - ${d}`):a.push(`>=${l}`);let u=a.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return u.length<c.length?u:e}});var E0=z((YM,I0)=>{"use strict";var x0=rt(),Vm=Yi(),{ANY:Mm}=Vm,Fm=Qi(),Zm=tt(),wz=(t,e,n={})=>{if(t===e)return!0;t=new x0(t,n),e=new x0(e,n);let i=!1;e:for(let r of t.set){for(let o of e.set){let s=kz(r,o,n);if(i=i||s!==null,s)continue e}if(i)return!1}return!0},Sz=[new Vm(">=0.0.0-0")],w0=[new Vm(">=0.0.0")],kz=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Mm){if(e.length===1&&e[0].semver===Mm)return!0;n.includePrerelease?t=Sz:t=w0}if(e.length===1&&e[0].semver===Mm){if(n.includePrerelease)return!0;e=w0}let i=new Set,r,o;for(let p of t)p.operator===">"||p.operator===">="?r=S0(r,p,n):p.operator==="<"||p.operator==="<="?o=k0(o,p,n):i.add(p.semver);if(i.size>1)return null;let s;if(r&&o){if(s=Zm(r.semver,o.semver,n),s>0)return null;if(s===0&&(r.operator!==">="||o.operator!=="<="))return null}for(let p of i){if(r&&!Fm(p,String(r),n)||o&&!Fm(p,String(o),n))return null;for(let h of e)if(!Fm(p,String(h),n))return!1;return!0}let a,u,c,l,d=o&&!n.includePrerelease&&o.semver.prerelease.length?o.semver:!1,f=r&&!n.includePrerelease&&r.semver.prerelease.length?r.semver:!1;d&&d.prerelease.length===1&&o.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(let p of e){if(l=l||p.operator===">"||p.operator===">=",c=c||p.operator==="<"||p.operator==="<=",r){if(f&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch&&(f=!1),p.operator===">"||p.operator===">="){if(a=S0(r,p,n),a===p&&a!==r)return!1}else if(r.operator===">="&&!p.test(r.semver))return!1}if(o){if(d&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===d.major&&p.semver.minor===d.minor&&p.semver.patch===d.patch&&(d=!1),p.operator==="<"||p.operator==="<="){if(u=k0(o,p,n),u===p&&u!==o)return!1}else if(o.operator==="<="&&!p.test(o.semver))return!1}if(!p.operator&&(o||r)&&s!==0)return!1}return!(r&&c&&!o&&s!==0||o&&l&&!r&&s!==0||f||d)},S0=(t,e,n)=>{if(!t)return e;let i=Zm(t.semver,e.semver,n);return i>0?t:i<0||e.operator===">"&&t.operator===">="?e:t},k0=(t,e,n)=>{if(!t)return e;let i=Zm(t.semver,e.semver,n);return i<0?t:i>0||e.operator==="<"&&t.operator==="<="?e:t};I0.exports=wz});var C0=z((XM,P0)=>{"use strict";var Bm=Pn(),T0=On(),Iz=_e(),O0=Em(),Ez=Xt(),Tz=Qw(),Oz=tS(),Pz=iS(),Cz=aS(),Az=cS(),zz=dS(),Nz=pS(),Rz=mS(),Dz=tt(),Lz=_S(),jz=bS(),Uz=Wa(),Mz=kS(),Fz=ES(),Vz=Ki(),Zz=qa(),Bz=Pm(),Gz=Cm(),Wz=Ha(),qz=Ja(),Hz=Am(),Jz=DS(),Kz=jS(),Yz=Yi(),Xz=rt(),Qz=Qi(),e4=QS(),t4=t0(),r4=n0(),n4=s0(),i4=u0(),o4=Xa(),s4=h0(),a4=g0(),u4=_0(),c4=b0(),l4=E0();P0.exports={parse:Ez,valid:Tz,clean:Oz,inc:Pz,diff:Cz,major:Az,minor:zz,patch:Nz,prerelease:Rz,compare:Dz,rcompare:Lz,compareLoose:jz,compareBuild:Uz,sort:Mz,rsort:Fz,gt:Vz,lt:Zz,eq:Bz,neq:Gz,gte:Wz,lte:qz,cmp:Hz,coerce:Jz,truncate:Kz,Comparator:Yz,Range:Xz,satisfies:Qz,toComparators:e4,maxSatisfying:t4,minSatisfying:r4,minVersion:n4,validRange:i4,outside:o4,gtr:s4,ltr:a4,intersects:u4,simplifyRange:c4,subset:l4,SemVer:Iz,re:Bm.re,src:Bm.src,tokens:Bm.t,SEMVER_SPEC_VERSION:T0.SEMVER_SPEC_VERSION,RELEASE_TYPES:T0.RELEASE_TYPES,compareIdentifiers:O0.compareIdentifiers,rcompareIdentifiers:O0.rcompareIdentifiers}});var D0=z((aF,Gm)=>{var tu=process||{},N0=tu.argv||[],eu=tu.env||{},h4=!(eu.NO_COLOR||N0.includes("--no-color"))&&(!!eu.FORCE_COLOR||N0.includes("--color")||tu.platform==="win32"||(tu.stdout||{}).isTTY&&eu.TERM!=="dumb"||!!eu.CI),m4=(t,e,n=t)=>i=>{let r=""+i,o=r.indexOf(e,t.length);return~o?t+g4(r,e,n,o)+e:t+r+e},g4=(t,e,n,i)=>{let r="",o=0;do r+=t.substring(o,i)+n,o=i+e.length,i=t.indexOf(e,o);while(~i);return r+t.substring(o)},R0=(t=h4)=>{let e=t?m4:()=>String;return{isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};Gm.exports=R0();Gm.exports.createColors=R0});var Ym=z((zF,tk)=>{"use strict";var Km={to(t,e){return e?`\x1B[${e+1};${t+1}H`:`\x1B[${t+1}G`},move(t,e){let n="";return t<0?n+=`\x1B[${-t}D`:t>0&&(n+=`\x1B[${t}C`),e<0?n+=`\x1B[${-e}A`:e>0&&(n+=`\x1B[${e}B`),n},up:(t=1)=>`\x1B[${t}A`,down:(t=1)=>`\x1B[${t}B`,forward:(t=1)=>`\x1B[${t}C`,backward:(t=1)=>`\x1B[${t}D`,nextLine:(t=1)=>"\x1B[E".repeat(t),prevLine:(t=1)=>"\x1B[F".repeat(t),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},U4={up:(t=1)=>"\x1B[S".repeat(t),down:(t=1)=>"\x1B[T".repeat(t)},M4={screen:"\x1B[2J",up:(t=1)=>"\x1B[1J".repeat(t),down:(t=1)=>"\x1B[J".repeat(t),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(t){let e="";for(let n=0;n<t;n++)e+=this.line+(n<t-1?Km.up():"");return t&&(e+=Km.left),e}};tk.exports={cursor:Km,scroll:U4,erase:M4,beep:"\x07"}});function Gk(t,e){if(e<=1)return t;let n=Math.floor(t.length/e),i=new Int16Array(n);for(let r=0;r<n;r++){let o=0,s=r*e;for(let a=0;a<e;a++)o+=t[s+a];i[r]=Math.round(o/e)}return i}var xu,Wk=v(()=>{"use strict";xu=class{step;pos=0;prev=0;primed=!1;constructor(e,n){if(e<=0||n<=0)throw new RangeError("resampler rates must be positive");this.step=e/n}process(e){if(e.length===0)return new Int16Array(0);let n=[],i=e.length-1,r=this.primed?this.pos:0;for(;;){let o=Math.floor(r);if(o+1>i)break;let s=o<0?this.prev:e[o],a=e[o+1];n.push(Math.round(s+(a-s)*(r-o))),r+=this.step}return this.prev=e[i],this.primed=!0,this.pos=r-e.length,Int16Array.from(n)}}});function Hk(t){return t.byteLength/2/RN}function DN(t){let e=t.byteLength>>1,n=new DataView(t.buffer,t.byteOffset,t.byteLength),i=new Int16Array(e);for(let r=0;r<e;r++)i[r]=n.getInt16(r*2,!0);return i}var qk,RN,wu,Jk=v(()=>{"use strict";De();Da();qk=32,RN=16,wu=class{constructor(e,n,i={}){this.vad=e;this.onSpeech=n;this.speechThreshold=i.speechThreshold??.5,this.onsetMs=i.onsetMs??2*qk,this.holdoffMs=i.holdoffMs??300,this.energyThreshold=i.energyThreshold??.01,this.log=i.log??q}vad;onSpeech;speechThreshold;onsetMs;holdoffMs;energyThreshold;log;inSpeech=!1;speechRunMs=0;silenceRunMs=0;degraded=!1;closed=!1;feed(e){if(!(this.closed||e.byteLength===0)){if(this.degraded){this.applyVerdict(Bt(e,this.energyThreshold),Hk(e));return}this.vad.process(DN(e)).then(n=>{if(!this.closed)for(let i of n)this.applyVerdict(i>=this.speechThreshold,qk)},n=>{this.closed||(this.degrade(n),this.applyVerdict(Bt(e,this.energyThreshold),Hk(e)))})}}close(){this.closed=!0}applyVerdict(e,n){e?(this.silenceRunMs=0,this.speechRunMs+=n,!this.inSpeech&&this.speechRunMs>=this.onsetMs&&(this.inSpeech=!0,this.onSpeech())):(this.speechRunMs=0,this.inSpeech&&(this.silenceRunMs+=n,this.silenceRunMs>=this.holdoffMs&&(this.inSpeech=!1,this.silenceRunMs=0)))}degrade(e){this.degraded||(this.degraded=!0,this.log.debug("barge-in DEGRADED to energy onset - silero vad failed; speech onsets detect on RMS energy for the rest of the capture session",{error:e instanceof Error?e.message:String(e)}))}}});var vg={};qe(vg,{DecibriCapture:()=>hg,DecibriPlayback:()=>mg,hasInputDevice:()=>UN});import{Microphone as LN,Speaker as jN,inputDevices as Yk}from"decibri";function UN(){try{return Yk().length>0}catch(t){return q.debug("audio input enumeration failed; treating as no microphone",{error:t}),!1}}function MN(){try{let t=Yk(),e=t.find(n=>n.isDefault)??t[0];if(e&&e.defaultSampleRate>=1e3&&e.maxInputChannels>=1)return{sampleRate:Math.round(e.defaultSampleRate),channels:e.maxInputChannels}}catch(t){q.debug("could not read default input device; opening at 16k mono",{error:t})}return{sampleRate:Su,channels:gg}}function FN(t){return Math.max(64,Math.min(65536,Math.round(t/10)))}function VN(t,e,n){let i=new Uint8Array(t),r=new Int16Array(i.buffer,0,i.byteLength>>1),o=n.process(Gk(r,e));return Buffer.from(o.buffer,o.byteOffset,o.byteLength)}function ZN(t){return Buffer.from(t.buffer,t.byteOffset,t.byteLength)}var Su,gg,Xk,Kk,hg,mg,yg=v(()=>{"use strict";De();Da();Wk();Jk();Su=16e3,gg=1,Xk="int16",Kk=.01;hg=class{constructor(e={}){this.deps=e}deps;mic=null;onData=null;onSpeech=null;onErr=null;vad=null;detector=null;async start(e){let{sampleRate:n,channels:i}=MN(),r=(this.deps.createVad??(()=>new vr))(),o=null;try{await r.load(),o=new wu(r,()=>e.onSpeechStart(),{energyThreshold:Kk})}catch(u){q.debug("silero vad unavailable; barge-in falls back to decibri energy vad",{error:u}),r.dispose().catch(()=>{})}let s;try{s=await LN.open({sampleRate:n,channels:i,dtype:Xk,...o?{vad:!1}:{vad:"energy",vadThreshold:Kk},framesPerBuffer:FN(n)})}catch(u){throw o?.close(),o&&r.dispose().catch(()=>{}),u}this.vad=o?r:null,this.detector=o;let a=n===Su&&i===gg?null:new xu(n,Su);this.onData=a?u=>{let c=VN(u,i,a);c.byteLength>0&&(this.detector?.feed(c),e.onFrame(c,Date.now()))}:u=>{this.detector?.feed(u),e.onFrame(u,Date.now())},this.onSpeech=()=>e.onSpeechStart(),this.onErr=u=>e.onError(u),s.on("data",this.onData),s.on("speech",this.onSpeech),s.on("error",this.onErr),this.mic=s}async stop(){let e=this.mic;this.mic=null,this.detector?.close(),this.detector=null,e&&(this.onData&&e.removeListener("data",this.onData),this.onSpeech&&e.removeListener("speech",this.onSpeech),this.onErr&&e.removeListener("error",this.onErr),e.on("error",()=>{}),e.stop()),this.onData=null,this.onSpeech=null,this.onErr=null;let n=this.vad;this.vad=null,n&&await n.dispose().catch(()=>{})}},mg=class{speaker=null;writeChain=Promise.resolve();generation=0;closed=!1;play(e){if(this.closed)return;let n=this.generation;this.writeChain=this.writeChain.then(async()=>{if(!(this.closed||n!==this.generation))try{await this.ensureSpeaker().writeAsync(ZN(e))}catch(i){q.debug("playback write skipped",{error:i})}})}flush(){this.generation++;let e=this.speaker;this.speaker=null,e?.stop()}async drained(){await this.writeChain;let e=this.speaker;if(e)try{await e.drainAsync()}catch(n){q.debug("playback drain interrupted",{error:n})}}close(){return this.closed=!0,this.flush(),Promise.resolve()}ensureSpeaker(){return this.speaker??=new jN({sampleRate:Su,channels:gg,dtype:Xk}),this.speaker}}});De();Da();$i();import{readFileSync as BN}from"node:fs";import{randomUUID as GN}from"node:crypto";var mt=class extends Error{constructor(e,n,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=n,this.exitCode=e,this.nestedError=void 0}},Ot=class extends mt{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};var qi=class{constructor(e,n){switch(this.description=n||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,n){return n===this.defaultValue||!Array.isArray(n)?[e]:(n.push(e),n)}default(e,n){return this.defaultValue=e,this.defaultValueDescription=n,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,i)=>{if(!this.argChoices.includes(n))throw new Ot(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(n,i):n},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function La(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}import{EventEmitter as QP}from"node:events";import Sm from"node:child_process";import Pt from"node:path";import Ua from"node:fs";import B from"node:process";import{stripVTControlCharacters as eC}from"node:util";import{stripVTControlCharacters as KP}from"node:util";var Hi=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let n=e.commands.filter(r=>!r._hidden),i=e._getHelpCommand();return i&&!i._hidden&&n.push(i),this.sortSubcommands&&n.sort((r,o)=>r.name().localeCompare(o.name())),n}compareOptions(e,n){let i=r=>r.short?r.short.replace(/^-/,""):r.long.replace(/^--/,"");return i(e).localeCompare(i(n))}visibleOptions(e){let n=e.options.filter(r=>!r.hidden),i=e._getHelpOption();if(i&&!i.hidden){let r=i.short&&e._findOption(i.short),o=i.long&&e._findOption(i.long);!r&&!o?n.push(i):i.long&&!o?n.push(e.createOption(i.long,i.description)):i.short&&!r&&n.push(e.createOption(i.short,i.description))}return this.sortOptions&&n.sort(this.compareOptions),n}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let n=[];for(let i=e.parent;i;i=i.parent){let r=i.options.filter(o=>!o.hidden);n.push(...r)}return this.sortOptions&&n.sort(this.compareOptions),n}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(n=>{n.description=n.description||e._argsDescription[n.name()]||""}),e.registeredArguments.find(n=>n.description)?e.registeredArguments:[]}subcommandTerm(e){let n=e.registeredArguments.map(i=>La(i)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(n?" "+n:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,n){return n.visibleCommands(e).reduce((i,r)=>Math.max(i,this.displayWidth(n.styleSubcommandTerm(n.subcommandTerm(r)))),0)}longestOptionTermLength(e,n){return n.visibleOptions(e).reduce((i,r)=>Math.max(i,this.displayWidth(n.styleOptionTerm(n.optionTerm(r)))),0)}longestGlobalOptionTermLength(e,n){return n.visibleGlobalOptions(e).reduce((i,r)=>Math.max(i,this.displayWidth(n.styleOptionTerm(n.optionTerm(r)))),0)}longestArgumentTermLength(e,n){return n.visibleArguments(e).reduce((i,r)=>Math.max(i,this.displayWidth(n.styleArgumentTerm(n.argumentTerm(r)))),0)}commandUsage(e){let n=e._name;e._aliases[0]&&(n=n+"|"+e._aliases[0]);let i="";for(let r=e.parent;r;r=r.parent)i=r.name()+" "+i;return i+n+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let n=[];if(e.argChoices&&n.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&n.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&n.push(`env: ${e.envVar}`),n.length>0){let i=`(${n.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}argumentDescription(e){let n=[];if(e.argChoices&&n.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),n.length>0){let i=`(${n.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}formatItemList(e,n,i){return n.length===0?[]:[i.styleTitle(e),...n,""]}groupItems(e,n,i){let r=new Map;return e.forEach(o=>{let s=i(o);r.has(s)||r.set(s,[])}),n.forEach(o=>{let s=i(o);r.has(s)||r.set(s,[]),r.get(s).push(o)}),r}formatHelp(e,n){let i=n.padWidth(e,n),r=n.helpWidth??80;function o(d,f){return n.formatItem(d,i,f,n)}let s=[`${n.styleTitle("Usage:")} ${n.styleUsage(n.commandUsage(e))}`,""],a=n.commandDescription(e);a.length>0&&(s=s.concat([n.boxWrap(n.styleCommandDescription(a),r),""]));let u=n.visibleArguments(e).map(d=>o(n.styleArgumentTerm(n.argumentTerm(d)),n.styleArgumentDescription(n.argumentDescription(d))));if(s=s.concat(this.formatItemList("Arguments:",u,n)),this.groupItems(e.options,n.visibleOptions(e),d=>d.helpGroupHeading??"Options:").forEach((d,f)=>{let p=d.map(h=>o(n.styleOptionTerm(n.optionTerm(h)),n.styleOptionDescription(n.optionDescription(h))));s=s.concat(this.formatItemList(f,p,n))}),n.showGlobalOptions){let d=n.visibleGlobalOptions(e).map(f=>o(n.styleOptionTerm(n.optionTerm(f)),n.styleOptionDescription(n.optionDescription(f))));s=s.concat(this.formatItemList("Global Options:",d,n))}return this.groupItems(e.commands,n.visibleCommands(e),d=>d.helpGroup()||"Commands:").forEach((d,f)=>{let p=d.map(h=>o(n.styleSubcommandTerm(n.subcommandTerm(h)),n.styleSubcommandDescription(n.subcommandDescription(h))));s=s.concat(this.formatItemList(f,p,n))}),s.join(`
78
- `)}displayWidth(e){return KP(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(n=>n==="[options]"?this.styleOptionText(n):n==="[command]"?this.styleSubcommandText(n):n[0]==="["||n[0]==="<"?this.styleArgumentText(n):this.styleCommandText(n)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(n=>n==="[options]"?this.styleOptionText(n):n[0]==="["||n[0]==="<"?this.styleArgumentText(n):this.styleSubcommandText(n)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,n){return Math.max(n.longestOptionTermLength(e,n),n.longestGlobalOptionTermLength(e,n),n.longestSubcommandTermLength(e,n),n.longestArgumentTermLength(e,n))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,n,i,r){let s=" ".repeat(2);if(!i)return s+e;let a=e.padEnd(n+e.length-r.displayWidth(e)),u=2,l=(this.helpWidth??80)-n-u-2,d;return l<this.minWidthToWrap||r.preformatted(i)?d=i:d=r.boxWrap(i,l).replace(/\n/g,`
119
+ `+n)}function kr(t,e,n,i,r,o){if(t.listenerCount("wsClientError")){let s=new Error(r);Error.captureStackTrace(s,kr),t.emit("wsClientError",s,n,e)}else qi(n,i,r,o)}});var QP,eC,tC,rC,nC,iC,$m,oC,Zw=v(()=>{QP=Je(Nw(),1),eC=Je(Aa(),1),tC=Je($n(),1),rC=Je(lm(),1),nC=Je(hm(),1),iC=Je(_m(),1),$m=Je(Da(),1),oC=Je(Vw(),1)});function sC(t){return Array.isArray(t)?Buffer.concat(t).toString("utf8"):Buffer.isBuffer(t)?t.toString("utf8"):Buffer.from(t).toString("utf8")}var xm,wm=v(()=>{"use strict";Zw();xm=(t,e)=>{let n=new $m.default(t,{headers:e});return{send:i=>n.send(i),close:()=>n.close(),onOpen:i=>{n.on("open",i)},onMessage:i=>{n.on("message",r=>i(sC(r)))},onError:i=>{n.on("error",i)},onClose:i=>{n.on("close",()=>i())}}}});var Hi,Sm=v(()=>{"use strict";Yp();Qp();wm();Hi=class{socketFactory;constructor(e=xm){this.socketFactory=e}asrEngine(e,n){if(e.provider==="elevenlabs")return new ji(n,this.socketFactory,e.model);throw new Error(`no stt adapter for provider '${e.provider}'`)}ttsEngine(e,n){if(e.provider==="elevenlabs")return new Mi(n,this.socketFactory,e.model);throw new Error(`no tts adapter for provider '${e.provider}'`)}}});import{randomUUID as aC}from"node:crypto";function Im(t={}){let e=new pr;q.setLevel(e.logLevel),q.debug("core created",{logLevel:e.logLevel});let n={configService:t.configService??new Ge,registry:t.registry??new $i(t.fetchImpl),voiceRegistry:t.voiceRegistry??new Hi(t.voiceSocketFactory),...t.systemPrompt!==void 0&&{systemPrompt:t.systemPrompt},...t.voiceIdentity!==void 0&&{voiceIdentity:t.voiceIdentity},...t.createTurnController!==void 0&&{createTurnController:t.createTurnController},...t.createSmartTurnInference!==void 0&&{createSmartTurnInference:t.createSmartTurnInference},...t.createFrameClassifier!==void 0&&{createFrameClassifier:t.createFrameClassifier},...t.createSegmenter!==void 0&&{createSegmenter:t.createSegmenter},...t.clock!==void 0&&{clock:t.clock}};return new km(n)}var uC,cC,km,Bw=v(()=>{"use strict";De();Hh();Jh();Qh();Rx();Sm();uC="jarvis-core",cC="0.1.0-dev",km=class{deps;constructor(e){this.deps=e}describe(){return Promise.resolve({name:uC,version:cC})}openSession(e){let n=aC();return q.debug("core opened session",{sessionId:n,capabilities:e.clientCapabilities}),Promise.resolve(new ba(n,e,this.deps))}}});function Ua(t){return t>=200&&t<300?{ok:!0,status:"valid"}:t===401||t===403?{ok:!1,status:"invalid",detail:`key rejected (HTTP ${t})`}:{ok:!1,status:"unreachable",detail:`unexpected response (HTTP ${t})`}}function Gw(t){return t instanceof Error?t.name==="TimeoutError"||t.name==="AbortError"?"request timed out":t.message:"network error"}function En(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}async function Em(t,e,n,i){let r=await n(t,{headers:e,signal:i});if(!r.ok)throw new Error(`HTTP ${r.status}`);try{return await r.json()}catch{throw new Error("invalid JSON response")}}function Tm(t){let e={};for(let[n,i]of Object.entries(t))i!==void 0&&i.length>0&&(e[n]=i);if(Object.keys(e).length===0)throw new Error("catalogue curated to nothing");return e}function gC(t){return!/^gpt-(4\.1|4o|5)/.test(t)&&!/^o\d/.test(t)||mC.test(t)?!1:!/-(audio|realtime|transcribe|tts|image|search|codex|chat-latest|instruct|deep-research|pro)\b/.test(t)}var lC,dC,fC,hC,pC,mC,vC,yC,Ww,Tn,Om=v(()=>{"use strict";lC=async(t,e,n)=>{let i=await e("https://api.openai.com/v1/models",{headers:{Authorization:`Bearer ${t}`},signal:n});return Ua(i.status)},dC=async(t,e,n)=>{let i=await e("https://api.anthropic.com/v1/models",{headers:{"x-api-key":t,"anthropic-version":"2023-06-01"},signal:n});return Ua(i.status)},fC=async(t,e,n)=>{let i=await e("https://api.deepgram.com/v1/projects",{headers:{Authorization:`Token ${t}`},signal:n});return Ua(i.status)},hC=async(t,e,n)=>{let i=await e("https://api.elevenlabs.io/v1/user",{headers:{"xi-api-key":t},signal:n});return i.status===401||i.status===403?{ok:!1,status:"unverifiable",detail:"an ElevenLabs key scoped to the voice endpoints cannot reach a free validation endpoint; it will be confirmed at first use"}:Ua(i.status)};pC=async(t,e,n)=>{if(!t)throw new Error("API key required");let i=await Em("https://api.anthropic.com/v1/models?limit=100",{"x-api-key":t,"anthropic-version":"2023-06-01"},e,n),r=En(i)&&Array.isArray(i.data)?i.data:[],o=[];for(let s of r){if(!En(s)||typeof s.id!="string")continue;let a=typeof s.display_name=="string"?s.display_name:void 0;o.push(a===void 0?{id:s.id}:{id:s.id,label:a})}return Tm({text:o})},mC=/-\d{4}-\d{2}-\d{2}$/;vC=async(t,e,n)=>{if(!t)throw new Error("API key required");let i=await Em("https://api.openai.com/v1/models",{Authorization:`Bearer ${t}`},e,n),r=En(i)&&Array.isArray(i.data)?i.data:[],o=[];for(let a of r)En(a)&&typeof a.id=="string"&&o.push(a.id);o.sort();let s=a=>o.filter(a).map(u=>({id:u}));return Tm({text:s(gC),stt:s(a=>a==="whisper-1"||a.endsWith("-transcribe")),tts:s(a=>/^tts-1(-hd)?$/.test(a)||a.endsWith("-tts")),embedding:s(a=>a.startsWith("text-embedding-3-"))})},yC=async(t,e,n)=>{let i=await Em("https://api.deepgram.com/v1/models",{},e,n),r=En(i)&&Array.isArray(i.stt)?i.stt:[],o=new Set,s=[];for(let a of r){if(!En(a)||a.streaming!==!0)continue;let{canonical_name:u,architecture:c}=a;typeof u!="string"||typeof c!="string"||c.startsWith("nova-")&&(o.has(u)||(o.add(u),s.push({id:u,architecture:c})))}return s.sort((a,u)=>a.architecture===u.architecture?a.id.localeCompare(u.id,"en"):u.architecture.localeCompare(a.architecture,"en",{numeric:!0})),Tm({stt:s.map(({id:a})=>({id:a}))})},Ww={elevenlabs:{capabilities:["stt","tts"],defaultModel:{stt:"scribe_v2_realtime",tts:"eleven_flash_v2_5"},keyEnv:"ELEVENLABS_API_KEY",probe:hC},anthropic:{capabilities:["text"],defaultModel:{text:"claude-opus-4-8"},fastModel:{text:"claude-sonnet-5"},keyEnv:"ANTHROPIC_API_KEY",probe:dC,listModels:pC},openai:{capabilities:["text","stt","tts","embedding"],defaultModel:{text:"gpt-4o",stt:"whisper-1",tts:"tts-1",embedding:"text-embedding-3-small"},fastModel:{text:"gpt-4o-mini"},keyEnv:"OPENAI_API_KEY",probe:lC,listModels:vC},deepgram:{capabilities:["stt"],defaultModel:{stt:"nova-3-general"},keyEnv:"DEEPGRAM_API_KEY",probe:fC,listModels:yC,keylessLister:!0}},Tn=class{fetchImpl;timeoutMs=3e3;providers;constructor(e=fetch){this.fetchImpl=e,this.providers=Ww}async probe(e,n,i){let r=this.providers[e]?.probe;if(!r)return{ok:!1,status:"unimplemented",detail:`no probe for provider '${e}'`};let o=i?.signal??AbortSignal.timeout(this.timeoutMs);try{return await r(n,this.fetchImpl,o)}catch(s){return{ok:!1,status:"unreachable",detail:Gw(s)}}}providersFor(e){return Object.keys(this.providers).filter(n=>this.providers[n].capabilities.includes(e))}defaultModel(e,n){return this.providers[e]?.defaultModel[n]}}});var _C,bC,N2,qw=v(()=>{"use strict";hr();Om();_C=1440*60*1e3,bC={stt:!0,tts:!0,text:!0,embedding:!0},N2=Object.keys(bC)});var ja=v(()=>{"use strict";Bw();Jh();Om();qw();Qh();Xh();ep();Yh();Kh();wm();Yp();Qp();Sm();Wp();jp();Mp();Zp();Ti();Np();zp();ma();Vp();tp();rp()});var Cn=z((VM,Xw)=>{"use strict";var PC="2.0.0",CC=Number.MAX_SAFE_INTEGER||9007199254740991,AC=16,zC=250,NC=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Xw.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:AC,MAX_SAFE_BUILD_LENGTH:zC,MAX_SAFE_INTEGER:CC,RELEASE_TYPES:NC,SEMVER_SPEC_VERSION:PC,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Yi=z((ZM,Qw)=>{"use strict";var RC=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Qw.exports=RC});var An=z((gt,eS)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Am,MAX_SAFE_BUILD_LENGTH:DC,MAX_LENGTH:LC}=Cn(),UC=Yi();gt=eS.exports={};var jC=gt.re=[],MC=gt.safeRe=[],O=gt.src=[],FC=gt.safeSrc=[],P=gt.t={},VC=0,zm="[a-zA-Z0-9-]",ZC=[["\\s",1],["\\d",LC],[zm,DC]],BC=t=>{for(let[e,n]of ZC)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t},U=(t,e,n)=>{let i=BC(e),r=VC++;UC(t,r,e),P[t]=r,O[r]=e,FC[r]=i,jC[r]=new RegExp(e,n?"g":void 0),MC[r]=new RegExp(i,n?"g":void 0)};U("NUMERICIDENTIFIER","0|[1-9]\\d*");U("NUMERICIDENTIFIERLOOSE","\\d+");U("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${zm}*`);U("MAINVERSION",`(${O[P.NUMERICIDENTIFIER]})\\.(${O[P.NUMERICIDENTIFIER]})\\.(${O[P.NUMERICIDENTIFIER]})`);U("MAINVERSIONLOOSE",`(${O[P.NUMERICIDENTIFIERLOOSE]})\\.(${O[P.NUMERICIDENTIFIERLOOSE]})\\.(${O[P.NUMERICIDENTIFIERLOOSE]})`);U("PRERELEASEIDENTIFIER",`(?:${O[P.NONNUMERICIDENTIFIER]}|${O[P.NUMERICIDENTIFIER]})`);U("PRERELEASEIDENTIFIERLOOSE",`(?:${O[P.NONNUMERICIDENTIFIER]}|${O[P.NUMERICIDENTIFIERLOOSE]})`);U("PRERELEASE",`(?:-(${O[P.PRERELEASEIDENTIFIER]}(?:\\.${O[P.PRERELEASEIDENTIFIER]})*))`);U("PRERELEASELOOSE",`(?:-?(${O[P.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${O[P.PRERELEASEIDENTIFIERLOOSE]})*))`);U("BUILDIDENTIFIER",`${zm}+`);U("BUILD",`(?:\\+(${O[P.BUILDIDENTIFIER]}(?:\\.${O[P.BUILDIDENTIFIER]})*))`);U("FULLPLAIN",`v?${O[P.MAINVERSION]}${O[P.PRERELEASE]}?${O[P.BUILD]}?`);U("FULL",`^${O[P.FULLPLAIN]}$`);U("LOOSEPLAIN",`[v=\\s]*${O[P.MAINVERSIONLOOSE]}${O[P.PRERELEASELOOSE]}?${O[P.BUILD]}?`);U("LOOSE",`^${O[P.LOOSEPLAIN]}$`);U("GTLT","((?:<|>)?=?)");U("XRANGEIDENTIFIERLOOSE",`${O[P.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);U("XRANGEIDENTIFIER",`${O[P.NUMERICIDENTIFIER]}|x|X|\\*`);U("XRANGEPLAIN",`[v=\\s]*(${O[P.XRANGEIDENTIFIER]})(?:\\.(${O[P.XRANGEIDENTIFIER]})(?:\\.(${O[P.XRANGEIDENTIFIER]})(?:${O[P.PRERELEASE]})?${O[P.BUILD]}?)?)?`);U("XRANGEPLAINLOOSE",`[v=\\s]*(${O[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${O[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${O[P.XRANGEIDENTIFIERLOOSE]})(?:${O[P.PRERELEASELOOSE]})?${O[P.BUILD]}?)?)?`);U("XRANGE",`^${O[P.GTLT]}\\s*${O[P.XRANGEPLAIN]}$`);U("XRANGELOOSE",`^${O[P.GTLT]}\\s*${O[P.XRANGEPLAINLOOSE]}$`);U("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Am}})(?:\\.(\\d{1,${Am}}))?(?:\\.(\\d{1,${Am}}))?`);U("COERCE",`${O[P.COERCEPLAIN]}(?:$|[^\\d])`);U("COERCEFULL",O[P.COERCEPLAIN]+`(?:${O[P.PRERELEASE]})?(?:${O[P.BUILD]})?(?:$|[^\\d])`);U("COERCERTL",O[P.COERCE],!0);U("COERCERTLFULL",O[P.COERCEFULL],!0);U("LONETILDE","(?:~>?)");U("TILDETRIM",`(\\s*)${O[P.LONETILDE]}\\s+`,!0);gt.tildeTrimReplace="$1~";U("TILDE",`^${O[P.LONETILDE]}${O[P.XRANGEPLAIN]}$`);U("TILDELOOSE",`^${O[P.LONETILDE]}${O[P.XRANGEPLAINLOOSE]}$`);U("LONECARET","(?:\\^)");U("CARETTRIM",`(\\s*)${O[P.LONECARET]}\\s+`,!0);gt.caretTrimReplace="$1^";U("CARET",`^${O[P.LONECARET]}${O[P.XRANGEPLAIN]}$`);U("CARETLOOSE",`^${O[P.LONECARET]}${O[P.XRANGEPLAINLOOSE]}$`);U("COMPARATORLOOSE",`^${O[P.GTLT]}\\s*(${O[P.LOOSEPLAIN]})$|^$`);U("COMPARATOR",`^${O[P.GTLT]}\\s*(${O[P.FULLPLAIN]})$|^$`);U("COMPARATORTRIM",`(\\s*)${O[P.GTLT]}\\s*(${O[P.LOOSEPLAIN]}|${O[P.XRANGEPLAIN]})`,!0);gt.comparatorTrimReplace="$1$2$3";U("HYPHENRANGE",`^\\s*(${O[P.XRANGEPLAIN]})\\s+-\\s+(${O[P.XRANGEPLAIN]})\\s*$`);U("HYPHENRANGELOOSE",`^\\s*(${O[P.XRANGEPLAINLOOSE]})\\s+-\\s+(${O[P.XRANGEPLAINLOOSE]})\\s*$`);U("STAR","(<|>)?=?\\s*\\*");U("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");U("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Ba=z((BM,tS)=>{"use strict";var GC=Object.freeze({loose:!0}),WC=Object.freeze({}),qC=t=>t?typeof t!="object"?GC:t:WC;tS.exports=qC});var Nm=z((GM,iS)=>{"use strict";var rS=/^[0-9]+$/,nS=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let n=rS.test(t),i=rS.test(e);return n&&i&&(t=+t,e=+e),t===e?0:n&&!i?-1:i&&!n?1:t<e?-1:1},HC=(t,e)=>nS(e,t);iS.exports={compareIdentifiers:nS,rcompareIdentifiers:HC}});var _e=z((WM,sS)=>{"use strict";var Ga=Yi(),{MAX_LENGTH:oS,MAX_SAFE_INTEGER:Wa}=Cn(),{safeRe:qa,t:Ha}=An(),JC=Ba(),{compareIdentifiers:Rm}=Nm(),KC=(t,e)=>{let n=e.split(".");if(n.length>t.length)return!1;for(let i=0;i<n.length;i++)if(Rm(t[i],n[i])!==0)return!1;return!0},Dm=class t{constructor(e,n){if(n=JC(n),e instanceof t){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>oS)throw new TypeError(`version is longer than ${oS} characters`);Ga("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let i=e.trim().match(n.loose?qa[Ha.LOOSE]:qa[Ha.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>Wa||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Wa||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Wa||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(r=>{if(/^[0-9]+$/.test(r)){let o=+r;if(o>=0&&o<Wa)return o}return r}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Ga("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{let i=this.prerelease[n],r=e.prerelease[n];if(Ga("prerelease compare",n,i,r),i===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(i===void 0)return-1;if(i===r)continue;return Rm(i,r)}while(++n)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let n=0;do{let i=this.build[n],r=e.build[n];if(Ga("build compare",n,i,r),i===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(i===void 0)return-1;if(i===r)continue;return Rm(i,r)}while(++n)}inc(e,n,i){if(e.startsWith("pre")){if(!n&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(n){let r=`-${n}`.match(this.options.loose?qa[Ha.PRERELEASELOOSE]:qa[Ha.PRERELEASE]);if(!r||r[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,i),this.inc("pre",n,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,i),this.inc("pre",n,i);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let r=Number(i)?1:0;if(this.prerelease.length===0)this.prerelease=[r];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(n===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(n){let o=[n,r];if(i===!1&&(o=[n]),KC(this.prerelease,n)){let s=this.prerelease[n.split(".").length];isNaN(s)&&(this.prerelease=o)}else this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};sS.exports=Dm});var Qt=z((qM,uS)=>{"use strict";var aS=_e(),YC=(t,e,n=!1)=>{if(t instanceof aS)return t;try{return new aS(t,e)}catch(i){if(!n)return null;throw i}};uS.exports=YC});var lS=z((HM,cS)=>{"use strict";var XC=Qt(),QC=(t,e)=>{let n=XC(t,e);return n?n.version:null};cS.exports=QC});var fS=z((JM,dS)=>{"use strict";var eA=Qt(),tA=(t,e)=>{let n=eA(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};dS.exports=tA});var mS=z((KM,pS)=>{"use strict";var hS=_e(),rA=(t,e,n,i,r)=>{typeof n=="string"&&(r=i,i=n,n=void 0);try{return new hS(t instanceof hS?t.version:t,n).inc(e,i,r).version}catch{return null}};pS.exports=rA});var yS=z((YM,vS)=>{"use strict";var gS=Qt(),nA=(t,e)=>{let n=gS(t,null,!0),i=gS(e,null,!0),r=n.compare(i);if(r===0)return null;let o=r>0,s=o?n:i,a=o?i:n,u=!!s.prerelease.length;if(!!a.prerelease.length&&!u){if(!a.patch&&!a.minor)return"major";if(a.compareMain(s)===0)return a.minor&&!a.patch?"minor":"patch"}let l=u?"pre":"";return n.major!==i.major?l+"major":n.minor!==i.minor?l+"minor":n.patch!==i.patch?l+"patch":"prerelease"};vS.exports=nA});var bS=z((XM,_S)=>{"use strict";var iA=_e(),oA=(t,e)=>new iA(t,e).major;_S.exports=oA});var xS=z((QM,$S)=>{"use strict";var sA=_e(),aA=(t,e)=>new sA(t,e).minor;$S.exports=aA});var SS=z((eF,wS)=>{"use strict";var uA=_e(),cA=(t,e)=>new uA(t,e).patch;wS.exports=cA});var IS=z((tF,kS)=>{"use strict";var lA=Qt(),dA=(t,e)=>{let n=lA(t,e);return n&&n.prerelease.length?n.prerelease:null};kS.exports=dA});var tt=z((rF,TS)=>{"use strict";var ES=_e(),fA=(t,e,n)=>new ES(t,n).compare(new ES(e,n));TS.exports=fA});var PS=z((nF,OS)=>{"use strict";var hA=tt(),pA=(t,e,n)=>hA(e,t,n);OS.exports=pA});var AS=z((iF,CS)=>{"use strict";var mA=tt(),gA=(t,e)=>mA(t,e,!0);CS.exports=gA});var Ja=z((oF,NS)=>{"use strict";var zS=_e(),vA=(t,e,n)=>{let i=new zS(t,n),r=new zS(e,n);return i.compare(r)||i.compareBuild(r)};NS.exports=vA});var DS=z((sF,RS)=>{"use strict";var yA=Ja(),_A=(t,e)=>t.sort((n,i)=>yA(n,i,e));RS.exports=_A});var US=z((aF,LS)=>{"use strict";var bA=Ja(),$A=(t,e)=>t.sort((n,i)=>bA(i,n,e));LS.exports=$A});var Xi=z((uF,jS)=>{"use strict";var xA=tt(),wA=(t,e,n)=>xA(t,e,n)>0;jS.exports=wA});var Ka=z((cF,MS)=>{"use strict";var SA=tt(),kA=(t,e,n)=>SA(t,e,n)<0;MS.exports=kA});var Lm=z((lF,FS)=>{"use strict";var IA=tt(),EA=(t,e,n)=>IA(t,e,n)===0;FS.exports=EA});var Um=z((dF,VS)=>{"use strict";var TA=tt(),OA=(t,e,n)=>TA(t,e,n)!==0;VS.exports=OA});var Ya=z((fF,ZS)=>{"use strict";var PA=tt(),CA=(t,e,n)=>PA(t,e,n)>=0;ZS.exports=CA});var Xa=z((hF,BS)=>{"use strict";var AA=tt(),zA=(t,e,n)=>AA(t,e,n)<=0;BS.exports=zA});var jm=z((pF,GS)=>{"use strict";var NA=Lm(),RA=Um(),DA=Xi(),LA=Ya(),UA=Ka(),jA=Xa(),MA=(t,e,n,i)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return NA(t,n,i);case"!=":return RA(t,n,i);case">":return DA(t,n,i);case">=":return LA(t,n,i);case"<":return UA(t,n,i);case"<=":return jA(t,n,i);default:throw new TypeError(`Invalid operator: ${e}`)}};GS.exports=MA});var qS=z((mF,WS)=>{"use strict";var FA=_e(),VA=Qt(),{safeRe:Qa,t:eu}=An(),ZA=(t,e)=>{if(t instanceof FA)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(e.includePrerelease?Qa[eu.COERCEFULL]:Qa[eu.COERCE]);else{let u=e.includePrerelease?Qa[eu.COERCERTLFULL]:Qa[eu.COERCERTL],c;for(;(c=u.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||c.index+c[0].length!==n.index+n[0].length)&&(n=c),u.lastIndex=c.index+c[1].length+c[2].length;u.lastIndex=-1}if(n===null)return null;let i=n[2],r=n[3]||"0",o=n[4]||"0",s=e.includePrerelease&&n[5]?`-${n[5]}`:"",a=e.includePrerelease&&n[6]?`+${n[6]}`:"";return VA(`${i}.${r}.${o}${s}${a}`,e)};WS.exports=ZA});var JS=z((gF,HS)=>{"use strict";var BA=Qt(),GA=Cn(),WA=_e(),qA=(t,e,n)=>{if(!GA.RELEASE_TYPES.includes(e))return null;let i=HA(t,n);return i&&JA(i,e)},HA=(t,e)=>{let n=t instanceof WA?t.version:t;return BA(n,e)},JA=(t,e)=>{if(KA(e))return t.version;switch(t.prerelease=[],e){case"major":t.minor=0,t.patch=0;break;case"minor":t.patch=0;break}return t.format()},KA=t=>t.startsWith("pre");HS.exports=qA});var YS=z((vF,KS)=>{"use strict";var Mm=class{constructor(){this.max=1e3,this.map=new Map}get(e){let n=this.map.get(e);if(n!==void 0)return this.map.delete(e),this.map.set(e,n),n}delete(e){return this.map.delete(e)}set(e,n){if(!this.delete(e)&&n!==void 0){if(this.map.size>=this.max){let r=this.map.keys().next().value;this.delete(r)}this.map.set(e,n)}return this}};KS.exports=Mm});var rt=z((yF,t0)=>{"use strict";var YA=/\s+/g,Fm=class t{constructor(e,n){if(n=QA(n),e instanceof t)return e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease?e:new t(e.raw,n);if(e instanceof Vm)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=e.trim().replace(YA," "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(r=>!QS(r[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let r of this.set)if(r.length===1&&uz(r[0])){this.set=[r];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let n=this.set[e];for(let i=0;i<n.length;i++)i>0&&(this.formatted+=" "),this.formatted+=n[i].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(az,"");let i=((this.options.includePrerelease&&oz)|(this.options.loose&&sz))+":"+e,r=XS.get(i);if(r)return r;let o=this.options.loose,s=o?Pe[be.HYPHENRANGELOOSE]:Pe[be.HYPHENRANGE];e=e.replace(s,yz(this.options.includePrerelease)),te("hyphen replace",e),e=e.replace(Pe[be.COMPARATORTRIM],rz),te("comparator trim",e),e=e.replace(Pe[be.TILDETRIM],nz),te("tilde trim",e),e=e.replace(Pe[be.CARETTRIM],iz),te("caret trim",e);let a=e.split(" ").map(d=>cz(d,this.options)).join(" ").split(/\s+/).map(d=>vz(d,this.options));o&&(a=a.filter(d=>(te("loose invalid filter",d,this.options),!!d.match(Pe[be.COMPARATORLOOSE])))),te("range list",a);let u=new Map,c=a.map(d=>new Vm(d,this.options));for(let d of c){if(QS(d))return[d];u.set(d.value,d)}u.size>1&&u.has("")&&u.delete("");let l=[...u.values()];return XS.set(i,l),l}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(i=>e0(i,n)&&e.set.some(r=>e0(r,n)&&i.every(o=>r.every(s=>o.intersects(s,n)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new ez(e,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(_z(this.set[n],e,this.options))return!0;return!1}};t0.exports=Fm;var XA=YS(),XS=new XA,QA=Ba(),Vm=Qi(),te=Yi(),ez=_e(),{safeRe:Pe,src:tz,t:be,comparatorTrimReplace:rz,tildeTrimReplace:nz,caretTrimReplace:iz}=An(),{FLAG_INCLUDE_PRERELEASE:oz,FLAG_LOOSE:sz}=Cn(),az=new RegExp(tz[be.BUILD],"g"),QS=t=>t.value==="<0.0.0-0",uz=t=>t.value==="",e0=(t,e)=>{let n=!0,i=t.slice(),r=i.pop();for(;n&&i.length;)n=i.every(o=>r.intersects(o,e)),r=i.pop();return n},cz=(t,e)=>(t=t.replace(Pe[be.BUILD],""),te("comp",t,e),t=fz(t,e),te("caret",t),t=lz(t,e),te("tildes",t),t=pz(t,e),te("xrange",t),t=gz(t,e),te("stars",t),t),Ce=t=>!t||t.toLowerCase()==="x"||t==="*",lz=(t,e)=>t.trim().split(/\s+/).map(n=>dz(n,e)).join(" "),dz=(t,e)=>{let n=e.loose?Pe[be.TILDELOOSE]:Pe[be.TILDE];return t.replace(n,(i,r,o,s,a)=>{te("tilde",t,i,r,o,s,a);let u;return Ce(r)?u="":Ce(o)?u=`>=${r}.0.0 <${+r+1}.0.0-0`:Ce(s)?u=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?(te("replaceTilde pr",a),u=`>=${r}.${o}.${s}-${a} <${r}.${+o+1}.0-0`):u=`>=${r}.${o}.${s} <${r}.${+o+1}.0-0`,te("tilde return",u),u})},fz=(t,e)=>t.trim().split(/\s+/).map(n=>hz(n,e)).join(" "),hz=(t,e)=>{te("caret",t,e);let n=e.loose?Pe[be.CARETLOOSE]:Pe[be.CARET],i=e.includePrerelease?"-0":"";return t.replace(n,(r,o,s,a,u)=>{te("caret",t,r,o,s,a,u);let c;return Ce(o)?c="":Ce(s)?c=`>=${o}.0.0${i} <${+o+1}.0.0-0`:Ce(a)?o==="0"?c=`>=${o}.${s}.0${i} <${o}.${+s+1}.0-0`:c=`>=${o}.${s}.0${i} <${+o+1}.0.0-0`:u?(te("replaceCaret pr",u),o==="0"?s==="0"?c=`>=${o}.${s}.${a}-${u} <${o}.${s}.${+a+1}-0`:c=`>=${o}.${s}.${a}-${u} <${o}.${+s+1}.0-0`:c=`>=${o}.${s}.${a}-${u} <${+o+1}.0.0-0`):(te("no pr"),o==="0"?s==="0"?c=`>=${o}.${s}.${a}${i} <${o}.${s}.${+a+1}-0`:c=`>=${o}.${s}.${a}${i} <${o}.${+s+1}.0-0`:c=`>=${o}.${s}.${a} <${+o+1}.0.0-0`),te("caret return",c),c})},pz=(t,e)=>(te("replaceXRanges",t,e),t.split(/\s+/).map(n=>mz(n,e)).join(" ")),mz=(t,e)=>{t=t.trim();let n=e.loose?Pe[be.XRANGELOOSE]:Pe[be.XRANGE];return t.replace(n,(i,r,o,s,a,u)=>{te("xRange",t,i,r,o,s,a,u);let c=Ce(o),l=c||Ce(s),d=l||Ce(a),f=d;return r==="="&&f&&(r=""),u=e.includePrerelease?"-0":"",c?r===">"||r==="<"?i="<0.0.0-0":i="*":r&&f?(l&&(s=0),a=0,r===">"?(r=">=",l?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):r==="<="&&(r="<",l?o=+o+1:s=+s+1),r==="<"&&(u="-0"),i=`${r+o}.${s}.${a}${u}`):l?i=`>=${o}.0.0${u} <${+o+1}.0.0-0`:d&&(i=`>=${o}.${s}.0${u} <${o}.${+s+1}.0-0`),te("xRange return",i),i})},gz=(t,e)=>(te("replaceStars",t,e),t.trim().replace(Pe[be.STAR],"")),vz=(t,e)=>(te("replaceGTE0",t,e),t.trim().replace(Pe[e.includePrerelease?be.GTE0PRE:be.GTE0],"")),yz=t=>(e,n,i,r,o,s,a,u,c,l,d,f)=>(Ce(i)?n="":Ce(r)?n=`>=${i}.0.0${t?"-0":""}`:Ce(o)?n=`>=${i}.${r}.0${t?"-0":""}`:s?n=`>=${n}`:n=`>=${n}${t?"-0":""}`,Ce(c)?u="":Ce(l)?u=`<${+c+1}.0.0-0`:Ce(d)?u=`<${c}.${+l+1}.0-0`:f?u=`<=${c}.${l}.${d}-${f}`:t?u=`<${c}.${l}.${+d+1}-0`:u=`<=${u}`,`${n} ${u}`.trim()),_z=(t,e,n)=>{for(let i=0;i<t.length;i++)if(!t[i].test(e))return!1;if(e.prerelease.length&&!n.includePrerelease){for(let i=0;i<t.length;i++)if(te(t[i].semver),t[i].semver!==Vm.ANY&&t[i].semver.prerelease.length>0){let r=t[i].semver;if(r.major===e.major&&r.minor===e.minor&&r.patch===e.patch)return!0}return!1}return!0}});var Qi=z((_F,a0)=>{"use strict";var eo=Symbol("SemVer ANY"),Gm=class t{static get ANY(){return eo}constructor(e,n){if(n=r0(n),e instanceof t){if(e.loose===!!n.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Bm("comparator",e,n),this.options=n,this.loose=!!n.loose,this.parse(e),this.semver===eo?this.value="":this.value=this.operator+this.semver.version,Bm("comp",this)}parse(e){let n=this.options.loose?n0[i0.COMPARATORLOOSE]:n0[i0.COMPARATOR],i=e.match(n);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new o0(i[2],this.options.loose):this.semver=eo}toString(){return this.value}test(e){if(Bm("Comparator.test",e,this.options.loose),this.semver===eo||e===eo)return!0;if(typeof e=="string")try{e=new o0(e,this.options)}catch{return!1}return Zm(e,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new s0(e.value,n).test(this.value):e.operator===""?e.value===""?!0:new s0(this.value,n).test(e.semver):(n=r0(n),n.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Zm(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Zm(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};a0.exports=Gm;var r0=Ba(),{safeRe:n0,t:i0}=An(),Zm=jm(),Bm=Yi(),o0=_e(),s0=rt()});var to=z((bF,u0)=>{"use strict";var bz=rt(),$z=(t,e,n)=>{try{e=new bz(e,n)}catch{return!1}return e.test(t)};u0.exports=$z});var l0=z(($F,c0)=>{"use strict";var xz=rt(),wz=(t,e)=>new xz(t,e).set.map(n=>n.map(i=>i.value).join(" ").trim().split(" "));c0.exports=wz});var f0=z((xF,d0)=>{"use strict";var Sz=_e(),kz=rt(),Iz=(t,e,n)=>{let i=null,r=null,o=null;try{o=new kz(e,n)}catch{return null}return t.forEach(s=>{o.test(s)&&(!i||r.compare(s)===-1)&&(i=s,r=new Sz(i,n))}),i};d0.exports=Iz});var p0=z((wF,h0)=>{"use strict";var Ez=_e(),Tz=rt(),Oz=(t,e,n)=>{let i=null,r=null,o=null;try{o=new Tz(e,n)}catch{return null}return t.forEach(s=>{o.test(s)&&(!i||r.compare(s)===1)&&(i=s,r=new Ez(i,n))}),i};h0.exports=Oz});var v0=z((SF,g0)=>{"use strict";var Wm=_e(),Pz=rt(),m0=Xi(),Cz=(t,e)=>{t=new Pz(t,e);let n=new Wm("0.0.0");if(t.test(n)||(n=new Wm("0.0.0-0"),t.test(n)))return n;n=null;for(let i=0;i<t.set.length;++i){let r=t.set[i],o=null;r.forEach(s=>{let a=new Wm(s.semver.version);switch(s.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||m0(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),o&&(!n||m0(n,o))&&(n=o)}return n&&t.test(n)?n:null};g0.exports=Cz});var _0=z((kF,y0)=>{"use strict";var Az=rt(),zz=(t,e)=>{try{return new Az(t,e).range||"*"}catch{return null}};y0.exports=zz});var tu=z((IF,w0)=>{"use strict";var Nz=_e(),x0=Qi(),{ANY:Rz}=x0,Dz=rt(),Lz=to(),b0=Xi(),$0=Ka(),Uz=Xa(),jz=Ya(),Mz=(t,e,n,i)=>{t=new Nz(t,i),e=new Dz(e,i);let r,o,s,a,u;switch(n){case">":r=b0,o=Uz,s=$0,a=">",u=">=";break;case"<":r=$0,o=jz,s=b0,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Lz(t,e,i))return!1;for(let c=0;c<e.set.length;++c){let l=e.set[c],d=null,f=null;if(l.forEach(h=>{h.semver===Rz&&(h=new x0(">=0.0.0")),d=d||h,f=f||h,r(h.semver,d.semver,i)?d=h:s(h.semver,f.semver,i)&&(f=h)}),d.operator===a||d.operator===u||(!f.operator||f.operator===a)&&o(t,f.semver))return!1;if(f.operator===u&&s(t,f.semver))return!1}return!0};w0.exports=Mz});var k0=z((EF,S0)=>{"use strict";var Fz=tu(),Vz=(t,e,n)=>Fz(t,e,">",n);S0.exports=Vz});var E0=z((TF,I0)=>{"use strict";var Zz=tu(),Bz=(t,e,n)=>Zz(t,e,"<",n);I0.exports=Bz});var P0=z((OF,O0)=>{"use strict";var T0=rt(),Gz=(t,e,n)=>(t=new T0(t,n),e=new T0(e,n),t.intersects(e,n));O0.exports=Gz});var A0=z((PF,C0)=>{"use strict";var Wz=to(),qz=tt();C0.exports=(t,e,n)=>{let i=[],r=null,o=null,s=t.sort((l,d)=>qz(l,d,n));for(let l of s)Wz(l,e,n)?(o=l,r||(r=l)):(o&&i.push([r,o]),o=null,r=null);r&&i.push([r,null]);let a=[];for(let[l,d]of i)l===d?a.push(l):!d&&l===s[0]?a.push("*"):d?l===s[0]?a.push(`<=${d}`):a.push(`${l} - ${d}`):a.push(`>=${l}`);let u=a.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return u.length<c.length?u:e}});var U0=z((CF,L0)=>{"use strict";var z0=rt(),Jm=Qi(),{ANY:qm}=Jm,Hm=to(),Km=tt(),Hz=(t,e,n={})=>{if(t===e)return!0;t=new z0(t,n),e=new z0(e,n);let i=!1;e:for(let r of t.set){for(let o of e.set){let s=Kz(r,o,n);if(i=i||s!==null,s)continue e}if(i)return!1}return!0},Jz=[new Jm(">=0.0.0-0")],N0=[new Jm(">=0.0.0")],Kz=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===qm){if(e.length===1&&e[0].semver===qm)return!0;n.includePrerelease?t=Jz:t=N0}if(e.length===1&&e[0].semver===qm){if(n.includePrerelease)return!0;e=N0}let i=new Set,r,o;for(let h of t)h.operator===">"||h.operator===">="?r=R0(r,h,n):h.operator==="<"||h.operator==="<="?o=D0(o,h,n):i.add(h.semver);if(i.size>1)return null;let s;if(r&&o){if(s=Km(r.semver,o.semver,n),s>0)return null;if(s===0&&(r.operator!==">="||o.operator!=="<="))return null}for(let h of i){if(r&&!Hm(h,String(r),n)||o&&!Hm(h,String(o),n))return null;for(let p of e)if(!Hm(h,String(p),n))return!1;return!0}let a,u,c,l,d=o&&!n.includePrerelease&&o.semver.prerelease.length?o.semver:!1,f=r&&!n.includePrerelease&&r.semver.prerelease.length?r.semver:!1;d&&d.prerelease.length===1&&o.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(let h of e){if(l=l||h.operator===">"||h.operator===">=",c=c||h.operator==="<"||h.operator==="<=",r){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator===">"||h.operator===">="){if(a=R0(r,h,n),a===h&&a!==r)return!1}else if(r.operator===">="&&!h.test(r.semver))return!1}if(o){if(d&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===d.major&&h.semver.minor===d.minor&&h.semver.patch===d.patch&&(d=!1),h.operator==="<"||h.operator==="<="){if(u=D0(o,h,n),u===h&&u!==o)return!1}else if(o.operator==="<="&&!h.test(o.semver))return!1}if(!h.operator&&(o||r)&&s!==0)return!1}return!(r&&c&&!o&&s!==0||o&&l&&!r&&s!==0||f||d)},R0=(t,e,n)=>{if(!t)return e;let i=Km(t.semver,e.semver,n);return i>0?t:i<0||e.operator===">"&&t.operator===">="?e:t},D0=(t,e,n)=>{if(!t)return e;let i=Km(t.semver,e.semver,n);return i<0?t:i>0||e.operator==="<"&&t.operator==="<="?e:t};L0.exports=Hz});var V0=z((AF,F0)=>{"use strict";var Ym=An(),j0=Cn(),Yz=_e(),M0=Nm(),Xz=Qt(),Qz=lS(),e4=fS(),t4=mS(),r4=yS(),n4=bS(),i4=xS(),o4=SS(),s4=IS(),a4=tt(),u4=PS(),c4=AS(),l4=Ja(),d4=DS(),f4=US(),h4=Xi(),p4=Ka(),m4=Lm(),g4=Um(),v4=Ya(),y4=Xa(),_4=jm(),b4=qS(),$4=JS(),x4=Qi(),w4=rt(),S4=to(),k4=l0(),I4=f0(),E4=p0(),T4=v0(),O4=_0(),P4=tu(),C4=k0(),A4=E0(),z4=P0(),N4=A0(),R4=U0();F0.exports={parse:Xz,valid:Qz,clean:e4,inc:t4,diff:r4,major:n4,minor:i4,patch:o4,prerelease:s4,compare:a4,rcompare:u4,compareLoose:c4,compareBuild:l4,sort:d4,rsort:f4,gt:h4,lt:p4,eq:m4,neq:g4,gte:v4,lte:y4,cmp:_4,coerce:b4,truncate:$4,Comparator:x4,Range:w4,satisfies:S4,toComparators:k4,maxSatisfying:I4,minSatisfying:E4,minVersion:T4,validRange:O4,outside:P4,gtr:C4,ltr:A4,intersects:z4,simplifyRange:N4,subset:R4,SemVer:Yz,re:Ym.re,src:Ym.src,tokens:Ym.t,SEMVER_SPEC_VERSION:j0.SEMVER_SPEC_VERSION,RELEASE_TYPES:j0.RELEASE_TYPES,compareIdentifiers:M0.compareIdentifiers,rcompareIdentifiers:M0.rcompareIdentifiers}});var q0=z((FF,Xm)=>{var iu=process||{},G0=iu.argv||[],nu=iu.env||{},j4=!(nu.NO_COLOR||G0.includes("--no-color"))&&(!!nu.FORCE_COLOR||G0.includes("--color")||iu.platform==="win32"||(iu.stdout||{}).isTTY&&nu.TERM!=="dumb"||!!nu.CI),M4=(t,e,n=t)=>i=>{let r=""+i,o=r.indexOf(e,t.length);return~o?t+F4(r,e,n,o)+e:t+r+e},F4=(t,e,n,i)=>{let r="",o=0;do r+=t.substring(o,i)+n,o=i+e.length,i=t.indexOf(e,o);while(~i);return r+t.substring(o)},W0=(t=j4)=>{let e=t?M4:()=>String;return{isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};Xm.exports=W0();Xm.exports.createColors=W0});var ig=z((hV,fk)=>{"use strict";var ng={to(t,e){return e?`\x1B[${e+1};${t+1}H`:`\x1B[${t+1}G`},move(t,e){let n="";return t<0?n+=`\x1B[${-t}D`:t>0&&(n+=`\x1B[${t}C`),e<0?n+=`\x1B[${-e}A`:e>0&&(n+=`\x1B[${e}B`),n},up:(t=1)=>`\x1B[${t}A`,down:(t=1)=>`\x1B[${t}B`,forward:(t=1)=>`\x1B[${t}C`,backward:(t=1)=>`\x1B[${t}D`,nextLine:(t=1)=>"\x1B[E".repeat(t),prevLine:(t=1)=>"\x1B[F".repeat(t),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},lN={up:(t=1)=>"\x1B[S".repeat(t),down:(t=1)=>"\x1B[T".repeat(t)},dN={screen:"\x1B[2J",up:(t=1)=>"\x1B[1J".repeat(t),down:(t=1)=>"\x1B[J".repeat(t),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(t){let e="";for(let n=0;n<t;n++)e+=this.line+(n<t-1?ng.up():"");return t&&(e+=ng.left),e}};fk.exports={cursor:ng,scroll:lN,erase:dN,beep:"\x07"}});function rI(t,e){if(e<=1)return t;let n=Math.floor(t.length/e),i=new Int16Array(n);for(let r=0;r<n;r++){let o=0,s=r*e;for(let a=0;a<e;a++)o+=t[s+a];i[r]=Math.round(o/e)}return i}var ku,nI=v(()=>{"use strict";ku=class{step;pos=0;prev=0;primed=!1;constructor(e,n){if(e<=0||n<=0)throw new RangeError("resampler rates must be positive");this.step=e/n}process(e){if(e.length===0)return new Int16Array(0);let n=[],i=e.length-1,r=this.primed?this.pos:0;for(;;){let o=Math.floor(r);if(o+1>i)break;let s=o<0?this.prev:e[o],a=e[o+1];n.push(Math.round(s+(a-s)*(r-o))),r+=this.step}return this.prev=e[i],this.primed=!0,this.pos=r-e.length,Int16Array.from(n)}}});function oI(t){return t.byteLength/2/sR}function aR(t){let e=t.byteLength>>1,n=new DataView(t.buffer,t.byteOffset,t.byteLength),i=new Int16Array(e);for(let r=0;r<e;r++)i[r]=n.getInt16(r*2,!0);return i}var iI,sR,Iu,sI=v(()=>{"use strict";De();ja();iI=32,sR=16,Iu=class{constructor(e,n,i={}){this.vad=e;this.onSpeech=n;this.speechThreshold=i.speechThreshold??.5,this.onsetMs=i.onsetMs??2*iI,this.holdoffMs=i.holdoffMs??300,this.energyThreshold=i.energyThreshold??.01,this.log=i.log??q}vad;onSpeech;speechThreshold;onsetMs;holdoffMs;energyThreshold;log;inSpeech=!1;speechRunMs=0;silenceRunMs=0;degraded=!1;closed=!1;feed(e){if(!(this.closed||e.byteLength===0)){if(this.degraded){this.applyVerdict(Bt(e,this.energyThreshold),oI(e));return}this.vad.process(aR(e)).then(n=>{if(!this.closed)for(let i of n)this.applyVerdict(i>=this.speechThreshold,iI)},n=>{this.closed||(this.degrade(n),this.applyVerdict(Bt(e,this.energyThreshold),oI(e)))})}}close(){this.closed=!0}applyVerdict(e,n){e?(this.silenceRunMs=0,this.speechRunMs+=n,!this.inSpeech&&this.speechRunMs>=this.onsetMs&&(this.inSpeech=!0,this.onSpeech())):(this.speechRunMs=0,this.inSpeech&&(this.silenceRunMs+=n,this.silenceRunMs>=this.holdoffMs&&(this.inSpeech=!1,this.silenceRunMs=0)))}degrade(e){this.degraded||(this.degraded=!0,this.log.debug("barge-in DEGRADED to energy onset - silero vad failed; speech onsets detect on RMS energy for the rest of the capture session",{error:e instanceof Error?e.message:String(e)}))}}});var Sg={};He(Sg,{DecibriCapture:()=>$g,DecibriPlayback:()=>xg,hasInputDevice:()=>lR});import{Microphone as uR,Speaker as cR,inputDevices as uI}from"decibri";function lR(){try{return uI().length>0}catch(t){return q.debug("audio input enumeration failed; treating as no microphone",{error:t}),!1}}function dR(){try{let t=uI(),e=t.find(n=>n.isDefault)??t[0];if(e&&e.defaultSampleRate>=1e3&&e.maxInputChannels>=1)return{sampleRate:Math.round(e.defaultSampleRate),channels:e.maxInputChannels}}catch(t){q.debug("could not read default input device; opening at 16k mono",{error:t})}return{sampleRate:Eu,channels:wg}}function fR(t){return Math.max(64,Math.min(65536,Math.round(t/10)))}function hR(t,e,n){let i=new Uint8Array(t),r=new Int16Array(i.buffer,0,i.byteLength>>1),o=n.process(rI(r,e));return Buffer.from(o.buffer,o.byteOffset,o.byteLength)}function pR(t){return Buffer.from(t.buffer,t.byteOffset,t.byteLength)}var Eu,wg,cI,aI,$g,xg,kg=v(()=>{"use strict";De();ja();nI();sI();Eu=16e3,wg=1,cI="int16",aI=.01;$g=class{constructor(e={}){this.deps=e}deps;mic=null;onData=null;onSpeech=null;onErr=null;vad=null;detector=null;async start(e){let{sampleRate:n,channels:i}=dR(),r=(this.deps.createVad??(()=>new _r))(),o=null;try{await r.load(),o=new Iu(r,()=>e.onSpeechStart(),{energyThreshold:aI})}catch(u){q.debug("silero vad unavailable; barge-in falls back to decibri energy vad",{error:u}),r.dispose().catch(()=>{})}let s;try{s=await uR.open({sampleRate:n,channels:i,dtype:cI,...o?{vad:!1}:{vad:"energy",vadThreshold:aI},framesPerBuffer:fR(n)})}catch(u){throw o?.close(),o&&r.dispose().catch(()=>{}),u}this.vad=o?r:null,this.detector=o;let a=n===Eu&&i===wg?null:new ku(n,Eu);this.onData=a?u=>{let c=hR(u,i,a);c.byteLength>0&&(this.detector?.feed(c),e.onFrame(c,Date.now()))}:u=>{this.detector?.feed(u),e.onFrame(u,Date.now())},this.onSpeech=()=>e.onSpeechStart(),this.onErr=u=>e.onError(u),s.on("data",this.onData),s.on("speech",this.onSpeech),s.on("error",this.onErr),this.mic=s}async stop(){let e=this.mic;this.mic=null,this.detector?.close(),this.detector=null,e&&(this.onData&&e.removeListener("data",this.onData),this.onSpeech&&e.removeListener("speech",this.onSpeech),this.onErr&&e.removeListener("error",this.onErr),e.on("error",()=>{}),e.stop()),this.onData=null,this.onSpeech=null,this.onErr=null;let n=this.vad;this.vad=null,n&&await n.dispose().catch(()=>{})}},xg=class{speaker=null;writeChain=Promise.resolve();generation=0;closed=!1;play(e){if(this.closed)return;let n=this.generation;this.writeChain=this.writeChain.then(async()=>{if(!(this.closed||n!==this.generation))try{await this.ensureSpeaker().writeAsync(pR(e))}catch(i){q.debug("playback write skipped",{error:i})}})}flush(){this.generation++;let e=this.speaker;this.speaker=null,e?.stop()}async drained(){await this.writeChain;let e=this.speaker;if(e)try{await e.drainAsync()}catch(n){q.debug("playback drain interrupted",{error:n})}}close(){return this.closed=!0,this.flush(),Promise.resolve()}ensureSpeaker(){return this.speaker??=new cR({sampleRate:Eu,channels:wg,dtype:cI}),this.speaker}}});De();ja();xi();import{readFileSync as mR}from"node:fs";import{randomUUID as gR}from"node:crypto";var mt=class extends Error{constructor(e,n,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=n,this.exitCode=e,this.nestedError=void 0}},Ot=class extends mt{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};var Ji=class{constructor(e,n){switch(this.description=n||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,n){return n===this.defaultValue||!Array.isArray(n)?[e]:(n.push(e),n)}default(e,n){return this.defaultValue=e,this.defaultValueDescription=n,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,i)=>{if(!this.argChoices.includes(n))throw new Ot(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(n,i):n},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Ma(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}import{EventEmitter as SC}from"node:events";import Cm from"node:child_process";import Pt from"node:path";import Va from"node:fs";import B from"node:process";import{stripVTControlCharacters as kC}from"node:util";import{stripVTControlCharacters as $C}from"node:util";var Ki=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let n=e.commands.filter(r=>!r._hidden),i=e._getHelpCommand();return i&&!i._hidden&&n.push(i),this.sortSubcommands&&n.sort((r,o)=>r.name().localeCompare(o.name())),n}compareOptions(e,n){let i=r=>r.short?r.short.replace(/^-/,""):r.long.replace(/^--/,"");return i(e).localeCompare(i(n))}visibleOptions(e){let n=e.options.filter(r=>!r.hidden),i=e._getHelpOption();if(i&&!i.hidden){let r=i.short&&e._findOption(i.short),o=i.long&&e._findOption(i.long);!r&&!o?n.push(i):i.long&&!o?n.push(e.createOption(i.long,i.description)):i.short&&!r&&n.push(e.createOption(i.short,i.description))}return this.sortOptions&&n.sort(this.compareOptions),n}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let n=[];for(let i=e.parent;i;i=i.parent){let r=i.options.filter(o=>!o.hidden);n.push(...r)}return this.sortOptions&&n.sort(this.compareOptions),n}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(n=>{n.description=n.description||e._argsDescription[n.name()]||""}),e.registeredArguments.find(n=>n.description)?e.registeredArguments:[]}subcommandTerm(e){let n=e.registeredArguments.map(i=>Ma(i)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(n?" "+n:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,n){return n.visibleCommands(e).reduce((i,r)=>Math.max(i,this.displayWidth(n.styleSubcommandTerm(n.subcommandTerm(r)))),0)}longestOptionTermLength(e,n){return n.visibleOptions(e).reduce((i,r)=>Math.max(i,this.displayWidth(n.styleOptionTerm(n.optionTerm(r)))),0)}longestGlobalOptionTermLength(e,n){return n.visibleGlobalOptions(e).reduce((i,r)=>Math.max(i,this.displayWidth(n.styleOptionTerm(n.optionTerm(r)))),0)}longestArgumentTermLength(e,n){return n.visibleArguments(e).reduce((i,r)=>Math.max(i,this.displayWidth(n.styleArgumentTerm(n.argumentTerm(r)))),0)}commandUsage(e){let n=e._name;e._aliases[0]&&(n=n+"|"+e._aliases[0]);let i="";for(let r=e.parent;r;r=r.parent)i=r.name()+" "+i;return i+n+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let n=[];if(e.argChoices&&n.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&n.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&n.push(`env: ${e.envVar}`),n.length>0){let i=`(${n.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}argumentDescription(e){let n=[];if(e.argChoices&&n.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),n.length>0){let i=`(${n.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}formatItemList(e,n,i){return n.length===0?[]:[i.styleTitle(e),...n,""]}groupItems(e,n,i){let r=new Map;return e.forEach(o=>{let s=i(o);r.has(s)||r.set(s,[])}),n.forEach(o=>{let s=i(o);r.has(s)||r.set(s,[]),r.get(s).push(o)}),r}formatHelp(e,n){let i=n.padWidth(e,n),r=n.helpWidth??80;function o(d,f){return n.formatItem(d,i,f,n)}let s=[`${n.styleTitle("Usage:")} ${n.styleUsage(n.commandUsage(e))}`,""],a=n.commandDescription(e);a.length>0&&(s=s.concat([n.boxWrap(n.styleCommandDescription(a),r),""]));let u=n.visibleArguments(e).map(d=>o(n.styleArgumentTerm(n.argumentTerm(d)),n.styleArgumentDescription(n.argumentDescription(d))));if(s=s.concat(this.formatItemList("Arguments:",u,n)),this.groupItems(e.options,n.visibleOptions(e),d=>d.helpGroupHeading??"Options:").forEach((d,f)=>{let h=d.map(p=>o(n.styleOptionTerm(n.optionTerm(p)),n.styleOptionDescription(n.optionDescription(p))));s=s.concat(this.formatItemList(f,h,n))}),n.showGlobalOptions){let d=n.visibleGlobalOptions(e).map(f=>o(n.styleOptionTerm(n.optionTerm(f)),n.styleOptionDescription(n.optionDescription(f))));s=s.concat(this.formatItemList("Global Options:",d,n))}return this.groupItems(e.commands,n.visibleCommands(e),d=>d.helpGroup()||"Commands:").forEach((d,f)=>{let h=d.map(p=>o(n.styleSubcommandTerm(n.subcommandTerm(p)),n.styleSubcommandDescription(n.subcommandDescription(p))));s=s.concat(this.formatItemList(f,h,n))}),s.join(`
120
+ `)}displayWidth(e){return $C(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(n=>n==="[options]"?this.styleOptionText(n):n==="[command]"?this.styleSubcommandText(n):n[0]==="["||n[0]==="<"?this.styleArgumentText(n):this.styleCommandText(n)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(n=>n==="[options]"?this.styleOptionText(n):n[0]==="["||n[0]==="<"?this.styleArgumentText(n):this.styleSubcommandText(n)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,n){return Math.max(n.longestOptionTermLength(e,n),n.longestGlobalOptionTermLength(e,n),n.longestSubcommandTermLength(e,n),n.longestArgumentTermLength(e,n))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,n,i,r){let s=" ".repeat(2);if(!i)return s+e;let a=e.padEnd(n+e.length-r.displayWidth(e)),u=2,l=(this.helpWidth??80)-n-u-2,d;return l<this.minWidthToWrap||r.preformatted(i)?d=i:d=r.boxWrap(i,l).replace(/\n/g,`
79
121
  `+" ".repeat(n+u)),s+a+" ".repeat(u)+d.replace(/\n/g,`
80
122
  ${s}`)}boxWrap(e,n){if(n<this.minWidthToWrap)return e;let i=e.split(/\r\n|\n/),r=/[\s]*[^\s]+/g,o=[];return i.forEach(s=>{let a=s.match(r);if(a===null){o.push("");return}let u=[a.shift()],c=this.displayWidth(u[0]);a.forEach(l=>{let d=this.displayWidth(l);if(c+d<=n){u.push(l),c+=d;return}o.push(u.join(""));let f=l.trimStart();u=[f],c=this.displayWidth(f)}),o.push(u.join(""))}),o.join(`
81
- `)}};var En=class{constructor(e,n){this.flags=e,this.description=n||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let i=YP(e);this.short=i.shortFlag,this.long=i.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,n){return this.defaultValue=e,this.defaultValueDescription=n,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let n=e;return typeof e=="string"&&(n={[e]:!0}),this.implied=Object.assign(this.implied||{},n),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,n){return n===this.defaultValue||!Array.isArray(n)?[e]:(n.push(e),n)}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,i)=>{if(!this.argChoices.includes(n))throw new Ot(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(n,i):n},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Lw(this.name().replace(/^no-/,"")):Lw(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},ja=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(n=>{n.negate?this.negativeOptions.set(n.attributeName(),n):this.positiveOptions.set(n.attributeName(),n)}),this.negativeOptions.forEach((n,i)=>{this.positiveOptions.has(i)&&this.dualOptions.add(i)})}valueFromOption(e,n){let i=n.attributeName();if(!this.dualOptions.has(i))return!0;let r=this.negativeOptions.get(i).presetArg,o=r!==void 0?r:!1;return n.negate===(o===e)}};function Lw(t){return t.split("-").reduce((e,n)=>e+n[0].toUpperCase()+n.slice(1))}function YP(t){let e,n,i=/^-[^-]$/,r=/^--[^-]/,o=t.split(/[ |,]+/).concat("guard");if(i.test(o[0])&&(e=o.shift()),r.test(o[0])&&(n=o.shift()),!e&&i.test(o[0])&&(e=o.shift()),!e&&r.test(o[0])&&(e=n,n=o.shift()),o[0].startsWith("-")){let s=o[0],a=`option creation failed due to '${s}' in option flags '${t}'`;throw/^-[^-][^-]/.test(s)?new Error(`${a}
123
+ `)}};var On=class{constructor(e,n){this.flags=e,this.description=n||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let i=xC(e);this.short=i.shortFlag,this.long=i.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,n){return this.defaultValue=e,this.defaultValueDescription=n,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let n=e;return typeof e=="string"&&(n={[e]:!0}),this.implied=Object.assign(this.implied||{},n),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,n){return n===this.defaultValue||!Array.isArray(n)?[e]:(n.push(e),n)}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,i)=>{if(!this.argChoices.includes(n))throw new Ot(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(n,i):n},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Hw(this.name().replace(/^no-/,"")):Hw(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Fa=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(n=>{n.negate?this.negativeOptions.set(n.attributeName(),n):this.positiveOptions.set(n.attributeName(),n)}),this.negativeOptions.forEach((n,i)=>{this.positiveOptions.has(i)&&this.dualOptions.add(i)})}valueFromOption(e,n){let i=n.attributeName();if(!this.dualOptions.has(i))return!0;let r=this.negativeOptions.get(i).presetArg,o=r!==void 0?r:!1;return n.negate===(o===e)}};function Hw(t){return t.split("-").reduce((e,n)=>e+n[0].toUpperCase()+n.slice(1))}function xC(t){let e,n,i=/^-[^-]$/,r=/^--[^-]/,o=t.split(/[ |,]+/).concat("guard");if(i.test(o[0])&&(e=o.shift()),r.test(o[0])&&(n=o.shift()),!e&&i.test(o[0])&&(e=o.shift()),!e&&r.test(o[0])&&(e=n,n=o.shift()),o[0].startsWith("-")){let s=o[0],a=`option creation failed due to '${s}' in option flags '${t}'`;throw/^-[^-][^-]/.test(s)?new Error(`${a}
82
124
  - a short flag is a single dash and a single character
83
125
  - either use a single dash and a single character (for a short flag)
84
126
  - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):i.test(s)?new Error(`${a}
85
127
  - too many short flags`):r.test(s)?new Error(`${a}
86
128
  - too many long flags`):new Error(`${a}
87
- - unrecognised flag format`)}if(e===void 0&&n===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return{shortFlag:e,longFlag:n}}function XP(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let n=[];for(let i=0;i<=t.length;i++)n[i]=[i];for(let i=0;i<=e.length;i++)n[0][i]=i;for(let i=1;i<=e.length;i++)for(let r=1;r<=t.length;r++){let o;t[r-1]===e[i-1]?o=0:o=1,n[r][i]=Math.min(n[r-1][i]+1,n[r][i-1]+1,n[r-1][i-1]+o),r>1&&i>1&&t[r-1]===e[i-2]&&t[r-2]===e[i-1]&&(n[r][i]=Math.min(n[r][i],n[r-2][i-2]+1))}return n[t.length][e.length]}function wm(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let n=t.startsWith("--");n&&(t=t.slice(2),e=e.map(s=>s.slice(2)));let i=[],r=3,o=.4;return e.forEach(s=>{if(s.length<=1)return;let a=XP(t,s),u=Math.max(t.length,s.length);(u-a)/u>o&&(a<r?(r=a,i=[s]):a===r&&i.push(s))}),i.sort((s,a)=>s.localeCompare(a)),n&&(i=i.map(s=>`--${s}`)),i.length>1?`
129
+ - unrecognised flag format`)}if(e===void 0&&n===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return{shortFlag:e,longFlag:n}}function wC(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let n=[];for(let i=0;i<=t.length;i++)n[i]=[i];for(let i=0;i<=e.length;i++)n[0][i]=i;for(let i=1;i<=e.length;i++)for(let r=1;r<=t.length;r++){let o;t[r-1]===e[i-1]?o=0:o=1,n[r][i]=Math.min(n[r-1][i]+1,n[r][i-1]+1,n[r-1][i-1]+o),r>1&&i>1&&t[r-1]===e[i-2]&&t[r-2]===e[i-1]&&(n[r][i]=Math.min(n[r][i],n[r-2][i-2]+1))}return n[t.length][e.length]}function Pm(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let n=t.startsWith("--");n&&(t=t.slice(2),e=e.map(s=>s.slice(2)));let i=[],r=3,o=.4;return e.forEach(s=>{if(s.length<=1)return;let a=wC(t,s),u=Math.max(t.length,s.length);(u-a)/u>o&&(a<r?(r=a,i=[s]):a===r&&i.push(s))}),i.sort((s,a)=>s.localeCompare(a)),n&&(i=i.map(s=>`--${s}`)),i.length>1?`
88
130
  (Did you mean one of ${i.join(", ")}?)`:i.length===1?`
89
- (Did you mean ${i[0]}?)`:""}var Tn=class t extends QP{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:n=>B.stdout.write(n),writeErr:n=>B.stderr.write(n),outputError:(n,i)=>i(n),getOutHelpWidth:()=>B.stdout.isTTY?B.stdout.columns:void 0,getErrHelpWidth:()=>B.stderr.isTTY?B.stderr.columns:void 0,getOutHasColors:()=>Uw()??(B.stdout.isTTY&&B.stdout.hasColors?.()),getErrHasColors:()=>Uw()??(B.stderr.isTTY&&B.stderr.hasColors?.()),stripColor:n=>eC(n)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let n=this;n;n=n.parent)e.push(n);return e}command(e,n,i){let r=n,o=i;typeof r=="object"&&r!==null&&(o=r,r=null),o=o||{};let[,s,a]=e.match(/([^ ]+) *(.*)/),u=this.createCommand(s);return r&&(u.description(r),u._executableHandler=!0),o.isDefault&&(this._defaultCommandName=u._name),u._hidden=!!(o.noHelp||o.hidden),u._executableFile=o.executableFile||null,a&&u.arguments(a),this._registerCommand(u),u.parent=this,u.copyInheritedSettings(this),r?this:u}createCommand(e){return new t(e)}createHelp(){return Object.assign(new Hi,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,n){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
90
- - specify the name in Command constructor or using .name()`);return n=n||{},n.isDefault&&(this._defaultCommandName=e._name),(n.noHelp||n.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,n){return new qi(e,n)}argument(e,n,i,r){let o=this.createArgument(e,n);return typeof i=="function"?o.default(r).argParser(i):o.default(i),this.addArgument(o),this}arguments(e){return e.trim().split(/ +/).forEach(n=>{this.argument(n)}),this}addArgument(e){let n=this.registeredArguments.slice(-1)[0];if(n?.variadic)throw new Error(`only the last argument can be variadic '${n.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,n){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let i=e??"help [command]",[,r,o]=i.match(/([^ ]+) *(.*)/),s=n??"display help for command",a=this.createCommand(r);return a.helpOption(!1),o&&a.arguments(o),s&&a.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||n)&&this._initCommandGroup(a),this}addHelpCommand(e,n){return typeof e!="object"?(this.helpCommand(e,n),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,n){let i=["preSubcommand","preAction","postAction"];if(!i.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
91
- Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(n):this._lifeCycleHooks[e]=[n],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=n=>{if(n.code!=="commander.executeSubCommandAsync")throw n},this}_exit(e,n,i){this._exitCallback&&this._exitCallback(new mt(e,n,i)),B.exit(e)}action(e){let n=i=>{let r=this.registeredArguments.length,o=i.slice(0,r);return this._storeOptionsAsProperties?o[r]=this:o[r]=this.opts(),o.push(this),e.apply(this,o)};return this._actionHandler=n,this}createOption(e,n){return new En(e,n)}_callParseArg(e,n,i,r){try{return e.parseArg(n,i)}catch(o){if(o.code==="commander.invalidArgument"){let s=`${r} ${o.message}`;this.error(s,{exitCode:o.exitCode,code:o.code})}throw o}}_registerOption(e){let n=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(n){let i=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${i}'
92
- - already used by option '${n.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let n=r=>[r.name()].concat(r.aliases()),i=n(e).find(r=>this._findCommand(r));if(i){let r=n(this._findCommand(i)).join("|"),o=n(e).join("|");throw new Error(`cannot add command '${o}' as already have command '${r}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let n=e.name(),i=e.attributeName();e.defaultValue!==void 0&&this.setOptionValueWithSource(i,e.defaultValue,"default");let r=(o,s,a)=>{o==null&&e.presetArg!==void 0&&(o=e.presetArg);let u=this.getOptionValue(i);o!==null&&e.parseArg?o=this._callParseArg(e,o,u,s):o!==null&&e.variadic&&(o=e._collectValue(o,u)),o==null&&(e.negate?o=!1:e.isBoolean()||e.optional?o=!0:o=""),this.setOptionValueWithSource(i,o,a)};return this.on("option:"+n,o=>{let s=`error: option '${e.flags}' argument '${o}' is invalid.`;r(o,s,"cli")}),e.envVar&&this.on("optionEnv:"+n,o=>{let s=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;r(o,s,"env")}),this}_optionEx(e,n,i,r,o){if(typeof n=="object"&&n instanceof En)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(n,i);if(s.makeOptionMandatory(!!e.mandatory),typeof r=="function")s.default(o).argParser(r);else if(r instanceof RegExp){let a=r;r=(u,c)=>{let l=a.exec(u);return l?l[0]:c},s.default(o).argParser(r)}else s.default(r);return this.addOption(s)}option(e,n,i,r){return this._optionEx({},e,n,i,r)}requiredOption(e,n,i,r){return this._optionEx({mandatory:!0},e,n,i,r)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,n){return this.setOptionValueWithSource(e,n,void 0)}setOptionValueWithSource(e,n,i){return this._storeOptionsAsProperties?this[e]=n:this._optionValues[e]=n,this._optionValueSources[e]=i,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let n;return this._getCommandAndAncestors().forEach(i=>{i.getOptionValueSource(e)!==void 0&&(n=i.getOptionValueSource(e))}),n}_prepareUserArgs(e,n){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(n=n||{},e===void 0&&n.from===void 0){B.versions?.electron&&(n.from="electron");let r=B.execArgv??[];(r.includes("-e")||r.includes("--eval")||r.includes("-p")||r.includes("--print"))&&(n.from="eval")}e===void 0&&(e=B.argv),this.rawArgs=e.slice();let i;switch(n.from){case void 0:case"node":this._scriptPath=e[1],i=e.slice(2);break;case"electron":B.defaultApp?(this._scriptPath=e[1],i=e.slice(2)):i=e.slice(1);break;case"user":i=e.slice(0);break;case"eval":i=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${n.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",i}parse(e,n){this._prepareForParse();let i=this._prepareUserArgs(e,n);return this._parseCommand([],i),this}async parseAsync(e,n){this._prepareForParse();let i=this._prepareUserArgs(e,n);return await this._parseCommand([],i),this}_prepareForParse(){this._savedState===null?(this.options.filter(e=>e.negate&&e.defaultValue===void 0&&this.getOptionValue(e.attributeName())===void 0).forEach(e=>{let n=e.long.replace(/^--no-/,"--");this._findOption(n)||this.setOptionValueWithSource(e.attributeName(),!0,"default")}),this.saveStateBeforeParse()):this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
93
- - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,n,i){if(Ua.existsSync(e))return;let r=n?`searched for local subcommand relative to directory '${n}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",o=`'${e}' does not exist
131
+ (Did you mean ${i[0]}?)`:""}var Pn=class t extends SC{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:n=>B.stdout.write(n),writeErr:n=>B.stderr.write(n),outputError:(n,i)=>i(n),getOutHelpWidth:()=>B.stdout.isTTY?B.stdout.columns:void 0,getErrHelpWidth:()=>B.stderr.isTTY?B.stderr.columns:void 0,getOutHasColors:()=>Kw()??(B.stdout.isTTY&&B.stdout.hasColors?.()),getErrHasColors:()=>Kw()??(B.stderr.isTTY&&B.stderr.hasColors?.()),stripColor:n=>kC(n)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let n=this;n;n=n.parent)e.push(n);return e}command(e,n,i){let r=n,o=i;typeof r=="object"&&r!==null&&(o=r,r=null),o=o||{};let[,s,a]=e.match(/([^ ]+) *(.*)/),u=this.createCommand(s);return r&&(u.description(r),u._executableHandler=!0),o.isDefault&&(this._defaultCommandName=u._name),u._hidden=!!(o.noHelp||o.hidden),u._executableFile=o.executableFile||null,a&&u.arguments(a),this._registerCommand(u),u.parent=this,u.copyInheritedSettings(this),r?this:u}createCommand(e){return new t(e)}createHelp(){return Object.assign(new Ki,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,n){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
132
+ - specify the name in Command constructor or using .name()`);return n=n||{},n.isDefault&&(this._defaultCommandName=e._name),(n.noHelp||n.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,n){return new Ji(e,n)}argument(e,n,i,r){let o=this.createArgument(e,n);return typeof i=="function"?o.default(r).argParser(i):o.default(i),this.addArgument(o),this}arguments(e){return e.trim().split(/ +/).forEach(n=>{this.argument(n)}),this}addArgument(e){let n=this.registeredArguments.slice(-1)[0];if(n?.variadic)throw new Error(`only the last argument can be variadic '${n.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,n){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let i=e??"help [command]",[,r,o]=i.match(/([^ ]+) *(.*)/),s=n??"display help for command",a=this.createCommand(r);return a.helpOption(!1),o&&a.arguments(o),s&&a.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||n)&&this._initCommandGroup(a),this}addHelpCommand(e,n){return typeof e!="object"?(this.helpCommand(e,n),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,n){let i=["preSubcommand","preAction","postAction"];if(!i.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
133
+ Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(n):this._lifeCycleHooks[e]=[n],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=n=>{if(n.code!=="commander.executeSubCommandAsync")throw n},this}_exit(e,n,i){this._exitCallback&&this._exitCallback(new mt(e,n,i)),B.exit(e)}action(e){let n=i=>{let r=this.registeredArguments.length,o=i.slice(0,r);return this._storeOptionsAsProperties?o[r]=this:o[r]=this.opts(),o.push(this),e.apply(this,o)};return this._actionHandler=n,this}createOption(e,n){return new On(e,n)}_callParseArg(e,n,i,r){try{return e.parseArg(n,i)}catch(o){if(o.code==="commander.invalidArgument"){let s=`${r} ${o.message}`;this.error(s,{exitCode:o.exitCode,code:o.code})}throw o}}_registerOption(e){let n=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(n){let i=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${i}'
134
+ - already used by option '${n.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let n=r=>[r.name()].concat(r.aliases()),i=n(e).find(r=>this._findCommand(r));if(i){let r=n(this._findCommand(i)).join("|"),o=n(e).join("|");throw new Error(`cannot add command '${o}' as already have command '${r}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let n=e.name(),i=e.attributeName();e.defaultValue!==void 0&&this.setOptionValueWithSource(i,e.defaultValue,"default");let r=(o,s,a)=>{o==null&&e.presetArg!==void 0&&(o=e.presetArg);let u=this.getOptionValue(i);o!==null&&e.parseArg?o=this._callParseArg(e,o,u,s):o!==null&&e.variadic&&(o=e._collectValue(o,u)),o==null&&(e.negate?o=!1:e.isBoolean()||e.optional?o=!0:o=""),this.setOptionValueWithSource(i,o,a)};return this.on("option:"+n,o=>{let s=`error: option '${e.flags}' argument '${o}' is invalid.`;r(o,s,"cli")}),e.envVar&&this.on("optionEnv:"+n,o=>{let s=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;r(o,s,"env")}),this}_optionEx(e,n,i,r,o){if(typeof n=="object"&&n instanceof On)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(n,i);if(s.makeOptionMandatory(!!e.mandatory),typeof r=="function")s.default(o).argParser(r);else if(r instanceof RegExp){let a=r;r=(u,c)=>{let l=a.exec(u);return l?l[0]:c},s.default(o).argParser(r)}else s.default(r);return this.addOption(s)}option(e,n,i,r){return this._optionEx({},e,n,i,r)}requiredOption(e,n,i,r){return this._optionEx({mandatory:!0},e,n,i,r)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,n){return this.setOptionValueWithSource(e,n,void 0)}setOptionValueWithSource(e,n,i){return this._storeOptionsAsProperties?this[e]=n:this._optionValues[e]=n,this._optionValueSources[e]=i,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let n;return this._getCommandAndAncestors().forEach(i=>{i.getOptionValueSource(e)!==void 0&&(n=i.getOptionValueSource(e))}),n}_prepareUserArgs(e,n){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(n=n||{},e===void 0&&n.from===void 0){B.versions?.electron&&(n.from="electron");let r=B.execArgv??[];(r.includes("-e")||r.includes("--eval")||r.includes("-p")||r.includes("--print"))&&(n.from="eval")}e===void 0&&(e=B.argv),this.rawArgs=e.slice();let i;switch(n.from){case void 0:case"node":this._scriptPath=e[1],i=e.slice(2);break;case"electron":B.defaultApp?(this._scriptPath=e[1],i=e.slice(2)):i=e.slice(1);break;case"user":i=e.slice(0);break;case"eval":i=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${n.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",i}parse(e,n){this._prepareForParse();let i=this._prepareUserArgs(e,n);return this._parseCommand([],i),this}async parseAsync(e,n){this._prepareForParse();let i=this._prepareUserArgs(e,n);return await this._parseCommand([],i),this}_prepareForParse(){this._savedState===null?(this.options.filter(e=>e.negate&&e.defaultValue===void 0&&this.getOptionValue(e.attributeName())===void 0).forEach(e=>{let n=e.long.replace(/^--no-/,"--");this._findOption(n)||this.setOptionValueWithSource(e.attributeName(),!0,"default")}),this.saveStateBeforeParse()):this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
135
+ - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,n,i){if(Va.existsSync(e))return;let r=n?`searched for local subcommand relative to directory '${n}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",o=`'${e}' does not exist
94
136
  - if '${i}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
95
137
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
96
- - ${r}`;throw new Error(o)}_executeSubCommand(e,n){n=n.slice();let i=[".js",".ts",".tsx",".mjs",".cjs"];function r(l,d){let f=Pt.resolve(l,d);if(Ua.existsSync(f))return f;if(i.includes(Pt.extname(d)))return;let p=i.find(h=>Ua.existsSync(`${f}${h}`));if(p)return`${f}${p}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,s=this._executableDir||"";if(this._scriptPath){let l;try{l=Ua.realpathSync(this._scriptPath)}catch{l=this._scriptPath}s=Pt.resolve(Pt.dirname(l),s)}if(s){let l=r(s,o);if(!l&&!e._executableFile&&this._scriptPath){let d=Pt.basename(this._scriptPath,Pt.extname(this._scriptPath));d!==this._name&&(l=r(s,`${d}-${e._name}`))}o=l||o}let a=i.includes(Pt.extname(o)),u;B.platform!=="win32"?a?(n.unshift(o),n=jw(B.execArgv).concat(n),u=Sm.spawn(B.argv[0],n,{stdio:"inherit"})):u=Sm.spawn(o,n,{stdio:"inherit"}):(this._checkForMissingExecutable(o,s,e._name),n.unshift(o),n=jw(B.execArgv).concat(n),u=Sm.spawn(B.execPath,n,{stdio:"inherit"})),u.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(d=>{B.on(d,()=>{u.killed===!1&&u.exitCode===null&&u.kill(d)})});let c=this._exitCallback;u.on("close",l=>{l=l??1,c?c(new mt(l,"commander.executeSubCommandAsync","(close)")):B.exit(l)}),u.on("error",l=>{if(l.code==="ENOENT")this._checkForMissingExecutable(o,s,e._name);else if(l.code==="EACCES")throw new Error(`'${o}' not executable`);if(!c)B.exit(1);else{let d=new mt(1,"commander.executeSubCommandAsync","(error)");d.nestedError=l,c(d)}}),this.runningCommand=u}_dispatchSubcommand(e,n,i){let r=this._findCommand(e);r||this.help({error:!0}),r._prepareForParse();let o;return o=this._chainOrCallSubCommandHook(o,r,"preSubcommand"),o=this._chainOrCall(o,()=>{if(r._executableHandler)this._executeSubCommand(r,n.concat(i));else return r._parseCommand(n,i)}),o}_dispatchHelpCommand(e){e||this.help();let n=this._findCommand(e);return n&&!n._executableHandler&&n.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,n)=>{e.required&&this.args[n]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(i,r,o)=>{let s=r;if(r!==null&&i.parseArg){let a=`error: command-argument value '${r}' is invalid for argument '${i.name()}'.`;s=this._callParseArg(i,r,o,a)}return s};this._checkNumberOfArguments();let n=[];this.registeredArguments.forEach((i,r)=>{let o=i.defaultValue;i.variadic?r<this.args.length?(o=this.args.slice(r),i.parseArg&&(o=o.reduce((s,a)=>e(i,a,s),i.defaultValue))):o===void 0&&(o=[]):r<this.args.length&&(o=this.args[r],i.parseArg&&(o=e(i,o,i.defaultValue))),n[r]=o}),this.processedArgs=n}_chainOrCall(e,n){return e?.then&&typeof e.then=="function"?e.then(()=>n()):n()}_chainOrCallHooks(e,n){let i=e,r=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[n]!==void 0).forEach(o=>{o._lifeCycleHooks[n].forEach(s=>{r.push({hookedCommand:o,callback:s})})}),n==="postAction"&&r.reverse(),r.forEach(o=>{i=this._chainOrCall(i,()=>o.callback(o.hookedCommand,this))}),i}_chainOrCallSubCommandHook(e,n,i){let r=e;return this._lifeCycleHooks[i]!==void 0&&this._lifeCycleHooks[i].forEach(o=>{r=this._chainOrCall(r,()=>o(this,n))}),r}_parseCommand(e,n){let i=this.parseOptions(n);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(i.operands),n=i.unknown,this.args=e.concat(n),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),n);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(n),this._dispatchSubcommand(this._defaultCommandName,e,n);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(i.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=()=>{i.unknown.length>0&&this.unknownOption(i.unknown[0])},o=`command:${this.name()}`;if(this._actionHandler){r(),this._processArguments();let s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(o,e,n)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent?.listenerCount(o))r(),this._processArguments(),this.parent.emit(o,e,n);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,n);this.listenerCount("command:*")?this.emit("command:*",e,n):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(n=>n._name===e||n._aliases.includes(e))}_findOption(e){return this.options.find(n=>n.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(n=>{n.mandatory&&e.getOptionValue(n.attributeName())===void 0&&e.missingMandatoryOptionValue(n)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(i=>{let r=i.attributeName();return this.getOptionValue(r)===void 0?!1:this.getOptionValueSource(r)!=="default"});e.filter(i=>i.conflictsWith.length>0).forEach(i=>{let r=e.find(o=>i.conflictsWith.includes(o.attributeName()));r&&this._conflictingOption(i,r)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let n=[],i=[],r=n;function o(l){return l.length>1&&l[0]==="-"}let s=l=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(l)?!this._getCommandAndAncestors().some(d=>d.options.map(f=>f.short).some(f=>/^-\d$/.test(f))):!1,a=null,u=null,c=0;for(;c<e.length||u;){let l=u??e[c++];if(u=null,l==="--"){r===i&&r.push(l),r.push(...e.slice(c));break}if(a&&(!o(l)||s(l))){this.emit(`option:${a.name()}`,l);continue}if(a=null,o(l)){let d=this._findOption(l);if(d){if(d.required){let f=e[c++];f===void 0&&this.optionMissingArgument(d),this.emit(`option:${d.name()}`,f)}else if(d.optional){let f=null;c<e.length&&(!o(e[c])||s(e[c]))&&(f=e[c++]),this.emit(`option:${d.name()}`,f)}else this.emit(`option:${d.name()}`);a=d.variadic?d:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let d=this._findOption(`-${l[1]}`);if(d){d.required||d.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${d.name()}`,l.slice(2)):(this.emit(`option:${d.name()}`),u=`-${l.slice(2)}`);continue}}if(/^--[^=]+=/.test(l)){let d=l.indexOf("="),f=this._findOption(l.slice(0,d));if(f&&(f.required||f.optional)){this.emit(`option:${f.name()}`,l.slice(d+1));continue}}if(r===n&&o(l)&&!(this.commands.length===0&&s(l))&&(r=i),(this._enablePositionalOptions||this._passThroughOptions)&&n.length===0&&i.length===0){if(this._findCommand(l)){n.push(l),i.push(...e.slice(c));break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){n.push(l,...e.slice(c));break}else if(this._defaultCommandName){i.push(l,...e.slice(c));break}}if(this._passThroughOptions){r.push(l,...e.slice(c));break}r.push(l)}return{operands:n,unknown:i}}opts(){if(this._storeOptionsAsProperties){let e={},n=this.options.length;for(let i=0;i<n;i++){let r=this.options[i].attributeName();e[r]=r===this._versionOptionName?this._version:this[r]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,n)=>Object.assign(e,n.opts()),{})}error(e,n){this._outputConfiguration.outputError(`${e}
138
+ - ${r}`;throw new Error(o)}_executeSubCommand(e,n){n=n.slice();let i=[".js",".ts",".tsx",".mjs",".cjs"];function r(l,d){let f=Pt.resolve(l,d);if(Va.existsSync(f))return f;if(i.includes(Pt.extname(d)))return;let h=i.find(p=>Va.existsSync(`${f}${p}`));if(h)return`${f}${h}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,s=this._executableDir||"";if(this._scriptPath){let l;try{l=Va.realpathSync(this._scriptPath)}catch{l=this._scriptPath}s=Pt.resolve(Pt.dirname(l),s)}if(s){let l=r(s,o);if(!l&&!e._executableFile&&this._scriptPath){let d=Pt.basename(this._scriptPath,Pt.extname(this._scriptPath));d!==this._name&&(l=r(s,`${d}-${e._name}`))}o=l||o}let a=i.includes(Pt.extname(o)),u;B.platform!=="win32"?a?(n.unshift(o),n=Jw(B.execArgv).concat(n),u=Cm.spawn(B.argv[0],n,{stdio:"inherit"})):u=Cm.spawn(o,n,{stdio:"inherit"}):(this._checkForMissingExecutable(o,s,e._name),n.unshift(o),n=Jw(B.execArgv).concat(n),u=Cm.spawn(B.execPath,n,{stdio:"inherit"})),u.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(d=>{B.on(d,()=>{u.killed===!1&&u.exitCode===null&&u.kill(d)})});let c=this._exitCallback;u.on("close",l=>{l=l??1,c?c(new mt(l,"commander.executeSubCommandAsync","(close)")):B.exit(l)}),u.on("error",l=>{if(l.code==="ENOENT")this._checkForMissingExecutable(o,s,e._name);else if(l.code==="EACCES")throw new Error(`'${o}' not executable`);if(!c)B.exit(1);else{let d=new mt(1,"commander.executeSubCommandAsync","(error)");d.nestedError=l,c(d)}}),this.runningCommand=u}_dispatchSubcommand(e,n,i){let r=this._findCommand(e);r||this.help({error:!0}),r._prepareForParse();let o;return o=this._chainOrCallSubCommandHook(o,r,"preSubcommand"),o=this._chainOrCall(o,()=>{if(r._executableHandler)this._executeSubCommand(r,n.concat(i));else return r._parseCommand(n,i)}),o}_dispatchHelpCommand(e){e||this.help();let n=this._findCommand(e);return n&&!n._executableHandler&&n.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,n)=>{e.required&&this.args[n]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(i,r,o)=>{let s=r;if(r!==null&&i.parseArg){let a=`error: command-argument value '${r}' is invalid for argument '${i.name()}'.`;s=this._callParseArg(i,r,o,a)}return s};this._checkNumberOfArguments();let n=[];this.registeredArguments.forEach((i,r)=>{let o=i.defaultValue;i.variadic?r<this.args.length?(o=this.args.slice(r),i.parseArg&&(o=o.reduce((s,a)=>e(i,a,s),i.defaultValue))):o===void 0&&(o=[]):r<this.args.length&&(o=this.args[r],i.parseArg&&(o=e(i,o,i.defaultValue))),n[r]=o}),this.processedArgs=n}_chainOrCall(e,n){return e?.then&&typeof e.then=="function"?e.then(()=>n()):n()}_chainOrCallHooks(e,n){let i=e,r=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[n]!==void 0).forEach(o=>{o._lifeCycleHooks[n].forEach(s=>{r.push({hookedCommand:o,callback:s})})}),n==="postAction"&&r.reverse(),r.forEach(o=>{i=this._chainOrCall(i,()=>o.callback(o.hookedCommand,this))}),i}_chainOrCallSubCommandHook(e,n,i){let r=e;return this._lifeCycleHooks[i]!==void 0&&this._lifeCycleHooks[i].forEach(o=>{r=this._chainOrCall(r,()=>o(this,n))}),r}_parseCommand(e,n){let i=this.parseOptions(n);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(i.operands),n=i.unknown,this.args=e.concat(n),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),n);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(n),this._dispatchSubcommand(this._defaultCommandName,e,n);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(i.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=()=>{i.unknown.length>0&&this.unknownOption(i.unknown[0])},o=`command:${this.name()}`;if(this._actionHandler){r(),this._processArguments();let s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(o,e,n)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent?.listenerCount(o))r(),this._processArguments(),this.parent.emit(o,e,n);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,n);this.listenerCount("command:*")?this.emit("command:*",e,n):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(n=>n._name===e||n._aliases.includes(e))}_findOption(e){return this.options.find(n=>n.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(n=>{n.mandatory&&e.getOptionValue(n.attributeName())===void 0&&e.missingMandatoryOptionValue(n)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(i=>{let r=i.attributeName();return this.getOptionValue(r)===void 0?!1:this.getOptionValueSource(r)!=="default"});e.filter(i=>i.conflictsWith.length>0).forEach(i=>{let r=e.find(o=>i.conflictsWith.includes(o.attributeName()));r&&this._conflictingOption(i,r)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let n=[],i=[],r=n;function o(l){return l.length>1&&l[0]==="-"}let s=l=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(l)?!this._getCommandAndAncestors().some(d=>d.options.map(f=>f.short).some(f=>/^-\d$/.test(f))):!1,a=null,u=null,c=0;for(;c<e.length||u;){let l=u??e[c++];if(u=null,l==="--"){r===i&&r.push(l),r.push(...e.slice(c));break}if(a&&(!o(l)||s(l))){this.emit(`option:${a.name()}`,l);continue}if(a=null,o(l)){let d=this._findOption(l);if(d){if(d.required){let f=e[c++];f===void 0&&this.optionMissingArgument(d),this.emit(`option:${d.name()}`,f)}else if(d.optional){let f=null;c<e.length&&(!o(e[c])||s(e[c]))&&(f=e[c++]),this.emit(`option:${d.name()}`,f)}else this.emit(`option:${d.name()}`);a=d.variadic?d:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let d=this._findOption(`-${l[1]}`);if(d){d.required||d.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${d.name()}`,l.slice(2)):(this.emit(`option:${d.name()}`),u=`-${l.slice(2)}`);continue}}if(/^--[^=]+=/.test(l)){let d=l.indexOf("="),f=this._findOption(l.slice(0,d));if(f&&(f.required||f.optional)){this.emit(`option:${f.name()}`,l.slice(d+1));continue}}if(r===n&&o(l)&&!(this.commands.length===0&&s(l))&&(r=i),(this._enablePositionalOptions||this._passThroughOptions)&&n.length===0&&i.length===0){if(this._findCommand(l)){n.push(l),i.push(...e.slice(c));break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){n.push(l,...e.slice(c));break}else if(this._defaultCommandName){i.push(l,...e.slice(c));break}}if(this._passThroughOptions){r.push(l,...e.slice(c));break}r.push(l)}return{operands:n,unknown:i}}opts(){if(this._storeOptionsAsProperties){let e={},n=this.options.length;for(let i=0;i<n;i++){let r=this.options[i].attributeName();e[r]=r===this._versionOptionName?this._version:this[r]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,n)=>Object.assign(e,n.opts()),{})}error(e,n){this._outputConfiguration.outputError(`${e}
97
139
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
98
140
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
99
- `),this.outputHelp({error:!0}));let i=n||{},r=i.exitCode||1,o=i.code||"commander.error";this._exit(r,o,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in B.env){let n=e.attributeName();(this.getOptionValue(n)===void 0||["default","config","env"].includes(this.getOptionValueSource(n)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,B.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new ja(this.options),n=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&n(i.attributeName())&&e.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(r=>!n(r)).forEach(r=>{this.setOptionValueWithSource(r,i.implied[r],"implied")})})}missingArgument(e){let n=`error: missing required argument '${e}'`;this.error(n,{code:"commander.missingArgument"})}optionMissingArgument(e){let n=`error: option '${e.flags}' argument missing`;this.error(n,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let n=`error: required option '${e.flags}' not specified`;this.error(n,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,n){let i=s=>{let a=s.attributeName(),u=this.getOptionValue(a),c=this.options.find(d=>d.negate&&a===d.attributeName()),l=this.options.find(d=>!d.negate&&a===d.attributeName());return c&&(c.presetArg===void 0&&u===!1||c.presetArg!==void 0&&u===c.presetArg)?c:l||s},r=s=>{let a=i(s),u=a.attributeName();return this.getOptionValueSource(u)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},o=`error: ${r(e)} cannot be used with ${r(n)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let n="";if(e.startsWith("--")&&this._showSuggestionAfterError){let r=[],o=this;do{let s=o.createHelp().visibleOptions(o).filter(a=>a.long).map(a=>a.long);r=r.concat(s),o=o.parent}while(o&&!o._enablePositionalOptions);n=wm(e,r)}let i=`error: unknown option '${e}'${n}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let n=this.registeredArguments.length,i=n===1?"":"s",r=e.length,o=this.parent?` for '${this.name()}'`:"",s=e.join(", "),a=`error: too many arguments${o}. Expected ${n} argument${i} but got ${r}: ${s}.`;this.error(a,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],n="";if(this._showSuggestionAfterError){let r=[];this.createHelp().visibleCommands(this).forEach(o=>{r.push(o.name()),o.alias()&&r.push(o.alias())}),n=wm(e,r)}let i=`error: unknown command '${e}'${n}`;this.error(i,{code:"commander.unknownCommand"})}version(e,n,i){if(e===void 0)return this._version;this._version=e,n=n||"-V, --version",i=i||"output the version number";let r=this.createOption(n,i);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on("option:"+r.name(),()=>{this._outputConfiguration.writeOut(`${e}
100
- `),this._exit(0,"commander.version",e)}),this}description(e,n){return e===void 0&&n===void 0?this._description:(this._description=e,n&&(this._argsDescription=n),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let n=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(n=this.commands[this.commands.length-1]),e===n._name)throw new Error("Command alias can't be the same as its name");let i=this.parent?._findCommand(e);if(i){let r=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${r}'`)}return n._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(n=>this.alias(n)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let n=this.registeredArguments.map(i=>La(i));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?n:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=Pt.basename(e,Pt.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let n=this.createHelp(),i=this._getOutputContext(e);n.prepareContext({error:i.error,helpWidth:i.helpWidth,outputHasColors:i.hasColors});let r=n.formatHelp(this,n);return i.hasColors?r:this._outputConfiguration.stripColor(r)}_getOutputContext(e){e=e||{};let n=!!e.error,i,r,o;return n?(i=a=>this._outputConfiguration.writeErr(a),r=this._outputConfiguration.getErrHasColors(),o=this._outputConfiguration.getErrHelpWidth()):(i=a=>this._outputConfiguration.writeOut(a),r=this._outputConfiguration.getOutHasColors(),o=this._outputConfiguration.getOutHelpWidth()),{error:n,write:a=>(r||(a=this._outputConfiguration.stripColor(a)),i(a)),hasColors:r,helpWidth:o}}outputHelp(e){let n;typeof e=="function"&&(n=e,e=void 0);let i=this._getOutputContext(e),r={error:i.error,write:i.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",r)),this.emit("beforeHelp",r);let o=this.helpInformation({error:i.error});if(n&&(o=n(o),typeof o!="string"&&!Buffer.isBuffer(o)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(o),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",r),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",r))}helpOption(e,n){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",n??"display help for command"),(e||n)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let n=Number(B.exitCode??0);n===0&&e&&typeof e!="function"&&e.error&&(n=1),this._exit(n,"commander.help","(outputHelp)")}addHelpText(e,n){let i=["beforeAll","before","after","afterAll"];if(!i.includes(e))throw new Error(`Unexpected value for position to addHelpText.
141
+ `),this.outputHelp({error:!0}));let i=n||{},r=i.exitCode||1,o=i.code||"commander.error";this._exit(r,o,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in B.env){let n=e.attributeName();(this.getOptionValue(n)===void 0||["default","config","env"].includes(this.getOptionValueSource(n)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,B.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Fa(this.options),n=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&n(i.attributeName())&&e.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(r=>!n(r)).forEach(r=>{this.setOptionValueWithSource(r,i.implied[r],"implied")})})}missingArgument(e){let n=`error: missing required argument '${e}'`;this.error(n,{code:"commander.missingArgument"})}optionMissingArgument(e){let n=`error: option '${e.flags}' argument missing`;this.error(n,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let n=`error: required option '${e.flags}' not specified`;this.error(n,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,n){let i=s=>{let a=s.attributeName(),u=this.getOptionValue(a),c=this.options.find(d=>d.negate&&a===d.attributeName()),l=this.options.find(d=>!d.negate&&a===d.attributeName());return c&&(c.presetArg===void 0&&u===!1||c.presetArg!==void 0&&u===c.presetArg)?c:l||s},r=s=>{let a=i(s),u=a.attributeName();return this.getOptionValueSource(u)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},o=`error: ${r(e)} cannot be used with ${r(n)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let n="";if(e.startsWith("--")&&this._showSuggestionAfterError){let r=[],o=this;do{let s=o.createHelp().visibleOptions(o).filter(a=>a.long).map(a=>a.long);r=r.concat(s),o=o.parent}while(o&&!o._enablePositionalOptions);n=Pm(e,r)}let i=`error: unknown option '${e}'${n}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let n=this.registeredArguments.length,i=n===1?"":"s",r=e.length,o=this.parent?` for '${this.name()}'`:"",s=e.join(", "),a=`error: too many arguments${o}. Expected ${n} argument${i} but got ${r}: ${s}.`;this.error(a,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],n="";if(this._showSuggestionAfterError){let r=[];this.createHelp().visibleCommands(this).forEach(o=>{r.push(o.name()),o.alias()&&r.push(o.alias())}),n=Pm(e,r)}let i=`error: unknown command '${e}'${n}`;this.error(i,{code:"commander.unknownCommand"})}version(e,n,i){if(e===void 0)return this._version;this._version=e,n=n||"-V, --version",i=i||"output the version number";let r=this.createOption(n,i);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on("option:"+r.name(),()=>{this._outputConfiguration.writeOut(`${e}
142
+ `),this._exit(0,"commander.version",e)}),this}description(e,n){return e===void 0&&n===void 0?this._description:(this._description=e,n&&(this._argsDescription=n),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let n=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(n=this.commands[this.commands.length-1]),e===n._name)throw new Error("Command alias can't be the same as its name");let i=this.parent?._findCommand(e);if(i){let r=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${r}'`)}return n._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(n=>this.alias(n)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let n=this.registeredArguments.map(i=>Ma(i));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?n:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=Pt.basename(e,Pt.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let n=this.createHelp(),i=this._getOutputContext(e);n.prepareContext({error:i.error,helpWidth:i.helpWidth,outputHasColors:i.hasColors});let r=n.formatHelp(this,n);return i.hasColors?r:this._outputConfiguration.stripColor(r)}_getOutputContext(e){e=e||{};let n=!!e.error,i,r,o;return n?(i=a=>this._outputConfiguration.writeErr(a),r=this._outputConfiguration.getErrHasColors(),o=this._outputConfiguration.getErrHelpWidth()):(i=a=>this._outputConfiguration.writeOut(a),r=this._outputConfiguration.getOutHasColors(),o=this._outputConfiguration.getOutHelpWidth()),{error:n,write:a=>(r||(a=this._outputConfiguration.stripColor(a)),i(a)),hasColors:r,helpWidth:o}}outputHelp(e){let n;typeof e=="function"&&(n=e,e=void 0);let i=this._getOutputContext(e),r={error:i.error,write:i.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",r)),this.emit("beforeHelp",r);let o=this.helpInformation({error:i.error});if(n&&(o=n(o),typeof o!="string"&&!Buffer.isBuffer(o)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(o),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",r),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",r))}helpOption(e,n){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",n??"display help for command"),(e||n)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let n=Number(B.exitCode??0);n===0&&e&&typeof e!="function"&&e.error&&(n=1),this._exit(n,"commander.help","(outputHelp)")}addHelpText(e,n){let i=["beforeAll","before","after","afterAll"];if(!i.includes(e))throw new Error(`Unexpected value for position to addHelpText.
101
143
  Expecting one of '${i.join("', '")}'`);let r=`${e}Help`;return this.on(r,o=>{let s;typeof n=="function"?s=n({error:o.error,command:o.command}):s=n,s&&o.write(`${s}
102
- `)}),this}_outputHelpIfRequested(e){let n=this._getHelpOption();n&&e.find(r=>n.is(r))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function jw(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let n,i="127.0.0.1",r="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?n=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(n=o[1],/^\d+$/.test(o[3])?r=o[3]:i=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(n=o[1],i=o[3],r=o[4]),n&&r!=="0"?`${n}=${i}:${parseInt(r)+1}`:e})}function Uw(){if(B.env.NO_COLOR||B.env.FORCE_COLOR==="0"||B.env.FORCE_COLOR==="false")return!1;if(B.env.FORCE_COLOR||B.env.CLICOLOR_FORCE!==void 0)return!0}var tM=new Tn;De();var ue={out:t=>process.stdout.write(t),err:t=>process.stderr.write(t)};function tC(t){if(t==="debug"||t==="info"||t==="warn"||t==="error")return t;throw new Ot("expected one of debug|info|warn|error")}function Ma(t){return t.option("--log-level <level>","set log verbosity (debug|info|warn|error)",tC).option("--project <path>","approved project scope (default: cwd)").option("--text","force text-only operation").option("--no-voice","force text-only operation (disable voice)").option("--half-duplex","mute barge-in; mute the mic while jarvis speaks (no headphones)").option("--ptt","push-to-talk: press space to talk, again to send")}function rC(t){return t.text===!0||t.voice===!1}function nC(t,e,n,i=ue){let r=new Tn;r.name("jarvis").description("jarvis - voice-first personal agent").configureOutput({writeOut:s=>i.out(s),writeErr:s=>i.err(s)}).showHelpAfterError().exitOverride().allowExcessArguments(!0).version(t,"-v, --version","print version"),Ma(r),r.hook("preAction",(s,a)=>{let u=a.optsWithGlobals();u.logLevel&&q.setLevel(u.logLevel)}),r.action(async(s,a)=>{if(a.args.length>0){a.error(`error: unknown command '${a.args[0]}'`,{exitCode:1,code:"commander.unknownCommand"});return}n.exitCode=await e.activate({project:s.project??process.cwd(),textOnly:rC(s),halfDuplex:s.halfDuplex===!0,ptt:s.ptt===!0})});let o=(s,a)=>{let u=r.command(s).description(a).allowExcessArguments(!1);return Ma(u)};return o("init","first-run setup (interactive wizard)").action(async()=>{n.exitCode=await e.init()}),o("start","start the local core service").action(()=>{n.exitCode=e.stub("start")}),o("stop","stop the local core service").action(()=>{n.exitCode=e.stub("stop")}),o("restart","restart the local core service").action(()=>{n.exitCode=e.stub("restart")}),o("status","show version and check for updates").action(async()=>{n.exitCode=await e.status()}),o("doctor","run diagnostics").action(async()=>{n.exitCode=await e.doctor()}),o("devices","list audio devices").action(()=>{n.exitCode=e.stub("devices")}),o("upgrade","upgrade the installed CLI to the latest published version").action(async()=>{n.exitCode=await e.upgrade()}),iC(r,e,n),r}function iC(t,e,n){let i=t.command("config").description("inspect and edit configuration").allowExcessArguments(!0);Ma(i),i.action((o,s)=>{if(s.args.length>0){s.error(`error: unknown command 'config ${s.args[0]}'`,{exitCode:1,code:"commander.unknownCommand"});return}s.outputHelp(),n.exitCode=0});let r=(o,s)=>{let a=i.command(o).description(s).allowExcessArguments(!1);return Ma(a)};r("list","print the resolved config (secrets redacted)").action(async()=>{n.exitCode=await e.configList()}),r("get <path>","print one config value by dotted path").action(async o=>{n.exitCode=await e.configGet(o)}),r("set <path> <value>","set one config value by dotted path").action(async(o,s)=>{n.exitCode=await e.configSet(o,s)}),r("unset <path>","remove one config value by dotted path").action(async o=>{n.exitCode=await e.configUnset(o)})}async function Mw(t,e,n,i=ue){let r={exitCode:0},o=nC(e,n,r,i);try{return await o.parseAsync(t,{from:"user"}),r.exitCode}catch(s){if(s instanceof mt)return s.exitCode;throw s}}De();import{execSync as z0,spawnSync as d4}from"node:child_process";import{existsSync as f4}from"node:fs";import{join as p4}from"node:path";var Qa=He(C0(),1);function Sr(t,e){let n=A0(t),i=A0(e);return n===null||i===null?!1:Qa.default.gt(n,i)}function A0(t){return Qa.default.valid(t)??Qa.default.coerce(t)?.version??null}var kr=class{constructor(e,n=ue){this.currentVersion=e;this.io=n}currentVersion;io;packageName="@neuvybe/jarvis";registryTimeoutMs=3e3;safeVersion=/^[0-9A-Za-z.\-+]+$/;npmCmd(){return process.platform==="win32"?"npm.cmd":"npm"}async fetchLatest(){try{let e=await fetch(`https://registry.npmjs.org/${this.packageName}/latest`,{headers:{accept:"application/json"},signal:AbortSignal.timeout(this.registryTimeoutMs)});if(!e.ok)return null;let n=await e.json();return typeof n.version=="string"?n.version:null}catch{return null}}async status(){this.io.out(`jarvis ${this.currentVersion}
144
+ `)}),this}_outputHelpIfRequested(e){let n=this._getHelpOption();n&&e.find(r=>n.is(r))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Jw(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let n,i="127.0.0.1",r="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?n=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(n=o[1],/^\d+$/.test(o[3])?r=o[3]:i=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(n=o[1],i=o[3],r=o[4]),n&&r!=="0"?`${n}=${i}:${parseInt(r)+1}`:e})}function Kw(){if(B.env.NO_COLOR||B.env.FORCE_COLOR==="0"||B.env.FORCE_COLOR==="false")return!1;if(B.env.FORCE_COLOR||B.env.CLICOLOR_FORCE!==void 0)return!0}var RM=new Pn;De();var ue={out:t=>process.stdout.write(t),err:t=>process.stderr.write(t)};function IC(t){if(t==="debug"||t==="info"||t==="warn"||t==="error")return t;throw new Ot("expected one of debug|info|warn|error")}function Za(t){return t.option("--log-level <level>","set log verbosity (debug|info|warn|error)",IC).option("--project <path>","approved project scope (default: cwd)").option("--text","force text-only operation").option("--no-voice","force text-only operation (disable voice)").option("--half-duplex","mute barge-in; mute the mic while jarvis speaks (no headphones)").option("--ptt","push-to-talk: press space to talk, again to send")}function EC(t){return t.text===!0||t.voice===!1}function TC(t,e,n,i=ue){let r=new Pn;r.name("jarvis").description("jarvis - voice-first personal agent").configureOutput({writeOut:s=>i.out(s),writeErr:s=>i.err(s)}).showHelpAfterError().exitOverride().allowExcessArguments(!0).version(t,"-v, --version","print version"),Za(r),r.hook("preAction",(s,a)=>{let u=a.optsWithGlobals();u.logLevel&&q.setLevel(u.logLevel)}),r.action(async(s,a)=>{if(a.args.length>0){a.error(`error: unknown command '${a.args[0]}'`,{exitCode:1,code:"commander.unknownCommand"});return}n.exitCode=await e.activate({project:s.project??process.cwd(),textOnly:EC(s),halfDuplex:s.halfDuplex===!0,ptt:s.ptt===!0})});let o=(s,a)=>{let u=r.command(s).description(a).allowExcessArguments(!1);return Za(u)};return o("init","first-run setup (interactive wizard)").action(async()=>{n.exitCode=await e.init()}),o("start","start the local core service").action(()=>{n.exitCode=e.stub("start")}),o("stop","stop the local core service").action(()=>{n.exitCode=e.stub("stop")}),o("restart","restart the local core service").action(()=>{n.exitCode=e.stub("restart")}),o("status","show version and check for updates").action(async()=>{n.exitCode=await e.status()}),o("doctor","run diagnostics").action(async()=>{n.exitCode=await e.doctor()}),o("devices","list audio devices").action(()=>{n.exitCode=e.stub("devices")}),o("upgrade","upgrade the installed CLI to the latest published version").action(async()=>{n.exitCode=await e.upgrade()}),OC(r,e,n),r}function OC(t,e,n){let i=t.command("config").description("inspect and edit configuration").allowExcessArguments(!0);Za(i),i.action((o,s)=>{if(s.args.length>0){s.error(`error: unknown command 'config ${s.args[0]}'`,{exitCode:1,code:"commander.unknownCommand"});return}s.outputHelp(),n.exitCode=0});let r=(o,s)=>{let a=i.command(o).description(s).allowExcessArguments(!1);return Za(a)};r("list","print the resolved config (secrets redacted)").action(async()=>{n.exitCode=await e.configList()}),r("get <path>","print one config value by dotted path").action(async o=>{n.exitCode=await e.configGet(o)}),r("set <path> <value>","set one config value by dotted path").action(async(o,s)=>{n.exitCode=await e.configSet(o,s)}),r("unset <path>","remove one config value by dotted path").action(async o=>{n.exitCode=await e.configUnset(o)})}async function Yw(t,e,n,i=ue){let r={exitCode:0},o=TC(e,n,r,i);try{return await o.parseAsync(t,{from:"user"}),r.exitCode}catch(s){if(s instanceof mt)return s.exitCode;throw s}}De();import{execSync as B0,spawnSync as D4}from"node:child_process";import{existsSync as L4}from"node:fs";import{join as U4}from"node:path";var ru=Je(V0(),1);function Ir(t,e){let n=Z0(t),i=Z0(e);return n===null||i===null?!1:ru.default.gt(n,i)}function Z0(t){return ru.default.valid(t)??ru.default.coerce(t)?.version??null}var Er=class{constructor(e,n=ue){this.currentVersion=e;this.io=n}currentVersion;io;packageName="@neuvybe/jarvis";registryTimeoutMs=3e3;safeVersion=/^[0-9A-Za-z.\-+]+$/;npmCmd(){return process.platform==="win32"?"npm.cmd":"npm"}async fetchLatest(){try{let e=await fetch(`https://registry.npmjs.org/${this.packageName}/latest`,{headers:{accept:"application/json"},signal:AbortSignal.timeout(this.registryTimeoutMs)});if(!e.ok)return null;let n=await e.json();return typeof n.version=="string"?n.version:null}catch{return null}}async status(){this.io.out(`jarvis ${this.currentVersion}
103
145
  `);let e=await this.fetchLatest();return e===null?this.io.out(`could not check for updates (offline?)
104
- `):Sr(e,this.currentVersion)?this.io.out(`upgrade available: ${this.currentVersion} -> ${e} (run: jarvis upgrade)
146
+ `):Ir(e,this.currentVersion)?this.io.out(`upgrade available: ${this.currentVersion} -> ${e} (run: jarvis upgrade)
105
147
  `):this.io.out(`up to date
106
148
  `),0}async upgrade(){this.io.err(`checking for updates...
107
149
  `);let e=await this.fetchLatest();if(e===null)return this.io.err(`could not reach the npm registry; try again later
108
- `),1;if(!Sr(e,this.currentVersion))return this.io.out(`already on the latest version (${this.currentVersion})
150
+ `),1;if(!Ir(e,this.currentVersion))return this.io.out(`already on the latest version (${this.currentVersion})
109
151
  `),0;if(!this.safeVersion.test(e))return this.io.err(`refusing to install unexpected version string: ${e}
110
152
  `),1;this.io.err(`upgrading ${this.currentVersion} -> ${e}...
111
- `),await this.stopCore();let n=`${this.npmCmd()} install -g ${this.packageName}@${e}`;try{z0(n,{stdio:"inherit"})}catch{return this.io.err(`upgrade failed; run manually: ${this.npmCmd()} install -g ${this.packageName}@latest
153
+ `),await this.stopCore();let n=`${this.npmCmd()} install -g ${this.packageName}@${e}`;try{B0(n,{stdio:"inherit"})}catch{return this.io.err(`upgrade failed; run manually: ${this.npmCmd()} install -g ${this.packageName}@latest
112
154
  `),1}let i=this.resolveFreshEntrypoint();return i===null?(this.io.out(`upgraded to ${e}. run "jarvis --version" to confirm.
113
155
  `),0):(this.io.err(`verifying the freshly installed jarvis...
114
- `),d4(process.execPath,[i,"--version"],{stdio:"inherit"}).status!==0?(this.io.err(`upgrade installed but the fresh entrypoint exited abnormally; run "jarvis --version" to confirm
156
+ `),D4(process.execPath,[i,"--version"],{stdio:"inherit"}).status!==0?(this.io.err(`upgrade installed but the fresh entrypoint exited abnormally; run "jarvis --version" to confirm
115
157
  `),0):(this.io.out(`upgraded to ${e}.
116
- `),0))}async stopCore(){return q.debug("stop-core hook: no daemon in v0.1; nothing to stop (proposal 0013 fills this in)"),Promise.resolve()}resolveFreshEntrypoint(){try{let e=z0(`${this.npmCmd()} root -g`,{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim();if(!e)return null;let n=p4(e,this.packageName,"dist","index.js");return f4(n)?n:null}catch{return null}}};De();cn();import{spawn as v4}from"node:child_process";import{existsSync as y4,readFileSync as _4,writeFileSync as $4}from"node:fs";var Ir=He(D0(),1),R={dim:t=>Ir.default.dim(t),bold:t=>Ir.default.bold(t),ok:t=>Ir.default.green(t),warn:t=>Ir.default.yellow(t),fail:t=>Ir.default.red(t),accent:t=>Ir.default.cyan(t)};var ru=class{constructor(e,n=Ke){this.currentVersion=e;this.home=n}currentVersion;home;packageName="@neuvybe/jarvis";cacheFile="update-check.json";ttlMs=360*60*1e3;cachePath(){return this.home.resolve(this.cacheFile)}read(){let e=this.cachePath();if(!y4(e))return null;try{let n=JSON.parse(_4(e,"utf8"));return typeof n.lastCheckedAt=="number"&&typeof n.latestVersion=="string"?{lastCheckedAt:n.lastCheckedAt,latestVersion:n.latestVersion}:null}catch{return null}}write(e,n){let i={lastCheckedAt:n,latestVersion:e};try{this.home.ensureDir(),$4(this.cachePath(),JSON.stringify(i))}catch{}}isStale(e){let n=this.read();return!n||e-n.lastCheckedAt>this.ttlMs}notice(){let e=this.read();return!e||!Sr(e.latestVersion,this.currentVersion)?null:R.dim(`upgrade available: ${this.currentVersion} -> ${e.latestVersion} (run: jarvis upgrade)`)}refreshInBackground(){try{let e=this.cachePath();this.home.ensureDir();let n=`
158
+ `),0))}async stopCore(){return q.debug("stop-core hook: no daemon in v0.1; nothing to stop (proposal 0013 fills this in)"),Promise.resolve()}resolveFreshEntrypoint(){try{let e=B0(`${this.npmCmd()} root -g`,{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim();if(!e)return null;let n=U4(e,this.packageName,"dist","index.js");return L4(n)?n:null}catch{return null}}};De();hr();import{spawn as V4}from"node:child_process";import{existsSync as Z4,readFileSync as B4,writeFileSync as G4}from"node:fs";var Tr=Je(q0(),1),R={dim:t=>Tr.default.dim(t),bold:t=>Tr.default.bold(t),ok:t=>Tr.default.green(t),warn:t=>Tr.default.yellow(t),fail:t=>Tr.default.red(t),accent:t=>Tr.default.cyan(t)};var ou=class{constructor(e,n=Be){this.currentVersion=e;this.home=n}currentVersion;home;packageName="@neuvybe/jarvis";cacheFile="update-check.json";ttlMs=360*60*1e3;cachePath(){return this.home.resolve(this.cacheFile)}read(){let e=this.cachePath();if(!Z4(e))return null;try{let n=JSON.parse(B4(e,"utf8"));return typeof n.lastCheckedAt=="number"&&typeof n.latestVersion=="string"?{lastCheckedAt:n.lastCheckedAt,latestVersion:n.latestVersion}:null}catch{return null}}write(e,n){let i={lastCheckedAt:n,latestVersion:e};try{this.home.ensureDir(),G4(this.cachePath(),JSON.stringify(i))}catch{}}isStale(e){let n=this.read();return!n||e-n.lastCheckedAt>this.ttlMs}notice(){let e=this.read();return!e||!Ir(e.latestVersion,this.currentVersion)?null:R.dim(`upgrade available: ${this.currentVersion} -> ${e.latestVersion} (run: jarvis upgrade)`)}refreshInBackground(){try{let e=this.cachePath();this.home.ensureDir();let n=`
117
159
  import { writeFileSync } from 'node:fs';
118
160
  try {
119
161
  const res = await fetch('https://registry.npmjs.org/${this.packageName}/latest', {
@@ -130,131 +172,131 @@ try {
130
172
  }
131
173
  }
132
174
  } catch {}
133
- `;v4(process.execPath,["--input-type=module","-e",n],{detached:!0,stdio:"ignore"}).unref()}catch{q.debug("background update check skipped (could not refresh cache)")}}};var Er=class{constructor(e,n=ue){this.config=e;this.io=n}config;io;list(){let e=L0(this.config.list());for(let[n,i]of e)this.io.out(`${R.accent(n)} = ${this.renderValue(n,i)}
134
- `);return 0}get(e){let n;try{n=this.config.get(e)}catch(i){return this.io.err(`error: ${Wm(i)}
175
+ `;V4(process.execPath,["--input-type=module","-e",n],{detached:!0,stdio:"ignore"}).unref()}catch{q.debug("background update check skipped (could not refresh cache)")}}};var Or=class{constructor(e,n=ue){this.config=e;this.io=n}config;io;list(){let e=H0(this.config.list());for(let[n,i]of e)this.io.out(`${R.accent(n)} = ${this.renderValue(n,i)}
176
+ `);return 0}get(e){let n;try{n=this.config.get(e)}catch(i){return this.io.err(`error: ${Qm(i)}
135
177
  `),1}return n===void 0?(this.io.err(`config: '${e}' is not set
136
- `),1):(this.io.out(`${b4(n)}
137
- `),0)}set(e,n){try{this.config.set(e,n)}catch(i){return this.io.err(`error: ${Wm(i)}
178
+ `),1):(this.io.out(`${W4(n)}
179
+ `),0)}set(e,n){try{this.config.set(e,n)}catch(i){return this.io.err(`error: ${Qm(i)}
138
180
  `),1}return this.io.out(`${R.ok("set")} ${R.accent(e)}
139
- `),0}unset(e){try{this.config.unset(e)}catch(n){return this.io.err(`error: ${Wm(n)}
181
+ `),0}unset(e){try{this.config.unset(e)}catch(n){return this.io.err(`error: ${Qm(n)}
140
182
  `),1}return this.io.out(`${R.ok("unset")} ${R.accent(e)}
141
- `),0}renderValue(e,n){return e.startsWith("secrets.")?R.dim(String(n)):String(n)}};function L0(t,e=""){let n=[];for(let[i,r]of Object.entries(t)){let o=e?`${e}.${i}`:i;r!==null&&typeof r=="object"&&!Array.isArray(r)?n.push(...L0(r,o)):n.push([o,r])}return n}function b4(t){return t!==null&&typeof t=="object"?JSON.stringify(t,null,2):String(t)}function Wm(t){return t instanceof Error?t.message:String(t)}cn();import{existsSync as j0,statSync as U0}from"node:fs";var M0=["text","stt","tts","embedding"],x4={text:"Brain",stt:"Voice",tts:"Voice",embedding:"Memory"},nu=class{config;probe;version;io;homeCheck;checkUpdate;constructor(e){this.config=e.config,this.probe=e.probe,this.version=e.version,this.io=e.io??ue,this.homeCheck=e.homeCheck??S4,this.checkUpdate=e.checkUpdate??(async()=>({latest:await new kr(this.version).fetchLatest()}))}async run(){let e=[],n;try{n=this.config.resolved(),e.push({level:"ok",label:"config",detail:"valid"})}catch(r){e.push({level:"fail",label:"config",detail:`invalid - ${k4(r)}`})}e.push(this.homeLine()),n&&e.push(...await this.routeLines(n)),e.push(await this.versionLine()),e.push({level:"info",label:"project",detail:process.cwd()});let i=e.some(r=>r.level==="fail")?1:0;return this.render(e,i),i}homeLine(){let e=this.homeCheck();return e.permsOk===!1?{level:"fail",label:"home",detail:`${e.dir} - ${e.detail??"permissions wrong"}`}:e.exists?{level:"ok",label:"home",detail:`${e.dir} (${e.detail??"owner-only"})`}:{level:"info",label:"home",detail:`${e.dir} (${e.detail??"not created yet"})`}}async routeLines(e){let n=e.routes??{},i=new Map;for(let s of M0){let a=n[s],u=a&&e.secrets?.[a.provider];a&&u&&i.set(a.provider,u)}let r=new Map;await Promise.all([...i].map(async([s,a])=>{let u=await this.probe.probe(s,a);r.set(s,u.status)}));let o=[];for(let s of M0){let a=n[s];if(!a){o.push(this.unconfiguredLine(s));continue}let u=`${a.provider}/${a.model}`;if(!e.secrets?.[a.provider]){o.push({level:"fail",label:`${s} route`,detail:`${u} - key for '${a.provider}' is missing`});continue}o.push(this.probedLine(s,u,a.provider,r.get(a.provider)))}return o}unconfiguredLine(e){return e==="text"?{level:"fail",label:"text route",detail:"not configured - Jarvis cannot reason (run: jarvis init)"}:{level:"info",label:`${e} route`,detail:`not configured (optional, ${x4[e]})`}}probedLine(e,n,i,r){let o=`${e} route`,s=e==="text";switch(r){case"valid":return{level:"ok",label:o,detail:`${n} (key valid)`};case"invalid":return{level:s?"fail":"warn",label:o,detail:`${n} - key rejected by ${i}`};case"unreachable":return{level:"warn",label:o,detail:`${n} (key present; could not verify - offline/unreachable)`};case"unimplemented":return{level:"warn",label:o,detail:`${n} (key present; no probe for ${i})`};case"unverifiable":return{level:"warn",label:o,detail:`${n} (key present; reached ${i} but cannot verify this key here - confirmed at first use)`};default:return{level:"warn",label:o,detail:`${n} (key present; not verified)`}}}async versionLine(){let{latest:e}=await this.checkUpdate();return e===null?{level:"info",label:"version",detail:`${this.version} (could not check for updates)`}:Sr(e,this.version)?{level:"warn",label:"version",detail:`${this.version} -> ${e} available (run: jarvis upgrade)`}:{level:"ok",label:"version",detail:`${this.version} (up to date)`}}render(e,n){this.io.out(`
183
+ `),0}renderValue(e,n){return e.startsWith("secrets.")?R.dim(String(n)):String(n)}};function H0(t,e=""){let n=[];for(let[i,r]of Object.entries(t)){let o=e?`${e}.${i}`:i;r!==null&&typeof r=="object"&&!Array.isArray(r)?n.push(...H0(r,o)):n.push([o,r])}return n}function W4(t){return t!==null&&typeof t=="object"?JSON.stringify(t,null,2):String(t)}function Qm(t){return t instanceof Error?t.message:String(t)}hr();import{existsSync as J0,statSync as K0}from"node:fs";var Y0=["text","stt","tts","embedding"],q4={text:"Brain",stt:"Voice",tts:"Voice",embedding:"Memory"},su=class{config;probe;version;io;homeCheck;checkUpdate;constructor(e){this.config=e.config,this.probe=e.probe,this.version=e.version,this.io=e.io??ue,this.homeCheck=e.homeCheck??J4,this.checkUpdate=e.checkUpdate??(async()=>({latest:await new Er(this.version).fetchLatest()}))}async run(){let e=[],n;try{n=this.config.resolved(),e.push({level:"ok",label:"config",detail:"valid"})}catch(r){e.push({level:"fail",label:"config",detail:`invalid - ${K4(r)}`})}e.push(this.homeLine()),n&&e.push(...await this.routeLines(n)),e.push(await this.versionLine()),e.push({level:"info",label:"project",detail:process.cwd()});let i=e.some(r=>r.level==="fail")?1:0;return this.render(e,i),i}homeLine(){let e=this.homeCheck();return e.permsOk===!1?{level:"fail",label:"home",detail:`${e.dir} - ${e.detail??"permissions wrong"}`}:e.exists?{level:"ok",label:"home",detail:`${e.dir} (${e.detail??"owner-only"})`}:{level:"info",label:"home",detail:`${e.dir} (${e.detail??"not created yet"})`}}async routeLines(e){let n=e.routes??{},i=new Map;for(let s of Y0){let a=n[s],u=a&&e.secrets?.[a.provider];a&&u&&i.set(a.provider,u)}let r=new Map;await Promise.all([...i].map(async([s,a])=>{let u=await this.probe.probe(s,a);r.set(s,u.status)}));let o=[];for(let s of Y0){let a=n[s];if(!a){o.push(this.unconfiguredLine(s));continue}let u=`${a.provider}/${a.model}`;if(!e.secrets?.[a.provider]){o.push({level:"fail",label:`${s} route`,detail:`${u} - key for '${a.provider}' is missing`});continue}o.push(this.probedLine(s,u,a.provider,r.get(a.provider)))}return o}unconfiguredLine(e){return e==="text"?{level:"fail",label:"text route",detail:"not configured - Jarvis cannot reason (run: jarvis init)"}:{level:"info",label:`${e} route`,detail:`not configured (optional, ${q4[e]})`}}probedLine(e,n,i,r){let o=`${e} route`,s=e==="text";switch(r){case"valid":return{level:"ok",label:o,detail:`${n} (key valid)`};case"invalid":return{level:s?"fail":"warn",label:o,detail:`${n} - key rejected by ${i}`};case"unreachable":return{level:"warn",label:o,detail:`${n} (key present; could not verify - offline/unreachable)`};case"unimplemented":return{level:"warn",label:o,detail:`${n} (key present; no probe for ${i})`};case"unverifiable":return{level:"warn",label:o,detail:`${n} (key present; reached ${i} but cannot verify this key here - confirmed at first use)`};default:return{level:"warn",label:o,detail:`${n} (key present; not verified)`}}}async versionLine(){let{latest:e}=await this.checkUpdate();return e===null?{level:"info",label:"version",detail:`${this.version} (could not check for updates)`}:Ir(e,this.version)?{level:"warn",label:"version",detail:`${this.version} -> ${e} available (run: jarvis upgrade)`}:{level:"ok",label:"version",detail:`${this.version} (up to date)`}}render(e,n){this.io.out(`
142
184
  ${R.bold("jarvis doctor")}
143
185
 
144
- `);for(let i of e){let r=i.detail?`: ${i.detail}`:"";this.io.out(` ${w4(i.level)} ${i.label}${r}
186
+ `);for(let i of e){let r=i.detail?`: ${i.detail}`:"";this.io.out(` ${H4(i.level)} ${i.label}${r}
145
187
  `)}this.io.out(`
146
188
  `),n!==0?this.io.out(`${R.fail("not ready")} - resolve the failing checks above (start with: jarvis init)
147
189
  `):e.some(i=>i.level==="warn")?this.io.out(`${R.warn("ready, with warnings")}
148
190
  `):this.io.out(`${R.ok("all checks passed")}
149
- `)}};function w4(t){switch(t){case"ok":return R.ok("OK ");case"warn":return R.warn("WARN");case"fail":return R.fail("FAIL");case"info":return R.dim("INFO")}}function S4(){let t=Ke.dir();if(!j0(t))return{dir:t,exists:!1,permsOk:"n/a",detail:"not created yet - run: jarvis init"};if(process.platform==="win32")return{dir:t,exists:!0,permsOk:"n/a",detail:"permissions not enforced on this platform"};let e=(U0(t).mode&63)===0,n=Ke.resolve("config.json"),i=!j0(n)||(U0(n).mode&63)===0,r=e&&i;return{dir:t,exists:!0,permsOk:r,detail:r?"owner-only":"should be owner-only (chmod 700 ~/.jarvis; chmod 600 ~/.jarvis/config.json)"}}function k4(t){return t instanceof Error?t.message:String(t)}import{styleText as Xm}from"node:util";import{stdout as eg,stdin as nk}from"node:process";import*as Qt from"node:readline";import F4 from"node:readline";var F0=(()=>{let t=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return e=>{let n=0;for(t.lastIndex=0;t.test(e);)n+=1;return e.length-n}})(),V0=t=>t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510,Z0=t=>t===8987||t===9001||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12771||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=19903||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t>=131072&&t<=196605||t>=196608&&t<=262141;var I4=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,E4=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,B0=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,T4=/\t{1,1000}/y,G0=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,O4=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,P4=/\p{M}+/gu,C4={limit:1/0,ellipsis:""},W0=(t,e={},n={})=>{let i=e.limit??1/0,r=e.ellipsis??"",o=e?.ellipsisWidth??(r?W0(r,C4,n).width:0),s=0,a=n.controlWidth??0,u=n.tabWidth??8,c=n.emojiWidth??2,l=2,d=n.regularWidth??1,f=n.wideWidth??l,p=[[O4,d],[I4,s],[E4,a],[T4,u],[G0,c],[B0,f]],h=0,_=0,S=t.length,k=0,C=!1,A=S,I=Math.max(0,i-o),T=0,Z=0,F=0,W=0;e:for(;;){if(Z>T||_>=S&&_>h){let ne=t.slice(T,Z)||t.slice(h,_);k=0;for(let be of ne.replaceAll(P4,"")){let pe=be.codePointAt(0)||0;if(V0(pe)?W=l:Z0(pe)?W=f:W=d,F+W>I&&(A=Math.min(A,Math.max(T,h)+k)),F+W>i){C=!0;break e}k+=be.length,F+=W}T=Z=0}if(_>=S)break e;for(let ne=0,be=p.length;ne<be;ne++){let[pe,Se]=p[ne];if(pe.lastIndex=_,pe.test(t)){if(k=pe===B0?F0(t.slice(_,pe.lastIndex)):pe===G0?1:pe.lastIndex-_,W=k*Se,F+W>I&&(A=Math.min(A,_+Math.floor((I-F)/Se))),F+W>i){C=!0;break e}F+=W,T=h,Z=_,_=h=pe.lastIndex;continue e}}_+=1}return{width:C?I:F,index:C?A:S,truncated:C,ellipsed:C&&i>=o}},q0=W0;var A4={limit:1/0,ellipsis:"",ellipsisWidth:0},z4=(t,e={})=>q0(t,A4,e).width,Ae=z4;var iu="\x1B",X0="\x9B",N4=39,Hm="\x07",Q0="[",R4="]",ek="m",Jm=`${R4}8;;`,H0=new RegExp(`(?:\\${Q0}(?<code>\\d+)m|\\${Jm}(?<uri>.*)${Hm})`,"y"),J0=t=>{if(t>=30&&t<=37||t>=90&&t<=97)return 39;if(t>=40&&t<=47||t>=100&&t<=107)return 49;if(t===1||t===2)return 22;if(t===3)return 23;if(t===4)return 24;if(t===7)return 27;if(t===8)return 28;if(t===9)return 29;if(t===0)return 0},K0=t=>`${iu}${Q0}${t}${ek}`,Y0=t=>`${iu}${Jm}${t}${Hm}`,qm=(t,e,n)=>{let i=e[Symbol.iterator](),r=!1,o=!1,s=t.at(-1),a=s===void 0?0:Ae(s),u=i.next(),c=i.next(),l=0;for(;!u.done;){let d=u.value,f=Ae(d);a+f<=n?t[t.length-1]+=d:(t.push(d),a=0),(d===iu||d===X0)&&(r=!0,o=e.startsWith(Jm,l+1)),r?o?d===Hm&&(r=!1,o=!1):d===ek&&(r=!1):(a+=f,a===n&&!c.done&&(t.push(""),a=0)),u=c,c=i.next(),l+=d.length}s=t.at(-1),!a&&s!==void 0&&s.length&&t.length>1&&(t[t.length-2]+=t.pop())},D4=t=>{let e=t.split(" "),n=e.length;for(;n&&!Ae(e[n-1]);)n--;return n===e.length?t:e.slice(0,n).join(" ")+e.slice(n).join("")},L4=(t,e,n={})=>{if(n.trim!==!1&&t.trim()==="")return"";let i="",r,o,s=t.split(" "),a=[""],u=0;for(let d=0;d<s.length;d++){let f=s[d];if(n.trim!==!1){let h=a.at(-1)??"",_=h.trimStart();h.length!==_.length&&(a[a.length-1]=_,u=Ae(_))}d!==0&&(u>=e&&(n.wordWrap===!1||n.trim===!1)&&(a.push(""),u=0),(u||n.trim===!1)&&(a[a.length-1]+=" ",u++));let p=Ae(f);if(n.hard&&p>e){let h=e-u,_=1+Math.floor((p-h-1)/e);Math.floor((p-1)/e)<_&&a.push(""),qm(a,f,e),u=Ae(a.at(-1)??"");continue}if(u+p>e&&u&&p){if(n.wordWrap===!1&&u<e){qm(a,f,e),u=Ae(a.at(-1)??"");continue}a.push(""),u=0}if(u+p>e&&n.wordWrap===!1){qm(a,f,e),u=Ae(a.at(-1)??"");continue}a[a.length-1]+=f,u+=p}n.trim!==!1&&(a=a.map(d=>D4(d)));let c=a.join(`
150
- `),l=!1;for(let d=0;d<c.length;d++){let f=c[d];if(i+=f,l)l=!1;else if(l=f>="\uD800"&&f<="\uDBFF",l)continue;if(f===iu||f===X0){H0.lastIndex=d+1;let h=H0.exec(c)?.groups;if(h?.code!==void 0){let _=Number.parseFloat(h.code);r=_===N4?void 0:_}else h?.uri!==void 0&&(o=h.uri.length===0?void 0:h.uri)}if(c[d+1]===`
151
- `){o&&(i+=Y0(""));let p=r?J0(r):void 0;r&&p&&(i+=K0(p))}else f===`
152
- `&&(r&&J0(r)&&(i+=K0(r)),o&&(i+=Y0(o)))}return i},j4=/\r?\n/;function vt(t,e,n){return String(t).normalize().split(j4).map(i=>L4(i,e,n)).join(`
153
- `)}var we=He(Ym(),1);import{ReadStream as rk}from"node:tty";function Tr(t,e,n){if(!n.some(s=>!s.disabled))return t;let i=t+e,r=Math.max(n.length-1,0),o=i<0?r:i>r?0:i;return n[o].disabled?Tr(o,e<0?-1:1,n):o}var V4=["up","down","left","right","space","enter","cancel"],Z4=["January","February","March","April","May","June","July","August","September","October","November","December"],fe={actions:new Set(V4),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0,date:{monthNames:[...Z4],messages:{required:"Please enter a valid date",invalidMonth:"There are only 12 months in a year",invalidDay:(t,e)=>`There are only ${t} days in ${e}`,afterMin:t=>`Date must be on or after ${t.toISOString().slice(0,10)}`,beforeMax:t=>`Date must be on or before ${t.toISOString().slice(0,10)}`}}};function tg(t,e){if(typeof t=="string")return fe.aliases.get(t)===e;for(let n of t)if(n!==void 0&&tg(n,e))return!0;return!1}function B4(t,e){if(t===e)return;let n=t.split(`
191
+ `)}};function H4(t){switch(t){case"ok":return R.ok("OK ");case"warn":return R.warn("WARN");case"fail":return R.fail("FAIL");case"info":return R.dim("INFO")}}function J4(){let t=Be.dir();if(!J0(t))return{dir:t,exists:!1,permsOk:"n/a",detail:"not created yet - run: jarvis init"};if(process.platform==="win32")return{dir:t,exists:!0,permsOk:"n/a",detail:"permissions not enforced on this platform"};let e=(K0(t).mode&63)===0,n=Be.resolve("config.json"),i=!J0(n)||(K0(n).mode&63)===0,r=e&&i;return{dir:t,exists:!0,permsOk:r,detail:r?"owner-only":"should be owner-only (chmod 700 ~/.jarvis; chmod 600 ~/.jarvis/config.json)"}}function K4(t){return t instanceof Error?t.message:String(t)}import{styleText as og}from"node:util";import{stdout as ag,stdin as pk}from"node:process";import*as er from"node:readline";import fN from"node:readline";var X0=(()=>{let t=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return e=>{let n=0;for(t.lastIndex=0;t.test(e);)n+=1;return e.length-n}})(),Q0=t=>t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510,ek=t=>t===8987||t===9001||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12771||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=19903||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t>=131072&&t<=196605||t>=196608&&t<=262141;var Y4=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,X4=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,tk=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,Q4=/\t{1,1000}/y,rk=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,eN=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,tN=/\p{M}+/gu,rN={limit:1/0,ellipsis:""},nk=(t,e={},n={})=>{let i=e.limit??1/0,r=e.ellipsis??"",o=e?.ellipsisWidth??(r?nk(r,rN,n).width:0),s=0,a=n.controlWidth??0,u=n.tabWidth??8,c=n.emojiWidth??2,l=2,d=n.regularWidth??1,f=n.wideWidth??l,h=[[eN,d],[Y4,s],[X4,a],[Q4,u],[rk,c],[tk,f]],p=0,_=0,S=t.length,k=0,C=!1,A=S,I=Math.max(0,i-o),T=0,Z=0,F=0,W=0;e:for(;;){if(Z>T||_>=S&&_>p){let ne=t.slice(T,Z)||t.slice(p,_);k=0;for(let $e of ne.replaceAll(tN,"")){let he=$e.codePointAt(0)||0;if(Q0(he)?W=l:ek(he)?W=f:W=d,F+W>I&&(A=Math.min(A,Math.max(T,p)+k)),F+W>i){C=!0;break e}k+=$e.length,F+=W}T=Z=0}if(_>=S)break e;for(let ne=0,$e=h.length;ne<$e;ne++){let[he,Se]=h[ne];if(he.lastIndex=_,he.test(t)){if(k=he===tk?X0(t.slice(_,he.lastIndex)):he===rk?1:he.lastIndex-_,W=k*Se,F+W>I&&(A=Math.min(A,_+Math.floor((I-F)/Se))),F+W>i){C=!0;break e}F+=W,T=p,Z=_,_=p=he.lastIndex;continue e}}_+=1}return{width:C?I:F,index:C?A:S,truncated:C,ellipsed:C&&i>=o}},ik=nk;var nN={limit:1/0,ellipsis:"",ellipsisWidth:0},iN=(t,e={})=>ik(t,nN,e).width,Ae=iN;var au="\x1B",ck="\x9B",oN=39,tg="\x07",lk="[",sN="]",dk="m",rg=`${sN}8;;`,ok=new RegExp(`(?:\\${lk}(?<code>\\d+)m|\\${rg}(?<uri>.*)${tg})`,"y"),sk=t=>{if(t>=30&&t<=37||t>=90&&t<=97)return 39;if(t>=40&&t<=47||t>=100&&t<=107)return 49;if(t===1||t===2)return 22;if(t===3)return 23;if(t===4)return 24;if(t===7)return 27;if(t===8)return 28;if(t===9)return 29;if(t===0)return 0},ak=t=>`${au}${lk}${t}${dk}`,uk=t=>`${au}${rg}${t}${tg}`,eg=(t,e,n)=>{let i=e[Symbol.iterator](),r=!1,o=!1,s=t.at(-1),a=s===void 0?0:Ae(s),u=i.next(),c=i.next(),l=0;for(;!u.done;){let d=u.value,f=Ae(d);a+f<=n?t[t.length-1]+=d:(t.push(d),a=0),(d===au||d===ck)&&(r=!0,o=e.startsWith(rg,l+1)),r?o?d===tg&&(r=!1,o=!1):d===dk&&(r=!1):(a+=f,a===n&&!c.done&&(t.push(""),a=0)),u=c,c=i.next(),l+=d.length}s=t.at(-1),!a&&s!==void 0&&s.length&&t.length>1&&(t[t.length-2]+=t.pop())},aN=t=>{let e=t.split(" "),n=e.length;for(;n&&!Ae(e[n-1]);)n--;return n===e.length?t:e.slice(0,n).join(" ")+e.slice(n).join("")},uN=(t,e,n={})=>{if(n.trim!==!1&&t.trim()==="")return"";let i="",r,o,s=t.split(" "),a=[""],u=0;for(let d=0;d<s.length;d++){let f=s[d];if(n.trim!==!1){let p=a.at(-1)??"",_=p.trimStart();p.length!==_.length&&(a[a.length-1]=_,u=Ae(_))}d!==0&&(u>=e&&(n.wordWrap===!1||n.trim===!1)&&(a.push(""),u=0),(u||n.trim===!1)&&(a[a.length-1]+=" ",u++));let h=Ae(f);if(n.hard&&h>e){let p=e-u,_=1+Math.floor((h-p-1)/e);Math.floor((h-1)/e)<_&&a.push(""),eg(a,f,e),u=Ae(a.at(-1)??"");continue}if(u+h>e&&u&&h){if(n.wordWrap===!1&&u<e){eg(a,f,e),u=Ae(a.at(-1)??"");continue}a.push(""),u=0}if(u+h>e&&n.wordWrap===!1){eg(a,f,e),u=Ae(a.at(-1)??"");continue}a[a.length-1]+=f,u+=h}n.trim!==!1&&(a=a.map(d=>aN(d)));let c=a.join(`
192
+ `),l=!1;for(let d=0;d<c.length;d++){let f=c[d];if(i+=f,l)l=!1;else if(l=f>="\uD800"&&f<="\uDBFF",l)continue;if(f===au||f===ck){ok.lastIndex=d+1;let p=ok.exec(c)?.groups;if(p?.code!==void 0){let _=Number.parseFloat(p.code);r=_===oN?void 0:_}else p?.uri!==void 0&&(o=p.uri.length===0?void 0:p.uri)}if(c[d+1]===`
193
+ `){o&&(i+=uk(""));let h=r?sk(r):void 0;r&&h&&(i+=ak(h))}else f===`
194
+ `&&(r&&sk(r)&&(i+=ak(r)),o&&(i+=uk(o)))}return i},cN=/\r?\n/;function vt(t,e,n){return String(t).normalize().split(cN).map(i=>uN(i,e,n)).join(`
195
+ `)}var we=Je(ig(),1);import{ReadStream as hk}from"node:tty";function Pr(t,e,n){if(!n.some(s=>!s.disabled))return t;let i=t+e,r=Math.max(n.length-1,0),o=i<0?r:i>r?0:i;return n[o].disabled?Pr(o,e<0?-1:1,n):o}var hN=["up","down","left","right","space","enter","cancel"],pN=["January","February","March","April","May","June","July","August","September","October","November","December"],fe={actions:new Set(hN),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0,date:{monthNames:[...pN],messages:{required:"Please enter a valid date",invalidMonth:"There are only 12 months in a year",invalidDay:(t,e)=>`There are only ${t} days in ${e}`,afterMin:t=>`Date must be on or after ${t.toISOString().slice(0,10)}`,beforeMax:t=>`Date must be on or before ${t.toISOString().slice(0,10)}`}}};function ug(t,e){if(typeof t=="string")return fe.aliases.get(t)===e;for(let n of t)if(n!==void 0&&ug(n,e))return!0;return!1}function mN(t,e){if(t===e)return;let n=t.split(`
154
196
  `),i=e.split(`
155
- `),r=Math.max(n.length,i.length),o=[];for(let s=0;s<r;s++)n[s]!==i[s]&&o.push(s);return{lines:o,numLinesBefore:n.length,numLinesAfter:i.length,numLines:r}}var G4=globalThis.process.platform.startsWith("win"),Qm=Symbol("clack:cancel");function lu(t){return t===Qm}function ou(t,e){let n=t;n.isTTY&&n.setRawMode(e)}function ik({input:t=nk,output:e=eg,overwrite:n=!0,hideCursor:i=!0}={}){let r=Qt.createInterface({input:t,output:e,prompt:"",tabSize:1});Qt.emitKeypressEvents(t,r),t instanceof rk&&t.isTTY&&t.setRawMode(!0);let o=(s,{name:a,sequence:u})=>{let c=String(s);if(tg([c,a,u],"cancel")){i&&e.write(we.cursor.show),process.exit(0);return}if(!n)return;Qt.moveCursor(e,a==="return"?0:-1,a==="return"?-1:0,()=>{Qt.clearLine(e,1,()=>{t.once("keypress",o)})})};return i&&e.write(we.cursor.hide),t.once("keypress",o),()=>{t.off("keypress",o),i&&e.write(we.cursor.show),t instanceof rk&&t.isTTY&&!G4&&t.setRawMode(!1),r.terminal=!1,r.close()}}var eo=t=>"columns"in t&&typeof t.columns=="number"?t.columns:80,rg=t=>"rows"in t&&typeof t.rows=="number"?t.rows:20;function er(t,e,n,i=n,r=n,o){let s=eo(t??eg);return vt(e,s-n.length,{hard:!0,trim:!1}).split(`
197
+ `),r=Math.max(n.length,i.length),o=[];for(let s=0;s<r;s++)n[s]!==i[s]&&o.push(s);return{lines:o,numLinesBefore:n.length,numLinesAfter:i.length,numLines:r}}var gN=globalThis.process.platform.startsWith("win"),sg=Symbol("clack:cancel");function hu(t){return t===sg}function uu(t,e){let n=t;n.isTTY&&n.setRawMode(e)}function mk({input:t=pk,output:e=ag,overwrite:n=!0,hideCursor:i=!0}={}){let r=er.createInterface({input:t,output:e,prompt:"",tabSize:1});er.emitKeypressEvents(t,r),t instanceof hk&&t.isTTY&&t.setRawMode(!0);let o=(s,{name:a,sequence:u})=>{let c=String(s);if(ug([c,a,u],"cancel")){i&&e.write(we.cursor.show),process.exit(0);return}if(!n)return;er.moveCursor(e,a==="return"?0:-1,a==="return"?-1:0,()=>{er.clearLine(e,1,()=>{t.once("keypress",o)})})};return i&&e.write(we.cursor.hide),t.once("keypress",o),()=>{t.off("keypress",o),i&&e.write(we.cursor.show),t instanceof hk&&t.isTTY&&!gN&&t.setRawMode(!1),r.terminal=!1,r.close()}}var ro=t=>"columns"in t&&typeof t.columns=="number"?t.columns:80,cg=t=>"rows"in t&&typeof t.rows=="number"?t.rows:20;function tr(t,e,n,i=n,r=n,o){let s=ro(t??ag);return vt(e,s-n.length,{hard:!0,trim:!1}).split(`
156
198
  `).map((a,u,c)=>{let l=o?o(a,u):a;return u===0?`${i}${l}`:u===c.length-1?`${r}${l}`:`${n}${l}`}).join(`
157
- `)}function ok(t,e){if("~standard"in t){let n=t["~standard"].validate(e);if(n instanceof Promise)throw new TypeError("Schema validation must be synchronous. Update `validate()` and remove any asynchronous logic.");return n.issues?.at(0)?.message}return t(e)}var Or=class{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame="";_subscribers=new Map;_cursor=0;state="initial";error="";value;userInput="";constructor(e,n=!0){let{input:i=nk,output:r=eg,render:o,signal:s,...a}=e;this.opts=a,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=o.bind(this),this._track=n,this._abortSignal=s,this.input=i,this.output=r}unsubscribe(){this._subscribers.clear()}setSubscriber(e,n){let i=this._subscribers.get(e)??[];i.push(n),this._subscribers.set(e,i)}on(e,n){this.setSubscriber(e,{cb:n})}once(e,n){this.setSubscriber(e,{cb:n,once:!0})}emit(e,...n){let i=this._subscribers.get(e)??[],r=[];for(let o of i)o.cb(...n),o.once&&r.push(()=>i.splice(i.indexOf(o),1));for(let o of r)o()}prompt(){return new Promise(e=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),e(Qm);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}this.rl=F4.createInterface({input:this.input,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on("keypress",this.onKeypress),ou(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(we.cursor.show),this.output.off("resize",this.render),ou(this.input,!1),e(this.value)}),this.once("cancel",()=>{this.output.write(we.cursor.show),this.output.off("resize",this.render),ou(this.input,!1),e(Qm)})})}_isActionKey(e,n){return e===" "}_shouldSubmit(e,n){return!0}_setValue(e){this.value=e,this.emit("value",this.value)}_setUserInput(e,n){this.userInput=e??"",this.emit("userInput",this.userInput),n&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:"u"}),this._setUserInput("")}onKeypress(e,n){if(this._track&&n.name!=="return"&&(n.name&&this._isActionKey(e,n)&&this.rl?.write(null,{ctrl:!0,name:"h"}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state==="error"&&(this.state="active"),n?.name&&(!this._track&&fe.aliases.has(n.name)&&this.emit("cursor",fe.aliases.get(n.name)),fe.actions.has(n.name)&&this.emit("cursor",n.name)),e&&(e.toLowerCase()==="y"||e.toLowerCase()==="n")&&this.emit("confirm",e.toLowerCase()==="y"),this.emit("key",e,n),n?.name==="return"&&this._shouldSubmit(e,n)){if(this.opts.validate){let i=ok(this.opts.validate,this.value);i&&(this.error=i instanceof Error?i.message:i,this.state="error",this.rl?.write(this.userInput))}this.state!=="error"&&(this.state="submit")}tg([e,n?.name,n?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
158
- `),ou(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=vt(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
159
- `).length-1;this.output.write(we.cursor.move(-999,e*-1))}render(){let e=vt(this._render(this)??"",process.stdout.columns,{hard:!0,trim:!1});if(e!==this._prevFrame){if(this.state==="initial")this.output.write(we.cursor.hide);else{let n=B4(this._prevFrame,e),i=rg(this.output);if(this.restoreCursor(),n){let r=Math.max(0,n.numLinesAfter-i),o=Math.max(0,n.numLinesBefore-i),s=n.lines.find(a=>a>=r);if(s===void 0){this._prevFrame=e;return}if(n.lines.length===1){this.output.write(we.cursor.move(0,s-o)),this.output.write(we.erase.lines(1));let a=e.split(`
199
+ `)}function gk(t,e){if("~standard"in t){let n=t["~standard"].validate(e);if(n instanceof Promise)throw new TypeError("Schema validation must be synchronous. Update `validate()` and remove any asynchronous logic.");return n.issues?.at(0)?.message}return t(e)}var Cr=class{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame="";_subscribers=new Map;_cursor=0;state="initial";error="";value;userInput="";constructor(e,n=!0){let{input:i=pk,output:r=ag,render:o,signal:s,...a}=e;this.opts=a,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=o.bind(this),this._track=n,this._abortSignal=s,this.input=i,this.output=r}unsubscribe(){this._subscribers.clear()}setSubscriber(e,n){let i=this._subscribers.get(e)??[];i.push(n),this._subscribers.set(e,i)}on(e,n){this.setSubscriber(e,{cb:n})}once(e,n){this.setSubscriber(e,{cb:n,once:!0})}emit(e,...n){let i=this._subscribers.get(e)??[],r=[];for(let o of i)o.cb(...n),o.once&&r.push(()=>i.splice(i.indexOf(o),1));for(let o of r)o()}prompt(){return new Promise(e=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),e(sg);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}this.rl=fN.createInterface({input:this.input,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on("keypress",this.onKeypress),uu(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(we.cursor.show),this.output.off("resize",this.render),uu(this.input,!1),e(this.value)}),this.once("cancel",()=>{this.output.write(we.cursor.show),this.output.off("resize",this.render),uu(this.input,!1),e(sg)})})}_isActionKey(e,n){return e===" "}_shouldSubmit(e,n){return!0}_setValue(e){this.value=e,this.emit("value",this.value)}_setUserInput(e,n){this.userInput=e??"",this.emit("userInput",this.userInput),n&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:"u"}),this._setUserInput("")}onKeypress(e,n){if(this._track&&n.name!=="return"&&(n.name&&this._isActionKey(e,n)&&this.rl?.write(null,{ctrl:!0,name:"h"}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state==="error"&&(this.state="active"),n?.name&&(!this._track&&fe.aliases.has(n.name)&&this.emit("cursor",fe.aliases.get(n.name)),fe.actions.has(n.name)&&this.emit("cursor",n.name)),e&&(e.toLowerCase()==="y"||e.toLowerCase()==="n")&&this.emit("confirm",e.toLowerCase()==="y"),this.emit("key",e,n),n?.name==="return"&&this._shouldSubmit(e,n)){if(this.opts.validate){let i=gk(this.opts.validate,this.value);i&&(this.error=i instanceof Error?i.message:i,this.state="error",this.rl?.write(this.userInput))}this.state!=="error"&&(this.state="submit")}ug([e,n?.name,n?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
200
+ `),uu(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=vt(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
201
+ `).length-1;this.output.write(we.cursor.move(-999,e*-1))}render(){let e=vt(this._render(this)??"",process.stdout.columns,{hard:!0,trim:!1});if(e!==this._prevFrame){if(this.state==="initial")this.output.write(we.cursor.hide);else{let n=mN(this._prevFrame,e),i=cg(this.output);if(this.restoreCursor(),n){let r=Math.max(0,n.numLinesAfter-i),o=Math.max(0,n.numLinesBefore-i),s=n.lines.find(a=>a>=r);if(s===void 0){this._prevFrame=e;return}if(n.lines.length===1){this.output.write(we.cursor.move(0,s-o)),this.output.write(we.erase.lines(1));let a=e.split(`
160
202
  `);this.output.write(a[s]),this._prevFrame=e,this.output.write(we.cursor.move(0,a.length-s-1));return}else if(n.lines.length>1){if(r<o)s=r;else{let u=s-o;u>0&&this.output.write(we.cursor.move(0,u))}this.output.write(we.erase.down());let a=e.split(`
161
203
  `).slice(s);this.output.write(a.join(`
162
- `)),this._prevFrame=e;return}}this.output.write(we.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}};var su=class extends Or{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(e){super(e,!1),this.value=!!e.initialValue,this.on("userInput",()=>{this.value=this._value}),this.on("confirm",n=>{this.output.write(we.cursor.move(0,-1)),this.value=n,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};var sk=class extends Or{options;cursor=0;get _value(){return this.options[this.cursor].value}get _enabledOptions(){return this.options.filter(e=>e.disabled!==!0)}toggleAll(){let e=this._enabledOptions,n=this.value!==void 0&&this.value.length===e.length;this.value=n?[]:e.map(i=>i.value)}toggleInvert(){let e=this.value;if(!e)return;let n=this._enabledOptions.filter(i=>!e.includes(i.value));this.value=n.map(i=>i.value)}toggleValue(){this.value===void 0&&(this.value=[]);let e=this.value.includes(this._value);this.value=e?this.value.filter(n=>n!==this._value):[...this.value,this._value]}constructor(e){super(e,!1),this.options=e.options,this.value=[...e.initialValues??[]];let n=Math.max(this.options.findIndex(({value:i})=>i===e.cursorAt),0);this.cursor=this.options[n].disabled?Tr(n,1,this.options):n,this.on("key",(i,r)=>{r.name==="a"&&this.toggleAll(),r.name==="i"&&this.toggleInvert()}),this.on("cursor",i=>{switch(i){case"left":case"up":this.cursor=Tr(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=Tr(this.cursor,1,this.options);break;case"space":this.toggleValue();break}})}},au=class extends Or{_mask="\u2022";get cursor(){return this._cursor}get masked(){return this.userInput.replaceAll(/./g,this._mask)}get userInputWithCursor(){if(this.state==="submit"||this.state==="cancel")return this.masked;let e=this.userInput;if(this.cursor>=e.length)return`${this.masked}${Xm(["inverse","hidden"],"_")}`;let n=this.masked,i=n.slice(0,this.cursor),r=n.slice(this.cursor);return`${i}${Xm("inverse",r[0])}${r.slice(1)}`}clear(){this._clearUserInput()}constructor({mask:e,...n}){super(n),this._mask=e??"\u2022",this.on("userInput",i=>{this._setValue(i)})}},uu=class extends Or{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor(e){super(e,!1),this.options=e.options;let n=this.options.findIndex(({value:r})=>r===e.initialValue),i=n===-1?0:n;this.cursor=this.options[i].disabled?Tr(i,1,this.options):i,this.changeValue(),this.on("cursor",r=>{switch(r){case"left":case"up":this.cursor=Tr(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=Tr(this.cursor,1,this.options);break}this.changeValue()})}};var cu=class extends Or{get userInputWithCursor(){if(this.state==="submit")return this.userInput;let e=this.userInput;if(this.cursor>=e.length)return`${this.userInput}\u2588`;let n=e.slice(0,this.cursor),[i,...r]=e.slice(this.cursor);return`${n}${Xm("inverse",i)}${r.join("")}`}get cursor(){return this._cursor}constructor(e){super({...e,initialUserInput:e.initialUserInput??e.initialValue}),this.on("userInput",n=>{this._setValue(n)}),this.on("finalize",()=>{this.value||(this.value=e.defaultValue),this.value===void 0&&(this.value="")})}};import{styleText as y,stripVTControlCharacters as JF}from"node:util";import nt from"node:process";var ro=He(Ym(),1);function W4(){return nt.platform!=="win32"?nt.env.TERM!=="linux":!!nt.env.CI||!!nt.env.WT_SESSION||!!nt.env.TERMINUS_SUBLIME||nt.env.ConEmuTask==="{cmd::Cmder}"||nt.env.TERM_PROGRAM==="Terminus-Sublime"||nt.env.TERM_PROGRAM==="vscode"||nt.env.TERM==="xterm-256color"||nt.env.TERM==="alacritty"||nt.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var ng=W4(),q4=()=>process.env.CI==="true";var Y=(t,e)=>ng?t:e,H4=Y("\u25C6","*"),dk=Y("\u25A0","x"),fk=Y("\u25B2","x"),pu=Y("\u25C7","o"),J4=Y("\u250C","T"),M=Y("\u2502","|"),yt=Y("\u2514","\u2014"),QF=Y("\u2510","T"),eV=Y("\u2518","\u2014"),ig=Y("\u25CF",">"),fu=Y("\u25CB"," "),K4=Y("\u25FB","[\u2022]"),ak=Y("\u25FC","[+]"),uk=Y("\u25FB","[ ]"),Y4=Y("\u25AA","\u2022"),ck=Y("\u2500","-"),X4=Y("\u256E","+"),Q4=Y("\u251C","+"),eN=Y("\u256F","+"),tN=Y("\u2570","+"),tV=Y("\u256D","+"),rN=Y("\u25CF","\u2022"),nN=Y("\u25C6","*"),iN=Y("\u25B2","!"),oN=Y("\u25A0","x"),no=t=>{switch(t){case"initial":case"active":return y("cyan",H4);case"cancel":return y("red",dk);case"error":return y("yellow",fk);case"submit":return y("green",pu)}},pk=t=>{switch(t){case"initial":case"active":return y("cyan",M);case"cancel":return y("red",M);case"error":return y("yellow",M);case"submit":return y("green",M)}},lk=(t,e,n,i,r,o=!1)=>{let s=e,a=0;if(o)for(let u=i-1;u>=n&&(s-=t[u].length,a++,!(s<=r));u--);else for(let u=n;u<i&&(s-=t[u].length,a++,!(s<=r));u++);return{lineCount:s,removals:a}},og=({cursor:t,options:e,style:n,output:i=process.stdout,maxItems:r=Number.POSITIVE_INFINITY,columnPadding:o=0,rowPadding:s=4})=>{let a=eo(i)-o,u=rg(i),c=y("dim","..."),l=Math.max(u-s,0),d=Math.max(Math.min(r,l),5),f=0;t>=d-3&&(f=Math.max(Math.min(t-d+3,e.length-d),0));let p=d<e.length&&f>0,h=d<e.length&&f+d<e.length,_=Math.min(f+d,e.length),S=[],k=0;p&&k++,h&&k++;let C=f+(p?1:0),A=_-(h?1:0);for(let T=C;T<A;T++){let Z=vt(n(e[T],T===t),a,{hard:!0,trim:!1}).split(`
163
- `);S.push(Z),k+=Z.length}if(k>l){let T=0,Z=0,F=k,W=t-C,ne=l,be=()=>lk(S,F,0,W,ne),pe=()=>lk(S,F,W+1,S.length,ne,!0);p?({lineCount:F,removals:T}=be(),F>ne&&(h||(ne-=1),{lineCount:F,removals:Z}=pe())):(h||(ne-=1),{lineCount:F,removals:Z}=pe(),F>ne&&(ne-=1,{lineCount:F,removals:T}=be())),T>0&&(p=!0,S.splice(0,T)),Z>0&&(h=!0,S.splice(S.length-Z,Z))}let I=[];p&&I.push(c);for(let T of S)for(let Z of T)I.push(Z);return h&&I.push(c),I};var hu=t=>{let e=t.active??"Yes",n=t.inactive??"No";return new su({active:e,inactive:n,signal:t.signal,input:t.input,output:t.output,initialValue:t.initialValue??!0,render(){let i=t.withGuide??fe.withGuide,r=`${no(this.state)} `,o=i?`${y("gray",M)} `:"",s=er(t.output,t.message,o,r),a=`${i?`${y("gray",M)}
204
+ `)),this._prevFrame=e;return}}this.output.write(we.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}};var cu=class extends Cr{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(e){super(e,!1),this.value=!!e.initialValue,this.on("userInput",()=>{this.value=this._value}),this.on("confirm",n=>{this.output.write(we.cursor.move(0,-1)),this.value=n,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};var vk=class extends Cr{options;cursor=0;get _value(){return this.options[this.cursor].value}get _enabledOptions(){return this.options.filter(e=>e.disabled!==!0)}toggleAll(){let e=this._enabledOptions,n=this.value!==void 0&&this.value.length===e.length;this.value=n?[]:e.map(i=>i.value)}toggleInvert(){let e=this.value;if(!e)return;let n=this._enabledOptions.filter(i=>!e.includes(i.value));this.value=n.map(i=>i.value)}toggleValue(){this.value===void 0&&(this.value=[]);let e=this.value.includes(this._value);this.value=e?this.value.filter(n=>n!==this._value):[...this.value,this._value]}constructor(e){super(e,!1),this.options=e.options,this.value=[...e.initialValues??[]];let n=Math.max(this.options.findIndex(({value:i})=>i===e.cursorAt),0);this.cursor=this.options[n].disabled?Pr(n,1,this.options):n,this.on("key",(i,r)=>{r.name==="a"&&this.toggleAll(),r.name==="i"&&this.toggleInvert()}),this.on("cursor",i=>{switch(i){case"left":case"up":this.cursor=Pr(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=Pr(this.cursor,1,this.options);break;case"space":this.toggleValue();break}})}},lu=class extends Cr{_mask="\u2022";get cursor(){return this._cursor}get masked(){return this.userInput.replaceAll(/./g,this._mask)}get userInputWithCursor(){if(this.state==="submit"||this.state==="cancel")return this.masked;let e=this.userInput;if(this.cursor>=e.length)return`${this.masked}${og(["inverse","hidden"],"_")}`;let n=this.masked,i=n.slice(0,this.cursor),r=n.slice(this.cursor);return`${i}${og("inverse",r[0])}${r.slice(1)}`}clear(){this._clearUserInput()}constructor({mask:e,...n}){super(n),this._mask=e??"\u2022",this.on("userInput",i=>{this._setValue(i)})}},du=class extends Cr{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor(e){super(e,!1),this.options=e.options;let n=this.options.findIndex(({value:r})=>r===e.initialValue),i=n===-1?0:n;this.cursor=this.options[i].disabled?Pr(i,1,this.options):i,this.changeValue(),this.on("cursor",r=>{switch(r){case"left":case"up":this.cursor=Pr(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=Pr(this.cursor,1,this.options);break}this.changeValue()})}};var fu=class extends Cr{get userInputWithCursor(){if(this.state==="submit")return this.userInput;let e=this.userInput;if(this.cursor>=e.length)return`${this.userInput}\u2588`;let n=e.slice(0,this.cursor),[i,...r]=e.slice(this.cursor);return`${n}${og("inverse",i)}${r.join("")}`}get cursor(){return this._cursor}constructor(e){super({...e,initialUserInput:e.initialUserInput??e.initialValue}),this.on("userInput",n=>{this._setValue(n)}),this.on("finalize",()=>{this.value||(this.value=e.defaultValue),this.value===void 0&&(this.value="")})}};import{styleText as y,stripVTControlCharacters as OV}from"node:util";import nt from"node:process";var io=Je(ig(),1);function vN(){return nt.platform!=="win32"?nt.env.TERM!=="linux":!!nt.env.CI||!!nt.env.WT_SESSION||!!nt.env.TERMINUS_SUBLIME||nt.env.ConEmuTask==="{cmd::Cmder}"||nt.env.TERM_PROGRAM==="Terminus-Sublime"||nt.env.TERM_PROGRAM==="vscode"||nt.env.TERM==="xterm-256color"||nt.env.TERM==="alacritty"||nt.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var lg=vN(),yN=()=>process.env.CI==="true";var Y=(t,e)=>lg?t:e,_N=Y("\u25C6","*"),xk=Y("\u25A0","x"),wk=Y("\u25B2","x"),gu=Y("\u25C7","o"),bN=Y("\u250C","T"),M=Y("\u2502","|"),yt=Y("\u2514","\u2014"),zV=Y("\u2510","T"),NV=Y("\u2518","\u2014"),dg=Y("\u25CF",">"),mu=Y("\u25CB"," "),$N=Y("\u25FB","[\u2022]"),yk=Y("\u25FC","[+]"),_k=Y("\u25FB","[ ]"),xN=Y("\u25AA","\u2022"),bk=Y("\u2500","-"),wN=Y("\u256E","+"),SN=Y("\u251C","+"),kN=Y("\u256F","+"),IN=Y("\u2570","+"),RV=Y("\u256D","+"),EN=Y("\u25CF","\u2022"),TN=Y("\u25C6","*"),ON=Y("\u25B2","!"),PN=Y("\u25A0","x"),oo=t=>{switch(t){case"initial":case"active":return y("cyan",_N);case"cancel":return y("red",xk);case"error":return y("yellow",wk);case"submit":return y("green",gu)}},Sk=t=>{switch(t){case"initial":case"active":return y("cyan",M);case"cancel":return y("red",M);case"error":return y("yellow",M);case"submit":return y("green",M)}},$k=(t,e,n,i,r,o=!1)=>{let s=e,a=0;if(o)for(let u=i-1;u>=n&&(s-=t[u].length,a++,!(s<=r));u--);else for(let u=n;u<i&&(s-=t[u].length,a++,!(s<=r));u++);return{lineCount:s,removals:a}},fg=({cursor:t,options:e,style:n,output:i=process.stdout,maxItems:r=Number.POSITIVE_INFINITY,columnPadding:o=0,rowPadding:s=4})=>{let a=ro(i)-o,u=cg(i),c=y("dim","..."),l=Math.max(u-s,0),d=Math.max(Math.min(r,l),5),f=0;t>=d-3&&(f=Math.max(Math.min(t-d+3,e.length-d),0));let h=d<e.length&&f>0,p=d<e.length&&f+d<e.length,_=Math.min(f+d,e.length),S=[],k=0;h&&k++,p&&k++;let C=f+(h?1:0),A=_-(p?1:0);for(let T=C;T<A;T++){let Z=vt(n(e[T],T===t),a,{hard:!0,trim:!1}).split(`
205
+ `);S.push(Z),k+=Z.length}if(k>l){let T=0,Z=0,F=k,W=t-C,ne=l,$e=()=>$k(S,F,0,W,ne),he=()=>$k(S,F,W+1,S.length,ne,!0);h?({lineCount:F,removals:T}=$e(),F>ne&&(p||(ne-=1),{lineCount:F,removals:Z}=he())):(p||(ne-=1),{lineCount:F,removals:Z}=he(),F>ne&&(ne-=1,{lineCount:F,removals:T}=$e())),T>0&&(h=!0,S.splice(0,T)),Z>0&&(p=!0,S.splice(S.length-Z,Z))}let I=[];h&&I.push(c);for(let T of S)for(let Z of T)I.push(Z);return p&&I.push(c),I};var vu=t=>{let e=t.active??"Yes",n=t.inactive??"No";return new cu({active:e,inactive:n,signal:t.signal,input:t.input,output:t.output,initialValue:t.initialValue??!0,render(){let i=t.withGuide??fe.withGuide,r=`${oo(this.state)} `,o=i?`${y("gray",M)} `:"",s=tr(t.output,t.message,o,r),a=`${i?`${y("gray",M)}
164
206
  `:""}${s}
165
207
  `,u=this.value?e:n;switch(this.state){case"submit":{let c=i?`${y("gray",M)} `:"";return`${a}${c}${y("dim",u)}`}case"cancel":{let c=i?`${y("gray",M)} `:"";return`${a}${c}${y(["strikethrough","dim"],u)}${i?`
166
- ${y("gray",M)}`:""}`}default:{let c=i?`${y("cyan",M)} `:"",l=i?y("cyan",yt):"";return`${a}${c}${this.value?`${y("green",ig)} ${e}`:`${y("dim",fu)} ${y("dim",e)}`}${t.vertical?i?`
208
+ ${y("gray",M)}`:""}`}default:{let c=i?`${y("cyan",M)} `:"",l=i?y("cyan",yt):"";return`${a}${c}${this.value?`${y("green",dg)} ${e}`:`${y("dim",mu)} ${y("dim",e)}`}${t.vertical?i?`
167
209
  ${y("cyan",M)} `:`
168
- `:` ${y("dim","/")} `}${this.value?`${y("dim",fu)} ${y("dim",n)}`:`${y("green",ig)} ${n}`}
210
+ `:` ${y("dim","/")} `}${this.value?`${y("dim",mu)} ${y("dim",n)}`:`${y("green",dg)} ${n}`}
169
211
  ${l}
170
- `}}}}).prompt()};var We={message:(t=[],{symbol:e=y("gray",M),secondarySymbol:n=y("gray",M),output:i=process.stdout,spacing:r=1,withGuide:o}={})=>{let s=[],a=o??fe.withGuide,u=a?n:"",c=a?`${e} `:"",l=a?`${n} `:"";for(let f=0;f<r;f++)s.push(u);let d=Array.isArray(t)?t:t.split(`
171
- `);if(d.length>0){let[f,...p]=d;f.length>0?s.push(`${c}${f}`):s.push(a?e:"");for(let h of p)h.length>0?s.push(`${l}${h}`):s.push(a?n:"")}i.write(`${s.join(`
212
+ `}}}}).prompt()};var qe={message:(t=[],{symbol:e=y("gray",M),secondarySymbol:n=y("gray",M),output:i=process.stdout,spacing:r=1,withGuide:o}={})=>{let s=[],a=o??fe.withGuide,u=a?n:"",c=a?`${e} `:"",l=a?`${n} `:"";for(let f=0;f<r;f++)s.push(u);let d=Array.isArray(t)?t:t.split(`
213
+ `);if(d.length>0){let[f,...h]=d;f.length>0?s.push(`${c}${f}`):s.push(a?e:"");for(let p of h)p.length>0?s.push(`${l}${p}`):s.push(a?n:"")}i.write(`${s.join(`
172
214
  `)}
173
- `)},info:(t,e)=>{We.message(t,{...e,symbol:y("blue",rN)})},success:(t,e)=>{We.message(t,{...e,symbol:y("green",nN)})},step:(t,e)=>{We.message(t,{...e,symbol:y("green",pu)})},warn:(t,e)=>{We.message(t,{...e,symbol:y("yellow",iN)})},warning:(t,e)=>{We.warn(t,e)},error:(t,e)=>{We.message(t,{...e,symbol:y("red",oN)})}},hk=(t="",e)=>{let n=e?.output??process.stdout,i=e?.withGuide??fe.withGuide?`${y("gray",yt)} `:"";n.write(`${i}${y("red",t)}
215
+ `)},info:(t,e)=>{qe.message(t,{...e,symbol:y("blue",EN)})},success:(t,e)=>{qe.message(t,{...e,symbol:y("green",TN)})},step:(t,e)=>{qe.message(t,{...e,symbol:y("green",gu)})},warn:(t,e)=>{qe.message(t,{...e,symbol:y("yellow",ON)})},warning:(t,e)=>{qe.warn(t,e)},error:(t,e)=>{qe.message(t,{...e,symbol:y("red",PN)})}},kk=(t="",e)=>{let n=e?.output??process.stdout,i=e?.withGuide??fe.withGuide?`${y("gray",yt)} `:"";n.write(`${i}${y("red",t)}
174
216
 
175
- `)},mk=(t="",e)=>{let n=e?.output??process.stdout,i=e?.withGuide??fe.withGuide?`${y("gray",J4)} `:"";n.write(`${i}${t}
176
- `)},gk=(t="",e)=>{let n=e?.output??process.stdout,i=e?.withGuide??fe.withGuide?`${y("gray",M)}
217
+ `)},Ik=(t="",e)=>{let n=e?.output??process.stdout,i=e?.withGuide??fe.withGuide?`${y("gray",bN)} `:"";n.write(`${i}${t}
218
+ `)},Ek=(t="",e)=>{let n=e?.output??process.stdout,i=e?.withGuide??fe.withGuide?`${y("gray",M)}
177
219
  ${y("gray",yt)} `:"";n.write(`${i}${t}
178
220
 
179
- `)};var to=(t,e)=>t.split(`
221
+ `)};var no=(t,e)=>t.split(`
180
222
  `).map(n=>e(n)).join(`
181
- `),vk=t=>{let e=(i,r)=>{let o=i.label??String(i.value);return r==="disabled"?`${y("gray",uk)} ${to(o,s=>y(["strikethrough","gray"],s))}${i.hint?` ${y("dim",`(${i.hint??"disabled"})`)}`:""}`:r==="active"?`${y("cyan",K4)} ${o}${i.hint?` ${y("dim",`(${i.hint})`)}`:""}`:r==="selected"?`${y("green",ak)} ${to(o,s=>y("dim",s))}${i.hint?` ${y("dim",`(${i.hint})`)}`:""}`:r==="cancelled"?`${to(o,s=>y(["strikethrough","dim"],s))}`:r==="active-selected"?`${y("green",ak)} ${o}${i.hint?` ${y("dim",`(${i.hint})`)}`:""}`:r==="submitted"?`${to(o,s=>y("dim",s))}`:`${y("dim",uk)} ${to(o,s=>y("dim",s))}`},n=t.required??!0;return new sk({options:t.options,signal:t.signal,input:t.input,output:t.output,initialValues:t.initialValues,required:n,cursorAt:t.cursorAt,validate(i){if(n&&(i===void 0||i.length===0))return`Please select at least one option.
182
- ${y("reset",y("dim",`Press ${y(["gray","bgWhite","inverse"]," space ")} to select, ${y("gray",y("bgWhite",y("inverse"," enter ")))} to submit`))}`},render(){let i=t.withGuide??fe.withGuide,r=er(t.output,t.message,i?`${pk(this.state)} `:"",`${no(this.state)} `),o=`${i?`${y("gray",M)}
223
+ `),Tk=t=>{let e=(i,r)=>{let o=i.label??String(i.value);return r==="disabled"?`${y("gray",_k)} ${no(o,s=>y(["strikethrough","gray"],s))}${i.hint?` ${y("dim",`(${i.hint??"disabled"})`)}`:""}`:r==="active"?`${y("cyan",$N)} ${o}${i.hint?` ${y("dim",`(${i.hint})`)}`:""}`:r==="selected"?`${y("green",yk)} ${no(o,s=>y("dim",s))}${i.hint?` ${y("dim",`(${i.hint})`)}`:""}`:r==="cancelled"?`${no(o,s=>y(["strikethrough","dim"],s))}`:r==="active-selected"?`${y("green",yk)} ${o}${i.hint?` ${y("dim",`(${i.hint})`)}`:""}`:r==="submitted"?`${no(o,s=>y("dim",s))}`:`${y("dim",_k)} ${no(o,s=>y("dim",s))}`},n=t.required??!0;return new vk({options:t.options,signal:t.signal,input:t.input,output:t.output,initialValues:t.initialValues,required:n,cursorAt:t.cursorAt,validate(i){if(n&&(i===void 0||i.length===0))return`Please select at least one option.
224
+ ${y("reset",y("dim",`Press ${y(["gray","bgWhite","inverse"]," space ")} to select, ${y("gray",y("bgWhite",y("inverse"," enter ")))} to submit`))}`},render(){let i=t.withGuide??fe.withGuide,r=tr(t.output,t.message,i?`${Sk(this.state)} `:"",`${oo(this.state)} `),o=`${i?`${y("gray",M)}
183
225
  `:""}${r}
184
- `,s=this.value??[],a=(u,c)=>{if(u.disabled)return e(u,"disabled");let l=s.includes(u.value);return c&&l?e(u,"active-selected"):l?e(u,"selected"):e(u,c?"active":"inactive")};switch(this.state){case"submit":{let u=this.options.filter(({value:l})=>s.includes(l)).map(l=>e(l,"submitted")).join(y("dim",", "))||y("dim","none"),c=er(t.output,u,i?`${y("gray",M)} `:"");return`${o}${c}`}case"cancel":{let u=this.options.filter(({value:l})=>s.includes(l)).map(l=>e(l,"cancelled")).join(y("dim",", "));if(u.trim()==="")return`${o}${y("gray",M)}`;let c=er(t.output,u,i?`${y("gray",M)} `:"");return`${o}${c}${i?`
226
+ `,s=this.value??[],a=(u,c)=>{if(u.disabled)return e(u,"disabled");let l=s.includes(u.value);return c&&l?e(u,"active-selected"):l?e(u,"selected"):e(u,c?"active":"inactive")};switch(this.state){case"submit":{let u=this.options.filter(({value:l})=>s.includes(l)).map(l=>e(l,"submitted")).join(y("dim",", "))||y("dim","none"),c=tr(t.output,u,i?`${y("gray",M)} `:"");return`${o}${c}`}case"cancel":{let u=this.options.filter(({value:l})=>s.includes(l)).map(l=>e(l,"cancelled")).join(y("dim",", "));if(u.trim()==="")return`${o}${y("gray",M)}`;let c=tr(t.output,u,i?`${y("gray",M)} `:"");return`${o}${c}${i?`
185
227
  ${y("gray",M)}`:""}`}case"error":{let u=i?`${y("yellow",M)} `:"",c=this.error.split(`
186
- `).map((f,p)=>p===0?`${i?`${y("yellow",yt)} `:""}${y("yellow",f)}`:` ${f}`).join(`
228
+ `).map((f,h)=>h===0?`${i?`${y("yellow",yt)} `:""}${y("yellow",f)}`:` ${f}`).join(`
187
229
  `),l=o.split(`
188
230
  `).length,d=c.split(`
189
- `).length+1;return`${o}${u}${og({output:t.output,options:this.options,cursor:this.cursor,maxItems:t.maxItems,columnPadding:u.length,rowPadding:l+d,style:a}).join(`
231
+ `).length+1;return`${o}${u}${fg({output:t.output,options:this.options,cursor:this.cursor,maxItems:t.maxItems,columnPadding:u.length,rowPadding:l+d,style:a}).join(`
190
232
  ${u}`)}
191
233
  ${c}
192
234
  `}default:{let u=i?`${y("cyan",M)} `:"",c=o.split(`
193
- `).length,l=i?2:1;return`${o}${u}${og({output:t.output,options:this.options,cursor:this.cursor,maxItems:t.maxItems,columnPadding:u.length,rowPadding:c+l,style:a}).join(`
235
+ `).length,l=i?2:1;return`${o}${u}${fg({output:t.output,options:this.options,cursor:this.cursor,maxItems:t.maxItems,columnPadding:u.length,rowPadding:c+l,style:a}).join(`
194
236
  ${u}`)}
195
237
  ${i?y("cyan",yt):""}
196
- `}}}}).prompt()},sN=t=>y("dim",t),aN=(t,e,n)=>{let i={hard:!0,trim:!1},r=vt(t,e,i).split(`
197
- `),o=r.reduce((u,c)=>Math.max(Ae(c),u),0),s=r.map(n).reduce((u,c)=>Math.max(Ae(c),u),0),a=e-(s-o);return vt(t,a,i)},sg=(t="",e="",n)=>{let i=n?.output??nt.stdout,r=n?.withGuide??fe.withGuide,o=n?.format??sN,s=["",...aN(t,eo(i)-6,o).split(`
198
- `).map(o),""],a=Ae(e),u=Math.max(s.reduce((f,p)=>{let h=Ae(p);return h>f?h:f},0),a)+2,c=s.map(f=>`${y("gray",M)} ${f}${" ".repeat(u-Ae(f))}${y("gray",M)}`).join(`
238
+ `}}}}).prompt()},CN=t=>y("dim",t),AN=(t,e,n)=>{let i={hard:!0,trim:!1},r=vt(t,e,i).split(`
239
+ `),o=r.reduce((u,c)=>Math.max(Ae(c),u),0),s=r.map(n).reduce((u,c)=>Math.max(Ae(c),u),0),a=e-(s-o);return vt(t,a,i)},hg=(t="",e="",n)=>{let i=n?.output??nt.stdout,r=n?.withGuide??fe.withGuide,o=n?.format??CN,s=["",...AN(t,ro(i)-6,o).split(`
240
+ `).map(o),""],a=Ae(e),u=Math.max(s.reduce((f,h)=>{let p=Ae(h);return p>f?p:f},0),a)+2,c=s.map(f=>`${y("gray",M)} ${f}${" ".repeat(u-Ae(f))}${y("gray",M)}`).join(`
199
241
  `),l=r?`${y("gray",M)}
200
- `:"",d=r?Q4:tN;i.write(`${l}${y("green",pu)} ${y("reset",e)} ${y("gray",ck.repeat(Math.max(u-a-1,1))+X4)}
242
+ `:"",d=r?SN:IN;i.write(`${l}${y("green",gu)} ${y("reset",e)} ${y("gray",bk.repeat(Math.max(u-a-1,1))+wN)}
201
243
  ${c}
202
- ${y("gray",d+ck.repeat(u+2)+eN)}
203
- `)},yk=t=>new au({validate:t.validate,mask:t.mask??Y4,signal:t.signal,input:t.input,output:t.output,render(){let e=t.withGuide??fe.withGuide,n=`${e?`${y("gray",M)}
204
- `:""}${no(this.state)} ${t.message}
244
+ ${y("gray",d+bk.repeat(u+2)+kN)}
245
+ `)},Ok=t=>new lu({validate:t.validate,mask:t.mask??xN,signal:t.signal,input:t.input,output:t.output,render(){let e=t.withGuide??fe.withGuide,n=`${e?`${y("gray",M)}
246
+ `:""}${oo(this.state)} ${t.message}
205
247
  `,i=this.userInputWithCursor,r=this.masked;switch(this.state){case"error":{let o=e?`${y("yellow",M)} `:"",s=e?`${y("yellow",yt)} `:"",a=r??"";return t.clearOnError&&this.clear(),`${n.trim()}
206
248
  ${o}${a}
207
249
  ${s}${y("yellow",this.error)}
208
250
  `}case"submit":{let o=e?`${y("gray",M)} `:"",s=r?y("dim",r):"";return`${n}${o}${s}`}case"cancel":{let o=e?`${y("gray",M)} `:"",s=r?y(["strikethrough","dim"],r):"";return`${n}${o}${s}${r&&e?`
209
251
  ${y("gray",M)}`:""}`}default:{let o=e?`${y("cyan",M)} `:"",s=e?y("cyan",yt):"";return`${n}${o}${i}
210
252
  ${s}
211
- `}}}}).prompt();var uN=t=>y("magenta",t),_k=({indicator:t="dots",onCancel:e,output:n=process.stdout,cancelMessage:i,errorMessage:r,frames:o=ng?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],delay:s=ng?80:120,signal:a,...u}={})=>{let c=q4(),l,d,f=!1,p=!1,h="",_,S=performance.now(),k=eo(n),C=u?.styleFrame??uN,A=Q=>{let D=Q>1?r??fe.messages.error:i??fe.messages.cancel;p=Q===1,f&&(ke(D,Q),p&&typeof e=="function"&&e())},I=()=>A(2),T=()=>A(1),Z=()=>{process.on("uncaughtExceptionMonitor",I),process.on("unhandledRejection",I),process.on("SIGINT",T),process.on("SIGTERM",T),process.on("exit",A),a&&a.addEventListener("abort",T)},F=()=>{process.removeListener("uncaughtExceptionMonitor",I),process.removeListener("unhandledRejection",I),process.removeListener("SIGINT",T),process.removeListener("SIGTERM",T),process.removeListener("exit",A),a&&a.removeEventListener("abort",T)},W=()=>{if(_===void 0)return;c&&n.write(`
253
+ `}}}}).prompt();var zN=t=>y("magenta",t),Pk=({indicator:t="dots",onCancel:e,output:n=process.stdout,cancelMessage:i,errorMessage:r,frames:o=lg?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],delay:s=lg?80:120,signal:a,...u}={})=>{let c=yN(),l,d,f=!1,h=!1,p="",_,S=performance.now(),k=ro(n),C=u?.styleFrame??zN,A=Q=>{let D=Q>1?r??fe.messages.error:i??fe.messages.cancel;h=Q===1,f&&(ke(D,Q),h&&typeof e=="function"&&e())},I=()=>A(2),T=()=>A(1),Z=()=>{process.on("uncaughtExceptionMonitor",I),process.on("unhandledRejection",I),process.on("SIGINT",T),process.on("SIGTERM",T),process.on("exit",A),a&&a.addEventListener("abort",T)},F=()=>{process.removeListener("uncaughtExceptionMonitor",I),process.removeListener("unhandledRejection",I),process.removeListener("SIGINT",T),process.removeListener("SIGTERM",T),process.removeListener("exit",A),a&&a.removeEventListener("abort",T)},W=()=>{if(_===void 0)return;c&&n.write(`
212
254
  `);let Q=vt(_,k,{hard:!0,trim:!1}).split(`
213
- `);Q.length>1&&n.write(ro.cursor.up(Q.length-1)),n.write(ro.cursor.to(0)),n.write(ro.erase.down())},ne=Q=>Q.replace(/\.+$/,""),be=Q=>{let D=(performance.now()-Q)/1e3,ce=Math.floor(D/60),it=Math.floor(D%60);return ce>0?`[${ce}m ${it}s]`:`[${it}s]`},pe=u.withGuide??fe.withGuide,Se=(Q="")=>{f=!0,l=ik({output:n}),h=ne(Q),S=performance.now(),pe&&n.write(`${y("gray",M)}
214
- `);let D=0,ce=0;Z(),d=setInterval(()=>{if(c&&h===_)return;W(),_=h;let it=C(o[D]),Ue;if(c)Ue=`${it} ${h}...`;else if(t==="timer")Ue=`${it} ${h} ${be(S)}`;else{let le=".".repeat(Math.floor(ce)).slice(0,3);Ue=`${it} ${h}${le}`}let Pr=vt(Ue,k,{hard:!0,trim:!1});n.write(Pr),D=D+1<o.length?D+1:0,ce=ce<4?ce+.125:0},s)},ke=(Q="",D=0,ce=!1)=>{if(!f)return;f=!1,clearInterval(d),W();let it=D===0?y("green",pu):D===1?y("red",dk):y("red",fk);h=Q??h,ce||(t==="timer"?n.write(`${it} ${h} ${be(S)}
215
- `):n.write(`${it} ${h}
216
- `)),F(),l()};return{start:Se,stop:(Q="")=>ke(Q,0),message:(Q="")=>{h=ne(Q??h)},cancel:(Q="")=>ke(Q,1),error:(Q="")=>ke(Q,2),clear:()=>ke("",0,!0),get isCancelled(){return p}}},rV={light:Y("\u2500","-"),heavy:Y("\u2501","="),block:Y("\u2588","#")};var du=(t,e)=>t.includes(`
255
+ `);Q.length>1&&n.write(io.cursor.up(Q.length-1)),n.write(io.cursor.to(0)),n.write(io.erase.down())},ne=Q=>Q.replace(/\.+$/,""),$e=Q=>{let D=(performance.now()-Q)/1e3,ce=Math.floor(D/60),it=Math.floor(D%60);return ce>0?`[${ce}m ${it}s]`:`[${it}s]`},he=u.withGuide??fe.withGuide,Se=(Q="")=>{f=!0,l=mk({output:n}),p=ne(Q),S=performance.now(),he&&n.write(`${y("gray",M)}
256
+ `);let D=0,ce=0;Z(),d=setInterval(()=>{if(c&&p===_)return;W(),_=p;let it=C(o[D]),je;if(c)je=`${it} ${p}...`;else if(t==="timer")je=`${it} ${p} ${$e(S)}`;else{let le=".".repeat(Math.floor(ce)).slice(0,3);je=`${it} ${p}${le}`}let Ar=vt(je,k,{hard:!0,trim:!1});n.write(Ar),D=D+1<o.length?D+1:0,ce=ce<4?ce+.125:0},s)},ke=(Q="",D=0,ce=!1)=>{if(!f)return;f=!1,clearInterval(d),W();let it=D===0?y("green",gu):D===1?y("red",xk):y("red",wk);p=Q??p,ce||(t==="timer"?n.write(`${it} ${p} ${$e(S)}
257
+ `):n.write(`${it} ${p}
258
+ `)),F(),l()};return{start:Se,stop:(Q="")=>ke(Q,0),message:(Q="")=>{p=ne(Q??p)},cancel:(Q="")=>ke(Q,1),error:(Q="")=>ke(Q,2),clear:()=>ke("",0,!0),get isCancelled(){return h}}},DV={light:Y("\u2500","-"),heavy:Y("\u2501","="),block:Y("\u2588","#")};var pu=(t,e)=>t.includes(`
217
259
  `)?t.split(`
218
260
  `).map(n=>e(n)).join(`
219
- `):e(t),io=t=>{let e=(n,i)=>{let r=n.label??String(n.value);switch(i){case"disabled":return`${y("gray",fu)} ${du(r,o=>y("gray",o))}${n.hint?` ${y("dim",`(${n.hint??"disabled"})`)}`:""}`;case"selected":return`${du(r,o=>y("dim",o))}`;case"active":return`${y("green",ig)} ${r}${n.hint?` ${y("dim",`(${n.hint})`)}`:""}`;case"cancelled":return`${du(r,o=>y(["strikethrough","dim"],o))}`;default:return`${y("dim",fu)} ${du(r,o=>y("dim",o))}`}};return new uu({options:t.options,signal:t.signal,input:t.input,output:t.output,initialValue:t.initialValue,render(){let n=t.withGuide??fe.withGuide,i=`${no(this.state)} `,r=`${pk(this.state)} `,o=er(t.output,t.message,r,i),s=`${n?`${y("gray",M)}
261
+ `):e(t),so=t=>{let e=(n,i)=>{let r=n.label??String(n.value);switch(i){case"disabled":return`${y("gray",mu)} ${pu(r,o=>y("gray",o))}${n.hint?` ${y("dim",`(${n.hint??"disabled"})`)}`:""}`;case"selected":return`${pu(r,o=>y("dim",o))}`;case"active":return`${y("green",dg)} ${r}${n.hint?` ${y("dim",`(${n.hint})`)}`:""}`;case"cancelled":return`${pu(r,o=>y(["strikethrough","dim"],o))}`;default:return`${y("dim",mu)} ${pu(r,o=>y("dim",o))}`}};return new du({options:t.options,signal:t.signal,input:t.input,output:t.output,initialValue:t.initialValue,render(){let n=t.withGuide??fe.withGuide,i=`${oo(this.state)} `,r=`${Sk(this.state)} `,o=tr(t.output,t.message,r,i),s=`${n?`${y("gray",M)}
220
262
  `:""}${o}
221
- `;switch(this.state){case"submit":{let a=n?`${y("gray",M)} `:"",u=er(t.output,e(this.options[this.cursor],"selected"),a);return`${s}${u}`}case"cancel":{let a=n?`${y("gray",M)} `:"",u=er(t.output,e(this.options[this.cursor],"cancelled"),a);return`${s}${u}${n?`
263
+ `;switch(this.state){case"submit":{let a=n?`${y("gray",M)} `:"",u=tr(t.output,e(this.options[this.cursor],"selected"),a);return`${s}${u}`}case"cancel":{let a=n?`${y("gray",M)} `:"",u=tr(t.output,e(this.options[this.cursor],"cancelled"),a);return`${s}${u}${n?`
222
264
  ${y("gray",M)}`:""}`}default:{let a=n?`${y("cyan",M)} `:"",u=n?y("cyan",yt):"",c=s.split(`
223
- `).length,l=n?2:1;return`${s}${a}${og({output:t.output,cursor:this.cursor,options:this.options,maxItems:t.maxItems,columnPadding:a.length,rowPadding:c+l,style:(d,f)=>e(d,d.disabled?"disabled":f?"active":"inactive")}).join(`
265
+ `).length,l=n?2:1;return`${s}${a}${fg({output:t.output,cursor:this.cursor,options:this.options,maxItems:t.maxItems,columnPadding:a.length,rowPadding:c+l,style:(d,f)=>e(d,d.disabled?"disabled":f?"active":"inactive")}).join(`
224
266
  ${a}`)}
225
267
  ${u}
226
- `}}}}).prompt()};var nV=`${y("gray",M)} `;var $k=t=>new cu({validate:t.validate,placeholder:t.placeholder,defaultValue:t.defaultValue,initialValue:t.initialValue,output:t.output,signal:t.signal,input:t.input,render(){let e=t?.withGuide??fe.withGuide,n=`${`${e?`${y("gray",M)}
227
- `:""}${no(this.state)} `}${t.message}
268
+ `}}}}).prompt()};var LV=`${y("gray",M)} `;var Ck=t=>new fu({validate:t.validate,placeholder:t.placeholder,defaultValue:t.defaultValue,initialValue:t.initialValue,output:t.output,signal:t.signal,input:t.input,render(){let e=t?.withGuide??fe.withGuide,n=`${`${e?`${y("gray",M)}
269
+ `:""}${oo(this.state)} `}${t.message}
228
270
  `,i=t.placeholder?y("inverse",t.placeholder[0])+y("dim",t.placeholder.slice(1)):y(["inverse","hidden"],"_"),r=this.userInput?this.userInputWithCursor:i,o=this.value??"";switch(this.state){case"error":{let s=this.error?` ${y("yellow",this.error)}`:"",a=e?`${y("yellow",M)} `:"",u=e?y("yellow",yt):"";return`${n.trim()}
229
271
  ${a}${r}
230
272
  ${u}${s}
231
273
  `}case"submit":{let s=o?` ${y("dim",o)}`:"",a=e?y("gray",M):"";return`${n}${a}${s}`}case"cancel":{let s=o?` ${y(["strikethrough","dim"],o)}`:"",a=e?y("gray",M):"";return`${n}${a}${s}${o.trim()?`
232
274
  ${a}`:""}`}default:{let s=e?`${y("cyan",M)} `:"",a=e?y("cyan",yt):"";return`${n}${s}${r}
233
275
  ${a}
234
- `}}}}).prompt();De();cn();var cN={brain:["text"],voice:["stt","tts"],memory:["embedding"]},bk=["brain","voice","memory"],ag="brain",lN=["text","stt","tts","embedding"];function dN(t){return t==="text"}function xk(t){let e=new Set;for(let n of t)for(let i of cN[n])e.add(i);return lN.filter(n=>e.has(n))}function wk(t){let e=["brain"],n=t.routes;return(n?.stt||n?.tts)&&e.push("voice"),n?.embedding&&e.push("memory"),e}function Sk(t,e){if(e==="valid")return[];let n=dN(t);return e==="invalid"?n?["retry","change"]:["retry","change","skip"]:n?["save","retry","change"]:["save","retry","change","skip"]}function kk(t){let e={},n={};for(let r of t.routes){e[r.capability]={provider:r.provider,model:r.model};let o=t.keys.get(r.provider);o!==void 0&&o.length>0&&(n[r.provider]=o)}let i={version:t.existing.version,defaults:{logLevel:t.logLevel,modality:t.modality},upgrade:{auto:t.existing.upgrade.auto}};return Object.keys(e).length>0&&(i.routes=e),Object.keys(n).length>0&&(i.secrets=n),i}function Ik(t,e){return!!t.isTTY&&!!e.isTTY}var oo=class extends Error{},Ek={save:{label:"save anyway",hint:"keep this key; verify later with jarvis doctor"},retry:{label:"re-enter the key"},change:{label:"choose a different provider"},skip:{label:"skip this capability",hint:"optional"}},mu=class{config;probe;io;stdin;stdout;constructor(e){this.config=e.config,this.probe=e.probe,this.io=e.io??ue,this.stdin=e.stdin??process.stdin,this.stdout=e.stdout??process.stdout}async run(){if(!Ik(this.stdin,this.stdout))return this.printHeadlessGuidance(),1;try{return await this.wizard()}catch(e){if(e instanceof oo)return hk("no changes written."),130;throw e}}loadExisting(){try{return{config:this.config.resolved(),corrupt:!1}}catch{return{config:dr.parse({}),corrupt:!0}}}async wizard(){let{config:e,corrupt:n}=this.loadExisting(),i=!n&&!!(e.routes??e.secrets);mk(R.bold("jarvis init")),n&&We.warn("the existing config.json is invalid; init will replace it with a fresh config."),sg(`Writes ${R.accent(Ke.resolve("config.json"))} (owner-only).`+(i?`
235
- A config already exists - values are prefilled; edit or keep them.`:""),"setup");let r=await this.pickCapabilities(e),o=new Map,s=[];for(let d of xk(r)){let f=await this.configureCapability(d,e,o);f&&s.push(f)}let a=this.ensure(await io({message:"Default modality",options:[{value:"voice",label:"voice",hint:"speak and listen when available"},{value:"text",label:"text",hint:"text-only"}],initialValue:e.defaults.modality})),u=this.ensure(await io({message:"Log level",options:["debug","info","warn","error"].map(d=>({value:d,label:d})),initialValue:e.defaults.logLevel}));if(this.review(s,o,a,u),!this.ensure(await hu({message:"Write this configuration?"})))throw new oo;return this.config.write(kk({existing:e,routes:s,keys:o,modality:a,logLevel:u})),We.success(`wrote ${Ke.resolve("config.json")}`),await hu({message:"Start Jarvis now?",initialValue:!1})===!0&&We.info("starting is not wired yet in v0.1 - run `jarvis` to begin a session."),gk(R.ok("done.")),0}async pickCapabilities(e){let n=this.ensure(await vk({message:"Which capabilities do you want to set up?",options:[{value:"brain",label:"Brain (text)",hint:"required - the reasoning model"},{value:"voice",label:"Voice (speech in + out)",hint:"optional"},{value:"memory",label:"Memory (embeddings)",hint:"optional"}],initialValues:wk(e),required:!1}));n.includes(ag)||We.warn("Brain (text) is required; keeping it selected.");let i=new Set(n);return i.add(ag),bk.filter(r=>i.has(r))}async configureCapability(e,n,i){let r=this.probe.providersFor(e);if(r.length===0)return We.warn(`no providers available for ${e}; skipping.`),null;for(;;){let o=await this.pickProvider(e,r,n),s=await this.pickModel(e,o,n);if(i.has(o))return{capability:e,provider:o,model:s};let a=await this.resolveKey(e,o,s,n,i);if(a!=="change-provider")return a}}async resolveKey(e,n,i,r,o){let s=await this.firstKey(n,r);for(;;){let a=await this.validateKey(n,s);if(a==="valid")return o.set(n,s),{capability:e,provider:n,model:i};let u=await this.pickAfterFailure(e,a);if(u==="save")return o.set(n,s),{capability:e,provider:n,model:i};if(u==="skip")return We.info(`skipped ${e} (optional).`),null;if(u==="change")return"change-provider";s=await this.promptPassword(n)}}async pickProvider(e,n,i){let r=i.routes?.[e]?.provider;return this.ensure(await io({message:`${e} provider`,options:n.map(o=>({value:o,label:o})),initialValue:r&&n.includes(r)?r:void 0}))}async pickModel(e,n,i){let r=i.routes?.[e],o=r?.provider===n?r.model:this.probe.defaultModel(n,e)??"";return this.ensure(await $k({message:`${e} model`,initialValue:o,validate:s=>s?.trim()?void 0:"a model is required"}))}async firstKey(e,n){let i=n.secrets?.[e];return i&&this.ensure(await hu({message:`Reuse the saved key for ${e}?`,initialValue:!0}))?i.trim():this.promptPassword(e)}async promptPassword(e){return this.ensure(await yk({message:`${e} API key`,validate:i=>i?.trim()?void 0:"a key is required"})).trim()}async validateKey(e,n){let i=_k();i.start(`validating ${e} key...`);let r=await this.probe.probe(e,n),o=r.detail?` (${r.detail})`:"";return r.ok?i.stop(R.ok(`${e} key valid`)):r.status==="invalid"?i.stop(R.fail(`${e} key rejected${o}`)):r.status==="unverifiable"?i.stop(R.warn(`could not verify ${e} here${o}`)):i.stop(R.warn(`could not validate ${e}${o}`)),r.status}async pickAfterFailure(e,n){let i=Sk(e,n);return this.ensure(await io({message:`${e}: how do you want to proceed?`,options:i.map(r=>({value:r,label:Ek[r].label,hint:Ek[r].hint}))}))}review(e,n,i,r){let o=[];if(e.length===0)o.push("routes: none");else for(let s of e){let a=n.has(s.provider)?R.ok("key set"):R.warn("no key");o.push(`${s.capability}: ${s.provider}/${s.model} (${a})`)}o.push(`defaults: modality=${i}, logLevel=${r}`),sg(o.join(`
276
+ `}}}}).prompt();De();hr();var NN={brain:["text"],voice:["stt","tts"],memory:["embedding"]},Ak=["brain","voice","memory"],pg="brain",RN=["text","stt","tts","embedding"];function DN(t){return t==="text"}function zk(t){let e=new Set;for(let n of t)for(let i of NN[n])e.add(i);return RN.filter(n=>e.has(n))}function Nk(t){let e=["brain"],n=t.routes;return(n?.stt||n?.tts)&&e.push("voice"),n?.embedding&&e.push("memory"),e}function Rk(t,e){if(e==="valid")return[];let n=DN(t);return e==="invalid"?n?["retry","change"]:["retry","change","skip"]:n?["save","retry","change"]:["save","retry","change","skip"]}function Dk(t){let e={},n={};for(let r of t.routes){e[r.capability]={provider:r.provider,model:r.model};let o=t.keys.get(r.provider);o!==void 0&&o.length>0&&(n[r.provider]=o)}let i={version:t.existing.version,defaults:{logLevel:t.logLevel,modality:t.modality},upgrade:{auto:t.existing.upgrade.auto}};return Object.keys(e).length>0&&(i.routes=e),Object.keys(n).length>0&&(i.secrets=n),i}function Lk(t,e){return!!t.isTTY&&!!e.isTTY}var ao=class extends Error{},Uk={save:{label:"save anyway",hint:"keep this key; verify later with jarvis doctor"},retry:{label:"re-enter the key"},change:{label:"choose a different provider"},skip:{label:"skip this capability",hint:"optional"}},yu=class{config;probe;io;stdin;stdout;constructor(e){this.config=e.config,this.probe=e.probe,this.io=e.io??ue,this.stdin=e.stdin??process.stdin,this.stdout=e.stdout??process.stdout}async run(){if(!Lk(this.stdin,this.stdout))return this.printHeadlessGuidance(),1;try{return await this.wizard()}catch(e){if(e instanceof ao)return kk("no changes written."),130;throw e}}loadExisting(){try{return{config:this.config.resolved(),corrupt:!1}}catch{return{config:fr.parse({}),corrupt:!0}}}async wizard(){let{config:e,corrupt:n}=this.loadExisting(),i=!n&&!!(e.routes??e.secrets);Ik(R.bold("jarvis init")),n&&qe.warn("the existing config.json is invalid; init will replace it with a fresh config."),hg(`Writes ${R.accent(Be.resolve("config.json"))} (owner-only).`+(i?`
277
+ A config already exists - values are prefilled; edit or keep them.`:""),"setup");let r=await this.pickCapabilities(e),o=new Map,s=[];for(let d of zk(r)){let f=await this.configureCapability(d,e,o);f&&s.push(f)}let a=this.ensure(await so({message:"Default modality",options:[{value:"voice",label:"voice",hint:"speak and listen when available"},{value:"text",label:"text",hint:"text-only"}],initialValue:e.defaults.modality})),u=this.ensure(await so({message:"Log level",options:["debug","info","warn","error"].map(d=>({value:d,label:d})),initialValue:e.defaults.logLevel}));if(this.review(s,o,a,u),!this.ensure(await vu({message:"Write this configuration?"})))throw new ao;return this.config.write(Dk({existing:e,routes:s,keys:o,modality:a,logLevel:u})),qe.success(`wrote ${Be.resolve("config.json")}`),await vu({message:"Start Jarvis now?",initialValue:!1})===!0&&qe.info("starting is not wired yet in v0.1 - run `jarvis` to begin a session."),Ek(R.ok("done.")),0}async pickCapabilities(e){let n=this.ensure(await Tk({message:"Which capabilities do you want to set up?",options:[{value:"brain",label:"Brain (text)",hint:"required - the reasoning model"},{value:"voice",label:"Voice (speech in + out)",hint:"optional"},{value:"memory",label:"Memory (embeddings)",hint:"optional"}],initialValues:Nk(e),required:!1}));n.includes(pg)||qe.warn("Brain (text) is required; keeping it selected.");let i=new Set(n);return i.add(pg),Ak.filter(r=>i.has(r))}async configureCapability(e,n,i){let r=this.probe.providersFor(e);if(r.length===0)return qe.warn(`no providers available for ${e}; skipping.`),null;for(;;){let o=await this.pickProvider(e,r,n),s=await this.pickModel(e,o,n);if(i.has(o))return{capability:e,provider:o,model:s};let a=await this.resolveKey(e,o,s,n,i);if(a!=="change-provider")return a}}async resolveKey(e,n,i,r,o){let s=await this.firstKey(n,r);for(;;){let a=await this.validateKey(n,s);if(a==="valid")return o.set(n,s),{capability:e,provider:n,model:i};let u=await this.pickAfterFailure(e,a);if(u==="save")return o.set(n,s),{capability:e,provider:n,model:i};if(u==="skip")return qe.info(`skipped ${e} (optional).`),null;if(u==="change")return"change-provider";s=await this.promptPassword(n)}}async pickProvider(e,n,i){let r=i.routes?.[e]?.provider;return this.ensure(await so({message:`${e} provider`,options:n.map(o=>({value:o,label:o})),initialValue:r&&n.includes(r)?r:void 0}))}async pickModel(e,n,i){let r=i.routes?.[e],o=r?.provider===n?r.model:this.probe.defaultModel(n,e)??"";return this.ensure(await Ck({message:`${e} model`,initialValue:o,validate:s=>s?.trim()?void 0:"a model is required"}))}async firstKey(e,n){let i=n.secrets?.[e];return i&&this.ensure(await vu({message:`Reuse the saved key for ${e}?`,initialValue:!0}))?i.trim():this.promptPassword(e)}async promptPassword(e){return this.ensure(await Ok({message:`${e} API key`,validate:i=>i?.trim()?void 0:"a key is required"})).trim()}async validateKey(e,n){let i=Pk();i.start(`validating ${e} key...`);let r=await this.probe.probe(e,n),o=r.detail?` (${r.detail})`:"";return r.ok?i.stop(R.ok(`${e} key valid`)):r.status==="invalid"?i.stop(R.fail(`${e} key rejected${o}`)):r.status==="unverifiable"?i.stop(R.warn(`could not verify ${e} here${o}`)):i.stop(R.warn(`could not validate ${e}${o}`)),r.status}async pickAfterFailure(e,n){let i=Rk(e,n);return this.ensure(await so({message:`${e}: how do you want to proceed?`,options:i.map(r=>({value:r,label:Uk[r].label,hint:Uk[r].hint}))}))}review(e,n,i,r){let o=[];if(e.length===0)o.push("routes: none");else for(let s of e){let a=n.has(s.provider)?R.ok("key set"):R.warn("no key");o.push(`${s.capability}: ${s.provider}/${s.model} (${a})`)}o.push(`defaults: modality=${i}, logLevel=${r}`),hg(o.join(`
236
278
  `),"review (secrets redacted)")}printHeadlessGuidance(){this.io.err(["jarvis init needs an interactive terminal.","","On a headless or non-interactive host:"," - run `jarvis init` over an interactive SSH session, or"," - set secrets and defaults non-interactively, e.g.:"," jarvis config set secrets.anthropic <key>"," jarvis config set defaults.modality text"," - relocate the home with the JARVIS_HOME env var if needed.","","Note: configuring a provider route (provider + model together) is interactive","in v0.1 - use `jarvis init` for that. Verify any setup with: jarvis doctor"].join(`
237
279
  `)+`
238
- `)}ensure(e){if(lu(e))throw new oo;return e}};$i();import{randomUUID as fN}from"node:crypto";var ug=class{constructor(e,n,i=ue){this.session=e;this.reader=n;this.io=i}session;reader;io;prompt="you ";labelShown=!1;async run(){try{for await(let e of this.session.events())if(!await this.handle(e))break}finally{this.reader.close(),await this.session.close()}}async handle(e){switch(e.type){case"session.ready":return this.greet(),this.promptAndSend();case"turn.accepted":return this.labelShown=!1,!0;case"state":return e.state==="responding"&&this.showLabel(),!0;case"response.delta":return this.showLabel(),this.io.out(e.text),!0;case"response.done":return this.labelShown&&this.io.out(`
280
+ `)}ensure(e){if(hu(e))throw new ao;return e}};xi();import{randomUUID as LN}from"node:crypto";var mg=class{constructor(e,n,i=ue){this.session=e;this.reader=n;this.io=i}session;reader;io;prompt="you ";labelShown=!1;async run(){try{for await(let e of this.session.events())if(!await this.handle(e))break}finally{this.reader.close(),await this.session.close()}}async handle(e){switch(e.type){case"session.ready":return this.greet(),this.promptAndSend();case"turn.accepted":return this.labelShown=!1,!0;case"state":return e.state==="responding"&&this.showLabel(),!0;case"response.delta":return this.showLabel(),this.io.out(e.text),!0;case"response.done":return this.labelShown&&this.io.out(`
239
281
  `),this.promptAndSend();case"error":return this.labelShown&&this.io.out(`
240
- `),this.renderError(e),this.promptAndSend();default:return!0}}async promptAndSend(){for(;;){let e=await this.reader.next(this.prompt);if(e===null)return!1;let n=e.trim();if(n.length!==0)try{return await this.session.send({type:"input.text",sessionId:this.session.sessionId,commandId:fN(),atMs:Date.now(),text:n}),!0}catch(i){if(i instanceof Le){if(i.reason==="closed")return!1;this.renderSendError(i);continue}throw i}}}greet(){this.io.out(R.dim("jarvis is ready. type a message, or press ctrl-c to exit.")+`
282
+ `),this.renderError(e),this.promptAndSend();default:return!0}}async promptAndSend(){for(;;){let e=await this.reader.next(this.prompt);if(e===null)return!1;let n=e.trim();if(n.length!==0)try{return await this.session.send({type:"input.text",sessionId:this.session.sessionId,commandId:LN(),atMs:Date.now(),text:n}),!0}catch(i){if(i instanceof Le){if(i.reason==="closed")return!1;this.renderSendError(i);continue}throw i}}}greet(){this.io.out(R.dim("jarvis is ready. type a message, or press ctrl-c to exit.")+`
241
283
  `)}showLabel(){this.labelShown||(this.io.out(R.dim("jarvis")+" "),this.labelShown=!0)}renderError(e){if(e.reason==="no_text_route"){this.io.out(R.warn("no brain configured yet - run `jarvis init` to add one.")+`
242
284
  `);return}this.io.out(R.fail(`something went wrong - ${e.message}`)+`
243
285
  `)}renderSendError(e){this.io.out(R.warn(`could not send that (${e.reason}) - ${e.message}`)+`
244
- `)}};async function Tk(t){if(!t.stdin.isTTY)return t.io.err(R.dim("jarvis is interactive - run it in a terminal.")+`
286
+ `)}};async function jk(t){if(!t.stdin.isTTY)return t.io.err(R.dim("jarvis is interactive - run it in a terminal.")+`
245
287
  `),1;let e;try{e=await t.openSession()}catch{return t.io.err(R.fail("could not start jarvis - your config may be invalid. run `jarvis doctor`.")+`
246
- `),1}let n=t.createReader();return await new ug(e,n,t.io).run(),0}import{createInterface as pN}from"node:readline";var gu=class{rl;closed=!1;pending=null;constructor(e,n){this.rl=pN({input:e,output:n}),this.rl.on("line",i=>this.settle(i)),this.rl.on("close",()=>{this.closed=!0,this.settle(null)}),this.rl.on("SIGINT",()=>this.close())}next(e){return this.closed?Promise.resolve(null):new Promise(n=>{this.pending=n,this.rl.setPrompt(e),this.rl.prompt()})}close(){this.closed||(this.closed=!0,this.rl.close())}settle(e){let n=this.pending;this.pending=null,n?.(e)}};var Cn=class extends Error{constructor(e){super(e),this.name="AudioUnavailableError"}};function Ok(t){let e=t.routes?.stt,n=t.routes?.tts;return!e||!n?!1:!!t.secrets?.[e.provider]&&!!t.secrets?.[n.provider]}async function Pk(t){if(!t.stdin.isTTY)return t.io.err(R.dim("jarvis is interactive - run it in a terminal.")+`
288
+ `),1}let n=t.createReader();return await new mg(e,n,t.io).run(),0}import{createInterface as UN}from"node:readline";var _u=class{rl;closed=!1;pending=null;constructor(e,n){this.rl=UN({input:e,output:n}),this.rl.on("line",i=>this.settle(i)),this.rl.on("close",()=>{this.closed=!0,this.settle(null)}),this.rl.on("SIGINT",()=>this.close())}next(e){return this.closed?Promise.resolve(null):new Promise(n=>{this.pending=n,this.rl.setPrompt(e),this.rl.prompt()})}close(){this.closed||(this.closed=!0,this.rl.close())}settle(e){let n=this.pending;this.pending=null,n?.(e)}};var zn=class extends Error{constructor(e){super(e),this.name="AudioUnavailableError"}};function Mk(t){let e=t.routes?.stt,n=t.routes?.tts;return!e||!n?!1:!!t.secrets?.[e.provider]&&!!t.secrets?.[n.provider]}async function Fk(t){if(!t.stdin.isTTY)return t.io.err(R.dim("jarvis is interactive - run it in a terminal.")+`
247
289
  `),1;if(t.textOnly||!t.voiceConfigured)return t.runText();if(!await t.micAvailable())return t.io.err(R.warn("no microphone detected - check it is plugged in and mic access / privacy is enabled. starting in text mode.")+`
248
290
  `),t.runText();let e;try{e=await t.openVoiceSession()}catch{return t.io.err(R.fail("could not start jarvis - your config may be invalid. run `jarvis doctor`.")+`
249
- `),1}try{return await t.runVoice(e),0}catch(n){if(n instanceof Cn)return t.io.err(R.warn("could not start the microphone - check mic access / privacy. starting in text mode.")+`
250
- `),t.runText();throw n}}import{randomUUID as fg}from"node:crypto";function cg({onlyFirst:t=!1}={}){let r="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(r,t?void 0:"g")}var hN=cg();function lg(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return!t.includes("\x1B")&&!t.includes("\x9B")?t:t.replace(hN,"")}var Ck=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],Ak=12288,zk=65510,Nk=[12288,12288,65281,65376,65504,65510];var Rk=4352,Dk=262141,dg=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];var vu=(t,e)=>{let n=0,i=Math.floor(t.length/2)-1;for(;n<=i;){let r=Math.floor((n+i)/2),o=r*2;if(e<t[o])i=r-1;else if(e>t[o+1])n=r+1;else return!0}return!1};var Lk=19968,[vN,yN]=_N(dg);function _N(t){let e=t[0],n=t[1];for(let i=0;i<t.length;i+=2){let r=t[i],o=t[i+1];if(Lk>=r&&Lk<=o)return[r,o];o-r>n-e&&(e=r,n=o)}return[e,n]}var jk=t=>t<161||t>1114109?!1:vu(Ck,t),Uk=t=>t<Ak||t>zk?!1:vu(Nk,t);var Mk=t=>t>=vN&&t<=yN?!0:t<Rk||t>Dk?!1:vu(dg,t);function $N(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}function so(t,{ambiguousAsWide:e=!1}={}){return $N(t),Uk(t)||Mk(t)||e&&jk(t)?2:1}var bN=new Intl.Segmenter,Fk=/^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Format}|\p{Mark}|\p{Surrogate})+$/v,xN=/^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}\p{Surrogate}]+/v,wN=/^\p{RGI_Emoji}$/v,SN=/^[\d#*]\u20E3$/,kN=/\p{Extended_Pictographic}/gu;function IN(t){if(t.length>50)return!1;if(SN.test(t))return!0;if(t.includes("\u200D")){let e=t.match(kN);return e!==null&&e.length>=2}return!1}function EN(t){return t.replace(xN,"")}function TN(t){return Fk.test(t)}function Vk(t){return t>=4352&&t<=4447||t>=43360&&t<=43388}function Zk(t){return t>=4448&&t<=4519||t>=55216&&t<=55238}function Bk(t){return t>=4520&&t<=4607||t>=55243&&t<=55291}function ON(t){return Vk(t)||Zk(t)||Bk(t)}function PN(t,e){let n=[];for(let r of t)Fk.test(r)||n.push(r.codePointAt(0));if(n.length===0)return;let i=0;for(let r=0;r<n.length;r++){let o=n[r];if(!ON(o)){if(i===0)return;for(let s=r;s<n.length;s++)i+=so(n[s],e);return i}if(Vk(o)&&Zk(n[r+1])){i+=2,r+=Bk(n[r+2])?2:1;continue}i+=so(o,e)}return i}function CN(t,e){let n=0,i=!0;for(let r of t){if(i){i=!1;continue}r>="\uFF00"&&r<="\uFFEF"&&(n+=so(r.codePointAt(0),e))}return n}function yu(t,e={}){if(typeof t!="string"||t.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:i=!1}=e,r=t;if(!i&&(r.includes("\x1B")||r.includes("\x9B"))&&(r=lg(r)),r.length===0)return 0;if(/^[\u0020-\u007E]*$/.test(r))return r.length;let o=0,s={ambiguousAsWide:!n};for(let{segment:a}of bN.segment(r)){if(TN(a))continue;if(wN.test(a)||IN(a)){o+=2;continue}let u=EN(a),c=PN(u,s);if(c!==void 0){o+=c;continue}let l=u.codePointAt(0);o+=so(l,s),o+=CN(u,s)}return o}$i();De();function pg(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}var _u="\x1B[2K\r",AN=new Intl.Segmenter(void 0,{granularity:"grapheme"}),$u=class{session;capture;playback;io;terminalWidth;ptt;halfDuplex;signal;phase="listening";labelShown=!1;partialShown=!1;statusShown=!1;listenEpoch=0;turnStats={};talking;currentTurnId;cleanedUp=!1;onAbort=()=>{this.session.close()};constructor(e){this.session=e.session,this.capture=e.capture,this.playback=e.playback,this.io=e.io??ue,this.terminalWidth=e.terminalWidth??(()=>process.stdout.columns),this.ptt=e.pushToTalk,this.halfDuplex=e.options?.halfDuplex??!1,this.signal=e.signal,this.talking=this.ptt===void 0}async run(){if(this.signal){if(this.signal.aborted){await this.cleanup();return}this.signal.addEventListener("abort",this.onAbort,{once:!0})}try{await this.capture.start({onFrame:(e,n)=>this.handleFrame(e,n),onSpeechStart:()=>this.handleSpeechStart(),onError:e=>this.handleCaptureError(e)})}catch(e){throw await this.cleanup(),new Cn(e instanceof Error?e.message:String(e))}this.ptt?.listen({onStart:()=>{this.talking=!0},onEnd:()=>this.commitPushToTalkTurn()});try{for await(let e of this.session.events())this.handle(e)}finally{await this.cleanup()}}handleFrame(e,n){this.phase==="listening"&&this.talking&&this.sendFrame(e,n)}async sendFrame(e,n){try{await this.session.send({type:"input.audio.frame",sessionId:this.session.sessionId,commandId:fg(),atMs:n,audio:e})}catch(i){if(i instanceof Le&&i.reason==="closed"){this.capture.stop();return}q.debug("dropped an audio frame",{error:i})}}handleSpeechStart(){if(this.phase!=="responding"||this.halfDuplex||this.ptt)return;let e=this.currentTurnId;this.playback.flush(),this.closeOpenLine(),this.toListening(),this.cancelTurn(e,"barge_in")}async cancelTurn(e,n){try{await this.session.send({type:"turn.cancel",sessionId:this.session.sessionId,commandId:fg(),atMs:Date.now(),reason:n,...e!==void 0&&{turnId:e}})}catch{}}commitPushToTalkTurn(){this.talking=!1,this.endAudioInput()}async endAudioInput(){try{await this.session.send({type:"input.audio.end",sessionId:this.session.sessionId,commandId:fg(),atMs:Date.now()})}catch{}}handleCaptureError(e){this.cleanedUp||(this.closeOpenLine(),this.io.out(R.fail(`the microphone stopped - ${e.message}`)+`
291
+ `),1}try{return await t.runVoice(e),0}catch(n){if(n instanceof zn)return t.io.err(R.warn("could not start the microphone - check mic access / privacy. starting in text mode.")+`
292
+ `),t.runText();throw n}}import{randomUUID as _g}from"node:crypto";function gg({onlyFirst:t=!1}={}){let r="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(r,t?void 0:"g")}var jN=gg();function vg(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return!t.includes("\x1B")&&!t.includes("\x9B")?t:t.replace(jN,"")}var Vk=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],Zk=12288,Bk=65510,Gk=[12288,12288,65281,65376,65504,65510];var Wk=4352,qk=262141,yg=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];var bu=(t,e)=>{let n=0,i=Math.floor(t.length/2)-1;for(;n<=i;){let r=Math.floor((n+i)/2),o=r*2;if(e<t[o])i=r-1;else if(e>t[o+1])n=r+1;else return!0}return!1};var Hk=19968,[VN,ZN]=BN(yg);function BN(t){let e=t[0],n=t[1];for(let i=0;i<t.length;i+=2){let r=t[i],o=t[i+1];if(Hk>=r&&Hk<=o)return[r,o];o-r>n-e&&(e=r,n=o)}return[e,n]}var Jk=t=>t<161||t>1114109?!1:bu(Vk,t),Kk=t=>t<Zk||t>Bk?!1:bu(Gk,t);var Yk=t=>t>=VN&&t<=ZN?!0:t<Wk||t>qk?!1:bu(yg,t);function GN(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}function uo(t,{ambiguousAsWide:e=!1}={}){return GN(t),Kk(t)||Yk(t)||e&&Jk(t)?2:1}var WN=new Intl.Segmenter,Xk=/^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Format}|\p{Mark}|\p{Surrogate})+$/v,qN=/^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}\p{Surrogate}]+/v,HN=/^\p{RGI_Emoji}$/v,JN=/^[\d#*]\u20E3$/,KN=/\p{Extended_Pictographic}/gu;function YN(t){if(t.length>50)return!1;if(JN.test(t))return!0;if(t.includes("\u200D")){let e=t.match(KN);return e!==null&&e.length>=2}return!1}function XN(t){return t.replace(qN,"")}function QN(t){return Xk.test(t)}function Qk(t){return t>=4352&&t<=4447||t>=43360&&t<=43388}function eI(t){return t>=4448&&t<=4519||t>=55216&&t<=55238}function tI(t){return t>=4520&&t<=4607||t>=55243&&t<=55291}function eR(t){return Qk(t)||eI(t)||tI(t)}function tR(t,e){let n=[];for(let r of t)Xk.test(r)||n.push(r.codePointAt(0));if(n.length===0)return;let i=0;for(let r=0;r<n.length;r++){let o=n[r];if(!eR(o)){if(i===0)return;for(let s=r;s<n.length;s++)i+=uo(n[s],e);return i}if(Qk(o)&&eI(n[r+1])){i+=2,r+=tI(n[r+2])?2:1;continue}i+=uo(o,e)}return i}function rR(t,e){let n=0,i=!0;for(let r of t){if(i){i=!1;continue}r>="\uFF00"&&r<="\uFFEF"&&(n+=uo(r.codePointAt(0),e))}return n}function $u(t,e={}){if(typeof t!="string"||t.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:i=!1}=e,r=t;if(!i&&(r.includes("\x1B")||r.includes("\x9B"))&&(r=vg(r)),r.length===0)return 0;if(/^[\u0020-\u007E]*$/.test(r))return r.length;let o=0,s={ambiguousAsWide:!n};for(let{segment:a}of WN.segment(r)){if(QN(a))continue;if(HN.test(a)||YN(a)){o+=2;continue}let u=XN(a),c=tR(u,s);if(c!==void 0){o+=c;continue}let l=u.codePointAt(0);o+=uo(l,s),o+=rR(u,s)}return o}xi();De();function bg(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}var xu="\x1B[2K\r",nR=new Intl.Segmenter(void 0,{granularity:"grapheme"}),wu=class{session;capture;playback;io;terminalWidth;ptt;halfDuplex;signal;phase="listening";labelShown=!1;partialShown=!1;statusShown=!1;listenEpoch=0;turnStats={};talking;currentTurnId;cleanedUp=!1;onAbort=()=>{this.session.close()};constructor(e){this.session=e.session,this.capture=e.capture,this.playback=e.playback,this.io=e.io??ue,this.terminalWidth=e.terminalWidth??(()=>process.stdout.columns),this.ptt=e.pushToTalk,this.halfDuplex=e.options?.halfDuplex??!1,this.signal=e.signal,this.talking=this.ptt===void 0}async run(){if(this.signal){if(this.signal.aborted){await this.cleanup();return}this.signal.addEventListener("abort",this.onAbort,{once:!0})}try{await this.capture.start({onFrame:(e,n)=>this.handleFrame(e,n),onSpeechStart:()=>this.handleSpeechStart(),onError:e=>this.handleCaptureError(e)})}catch(e){throw await this.cleanup(),new zn(e instanceof Error?e.message:String(e))}this.ptt?.listen({onStart:()=>{this.talking=!0},onEnd:()=>this.commitPushToTalkTurn()});try{for await(let e of this.session.events())this.handle(e)}finally{await this.cleanup()}}handleFrame(e,n){this.phase==="listening"&&this.talking&&this.sendFrame(e,n)}async sendFrame(e,n){try{await this.session.send({type:"input.audio.frame",sessionId:this.session.sessionId,commandId:_g(),atMs:n,audio:e})}catch(i){if(i instanceof Le&&i.reason==="closed"){this.capture.stop();return}q.debug("dropped an audio frame",{error:i})}}handleSpeechStart(){if(this.phase!=="responding"||this.halfDuplex||this.ptt)return;let e=this.currentTurnId;this.playback.flush(),this.closeOpenLine(),this.toListening(),this.cancelTurn(e,"barge_in")}async cancelTurn(e,n){try{await this.session.send({type:"turn.cancel",sessionId:this.session.sessionId,commandId:_g(),atMs:Date.now(),reason:n,...e!==void 0&&{turnId:e}})}catch{}}commitPushToTalkTurn(){this.talking=!1,this.endAudioInput()}async endAudioInput(){try{await this.session.send({type:"input.audio.end",sessionId:this.session.sessionId,commandId:_g(),atMs:Date.now()})}catch{}}handleCaptureError(e){this.cleanedUp||(this.closeOpenLine(),this.io.out(R.fail(`the microphone stopped - ${e.message}`)+`
251
293
  `),this.session.close())}handle(e){switch(e.type){case"session.ready":this.greet();return;case"turn.accepted":this.currentTurnId=e.turnId,this.labelShown=!1,this.turnStats={};return;case"transcript.partial":if(e.turnId!==this.currentTurnId)return;this.renderPartial(e.text);return;case"turn.final":if(e.turn.turnId!==this.currentTurnId)return;this.renderFinalUser(e.turn),this.turnStats.finalAtMs=e.atMs,this.renderStatus("thinking");return;case"state":e.state==="responding"&&(this.phase="responding");return;case"response.delta":if(this.phase!=="responding")return;this.turnStats.firstTokenAtMs??=e.atMs,this.showLabel(),this.io.out(e.text);return;case"response.audio":if(this.phase!=="responding")return;this.turnStats.firstAudioAtMs===void 0&&(this.turnStats.firstAudioAtMs=e.atMs,this.turnStats.playbackStartAtMs=Date.now(),this.labelShown||this.renderStatus("speaking")),this.playback.play(e.audio);return;case"response.done":if(this.phase!=="responding")return;this.closeOpenLine(),this.turnStats.playbackStartAtMs!==void 0&&this.renderStatus("speaking"),this.awaitPlaybackDrain();return;case"error":{let n=this.currentTurnId;this.playback.flush(),this.closeOpenLine(),this.renderError(e),this.toListening(),this.cancelTurn(n,"user_cancel");return}default:return}}greet(){let e=this.ptt?"jarvis is ready (push-to-talk). press space to talk, again to send.":"jarvis is listening. just speak.",n=this.halfDuplex?" half-duplex: barge-in is off.":"";this.io.out(R.dim(`${e}${n} press ctrl-c to exit.`)+`
252
- `),this.renderStatus("listening")}renderPartial(e){this.io.out(`${_u}you ${R.dim(this.clampPartialToOneRow(e))}`),this.partialShown=!0,this.statusShown=!1}clampPartialToOneRow(e){let n=this.terminalWidth(),r=(n!==void 0&&n>0?n:80)-5;if(yu(e)<=r)return e;let o=r-3;if(o<=0)return"...";let s=[...AN.segment(e)],a=s.length,u=0;for(;a>0;){let c=u+yu(s[a-1].segment);if(c>o)break;u=c,a-=1}return a<s.length?"..."+e.slice(s[a].index):"..."}renderFinalUser(e){this.io.out(`${_u}you ${e.text}
253
- `),this.partialShown=!1,this.statusShown=!1}showLabel(){this.labelShown||(this.eraseStatusLine(),this.io.out(R.dim("jarvis")+" "),this.labelShown=!0)}renderStatus(e){this.partialShown||this.labelShown||(this.io.out(_u+R.dim(`${e}...`)),this.statusShown=!0)}eraseStatusLine(){this.statusShown&&(this.io.out(_u),this.statusShown=!1)}renderError(e){if(e.reason==="no_voice_route"){this.io.out(R.warn("no voice configured yet - run `jarvis init` to add speech routes.")+`
294
+ `),this.renderStatus("listening")}renderPartial(e){this.io.out(`${xu}you ${R.dim(this.clampPartialToOneRow(e))}`),this.partialShown=!0,this.statusShown=!1}clampPartialToOneRow(e){let n=this.terminalWidth(),r=(n!==void 0&&n>0?n:80)-5;if($u(e)<=r)return e;let o=r-3;if(o<=0)return"...";let s=[...nR.segment(e)],a=s.length,u=0;for(;a>0;){let c=u+$u(s[a-1].segment);if(c>o)break;u=c,a-=1}return a<s.length?"..."+e.slice(s[a].index):"..."}renderFinalUser(e){this.io.out(`${xu}you ${e.text}
295
+ `),this.partialShown=!1,this.statusShown=!1}showLabel(){this.labelShown||(this.eraseStatusLine(),this.io.out(R.dim("jarvis")+" "),this.labelShown=!0)}renderStatus(e){this.partialShown||this.labelShown||(this.io.out(xu+R.dim(`${e}...`)),this.statusShown=!0)}eraseStatusLine(){this.statusShown&&(this.io.out(xu),this.statusShown=!1)}renderError(e){if(e.reason==="no_voice_route"){this.io.out(R.warn("no voice configured yet - run `jarvis init` to add speech routes.")+`
254
296
  `);return}if(e.reason==="no_text_route"){this.io.out(R.warn("no brain configured yet - run `jarvis init` to add one.")+`
255
297
  `);return}this.io.out(R.fail(`something went wrong - ${e.message}`)+`
256
298
  `)}closeOpenLine(){if(this.labelShown||this.partialShown){this.io.out(`
257
- `),this.labelShown=!1,this.partialShown=!1;return}this.eraseStatusLine()}awaitPlaybackDrain(){let e=this.listenEpoch;this.playback.drained().then(()=>{this.cleanedUp||e!==this.listenEpoch||(this.printTurnSummary(),this.toListening())})}printTurnSummary(){if(q.getLevel()!=="debug")return;let{finalAtMs:e,firstTokenAtMs:n,firstAudioAtMs:i,playbackStartAtMs:r}=this.turnStats,o=[];e!==void 0&&n!==void 0&&o.push(`commit->token ${pg(n-e)}`),n!==void 0&&i!==void 0&&o.push(`token->audio ${pg(i-n)}`),r!==void 0&&o.push(`spoke ${pg(Date.now()-r)}`),o.length!==0&&(this.eraseStatusLine(),this.io.out(R.dim(`turn ${o.join(", ")}`)+`
258
- `))}toListening(){this.listenEpoch++,this.phase="listening",this.labelShown=!1,this.partialShown=!1,this.currentTurnId=void 0,this.renderStatus("listening")}async cleanup(){this.cleanedUp||(this.cleanedUp=!0,this.closeOpenLine(),this.signal?.removeEventListener("abort",this.onAbort),this.ptt?.close(),await this.capture.stop().catch(()=>{}),await this.playback.close().catch(()=>{}),await this.session.close().catch(()=>{}))}};import{emitKeypressEvents as zN}from"node:readline";var bu=class{constructor(e,n,i=NN){this.input=e;this.onQuit=n;this.prepare=i}input;onQuit;prepare;handlers=null;talking=!1;listening=!1;onKeypress=(e,n)=>{if(n.ctrl&&n.name==="c"){this.onQuit();return}n.name==="space"&&this.toggle()};listen(e){this.listening||(this.listening=!0,this.handlers=e,this.prepare(this.input),this.input.isTTY&&this.input.setRawMode&&this.input.setRawMode(!0),this.input.resume?.(),this.input.on("keypress",this.onKeypress))}close(){this.listening&&(this.listening=!1,this.input.removeListener("keypress",this.onKeypress),this.input.isTTY&&this.input.setRawMode&&this.input.setRawMode(!1),this.input.pause?.(),this.handlers=null)}toggle(){this.talking=!this.talking,this.talking?this.handlers?.onStart():this.handlers?.onEnd()}};function NN(t){zN(t)}var WN={start:"starting...",stop:"stopping...",restart:"restarting...",devices:"listing devices..."};function qN(){try{let t=BN(new URL("../package.json",import.meta.url),"utf8"),e=JSON.parse(t);return typeof e.version=="string"?e.version:"0.0.0"}catch{return"0.0.0"}}function HN(t,e){let n=new ru(t),i=n.notice();i!==null&&ue.err(`${i}
259
- `),n.isStale(Date.now())&&n.refreshInBackground();let r=!1,o=!1;try{let c=new Be().resolved();r=Ok(c),o=c.defaults.modality==="text"}catch{}let s=GN(),a=c=>(q.debug("opening interactive session",{project:e.project,capabilities:c}),xm().openSession({deviceId:s,projectId:e.project,clientCapabilities:c})),u=()=>Tk({stdin:process.stdin,io:ue,openSession:()=>a(["text"]),createReader:()=>new gu(process.stdin,process.stdout)});return Pk({stdin:process.stdin,io:ue,textOnly:e.textOnly||o,voiceConfigured:r,micAvailable:KN,openVoiceSession:()=>a(["text","audio-in","audio-out"]),runVoice:c=>JN(c,e),runText:u})}async function JN(t,e){let{DecibriCapture:n,DecibriPlayback:i}=await Promise.resolve().then(()=>(yg(),vg)),r=new AbortController,o=e.ptt?new bu(process.stdin,()=>r.abort()):void 0,s=()=>r.abort();process.once("SIGINT",s);try{await new $u({session:t,capture:new n,playback:new i,io:ue,...o&&{pushToTalk:o},options:{halfDuplex:e.halfDuplex},signal:r.signal}).run()}finally{process.removeListener("SIGINT",s)}}async function KN(){try{let{hasInputDevice:t}=await Promise.resolve().then(()=>(yg(),vg));return t()}catch(t){return q.debug("audio module unavailable; treating as no microphone",{error:t}),!1}}function YN(t){return{activate:e=>HN(t,e),status:()=>new kr(t).status(),upgrade:()=>new kr(t).upgrade(),init:()=>new mu({config:new Be,probe:new In}).run(),doctor:()=>new nu({config:new Be,probe:new In,version:t}).run(),configList:()=>new Er(new Be).list(),configGet:e=>new Er(new Be).get(e),configSet:(e,n)=>new Er(new Be).set(e,n),configUnset:e=>new Er(new Be).unset(e),stub:e=>(ue.err(`${WN[e]??`${e}: not implemented yet`}
260
- `),0)}}try{let t=qN();process.exitCode=await Mw(process.argv.slice(2),t,YN(t))}catch(t){q.error("jarvis failed",{error:t}),process.exitCode=1}
299
+ `),this.labelShown=!1,this.partialShown=!1;return}this.eraseStatusLine()}awaitPlaybackDrain(){let e=this.listenEpoch;this.playback.drained().then(()=>{this.cleanedUp||e!==this.listenEpoch||(this.printTurnSummary(),this.toListening())})}printTurnSummary(){if(q.getLevel()!=="debug")return;let{finalAtMs:e,firstTokenAtMs:n,firstAudioAtMs:i,playbackStartAtMs:r}=this.turnStats,o=[];e!==void 0&&n!==void 0&&o.push(`commit->token ${bg(n-e)}`),n!==void 0&&i!==void 0&&o.push(`token->audio ${bg(i-n)}`),r!==void 0&&o.push(`spoke ${bg(Date.now()-r)}`),o.length!==0&&(this.eraseStatusLine(),this.io.out(R.dim(`turn ${o.join(", ")}`)+`
300
+ `))}toListening(){this.listenEpoch++,this.phase="listening",this.labelShown=!1,this.partialShown=!1,this.currentTurnId=void 0,this.renderStatus("listening")}async cleanup(){this.cleanedUp||(this.cleanedUp=!0,this.closeOpenLine(),this.signal?.removeEventListener("abort",this.onAbort),this.ptt?.close(),await this.capture.stop().catch(()=>{}),await this.playback.close().catch(()=>{}),await this.session.close().catch(()=>{}))}};import{emitKeypressEvents as iR}from"node:readline";var Su=class{constructor(e,n,i=oR){this.input=e;this.onQuit=n;this.prepare=i}input;onQuit;prepare;handlers=null;talking=!1;listening=!1;onKeypress=(e,n)=>{if(n.ctrl&&n.name==="c"){this.onQuit();return}n.name==="space"&&this.toggle()};listen(e){this.listening||(this.listening=!0,this.handlers=e,this.prepare(this.input),this.input.isTTY&&this.input.setRawMode&&this.input.setRawMode(!0),this.input.resume?.(),this.input.on("keypress",this.onKeypress))}close(){this.listening&&(this.listening=!1,this.input.removeListener("keypress",this.onKeypress),this.input.isTTY&&this.input.setRawMode&&this.input.setRawMode(!1),this.input.pause?.(),this.handlers=null)}toggle(){this.talking=!this.talking,this.talking?this.handlers?.onStart():this.handlers?.onEnd()}};function oR(t){iR(t)}var vR={start:"starting...",stop:"stopping...",restart:"restarting...",devices:"listing devices..."};function yR(){try{let t=mR(new URL("../package.json",import.meta.url),"utf8"),e=JSON.parse(t);return typeof e.version=="string"?e.version:"0.0.0"}catch{return"0.0.0"}}function _R(t,e){let n=new ou(t),i=n.notice();i!==null&&ue.err(`${i}
301
+ `),n.isStale(Date.now())&&n.refreshInBackground();let r=!1,o=!1;try{let c=new Ge().resolved();r=Mk(c),o=c.defaults.modality==="text"}catch{}let s=gR(),a=c=>(q.debug("opening interactive session",{project:e.project,capabilities:c}),Im().openSession({deviceId:s,projectId:e.project,clientCapabilities:c})),u=()=>jk({stdin:process.stdin,io:ue,openSession:()=>a(["text"]),createReader:()=>new _u(process.stdin,process.stdout)});return Fk({stdin:process.stdin,io:ue,textOnly:e.textOnly||o,voiceConfigured:r,micAvailable:$R,openVoiceSession:()=>a(["text","audio-in","audio-out"]),runVoice:c=>bR(c,e),runText:u})}async function bR(t,e){let{DecibriCapture:n,DecibriPlayback:i}=await Promise.resolve().then(()=>(kg(),Sg)),r=new AbortController,o=e.ptt?new Su(process.stdin,()=>r.abort()):void 0,s=()=>r.abort();process.once("SIGINT",s);try{await new wu({session:t,capture:new n,playback:new i,io:ue,...o&&{pushToTalk:o},options:{halfDuplex:e.halfDuplex},signal:r.signal}).run()}finally{process.removeListener("SIGINT",s)}}async function $R(){try{let{hasInputDevice:t}=await Promise.resolve().then(()=>(kg(),Sg));return t()}catch(t){return q.debug("audio module unavailable; treating as no microphone",{error:t}),!1}}function xR(t){return{activate:e=>_R(t,e),status:()=>new Er(t).status(),upgrade:()=>new Er(t).upgrade(),init:()=>new yu({config:new Ge,probe:new Tn}).run(),doctor:()=>new su({config:new Ge,probe:new Tn,version:t}).run(),configList:()=>new Or(new Ge).list(),configGet:e=>new Or(new Ge).get(e),configSet:(e,n)=>new Or(new Ge).set(e,n),configUnset:e=>new Or(new Ge).unset(e),stub:e=>(ue.err(`${vR[e]??`${e}: not implemented yet`}
302
+ `),0)}}try{let t=yR();process.exitCode=await Yw(process.argv.slice(2),t,xR(t))}catch(t){q.error("jarvis failed",{error:t}),process.exitCode=1}