glassbox 0.12.0 → 0.13.2-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1,8 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __esm = (fn, res) => function __init() {
5
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
4
+ var __esm = (fn, res, err) => function __init() {
5
+ if (err) throw err[0];
6
+ try {
7
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
8
+ } catch (e) {
9
+ throw err = [e], e;
10
+ }
6
11
  };
7
12
  var __export = (target, all) => {
8
13
  for (var name in all)
@@ -21607,7 +21612,6 @@ function parseBraces(content, lang) {
21607
21612
  if (m && m[1] && !SKIP_NAMES.has(m[1])) {
21608
21613
  const sym = { name: m[1], kind: "function", line: lineNum, endLine: lineNum, children: [] };
21609
21614
  pushSymbol(root, stack, sym, currentDepth);
21610
- matched = true;
21611
21615
  break;
21612
21616
  }
21613
21617
  }
@@ -21772,7 +21776,7 @@ outlineRoutes.get("/symbol-definition", async (c) => {
21772
21776
  searchedPaths.add(file2.file_path);
21773
21777
  const diff = parseDiffData(file2.diff_data);
21774
21778
  const isDeleted = diff?.status === "deleted";
21775
- let content = "";
21779
+ let content;
21776
21780
  try {
21777
21781
  content = isDeleted ? getFileContent(file2.file_path, "HEAD", repoRoot) : getFileContent(file2.file_path, "working", repoRoot);
21778
21782
  } catch {
@@ -23817,7 +23821,7 @@ async function main() {
23817
23821
  console.log("AI service test mode enabled \u2014 using mock AI responses");
23818
23822
  }
23819
23823
  if (debug) {
23820
- console.log(`[debug] Build timestamp: ${"2026-06-04T01:59:56.204Z"}`);
23824
+ console.log(`[debug] Build timestamp: ${"2026-06-17T06:23:33.257Z"}`);
23821
23825
  }
23822
23826
  if (projectDir !== null) {
23823
23827
  process.chdir(projectDir);
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var Dw=Object.create;var ia=Object.defineProperty;var ww=Object.getOwnPropertyDescriptor;var Lw=Object.getOwnPropertyNames;var Mw=Object.getPrototypeOf,kw=Object.prototype.hasOwnProperty;var Pw=(e,t,r)=>t in e?ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var I=(e,t)=>()=>(e&&(t=e(e=0)),t);var S=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ye=(e,t)=>{for(var r in t)ia(e,r,{get:t[r],enumerable:!0})},Uw=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Lw(t))!kw.call(e,n)&&n!==r&&ia(e,n,{get:()=>t[n],enumerable:!(i=ww(t,n))||i.enumerable});return e};var Fw=(e,t,r)=>(r=e!=null?Dw(Mw(e)):{},Uw(t||!e||!e.__esModule?ia(r,"default",{value:e,enumerable:!0}):r,e));var Bt=(e,t,r)=>Pw(e,typeof t!="symbol"?t+"":t,r);function T(e,t,r){function i(s,l){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:l,constr:o,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,l);let c=o.prototype,d=Object.keys(c);for(let m=0;m<d.length;m++){let p=d[m];p in s||(s[p]=c[p].bind(s))}}let n=r?.Parent??Object;class a extends n{}Object.defineProperty(a,"name",{value:e});function o(s){var l;let c=r?.Parent?new a:this;i(c,s),(l=c._zod).deferred??(l.deferred=[]);for(let d of c._zod.deferred)d();return c}return Object.defineProperty(o,"init",{value:i}),Object.defineProperty(o,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}function Ae(e){return e&&Object.assign(on,e),on}var Zg,al,ol,pt,Gt,on,sn=I(()=>{"use strict";al=Object.freeze({status:"aborted"});ol=Symbol("zod_brand"),pt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Gt=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Zg=globalThis).__zod_globalConfig??(Zg.__zod_globalConfig={});on=globalThis.__zod_globalConfig});var k={};ye(k,{BIGINT_FORMAT_RANGES:()=>fl,Class:()=>ll,NUMBER_FORMAT_RANGES:()=>gl,aborted:()=>qt,allowsEval:()=>ul,assert:()=>Yw,assertEqual:()=>$w,assertIs:()=>Gw,assertNever:()=>zw,assertNotEqual:()=>Bw,assignProp:()=>Yt,base64ToUint8Array:()=>Xg,base64urlToUint8Array:()=>oL,cached:()=>Dn,captureStackTrace:()=>oa,cleanEnum:()=>aL,cleanRegex:()=>Mr,clone:()=>Ve,cloneDef:()=>qw,createTransparentProxy:()=>jw,defineLazy:()=>re,esc:()=>aa,escapeRegex:()=>ut,explicitlyAborted:()=>El,extend:()=>eL,finalizeIssue:()=>We,floatSafeRemainder:()=>cl,getElementAtPath:()=>Vw,getEnumValues:()=>Lr,getLengthableOrigin:()=>Ur,getParsedType:()=>Zw,getSizableOrigin:()=>Pr,hexToUint8Array:()=>lL,isObject:()=>ln,isPlainObject:()=>Ht,issue:()=>wn,joinValues:()=>y,jsonStringifyReplacer:()=>xn,merge:()=>nL,mergeDefs:()=>Dt,normalizeParams:()=>P,nullish:()=>zt,numKeys:()=>Qw,objectClone:()=>Hw,omit:()=>Jw,optionalKeys:()=>pl,parsedType:()=>M,partial:()=>rL,pick:()=>Xw,prefixIssues:()=>Je,primitiveTypes:()=>ml,promiseAllObject:()=>Ww,propertyKeyTypes:()=>kr,randomString:()=>Kw,required:()=>iL,safeExtend:()=>tL,shallowClone:()=>_l,slugify:()=>dl,stringifyPrimitive:()=>w,uint8ArrayToBase64:()=>Jg,uint8ArrayToBase64url:()=>sL,uint8ArrayToHex:()=>cL,unwrapMessage:()=>wr});function $w(e){return e}function Bw(e){return e}function Gw(e){}function zw(e){throw new Error("Unexpected value in exhaustive check")}function Yw(e){}function Lr(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function y(e,t="|"){return e.map(r=>w(r)).join(t)}function xn(e,t){return typeof t=="bigint"?t.toString():t}function Dn(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function zt(e){return e==null}function Mr(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function cl(e,t){let r=e/t,i=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-i)<n?0:r-i}function re(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==jg)return i===void 0&&(i=jg,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Hw(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Yt(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Dt(...e){let t={};for(let r of e){let i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function qw(e){return Dt(e._zod.def)}function Vw(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}function Ww(e){let t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{let n={};for(let a=0;a<t.length;a++)n[t[a]]=i[a];return n})}function Kw(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function aa(e){return JSON.stringify(e)}function dl(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function ln(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ht(e){if(ln(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(ln(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function _l(e){return Ht(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Qw(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}function ut(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ve(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function P(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function jw(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,a){return t??(t=e()),Reflect.set(t,i,n,a)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function w(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function pl(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function Xw(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let a=Dt(e._zod.def,{get shape(){let o={};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(o[s]=r.shape[s])}return Yt(this,"shape",o),o},checks:[]});return Ve(e,a)}function Jw(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let a=Dt(e._zod.def,{get shape(){let o={...e._zod.def.shape};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete o[s]}return Yt(this,"shape",o),o},checks:[]});return Ve(e,a)}function eL(e,t){if(!Ht(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let a=e._zod.def.shape;for(let o in t)if(Object.getOwnPropertyDescriptor(a,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=Dt(e._zod.def,{get shape(){let a={...e._zod.def.shape,...t};return Yt(this,"shape",a),a}});return Ve(e,n)}function tL(e,t){if(!Ht(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Dt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Yt(this,"shape",i),i}});return Ve(e,r)}function nL(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=Dt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return Yt(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Ve(e,r)}function rL(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let o=Dt(t._zod.def,{get shape(){let s=t._zod.def.shape,l={...s};if(r)for(let c in r){if(!(c in s))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(l[c]=e?new e({type:"optional",innerType:s[c]}):s[c])}else for(let c in s)l[c]=e?new e({type:"optional",innerType:s[c]}):s[c];return Yt(this,"shape",l),l},checks:[]});return Ve(t,o)}function iL(e,t,r){let i=Dt(t._zod.def,{get shape(){let n=t._zod.def.shape,a={...n};if(r)for(let o in r){if(!(o in a))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(a[o]=new e({type:"nonoptional",innerType:n[o]}))}else for(let o in n)a[o]=new e({type:"nonoptional",innerType:n[o]});return Yt(this,"shape",a),a}});return Ve(t,i)}function qt(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function El(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function Je(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function wr(e){return typeof e=="string"?e:e?.message}function We(e,t,r){let i=e.message?e.message:wr(e.inst?._zod.def?.error?.(e))??wr(t?.error?.(e))??wr(r.customError?.(e))??wr(r.localeError?.(e))??"Invalid input",{inst:n,continue:a,input:o,...s}=e;return s.path??(s.path=[]),s.message=i,t?.reportInput&&(s.input=o),s}function Pr(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ur(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function M(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function wn(...e){let[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function aL(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Xg(e){let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function Jg(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function oL(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Xg(t+r)}function sL(e){return Jg(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function lL(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}function cL(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var jg,oa,ul,Zw,kr,ml,gl,fl,ll,q=I(()=>{"use strict";sn();jg=Symbol("evaluating");oa="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};ul=Dn(()=>{if(on.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});Zw=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},kr=new Set(["string","number","symbol"]),ml=new Set(["string","number","bigint","boolean","symbol","undefined"]);gl={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]},fl={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};ll=class{constructor(...t){}}});function $r(e,t=r=>r.message){let r={},i=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}function Br(e,t=r=>r.message){let r={_errors:[]},i=(n,a=[])=>{for(let o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>i({issues:s},[...a,...o.path]));else if(o.code==="invalid_key")i({issues:o.issues},[...a,...o.path]);else if(o.code==="invalid_element")i({issues:o.issues},[...a,...o.path]);else{let s=[...a,...o.path];if(s.length===0)r._errors.push(t(o));else{let l=r,c=0;for(;c<s.length;){let d=s[c];c===s.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(o))):l[d]=l[d]||{_errors:[]},l=l[d],c++}}}};return i(e),r}function Sl(e,t=r=>r.message){let r={errors:[]},i=(n,a=[])=>{var o,s;for(let l of n.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>i({issues:c},[...a,...l.path]));else if(l.code==="invalid_key")i({issues:l.issues},[...a,...l.path]);else if(l.code==="invalid_element")i({issues:l.issues},[...a,...l.path]);else{let c=[...a,...l.path];if(c.length===0){r.errors.push(t(l));continue}let d=r,m=0;for(;m<c.length;){let p=c[m],g=m===c.length-1;typeof p=="string"?(d.properties??(d.properties={}),(o=d.properties)[p]??(o[p]={errors:[]}),d=d.properties[p]):(d.items??(d.items=[]),(s=d.items)[p]??(s[p]={errors:[]}),d=d.items[p]),g&&d.errors.push(t(l)),m++}}};return i(e),r}function tf(e){let t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(let i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function bl(e){let t=[],r=[...e.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(let i of r)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${tf(i.path)}`);return t.join(`
1
+ "use strict";(()=>{var Dw=Object.create;var ia=Object.defineProperty;var ww=Object.getOwnPropertyDescriptor;var Lw=Object.getOwnPropertyNames;var Mw=Object.getPrototypeOf,kw=Object.prototype.hasOwnProperty;var Pw=(e,t,r)=>t in e?ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var I=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(i){throw r=[i],i}};var S=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},ye=(e,t)=>{for(var r in t)ia(e,r,{get:t[r],enumerable:!0})},Uw=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Lw(t))!kw.call(e,n)&&n!==r&&ia(e,n,{get:()=>t[n],enumerable:!(i=ww(t,n))||i.enumerable});return e};var Fw=(e,t,r)=>(r=e!=null?Dw(Mw(e)):{},Uw(t||!e||!e.__esModule?ia(r,"default",{value:e,enumerable:!0}):r,e));var Bt=(e,t,r)=>Pw(e,typeof t!="symbol"?t+"":t,r);function T(e,t,r){function i(s,l){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:l,constr:o,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,l);let c=o.prototype,d=Object.keys(c);for(let m=0;m<d.length;m++){let p=d[m];p in s||(s[p]=c[p].bind(s))}}let n=r?.Parent??Object;class a extends n{}Object.defineProperty(a,"name",{value:e});function o(s){var l;let c=r?.Parent?new a:this;i(c,s),(l=c._zod).deferred??(l.deferred=[]);for(let d of c._zod.deferred)d();return c}return Object.defineProperty(o,"init",{value:i}),Object.defineProperty(o,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}function Ae(e){return e&&Object.assign(on,e),on}var Zg,al,ol,pt,Gt,on,sn=I(()=>{"use strict";al=Object.freeze({status:"aborted"});ol=Symbol("zod_brand"),pt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Gt=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Zg=globalThis).__zod_globalConfig??(Zg.__zod_globalConfig={});on=globalThis.__zod_globalConfig});var k={};ye(k,{BIGINT_FORMAT_RANGES:()=>fl,Class:()=>ll,NUMBER_FORMAT_RANGES:()=>gl,aborted:()=>qt,allowsEval:()=>ul,assert:()=>Yw,assertEqual:()=>$w,assertIs:()=>Gw,assertNever:()=>zw,assertNotEqual:()=>Bw,assignProp:()=>Yt,base64ToUint8Array:()=>Xg,base64urlToUint8Array:()=>oL,cached:()=>Dn,captureStackTrace:()=>oa,cleanEnum:()=>aL,cleanRegex:()=>Mr,clone:()=>Ve,cloneDef:()=>qw,createTransparentProxy:()=>jw,defineLazy:()=>re,esc:()=>aa,escapeRegex:()=>ut,explicitlyAborted:()=>El,extend:()=>eL,finalizeIssue:()=>We,floatSafeRemainder:()=>cl,getElementAtPath:()=>Vw,getEnumValues:()=>Lr,getLengthableOrigin:()=>Ur,getParsedType:()=>Zw,getSizableOrigin:()=>Pr,hexToUint8Array:()=>lL,isObject:()=>ln,isPlainObject:()=>Ht,issue:()=>wn,joinValues:()=>y,jsonStringifyReplacer:()=>xn,merge:()=>nL,mergeDefs:()=>Dt,normalizeParams:()=>P,nullish:()=>zt,numKeys:()=>Qw,objectClone:()=>Hw,omit:()=>Jw,optionalKeys:()=>pl,parsedType:()=>M,partial:()=>rL,pick:()=>Xw,prefixIssues:()=>Je,primitiveTypes:()=>ml,promiseAllObject:()=>Ww,propertyKeyTypes:()=>kr,randomString:()=>Kw,required:()=>iL,safeExtend:()=>tL,shallowClone:()=>_l,slugify:()=>dl,stringifyPrimitive:()=>w,uint8ArrayToBase64:()=>Jg,uint8ArrayToBase64url:()=>sL,uint8ArrayToHex:()=>cL,unwrapMessage:()=>wr});function $w(e){return e}function Bw(e){return e}function Gw(e){}function zw(e){throw new Error("Unexpected value in exhaustive check")}function Yw(e){}function Lr(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function y(e,t="|"){return e.map(r=>w(r)).join(t)}function xn(e,t){return typeof t=="bigint"?t.toString():t}function Dn(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function zt(e){return e==null}function Mr(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function cl(e,t){let r=e/t,i=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-i)<n?0:r-i}function re(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==jg)return i===void 0&&(i=jg,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Hw(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Yt(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Dt(...e){let t={};for(let r of e){let i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function qw(e){return Dt(e._zod.def)}function Vw(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}function Ww(e){let t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{let n={};for(let a=0;a<t.length;a++)n[t[a]]=i[a];return n})}function Kw(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function aa(e){return JSON.stringify(e)}function dl(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function ln(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ht(e){if(ln(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(ln(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function _l(e){return Ht(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Qw(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}function ut(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ve(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function P(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function jw(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,a){return t??(t=e()),Reflect.set(t,i,n,a)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function w(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function pl(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function Xw(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let a=Dt(e._zod.def,{get shape(){let o={};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(o[s]=r.shape[s])}return Yt(this,"shape",o),o},checks:[]});return Ve(e,a)}function Jw(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let a=Dt(e._zod.def,{get shape(){let o={...e._zod.def.shape};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete o[s]}return Yt(this,"shape",o),o},checks:[]});return Ve(e,a)}function eL(e,t){if(!Ht(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let a=e._zod.def.shape;for(let o in t)if(Object.getOwnPropertyDescriptor(a,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=Dt(e._zod.def,{get shape(){let a={...e._zod.def.shape,...t};return Yt(this,"shape",a),a}});return Ve(e,n)}function tL(e,t){if(!Ht(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Dt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Yt(this,"shape",i),i}});return Ve(e,r)}function nL(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=Dt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return Yt(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Ve(e,r)}function rL(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let o=Dt(t._zod.def,{get shape(){let s=t._zod.def.shape,l={...s};if(r)for(let c in r){if(!(c in s))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(l[c]=e?new e({type:"optional",innerType:s[c]}):s[c])}else for(let c in s)l[c]=e?new e({type:"optional",innerType:s[c]}):s[c];return Yt(this,"shape",l),l},checks:[]});return Ve(t,o)}function iL(e,t,r){let i=Dt(t._zod.def,{get shape(){let n=t._zod.def.shape,a={...n};if(r)for(let o in r){if(!(o in a))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(a[o]=new e({type:"nonoptional",innerType:n[o]}))}else for(let o in n)a[o]=new e({type:"nonoptional",innerType:n[o]});return Yt(this,"shape",a),a}});return Ve(t,i)}function qt(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function El(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function Je(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function wr(e){return typeof e=="string"?e:e?.message}function We(e,t,r){let i=e.message?e.message:wr(e.inst?._zod.def?.error?.(e))??wr(t?.error?.(e))??wr(r.customError?.(e))??wr(r.localeError?.(e))??"Invalid input",{inst:n,continue:a,input:o,...s}=e;return s.path??(s.path=[]),s.message=i,t?.reportInput&&(s.input=o),s}function Pr(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ur(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function M(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function wn(...e){let[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function aL(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Xg(e){let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function Jg(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function oL(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Xg(t+r)}function sL(e){return Jg(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function lL(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}function cL(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var jg,oa,ul,Zw,kr,ml,gl,fl,ll,q=I(()=>{"use strict";sn();jg=Symbol("evaluating");oa="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};ul=Dn(()=>{if(on.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});Zw=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},kr=new Set(["string","number","symbol"]),ml=new Set(["string","number","bigint","boolean","symbol","undefined"]);gl={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]},fl={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};ll=class{constructor(...t){}}});function $r(e,t=r=>r.message){let r={},i=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}function Br(e,t=r=>r.message){let r={_errors:[]},i=(n,a=[])=>{for(let o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>i({issues:s},[...a,...o.path]));else if(o.code==="invalid_key")i({issues:o.issues},[...a,...o.path]);else if(o.code==="invalid_element")i({issues:o.issues},[...a,...o.path]);else{let s=[...a,...o.path];if(s.length===0)r._errors.push(t(o));else{let l=r,c=0;for(;c<s.length;){let d=s[c];c===s.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(o))):l[d]=l[d]||{_errors:[]},l=l[d],c++}}}};return i(e),r}function Sl(e,t=r=>r.message){let r={errors:[]},i=(n,a=[])=>{var o,s;for(let l of n.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>i({issues:c},[...a,...l.path]));else if(l.code==="invalid_key")i({issues:l.issues},[...a,...l.path]);else if(l.code==="invalid_element")i({issues:l.issues},[...a,...l.path]);else{let c=[...a,...l.path];if(c.length===0){r.errors.push(t(l));continue}let d=r,m=0;for(;m<c.length;){let p=c[m],g=m===c.length-1;typeof p=="string"?(d.properties??(d.properties={}),(o=d.properties)[p]??(o[p]={errors:[]}),d=d.properties[p]):(d.items??(d.items=[]),(s=d.items)[p]??(s[p]={errors:[]}),d=d.items[p]),g&&d.errors.push(t(l)),m++}}};return i(e),r}function tf(e){let t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(let i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function bl(e){let t=[],r=[...e.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(let i of r)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${tf(i.path)}`);return t.join(`
2
2
  `)}var ef,Fr,et,Tl=I(()=>{"use strict";sn();q();ef=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,xn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Fr=T("$ZodError",ef),et=T("$ZodError",ef,{Parent:Error})});var Ln,sa,Mn,la,kn,vl,Pn,hl,ca,uL,da,_L,ua,mL,_a,pL,ma,gL,pa,fL,ga,EL,fa,SL,yl=I(()=>{"use strict";sn();Tl();q();Ln=e=>(t,r,i,n)=>{let a=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},a);if(o instanceof Promise)throw new pt;if(o.issues.length){let s=new(n?.Err??e)(o.issues.map(l=>We(l,a,Ae())));throw oa(s,n?.callee),s}return o.value},sa=Ln(et),Mn=e=>async(t,r,i,n)=>{let a=i?{...i,async:!0}:{async:!0},o=t._zod.run({value:r,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let s=new(n?.Err??e)(o.issues.map(l=>We(l,a,Ae())));throw oa(s,n?.callee),s}return o.value},la=Mn(et),kn=e=>(t,r,i)=>{let n=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise)throw new pt;return a.issues.length?{success:!1,error:new(e??Fr)(a.issues.map(o=>We(o,n,Ae())))}:{success:!0,data:a.value}},vl=kn(et),Pn=e=>async(t,r,i)=>{let n=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:r,issues:[]},n);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(o=>We(o,n,Ae())))}:{success:!0,data:a.value}},hl=Pn(et),ca=e=>(t,r,i)=>{let n=i?{...i,direction:"backward"}:{direction:"backward"};return Ln(e)(t,r,n)},uL=ca(et),da=e=>(t,r,i)=>Ln(e)(t,r,i),_L=da(et),ua=e=>async(t,r,i)=>{let n=i?{...i,direction:"backward"}:{direction:"backward"};return Mn(e)(t,r,n)},mL=ua(et),_a=e=>async(t,r,i)=>Mn(e)(t,r,i),pL=_a(et),ma=e=>(t,r,i)=>{let n=i?{...i,direction:"backward"}:{direction:"backward"};return kn(e)(t,r,n)},gL=ma(et),pa=e=>(t,r,i)=>kn(e)(t,r,i),fL=pa(et),ga=e=>async(t,r,i)=>{let n=i?{...i,direction:"backward"}:{direction:"backward"};return Pn(e)(t,r,n)},EL=ga(et),fa=e=>async(t,r,i)=>Pn(e)(t,r,i),SL=fa(et)});var at={};ye(at,{base64:()=>$l,base64url:()=>Ea,bigint:()=>Vl,boolean:()=>Kl,browserEmail:()=>CL,cidrv4:()=>Ul,cidrv6:()=>Fl,cuid:()=>Rl,cuid2:()=>Nl,date:()=>zl,datetime:()=>Hl,domain:()=>AL,duration:()=>xl,e164:()=>Gl,email:()=>wl,emoji:()=>Ll,extendedDuration:()=>bL,guid:()=>Dl,hex:()=>xL,hostname:()=>OL,html5Email:()=>yL,httpProtocol:()=>Bl,idnEmail:()=>NL,integer:()=>Wl,ipv4:()=>Ml,ipv6:()=>kl,ksuid:()=>Ol,lowercase:()=>jl,mac:()=>Pl,md5_base64:()=>wL,md5_base64url:()=>LL,md5_hex:()=>DL,nanoid:()=>Al,null:()=>Ql,number:()=>Sa,rfc5322Email:()=>RL,sha1_base64:()=>kL,sha1_base64url:()=>PL,sha1_hex:()=>ML,sha256_base64:()=>FL,sha256_base64url:()=>$L,sha256_hex:()=>UL,sha384_base64:()=>GL,sha384_base64url:()=>zL,sha384_hex:()=>BL,sha512_base64:()=>HL,sha512_base64url:()=>qL,sha512_hex:()=>YL,string:()=>ql,time:()=>Yl,ulid:()=>Cl,undefined:()=>Zl,unicodeEmail:()=>nf,uppercase:()=>Xl,uuid:()=>cn,uuid4:()=>TL,uuid6:()=>vL,uuid7:()=>hL,xid:()=>Il});function Ll(){return new RegExp(IL,"u")}function af(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Yl(e){return new RegExp(`^${af(e)}$`)}function Hl(e){let t=af({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${r.join("|")})`;return new RegExp(`^${rf}T(?:${i})$`)}function Gr(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function zr(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Rl,Nl,Cl,Il,Ol,Al,xl,bL,Dl,cn,TL,vL,hL,wl,yL,RL,nf,NL,CL,IL,Ml,kl,Pl,Ul,Fl,$l,Ea,OL,AL,Bl,Gl,rf,zl,ql,Vl,Wl,Sa,Kl,Ql,Zl,jl,Xl,xL,DL,wL,LL,ML,kL,PL,UL,FL,$L,BL,GL,zL,YL,HL,qL,ba=I(()=>{"use strict";q();Rl=/^[cC][0-9a-z]{6,}$/,Nl=/^[0-9a-z]+$/,Cl=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Il=/^[0-9a-vA-V]{20}$/,Ol=/^[A-Za-z0-9]{27}$/,Al=/^[a-zA-Z0-9_-]{21}$/,xl=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,bL=/^[-+]?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)?)??$/,Dl=/^([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})$/,cn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,TL=cn(4),vL=cn(6),hL=cn(7),wl=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,yL=/^[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])?)*$/,RL=/^(([^<>()\[\]\\.,;:\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,}))$/,nf=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,NL=nf,CL=/^[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])?)*$/,IL="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";Ml=/^(?:(?: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])$/,kl=/^(([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}|:))$/,Pl=e=>{let t=ut(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Ul=/^((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])$/,Fl=/^(([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])$/,$l=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ea=/^[A-Za-z0-9_-]*$/,OL=/^(?=.{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])?)*\.?$/,AL=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Bl=/^https?$/,Gl=/^\+[1-9]\d{6,14}$/,rf="(?:(?:\\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])))",zl=new RegExp(`^${rf}$`);ql=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Vl=/^-?\d+n?$/,Wl=/^-?\d+$/,Sa=/^-?\d+(?:\.\d+)?$/,Kl=/^(?:true|false)$/i,Ql=/^null$/i,Zl=/^undefined$/i,jl=/^[^A-Z]*$/,Xl=/^[^a-z]*$/,xL=/^[0-9a-fA-F]*$/;DL=/^[0-9a-fA-F]{32}$/,wL=Gr(22,"=="),LL=zr(22),ML=/^[0-9a-fA-F]{40}$/,kL=Gr(27,"="),PL=zr(27),UL=/^[0-9a-fA-F]{64}$/,FL=Gr(43,"="),$L=zr(43),BL=/^[0-9a-fA-F]{96}$/,GL=Gr(64,""),zL=zr(64),YL=/^[0-9a-fA-F]{128}$/,HL=Gr(86,"=="),qL=zr(86)});function of(e,t,r){e.issues.length&&t.issues.push(...Je(r,e.issues))}var ve,sf,Ta,va,Jl,ec,tc,nc,rc,ic,ac,oc,sc,Un,lc,cc,dc,uc,_c,mc,pc,gc,fc,ha=I(()=>{"use strict";sn();ba();q();ve=T("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),sf={number:"number",bigint:"bigint",object:"date"},Ta=T("$ZodCheckLessThan",(e,t)=>{ve.init(e,t);let r=sf[typeof t.value];e._zod.onattach.push(i=>{let n=i._zod.bag,a=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<a&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),va=T("$ZodCheckGreaterThan",(e,t)=>{ve.init(e,t);let r=sf[typeof t.value];e._zod.onattach.push(i=>{let n=i._zod.bag,a=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Jl=T("$ZodCheckMultipleOf",(e,t)=>{ve.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):cl(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),ec=T("$ZodCheckNumberFormat",(e,t)=>{ve.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[n,a]=gl[t.format];e._zod.onattach.push(o=>{let s=o._zod.bag;s.format=t.format,s.minimum=n,s.maximum=a,r&&(s.pattern=Wl)}),e._zod.check=o=>{let s=o.value;if(r){if(!Number.isInteger(s)){o.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}s<n&&o.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:"number",input:s,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),tc=T("$ZodCheckBigIntFormat",(e,t)=>{ve.init(e,t);let[r,i]=fl[t.format];e._zod.onattach.push(n=>{let a=n._zod.bag;a.format=t.format,a.minimum=r,a.maximum=i}),e._zod.check=n=>{let a=n.value;a<r&&n.issues.push({origin:"bigint",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>i&&n.issues.push({origin:"bigint",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),nc=T("$ZodCheckMaxSize",(e,t)=>{var r;ve.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!zt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let n=i.value;n.size<=t.maximum||i.issues.push({origin:Pr(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),rc=T("$ZodCheckMinSize",(e,t)=>{var r;ve.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!zt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let n=i.value;n.size>=t.minimum||i.issues.push({origin:Pr(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),ic=T("$ZodCheckSizeEquals",(e,t)=>{var r;ve.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!zt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=i=>{let n=i.value,a=n.size;if(a===t.size)return;let o=a>t.size;i.issues.push({origin:Pr(n),...o?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),ac=T("$ZodCheckMaxLength",(e,t)=>{var r;ve.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!zt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let n=i.value;if(n.length<=t.maximum)return;let o=Ur(n);i.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),oc=T("$ZodCheckMinLength",(e,t)=>{var r;ve.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!zt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let n=i.value;if(n.length>=t.minimum)return;let o=Ur(n);i.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),sc=T("$ZodCheckLengthEquals",(e,t)=>{var r;ve.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!zt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=i=>{let n=i.value,a=n.length;if(a===t.length)return;let o=Ur(n),s=a>t.length;i.issues.push({origin:o,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Un=T("$ZodCheckStringFormat",(e,t)=>{var r,i;ve.init(e,t),e._zod.onattach.push(n=>{let a=n._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),lc=T("$ZodCheckRegex",(e,t)=>{Un.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),cc=T("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=jl),Un.init(e,t)}),dc=T("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Xl),Un.init(e,t)}),uc=T("$ZodCheckIncludes",(e,t)=>{ve.init(e,t);let r=ut(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(n=>{let a=n._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),_c=T("$ZodCheckStartsWith",(e,t)=>{ve.init(e,t);let r=new RegExp(`^${ut(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),mc=T("$ZodCheckEndsWith",(e,t)=>{ve.init(e,t);let r=new RegExp(`.*${ut(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});pc=T("$ZodCheckProperty",(e,t)=>{ve.init(e,t),e._zod.check=r=>{let i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>of(n,r,t.property));of(i,r,t.property)}}),gc=T("$ZodCheckMimeType",(e,t)=>{ve.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),fc=T("$ZodCheckOverwrite",(e,t)=>{ve.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}})});var Yr,Ec=I(()=>{"use strict";Yr=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let i=t.split(`
3
3
  `).filter(o=>o),n=Math.min(...i.map(o=>o.length-o.trimStart().length)),a=i.map(o=>o.slice(n)).map(o=>" ".repeat(this.indent*2)+o);for(let o of a)this.content.push(o)}compile(){let t=Function,r=this?.args,n=[...(this?.content??[""]).map(a=>` ${a}`)];return new t(...r,n.join(`
4
4
  `))}}});var Sc,bc=I(()=>{"use strict";Sc={major:4,minor:4,patch:3}});function Gc(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function yf(e){if(!Ea.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Gc(r)}function Rf(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[i]=r;if(!i)return!1;let n=JSON.parse(atob(i));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}function cf(e,t,r){e.issues.length&&t.issues.push(...Je(r,e.issues)),t.value[r]=e.value}function Ca(e,t,r,i,n,a){let o=r in i;if(e.issues.length){if(n&&a&&!o)return;t.issues.push(...Je(r,e.issues))}if(!o&&!n){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?o&&(t.value[r]=void 0):t.value[r]=e.value}function Nf(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let r=pl(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Cf(e,t,r,i,n,a){let o=[],s=n.keySet,l=n.catchall._zod,c=l.def.type,d=l.optin==="optional",m=l.optout==="optional";for(let p in t){if(p==="__proto__"||s.has(p))continue;if(c==="never"){o.push(p);continue}let g=l.run({value:t[p],issues:[]},i);g instanceof Promise?e.push(g.then(f=>Ca(f,r,p,t,d,m))):Ca(g,r,p,t,d,m)}return o.length&&r.issues.push({code:"unrecognized_keys",keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>r):r}function df(e,t,r,i){for(let a of e)if(a.issues.length===0)return t.value=a.value,t;let n=e.filter(a=>!qt(a));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(a=>a.issues.map(o=>We(o,i,Ae())))}),t)}function uf(e,t,r,i){let n=e.filter(a=>a.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(a=>a.issues.map(o=>We(o,i,Ae())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}function Tc(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ht(e)&&Ht(t)){let r=Object.keys(t),i=Object.keys(e).filter(a=>r.indexOf(a)!==-1),n={...e,...t};for(let a of i){let o=Tc(e[a],t[a]);if(!o.valid)return{valid:!1,mergeErrorPath:[a,...o.mergeErrorPath]};n[a]=o.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<e.length;i++){let n=e[i],a=t[i],o=Tc(n,a);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function _f(e,t,r){let i=new Map,n;for(let s of t.issues)if(s.code==="unrecognized_keys"){n??(n=s);for(let l of s.keys)i.has(l)||i.set(l,{}),i.get(l).l=!0}else e.issues.push(s);for(let s of r.issues)if(s.code==="unrecognized_keys")for(let l of s.keys)i.has(l)||i.set(l,{}),i.get(l).r=!0;else e.issues.push(s);let a=[...i].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(a.length&&n&&e.issues.push({...n,keys:a}),qt(e))return e;let o=Tc(t.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}function mf(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}function pf(e,t,r){e.issues.length&&t.issues.push(...Je(r,e.issues)),t.value[r]=e.value}function gf(e,t,r,i,n){for(let a=0;a<r.length;a++){let o=e[a],s=a<i.length;if(o.issues.length){if(!s&&a>=n){t.value.length=a;break}t.issues.push(...Je(a,o.issues))}t.value[a]=o.value}for(let a=t.value.length-1;a>=i.length&&(r[a]._zod.optout==="optional"&&t.value[a]===void 0);a--)t.value.length=a;return t}function ff(e,t,r,i,n,a,o){e.issues.length&&(kr.has(typeof i)?r.issues.push(...Je(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:a,issues:e.issues.map(s=>We(s,o,Ae()))})),t.issues.length&&(kr.has(typeof i)?r.issues.push(...Je(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:a,key:i,issues:t.issues.map(s=>We(s,o,Ae()))})),r.value.set(e.value,t.value)}function Ef(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function Sf(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}function bf(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function Tf(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function ya(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}function Ra(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(a=>Na(e,a,t.out,r)):Na(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(a=>Na(e,a,t.in,r)):Na(e,n,t.in,r)}}function Na(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}function vf(e){return e.value=Object.freeze(e.value),e}function hf(e,t,r,i){if(!e){let n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),t.issues.push(wn(n))}}var ee,dn,ge,vc,hc,yc,Rc,Nc,Cc,Ic,Oc,Ac,xc,Dc,wc,Lc,Mc,kc,Pc,Uc,Fc,$c,Bc,zc,Yc,Hc,qc,Vc,Ia,Wc,Hr,Oa,Kc,Qc,Zc,jc,Xc,Jc,ed,td,nd,rd,If,id,qr,ad,od,sd,Aa,ld,cd,dd,ud,_d,md,pd,xa,gd,fd,Ed,Sd,bd,Td,vd,hd,Da,Vr,yd,Rd,Nd,Cd,Id,Od,Ad,xd=I(()=>{"use strict";ha();sn();Ec();yl();ba();q();bc();q();ee=T("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Sc;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let n of i)for(let a of n._zod.onattach)a(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(o,s,l)=>{let c=qt(o),d;for(let m of s){if(m._zod.def.when){if(El(o)||!m._zod.def.when(o))continue}else if(c)continue;let p=o.issues.length,g=m._zod.check(o);if(g instanceof Promise&&l?.async===!1)throw new pt;if(d||g instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await g,o.issues.length!==p&&(c||(c=qt(o,p)))});else{if(o.issues.length===p)continue;c||(c=qt(o,p))}}return d?d.then(()=>o):o},a=(o,s,l)=>{if(qt(o))return o.aborted=!0,o;let c=n(s,i,l);if(c instanceof Promise){if(l.async===!1)throw new pt;return c.then(d=>e._zod.parse(d,l))}return e._zod.parse(c,l)};e._zod.run=(o,s)=>{if(s.skipChecks)return e._zod.parse(o,s);if(s.direction==="backward"){let c=e._zod.parse({value:o.value,issues:[]},{...s,skipChecks:!0});return c instanceof Promise?c.then(d=>a(d,o,s)):a(c,o,s)}let l=e._zod.parse(o,s);if(l instanceof Promise){if(s.async===!1)throw new pt;return l.then(c=>n(c,i,s))}return n(l,i,s)}}re(e,"~standard",()=>({validate:n=>{try{let a=vl(e,n);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return hl(e,n).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),dn=T("$ZodString",(e,t)=>{ee.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ql(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),ge=T("$ZodStringFormat",(e,t)=>{Un.init(e,t),dn.init(e,t)}),vc=T("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Dl),ge.init(e,t)}),hc=T("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=cn(i))}else t.pattern??(t.pattern=cn());ge.init(e,t)}),yc=T("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=wl),ge.init(e,t)}),Rc=T("$ZodURL",(e,t)=>{ge.init(e,t),e._zod.check=r=>{try{let i=r.value.trim();if(!t.normalize&&t.protocol?.source===Bl.source&&!/^https?:\/\//i.test(i)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}let n=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Nc=T("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ll()),ge.init(e,t)}),Cc=T("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Al),ge.init(e,t)}),Ic=T("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Rl),ge.init(e,t)}),Oc=T("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Nl),ge.init(e,t)}),Ac=T("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Cl),ge.init(e,t)}),xc=T("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Il),ge.init(e,t)}),Dc=T("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ol),ge.init(e,t)}),wc=T("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Hl(t)),ge.init(e,t)}),Lc=T("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=zl),ge.init(e,t)}),Mc=T("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Yl(t)),ge.init(e,t)}),kc=T("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=xl),ge.init(e,t)}),Pc=T("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ml),ge.init(e,t),e._zod.bag.format="ipv4"}),Uc=T("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=kl),ge.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Fc=T("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Pl(t.delimiter)),ge.init(e,t),e._zod.bag.format="mac"}),$c=T("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Ul),ge.init(e,t)}),Bc=T("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Fl),ge.init(e,t),e._zod.check=r=>{let i=r.value.split("/");try{if(i.length!==2)throw new Error;let[n,a]=i;if(!a)throw new Error;let o=Number(a);if(`${o}`!==a)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});zc=T("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=$l),ge.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Gc(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});Yc=T("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ea),ge.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{yf(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Hc=T("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Gl),ge.init(e,t)});qc=T("$ZodJWT",(e,t)=>{ge.init(e,t),e._zod.check=r=>{Rf(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Vc=T("$ZodCustomStringFormat",(e,t)=>{ge.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Ia=T("$ZodNumber",(e,t)=>{ee.init(e,t),e._zod.pattern=e._zod.bag.pattern??Sa,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let a=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...a?{received:a}:{}}),r}}),Wc=T("$ZodNumberFormat",(e,t)=>{ec.init(e,t),Ia.init(e,t)}),Hr=T("$ZodBoolean",(e,t)=>{ee.init(e,t),e._zod.pattern=Kl,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),Oa=T("$ZodBigInt",(e,t)=>{ee.init(e,t),e._zod.pattern=Vl,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Kc=T("$ZodBigIntFormat",(e,t)=>{tc.init(e,t),Oa.init(e,t)}),Qc=T("$ZodSymbol",(e,t)=>{ee.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),Zc=T("$ZodUndefined",(e,t)=>{ee.init(e,t),e._zod.pattern=Zl,e._zod.values=new Set([void 0]),e._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),jc=T("$ZodNull",(e,t)=>{ee.init(e,t),e._zod.pattern=Ql,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),Xc=T("$ZodAny",(e,t)=>{ee.init(e,t),e._zod.parse=r=>r}),Jc=T("$ZodUnknown",(e,t)=>{ee.init(e,t),e._zod.parse=r=>r}),ed=T("$ZodNever",(e,t)=>{ee.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),td=T("$ZodVoid",(e,t)=>{ee.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),nd=T("$ZodDate",(e,t)=>{ee.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,a=n instanceof Date;return a&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...a?{received:"Invalid Date"}:{},inst:e}),r}});rd=T("$ZodArray",(e,t)=>{ee.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let a=[];for(let o=0;o<n.length;o++){let s=n[o],l=t.element._zod.run({value:s,issues:[]},i);l instanceof Promise?a.push(l.then(c=>cf(c,r,o))):cf(l,r,o)}return a.length?Promise.all(a).then(()=>r):r}});If=T("$ZodObject",(e,t)=>{if(ee.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let l={...s};return Object.defineProperty(t,"shape",{value:l}),l}})}let i=Dn(()=>Nf(t));re(e._zod,"propValues",()=>{let s=t.shape,l={};for(let c in s){let d=s[c]._zod;if(d.values){l[c]??(l[c]=new Set);for(let m of d.values)l[c].add(m)}}return l});let n=ln,a=t.catchall,o;e._zod.parse=(s,l)=>{o??(o=i.value);let c=s.value;if(!n(c))return s.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),s;s.value={};let d=[],m=o.shape;for(let p of o.keys){let g=m[p],f=g._zod.optin==="optional",v=g._zod.optout==="optional",b=g._zod.run({value:c[p],issues:[]},l);b instanceof Promise?d.push(b.then(h=>Ca(h,s,p,c,f,v))):Ca(b,s,p,c,f,v)}return a?Cf(d,c,s,l,i.value,e):d.length?Promise.all(d).then(()=>s):s}}),id=T("$ZodObjectJIT",(e,t)=>{If.init(e,t);let r=e._zod.parse,i=Dn(()=>Nf(t)),n=p=>{let g=new Yr(["shape","payload","ctx"]),f=i.value,v=C=>{let O=aa(C);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};g.write("const input = payload.value;");let b=Object.create(null),h=0;for(let C of f.keys)b[C]=`key_${h++}`;g.write("const newResult = {};");for(let C of f.keys){let O=b[C],R=aa(C),L=p[C],D=L?._zod?.optin==="optional",F=L?._zod?.optout==="optional";g.write(`const ${O} = ${v(C)};`),D&&F?g.write(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glassbox",
3
- "version": "0.12.0",
3
+ "version": "0.13.2-rc.3",
4
4
  "description": "A local code review tool for AI-generated code. Review diffs, annotate lines, and export structured feedback that AI tools can act on.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -48,6 +48,8 @@
48
48
  "demo:capture": "npm run build:client && tsx scripts/demo/capture-demo.ts",
49
49
  "demo:capture-stills": "npm run build:client && tsx scripts/demo/capture-stills.ts",
50
50
  "lint": "eslint src/",
51
+ "typecheck": "tsc --noEmit",
52
+ "typecheck:scripts": "tsc --noEmit -p tsconfig.scripts.json",
51
53
  "clean": "rm -rf dist node_modules/.cache",
52
54
  "release": "bash scripts/release.sh",
53
55
  "release:beta": "bash scripts/release.sh --beta",
@@ -59,33 +61,36 @@
59
61
  ],
60
62
  "dependencies": {
61
63
  "@electric-sql/pglite": "^0.4.5",
62
- "@hono/node-server": "^1.19.9",
64
+ "@hono/node-server": "^2.0.5",
63
65
  "@modelcontextprotocol/sdk": "^1.29.0",
64
66
  "@resvg/resvg-wasm": "^2.6.2",
65
- "hono": "^4.12.2",
67
+ "hono": "^4.12.25",
66
68
  "kerfjs": "^0.14.0",
67
69
  "zod": "^4.4.3"
68
70
  },
69
71
  "devDependencies": {
70
- "@eslint/js": "^9.39.3",
71
- "@playwright/test": "^1.59.1",
72
- "@tauri-apps/cli": "^2.10.1",
73
- "@types/node": "^22.0.0",
74
- "@vitest/coverage-v8": "^4.1.0",
72
+ "@eslint/js": "^10.0.1",
73
+ "@playwright/test": "^1.61.0",
74
+ "@tauri-apps/cli": "^2.11.2",
75
+ "@types/node": "^25.9.3",
76
+ "@vitest/coverage-v8": "^4.1.9",
75
77
  "c8": "^11.0.0",
76
- "domotion-svg": "0.8.0",
77
- "esbuild": "^0.27.3",
78
- "eslint": "^9.39.3",
79
- "eslint-plugin-import-x": "^4.16.1",
78
+ "domotion-svg": "0.13.3",
79
+ "esbuild": "^0.28.1",
80
+ "eslint": "^10.5.0",
81
+ "eslint-plugin-import-x": "^4.16.2",
80
82
  "eslint-plugin-kerfjs": "^0.14.0",
81
83
  "eslint-plugin-simple-import-sort": "^12.1.1",
82
84
  "eslint-plugin-tsdoc": "^0.5.2",
83
85
  "highlight.js": "^11.11.1",
84
86
  "sass": "^1.97.3",
85
87
  "tsup": "^8.5.1",
86
- "tsx": "^4.21.0",
88
+ "tsx": "^4.22.4",
87
89
  "typescript": "^5.9.3",
88
- "typescript-eslint": "^8.56.1",
89
- "vitest": "^4.1.0"
90
+ "typescript-eslint": "^8.61.1",
91
+ "vitest": "^4.1.9"
92
+ },
93
+ "overrides": {
94
+ "esbuild": "^0.28.1"
90
95
  }
91
96
  }