@50heads/cli 2026.1013.1 → 2026.1013.2
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/CHANGELOG.md +11 -0
- package/dist/cli.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,15 @@ Pending changes are captured as changesets and written here when the package is
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [2026.1013.2] - 2026-10-13
|
|
12
|
+
|
|
13
|
+
**This release aligns the repository description with the package description and removes any time promise from it.** It also narrows glama.json mirrors to 50heads-team only.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- **The repository description now matches the package description and no longer carries a time promise.**
|
|
18
|
+
- **glama.json mirrors are now limited to 50heads-team only.**
|
|
19
|
+
|
|
11
20
|
## [2026.1013.1] - 2026-10-13
|
|
12
21
|
|
|
13
22
|
**@50heads/cli 2026.1013.1 adds filing, organisation, webhook, answers export and approval flows, plus new status and limits commands.** It also changes login scopes for organisation admin access and updates wording and output to US English, with no change to commands or tools beyond the MCP server tool count.
|
|
@@ -76,3 +85,5 @@ Pending changes are captured as changesets and written here when the package is
|
|
|
76
85
|
[2026.1009.1]: https://github.com/50heads/cli/releases/tag/v2026.1009.1
|
|
77
86
|
|
|
78
87
|
[2026.1013.1]: https://github.com/50heads/cli/releases/tag/v2026.1013.1
|
|
88
|
+
|
|
89
|
+
[2026.1013.2]: https://github.com/50heads/cli/releases/tag/v2026.1013.2
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var Bv=Object.defineProperty;var Oe=(e,n)=>{for(var i in n)Bv(e,i,{get:n[i],enumerable:!0})};import{readFile as ET,writeFile as zT}from"node:fs/promises";import{execFile as Gv}from"node:child_process";import{mkdir as qv,readFile as Wv,rm as Kv,writeFile as Hv,chmod as Jv}from"node:fs/promises";import{homedir as Qv,platform as _m}from"node:os";import{dirname as Yv,join as $m}from"node:path";var wt="@50heads/mcp",St="default";function It(e,n,i){return new Promise(s=>{try{let r=Gv(e,n,{timeout:1e4},(o,a)=>{s({ok:!o,stdout:String(a??"")})});i!==void 0&&r.stdin?.end(i)}catch{s({ok:!1,stdout:""})}})}function Ur(){let e=process.env.XDG_CONFIG_HOME||$m(Qv(),".config");return $m(e,"50heads","credentials.json")}var Xv={name:"macOS Keychain",async read(){let e=await It("security",["find-generic-password","-a",St,"-s",wt,"-w"]);return e.ok&&e.stdout.trim()||null},async write(e){return(await It("security",["add-generic-password","-U","-a",St,"-s",wt,"-w",e])).ok},async remove(){await It("security",["delete-generic-password","-a",St,"-s",wt])}},ex={name:"Secret Service",async read(){let e=await It("secret-tool",["lookup","service",wt,"account",St]);return e.ok&&e.stdout.trim()||null},async write(e){return(await It("secret-tool",["store","--label=50heads MCP","service",wt,"account",St],e)).ok},async remove(){await It("secret-tool",["clear","service",wt,"account",St])}},Nr={name:"file",async read(){try{return await Wv(Ur(),"utf8")}catch{return null}},async write(e){let n=Ur();return await qv(Yv(n),{recursive:!0,mode:448}),await Hv(n,e,{mode:384}),await Jv(n,384).catch(()=>{}),!0},async remove(){await Kv(Ur(),{force:!0})}};function za(){return process.env.FIFTYHEADS_CREDENTIALS_STORE==="file"?[Nr]:_m()==="darwin"?[Xv,Nr]:_m()==="linux"?[ex,Nr]:[Nr]}async function At(){for(let e of za()){let n=await e.read();if(n)try{let i=JSON.parse(n);if(i.accessToken&&i.tokenEndpoint)return i}catch{}}return null}async function Lr(e){let n=JSON.stringify(e);for(let i of za())if(await i.write(n))return i.name;throw new Error("Could not save the sign-in anywhere.")}async function Ra(){for(let e of za())await e.remove()}var Oa="https://mcp.50heads.com/mcp",wm=["questions:read","questions:write","templates:read","account:read","webhooks:read","webhooks:write","apps:read","apps:write","organization:read","members:read","audit:read"];var km="urn:ietf:params:oauth:grant-type:device_code",de=class extends Error{};async function Mr(e){let n=await e.json().catch(()=>null);if(n===null)throw new de(`The sign-in server answered ${e.status} without JSON.`);return n}async function Sm(e,n=fetch,i="50heads"){let s=await n(new URL("/.well-known/oauth-authorization-server",e),{headers:{"user-agent":i,accept:"application/json"}});if(!s.ok)throw new de(`Could not reach ${e} (HTTP ${s.status}).`);let r=await Mr(s);if(r.issuer.replace(/\/$/,"")!==e.replace(/\/$/,""))throw new de(`The sign-in server says it is ${r.issuer}, not ${e}. Stopping.`);return r}function Ca(e){return new URLSearchParams(e)}async function ja(e){let n=e.fetchImpl??fetch,i=e.sleep??(m=>new Promise(g=>setTimeout(g,m))),s=e.client.userAgent,r=e.client.resource??Oa,o=await Sm(e.authUrl,n,s);if(!o.device_authorization_endpoint)throw new de("Signing in from the terminal is not available yet. Make an API key in the dashboard and set FIFTYHEADS_API_KEY instead.");let a=wm.join(" "),u=await At(),c=u?.issuer===o.issuer?u.clientId:"";if(!c){if(!o.registration_endpoint)throw new de("The sign-in server does not accept new clients.");let m=await n(o.registration_endpoint,{method:"POST",headers:{"user-agent":s,"content-type":"application/json",accept:"application/json"},body:JSON.stringify({client_name:e.client.name,application_type:"native",grant_types:[km,"refresh_token"],response_types:[],token_endpoint_auth_method:"none",redirect_uris:["http://127.0.0.1/callback"],scope:a,software_id:e.client.softwareId,software_version:e.client.version})}),g=await Mr(m);if(!m.ok||!g.client_id)throw new de(g.error_description??`Registration failed (HTTP ${m.status}).`);c=g.client_id}let l=await n(o.device_authorization_endpoint,{method:"POST",headers:{"user-agent":s,"content-type":"application/x-www-form-urlencoded",accept:"application/json"},body:Ca({client_id:c,scope:a,resource:r})}),p=await Mr(l);if(!l.ok||!p.device_code)throw new de(p.error_description??"Could not start signing in.");e.prompt({userCode:p.user_code,verificationUri:p.verification_uri,verificationUriComplete:p.verification_uri_complete,expiresIn:p.expires_in});let d=Math.max(1,p.interval??5)*1e3,f=Date.now()+p.expires_in*1e3;for(;Date.now()<f;){await i(d);let m=await n(o.token_endpoint,{method:"POST",headers:{"user-agent":s,"content-type":"application/x-www-form-urlencoded",accept:"application/json"},body:Ca({grant_type:km,device_code:p.device_code,client_id:c,resource:r})}),g=await Mr(m);if(m.ok&&g.access_token){let b={issuer:o.issuer,clientId:c,accessToken:g.access_token,refreshToken:g.refresh_token??null,expiresAt:Date.now()+(g.expires_in??3600)*1e3,scope:g.scope??a,tokenEndpoint:o.token_endpoint};return{credentials:b,store:await Lr(b)}}switch(g.error){case"authorization_pending":continue;case"slow_down":d+=5e3;continue;case"access_denied":throw new de("Sign-in was declined.");case"expired_token":throw new de("The code expired. Run login again.");default:throw new de(g.error_description??`Sign-in failed (${g.error??m.status}).`)}}throw new de("The code expired. Run login again.")}async function Da(e,n=fetch){let i=await At();if(!i)return null;if(i.expiresAt-Date.now()>6e4)return i.accessToken;if(!i.refreshToken)return null;let s=await n(i.tokenEndpoint,{method:"POST",headers:{"user-agent":e.userAgent,"content-type":"application/x-www-form-urlencoded",accept:"application/json"},body:Ca({grant_type:"refresh_token",refresh_token:i.refreshToken,client_id:i.clientId,resource:e.resource??Oa})}),r=await s.json().catch(()=>({}));return!s.ok||!r.access_token?null:(await Lr({...i,accessToken:r.access_token,refreshToken:r.refresh_token??i.refreshToken,expiresAt:Date.now()+(r.expires_in??3600)*1e3,scope:r.scope??i.scope}),r.access_token)}import{spawn as tx}from"node:child_process";import{platform as Na}from"node:os";function Ua(e){if(process.env.FIFTYHEADS_NO_BROWSER)return;let n=Na()==="darwin"?"open":Na()==="win32"?"cmd":"xdg-open",i=Na()==="win32"?["/c","start","",e]:[e];try{tx(n,i,{stdio:"ignore",detached:!0}).on("error",()=>{}).unref()}catch{}}var je="2026.1013.1",Fr=`50heads-cli/${je}`,k={ok:0,error:1,usage:2,auth:3,credits:4,invalid:5,notFound:6,unavailable:7,partial:8,approval:9,timeout:124};var t={};Oe(t,{$brand:()=>Ya,$input:()=>kc,$output:()=>$c,INVALID:()=>ce,NEVER:()=>Qa,TimePrecision:()=>Oc,ZodAny:()=>_p,ZodArray:()=>Sp,ZodBase64:()=>Lo,ZodBase64URL:()=>Mo,ZodBigInt:()=>pn,ZodBigIntFormat:()=>Vo,ZodBoolean:()=>ln,ZodCIDRv4:()=>No,ZodCIDRv6:()=>Uo,ZodCUID:()=>Eo,ZodCUID2:()=>zo,ZodCatch:()=>qp,ZodCodec:()=>vr,ZodCompileAsyncError:()=>Se,ZodCompileUnsupportedError:()=>N,ZodCreditCard:()=>mp,ZodCustom:()=>xr,ZodCustomStringFormat:()=>bt,ZodDate:()=>mr,ZodDefault:()=>Mp,ZodDiscriminatedUnion:()=>Ap,ZodE164:()=>Fo,ZodEmail:()=>Io,ZodEmoji:()=>Po,ZodEnum:()=>sn,ZodError:()=>hw,ZodExactOptional:()=>Wo,ZodFile:()=>Dp,ZodFirstPartyTypeKind:()=>ad,ZodFunction:()=>nd,ZodGUID:()=>Ao,ZodIBAN:()=>fp,ZodIPv4:()=>jo,ZodIPv6:()=>Do,ZodISODate:()=>Qe,ZodISODateTime:()=>Je,ZodISODuration:()=>Xe,ZodISOTime:()=>Ye,ZodInstanceOf:()=>od,ZodIntersection:()=>Pp,ZodIssueCode:()=>xw,ZodJWT:()=>Zo,ZodKSUID:()=>Oo,ZodLazy:()=>Xp,ZodLiteral:()=>jp,ZodMAC:()=>dp,ZodMap:()=>Cp,ZodNaN:()=>Kp,ZodNanoID:()=>To,ZodNever:()=>kp,ZodNonOptional:()=>Ko,ZodNull:()=>vp,ZodNullable:()=>Lp,ZodNumber:()=>cn,ZodNumberFormat:()=>vt,ZodObject:()=>gr,ZodOptional:()=>hr,ZodPipe:()=>br,ZodPrefault:()=>Zp,ZodPreprocess:()=>Hp,ZodPromise:()=>td,ZodReadonly:()=>Jp,ZodRealError:()=>he,ZodRecord:()=>an,ZodSet:()=>Op,ZodString:()=>un,ZodStringFormat:()=>G,ZodSuccess:()=>Gp,ZodSymbol:()=>hp,ZodTemplateLiteral:()=>Yp,ZodTransform:()=>Np,ZodTuple:()=>Ep,ZodType:()=>j,ZodULID:()=>Ro,ZodURL:()=>dr,ZodUUID:()=>ze,ZodUndefined:()=>bp,ZodUnion:()=>yr,ZodUnknown:()=>$p,ZodVoid:()=>wp,ZodXID:()=>Co,ZodXor:()=>Ip,_ZodString:()=>So,_default:()=>Fp,_function:()=>ah,any:()=>Ny,array:()=>fr,base64:()=>hy,base64url:()=>by,bigint:()=>Ry,boolean:()=>yp,catch:()=>Wp,check:()=>sh,cidrv4:()=>gy,cidrv6:()=>yy,clone:()=>Z,codec:()=>nh,coerce:()=>ud,compile:()=>Ac,config:()=>J,core:()=>Me,creditCard:()=>xy,cuid:()=>sy,cuid2:()=>uy,currencyCode:()=>Iy,custom:()=>uh,date:()=>Ly,decode:()=>op,decodeAsync:()=>sp,deepPartial:()=>_h,describe:()=>ch,discriminatedUnion:()=>Gy,e164:()=>vy,email:()=>Qg,emoji:()=>oy,encode:()=>ip,encodeAsync:()=>ap,endsWith:()=>Kt,enum:()=>Go,exactOptional:()=>Up,file:()=>Yy,flattenError:()=>jn,float32:()=>Py,float64:()=>Ty,formatError:()=>Dn,fromJSONSchema:()=>vh,function:()=>ah,getDiscriminatedOption:()=>Ju,getErrorMap:()=>$w,globalRegistry:()=>ne,gt:()=>Te,gte:()=>ve,guid:()=>Yg,hash:()=>Ay,hex:()=>Sy,hostname:()=>wy,httpUrl:()=>iy,iban:()=>_y,includes:()=>qt,input:()=>kh,instanceof:()=>ph,int:()=>ko,int32:()=>Ey,int64:()=>Cy,intersection:()=>Tp,invertCodec:()=>rh,ipv4:()=>dy,ipv6:()=>fy,iso:()=>_r,json:()=>mh,jwt:()=>$y,keyof:()=>My,ksuid:()=>py,lazy:()=>ed,length:()=>mt,literal:()=>Qy,locales:()=>nr,looseObject:()=>Vy,looseRecord:()=>Wy,lowercase:()=>Bt,lt:()=>Pe,lte:()=>be,mac:()=>my,map:()=>Ky,maxLength:()=>dt,maxSize:()=>qe,memoizer:()=>er,meta:()=>lh,mime:()=>Jt,minLength:()=>Le,minSize:()=>Ee,multipleOf:()=>Ge,nan:()=>th,nanoid:()=>ay,nativeEnum:()=>Jy,negative:()=>po,never:()=>Bo,nonnegative:()=>fo,nonoptional:()=>Bp,nonpositive:()=>mo,normalize:()=>Qt,null:()=>xp,nullable:()=>pr,nullish:()=>Xy,number:()=>gp,object:()=>Fy,optional:()=>yt,output:()=>wh,overwrite:()=>Ie,parse:()=>ep,parseAsync:()=>tp,partialRecord:()=>qy,pipe:()=>wo,positive:()=>lo,prefault:()=>Vp,preprocess:()=>fh,prettifyError:()=>rs,promise:()=>oh,properties:()=>Ht,property:()=>go,readonly:()=>Qp,record:()=>Rp,refine:()=>rd,regex:()=>Vt,regexes:()=>$e,registry:()=>Li,safeDecode:()=>cp,safeDecodeAsync:()=>pp,safeEncode:()=>up,safeEncodeAsync:()=>lp,safeParse:()=>np,safeParseAsync:()=>rp,set:()=>Hy,setErrorMap:()=>_w,size:()=>pt,slugify:()=>tn,startsWith:()=>Wt,strictObject:()=>Zy,string:()=>lr,stringFormat:()=>ky,stringbool:()=>dh,success:()=>eh,superRefine:()=>id,symbol:()=>jy,templateLiteral:()=>ih,toJSONSchema:()=>vo,toLowerCase:()=>Xt,toUpperCase:()=>en,toZod:()=>In,transform:()=>qo,treeifyError:()=>ns,trim:()=>Yt,tuple:()=>zp,uint32:()=>zy,uint64:()=>Oy,ulid:()=>cy,undefined:()=>Dy,union:()=>dn,unknown:()=>gt,uppercase:()=>Gt,url:()=>ry,util:()=>v,uuid:()=>Xg,uuidv4:()=>ey,uuidv6:()=>ty,uuidv7:()=>ny,validate:()=>Nn,validateAsync:()=>Un,void:()=>Uy,withParser:()=>Mi,xid:()=>ly,xor:()=>By});var Me={};Oe(Me,{$ZodAny:()=>Zu,$ZodArray:()=>Wu,$ZodAsyncError:()=>ge,$ZodBase64:()=>Eu,$ZodBase64URL:()=>zu,$ZodBigInt:()=>Si,$ZodBigIntFormat:()=>Uu,$ZodBoolean:()=>Kn,$ZodCIDRv4:()=>Pu,$ZodCIDRv6:()=>Tu,$ZodCUID:()=>yu,$ZodCUID2:()=>hu,$ZodCatch:()=>dc,$ZodCheck:()=>q,$ZodCheckBigIntFormat:()=>Vs,$ZodCheckEndsWith:()=>tu,$ZodCheckGreaterThan:()=>ci,$ZodCheckIncludes:()=>Xs,$ZodCheckLengthEquals:()=>Hs,$ZodCheckLessThan:()=>ui,$ZodCheckLowerCase:()=>Qs,$ZodCheckMaxLength:()=>Ws,$ZodCheckMaxSize:()=>Bs,$ZodCheckMimeType:()=>iu,$ZodCheckMinLength:()=>Ks,$ZodCheckMinSize:()=>Gs,$ZodCheckMultipleOf:()=>Fs,$ZodCheckNumberFormat:()=>Zs,$ZodCheckOverwrite:()=>ou,$ZodCheckProperties:()=>ru,$ZodCheckProperty:()=>nu,$ZodCheckRegex:()=>Js,$ZodCheckSizeEquals:()=>qs,$ZodCheckStartsWith:()=>eu,$ZodCheckStringFormat:()=>Ut,$ZodCheckUpperCase:()=>Ys,$ZodCodec:()=>Jn,$ZodCreditCard:()=>Cu,$ZodCustom:()=>vc,$ZodCustomStringFormat:()=>Du,$ZodCyclicError:()=>Ri,$ZodDate:()=>qu,$ZodDefault:()=>uc,$ZodDiscriminatedUnion:()=>Qu,$ZodE164:()=>Ru,$ZodEmail:()=>lu,$ZodEmoji:()=>fu,$ZodEncodeError:()=>Be,$ZodEnum:()=>nc,$ZodError:()=>ts,$ZodExactOptional:()=>ac,$ZodFile:()=>ic,$ZodFunction:()=>hc,$ZodGUID:()=>uu,$ZodIBAN:()=>Ou,$ZodIPv4:()=>Su,$ZodIPv6:()=>Iu,$ZodISODate:()=>$u,$ZodISODateTime:()=>_u,$ZodISODuration:()=>wu,$ZodISOTime:()=>ku,$ZodIntersection:()=>Yu,$ZodJWT:()=>ju,$ZodKSUID:()=>xu,$ZodLazy:()=>Qn,$ZodLiteral:()=>rc,$ZodMAC:()=>Au,$ZodMap:()=>ec,$ZodNaN:()=>mc,$ZodNanoID:()=>gu,$ZodNever:()=>Bu,$ZodNonOptional:()=>lc,$ZodNull:()=>Fu,$ZodNullable:()=>sc,$ZodNumber:()=>wi,$ZodNumberFormat:()=>Nu,$ZodObject:()=>sf,$ZodObjectJIT:()=>Ku,$ZodOptional:()=>Ai,$ZodPipe:()=>Pi,$ZodPrefault:()=>cc,$ZodPreprocess:()=>fc,$ZodPromise:()=>bc,$ZodReadonly:()=>gc,$ZodRealError:()=>ye,$ZodRecord:()=>Xu,$ZodRegistry:()=>Ui,$ZodSet:()=>tc,$ZodString:()=>at,$ZodStringFormat:()=>V,$ZodSuccess:()=>pc,$ZodSymbol:()=>Lu,$ZodTemplateLiteral:()=>yc,$ZodTransform:()=>oc,$ZodTuple:()=>Ii,$ZodType:()=>R,$ZodULID:()=>bu,$ZodURL:()=>mu,$ZodUUID:()=>cu,$ZodUndefined:()=>Mu,$ZodUnion:()=>Hn,$ZodUnknown:()=>Vu,$ZodVoid:()=>Gu,$ZodXID:()=>vu,$ZodXor:()=>Hu,$brand:()=>Ya,$constructor:()=>y,$input:()=>kc,$output:()=>$c,Doc:()=>ot,INVALID:()=>ce,JSONSchema:()=>Kg,JSONSchemaGenerator:()=>xo,NEVER:()=>Qa,TimePrecision:()=>Oc,URL_BAD_FORMAT:()=>pu,URL_UNPARSEABLE:()=>Vn,ZodCompileAsyncError:()=>Se,ZodCompileUnsupportedError:()=>N,_any:()=>Qc,_array:()=>il,_base64:()=>ao,_base64url:()=>so,_bigint:()=>Bc,_boolean:()=>Zc,_catch:()=>ow,_check:()=>Rg,_cidrv4:()=>io,_cidrv6:()=>oo,_coercedBigint:()=>Gc,_coercedBoolean:()=>Vc,_coercedDate:()=>nl,_coercedNumber:()=>Dc,_coercedString:()=>Ec,_creditCard:()=>Rc,_cuid:()=>Qi,_cuid2:()=>Yi,_custom:()=>al,_date:()=>tl,_decode:()=>Qr,_decodeAsync:()=>Xr,_default:()=>nw,_discriminatedUnion:()=>Bk,_e164:()=>uo,_email:()=>Vi,_emoji:()=>Hi,_encode:()=>Jr,_encodeAsync:()=>Yr,_endsWith:()=>Kt,_enum:()=>Jk,_file:()=>ol,_float32:()=>Uc,_float64:()=>Lc,_gt:()=>Te,_gte:()=>ve,_guid:()=>Bi,_iban:()=>Cc,_includes:()=>qt,_int:()=>Nc,_int32:()=>Mc,_int64:()=>qc,_intersection:()=>Gk,_ipv4:()=>no,_ipv6:()=>ro,_isoDate:()=>or,_isoDateTime:()=>ir,_isoDuration:()=>sr,_isoTime:()=>ar,_jwt:()=>co,_ksuid:()=>to,_lazy:()=>cw,_length:()=>mt,_literal:()=>Yk,_lowercase:()=>Bt,_lt:()=>Pe,_lte:()=>be,_mac:()=>zc,_map:()=>Kk,_max:()=>be,_maxLength:()=>dt,_maxSize:()=>qe,_mime:()=>Jt,_min:()=>ve,_minLength:()=>Le,_minSize:()=>Ee,_multipleOf:()=>Ge,_nan:()=>rl,_nanoid:()=>Ji,_nativeEnum:()=>Qk,_negative:()=>po,_never:()=>Xc,_nonnegative:()=>fo,_nonoptional:()=>rw,_nonpositive:()=>mo,_normalize:()=>Qt,_null:()=>Jc,_nullable:()=>tw,_number:()=>jc,_optional:()=>ew,_overwrite:()=>Ie,_parse:()=>Ot,_parseAsync:()=>jt,_pipe:()=>aw,_positive:()=>lo,_promise:()=>lw,_properties:()=>Ht,_property:()=>go,_readonly:()=>sw,_record:()=>Wk,_refine:()=>sl,_regex:()=>Vt,_safeDecode:()=>ti,_safeDecodeAsync:()=>ri,_safeEncode:()=>ei,_safeEncodeAsync:()=>ni,_safeParse:()=>Dt,_safeParseAsync:()=>Nt,_set:()=>Hk,_size:()=>pt,_slugify:()=>tn,_startsWith:()=>Wt,_string:()=>Tc,_stringFormat:()=>ft,_stringbool:()=>pl,_success:()=>iw,_superRefine:()=>ul,_symbol:()=>Kc,_templateLiteral:()=>uw,_toLowerCase:()=>Xt,_toUpperCase:()=>en,_transform:()=>Xk,_trim:()=>Yt,_tuple:()=>qk,_uint32:()=>Fc,_uint64:()=>Wc,_ulid:()=>Xi,_undefined:()=>Hc,_union:()=>Zk,_unknown:()=>Yc,_uppercase:()=>Gt,_url:()=>rr,_uuid:()=>Gi,_uuidv4:()=>qi,_uuidv6:()=>Wi,_uuidv7:()=>Ki,_void:()=>el,_xid:()=>eo,_xor:()=>Vk,base64Charset:()=>vi,base64urlCharset:()=>Wn,canParseURL:()=>du,clone:()=>Z,compile:()=>Ac,compileFn:()=>Fi,config:()=>J,createStandardJSONSchemaMethod:()=>nn,createToJSONSchemaMethod:()=>ml,decode:()=>qx,decodeAsync:()=>Kx,describe:()=>cl,encode:()=>Gx,encodeAsync:()=>Wx,extractDefs:()=>Ke,finalize:()=>He,flattenError:()=>jn,formatError:()=>Dn,getDiscriminatedOption:()=>Ju,globalConfig:()=>ee,globalRegistry:()=>ne,handleUnrepresentable:()=>Q,initializeContext:()=>We,isBackEdge:()=>Oi,isRecursiveSchema:()=>Ci,isValidBase64:()=>qn,isValidBase64URL:()=>xi,isValidCIDRv6:()=>bi,isValidCreditCard:()=>_i,isValidIBAN:()=>$i,isValidIPv6:()=>Gn,isValidJWT:()=>ki,locales:()=>nr,memoizer:()=>er,mergeValues:()=>Lt,meta:()=>ll,parse:()=>Kr,parseAsync:()=>Hr,parseURLObject:()=>rf,prettifyError:()=>rs,process:()=>B,processSchema:()=>B,regexes:()=>$e,registry:()=>Li,safeDecode:()=>Jx,safeDecodeAsync:()=>Yx,safeEncode:()=>Hx,safeEncodeAsync:()=>Qx,safeParse:()=>Mx,safeParseAsync:()=>Fx,standardProps:()=>fi,stripTabAndNewline:()=>Bn,toDotPath:()=>Dm,toJSONSchema:()=>vo,toZod:()=>In,treeifyError:()=>ns,urlHostnameOk:()=>yi,urlProtocolOk:()=>hi,util:()=>v,validate:()=>Nn,validateAsync:()=>Un,validateURL:()=>gi,version:()=>au,withParser:()=>Mi});var v={};Oe(v,{BIGINT_FORMAT_RANGES:()=>zn,CONSTANT_CATCH:()=>qr,Class:()=>Fa,NUMBER_FORMAT_RANGES:()=>En,aborted:()=>ue,allowsEval:()=>Ba,assert:()=>ax,assertEqual:()=>nx,assertIs:()=>ix,assertNever:()=>ox,assertNotEqual:()=>rx,assignProp:()=>te,attachSchema:()=>Gr,base64ToUint8Array:()=>Em,base64urlToUint8Array:()=>Sx,cached:()=>zt,captureStackTrace:()=>Vr,cleanEnum:()=>wx,cleanRegex:()=>Ne,clone:()=>Z,cloneDef:()=>cx,codePointLength:()=>rt,constantCatch:()=>Ha,createTransparentProxy:()=>gx,defineLazy:()=>Za,defineLazyInternal:()=>D,derived:()=>Tx,esc:()=>se,escapeRegex:()=>_e,explicitlyAborted:()=>Wa,extend:()=>bx,finalizeIssue:()=>fe,floatSafeRemainder:()=>An,getElementAtPath:()=>lx,getEnumValues:()=>Tt,getLengthableOrigin:()=>Cn,getParsedType:()=>fx,getSizableOrigin:()=>Rn,hexToUint8Array:()=>Ax,hide:()=>On,installLazyProp:()=>Cx,isObject:()=>nt,isPlainObject:()=>xe,issue:()=>Ct,joinValues:()=>h,jsonStringifyReplacer:()=>Et,members:()=>Ka,merge:()=>xx,mergeDefs:()=>we,normalizeParams:()=>$,nullish:()=>Zr,numKeys:()=>mx,objectClone:()=>sx,omit:()=>hx,optionalKeys:()=>qa,own:()=>Ve,parsedType:()=>_,partial:()=>_x,pick:()=>yx,prefixIssues:()=>me,primitiveTypes:()=>Ga,promiseAllObject:()=>px,propertyKeyTypes:()=>Tn,randomString:()=>dx,rawShape:()=>Rt,required:()=>$x,safeExtend:()=>vx,shallowClone:()=>Pn,slugify:()=>Va,stringifyPrimitive:()=>x,toZod:()=>In,uint8ArrayToBase64:()=>zm,uint8ArrayToBase64url:()=>Ix,uint8ArrayToHex:()=>Px,unwrapMessage:()=>Pt});function nx(e){return e}function rx(e){return e}function In(){return e=>e}function ix(e){}function ox(e){throw new Error("Unexpected value in exhaustive check")}function ax(e){}function Tt(e){let n=Object.values(e).filter(s=>typeof s=="number");return Object.entries(e).filter(([s,r])=>n.indexOf(+s)===-1).map(([s,r])=>r)}function h(e,n="|"){return e.map(i=>x(i)).join(n)}function Et(e,n){return typeof n=="bigint"?n.toString():n}var Ma=class{constructor(n){this._getter=n,this._value=void 0}get value(){let n=this._getter;return n!==void 0&&(this._value=n(),this._getter=void 0),this._value}};function zt(e){return new Ma(e)}function Zr(e){return e==null}function Ne(e){let n=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(n,i)}function An(e,n){let i=e/n,s=Math.round(i),r=4*Number.EPSILON*Math.max(Math.abs(i),1);return Math.abs(i-s)<r?0:i-s}var Im=Symbol("evaluating");function Za(e,n,i){let s;Object.defineProperty(e,n,{get(){if(s!==Im)return s===void 0&&(s=Im,s=i()),s},set(r){Object.defineProperty(e,n,{value:r})},configurable:!0})}function sx(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function te(e,n,i){Object.defineProperty(e,n,{value:i,writable:!0,enumerable:!0,configurable:!0})}function Rt(e){let n=Object.getOwnPropertyDescriptor(e,"shape");return n?.get?n.get.raw:n?.value}function De(e){return Rt(e._zod.def)??e._zod.def.shape}function Am(e,n,i){Object.defineProperty(e,n,{get(){let s=i();return te(this,n,s),s},enumerable:!0,configurable:!0})}function Pm(e,n,i){n in e?te(e,n,i):e[n]=i}function tt(e,n,i,s){let r=De(n);for(let o of i){let a=Object.getOwnPropertyDescriptor(r,o);a.enumerable&&(a.get?Am(e,o,()=>{let u=n._zod.def.shape[o];return s?s(u,o):u}):Pm(e,o,s?s(a.value,o):a.value))}}function ux(e,n){for(let i of Reflect.ownKeys(n)){let s=Object.getOwnPropertyDescriptor(n,i);s.enumerable&&(s.get?Am(e,i,()=>n[i]):Pm(e,i,s.value))}}function we(...e){let n={};for(let i of e){let s=Object.getOwnPropertyDescriptors(i);Object.assign(n,s)}return Object.defineProperties({},n)}function cx(e){return we(e._zod.def)}function lx(e,n){return n?n.reduce((i,s)=>i?.[s],e):e}function px(e){let n=Object.keys(e),i=n.map(s=>e[s]);return Promise.all(i).then(s=>{let r={};for(let o=0;o<n.length;o++)r[n[o]]=s[o];return r})}function dx(e=10){let n="abcdefghijklmnopqrstuvwxyz",i="";for(let s=0;s<e;s++)i+=n[Math.floor(Math.random()*n.length)];return i}function se(e){return JSON.stringify(e)}function Va(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Vr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function nt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Ba=zt(()=>{if(ee.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function xe(e){if(nt(e)===!1)return!1;let n=e.constructor;if(n===void 0||typeof n!="function")return!0;let i=n.prototype;return!(nt(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function Pn(e){return xe(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function mx(e){let n=0;for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&n++;return n}var fx=e=>{let n=typeof e;switch(n){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: ${n}`)}},Tn=new Set(["string","number","symbol"]),Ga=new Set(["string","number","bigint","boolean","symbol","undefined"]);function _e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Z(e,n,i){let s=new e._zod.constr(n??e._zod.def);return(!n||i?.parent)&&(s._zod.parent=e),s}function $(e){let n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if(n?.message!==void 0){if(n?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function gx(e){let n;return new Proxy({},{get(i,s,r){return n??(n=e()),Reflect.get(n,s,r)},set(i,s,r,o){return n??(n=e()),Reflect.set(n,s,r,o)},has(i,s){return n??(n=e()),Reflect.has(n,s)},deleteProperty(i,s){return n??(n=e()),Reflect.deleteProperty(n,s)},ownKeys(i){return n??(n=e()),Reflect.ownKeys(n)},getOwnPropertyDescriptor(i,s){return n??(n=e()),Reflect.getOwnPropertyDescriptor(n,s)},defineProperty(i,s,r){return n??(n=e()),Reflect.defineProperty(n,s,r)}})}function x(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function qa(e){return Object.keys(e).filter(n=>e[n]._zod.optin!==void 0&&e[n]._zod.optout==="optional")}var En={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]},zn={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function yx(e,n){let i=e._zod.def,s=i.checks;if(s&&s.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o={};return tt(o,e,Br(e,n)),Z(e,we(i,{shape:o,checks:[]}))}function Br(e,n){let i=De(e),s=[];for(let r of Reflect.ownKeys(n)){if(!Object.getOwnPropertyDescriptor(i,r)?.enumerable)throw new Error(`Unrecognized key: "${String(r)}"`);n[r]&&s.push(r)}return s}function hx(e,n){let i=e._zod.def,s=i.checks;if(s&&s.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=new Set(Br(e,n)),a={};return tt(a,e,Reflect.ownKeys(De(e)).filter(u=>!o.has(u))),Z(e,we(i,{shape:a,checks:[]}))}function bx(e,n){if(!xe(n))throw new Error("Invalid input to extend: expected a plain object");let i=e._zod.def.checks;if(i&&i.length>0){let r=De(e);for(let o of Reflect.ownKeys(n))if(Object.getOwnPropertyDescriptor(r,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Z(e,we(e._zod.def,{shape:Tm(e,n)}))}function Tm(e,n){let i={};return tt(i,e,Reflect.ownKeys(De(e))),ux(i,n),i}function vx(e,n){if(!xe(n))throw new Error("Invalid input to safeExtend: expected a plain object");return Z(e,we(e._zod.def,{shape:Tm(e,n)}))}function xx(e,n){if(!n?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let i={};tt(i,e,Reflect.ownKeys(De(e))),tt(i,n,Reflect.ownKeys(De(n)));let s=we(e._zod.def,{shape:i,get catchall(){return n._zod.def.catchall},checks:n._zod.def.checks??[]});return Z(e,s)}function _x(e,n,i,s="partial"){let o=n._zod.def.checks;if(o&&o.length>0)throw new Error(`.${s}() cannot be used on object schemas containing refinements`);let u=i?new Set(Br(n,i)):void 0,c={};return tt(c,n,Reflect.ownKeys(De(n)),e&&((l,p)=>u&&!u.has(p)?l:new e({type:"optional",innerType:l}))),Z(n,we(n._zod.def,{shape:c,checks:[]}))}function $x(e,n,i){let s=i?new Set(Br(n,i)):void 0,r={};return tt(r,n,Reflect.ownKeys(De(n)),(o,a)=>s&&!s.has(a)?o:new e({type:"nonoptional",innerType:o})),Z(n,we(n._zod.def,{shape:r}))}function ue(e,n=0){if(e.aborted===!0)return!0;for(let i=n;i<e.issues.length;i++)if(e.issues[i]?.continue!==!0)return!0;return!1}function Wa(e,n=0){if(e.aborted===!0)return!0;for(let i=n;i<e.issues.length;i++)if(e.issues[i]?.continue===!1)return!0;return!1}function me(e,n){return n.map(i=>{var s;return(s=i).path??(s.path=[]),i.path.unshift(e),i})}function Pt(e){return typeof e=="string"?e:e?.message}function Gr(e,n,i){var s;for(let r=n;r<e.length;r++)(s=e[r]).schema??(s.schema=i)}function fe(e,n,i){var s;let r=e.inst?._zod?.traits;r?.has("$ZodType")&&(r.has("$ZodCheck")?(s=e).schema??(s.schema=e.inst):e.schema=e.inst);let o=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:Pt(e.inst?._zod.def?.error?.(e))??Pt(o?.(e))??Pt(n?.error?.(e))??Pt(i.customError?.(e))??Pt(i.localeError?.(e))??"Invalid input",u={};for(let c of Object.keys(e))c==="inst"||c==="schema"||c==="continue"||c==="input"||c==="__proto__"||(u[c]=e[c]);return u.path??(u.path=[]),u.message=a,n?.reportInput&&(u.input=e.input),u}function Rn(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}var kx=/[\uD800-\uDBFF]/;function rt(e){let n=e.length;if(!kx.test(e))return n;let i=n;for(let s=0;s<n-1;s++)(e.charCodeAt(s)&64512)===55296&&(e.charCodeAt(s+1)&64512)===56320&&(i--,s++);return i}function Cn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function _(e){let n=typeof e;switch(n){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let i=e;if(i&&Object.getPrototypeOf(i)!==Object.prototype&&"constructor"in i&&i.constructor)return i.constructor.name}}return n}function Ct(...e){let[n,i,s]=e;return typeof n=="string"?{message:n,code:"custom",input:i,inst:s}:{...n}}function wx(e){return Object.entries(e).filter(([n,i])=>Number.isNaN(Number.parseInt(n,10))).map(n=>n[1])}function Em(e){let n=atob(e),i=new Uint8Array(n.length);for(let s=0;s<n.length;s++)i[s]=n.charCodeAt(s);return i}function zm(e){let n="";for(let i=0;i<e.length;i++)n+=String.fromCharCode(e[i]);return btoa(n)}function Sx(e){let n=e.replace(/-/g,"+").replace(/_/g,"/"),i="=".repeat((4-n.length%4)%4);return Em(n+i)}function Ix(e){return zm(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Ax(e){let n=e.replace(/^0x/,"");if(n.length%2!==0)throw new Error("Invalid hex string length");let i=new Uint8Array(n.length/2);for(let s=0;s<n.length;s+=2)i[s/2]=Number.parseInt(n.slice(s,s+2),16);return i}function Px(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")}var Fa=class{constructor(...n){}};function Ka(e,n){for(let i in n){let s=Object.getOwnPropertyDescriptor(n,i);s.get?Object.defineProperty(e,i,{...s,enumerable:!1}):Ex(e,i,s.value)}}function Ve(e,n,i,s=!0){return Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:s,value:i}),i}function On(e,n,i){return Ve(e,n,i,!1)}function Tx(e,n){for(let i in e){let s=e[i];Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get(){return Ve(this,i,s(this))},set(r){Ve(this,i,r)}})}return n}function Ex(e,n,i){Object.defineProperty(e,n,{configurable:!0,get(){return this==null?i:Ve(this,n,i.bind(this))},set(s){Ve(this,n,s)}})}function zx(e,n){let i=Object.getPrototypeOf(e);return n in i?void 0:i}var La,Ze=!1,Rx={configurable:!0,get(){Ze=!0}};function D(e,n,i){let s=Object.getPrototypeOf(e._zod);if(n in s&&La!==e._zod){La=void 0;return}La=e._zod,Object.defineProperty(s,n,{configurable:!0,get(){Object.defineProperty(this,n,Rx);let r=Ze;Ze=!1;try{let o=i(this);return Ze?delete this[n]:Object.defineProperty(this,n,{configurable:!0,writable:!0,value:o}),Ze=Ze||r,o}catch(o){throw delete this[n],Ze=Ze||r,o}},set(r){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:r})}})}function Cx(e,n,i,s){let r=zx(e,n);r&&Object.defineProperty(r,n,{configurable:!0,get(){let o={configurable:!0,writable:!0,enumerable:s,value:void 0};return Object.defineProperty(this,n,o),o.value=i(this),Object.defineProperty(this,n,o),o.value},set(o){Object.defineProperty(this,n,{configurable:!0,writable:!0,enumerable:s,value:o})}})}var qr="~constantCatch";function Ha(e){let n=()=>e;return n[qr]=!0,n}var Rm,Qa=Object.freeze({status:"aborted"}),Ja={value:void 0,enumerable:!1},Cm="captureStackTrace"in Error?Error:null;function Ox(e){let n=Cm;if(n){let i=n.stackTraceLimit;if(typeof i=="number"){try{n.stackTraceLimit=0}catch{return Cm=null,new e}try{return new e}finally{n.stackTraceLimit=i}}}return new e}function y(e,n,i,s){let r={};function o(f){this.def=f,this.constr=d,this.traits=new Set}o.prototype=r;let a=i,u=a&&new WeakSet;function c(f,m){if(f._zod){if(f._zod.traits.has(e))return}else{Ja.value=new o(m);try{Object.defineProperty(f,"_zod",Ja)}finally{Ja.value=void 0}}if(f._zod.traits.add(e),n(f,m),u){let b=Object.getPrototypeOf(f),w=f._zod.constr.prototype,P=b;for(;P&&P!==w;)P=Object.getPrototypeOf(P);let S=P??b;u.has(S)||(u.add(S),Ka(S,a))}let g=d.prototype;for(let b in g)Object.prototype.hasOwnProperty.call(g,b)&&(b in f||(f[b]=g[b].bind(f)))}let l=s?.Parent??Object;class p extends l{}Object.defineProperty(p,"name",{value:e});function d(f){let m=s?.Parent?Ox(p):this;c(m,f);let g=m._zod.deferred;if(g){for(let w of g)w();m._zod.deferred=void 0}let b=globalThis.__zod_globalConfig?.postProcessor;return b&&b(m),m}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:f=>s?.Parent&&f instanceof s.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var Ya=Symbol("zod_brand"),ge=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Be=class extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}};(Rm=globalThis).__zod_globalConfig??(Rm.__zod_globalConfig={});var ee=globalThis.__zod_globalConfig;function J(e){return e&&Object.assign(ee,e),ee}function jx(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Et,2)),e.message}function Dx(e){this._zod.message=e}var Nx={get:jx,set:Dx,enumerable:!0,configurable:!0},es={value:void 0,enumerable:!1},Om=new WeakSet([Object.prototype,Error.prototype]),jm=(e,n)=>{e.name="$ZodError",es.value=n,Object.defineProperty(e,"issues",es),es.value=void 0,Object.defineProperty(e,"message",Nx);let i=Object.getPrototypeOf(e);Om.has(i)||(Om.add(i),Object.defineProperty(i,"toString",{configurable:!0,enumerable:!1,get(){let s=()=>this.message;return Object.defineProperty(this,"toString",{value:s,configurable:!0,writable:!0}),s},set(s){Object.defineProperty(this,"toString",{value:s,configurable:!0,writable:!0})}}))},ts=y("$ZodError",jm),ye=y("$ZodError",jm,void 0,{Parent:Error});function Ux(e,n,i){return Object.prototype.hasOwnProperty.call(e,n)||(n==="__proto__"?Object.defineProperty(e,n,{value:i(),writable:!0,enumerable:!0,configurable:!0}):e[n]=i()),e[n]}function jn(e,n=i=>i.message){let i={},s=[];for(let r of e.issues)r.path.length>0?Ux(i,r.path[0],()=>[]).push(n(r)):s.push(n(r));return{formErrors:s,fieldErrors:i}}function Dn(e,n=i=>i.message){let i={_errors:[]},s=(r,o=[])=>{for(let a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(u=>s({issues:u},[...o,...a.path]));else if(a.code==="invalid_key")s({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")s({issues:a.issues},[...o,...a.path]);else{let u=[...o,...a.path];if(u.length===0)i._errors.push(n(a));else{let c=i,l=0;for(;l<u.length;){let p=u[l],d=l===u.length-1;if(p==="_errors"){d&&c._errors.push(n(a)),l++;continue}Object.prototype.hasOwnProperty.call(c,p)||Object.defineProperty(c,p,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let f=c[p];d&&f._errors.push(n(a)),c=f,l++}}}};return s(e),i}function ns(e,n=i=>i.message){let i={errors:[]},s=(r,o=[])=>{var a;for(let u of r.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(c=>s({issues:c},[...o,...u.path]));else if(u.code==="invalid_key")s({issues:u.issues},[...o,...u.path]);else if(u.code==="invalid_element")s({issues:u.issues},[...o,...u.path]);else{let c=[...o,...u.path];if(c.length===0){i.errors.push(n(u));continue}let l=i,p=0;for(;p<c.length;){let d=c[p],f=p===c.length-1;typeof d=="string"?(l.properties??(l.properties={}),Object.prototype.hasOwnProperty.call(l.properties,d)||Object.defineProperty(l.properties,d,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),l=l.properties[d]):(l.items??(l.items=[]),(a=l.items)[d]??(a[d]={errors:[]}),l=l.items[d]),f&&l.errors.push(n(u)),p++}}};return s(e),i}function Dm(e){let n=[],i=e.map(s=>typeof s=="object"?s.key:s);for(let s of i)typeof s=="number"?n.push(`[${s}]`):typeof s=="symbol"?n.push(`[${JSON.stringify(String(s))}]`):/[^\w$]/.test(s)?n.push(`[${JSON.stringify(s)}]`):(n.length&&n.push("."),n.push(s));return n.join("")}function rs(e){let n=[],i=[...e.issues].sort((s,r)=>(s.path??[]).length-(r.path??[]).length);for(let s of i)n.push(`\u2716 ${s.message}`),s.path?.length&&n.push(` \u2192 at ${Dm(s.path)}`);return n.join(`
|
|
2
|
+
var Bv=Object.defineProperty;var Oe=(e,n)=>{for(var i in n)Bv(e,i,{get:n[i],enumerable:!0})};import{readFile as ET,writeFile as zT}from"node:fs/promises";import{execFile as Gv}from"node:child_process";import{mkdir as qv,readFile as Wv,rm as Kv,writeFile as Hv,chmod as Jv}from"node:fs/promises";import{homedir as Qv,platform as _m}from"node:os";import{dirname as Yv,join as $m}from"node:path";var wt="@50heads/mcp",St="default";function It(e,n,i){return new Promise(s=>{try{let r=Gv(e,n,{timeout:1e4},(o,a)=>{s({ok:!o,stdout:String(a??"")})});i!==void 0&&r.stdin?.end(i)}catch{s({ok:!1,stdout:""})}})}function Ur(){let e=process.env.XDG_CONFIG_HOME||$m(Qv(),".config");return $m(e,"50heads","credentials.json")}var Xv={name:"macOS Keychain",async read(){let e=await It("security",["find-generic-password","-a",St,"-s",wt,"-w"]);return e.ok&&e.stdout.trim()||null},async write(e){return(await It("security",["add-generic-password","-U","-a",St,"-s",wt,"-w",e])).ok},async remove(){await It("security",["delete-generic-password","-a",St,"-s",wt])}},ex={name:"Secret Service",async read(){let e=await It("secret-tool",["lookup","service",wt,"account",St]);return e.ok&&e.stdout.trim()||null},async write(e){return(await It("secret-tool",["store","--label=50heads MCP","service",wt,"account",St],e)).ok},async remove(){await It("secret-tool",["clear","service",wt,"account",St])}},Nr={name:"file",async read(){try{return await Wv(Ur(),"utf8")}catch{return null}},async write(e){let n=Ur();return await qv(Yv(n),{recursive:!0,mode:448}),await Hv(n,e,{mode:384}),await Jv(n,384).catch(()=>{}),!0},async remove(){await Kv(Ur(),{force:!0})}};function za(){return process.env.FIFTYHEADS_CREDENTIALS_STORE==="file"?[Nr]:_m()==="darwin"?[Xv,Nr]:_m()==="linux"?[ex,Nr]:[Nr]}async function At(){for(let e of za()){let n=await e.read();if(n)try{let i=JSON.parse(n);if(i.accessToken&&i.tokenEndpoint)return i}catch{}}return null}async function Lr(e){let n=JSON.stringify(e);for(let i of za())if(await i.write(n))return i.name;throw new Error("Could not save the sign-in anywhere.")}async function Ra(){for(let e of za())await e.remove()}var Oa="https://mcp.50heads.com/mcp",wm=["questions:read","questions:write","templates:read","account:read","webhooks:read","webhooks:write","apps:read","apps:write","organization:read","members:read","audit:read"];var km="urn:ietf:params:oauth:grant-type:device_code",de=class extends Error{};async function Mr(e){let n=await e.json().catch(()=>null);if(n===null)throw new de(`The sign-in server answered ${e.status} without JSON.`);return n}async function Sm(e,n=fetch,i="50heads"){let s=await n(new URL("/.well-known/oauth-authorization-server",e),{headers:{"user-agent":i,accept:"application/json"}});if(!s.ok)throw new de(`Could not reach ${e} (HTTP ${s.status}).`);let r=await Mr(s);if(r.issuer.replace(/\/$/,"")!==e.replace(/\/$/,""))throw new de(`The sign-in server says it is ${r.issuer}, not ${e}. Stopping.`);return r}function Ca(e){return new URLSearchParams(e)}async function ja(e){let n=e.fetchImpl??fetch,i=e.sleep??(m=>new Promise(g=>setTimeout(g,m))),s=e.client.userAgent,r=e.client.resource??Oa,o=await Sm(e.authUrl,n,s);if(!o.device_authorization_endpoint)throw new de("Signing in from the terminal is not available yet. Make an API key in the dashboard and set FIFTYHEADS_API_KEY instead.");let a=wm.join(" "),u=await At(),c=u?.issuer===o.issuer?u.clientId:"";if(!c){if(!o.registration_endpoint)throw new de("The sign-in server does not accept new clients.");let m=await n(o.registration_endpoint,{method:"POST",headers:{"user-agent":s,"content-type":"application/json",accept:"application/json"},body:JSON.stringify({client_name:e.client.name,application_type:"native",grant_types:[km,"refresh_token"],response_types:[],token_endpoint_auth_method:"none",redirect_uris:["http://127.0.0.1/callback"],scope:a,software_id:e.client.softwareId,software_version:e.client.version})}),g=await Mr(m);if(!m.ok||!g.client_id)throw new de(g.error_description??`Registration failed (HTTP ${m.status}).`);c=g.client_id}let l=await n(o.device_authorization_endpoint,{method:"POST",headers:{"user-agent":s,"content-type":"application/x-www-form-urlencoded",accept:"application/json"},body:Ca({client_id:c,scope:a,resource:r})}),p=await Mr(l);if(!l.ok||!p.device_code)throw new de(p.error_description??"Could not start signing in.");e.prompt({userCode:p.user_code,verificationUri:p.verification_uri,verificationUriComplete:p.verification_uri_complete,expiresIn:p.expires_in});let d=Math.max(1,p.interval??5)*1e3,f=Date.now()+p.expires_in*1e3;for(;Date.now()<f;){await i(d);let m=await n(o.token_endpoint,{method:"POST",headers:{"user-agent":s,"content-type":"application/x-www-form-urlencoded",accept:"application/json"},body:Ca({grant_type:km,device_code:p.device_code,client_id:c,resource:r})}),g=await Mr(m);if(m.ok&&g.access_token){let b={issuer:o.issuer,clientId:c,accessToken:g.access_token,refreshToken:g.refresh_token??null,expiresAt:Date.now()+(g.expires_in??3600)*1e3,scope:g.scope??a,tokenEndpoint:o.token_endpoint};return{credentials:b,store:await Lr(b)}}switch(g.error){case"authorization_pending":continue;case"slow_down":d+=5e3;continue;case"access_denied":throw new de("Sign-in was declined.");case"expired_token":throw new de("The code expired. Run login again.");default:throw new de(g.error_description??`Sign-in failed (${g.error??m.status}).`)}}throw new de("The code expired. Run login again.")}async function Da(e,n=fetch){let i=await At();if(!i)return null;if(i.expiresAt-Date.now()>6e4)return i.accessToken;if(!i.refreshToken)return null;let s=await n(i.tokenEndpoint,{method:"POST",headers:{"user-agent":e.userAgent,"content-type":"application/x-www-form-urlencoded",accept:"application/json"},body:Ca({grant_type:"refresh_token",refresh_token:i.refreshToken,client_id:i.clientId,resource:e.resource??Oa})}),r=await s.json().catch(()=>({}));return!s.ok||!r.access_token?null:(await Lr({...i,accessToken:r.access_token,refreshToken:r.refresh_token??i.refreshToken,expiresAt:Date.now()+(r.expires_in??3600)*1e3,scope:r.scope??i.scope}),r.access_token)}import{spawn as tx}from"node:child_process";import{platform as Na}from"node:os";function Ua(e){if(process.env.FIFTYHEADS_NO_BROWSER)return;let n=Na()==="darwin"?"open":Na()==="win32"?"cmd":"xdg-open",i=Na()==="win32"?["/c","start","",e]:[e];try{tx(n,i,{stdio:"ignore",detached:!0}).on("error",()=>{}).unref()}catch{}}var je="2026.1013.2",Fr=`50heads-cli/${je}`,k={ok:0,error:1,usage:2,auth:3,credits:4,invalid:5,notFound:6,unavailable:7,partial:8,approval:9,timeout:124};var t={};Oe(t,{$brand:()=>Ya,$input:()=>kc,$output:()=>$c,INVALID:()=>ce,NEVER:()=>Qa,TimePrecision:()=>Oc,ZodAny:()=>_p,ZodArray:()=>Sp,ZodBase64:()=>Lo,ZodBase64URL:()=>Mo,ZodBigInt:()=>pn,ZodBigIntFormat:()=>Vo,ZodBoolean:()=>ln,ZodCIDRv4:()=>No,ZodCIDRv6:()=>Uo,ZodCUID:()=>Eo,ZodCUID2:()=>zo,ZodCatch:()=>qp,ZodCodec:()=>vr,ZodCompileAsyncError:()=>Se,ZodCompileUnsupportedError:()=>N,ZodCreditCard:()=>mp,ZodCustom:()=>xr,ZodCustomStringFormat:()=>bt,ZodDate:()=>mr,ZodDefault:()=>Mp,ZodDiscriminatedUnion:()=>Ap,ZodE164:()=>Fo,ZodEmail:()=>Io,ZodEmoji:()=>Po,ZodEnum:()=>sn,ZodError:()=>hw,ZodExactOptional:()=>Wo,ZodFile:()=>Dp,ZodFirstPartyTypeKind:()=>ad,ZodFunction:()=>nd,ZodGUID:()=>Ao,ZodIBAN:()=>fp,ZodIPv4:()=>jo,ZodIPv6:()=>Do,ZodISODate:()=>Qe,ZodISODateTime:()=>Je,ZodISODuration:()=>Xe,ZodISOTime:()=>Ye,ZodInstanceOf:()=>od,ZodIntersection:()=>Pp,ZodIssueCode:()=>xw,ZodJWT:()=>Zo,ZodKSUID:()=>Oo,ZodLazy:()=>Xp,ZodLiteral:()=>jp,ZodMAC:()=>dp,ZodMap:()=>Cp,ZodNaN:()=>Kp,ZodNanoID:()=>To,ZodNever:()=>kp,ZodNonOptional:()=>Ko,ZodNull:()=>vp,ZodNullable:()=>Lp,ZodNumber:()=>cn,ZodNumberFormat:()=>vt,ZodObject:()=>gr,ZodOptional:()=>hr,ZodPipe:()=>br,ZodPrefault:()=>Zp,ZodPreprocess:()=>Hp,ZodPromise:()=>td,ZodReadonly:()=>Jp,ZodRealError:()=>he,ZodRecord:()=>an,ZodSet:()=>Op,ZodString:()=>un,ZodStringFormat:()=>G,ZodSuccess:()=>Gp,ZodSymbol:()=>hp,ZodTemplateLiteral:()=>Yp,ZodTransform:()=>Np,ZodTuple:()=>Ep,ZodType:()=>j,ZodULID:()=>Ro,ZodURL:()=>dr,ZodUUID:()=>ze,ZodUndefined:()=>bp,ZodUnion:()=>yr,ZodUnknown:()=>$p,ZodVoid:()=>wp,ZodXID:()=>Co,ZodXor:()=>Ip,_ZodString:()=>So,_default:()=>Fp,_function:()=>ah,any:()=>Ny,array:()=>fr,base64:()=>hy,base64url:()=>by,bigint:()=>Ry,boolean:()=>yp,catch:()=>Wp,check:()=>sh,cidrv4:()=>gy,cidrv6:()=>yy,clone:()=>Z,codec:()=>nh,coerce:()=>ud,compile:()=>Ac,config:()=>J,core:()=>Me,creditCard:()=>xy,cuid:()=>sy,cuid2:()=>uy,currencyCode:()=>Iy,custom:()=>uh,date:()=>Ly,decode:()=>op,decodeAsync:()=>sp,deepPartial:()=>_h,describe:()=>ch,discriminatedUnion:()=>Gy,e164:()=>vy,email:()=>Qg,emoji:()=>oy,encode:()=>ip,encodeAsync:()=>ap,endsWith:()=>Kt,enum:()=>Go,exactOptional:()=>Up,file:()=>Yy,flattenError:()=>jn,float32:()=>Py,float64:()=>Ty,formatError:()=>Dn,fromJSONSchema:()=>vh,function:()=>ah,getDiscriminatedOption:()=>Ju,getErrorMap:()=>$w,globalRegistry:()=>ne,gt:()=>Te,gte:()=>ve,guid:()=>Yg,hash:()=>Ay,hex:()=>Sy,hostname:()=>wy,httpUrl:()=>iy,iban:()=>_y,includes:()=>qt,input:()=>kh,instanceof:()=>ph,int:()=>ko,int32:()=>Ey,int64:()=>Cy,intersection:()=>Tp,invertCodec:()=>rh,ipv4:()=>dy,ipv6:()=>fy,iso:()=>_r,json:()=>mh,jwt:()=>$y,keyof:()=>My,ksuid:()=>py,lazy:()=>ed,length:()=>mt,literal:()=>Qy,locales:()=>nr,looseObject:()=>Vy,looseRecord:()=>Wy,lowercase:()=>Bt,lt:()=>Pe,lte:()=>be,mac:()=>my,map:()=>Ky,maxLength:()=>dt,maxSize:()=>qe,memoizer:()=>er,meta:()=>lh,mime:()=>Jt,minLength:()=>Le,minSize:()=>Ee,multipleOf:()=>Ge,nan:()=>th,nanoid:()=>ay,nativeEnum:()=>Jy,negative:()=>po,never:()=>Bo,nonnegative:()=>fo,nonoptional:()=>Bp,nonpositive:()=>mo,normalize:()=>Qt,null:()=>xp,nullable:()=>pr,nullish:()=>Xy,number:()=>gp,object:()=>Fy,optional:()=>yt,output:()=>wh,overwrite:()=>Ie,parse:()=>ep,parseAsync:()=>tp,partialRecord:()=>qy,pipe:()=>wo,positive:()=>lo,prefault:()=>Vp,preprocess:()=>fh,prettifyError:()=>rs,promise:()=>oh,properties:()=>Ht,property:()=>go,readonly:()=>Qp,record:()=>Rp,refine:()=>rd,regex:()=>Vt,regexes:()=>$e,registry:()=>Li,safeDecode:()=>cp,safeDecodeAsync:()=>pp,safeEncode:()=>up,safeEncodeAsync:()=>lp,safeParse:()=>np,safeParseAsync:()=>rp,set:()=>Hy,setErrorMap:()=>_w,size:()=>pt,slugify:()=>tn,startsWith:()=>Wt,strictObject:()=>Zy,string:()=>lr,stringFormat:()=>ky,stringbool:()=>dh,success:()=>eh,superRefine:()=>id,symbol:()=>jy,templateLiteral:()=>ih,toJSONSchema:()=>vo,toLowerCase:()=>Xt,toUpperCase:()=>en,toZod:()=>In,transform:()=>qo,treeifyError:()=>ns,trim:()=>Yt,tuple:()=>zp,uint32:()=>zy,uint64:()=>Oy,ulid:()=>cy,undefined:()=>Dy,union:()=>dn,unknown:()=>gt,uppercase:()=>Gt,url:()=>ry,util:()=>v,uuid:()=>Xg,uuidv4:()=>ey,uuidv6:()=>ty,uuidv7:()=>ny,validate:()=>Nn,validateAsync:()=>Un,void:()=>Uy,withParser:()=>Mi,xid:()=>ly,xor:()=>By});var Me={};Oe(Me,{$ZodAny:()=>Zu,$ZodArray:()=>Wu,$ZodAsyncError:()=>ge,$ZodBase64:()=>Eu,$ZodBase64URL:()=>zu,$ZodBigInt:()=>Si,$ZodBigIntFormat:()=>Uu,$ZodBoolean:()=>Kn,$ZodCIDRv4:()=>Pu,$ZodCIDRv6:()=>Tu,$ZodCUID:()=>yu,$ZodCUID2:()=>hu,$ZodCatch:()=>dc,$ZodCheck:()=>q,$ZodCheckBigIntFormat:()=>Vs,$ZodCheckEndsWith:()=>tu,$ZodCheckGreaterThan:()=>ci,$ZodCheckIncludes:()=>Xs,$ZodCheckLengthEquals:()=>Hs,$ZodCheckLessThan:()=>ui,$ZodCheckLowerCase:()=>Qs,$ZodCheckMaxLength:()=>Ws,$ZodCheckMaxSize:()=>Bs,$ZodCheckMimeType:()=>iu,$ZodCheckMinLength:()=>Ks,$ZodCheckMinSize:()=>Gs,$ZodCheckMultipleOf:()=>Fs,$ZodCheckNumberFormat:()=>Zs,$ZodCheckOverwrite:()=>ou,$ZodCheckProperties:()=>ru,$ZodCheckProperty:()=>nu,$ZodCheckRegex:()=>Js,$ZodCheckSizeEquals:()=>qs,$ZodCheckStartsWith:()=>eu,$ZodCheckStringFormat:()=>Ut,$ZodCheckUpperCase:()=>Ys,$ZodCodec:()=>Jn,$ZodCreditCard:()=>Cu,$ZodCustom:()=>vc,$ZodCustomStringFormat:()=>Du,$ZodCyclicError:()=>Ri,$ZodDate:()=>qu,$ZodDefault:()=>uc,$ZodDiscriminatedUnion:()=>Qu,$ZodE164:()=>Ru,$ZodEmail:()=>lu,$ZodEmoji:()=>fu,$ZodEncodeError:()=>Be,$ZodEnum:()=>nc,$ZodError:()=>ts,$ZodExactOptional:()=>ac,$ZodFile:()=>ic,$ZodFunction:()=>hc,$ZodGUID:()=>uu,$ZodIBAN:()=>Ou,$ZodIPv4:()=>Su,$ZodIPv6:()=>Iu,$ZodISODate:()=>$u,$ZodISODateTime:()=>_u,$ZodISODuration:()=>wu,$ZodISOTime:()=>ku,$ZodIntersection:()=>Yu,$ZodJWT:()=>ju,$ZodKSUID:()=>xu,$ZodLazy:()=>Qn,$ZodLiteral:()=>rc,$ZodMAC:()=>Au,$ZodMap:()=>ec,$ZodNaN:()=>mc,$ZodNanoID:()=>gu,$ZodNever:()=>Bu,$ZodNonOptional:()=>lc,$ZodNull:()=>Fu,$ZodNullable:()=>sc,$ZodNumber:()=>wi,$ZodNumberFormat:()=>Nu,$ZodObject:()=>sf,$ZodObjectJIT:()=>Ku,$ZodOptional:()=>Ai,$ZodPipe:()=>Pi,$ZodPrefault:()=>cc,$ZodPreprocess:()=>fc,$ZodPromise:()=>bc,$ZodReadonly:()=>gc,$ZodRealError:()=>ye,$ZodRecord:()=>Xu,$ZodRegistry:()=>Ui,$ZodSet:()=>tc,$ZodString:()=>at,$ZodStringFormat:()=>V,$ZodSuccess:()=>pc,$ZodSymbol:()=>Lu,$ZodTemplateLiteral:()=>yc,$ZodTransform:()=>oc,$ZodTuple:()=>Ii,$ZodType:()=>R,$ZodULID:()=>bu,$ZodURL:()=>mu,$ZodUUID:()=>cu,$ZodUndefined:()=>Mu,$ZodUnion:()=>Hn,$ZodUnknown:()=>Vu,$ZodVoid:()=>Gu,$ZodXID:()=>vu,$ZodXor:()=>Hu,$brand:()=>Ya,$constructor:()=>y,$input:()=>kc,$output:()=>$c,Doc:()=>ot,INVALID:()=>ce,JSONSchema:()=>Kg,JSONSchemaGenerator:()=>xo,NEVER:()=>Qa,TimePrecision:()=>Oc,URL_BAD_FORMAT:()=>pu,URL_UNPARSEABLE:()=>Vn,ZodCompileAsyncError:()=>Se,ZodCompileUnsupportedError:()=>N,_any:()=>Qc,_array:()=>il,_base64:()=>ao,_base64url:()=>so,_bigint:()=>Bc,_boolean:()=>Zc,_catch:()=>ow,_check:()=>Rg,_cidrv4:()=>io,_cidrv6:()=>oo,_coercedBigint:()=>Gc,_coercedBoolean:()=>Vc,_coercedDate:()=>nl,_coercedNumber:()=>Dc,_coercedString:()=>Ec,_creditCard:()=>Rc,_cuid:()=>Qi,_cuid2:()=>Yi,_custom:()=>al,_date:()=>tl,_decode:()=>Qr,_decodeAsync:()=>Xr,_default:()=>nw,_discriminatedUnion:()=>Bk,_e164:()=>uo,_email:()=>Vi,_emoji:()=>Hi,_encode:()=>Jr,_encodeAsync:()=>Yr,_endsWith:()=>Kt,_enum:()=>Jk,_file:()=>ol,_float32:()=>Uc,_float64:()=>Lc,_gt:()=>Te,_gte:()=>ve,_guid:()=>Bi,_iban:()=>Cc,_includes:()=>qt,_int:()=>Nc,_int32:()=>Mc,_int64:()=>qc,_intersection:()=>Gk,_ipv4:()=>no,_ipv6:()=>ro,_isoDate:()=>or,_isoDateTime:()=>ir,_isoDuration:()=>sr,_isoTime:()=>ar,_jwt:()=>co,_ksuid:()=>to,_lazy:()=>cw,_length:()=>mt,_literal:()=>Yk,_lowercase:()=>Bt,_lt:()=>Pe,_lte:()=>be,_mac:()=>zc,_map:()=>Kk,_max:()=>be,_maxLength:()=>dt,_maxSize:()=>qe,_mime:()=>Jt,_min:()=>ve,_minLength:()=>Le,_minSize:()=>Ee,_multipleOf:()=>Ge,_nan:()=>rl,_nanoid:()=>Ji,_nativeEnum:()=>Qk,_negative:()=>po,_never:()=>Xc,_nonnegative:()=>fo,_nonoptional:()=>rw,_nonpositive:()=>mo,_normalize:()=>Qt,_null:()=>Jc,_nullable:()=>tw,_number:()=>jc,_optional:()=>ew,_overwrite:()=>Ie,_parse:()=>Ot,_parseAsync:()=>jt,_pipe:()=>aw,_positive:()=>lo,_promise:()=>lw,_properties:()=>Ht,_property:()=>go,_readonly:()=>sw,_record:()=>Wk,_refine:()=>sl,_regex:()=>Vt,_safeDecode:()=>ti,_safeDecodeAsync:()=>ri,_safeEncode:()=>ei,_safeEncodeAsync:()=>ni,_safeParse:()=>Dt,_safeParseAsync:()=>Nt,_set:()=>Hk,_size:()=>pt,_slugify:()=>tn,_startsWith:()=>Wt,_string:()=>Tc,_stringFormat:()=>ft,_stringbool:()=>pl,_success:()=>iw,_superRefine:()=>ul,_symbol:()=>Kc,_templateLiteral:()=>uw,_toLowerCase:()=>Xt,_toUpperCase:()=>en,_transform:()=>Xk,_trim:()=>Yt,_tuple:()=>qk,_uint32:()=>Fc,_uint64:()=>Wc,_ulid:()=>Xi,_undefined:()=>Hc,_union:()=>Zk,_unknown:()=>Yc,_uppercase:()=>Gt,_url:()=>rr,_uuid:()=>Gi,_uuidv4:()=>qi,_uuidv6:()=>Wi,_uuidv7:()=>Ki,_void:()=>el,_xid:()=>eo,_xor:()=>Vk,base64Charset:()=>vi,base64urlCharset:()=>Wn,canParseURL:()=>du,clone:()=>Z,compile:()=>Ac,compileFn:()=>Fi,config:()=>J,createStandardJSONSchemaMethod:()=>nn,createToJSONSchemaMethod:()=>ml,decode:()=>qx,decodeAsync:()=>Kx,describe:()=>cl,encode:()=>Gx,encodeAsync:()=>Wx,extractDefs:()=>Ke,finalize:()=>He,flattenError:()=>jn,formatError:()=>Dn,getDiscriminatedOption:()=>Ju,globalConfig:()=>ee,globalRegistry:()=>ne,handleUnrepresentable:()=>Q,initializeContext:()=>We,isBackEdge:()=>Oi,isRecursiveSchema:()=>Ci,isValidBase64:()=>qn,isValidBase64URL:()=>xi,isValidCIDRv6:()=>bi,isValidCreditCard:()=>_i,isValidIBAN:()=>$i,isValidIPv6:()=>Gn,isValidJWT:()=>ki,locales:()=>nr,memoizer:()=>er,mergeValues:()=>Lt,meta:()=>ll,parse:()=>Kr,parseAsync:()=>Hr,parseURLObject:()=>rf,prettifyError:()=>rs,process:()=>B,processSchema:()=>B,regexes:()=>$e,registry:()=>Li,safeDecode:()=>Jx,safeDecodeAsync:()=>Yx,safeEncode:()=>Hx,safeEncodeAsync:()=>Qx,safeParse:()=>Mx,safeParseAsync:()=>Fx,standardProps:()=>fi,stripTabAndNewline:()=>Bn,toDotPath:()=>Dm,toJSONSchema:()=>vo,toZod:()=>In,treeifyError:()=>ns,urlHostnameOk:()=>yi,urlProtocolOk:()=>hi,util:()=>v,validate:()=>Nn,validateAsync:()=>Un,validateURL:()=>gi,version:()=>au,withParser:()=>Mi});var v={};Oe(v,{BIGINT_FORMAT_RANGES:()=>zn,CONSTANT_CATCH:()=>qr,Class:()=>Fa,NUMBER_FORMAT_RANGES:()=>En,aborted:()=>ue,allowsEval:()=>Ba,assert:()=>ax,assertEqual:()=>nx,assertIs:()=>ix,assertNever:()=>ox,assertNotEqual:()=>rx,assignProp:()=>te,attachSchema:()=>Gr,base64ToUint8Array:()=>Em,base64urlToUint8Array:()=>Sx,cached:()=>zt,captureStackTrace:()=>Vr,cleanEnum:()=>wx,cleanRegex:()=>Ne,clone:()=>Z,cloneDef:()=>cx,codePointLength:()=>rt,constantCatch:()=>Ha,createTransparentProxy:()=>gx,defineLazy:()=>Za,defineLazyInternal:()=>D,derived:()=>Tx,esc:()=>se,escapeRegex:()=>_e,explicitlyAborted:()=>Wa,extend:()=>bx,finalizeIssue:()=>fe,floatSafeRemainder:()=>An,getElementAtPath:()=>lx,getEnumValues:()=>Tt,getLengthableOrigin:()=>Cn,getParsedType:()=>fx,getSizableOrigin:()=>Rn,hexToUint8Array:()=>Ax,hide:()=>On,installLazyProp:()=>Cx,isObject:()=>nt,isPlainObject:()=>xe,issue:()=>Ct,joinValues:()=>h,jsonStringifyReplacer:()=>Et,members:()=>Ka,merge:()=>xx,mergeDefs:()=>we,normalizeParams:()=>$,nullish:()=>Zr,numKeys:()=>mx,objectClone:()=>sx,omit:()=>hx,optionalKeys:()=>qa,own:()=>Ve,parsedType:()=>_,partial:()=>_x,pick:()=>yx,prefixIssues:()=>me,primitiveTypes:()=>Ga,promiseAllObject:()=>px,propertyKeyTypes:()=>Tn,randomString:()=>dx,rawShape:()=>Rt,required:()=>$x,safeExtend:()=>vx,shallowClone:()=>Pn,slugify:()=>Va,stringifyPrimitive:()=>x,toZod:()=>In,uint8ArrayToBase64:()=>zm,uint8ArrayToBase64url:()=>Ix,uint8ArrayToHex:()=>Px,unwrapMessage:()=>Pt});function nx(e){return e}function rx(e){return e}function In(){return e=>e}function ix(e){}function ox(e){throw new Error("Unexpected value in exhaustive check")}function ax(e){}function Tt(e){let n=Object.values(e).filter(s=>typeof s=="number");return Object.entries(e).filter(([s,r])=>n.indexOf(+s)===-1).map(([s,r])=>r)}function h(e,n="|"){return e.map(i=>x(i)).join(n)}function Et(e,n){return typeof n=="bigint"?n.toString():n}var Ma=class{constructor(n){this._getter=n,this._value=void 0}get value(){let n=this._getter;return n!==void 0&&(this._value=n(),this._getter=void 0),this._value}};function zt(e){return new Ma(e)}function Zr(e){return e==null}function Ne(e){let n=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(n,i)}function An(e,n){let i=e/n,s=Math.round(i),r=4*Number.EPSILON*Math.max(Math.abs(i),1);return Math.abs(i-s)<r?0:i-s}var Im=Symbol("evaluating");function Za(e,n,i){let s;Object.defineProperty(e,n,{get(){if(s!==Im)return s===void 0&&(s=Im,s=i()),s},set(r){Object.defineProperty(e,n,{value:r})},configurable:!0})}function sx(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function te(e,n,i){Object.defineProperty(e,n,{value:i,writable:!0,enumerable:!0,configurable:!0})}function Rt(e){let n=Object.getOwnPropertyDescriptor(e,"shape");return n?.get?n.get.raw:n?.value}function De(e){return Rt(e._zod.def)??e._zod.def.shape}function Am(e,n,i){Object.defineProperty(e,n,{get(){let s=i();return te(this,n,s),s},enumerable:!0,configurable:!0})}function Pm(e,n,i){n in e?te(e,n,i):e[n]=i}function tt(e,n,i,s){let r=De(n);for(let o of i){let a=Object.getOwnPropertyDescriptor(r,o);a.enumerable&&(a.get?Am(e,o,()=>{let u=n._zod.def.shape[o];return s?s(u,o):u}):Pm(e,o,s?s(a.value,o):a.value))}}function ux(e,n){for(let i of Reflect.ownKeys(n)){let s=Object.getOwnPropertyDescriptor(n,i);s.enumerable&&(s.get?Am(e,i,()=>n[i]):Pm(e,i,s.value))}}function we(...e){let n={};for(let i of e){let s=Object.getOwnPropertyDescriptors(i);Object.assign(n,s)}return Object.defineProperties({},n)}function cx(e){return we(e._zod.def)}function lx(e,n){return n?n.reduce((i,s)=>i?.[s],e):e}function px(e){let n=Object.keys(e),i=n.map(s=>e[s]);return Promise.all(i).then(s=>{let r={};for(let o=0;o<n.length;o++)r[n[o]]=s[o];return r})}function dx(e=10){let n="abcdefghijklmnopqrstuvwxyz",i="";for(let s=0;s<e;s++)i+=n[Math.floor(Math.random()*n.length)];return i}function se(e){return JSON.stringify(e)}function Va(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Vr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function nt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Ba=zt(()=>{if(ee.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function xe(e){if(nt(e)===!1)return!1;let n=e.constructor;if(n===void 0||typeof n!="function")return!0;let i=n.prototype;return!(nt(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function Pn(e){return xe(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function mx(e){let n=0;for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&n++;return n}var fx=e=>{let n=typeof e;switch(n){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: ${n}`)}},Tn=new Set(["string","number","symbol"]),Ga=new Set(["string","number","bigint","boolean","symbol","undefined"]);function _e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Z(e,n,i){let s=new e._zod.constr(n??e._zod.def);return(!n||i?.parent)&&(s._zod.parent=e),s}function $(e){let n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if(n?.message!==void 0){if(n?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function gx(e){let n;return new Proxy({},{get(i,s,r){return n??(n=e()),Reflect.get(n,s,r)},set(i,s,r,o){return n??(n=e()),Reflect.set(n,s,r,o)},has(i,s){return n??(n=e()),Reflect.has(n,s)},deleteProperty(i,s){return n??(n=e()),Reflect.deleteProperty(n,s)},ownKeys(i){return n??(n=e()),Reflect.ownKeys(n)},getOwnPropertyDescriptor(i,s){return n??(n=e()),Reflect.getOwnPropertyDescriptor(n,s)},defineProperty(i,s,r){return n??(n=e()),Reflect.defineProperty(n,s,r)}})}function x(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function qa(e){return Object.keys(e).filter(n=>e[n]._zod.optin!==void 0&&e[n]._zod.optout==="optional")}var En={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]},zn={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function yx(e,n){let i=e._zod.def,s=i.checks;if(s&&s.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o={};return tt(o,e,Br(e,n)),Z(e,we(i,{shape:o,checks:[]}))}function Br(e,n){let i=De(e),s=[];for(let r of Reflect.ownKeys(n)){if(!Object.getOwnPropertyDescriptor(i,r)?.enumerable)throw new Error(`Unrecognized key: "${String(r)}"`);n[r]&&s.push(r)}return s}function hx(e,n){let i=e._zod.def,s=i.checks;if(s&&s.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=new Set(Br(e,n)),a={};return tt(a,e,Reflect.ownKeys(De(e)).filter(u=>!o.has(u))),Z(e,we(i,{shape:a,checks:[]}))}function bx(e,n){if(!xe(n))throw new Error("Invalid input to extend: expected a plain object");let i=e._zod.def.checks;if(i&&i.length>0){let r=De(e);for(let o of Reflect.ownKeys(n))if(Object.getOwnPropertyDescriptor(r,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Z(e,we(e._zod.def,{shape:Tm(e,n)}))}function Tm(e,n){let i={};return tt(i,e,Reflect.ownKeys(De(e))),ux(i,n),i}function vx(e,n){if(!xe(n))throw new Error("Invalid input to safeExtend: expected a plain object");return Z(e,we(e._zod.def,{shape:Tm(e,n)}))}function xx(e,n){if(!n?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let i={};tt(i,e,Reflect.ownKeys(De(e))),tt(i,n,Reflect.ownKeys(De(n)));let s=we(e._zod.def,{shape:i,get catchall(){return n._zod.def.catchall},checks:n._zod.def.checks??[]});return Z(e,s)}function _x(e,n,i,s="partial"){let o=n._zod.def.checks;if(o&&o.length>0)throw new Error(`.${s}() cannot be used on object schemas containing refinements`);let u=i?new Set(Br(n,i)):void 0,c={};return tt(c,n,Reflect.ownKeys(De(n)),e&&((l,p)=>u&&!u.has(p)?l:new e({type:"optional",innerType:l}))),Z(n,we(n._zod.def,{shape:c,checks:[]}))}function $x(e,n,i){let s=i?new Set(Br(n,i)):void 0,r={};return tt(r,n,Reflect.ownKeys(De(n)),(o,a)=>s&&!s.has(a)?o:new e({type:"nonoptional",innerType:o})),Z(n,we(n._zod.def,{shape:r}))}function ue(e,n=0){if(e.aborted===!0)return!0;for(let i=n;i<e.issues.length;i++)if(e.issues[i]?.continue!==!0)return!0;return!1}function Wa(e,n=0){if(e.aborted===!0)return!0;for(let i=n;i<e.issues.length;i++)if(e.issues[i]?.continue===!1)return!0;return!1}function me(e,n){return n.map(i=>{var s;return(s=i).path??(s.path=[]),i.path.unshift(e),i})}function Pt(e){return typeof e=="string"?e:e?.message}function Gr(e,n,i){var s;for(let r=n;r<e.length;r++)(s=e[r]).schema??(s.schema=i)}function fe(e,n,i){var s;let r=e.inst?._zod?.traits;r?.has("$ZodType")&&(r.has("$ZodCheck")?(s=e).schema??(s.schema=e.inst):e.schema=e.inst);let o=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:Pt(e.inst?._zod.def?.error?.(e))??Pt(o?.(e))??Pt(n?.error?.(e))??Pt(i.customError?.(e))??Pt(i.localeError?.(e))??"Invalid input",u={};for(let c of Object.keys(e))c==="inst"||c==="schema"||c==="continue"||c==="input"||c==="__proto__"||(u[c]=e[c]);return u.path??(u.path=[]),u.message=a,n?.reportInput&&(u.input=e.input),u}function Rn(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}var kx=/[\uD800-\uDBFF]/;function rt(e){let n=e.length;if(!kx.test(e))return n;let i=n;for(let s=0;s<n-1;s++)(e.charCodeAt(s)&64512)===55296&&(e.charCodeAt(s+1)&64512)===56320&&(i--,s++);return i}function Cn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function _(e){let n=typeof e;switch(n){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let i=e;if(i&&Object.getPrototypeOf(i)!==Object.prototype&&"constructor"in i&&i.constructor)return i.constructor.name}}return n}function Ct(...e){let[n,i,s]=e;return typeof n=="string"?{message:n,code:"custom",input:i,inst:s}:{...n}}function wx(e){return Object.entries(e).filter(([n,i])=>Number.isNaN(Number.parseInt(n,10))).map(n=>n[1])}function Em(e){let n=atob(e),i=new Uint8Array(n.length);for(let s=0;s<n.length;s++)i[s]=n.charCodeAt(s);return i}function zm(e){let n="";for(let i=0;i<e.length;i++)n+=String.fromCharCode(e[i]);return btoa(n)}function Sx(e){let n=e.replace(/-/g,"+").replace(/_/g,"/"),i="=".repeat((4-n.length%4)%4);return Em(n+i)}function Ix(e){return zm(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Ax(e){let n=e.replace(/^0x/,"");if(n.length%2!==0)throw new Error("Invalid hex string length");let i=new Uint8Array(n.length/2);for(let s=0;s<n.length;s+=2)i[s/2]=Number.parseInt(n.slice(s,s+2),16);return i}function Px(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")}var Fa=class{constructor(...n){}};function Ka(e,n){for(let i in n){let s=Object.getOwnPropertyDescriptor(n,i);s.get?Object.defineProperty(e,i,{...s,enumerable:!1}):Ex(e,i,s.value)}}function Ve(e,n,i,s=!0){return Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:s,value:i}),i}function On(e,n,i){return Ve(e,n,i,!1)}function Tx(e,n){for(let i in e){let s=e[i];Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get(){return Ve(this,i,s(this))},set(r){Ve(this,i,r)}})}return n}function Ex(e,n,i){Object.defineProperty(e,n,{configurable:!0,get(){return this==null?i:Ve(this,n,i.bind(this))},set(s){Ve(this,n,s)}})}function zx(e,n){let i=Object.getPrototypeOf(e);return n in i?void 0:i}var La,Ze=!1,Rx={configurable:!0,get(){Ze=!0}};function D(e,n,i){let s=Object.getPrototypeOf(e._zod);if(n in s&&La!==e._zod){La=void 0;return}La=e._zod,Object.defineProperty(s,n,{configurable:!0,get(){Object.defineProperty(this,n,Rx);let r=Ze;Ze=!1;try{let o=i(this);return Ze?delete this[n]:Object.defineProperty(this,n,{configurable:!0,writable:!0,value:o}),Ze=Ze||r,o}catch(o){throw delete this[n],Ze=Ze||r,o}},set(r){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:r})}})}function Cx(e,n,i,s){let r=zx(e,n);r&&Object.defineProperty(r,n,{configurable:!0,get(){let o={configurable:!0,writable:!0,enumerable:s,value:void 0};return Object.defineProperty(this,n,o),o.value=i(this),Object.defineProperty(this,n,o),o.value},set(o){Object.defineProperty(this,n,{configurable:!0,writable:!0,enumerable:s,value:o})}})}var qr="~constantCatch";function Ha(e){let n=()=>e;return n[qr]=!0,n}var Rm,Qa=Object.freeze({status:"aborted"}),Ja={value:void 0,enumerable:!1},Cm="captureStackTrace"in Error?Error:null;function Ox(e){let n=Cm;if(n){let i=n.stackTraceLimit;if(typeof i=="number"){try{n.stackTraceLimit=0}catch{return Cm=null,new e}try{return new e}finally{n.stackTraceLimit=i}}}return new e}function y(e,n,i,s){let r={};function o(f){this.def=f,this.constr=d,this.traits=new Set}o.prototype=r;let a=i,u=a&&new WeakSet;function c(f,m){if(f._zod){if(f._zod.traits.has(e))return}else{Ja.value=new o(m);try{Object.defineProperty(f,"_zod",Ja)}finally{Ja.value=void 0}}if(f._zod.traits.add(e),n(f,m),u){let b=Object.getPrototypeOf(f),w=f._zod.constr.prototype,P=b;for(;P&&P!==w;)P=Object.getPrototypeOf(P);let S=P??b;u.has(S)||(u.add(S),Ka(S,a))}let g=d.prototype;for(let b in g)Object.prototype.hasOwnProperty.call(g,b)&&(b in f||(f[b]=g[b].bind(f)))}let l=s?.Parent??Object;class p extends l{}Object.defineProperty(p,"name",{value:e});function d(f){let m=s?.Parent?Ox(p):this;c(m,f);let g=m._zod.deferred;if(g){for(let w of g)w();m._zod.deferred=void 0}let b=globalThis.__zod_globalConfig?.postProcessor;return b&&b(m),m}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:f=>s?.Parent&&f instanceof s.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var Ya=Symbol("zod_brand"),ge=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Be=class extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}};(Rm=globalThis).__zod_globalConfig??(Rm.__zod_globalConfig={});var ee=globalThis.__zod_globalConfig;function J(e){return e&&Object.assign(ee,e),ee}function jx(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Et,2)),e.message}function Dx(e){this._zod.message=e}var Nx={get:jx,set:Dx,enumerable:!0,configurable:!0},es={value:void 0,enumerable:!1},Om=new WeakSet([Object.prototype,Error.prototype]),jm=(e,n)=>{e.name="$ZodError",es.value=n,Object.defineProperty(e,"issues",es),es.value=void 0,Object.defineProperty(e,"message",Nx);let i=Object.getPrototypeOf(e);Om.has(i)||(Om.add(i),Object.defineProperty(i,"toString",{configurable:!0,enumerable:!1,get(){let s=()=>this.message;return Object.defineProperty(this,"toString",{value:s,configurable:!0,writable:!0}),s},set(s){Object.defineProperty(this,"toString",{value:s,configurable:!0,writable:!0})}}))},ts=y("$ZodError",jm),ye=y("$ZodError",jm,void 0,{Parent:Error});function Ux(e,n,i){return Object.prototype.hasOwnProperty.call(e,n)||(n==="__proto__"?Object.defineProperty(e,n,{value:i(),writable:!0,enumerable:!0,configurable:!0}):e[n]=i()),e[n]}function jn(e,n=i=>i.message){let i={},s=[];for(let r of e.issues)r.path.length>0?Ux(i,r.path[0],()=>[]).push(n(r)):s.push(n(r));return{formErrors:s,fieldErrors:i}}function Dn(e,n=i=>i.message){let i={_errors:[]},s=(r,o=[])=>{for(let a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(u=>s({issues:u},[...o,...a.path]));else if(a.code==="invalid_key")s({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")s({issues:a.issues},[...o,...a.path]);else{let u=[...o,...a.path];if(u.length===0)i._errors.push(n(a));else{let c=i,l=0;for(;l<u.length;){let p=u[l],d=l===u.length-1;if(p==="_errors"){d&&c._errors.push(n(a)),l++;continue}Object.prototype.hasOwnProperty.call(c,p)||Object.defineProperty(c,p,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let f=c[p];d&&f._errors.push(n(a)),c=f,l++}}}};return s(e),i}function ns(e,n=i=>i.message){let i={errors:[]},s=(r,o=[])=>{var a;for(let u of r.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(c=>s({issues:c},[...o,...u.path]));else if(u.code==="invalid_key")s({issues:u.issues},[...o,...u.path]);else if(u.code==="invalid_element")s({issues:u.issues},[...o,...u.path]);else{let c=[...o,...u.path];if(c.length===0){i.errors.push(n(u));continue}let l=i,p=0;for(;p<c.length;){let d=c[p],f=p===c.length-1;typeof d=="string"?(l.properties??(l.properties={}),Object.prototype.hasOwnProperty.call(l.properties,d)||Object.defineProperty(l.properties,d,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),l=l.properties[d]):(l.items??(l.items=[]),(a=l.items)[d]??(a[d]={errors:[]}),l=l.items[d]),f&&l.errors.push(n(u)),p++}}};return s(e),i}function Dm(e){let n=[],i=e.map(s=>typeof s=="object"?s.key:s);for(let s of i)typeof s=="number"?n.push(`[${s}]`):typeof s=="symbol"?n.push(`[${JSON.stringify(String(s))}]`):/[^\w$]/.test(s)?n.push(`[${JSON.stringify(s)}]`):(n.length&&n.push("."),n.push(s));return n.join("")}function rs(e){let n=[],i=[...e.issues].sort((s,r)=>(s.path??[]).length-(r.path??[]).length);for(let s of i)n.push(`\u2716 ${s.message}`),s.path?.length&&n.push(` \u2192 at ${Dm(s.path)}`);return n.join(`
|
|
3
3
|
`)}function Wr(e,n){return{callee:n?.callee??e,Err:n?.Err}}var Ot=e=>{let n=(i,s,r,o)=>{let a=r?{...r,async:!1}:{async:!1},u=i._zod.run({value:s,issues:[]},a);if(u instanceof Promise)throw new ge;if(u.issues.length){let c=new(o?.Err??e)(u.issues.map(l=>fe(l,a,J())));throw Vr(c,o?.callee??n),c}return u.value};return n},Kr=Ot(ye),jt=e=>{let n=async(i,s,r,o)=>{let a=r?{...r,async:!0}:{async:!0},u=i._zod.run({value:s,issues:[]},a);if(u instanceof Promise&&(u=await u),u.issues.length){let c=new(o?.Err??e)(u.issues.map(l=>fe(l,a,J())));throw Vr(c,o?.callee??n),c}return u.value};return n},Hr=jt(ye),Dt=e=>(n,i,s)=>{let r=s?{...s,async:!1}:{async:!1},o=n._zod.run({value:i,issues:[]},r);if(o instanceof Promise)throw new ge;return o.issues.length?Nm(e,o.issues,r):{success:!0,data:o.value}},Mx=Dt(ye);function Nm(e,n,i){let s;return{success:!1,get error(){return s||(s=new e(n.map(r=>fe(r,i,J()))),n=void 0,i=void 0),s},set error(r){s=r,n=void 0,i=void 0}}}var Nt=e=>async(n,i,s)=>{let r=s?{...s,async:!0}:{async:!0},o=n._zod.run({value:i,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?Nm(e,o.issues,r):{success:!0,data:o.value}},Fx=Nt(ye),Zx=Symbol.for("zod.compile.invalid"),Vx=Symbol.for("zod.compile.fallback"),Nn=((e,n,i)=>{let s=e._zod.bag.validator;if(s!==void 0){if(s(n)!==Zx)return!0;if(s.definite===!0&&i===void 0)return!1}return Bx(e,n,i)});function Bx(e,n,i){let s=i?{...i,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},r=e._zod.bag.fallbackRun,o;if(r?(s[Vx]=!0,o=r({value:n,issues:[]},s)):o=e._zod.run({value:n,issues:[]},s),o instanceof Promise)throw new ge;return o.issues.length===0}var Un=async(e,n,i)=>{let s=i?{...i,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},r=e._zod.run({value:n,issues:[]},s);return r instanceof Promise&&(r=await r),r.issues.length===0},Jr=e=>{let n=Ot(e),i=(s,r,o,a)=>{let u=o?{...o,direction:"backward"}:{direction:"backward"};return n(s,r,u,Wr(i,a))};return i},Gx=Jr(ye),Qr=e=>{let n=Ot(e),i=(s,r,o,a)=>n(s,r,o,Wr(i,a));return i},qx=Qr(ye),Yr=e=>{let n=jt(e),i=async(s,r,o,a)=>{let u=o?{...o,direction:"backward"}:{direction:"backward"};return await n(s,r,u,Wr(i,a))};return i},Wx=Yr(ye),Xr=e=>{let n=jt(e),i=async(s,r,o,a)=>await n(s,r,o,Wr(i,a));return i},Kx=Xr(ye),ei=e=>(n,i,s)=>{let r=s?{...s,direction:"backward"}:{direction:"backward"};return Dt(e)(n,i,r)},Hx=ei(ye),ti=e=>(n,i,s)=>Dt(e)(n,i,s),Jx=ti(ye),ni=e=>async(n,i,s)=>{let r=s?{...s,direction:"backward"}:{direction:"backward"};return Nt(e)(n,i,r)},Qx=ni(ye),ri=e=>async(n,i,s)=>Nt(e)(n,i,s),Yx=ri(ye);var $e={};Oe($e,{anyString:()=>Es,base64:()=>_s,base64url:()=>$s,bigint:()=>Rs,boolean:()=>Cs,browserEmail:()=>a_,cidrv4:()=>vs,cidrv6:()=>xs,creditCard:()=>ii,cuid:()=>os,cuid2:()=>as,currencyCode:()=>Is,date:()=>As,datetime:()=>Ts,domain:()=>ws,duration:()=>ds,e164:()=>Ss,email:()=>fs,emoji:()=>gs,extendedDuration:()=>Xx,guid:()=>ms,hex:()=>Us,hostname:()=>ks,html5Email:()=>r_,httpProtocol:()=>Ln,iban:()=>oi,idnEmail:()=>o_,integer:()=>Mn,ipv4:()=>ys,ipv6:()=>hs,ksuid:()=>cs,lowercase:()=>Ds,mac:()=>bs,md5_base64:()=>l_,md5_base64url:()=>p_,md5_hex:()=>c_,nanoid:()=>ls,nanoidOfLength:()=>ps,null:()=>Os,number:()=>Ue,rfc5322Email:()=>i_,sha1_base64:()=>m_,sha1_base64url:()=>f_,sha1_hex:()=>d_,sha256_base64:()=>y_,sha256_base64url:()=>h_,sha256_hex:()=>g_,sha384_base64:()=>v_,sha384_base64url:()=>x_,sha384_hex:()=>b_,sha512_base64:()=>$_,sha512_base64url:()=>k_,sha512_hex:()=>__,string:()=>zs,time:()=>Ps,ulid:()=>ss,undefined:()=>js,unicodeEmail:()=>Um,uppercase:()=>Ns,uuid:()=>it,uuid4:()=>e_,uuid6:()=>t_,uuid7:()=>n_,xid:()=>us});var os=/^[cC][0-9a-z]{6,}$/,as=/^[0-9a-z]+$/,ss=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,us=/^[0-9a-vA-V]{20}$/,cs=/^[A-Za-z0-9]{27}$/,ls=/^[a-zA-Z0-9_-]{21}$/;function ps(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var ds=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Xx=/^[-+]?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)?)??$/,ms=/^([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})$/,it=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)$/,e_=it(4),t_=it(6),n_=it(7),fs=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,r_=/^[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])?)*$/,i_=/^(([^<>()\[\]\\.,;:\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,}))$/,Um=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,o_=Um,a_=/^[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])?)*$/,s_="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function gs(){return new RegExp(s_,"u")}var ys=/^(?:(?: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])$/,hs=/^(([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}|:))$/,bs=e=>{let n=_e(e??":");return new RegExp(`^(?:[0-9A-F]{2}${n}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${n}){5}[0-9a-f]{2}$`)},vs=/^((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])$/,xs=/^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,_s=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$s=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,ks=/^(?=.{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])?)*\.?$/,ws=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,Ln=/^https?$/,Ss=/^\+[1-9]\d{6,14}$/,ii=/^\d(?:[ -]?\d){11,18}$/,Is=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,oi=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,Lm="(?:(?:\\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])))";function u_(e){return new RegExp(`^${e}$`)}var As=u_(Lm);function is(e){let n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${n}:[0-5]\\d(?:\\.\\d+)?`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ps(e){return new RegExp(`^${is(e)}$`)}function Ts(e){let n=["Z"];e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${is({precision:e.precision,seconds:!0})}(?:${n.join("|")})`,s=e.local?`${i}|${is({precision:e.precision})}`:i;return new RegExp(`^${Lm}T(?:${s})$`)}var Es=/^[\s\S]{0,}$/,zs=e=>{let n=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},Rs=/^-?\d+n?$/,Mn=/^-?\d+$/,Ue=/^-?\d+(?:\.\d+)?$/,Cs=/^(?:true|false)$/i,Os=/^null$/i;var js=/^undefined$/i;var Ds=/^[^A-Z]*$/,Ns=/^[^a-z]*$/,Us=/^[0-9a-fA-F]*$/;function Fn(e,n){return new RegExp(`^[A-Za-z0-9+/]{${e}}${n}$`)}function Zn(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var c_=/^[0-9a-fA-F]{32}$/,l_=Fn(22,"=="),p_=Zn(22),d_=/^[0-9a-fA-F]{40}$/,m_=Fn(27,"="),f_=Zn(27),g_=/^[0-9a-fA-F]{64}$/,y_=Fn(43,"="),h_=Zn(43),b_=/^[0-9a-fA-F]{96}$/,v_=Fn(64,""),x_=Zn(64),__=/^[0-9a-fA-F]{128}$/,$_=Fn(86,"=="),k_=Zn(86);var q=y("$ZodCheck",(e,n)=>{var i;e._zod??(e._zod={}),e._zod.def=n,(i=e._zod).onattach??(i.onattach=[])}),Ls=e=>{let n=e.value;return!Zr(n)&&n.size!==void 0},Ms=e=>{let n=e.value;return!Zr(n)&&n.length!==void 0},ai={number:"number",bigint:"bigint",object:"date"},ui=y("$ZodCheckLessThan",(e,n)=>{q.init(e,n);let i=ai[typeof n.value];e._zod.check=s=>{(n.inclusive?s.value<=n.value:s.value<n.value)||s.issues.push({origin:ai[typeof s.value]??i,code:"too_big",maximum:typeof n.value=="object"?n.value.getTime():n.value,input:s.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),ci=y("$ZodCheckGreaterThan",(e,n)=>{q.init(e,n);let i=ai[typeof n.value];e._zod.check=s=>{(n.inclusive?s.value>=n.value:s.value>n.value)||s.issues.push({origin:ai[typeof s.value]??i,code:"too_small",minimum:typeof n.value=="object"?n.value.getTime():n.value,input:s.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),Fs=y("$ZodCheckMultipleOf",(e,n)=>{q.init(e,n),e._zod.check=i=>{if(typeof i.value!=typeof n.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?n.value!==BigInt(0)&&i.value%n.value===BigInt(0):An(i.value,n.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:n.value,input:i.value,inst:e,continue:!n.abort})}}),Zs=y("$ZodCheckNumberFormat",(e,n)=>{q.init(e,n),n.format=n.format||"float64";let i=n.format?.includes("int"),s=i?"int":"number",[r,o]=En[n.format];e._zod.check=a=>{let u=a.value;if(i){if(!Number.isInteger(u)){a.issues.push({expected:s,format:n.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?a.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!n.abort}):a.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!n.abort});return}}u<r&&a.issues.push({origin:"number",input:u,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!n.abort}),u>o&&a.issues.push({origin:"number",input:u,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!n.abort})}}),Vs=y("$ZodCheckBigIntFormat",(e,n)=>{q.init(e,n);let[i,s]=zn[n.format];e._zod.check=r=>{let o=r.value;o<i&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!n.abort}),o>s&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!n.abort})}}),Bs=y("$ZodCheckMaxSize",(e,n)=>{var i;q.init(e,n),(i=e._zod.def).when??(i.when=Ls),e._zod.check=s=>{let r=s.value;r.size<=n.maximum||s.issues.push({origin:Rn(r),code:"too_big",maximum:n.maximum,inclusive:!0,input:r,inst:e,continue:!n.abort})}}),Gs=y("$ZodCheckMinSize",(e,n)=>{var i;q.init(e,n),(i=e._zod.def).when??(i.when=Ls),e._zod.check=s=>{let r=s.value;r.size>=n.minimum||s.issues.push({origin:Rn(r),code:"too_small",minimum:n.minimum,inclusive:!0,input:r,inst:e,continue:!n.abort})}}),qs=y("$ZodCheckSizeEquals",(e,n)=>{var i;q.init(e,n),(i=e._zod.def).when??(i.when=Ls),e._zod.check=s=>{let r=s.value,o=r.size;if(o===n.size)return;let a=o>n.size;s.issues.push({origin:Rn(r),...a?{code:"too_big",maximum:n.size}:{code:"too_small",minimum:n.size},inclusive:!0,exact:!0,input:s.value,inst:e,continue:!n.abort})}}),Ws=y("$ZodCheckMaxLength",(e,n)=>{var i;q.init(e,n),(i=e._zod.def).when??(i.when=Ms),e._zod.check=s=>{let r=s.value,o=r.length;if((typeof r=="string"&&o>n.maximum?rt(r):o)<=n.maximum)return;let u=Cn(r);s.issues.push({origin:u,code:"too_big",maximum:n.maximum,inclusive:!0,input:r,inst:e,continue:!n.abort})}}),Ks=y("$ZodCheckMinLength",(e,n)=>{var i;q.init(e,n),(i=e._zod.def).when??(i.when=Ms),e._zod.check=s=>{let r=s.value,o=r.length;if((typeof r=="string"&&o>=n.minimum&&o<n.minimum*2?rt(r):o)>=n.minimum)return;let u=Cn(r);s.issues.push({origin:u,code:"too_small",minimum:n.minimum,inclusive:!0,input:r,inst:e,continue:!n.abort})}}),Hs=y("$ZodCheckLengthEquals",(e,n)=>{var i;q.init(e,n),(i=e._zod.def).when??(i.when=Ms),e._zod.check=s=>{let r=s.value,o=r.length,a=typeof r=="string"&&o>=n.length&&o<=n.length*2?rt(r):o;if(a===n.length)return;let u=Cn(r),c=a>n.length;s.issues.push({origin:u,...c?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:s.value,inst:e,continue:!n.abort})}}),Ut=y("$ZodCheckStringFormat",(e,n)=>{var i,s;q.init(e,n),n.pattern?(i=e._zod).check??(i.check=r=>{n.pattern.lastIndex=0,!n.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:n.format,input:r.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(s=e._zod).check??(s.check=()=>{})}),Js=y("$ZodCheckRegex",(e,n)=>{Ut.init(e,n),e._zod.check=i=>{n.pattern.lastIndex=0,!n.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),Qs=y("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=Ds),Ut.init(e,n)}),Ys=y("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=Ns),Ut.init(e,n)}),Xs=y("$ZodCheckIncludes",(e,n)=>{q.init(e,n);let i=_e(n.includes),s=new RegExp(typeof n.position=="number"?`^.{${n.position},}${i}`:i);n.pattern=s,e._zod.check=r=>{r.value.includes(n.includes,n.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:r.value,inst:e,continue:!n.abort})}}),eu=y("$ZodCheckStartsWith",(e,n)=>{q.init(e,n);let i=new RegExp(`^${_e(n.prefix)}.*`);n.pattern??(n.pattern=i),e._zod.check=s=>{s.value.startsWith(n.prefix)||s.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:s.value,inst:e,continue:!n.abort})}}),tu=y("$ZodCheckEndsWith",(e,n)=>{q.init(e,n);let i=new RegExp(`.*${_e(n.suffix)}$`);n.pattern??(n.pattern=i),e._zod.check=s=>{s.value.endsWith(n.suffix)||s.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:s.value,inst:e,continue:!n.abort})}});function si(e,n,i){e.issues.length&&n.issues.push(...me(i,e.issues))}var nu=y("$ZodCheckProperty",(e,n)=>{q.init(e,n),e._zod.check=i=>{let s=n.schema._zod.run({value:i.value[n.property],issues:[]},{});if(s instanceof Promise)return s.then(r=>si(r,i,n.property));si(s,i,n.property)}}),ru=y("$ZodCheckProperties",(e,n)=>{q.init(e,n),On(e,Symbol.iterator,function*(){yield e});let i;e._zod.check=s=>{if(s.value==null){s.issues.push({expected:"object",code:"invalid_type",input:s.value,inst:e});return}i??(i=Reflect.ownKeys(n.shape).map(a=>[a,n.shape[a]]));let r=s.value,o;for(let[a,u]of i){let c=u._zod.run({value:r[a],issues:[]},{});c instanceof Promise?(o??(o=[]),o.push(c.then(l=>si(l,s,a)))):si(c,s,a)}if(o)return Promise.all(o).then(()=>{})}}),iu=y("$ZodCheckMimeType",(e,n)=>{q.init(e,n);let i=new Set(n.mime);e._zod.check=s=>{i.has(s.value.type)||s.issues.push({code:"invalid_value",values:n.mime,input:s.value.type,inst:e,continue:!n.abort})}}),ou=y("$ZodCheckOverwrite",(e,n)=>{q.init(e,n),e._zod.check=i=>{i.value=n.tx(i.value)}});var ot=class{constructor(n=[],i={}){this.content=[],this.indent=0,this.args=n,this.closed=i}indented(n){this.indent+=1;try{n(this)}finally{this.indent-=1}}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}let s=n.split(`
|
|
4
4
|
`).filter(a=>a),r=Math.min(...s.map(a=>a.length-a.trimStart().length)),o=s.map(a=>a.slice(r)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a)}compile(){let n=Function,i=this?.content??[""];return new n(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
5
5
|
${i.join(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@50heads/cli",
|
|
3
|
-
"version": "2026.1013.
|
|
3
|
+
"version": "2026.1013.2",
|
|
4
4
|
"description": "50heads on the command line: ask verified people from scripts and CI, wait for the answers and read the results.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"50heads",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"esbuild": "^0.28.2",
|
|
38
38
|
"typescript": "^5.9.3",
|
|
39
39
|
"zod": "^4.6.5",
|
|
40
|
+
"@50heads/mcp": "2026.1013.1",
|
|
40
41
|
"@50heads/login": "0.0.0",
|
|
41
|
-
"@50heads/mcp": "2026.1009.1",
|
|
42
42
|
"@50heads/shared": "0.0.0",
|
|
43
43
|
"@50heads/tsconfig": "0.0.0"
|
|
44
44
|
},
|