octocode-cli 1.5.0 → 1.5.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/README.md +167 -90
- package/out/chunks/chunk-375ZNU3A.js +317 -0
- package/out/chunks/{chunk-V64AXUWB.js → chunk-AYILFPX4.js} +1 -1
- package/out/chunks/chunk-BRHVQB64.js +10 -0
- package/out/chunks/{command-help-specs-JZXVSLZ5.js → chunk-KWJUBVXJ.js} +1 -1
- package/out/chunks/chunk-OMXWZJBJ.js +100 -0
- package/out/chunks/command-help-specs-RVJK6V6M.js +8 -0
- package/out/chunks/commands-JFDCC4Q7.js +8 -0
- package/out/chunks/{help-P7TCOYAJ.js → help-H3WGUJO7.js} +1 -1
- package/out/chunks/main-help-BUTDD4IR.js +10 -0
- package/out/chunks/{spinner-URV2OX6O.js → spinner-DXD4JQIU.js} +1 -1
- package/out/chunks/tool-command-L6PVHUNS.js +8 -0
- package/out/octocode-cli.js +1 -1
- package/package.json +2 -2
- package/skills/octocode-brainstorming/scripts/tavily-search.mjs +1 -10
- package/skills/octocode-chrome-devtools/scripts/cdp-runner.mjs +0 -2
- package/skills/octocode-chrome-devtools/scripts/cdp-sandbox.mjs +1 -5
- package/skills/octocode-chrome-devtools/scripts/cdp-template.mjs +1 -10
- package/skills/octocode-chrome-devtools/scripts/open-browser.mjs +0 -3
- package/skills/octocode-chrome-devtools/scripts/sourcemap-resolver.mjs +1 -4
- package/skills/octocode-chrome-devtools/scripts/undercover.mjs +0 -2
- package/skills/octocode-engineer/SKILL.md +7 -33
- package/skills/octocode-engineer/references/cli-reference.md +5 -11
- package/skills/octocode-engineer/references/externals.md +0 -4
- package/skills/octocode-engineer/references/quality-indicators.md +10 -50
- package/skills/octocode-engineer/references/tool-workflows.md +10 -13
- package/skills/octocode-engineer/src/analysis/dependency-summary.test.ts +2 -2
- package/skills/octocode-engineer/src/ast/metrics.test.ts +2 -2
- package/skills/octocode-engineer/src/ast/search-main.ts +2 -15
- package/skills/octocode-engineer/src/ast/search.ts +1 -7
- package/skills/octocode-engineer/src/ast/tree-sitter.test.ts +4 -4
- package/skills/octocode-engineer/src/ast/tree-sitter.ts +2 -2
- package/skills/octocode-engineer/src/collectors/chains.ts +3 -10
- package/skills/octocode-engineer/src/collectors/prototype-pollution.ts +3 -3
- package/skills/octocode-engineer/src/collectors/security.ts +3 -3
- package/skills/octocode-engineer/src/common/ensure-deps.ts +3 -20
- package/skills/octocode-engineer/src/detectors/code-quality.ts +0 -1
- package/skills/octocode-engineer/src/index.test.ts +1 -1
- package/skills/octocode-engineer/src/index.ts +1 -11
- package/skills/octocode-engineer/src/pipeline/affected.ts +2 -7
- package/skills/octocode-engineer/src/pipeline/baseline.ts +2 -8
- package/skills/octocode-engineer/src/pipeline/cache.ts +2 -2
- package/skills/octocode-engineer/src/pipeline/config-loader.test.ts +1 -2
- package/skills/octocode-engineer/src/pipeline/config-loader.ts +0 -9
- package/skills/octocode-engineer/src/pipeline/create-options.ts +2 -15
- package/skills/octocode-engineer/src/pipeline/reporters.ts +2 -12
- package/skills/octocode-engineer/src/reporting/summary-md.test.ts +2 -2
- package/skills/octocode-engineer/src/run.ts +1 -7
- package/skills/octocode-engineer/src/types/constants.ts +0 -5
- package/skills/octocode-engineer/src/types/core.ts +0 -5
- package/skills/octocode-news/eslint.config.mjs +1 -6
- package/skills/octocode-news/src/rss-core.ts +2 -4
- package/skills/octocode-research/ecosystem.config.cjs +0 -31
- package/skills/octocode-research/package.json +1 -1
- package/skills/octocode-research/scripts/server.js +272 -230
- package/skills/octocode-research/src/__tests__/integration/circuitBreaker.test.ts +0 -24
- package/skills/octocode-research/src/__tests__/integration/routes.test.ts +0 -10
- package/skills/octocode-research/src/__tests__/integration/serverLifecycle.test.ts +5 -22
- package/skills/octocode-research/src/__tests__/integration/toolsRoutes.test.ts +0 -27
- package/skills/octocode-research/src/__tests__/unit/circuitBreaker.test.ts +0 -29
- package/skills/octocode-research/src/__tests__/unit/errorHandler.test.ts +1 -12
- package/skills/octocode-research/src/__tests__/unit/httpPreprocess.test.ts +1 -9
- package/skills/octocode-research/src/__tests__/unit/logger.test.ts +0 -7
- package/skills/octocode-research/src/__tests__/unit/queryParser.test.ts +1 -7
- package/skills/octocode-research/src/__tests__/unit/responseBuilder.test.ts +0 -11
- package/skills/octocode-research/src/__tests__/unit/retry.test.ts +1 -18
- package/skills/octocode-research/src/__tests__/unit/schemas.test.ts +2 -25
- package/skills/octocode-research/src/index.ts +0 -27
- package/skills/octocode-research/src/mcpCache.ts +3 -18
- package/skills/octocode-research/src/middleware/errorHandler.ts +1 -4
- package/skills/octocode-research/src/middleware/logger.ts +1 -6
- package/skills/octocode-research/src/middleware/queryParser.ts +3 -22
- package/skills/octocode-research/src/routes/github.ts +0 -11
- package/skills/octocode-research/src/routes/local.ts +0 -12
- package/skills/octocode-research/src/routes/lsp.ts +1 -10
- package/skills/octocode-research/src/routes/package.ts +0 -2
- package/skills/octocode-research/src/routes/prompts.ts +2 -32
- package/skills/octocode-research/src/routes/tools.ts +12 -177
- package/skills/octocode-research/src/server-init.ts +0 -32
- package/skills/octocode-research/src/server.ts +8 -37
- package/skills/octocode-research/src/types/errorGuards.ts +0 -15
- package/skills/octocode-research/src/types/guards.ts +6 -27
- package/skills/octocode-research/src/types/mcp.ts +1 -8
- package/skills/octocode-research/src/types/responses.ts +0 -15
- package/skills/octocode-research/src/utils/asyncTimeout.ts +1 -63
- package/skills/octocode-research/src/utils/circuitBreaker.ts +43 -166
- package/skills/octocode-research/src/utils/colors.ts +3 -17
- package/skills/octocode-research/src/utils/errorQueue.ts +6 -28
- package/skills/octocode-research/src/utils/logger.ts +11 -93
- package/skills/octocode-research/src/utils/resilience.ts +22 -77
- package/skills/octocode-research/src/utils/responseBuilder.ts +26 -78
- package/skills/octocode-research/src/utils/responseFactory.ts +0 -7
- package/skills/octocode-research/src/utils/responseParser.ts +11 -59
- package/skills/octocode-research/src/utils/retry.ts +12 -75
- package/skills/octocode-research/src/utils/routeFactory.ts +10 -61
- package/skills/octocode-research/src/utils/url.ts +0 -5
- package/skills/octocode-research/src/validation/httpPreprocess.ts +15 -61
- package/skills/octocode-research/src/validation/schemas.ts +14 -101
- package/skills/octocode-research/src/validation/toolCallSchema.ts +5 -65
- package/skills/octocode-research/tsdown.config.ts +2 -7
- package/skills/octocode-search-skill/SKILL.md +9 -2
- package/skills/octocode-search-skill/references/discovery-surfaces.md +2 -1
- package/skills/octocode-slides/scripts/navbridge.js +1 -14
- package/skills/octocode-slides/scripts/presenter.js +2 -61
- package/skills/octocode-stats/scripts/build_dashboard.mjs +1 -19
- package/assets/example.png +0 -0
- package/out/chunks/chunk-7476PETK.js +0 -309
- package/out/chunks/chunk-OQBJTZWK.js +0 -60
- package/out/chunks/chunk-UCZCF3BQ.js +0 -9
- package/out/chunks/commands-XBFPLHSQ.js +0 -8
- package/out/chunks/main-help-ULF5PAQY.js +0 -10
- package/out/chunks/tool-command-M6VA7P2F.js +0 -8
- package/skills/octocode-research/AGENTS.md +0 -349
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __createRequire } from 'module';
|
|
3
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
4
|
+
import { dirname as __dirname_fn } from 'path';
|
|
5
|
+
const require = __createRequire(import.meta.url);
|
|
6
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
7
|
+
const __dirname = __dirname_fn(__filename);
|
|
8
|
+
import{a as U}from"./chunk-BRHVQB64.js";import{a as j,b as Nt,c as de,d as mr,e as ao,f as z,g as se,i as Lt}from"./chunk-CVNNNSMQ.js";import{f as Vs,k as bm,l as km}from"./chunk-375ZNU3A.js";import{a as c,b as f,c as u}from"./chunk-AYILFPX4.js";import{b as x$,c as lt,d as w$}from"./chunk-YBBF4DTY.js";var Oh=x$((rE,Bo)=>{"use strict";var Qi=function(){};Qi.prototype=Object.create(null);var Xi=/; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu,Yi=/\\([\v\u0020-\u00ff])/gu,Ih=/^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u,qt={type:"",parameters:new Qi};Object.freeze(qt.parameters);Object.freeze(qt);function Th(e){if(typeof e!="string")throw new TypeError("argument header is required and must be a string");let n=e.indexOf(";"),o=n!==-1?e.slice(0,n).trim():e.trim();if(Ih.test(o)===!1)throw new TypeError("invalid media type");let r={type:o.toLowerCase(),parameters:new Qi};if(n===-1)return r;let t,i,s;for(Xi.lastIndex=n;i=Xi.exec(e);){if(i.index!==n)throw new TypeError("invalid parameter format");n+=i[0].length,t=i[1].toLowerCase(),s=i[2],s[0]==='"'&&(s=s.slice(1,s.length-1),Yi.test(s)&&(s=s.replace(Yi,"$1"))),r.parameters[t]=s}if(n!==e.length)throw new TypeError("invalid parameter format");return r}function Eh(e){if(typeof e!="string")return qt;let n=e.indexOf(";"),o=n!==-1?e.slice(0,n).trim():e.trim();if(Ih.test(o)===!1)return qt;let r={type:o.toLowerCase(),parameters:new Qi};if(n===-1)return r;let t,i,s;for(Xi.lastIndex=n;i=Xi.exec(e);){if(i.index!==n)return qt;n+=i[0].length,t=i[1].toLowerCase(),s=i[2],s[0]==='"'&&(s=s.slice(1,s.length-1),Yi.test(s)&&(s=s.replace(Yi,"$1"))),r.parameters[t]=s}return n!==e.length?qt:r}Bo.exports.default={parse:Th,safeParse:Eh};Bo.exports.parse=Th;Bo.exports.safeParse=Eh;Bo.exports.defaultContentType=qt});import tO from"node:fs";import oO from"node:path";import{spawnSync as Tx}from"node:child_process";import{existsSync as ts,readFileSync as Kh,writeFileSync as Xh,unlinkSync as Jh,statSync as qS,chmodSync as HS}from"node:fs";import{createCipheriv as KS,createDecipheriv as XS,randomBytes as Yh}from"node:crypto";import{existsSync as YS,mkdirSync as QS}from"node:fs";import{join as et}from"node:path";import rs from"node:os";import ex from"node:path";var b={};lt(b,{$brand:()=>Js,$input:()=>ml,$output:()=>pl,NEVER:()=>Gs,TimePrecision:()=>vl,ZodAny:()=>sd,ZodArray:()=>ud,ZodBase64:()=>Ri,ZodBase64URL:()=>Fi,ZodBigInt:()=>Ln,ZodBigIntFormat:()=>Vi,ZodBoolean:()=>Nn,ZodCIDRv4:()=>Li,ZodCIDRv6:()=>Ui,ZodCUID:()=>Oi,ZodCUID2:()=>Ai,ZodCatch:()=>Ad,ZodCodec:()=>Ro,ZodCustom:()=>Fo,ZodCustomStringFormat:()=>Dn,ZodDate:()=>Do,ZodDefault:()=>_d,ZodDiscriminatedUnion:()=>pd,ZodE164:()=>Zi,ZodEmail:()=>Ii,ZodEmoji:()=>Ti,ZodEnum:()=>zn,ZodError:()=>tS,ZodExactOptional:()=>xd,ZodFile:()=>kd,ZodFirstPartyTypeKind:()=>Gd,ZodFunction:()=>Zd,ZodGUID:()=>Eo,ZodIPv4:()=>ji,ZodIPv6:()=>Ni,ZodISODate:()=>Si,ZodISODateTime:()=>ki,ZodISODuration:()=>wi,ZodISOTime:()=>xi,ZodIntersection:()=>md,ZodIssueCode:()=>oS,ZodJWT:()=>Bi,ZodKSUID:()=>Di,ZodLazy:()=>Ud,ZodLiteral:()=>bd,ZodMAC:()=>Qu,ZodMap:()=>yd,ZodNaN:()=>Md,ZodNanoID:()=>Ei,ZodNever:()=>cd,ZodNonOptional:()=>Ki,ZodNull:()=>rd,ZodNullable:()=>Cd,ZodNumber:()=>jn,ZodNumberFormat:()=>Wt,ZodObject:()=>No,ZodOptional:()=>Hi,ZodPipe:()=>Uo,ZodPrefault:()=>Id,ZodPreprocess:()=>Dd,ZodPromise:()=>Fd,ZodReadonly:()=>jd,ZodRealError:()=>ze,ZodRecord:()=>An,ZodSet:()=>$d,ZodString:()=>Mn,ZodStringFormat:()=>ee,ZodSuccess:()=>Od,ZodSymbol:()=>nd,ZodTemplateLiteral:()=>Ld,ZodTransform:()=>Sd,ZodTuple:()=>fd,ZodType:()=>B,ZodULID:()=>zi,ZodURL:()=>Mo,ZodUUID:()=>Ye,ZodUndefined:()=>od,ZodUnion:()=>Lo,ZodUnknown:()=>ad,ZodVoid:()=>ld,ZodXID:()=>Mi,ZodXor:()=>dd,_ZodString:()=>Pi,_default:()=>Pd,_function:()=>uh,any:()=>Ff,array:()=>jo,base64:()=>wf,base64url:()=>Cf,bigint:()=>jf,boolean:()=>td,catch:()=>zd,check:()=>dh,cidrv4:()=>Sf,cidrv6:()=>xf,clone:()=>xe,codec:()=>sh,coerce:()=>Jd,config:()=>pe,core:()=>pt,cuid:()=>gf,cuid2:()=>ff,custom:()=>ph,date:()=>Bf,decode:()=>Ju,decodeAsync:()=>qu,describe:()=>mh,discriminatedUnion:()=>Hf,e164:()=>_f,email:()=>of,emoji:()=>pf,encode:()=>Gu,encodeAsync:()=>Wu,endsWith:()=>Sn,enum:()=>Wi,exactOptional:()=>wd,file:()=>nh,flattenError:()=>ho,float32:()=>Af,float64:()=>zf,formatError:()=>vo,fromJSONSchema:()=>bh,function:()=>uh,getErrorMap:()=>iS,globalRegistry:()=>ye,gt:()=>Ke,gte:()=>Ce,guid:()=>rf,hash:()=>Of,hex:()=>Ef,hostname:()=>Tf,httpUrl:()=>df,includes:()=>bn,instanceof:()=>fh,int:()=>Ci,int32:()=>Mf,int64:()=>Nf,intersection:()=>gd,invertCodec:()=>ah,ipv4:()=>$f,ipv6:()=>kf,iso:()=>On,json:()=>vh,jwt:()=>Pf,keyof:()=>Vf,ksuid:()=>yf,lazy:()=>Rd,length:()=>Gt,literal:()=>th,locales:()=>Co,looseObject:()=>Wf,looseRecord:()=>Xf,lowercase:()=>yn,lt:()=>He,lte:()=>Le,mac:()=>bf,map:()=>Yf,maxLength:()=>Vt,maxSize:()=>_t,meta:()=>gh,mime:()=>xn,minLength:()=>dt,minSize:()=>Xe,multipleOf:()=>Ct,nan:()=>ih,nanoid:()=>mf,nativeEnum:()=>eh,negative:()=>di,never:()=>Gi,nonnegative:()=>mi,nonoptional:()=>Ed,nonpositive:()=>pi,normalize:()=>wn,null:()=>id,nullable:()=>Ao,nullish:()=>oh,number:()=>ed,object:()=>Gf,optional:()=>Oo,overwrite:()=>qe,parse:()=>Fu,parseAsync:()=>Zu,partialRecord:()=>Kf,pipe:()=>_i,positive:()=>ui,prefault:()=>Td,preprocess:()=>yh,prettifyError:()=>ia,promise:()=>lh,property:()=>gi,readonly:()=>Nd,record:()=>vd,refine:()=>Bd,regex:()=>vn,regexes:()=>Ne,registry:()=>Br,safeDecode:()=>Ku,safeDecodeAsync:()=>Yu,safeEncode:()=>Hu,safeEncodeAsync:()=>Xu,safeParse:()=>Bu,safeParseAsync:()=>Vu,set:()=>Qf,setErrorMap:()=>rS,size:()=>Bt,slugify:()=>In,startsWith:()=>kn,strictObject:()=>Jf,string:()=>To,stringFormat:()=>If,stringbool:()=>hh,success:()=>rh,superRefine:()=>Vd,symbol:()=>Uf,templateLiteral:()=>ch,toJSONSchema:()=>yi,toLowerCase:()=>_n,toUpperCase:()=>Pn,transform:()=>qi,treeifyError:()=>ra,trim:()=>Cn,tuple:()=>hd,uint32:()=>Df,uint64:()=>Lf,ulid:()=>hf,undefined:()=>Rf,union:()=>Ji,unknown:()=>Jt,uppercase:()=>$n,url:()=>uf,util:()=>w,uuid:()=>sf,uuidv4:()=>af,uuidv6:()=>cf,uuidv7:()=>lf,void:()=>Zf,xid:()=>vf,xor:()=>qf});var pt={};lt(pt,{$ZodAny:()=>Mc,$ZodArray:()=>Uc,$ZodAsyncError:()=>We,$ZodBase64:()=>wc,$ZodBase64URL:()=>Cc,$ZodBigInt:()=>Dr,$ZodBigIntFormat:()=>Ec,$ZodBoolean:()=>ko,$ZodCIDRv4:()=>kc,$ZodCIDRv6:()=>Sc,$ZodCUID:()=>lc,$ZodCUID2:()=>uc,$ZodCatch:()=>ol,$ZodCheck:()=>oe,$ZodCheckBigIntFormat:()=>Ua,$ZodCheckEndsWith:()=>Xa,$ZodCheckGreaterThan:()=>Tr,$ZodCheckIncludes:()=>Ha,$ZodCheckLengthEquals:()=>Ga,$ZodCheckLessThan:()=>Ir,$ZodCheckLowerCase:()=>Wa,$ZodCheckMaxLength:()=>Ba,$ZodCheckMaxSize:()=>Ra,$ZodCheckMimeType:()=>Qa,$ZodCheckMinLength:()=>Va,$ZodCheckMinSize:()=>Fa,$ZodCheckMultipleOf:()=>Na,$ZodCheckNumberFormat:()=>La,$ZodCheckOverwrite:()=>ec,$ZodCheckProperty:()=>Ya,$ZodCheckRegex:()=>Ja,$ZodCheckSizeEquals:()=>Za,$ZodCheckStartsWith:()=>Ka,$ZodCheckStringFormat:()=>fn,$ZodCheckUpperCase:()=>qa,$ZodCodec:()=>xo,$ZodCustom:()=>dl,$ZodCustomStringFormat:()=>Ic,$ZodDate:()=>Lc,$ZodDefault:()=>Qc,$ZodDiscriminatedUnion:()=>Zc,$ZodE164:()=>_c,$ZodEmail:()=>ic,$ZodEmoji:()=>ac,$ZodEncodeError:()=>bt,$ZodEnum:()=>Wc,$ZodError:()=>fo,$ZodExactOptional:()=>Xc,$ZodFile:()=>Hc,$ZodFunction:()=>cl,$ZodGUID:()=>oc,$ZodIPv4:()=>yc,$ZodIPv6:()=>$c,$ZodISODate:()=>fc,$ZodISODateTime:()=>gc,$ZodISODuration:()=>vc,$ZodISOTime:()=>hc,$ZodIntersection:()=>Bc,$ZodJWT:()=>Pc,$ZodKSUID:()=>mc,$ZodLazy:()=>ul,$ZodLiteral:()=>qc,$ZodMAC:()=>bc,$ZodMap:()=>Gc,$ZodNaN:()=>rl,$ZodNanoID:()=>cc,$ZodNever:()=>jc,$ZodNonOptional:()=>tl,$ZodNull:()=>zc,$ZodNullable:()=>Yc,$ZodNumber:()=>Mr,$ZodNumberFormat:()=>Tc,$ZodObject:()=>Ym,$ZodObjectJIT:()=>Rc,$ZodOptional:()=>Nr,$ZodPipe:()=>Lr,$ZodPrefault:()=>el,$ZodPreprocess:()=>il,$ZodPromise:()=>ll,$ZodReadonly:()=>sl,$ZodRealError:()=>Ae,$ZodRecord:()=>Vc,$ZodRegistry:()=>Zr,$ZodSet:()=>Jc,$ZodString:()=>Zt,$ZodStringFormat:()=>Q,$ZodSuccess:()=>nl,$ZodSymbol:()=>Oc,$ZodTemplateLiteral:()=>al,$ZodTransform:()=>Kc,$ZodTuple:()=>jr,$ZodType:()=>R,$ZodULID:()=>dc,$ZodURL:()=>sc,$ZodUUID:()=>rc,$ZodUndefined:()=>Ac,$ZodUnion:()=>So,$ZodUnknown:()=>Dc,$ZodVoid:()=>Nc,$ZodXID:()=>pc,$ZodXor:()=>Fc,$brand:()=>Js,$constructor:()=>h,$input:()=>ml,$output:()=>pl,Doc:()=>bo,JSONSchema:()=>ef,JSONSchemaGenerator:()=>$i,NEVER:()=>Gs,TimePrecision:()=>vl,_any:()=>Ll,_array:()=>Gl,_base64:()=>si,_base64url:()=>ai,_bigint:()=>Ol,_boolean:()=>Tl,_catch:()=>Wk,_check:()=>Qg,_cidrv4:()=>ri,_cidrv6:()=>ii,_coercedBigint:()=>Al,_coercedBoolean:()=>El,_coercedDate:()=>Bl,_coercedNumber:()=>xl,_coercedString:()=>fl,_cuid:()=>Xr,_cuid2:()=>Yr,_custom:()=>Wl,_date:()=>Zl,_decode:()=>$r,_decodeAsync:()=>kr,_default:()=>Vk,_discriminatedUnion:()=>Ak,_e164:()=>ci,_email:()=>Vr,_emoji:()=>Hr,_encode:()=>yr,_encodeAsync:()=>br,_endsWith:()=>Sn,_enum:()=>Lk,_file:()=>Jl,_float32:()=>Cl,_float64:()=>_l,_gt:()=>Ke,_gte:()=>Ce,_guid:()=>_o,_includes:()=>bn,_int:()=>wl,_int32:()=>Pl,_int64:()=>zl,_intersection:()=>zk,_ipv4:()=>ni,_ipv6:()=>oi,_isoDate:()=>$l,_isoDateTime:()=>yl,_isoDuration:()=>kl,_isoTime:()=>bl,_jwt:()=>li,_ksuid:()=>ti,_lazy:()=>Xk,_length:()=>Gt,_literal:()=>Rk,_lowercase:()=>yn,_lt:()=>He,_lte:()=>Le,_mac:()=>hl,_map:()=>jk,_max:()=>Le,_maxLength:()=>Vt,_maxSize:()=>_t,_mime:()=>xn,_min:()=>Ce,_minLength:()=>dt,_minSize:()=>Xe,_multipleOf:()=>Ct,_nan:()=>Vl,_nanoid:()=>Kr,_nativeEnum:()=>Uk,_negative:()=>di,_never:()=>Rl,_nonnegative:()=>mi,_nonoptional:()=>Gk,_nonpositive:()=>pi,_normalize:()=>wn,_null:()=>Nl,_nullable:()=>Bk,_number:()=>Sl,_optional:()=>Zk,_overwrite:()=>qe,_parse:()=>dn,_parseAsync:()=>pn,_pipe:()=>qk,_positive:()=>ui,_promise:()=>Yk,_property:()=>gi,_readonly:()=>Hk,_record:()=>Dk,_refine:()=>ql,_regex:()=>vn,_safeDecode:()=>xr,_safeDecodeAsync:()=>Cr,_safeEncode:()=>Sr,_safeEncodeAsync:()=>wr,_safeParse:()=>mn,_safeParseAsync:()=>gn,_set:()=>Nk,_size:()=>Bt,_slugify:()=>In,_startsWith:()=>kn,_string:()=>gl,_stringFormat:()=>Tn,_stringbool:()=>Yl,_success:()=>Jk,_superRefine:()=>Hl,_symbol:()=>Dl,_templateLiteral:()=>Kk,_toLowerCase:()=>_n,_toUpperCase:()=>Pn,_transform:()=>Fk,_trim:()=>Cn,_tuple:()=>Mk,_uint32:()=>Il,_uint64:()=>Ml,_ulid:()=>Qr,_undefined:()=>jl,_union:()=>Ek,_unknown:()=>Ul,_uppercase:()=>$n,_url:()=>Po,_uuid:()=>Gr,_uuidv4:()=>Jr,_uuidv6:()=>Wr,_uuidv7:()=>qr,_void:()=>Fl,_xid:()=>ei,_xor:()=>Ok,clone:()=>xe,config:()=>pe,createStandardJSONSchemaMethod:()=>En,createToJSONSchemaMethod:()=>Ql,decode:()=>Y$,decodeAsync:()=>eb,describe:()=>Kl,encode:()=>X$,encodeAsync:()=>Q$,extractDefs:()=>It,finalize:()=>Tt,flattenError:()=>ho,formatError:()=>vo,globalConfig:()=>Ut,globalRegistry:()=>ye,initializeContext:()=>Pt,isValidBase64:()=>xc,isValidBase64URL:()=>qm,isValidJWT:()=>Hm,locales:()=>Co,meta:()=>Xl,parse:()=>hr,parseAsync:()=>vr,prettifyError:()=>ia,process:()=>K,regexes:()=>Ne,registry:()=>Br,safeDecode:()=>nb,safeDecodeAsync:()=>rb,safeEncode:()=>tb,safeEncodeAsync:()=>ob,safeParse:()=>sa,safeParseAsync:()=>aa,toDotPath:()=>Pm,toJSONSchema:()=>yi,treeifyError:()=>ra,util:()=>w,version:()=>tc});var Sm,Gs=Object.freeze({status:"aborted"});function h(e,n,o){function r(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),n(a,l);let d=s.prototype,p=Object.keys(d);for(let m=0;m<p.length;m++){let g=p[m];g in a||(a[g]=d[g].bind(a))}}let t=o?.Parent??Object;class i extends t{}Object.defineProperty(i,"name",{value:e});function s(a){var l;let d=o?.Parent?new i:this;r(d,a),(l=d._zod).deferred??(l.deferred=[]);for(let p of d._zod.deferred)p();return d}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>o?.Parent&&a instanceof o.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var Js=Symbol("zod_brand"),We=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},bt=class extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}};(Sm=globalThis).__zod_globalConfig??(Sm.__zod_globalConfig={});var Ut=globalThis.__zod_globalConfig;function pe(e){return e&&Object.assign(Ut,e),Ut}var w={};lt(w,{BIGINT_FORMAT_RANGES:()=>na,Class:()=>qs,NUMBER_FORMAT_RANGES:()=>ta,aborted:()=>wt,allowsEval:()=>Xs,assert:()=>T$,assertEqual:()=>C$,assertIs:()=>P$,assertNever:()=>I$,assertNotEqual:()=>_$,assignProp:()=>St,base64ToUint8Array:()=>wm,base64urlToUint8Array:()=>J$,cached:()=>ln,captureStackTrace:()=>fr,cleanEnum:()=>G$,cleanRegex:()=>uo,clone:()=>xe,cloneDef:()=>O$,createTransparentProxy:()=>N$,defineLazy:()=>V,esc:()=>gr,escapeRegex:()=>Be,explicitlyAborted:()=>oa,extend:()=>R$,finalizeIssue:()=>we,floatSafeRemainder:()=>Hs,getElementAtPath:()=>A$,getEnumValues:()=>lo,getLengthableOrigin:()=>go,getParsedType:()=>j$,getSizableOrigin:()=>mo,hexToUint8Array:()=>q$,isObject:()=>Rt,isPlainObject:()=>xt,issue:()=>un,joinValues:()=>y,jsonStringifyReplacer:()=>cn,merge:()=>Z$,mergeDefs:()=>ut,normalizeParams:()=>C,nullish:()=>kt,numKeys:()=>D$,objectClone:()=>E$,omit:()=>U$,optionalKeys:()=>ea,parsedType:()=>S,partial:()=>B$,pick:()=>L$,prefixIssues:()=>Oe,primitiveTypes:()=>Qs,promiseAllObject:()=>z$,propertyKeyTypes:()=>po,randomString:()=>M$,required:()=>V$,safeExtend:()=>F$,shallowClone:()=>Ys,slugify:()=>Ks,stringifyPrimitive:()=>k,uint8ArrayToBase64:()=>Cm,uint8ArrayToBase64url:()=>W$,uint8ArrayToHex:()=>H$,unwrapMessage:()=>co});function C$(e){return e}function _$(e){return e}function P$(e){}function I$(e){throw new Error("Unexpected value in exhaustive check")}function T$(e){}function lo(e){let n=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,t])=>n.indexOf(+r)===-1).map(([r,t])=>t)}function y(e,n="|"){return e.map(o=>k(o)).join(n)}function cn(e,n){return typeof n=="bigint"?n.toString():n}function ln(e){return{get value(){{let o=e();return Object.defineProperty(this,"value",{value:o}),o}throw new Error("cached value already set")}}}function kt(e){return e==null}function uo(e){let n=e.startsWith("^")?1:0,o=e.endsWith("$")?e.length-1:e.length;return e.slice(n,o)}function Hs(e,n){let o=e/n,r=Math.round(o),t=Number.EPSILON*Math.max(Math.abs(o),1);return Math.abs(o-r)<t?0:o-r}var xm=Symbol("evaluating");function V(e,n,o){let r;Object.defineProperty(e,n,{get(){if(r!==xm)return r===void 0&&(r=xm,r=o()),r},set(t){Object.defineProperty(e,n,{value:t})},configurable:!0})}function E$(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function St(e,n,o){Object.defineProperty(e,n,{value:o,writable:!0,enumerable:!0,configurable:!0})}function ut(...e){let n={};for(let o of e){let r=Object.getOwnPropertyDescriptors(o);Object.assign(n,r)}return Object.defineProperties({},n)}function O$(e){return ut(e._zod.def)}function A$(e,n){return n?n.reduce((o,r)=>o?.[r],e):e}function z$(e){let n=Object.keys(e),o=n.map(r=>e[r]);return Promise.all(o).then(r=>{let t={};for(let i=0;i<n.length;i++)t[n[i]]=r[i];return t})}function M$(e=10){let n="abcdefghijklmnopqrstuvwxyz",o="";for(let r=0;r<e;r++)o+=n[Math.floor(Math.random()*n.length)];return o}function gr(e){return JSON.stringify(e)}function Ks(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var fr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Rt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Xs=ln(()=>{if(Ut.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function xt(e){if(Rt(e)===!1)return!1;let n=e.constructor;if(n===void 0||typeof n!="function")return!0;let o=n.prototype;return!(Rt(o)===!1||Object.prototype.hasOwnProperty.call(o,"isPrototypeOf")===!1)}function Ys(e){return xt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function D$(e){let n=0;for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&n++;return n}var j$=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}`)}},po=new Set(["string","number","symbol"]),Qs=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Be(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function xe(e,n,o){let r=new e._zod.constr(n??e._zod.def);return(!n||o?.parent)&&(r._zod.parent=e),r}function C(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 N$(e){let n;return new Proxy({},{get(o,r,t){return n??(n=e()),Reflect.get(n,r,t)},set(o,r,t,i){return n??(n=e()),Reflect.set(n,r,t,i)},has(o,r){return n??(n=e()),Reflect.has(n,r)},deleteProperty(o,r){return n??(n=e()),Reflect.deleteProperty(n,r)},ownKeys(o){return n??(n=e()),Reflect.ownKeys(n)},getOwnPropertyDescriptor(o,r){return n??(n=e()),Reflect.getOwnPropertyDescriptor(n,r)},defineProperty(o,r,t){return n??(n=e()),Reflect.defineProperty(n,r,t)}})}function k(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function ea(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}var ta={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]},na={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function L$(e,n){let o=e._zod.def,r=o.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=ut(e._zod.def,{get shape(){let s={};for(let a in n){if(!(a in o.shape))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(s[a]=o.shape[a])}return St(this,"shape",s),s},checks:[]});return xe(e,i)}function U$(e,n){let o=e._zod.def,r=o.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=ut(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in n){if(!(a in o.shape))throw new Error(`Unrecognized key: "${a}"`);n[a]&&delete s[a]}return St(this,"shape",s),s},checks:[]});return xe(e,i)}function R$(e,n){if(!xt(n))throw new Error("Invalid input to extend: expected a plain object");let o=e._zod.def.checks;if(o&&o.length>0){let i=e._zod.def.shape;for(let s in n)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let t=ut(e._zod.def,{get shape(){let i={...e._zod.def.shape,...n};return St(this,"shape",i),i}});return xe(e,t)}function F$(e,n){if(!xt(n))throw new Error("Invalid input to safeExtend: expected a plain object");let o=ut(e._zod.def,{get shape(){let r={...e._zod.def.shape,...n};return St(this,"shape",r),r}});return xe(e,o)}function Z$(e,n){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let o=ut(e._zod.def,{get shape(){let r={...e._zod.def.shape,...n._zod.def.shape};return St(this,"shape",r),r},get catchall(){return n._zod.def.catchall},checks:n._zod.def.checks??[]});return xe(e,o)}function B$(e,n,o){let t=n._zod.def.checks;if(t&&t.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=ut(n._zod.def,{get shape(){let a=n._zod.def.shape,l={...a};if(o)for(let d in o){if(!(d in a))throw new Error(`Unrecognized key: "${d}"`);o[d]&&(l[d]=e?new e({type:"optional",innerType:a[d]}):a[d])}else for(let d in a)l[d]=e?new e({type:"optional",innerType:a[d]}):a[d];return St(this,"shape",l),l},checks:[]});return xe(n,s)}function V$(e,n,o){let r=ut(n._zod.def,{get shape(){let t=n._zod.def.shape,i={...t};if(o)for(let s in o){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);o[s]&&(i[s]=new e({type:"nonoptional",innerType:t[s]}))}else for(let s in t)i[s]=new e({type:"nonoptional",innerType:t[s]});return St(this,"shape",i),i}});return xe(n,r)}function wt(e,n=0){if(e.aborted===!0)return!0;for(let o=n;o<e.issues.length;o++)if(e.issues[o]?.continue!==!0)return!0;return!1}function oa(e,n=0){if(e.aborted===!0)return!0;for(let o=n;o<e.issues.length;o++)if(e.issues[o]?.continue===!1)return!0;return!1}function Oe(e,n){return n.map(o=>{var r;return(r=o).path??(r.path=[]),o.path.unshift(e),o})}function co(e){return typeof e=="string"?e:e?.message}function we(e,n,o){let r=e.message?e.message:co(e.inst?._zod.def?.error?.(e))??co(n?.error?.(e))??co(o.customError?.(e))??co(o.localeError?.(e))??"Invalid input",{inst:t,continue:i,input:s,...a}=e;return a.path??(a.path=[]),a.message=r,n?.reportInput&&(a.input=s),a}function mo(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function go(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function S(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 o=e;if(o&&Object.getPrototypeOf(o)!==Object.prototype&&"constructor"in o&&o.constructor)return o.constructor.name}}return n}function un(...e){let[n,o,r]=e;return typeof n=="string"?{message:n,code:"custom",input:o,inst:r}:{...n}}function G$(e){return Object.entries(e).filter(([n,o])=>Number.isNaN(Number.parseInt(n,10))).map(n=>n[1])}function wm(e){let n=atob(e),o=new Uint8Array(n.length);for(let r=0;r<n.length;r++)o[r]=n.charCodeAt(r);return o}function Cm(e){let n="";for(let o=0;o<e.length;o++)n+=String.fromCharCode(e[o]);return btoa(n)}function J$(e){let n=e.replace(/-/g,"+").replace(/_/g,"/"),o="=".repeat((4-n.length%4)%4);return wm(n+o)}function W$(e){return Cm(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function q$(e){let n=e.replace(/^0x/,"");if(n.length%2!==0)throw new Error("Invalid hex string length");let o=new Uint8Array(n.length/2);for(let r=0;r<n.length;r+=2)o[r/2]=Number.parseInt(n.slice(r,r+2),16);return o}function H$(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")}var qs=class{constructor(...n){}};var _m=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),e.message=JSON.stringify(n,cn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},fo=h("$ZodError",_m),Ae=h("$ZodError",_m,{Parent:Error});function ho(e,n=o=>o.message){let o={},r=[];for(let t of e.issues)t.path.length>0?(o[t.path[0]]=o[t.path[0]]||[],o[t.path[0]].push(n(t))):r.push(n(t));return{formErrors:r,fieldErrors:o}}function vo(e,n=o=>o.message){let o={_errors:[]},r=(t,i=[])=>{for(let s of t.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>r({issues:a},[...i,...s.path]));else if(s.code==="invalid_key")r({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")r({issues:s.issues},[...i,...s.path]);else{let a=[...i,...s.path];if(a.length===0)o._errors.push(n(s));else{let l=o,d=0;for(;d<a.length;){let p=a[d];d===a.length-1?(l[p]=l[p]||{_errors:[]},l[p]._errors.push(n(s))):l[p]=l[p]||{_errors:[]},l=l[p],d++}}}};return r(e),o}function ra(e,n=o=>o.message){let o={errors:[]},r=(t,i=[])=>{var s,a;for(let l of t.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(d=>r({issues:d},[...i,...l.path]));else if(l.code==="invalid_key")r({issues:l.issues},[...i,...l.path]);else if(l.code==="invalid_element")r({issues:l.issues},[...i,...l.path]);else{let d=[...i,...l.path];if(d.length===0){o.errors.push(n(l));continue}let p=o,m=0;for(;m<d.length;){let g=d[m],v=m===d.length-1;typeof g=="string"?(p.properties??(p.properties={}),(s=p.properties)[g]??(s[g]={errors:[]}),p=p.properties[g]):(p.items??(p.items=[]),(a=p.items)[g]??(a[g]={errors:[]}),p=p.items[g]),v&&p.errors.push(n(l)),m++}}};return r(e),o}function Pm(e){let n=[],o=e.map(r=>typeof r=="object"?r.key:r);for(let r of o)typeof r=="number"?n.push(`[${r}]`):typeof r=="symbol"?n.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?n.push(`[${JSON.stringify(r)}]`):(n.length&&n.push("."),n.push(r));return n.join("")}function ia(e){let n=[],o=[...e.issues].sort((r,t)=>(r.path??[]).length-(t.path??[]).length);for(let r of o)n.push(`\u2716 ${r.message}`),r.path?.length&&n.push(` \u2192 at ${Pm(r.path)}`);return n.join(`
|
|
9
|
+
`)}var dn=e=>(n,o,r,t)=>{let i=r?{...r,async:!1}:{async:!1},s=n._zod.run({value:o,issues:[]},i);if(s instanceof Promise)throw new We;if(s.issues.length){let a=new(t?.Err??e)(s.issues.map(l=>we(l,i,pe())));throw fr(a,t?.callee),a}return s.value},hr=dn(Ae),pn=e=>async(n,o,r,t)=>{let i=r?{...r,async:!0}:{async:!0},s=n._zod.run({value:o,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(t?.Err??e)(s.issues.map(l=>we(l,i,pe())));throw fr(a,t?.callee),a}return s.value},vr=pn(Ae),mn=e=>(n,o,r)=>{let t=r?{...r,async:!1}:{async:!1},i=n._zod.run({value:o,issues:[]},t);if(i instanceof Promise)throw new We;return i.issues.length?{success:!1,error:new(e??fo)(i.issues.map(s=>we(s,t,pe())))}:{success:!0,data:i.value}},sa=mn(Ae),gn=e=>async(n,o,r)=>{let t=r?{...r,async:!0}:{async:!0},i=n._zod.run({value:o,issues:[]},t);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>we(s,t,pe())))}:{success:!0,data:i.value}},aa=gn(Ae),yr=e=>(n,o,r)=>{let t=r?{...r,direction:"backward"}:{direction:"backward"};return dn(e)(n,o,t)},X$=yr(Ae),$r=e=>(n,o,r)=>dn(e)(n,o,r),Y$=$r(Ae),br=e=>async(n,o,r)=>{let t=r?{...r,direction:"backward"}:{direction:"backward"};return pn(e)(n,o,t)},Q$=br(Ae),kr=e=>async(n,o,r)=>pn(e)(n,o,r),eb=kr(Ae),Sr=e=>(n,o,r)=>{let t=r?{...r,direction:"backward"}:{direction:"backward"};return mn(e)(n,o,t)},tb=Sr(Ae),xr=e=>(n,o,r)=>mn(e)(n,o,r),nb=xr(Ae),wr=e=>async(n,o,r)=>{let t=r?{...r,direction:"backward"}:{direction:"backward"};return gn(e)(n,o,t)},ob=wr(Ae),Cr=e=>async(n,o,r)=>gn(e)(n,o,r),rb=Cr(Ae);var Ne={};lt(Ne,{base64:()=>xa,base64url:()=>_r,bigint:()=>Ea,boolean:()=>Aa,browserEmail:()=>pb,cidrv4:()=>ka,cidrv6:()=>Sa,cuid:()=>ca,cuid2:()=>la,date:()=>_a,datetime:()=>Ia,domain:()=>fb,duration:()=>ga,e164:()=>Ca,email:()=>ha,emoji:()=>va,extendedDuration:()=>ib,guid:()=>fa,hex:()=>hb,hostname:()=>gb,html5Email:()=>lb,httpProtocol:()=>wa,idnEmail:()=>db,integer:()=>Oa,ipv4:()=>ya,ipv6:()=>$a,ksuid:()=>pa,lowercase:()=>Da,mac:()=>ba,md5_base64:()=>yb,md5_base64url:()=>$b,md5_hex:()=>vb,nanoid:()=>ma,null:()=>za,number:()=>Pr,rfc5322Email:()=>ub,sha1_base64:()=>kb,sha1_base64url:()=>Sb,sha1_hex:()=>bb,sha256_base64:()=>wb,sha256_base64url:()=>Cb,sha256_hex:()=>xb,sha384_base64:()=>Pb,sha384_base64url:()=>Ib,sha384_hex:()=>_b,sha512_base64:()=>Eb,sha512_base64url:()=>Ob,sha512_hex:()=>Tb,string:()=>Ta,time:()=>Pa,ulid:()=>ua,undefined:()=>Ma,unicodeEmail:()=>Im,uppercase:()=>ja,uuid:()=>Ft,uuid4:()=>sb,uuid6:()=>ab,uuid7:()=>cb,xid:()=>da});var ca=/^[cC][0-9a-z]{6,}$/,la=/^[0-9a-z]+$/,ua=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,da=/^[0-9a-vA-V]{20}$/,pa=/^[A-Za-z0-9]{27}$/,ma=/^[a-zA-Z0-9_-]{21}$/,ga=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ib=/^[-+]?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)?)??$/,fa=/^([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})$/,Ft=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)$/,sb=Ft(4),ab=Ft(6),cb=Ft(7),ha=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,lb=/^[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])?)*$/,ub=/^(([^<>()\[\]\\.,;:\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,}))$/,Im=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,db=Im,pb=/^[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])?)*$/,mb="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function va(){return new RegExp(mb,"u")}var ya=/^(?:(?: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])$/,$a=/^(([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}|:))$/,ba=e=>{let n=Be(e??":");return new RegExp(`^(?:[0-9A-F]{2}${n}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${n}){5}[0-9a-f]{2}$`)},ka=/^((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])$/,Sa=/^(([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])$/,xa=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,_r=/^[A-Za-z0-9_-]*$/,gb=/^(?=.{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])?)*\.?$/,fb=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,wa=/^https?$/,Ca=/^\+[1-9]\d{6,14}$/,Tm="(?:(?:\\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])))",_a=new RegExp(`^${Tm}$`);function Em(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}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Pa(e){return new RegExp(`^${Em(e)}$`)}function Ia(e){let n=Em({precision:e.precision}),o=["Z"];e.local&&o.push(""),e.offset&&o.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${n}(?:${o.join("|")})`;return new RegExp(`^${Tm}T(?:${r})$`)}var Ta=e=>{let n=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},Ea=/^-?\d+n?$/,Oa=/^-?\d+$/,Pr=/^-?\d+(?:\.\d+)?$/,Aa=/^(?:true|false)$/i,za=/^null$/i;var Ma=/^undefined$/i;var Da=/^[^A-Z]*$/,ja=/^[^a-z]*$/,hb=/^[0-9a-fA-F]*$/;function yo(e,n){return new RegExp(`^[A-Za-z0-9+/]{${e}}${n}$`)}function $o(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var vb=/^[0-9a-fA-F]{32}$/,yb=yo(22,"=="),$b=$o(22),bb=/^[0-9a-fA-F]{40}$/,kb=yo(27,"="),Sb=$o(27),xb=/^[0-9a-fA-F]{64}$/,wb=yo(43,"="),Cb=$o(43),_b=/^[0-9a-fA-F]{96}$/,Pb=yo(64,""),Ib=$o(64),Tb=/^[0-9a-fA-F]{128}$/,Eb=yo(86,"=="),Ob=$o(86);var oe=h("$ZodCheck",(e,n)=>{var o;e._zod??(e._zod={}),e._zod.def=n,(o=e._zod).onattach??(o.onattach=[])}),Am={number:"number",bigint:"bigint",object:"date"},Ir=h("$ZodCheckLessThan",(e,n)=>{oe.init(e,n);let o=Am[typeof n.value];e._zod.onattach.push(r=>{let t=r._zod.bag,i=(n.inclusive?t.maximum:t.exclusiveMaximum)??Number.POSITIVE_INFINITY;n.value<i&&(n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value)}),e._zod.check=r=>{(n.inclusive?r.value<=n.value:r.value<n.value)||r.issues.push({origin:o,code:"too_big",maximum:typeof n.value=="object"?n.value.getTime():n.value,input:r.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),Tr=h("$ZodCheckGreaterThan",(e,n)=>{oe.init(e,n);let o=Am[typeof n.value];e._zod.onattach.push(r=>{let t=r._zod.bag,i=(n.inclusive?t.minimum:t.exclusiveMinimum)??Number.NEGATIVE_INFINITY;n.value>i&&(n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value)}),e._zod.check=r=>{(n.inclusive?r.value>=n.value:r.value>n.value)||r.issues.push({origin:o,code:"too_small",minimum:typeof n.value=="object"?n.value.getTime():n.value,input:r.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),Na=h("$ZodCheckMultipleOf",(e,n)=>{oe.init(e,n),e._zod.onattach.push(o=>{var r;(r=o._zod.bag).multipleOf??(r.multipleOf=n.value)}),e._zod.check=o=>{if(typeof o.value!=typeof n.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof o.value=="bigint"?o.value%n.value===BigInt(0):Hs(o.value,n.value)===0)||o.issues.push({origin:typeof o.value,code:"not_multiple_of",divisor:n.value,input:o.value,inst:e,continue:!n.abort})}}),La=h("$ZodCheckNumberFormat",(e,n)=>{oe.init(e,n),n.format=n.format||"float64";let o=n.format?.includes("int"),r=o?"int":"number",[t,i]=ta[n.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=n.format,a.minimum=t,a.maximum=i,o&&(a.pattern=Oa)}),e._zod.check=s=>{let a=s.value;if(o){if(!Number.isInteger(a)){s.issues.push({expected:r,format:n.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!n.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!n.abort});return}}a<t&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:t,inclusive:!0,inst:e,continue:!n.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!n.abort})}}),Ua=h("$ZodCheckBigIntFormat",(e,n)=>{oe.init(e,n);let[o,r]=na[n.format];e._zod.onattach.push(t=>{let i=t._zod.bag;i.format=n.format,i.minimum=o,i.maximum=r}),e._zod.check=t=>{let i=t.value;i<o&&t.issues.push({origin:"bigint",input:i,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!n.abort}),i>r&&t.issues.push({origin:"bigint",input:i,code:"too_big",maximum:r,inclusive:!0,inst:e,continue:!n.abort})}}),Ra=h("$ZodCheckMaxSize",(e,n)=>{var o;oe.init(e,n),(o=e._zod.def).when??(o.when=r=>{let t=r.value;return!kt(t)&&t.size!==void 0}),e._zod.onattach.push(r=>{let t=r._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<t&&(r._zod.bag.maximum=n.maximum)}),e._zod.check=r=>{let t=r.value;t.size<=n.maximum||r.issues.push({origin:mo(t),code:"too_big",maximum:n.maximum,inclusive:!0,input:t,inst:e,continue:!n.abort})}}),Fa=h("$ZodCheckMinSize",(e,n)=>{var o;oe.init(e,n),(o=e._zod.def).when??(o.when=r=>{let t=r.value;return!kt(t)&&t.size!==void 0}),e._zod.onattach.push(r=>{let t=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>t&&(r._zod.bag.minimum=n.minimum)}),e._zod.check=r=>{let t=r.value;t.size>=n.minimum||r.issues.push({origin:mo(t),code:"too_small",minimum:n.minimum,inclusive:!0,input:t,inst:e,continue:!n.abort})}}),Za=h("$ZodCheckSizeEquals",(e,n)=>{var o;oe.init(e,n),(o=e._zod.def).when??(o.when=r=>{let t=r.value;return!kt(t)&&t.size!==void 0}),e._zod.onattach.push(r=>{let t=r._zod.bag;t.minimum=n.size,t.maximum=n.size,t.size=n.size}),e._zod.check=r=>{let t=r.value,i=t.size;if(i===n.size)return;let s=i>n.size;r.issues.push({origin:mo(t),...s?{code:"too_big",maximum:n.size}:{code:"too_small",minimum:n.size},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!n.abort})}}),Ba=h("$ZodCheckMaxLength",(e,n)=>{var o;oe.init(e,n),(o=e._zod.def).when??(o.when=r=>{let t=r.value;return!kt(t)&&t.length!==void 0}),e._zod.onattach.push(r=>{let t=r._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<t&&(r._zod.bag.maximum=n.maximum)}),e._zod.check=r=>{let t=r.value;if(t.length<=n.maximum)return;let s=go(t);r.issues.push({origin:s,code:"too_big",maximum:n.maximum,inclusive:!0,input:t,inst:e,continue:!n.abort})}}),Va=h("$ZodCheckMinLength",(e,n)=>{var o;oe.init(e,n),(o=e._zod.def).when??(o.when=r=>{let t=r.value;return!kt(t)&&t.length!==void 0}),e._zod.onattach.push(r=>{let t=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>t&&(r._zod.bag.minimum=n.minimum)}),e._zod.check=r=>{let t=r.value;if(t.length>=n.minimum)return;let s=go(t);r.issues.push({origin:s,code:"too_small",minimum:n.minimum,inclusive:!0,input:t,inst:e,continue:!n.abort})}}),Ga=h("$ZodCheckLengthEquals",(e,n)=>{var o;oe.init(e,n),(o=e._zod.def).when??(o.when=r=>{let t=r.value;return!kt(t)&&t.length!==void 0}),e._zod.onattach.push(r=>{let t=r._zod.bag;t.minimum=n.length,t.maximum=n.length,t.length=n.length}),e._zod.check=r=>{let t=r.value,i=t.length;if(i===n.length)return;let s=go(t),a=i>n.length;r.issues.push({origin:s,...a?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!n.abort})}}),fn=h("$ZodCheckStringFormat",(e,n)=>{var o,r;oe.init(e,n),e._zod.onattach.push(t=>{let i=t._zod.bag;i.format=n.format,n.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(n.pattern))}),n.pattern?(o=e._zod).check??(o.check=t=>{n.pattern.lastIndex=0,!n.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:n.format,input:t.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(r=e._zod).check??(r.check=()=>{})}),Ja=h("$ZodCheckRegex",(e,n)=>{fn.init(e,n),e._zod.check=o=>{n.pattern.lastIndex=0,!n.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:"regex",input:o.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),Wa=h("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=Da),fn.init(e,n)}),qa=h("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=ja),fn.init(e,n)}),Ha=h("$ZodCheckIncludes",(e,n)=>{oe.init(e,n);let o=Be(n.includes),r=new RegExp(typeof n.position=="number"?`^.{${n.position}}${o}`:o);n.pattern=r,e._zod.onattach.push(t=>{let i=t._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=t=>{t.value.includes(n.includes,n.position)||t.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:t.value,inst:e,continue:!n.abort})}}),Ka=h("$ZodCheckStartsWith",(e,n)=>{oe.init(e,n);let o=new RegExp(`^${Be(n.prefix)}.*`);n.pattern??(n.pattern=o),e._zod.onattach.push(r=>{let t=r._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(o)}),e._zod.check=r=>{r.value.startsWith(n.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:r.value,inst:e,continue:!n.abort})}}),Xa=h("$ZodCheckEndsWith",(e,n)=>{oe.init(e,n);let o=new RegExp(`.*${Be(n.suffix)}$`);n.pattern??(n.pattern=o),e._zod.onattach.push(r=>{let t=r._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(o)}),e._zod.check=r=>{r.value.endsWith(n.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:r.value,inst:e,continue:!n.abort})}});function Om(e,n,o){e.issues.length&&n.issues.push(...Oe(o,e.issues))}var Ya=h("$ZodCheckProperty",(e,n)=>{oe.init(e,n),e._zod.check=o=>{let r=n.schema._zod.run({value:o.value[n.property],issues:[]},{});if(r instanceof Promise)return r.then(t=>Om(t,o,n.property));Om(r,o,n.property)}}),Qa=h("$ZodCheckMimeType",(e,n)=>{oe.init(e,n);let o=new Set(n.mime);e._zod.onattach.push(r=>{r._zod.bag.mime=n.mime}),e._zod.check=r=>{o.has(r.value.type)||r.issues.push({code:"invalid_value",values:n.mime,input:r.value.type,inst:e,continue:!n.abort})}}),ec=h("$ZodCheckOverwrite",(e,n)=>{oe.init(e,n),e._zod.check=o=>{o.value=n.tx(o.value)}});var bo=class{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}let r=n.split(`
|
|
10
|
+
`).filter(s=>s),t=Math.min(...r.map(s=>s.length-s.trimStart().length)),i=r.map(s=>s.slice(t)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let n=Function,o=this?.args,t=[...(this?.content??[""]).map(i=>` ${i}`)];return new n(...o,t.join(`
|
|
11
|
+
`))}};var tc={major:4,minor:4,patch:3};var R=h("$ZodType",(e,n)=>{var o;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=tc;let r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(let t of r)for(let i of t._zod.onattach)i(e);if(r.length===0)(o=e._zod).deferred??(o.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(s,a,l)=>{let d=wt(s),p;for(let m of a){if(m._zod.def.when){if(oa(s)||!m._zod.def.when(s))continue}else if(d)continue;let g=s.issues.length,v=m._zod.check(s);if(v instanceof Promise&&l?.async===!1)throw new We;if(p||v instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await v,s.issues.length!==g&&(d||(d=wt(s,g)))});else{if(s.issues.length===g)continue;d||(d=wt(s,g))}}return p?p.then(()=>s):s},i=(s,a,l)=>{if(wt(s))return s.aborted=!0,s;let d=t(a,r,l);if(d instanceof Promise){if(l.async===!1)throw new We;return d.then(p=>e._zod.parse(p,l))}return e._zod.parse(d,l)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){let d=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return d instanceof Promise?d.then(p=>i(p,s,a)):i(d,s,a)}let l=e._zod.parse(s,a);if(l instanceof Promise){if(a.async===!1)throw new We;return l.then(d=>t(d,r,a))}return t(l,r,a)}}V(e,"~standard",()=>({validate:t=>{try{let i=sa(e,t);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return aa(e,t).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),Zt=h("$ZodString",(e,n)=>{R.init(e,n),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ta(e._zod.bag),e._zod.parse=(o,r)=>{if(n.coerce)try{o.value=String(o.value)}catch{}return typeof o.value=="string"||o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:e}),o}}),Q=h("$ZodStringFormat",(e,n)=>{fn.init(e,n),Zt.init(e,n)}),oc=h("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=fa),Q.init(e,n)}),rc=h("$ZodUUID",(e,n)=>{if(n.version){let r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(r===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=Ft(r))}else n.pattern??(n.pattern=Ft());Q.init(e,n)}),ic=h("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=ha),Q.init(e,n)}),sc=h("$ZodURL",(e,n)=>{Q.init(e,n),e._zod.check=o=>{try{let r=o.value.trim();if(!n.normalize&&n.protocol?.source===wa.source&&!/^https?:\/\//i.test(r)){o.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:o.value,inst:e,continue:!n.abort});return}let t=new URL(r);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(t.hostname)||o.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:n.hostname.source,input:o.value,inst:e,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)||o.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:o.value,inst:e,continue:!n.abort})),n.normalize?o.value=t.href:o.value=r;return}catch{o.issues.push({code:"invalid_format",format:"url",input:o.value,inst:e,continue:!n.abort})}}}),ac=h("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=va()),Q.init(e,n)}),cc=h("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=ma),Q.init(e,n)}),lc=h("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=ca),Q.init(e,n)}),uc=h("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=la),Q.init(e,n)}),dc=h("$ZodULID",(e,n)=>{n.pattern??(n.pattern=ua),Q.init(e,n)}),pc=h("$ZodXID",(e,n)=>{n.pattern??(n.pattern=da),Q.init(e,n)}),mc=h("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=pa),Q.init(e,n)}),gc=h("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=Ia(n)),Q.init(e,n)}),fc=h("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=_a),Q.init(e,n)}),hc=h("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=Pa(n)),Q.init(e,n)}),vc=h("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=ga),Q.init(e,n)}),yc=h("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=ya),Q.init(e,n),e._zod.bag.format="ipv4"}),$c=h("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=$a),Q.init(e,n),e._zod.bag.format="ipv6",e._zod.check=o=>{try{new URL(`http://[${o.value}]`)}catch{o.issues.push({code:"invalid_format",format:"ipv6",input:o.value,inst:e,continue:!n.abort})}}}),bc=h("$ZodMAC",(e,n)=>{n.pattern??(n.pattern=ba(n.delimiter)),Q.init(e,n),e._zod.bag.format="mac"}),kc=h("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=ka),Q.init(e,n)}),Sc=h("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=Sa),Q.init(e,n),e._zod.check=o=>{let r=o.value.split("/");try{if(r.length!==2)throw new Error;let[t,i]=r;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${t}]`)}catch{o.issues.push({code:"invalid_format",format:"cidrv6",input:o.value,inst:e,continue:!n.abort})}}});function xc(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var wc=h("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=xa),Q.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=o=>{xc(o.value)||o.issues.push({code:"invalid_format",format:"base64",input:o.value,inst:e,continue:!n.abort})}});function qm(e){if(!_r.test(e))return!1;let n=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),o=n.padEnd(Math.ceil(n.length/4)*4,"=");return xc(o)}var Cc=h("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=_r),Q.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=o=>{qm(o.value)||o.issues.push({code:"invalid_format",format:"base64url",input:o.value,inst:e,continue:!n.abort})}}),_c=h("$ZodE164",(e,n)=>{n.pattern??(n.pattern=Ca),Q.init(e,n)});function Hm(e,n=null){try{let o=e.split(".");if(o.length!==3)return!1;let[r]=o;if(!r)return!1;let t=JSON.parse(atob(r));return!("typ"in t&&t?.typ!=="JWT"||!t.alg||n&&(!("alg"in t)||t.alg!==n))}catch{return!1}}var Pc=h("$ZodJWT",(e,n)=>{Q.init(e,n),e._zod.check=o=>{Hm(o.value,n.alg)||o.issues.push({code:"invalid_format",format:"jwt",input:o.value,inst:e,continue:!n.abort})}}),Ic=h("$ZodCustomStringFormat",(e,n)=>{Q.init(e,n),e._zod.check=o=>{n.fn(o.value)||o.issues.push({code:"invalid_format",format:n.format,input:o.value,inst:e,continue:!n.abort})}}),Mr=h("$ZodNumber",(e,n)=>{R.init(e,n),e._zod.pattern=e._zod.bag.pattern??Pr,e._zod.parse=(o,r)=>{if(n.coerce)try{o.value=Number(o.value)}catch{}let t=o.value;if(typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t))return o;let i=typeof t=="number"?Number.isNaN(t)?"NaN":Number.isFinite(t)?void 0:"Infinity":void 0;return o.issues.push({expected:"number",code:"invalid_type",input:t,inst:e,...i?{received:i}:{}}),o}}),Tc=h("$ZodNumberFormat",(e,n)=>{La.init(e,n),Mr.init(e,n)}),ko=h("$ZodBoolean",(e,n)=>{R.init(e,n),e._zod.pattern=Aa,e._zod.parse=(o,r)=>{if(n.coerce)try{o.value=!!o.value}catch{}let t=o.value;return typeof t=="boolean"||o.issues.push({expected:"boolean",code:"invalid_type",input:t,inst:e}),o}}),Dr=h("$ZodBigInt",(e,n)=>{R.init(e,n),e._zod.pattern=Ea,e._zod.parse=(o,r)=>{if(n.coerce)try{o.value=BigInt(o.value)}catch{}return typeof o.value=="bigint"||o.issues.push({expected:"bigint",code:"invalid_type",input:o.value,inst:e}),o}}),Ec=h("$ZodBigIntFormat",(e,n)=>{Ua.init(e,n),Dr.init(e,n)}),Oc=h("$ZodSymbol",(e,n)=>{R.init(e,n),e._zod.parse=(o,r)=>{let t=o.value;return typeof t=="symbol"||o.issues.push({expected:"symbol",code:"invalid_type",input:t,inst:e}),o}}),Ac=h("$ZodUndefined",(e,n)=>{R.init(e,n),e._zod.pattern=Ma,e._zod.values=new Set([void 0]),e._zod.parse=(o,r)=>{let t=o.value;return typeof t>"u"||o.issues.push({expected:"undefined",code:"invalid_type",input:t,inst:e}),o}}),zc=h("$ZodNull",(e,n)=>{R.init(e,n),e._zod.pattern=za,e._zod.values=new Set([null]),e._zod.parse=(o,r)=>{let t=o.value;return t===null||o.issues.push({expected:"null",code:"invalid_type",input:t,inst:e}),o}}),Mc=h("$ZodAny",(e,n)=>{R.init(e,n),e._zod.parse=o=>o}),Dc=h("$ZodUnknown",(e,n)=>{R.init(e,n),e._zod.parse=o=>o}),jc=h("$ZodNever",(e,n)=>{R.init(e,n),e._zod.parse=(o,r)=>(o.issues.push({expected:"never",code:"invalid_type",input:o.value,inst:e}),o)}),Nc=h("$ZodVoid",(e,n)=>{R.init(e,n),e._zod.parse=(o,r)=>{let t=o.value;return typeof t>"u"||o.issues.push({expected:"void",code:"invalid_type",input:t,inst:e}),o}}),Lc=h("$ZodDate",(e,n)=>{R.init(e,n),e._zod.parse=(o,r)=>{if(n.coerce)try{o.value=new Date(o.value)}catch{}let t=o.value,i=t instanceof Date;return i&&!Number.isNaN(t.getTime())||o.issues.push({expected:"date",code:"invalid_type",input:t,...i?{received:"Invalid Date"}:{},inst:e}),o}});function Mm(e,n,o){e.issues.length&&n.issues.push(...Oe(o,e.issues)),n.value[o]=e.value}var Uc=h("$ZodArray",(e,n)=>{R.init(e,n),e._zod.parse=(o,r)=>{let t=o.value;if(!Array.isArray(t))return o.issues.push({expected:"array",code:"invalid_type",input:t,inst:e}),o;o.value=Array(t.length);let i=[];for(let s=0;s<t.length;s++){let a=t[s],l=n.element._zod.run({value:a,issues:[]},r);l instanceof Promise?i.push(l.then(d=>Mm(d,o,s))):Mm(l,o,s)}return i.length?Promise.all(i).then(()=>o):o}});function zr(e,n,o,r,t,i){let s=o in r;if(e.issues.length){if(t&&i&&!s)return;n.issues.push(...Oe(o,e.issues))}if(!s&&!t){e.issues.length||n.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[o]});return}e.value===void 0?s&&(n.value[o]=void 0):n.value[o]=e.value}function Km(e){let n=Object.keys(e.shape);for(let r of n)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);let o=ea(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(o)}}function Xm(e,n,o,r,t,i){let s=[],a=t.keySet,l=t.catchall._zod,d=l.def.type,p=l.optin==="optional",m=l.optout==="optional";for(let g in n){if(g==="__proto__"||a.has(g))continue;if(d==="never"){s.push(g);continue}let v=l.run({value:n[g],issues:[]},r);v instanceof Promise?e.push(v.then($=>zr($,o,g,n,p,m))):zr(v,o,g,n,p,m)}return s.length&&o.issues.push({code:"unrecognized_keys",keys:s,input:n,inst:i}),e.length?Promise.all(e).then(()=>o):o}var Ym=h("$ZodObject",(e,n)=>{if(R.init(e,n),!Object.getOwnPropertyDescriptor(n,"shape")?.get){let a=n.shape;Object.defineProperty(n,"shape",{get:()=>{let l={...a};return Object.defineProperty(n,"shape",{value:l}),l}})}let r=ln(()=>Km(n));V(e._zod,"propValues",()=>{let a=n.shape,l={};for(let d in a){let p=a[d]._zod;if(p.values){l[d]??(l[d]=new Set);for(let m of p.values)l[d].add(m)}}return l});let t=Rt,i=n.catchall,s;e._zod.parse=(a,l)=>{s??(s=r.value);let d=a.value;if(!t(d))return a.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),a;a.value={};let p=[],m=s.shape;for(let g of s.keys){let v=m[g],$=v._zod.optin==="optional",M=v._zod.optout==="optional",_=v._zod.run({value:d[g],issues:[]},l);_ instanceof Promise?p.push(_.then(N=>zr(N,a,g,d,$,M))):zr(_,a,g,d,$,M)}return i?Xm(p,d,a,l,r.value,e):p.length?Promise.all(p).then(()=>a):a}}),Rc=h("$ZodObjectJIT",(e,n)=>{Ym.init(e,n);let o=e._zod.parse,r=ln(()=>Km(n)),t=g=>{let v=new bo(["shape","payload","ctx"]),$=r.value,M=E=>{let A=gr(E);return`shape[${A}]._zod.run({ value: input[${A}], issues: [] }, ctx)`};v.write("const input = payload.value;");let _=Object.create(null),N=0;for(let E of $.keys)_[E]=`key_${N++}`;v.write("const newResult = {};");for(let E of $.keys){let A=_[E],O=gr(E),Z=g[E],ie=Z?._zod?.optin==="optional",Y=Z?._zod?.optout==="optional";v.write(`const ${A} = ${M(E)};`),ie&&Y?v.write(`
|
|
12
|
+
if (${A}.issues.length) {
|
|
13
|
+
if (${O} in input) {
|
|
14
|
+
payload.issues = payload.issues.concat(${A}.issues.map(iss => ({
|
|
15
|
+
...iss,
|
|
16
|
+
path: iss.path ? [${O}, ...iss.path] : [${O}]
|
|
17
|
+
})));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (${A}.value === undefined) {
|
|
22
|
+
if (${O} in input) {
|
|
23
|
+
newResult[${O}] = undefined;
|
|
24
|
+
}
|
|
25
|
+
} else {
|
|
26
|
+
newResult[${O}] = ${A}.value;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
`):ie?v.write(`
|
|
30
|
+
if (${A}.issues.length) {
|
|
31
|
+
payload.issues = payload.issues.concat(${A}.issues.map(iss => ({
|
|
32
|
+
...iss,
|
|
33
|
+
path: iss.path ? [${O}, ...iss.path] : [${O}]
|
|
34
|
+
})));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (${A}.value === undefined) {
|
|
38
|
+
if (${O} in input) {
|
|
39
|
+
newResult[${O}] = undefined;
|
|
40
|
+
}
|
|
41
|
+
} else {
|
|
42
|
+
newResult[${O}] = ${A}.value;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
`):v.write(`
|
|
46
|
+
const ${A}_present = ${O} in input;
|
|
47
|
+
if (${A}.issues.length) {
|
|
48
|
+
payload.issues = payload.issues.concat(${A}.issues.map(iss => ({
|
|
49
|
+
...iss,
|
|
50
|
+
path: iss.path ? [${O}, ...iss.path] : [${O}]
|
|
51
|
+
})));
|
|
52
|
+
}
|
|
53
|
+
if (!${A}_present && !${A}.issues.length) {
|
|
54
|
+
payload.issues.push({
|
|
55
|
+
code: "invalid_type",
|
|
56
|
+
expected: "nonoptional",
|
|
57
|
+
input: undefined,
|
|
58
|
+
path: [${O}]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (${A}_present) {
|
|
63
|
+
if (${A}.value === undefined) {
|
|
64
|
+
newResult[${O}] = undefined;
|
|
65
|
+
} else {
|
|
66
|
+
newResult[${O}] = ${A}.value;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
`)}v.write("payload.value = newResult;"),v.write("return payload;");let D=v.compile();return(E,A)=>D(g,E,A)},i,s=Rt,a=!Ut.jitless,d=a&&Xs.value,p=n.catchall,m;e._zod.parse=(g,v)=>{m??(m=r.value);let $=g.value;return s($)?a&&d&&v?.async===!1&&v.jitless!==!0?(i||(i=t(n.shape)),g=i(g,v),p?Xm([],$,g,v,m,e):g):o(g,v):(g.issues.push({expected:"object",code:"invalid_type",input:$,inst:e}),g)}});function Dm(e,n,o,r){for(let i of e)if(i.issues.length===0)return n.value=i.value,n;let t=e.filter(i=>!wt(i));return t.length===1?(n.value=t[0].value,t[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:o,errors:e.map(i=>i.issues.map(s=>we(s,r,pe())))}),n)}var So=h("$ZodUnion",(e,n)=>{R.init(e,n),V(e._zod,"optin",()=>n.options.some(r=>r._zod.optin==="optional")?"optional":void 0),V(e._zod,"optout",()=>n.options.some(r=>r._zod.optout==="optional")?"optional":void 0),V(e._zod,"values",()=>{if(n.options.every(r=>r._zod.values))return new Set(n.options.flatMap(r=>Array.from(r._zod.values)))}),V(e._zod,"pattern",()=>{if(n.options.every(r=>r._zod.pattern)){let r=n.options.map(t=>t._zod.pattern);return new RegExp(`^(${r.map(t=>uo(t.source)).join("|")})$`)}});let o=n.options.length===1?n.options[0]._zod.run:null;e._zod.parse=(r,t)=>{if(o)return o(r,t);let i=!1,s=[];for(let a of n.options){let l=a._zod.run({value:r.value,issues:[]},t);if(l instanceof Promise)s.push(l),i=!0;else{if(l.issues.length===0)return l;s.push(l)}}return i?Promise.all(s).then(a=>Dm(a,r,e,t)):Dm(s,r,e,t)}});function jm(e,n,o,r){let t=e.filter(i=>i.issues.length===0);return t.length===1?(n.value=t[0].value,n):(t.length===0?n.issues.push({code:"invalid_union",input:n.value,inst:o,errors:e.map(i=>i.issues.map(s=>we(s,r,pe())))}):n.issues.push({code:"invalid_union",input:n.value,inst:o,errors:[],inclusive:!1}),n)}var Fc=h("$ZodXor",(e,n)=>{So.init(e,n),n.inclusive=!1;let o=n.options.length===1?n.options[0]._zod.run:null;e._zod.parse=(r,t)=>{if(o)return o(r,t);let i=!1,s=[];for(let a of n.options){let l=a._zod.run({value:r.value,issues:[]},t);l instanceof Promise?(s.push(l),i=!0):s.push(l)}return i?Promise.all(s).then(a=>jm(a,r,e,t)):jm(s,r,e,t)}}),Zc=h("$ZodDiscriminatedUnion",(e,n)=>{n.inclusive=!1,So.init(e,n);let o=e._zod.parse;V(e._zod,"propValues",()=>{let t={};for(let i of n.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(i)}"`);for(let[a,l]of Object.entries(s)){t[a]||(t[a]=new Set);for(let d of l)t[a].add(d)}}return t});let r=ln(()=>{let t=n.options,i=new Map;for(let s of t){let a=s._zod.propValues?.[n.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(s)}"`);for(let l of a){if(i.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);i.set(l,s)}}return i});e._zod.parse=(t,i)=>{let s=t.value;if(!Rt(s))return t.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),t;let a=r.value.get(s?.[n.discriminator]);return a?a._zod.run(t,i):n.unionFallback||i.direction==="backward"?o(t,i):(t.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:n.discriminator,options:Array.from(r.value.keys()),input:s,path:[n.discriminator],inst:e}),t)}}),Bc=h("$ZodIntersection",(e,n)=>{R.init(e,n),e._zod.parse=(o,r)=>{let t=o.value,i=n.left._zod.run({value:t,issues:[]},r),s=n.right._zod.run({value:t,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([l,d])=>Nm(o,l,d)):Nm(o,i,s)}});function nc(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(xt(e)&&xt(n)){let o=Object.keys(n),r=Object.keys(e).filter(i=>o.indexOf(i)!==-1),t={...e,...n};for(let i of r){let s=nc(e[i],n[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};t[i]=s.data}return{valid:!0,data:t}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};let o=[];for(let r=0;r<e.length;r++){let t=e[r],i=n[r],s=nc(t,i);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};o.push(s.data)}return{valid:!0,data:o}}return{valid:!1,mergeErrorPath:[]}}function Nm(e,n,o){let r=new Map,t;for(let a of n.issues)if(a.code==="unrecognized_keys"){t??(t=a);for(let l of a.keys)r.has(l)||r.set(l,{}),r.get(l).l=!0}else e.issues.push(a);for(let a of o.issues)if(a.code==="unrecognized_keys")for(let l of a.keys)r.has(l)||r.set(l,{}),r.get(l).r=!0;else e.issues.push(a);let i=[...r].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&t&&e.issues.push({...t,keys:i}),wt(e))return e;let s=nc(n.value,o.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var jr=h("$ZodTuple",(e,n)=>{R.init(e,n);let o=n.items;e._zod.parse=(r,t)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];let s=[],a=Lm(o,"optin"),l=Lm(o,"optout");if(!n.rest){if(i.length<a)return r.issues.push({code:"too_small",minimum:a,inclusive:!0,input:i,inst:e,origin:"array"}),r;i.length>o.length&&r.issues.push({code:"too_big",maximum:o.length,inclusive:!0,input:i,inst:e,origin:"array"})}let d=new Array(o.length);for(let p=0;p<o.length;p++){let m=o[p]._zod.run({value:i[p],issues:[]},t);m instanceof Promise?s.push(m.then(g=>{d[p]=g})):d[p]=m}if(n.rest){let p=o.length-1,m=i.slice(o.length);for(let g of m){p++;let v=n.rest._zod.run({value:g,issues:[]},t);v instanceof Promise?s.push(v.then($=>Um($,r,p))):Um(v,r,p)}}return s.length?Promise.all(s).then(()=>Rm(d,r,o,i,l)):Rm(d,r,o,i,l)}});function Lm(e,n){for(let o=e.length-1;o>=0;o--)if(e[o]._zod[n]!=="optional")return o+1;return 0}function Um(e,n,o){e.issues.length&&n.issues.push(...Oe(o,e.issues)),n.value[o]=e.value}function Rm(e,n,o,r,t){for(let i=0;i<o.length;i++){let s=e[i],a=i<r.length;if(s.issues.length){if(!a&&i>=t){n.value.length=i;break}n.issues.push(...Oe(i,s.issues))}n.value[i]=s.value}for(let i=n.value.length-1;i>=r.length&&(o[i]._zod.optout==="optional"&&n.value[i]===void 0);i--)n.value.length=i;return n}var Vc=h("$ZodRecord",(e,n)=>{R.init(e,n),e._zod.parse=(o,r)=>{let t=o.value;if(!xt(t))return o.issues.push({expected:"record",code:"invalid_type",input:t,inst:e}),o;let i=[],s=n.keyType._zod.values;if(s){o.value={};let a=new Set;for(let d of s)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){a.add(typeof d=="number"?d.toString():d);let p=n.keyType._zod.run({value:d,issues:[]},r);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(p.issues.length){o.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(v=>we(v,r,pe())),input:d,path:[d],inst:e});continue}let m=p.value,g=n.valueType._zod.run({value:t[d],issues:[]},r);g instanceof Promise?i.push(g.then(v=>{v.issues.length&&o.issues.push(...Oe(d,v.issues)),o.value[m]=v.value})):(g.issues.length&&o.issues.push(...Oe(d,g.issues)),o.value[m]=g.value)}let l;for(let d in t)a.has(d)||(l=l??[],l.push(d));l&&l.length>0&&o.issues.push({code:"unrecognized_keys",input:t,inst:e,keys:l})}else{o.value={};for(let a of Reflect.ownKeys(t)){if(a==="__proto__"||!Object.prototype.propertyIsEnumerable.call(t,a))continue;let l=n.keyType._zod.run({value:a,issues:[]},r);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&Pr.test(a)&&l.issues.length){let m=n.keyType._zod.run({value:Number(a),issues:[]},r);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(l=m)}if(l.issues.length){n.mode==="loose"?o.value[a]=t[a]:o.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(m=>we(m,r,pe())),input:a,path:[a],inst:e});continue}let p=n.valueType._zod.run({value:t[a],issues:[]},r);p instanceof Promise?i.push(p.then(m=>{m.issues.length&&o.issues.push(...Oe(a,m.issues)),o.value[l.value]=m.value})):(p.issues.length&&o.issues.push(...Oe(a,p.issues)),o.value[l.value]=p.value)}}return i.length?Promise.all(i).then(()=>o):o}}),Gc=h("$ZodMap",(e,n)=>{R.init(e,n),e._zod.parse=(o,r)=>{let t=o.value;if(!(t instanceof Map))return o.issues.push({expected:"map",code:"invalid_type",input:t,inst:e}),o;let i=[];o.value=new Map;for(let[s,a]of t){let l=n.keyType._zod.run({value:s,issues:[]},r),d=n.valueType._zod.run({value:a,issues:[]},r);l instanceof Promise||d instanceof Promise?i.push(Promise.all([l,d]).then(([p,m])=>{Fm(p,m,o,s,t,e,r)})):Fm(l,d,o,s,t,e,r)}return i.length?Promise.all(i).then(()=>o):o}});function Fm(e,n,o,r,t,i,s){e.issues.length&&(po.has(typeof r)?o.issues.push(...Oe(r,e.issues)):o.issues.push({code:"invalid_key",origin:"map",input:t,inst:i,issues:e.issues.map(a=>we(a,s,pe()))})),n.issues.length&&(po.has(typeof r)?o.issues.push(...Oe(r,n.issues)):o.issues.push({origin:"map",code:"invalid_element",input:t,inst:i,key:r,issues:n.issues.map(a=>we(a,s,pe()))})),o.value.set(e.value,n.value)}var Jc=h("$ZodSet",(e,n)=>{R.init(e,n),e._zod.parse=(o,r)=>{let t=o.value;if(!(t instanceof Set))return o.issues.push({input:t,inst:e,expected:"set",code:"invalid_type"}),o;let i=[];o.value=new Set;for(let s of t){let a=n.valueType._zod.run({value:s,issues:[]},r);a instanceof Promise?i.push(a.then(l=>Zm(l,o))):Zm(a,o)}return i.length?Promise.all(i).then(()=>o):o}});function Zm(e,n){e.issues.length&&n.issues.push(...e.issues),n.value.add(e.value)}var Wc=h("$ZodEnum",(e,n)=>{R.init(e,n);let o=lo(n.entries),r=new Set(o);e._zod.values=r,e._zod.pattern=new RegExp(`^(${o.filter(t=>po.has(typeof t)).map(t=>typeof t=="string"?Be(t):t.toString()).join("|")})$`),e._zod.parse=(t,i)=>{let s=t.value;return r.has(s)||t.issues.push({code:"invalid_value",values:o,input:s,inst:e}),t}}),qc=h("$ZodLiteral",(e,n)=>{if(R.init(e,n),n.values.length===0)throw new Error("Cannot create literal schema with no valid values");let o=new Set(n.values);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.values.map(r=>typeof r=="string"?Be(r):r?Be(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,t)=>{let i=r.value;return o.has(i)||r.issues.push({code:"invalid_value",values:n.values,input:i,inst:e}),r}}),Hc=h("$ZodFile",(e,n)=>{R.init(e,n),e._zod.parse=(o,r)=>{let t=o.value;return t instanceof File||o.issues.push({expected:"file",code:"invalid_type",input:t,inst:e}),o}}),Kc=h("$ZodTransform",(e,n)=>{R.init(e,n),e._zod.optin="optional",e._zod.parse=(o,r)=>{if(r.direction==="backward")throw new bt(e.constructor.name);let t=n.transform(o.value,o);if(r.async)return(t instanceof Promise?t:Promise.resolve(t)).then(s=>(o.value=s,o.fallback=!0,o));if(t instanceof Promise)throw new We;return o.value=t,o.fallback=!0,o}});function Bm(e,n){return n===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Nr=h("$ZodOptional",(e,n)=>{R.init(e,n),e._zod.optin="optional",e._zod.optout="optional",V(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),V(e._zod,"pattern",()=>{let o=n.innerType._zod.pattern;return o?new RegExp(`^(${uo(o.source)})?$`):void 0}),e._zod.parse=(o,r)=>{if(n.innerType._zod.optin==="optional"){let t=o.value,i=n.innerType._zod.run(o,r);return i instanceof Promise?i.then(s=>Bm(s,t)):Bm(i,t)}return o.value===void 0?o:n.innerType._zod.run(o,r)}}),Xc=h("$ZodExactOptional",(e,n)=>{Nr.init(e,n),V(e._zod,"values",()=>n.innerType._zod.values),V(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(o,r)=>n.innerType._zod.run(o,r)}),Yc=h("$ZodNullable",(e,n)=>{R.init(e,n),V(e._zod,"optin",()=>n.innerType._zod.optin),V(e._zod,"optout",()=>n.innerType._zod.optout),V(e._zod,"pattern",()=>{let o=n.innerType._zod.pattern;return o?new RegExp(`^(${uo(o.source)}|null)$`):void 0}),V(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(o,r)=>o.value===null?o:n.innerType._zod.run(o,r)}),Qc=h("$ZodDefault",(e,n)=>{R.init(e,n),e._zod.optin="optional",V(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(o,r)=>{if(r.direction==="backward")return n.innerType._zod.run(o,r);if(o.value===void 0)return o.value=n.defaultValue,o;let t=n.innerType._zod.run(o,r);return t instanceof Promise?t.then(i=>Vm(i,n)):Vm(t,n)}});function Vm(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}var el=h("$ZodPrefault",(e,n)=>{R.init(e,n),e._zod.optin="optional",V(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(o,r)=>(r.direction==="backward"||o.value===void 0&&(o.value=n.defaultValue),n.innerType._zod.run(o,r))}),tl=h("$ZodNonOptional",(e,n)=>{R.init(e,n),V(e._zod,"values",()=>{let o=n.innerType._zod.values;return o?new Set([...o].filter(r=>r!==void 0)):void 0}),e._zod.parse=(o,r)=>{let t=n.innerType._zod.run(o,r);return t instanceof Promise?t.then(i=>Gm(i,e)):Gm(t,e)}});function Gm(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}var nl=h("$ZodSuccess",(e,n)=>{R.init(e,n),e._zod.parse=(o,r)=>{if(r.direction==="backward")throw new bt("ZodSuccess");let t=n.innerType._zod.run(o,r);return t instanceof Promise?t.then(i=>(o.value=i.issues.length===0,o)):(o.value=t.issues.length===0,o)}}),ol=h("$ZodCatch",(e,n)=>{R.init(e,n),e._zod.optin="optional",V(e._zod,"optout",()=>n.innerType._zod.optout),V(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(o,r)=>{if(r.direction==="backward")return n.innerType._zod.run(o,r);let t=n.innerType._zod.run(o,r);return t instanceof Promise?t.then(i=>(o.value=i.value,i.issues.length&&(o.value=n.catchValue({...o,error:{issues:i.issues.map(s=>we(s,r,pe()))},input:o.value}),o.issues=[],o.fallback=!0),o)):(o.value=t.value,t.issues.length&&(o.value=n.catchValue({...o,error:{issues:t.issues.map(i=>we(i,r,pe()))},input:o.value}),o.issues=[],o.fallback=!0),o)}}),rl=h("$ZodNaN",(e,n)=>{R.init(e,n),e._zod.parse=(o,r)=>((typeof o.value!="number"||!Number.isNaN(o.value))&&o.issues.push({input:o.value,inst:e,expected:"nan",code:"invalid_type"}),o)}),Lr=h("$ZodPipe",(e,n)=>{R.init(e,n),V(e._zod,"values",()=>n.in._zod.values),V(e._zod,"optin",()=>n.in._zod.optin),V(e._zod,"optout",()=>n.out._zod.optout),V(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(o,r)=>{if(r.direction==="backward"){let i=n.out._zod.run(o,r);return i instanceof Promise?i.then(s=>Er(s,n.in,r)):Er(i,n.in,r)}let t=n.in._zod.run(o,r);return t instanceof Promise?t.then(i=>Er(i,n.out,r)):Er(t,n.out,r)}});function Er(e,n,o){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},o)}var xo=h("$ZodCodec",(e,n)=>{R.init(e,n),V(e._zod,"values",()=>n.in._zod.values),V(e._zod,"optin",()=>n.in._zod.optin),V(e._zod,"optout",()=>n.out._zod.optout),V(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(o,r)=>{if((r.direction||"forward")==="forward"){let i=n.in._zod.run(o,r);return i instanceof Promise?i.then(s=>Or(s,n,r)):Or(i,n,r)}else{let i=n.out._zod.run(o,r);return i instanceof Promise?i.then(s=>Or(s,n,r)):Or(i,n,r)}}});function Or(e,n,o){if(e.issues.length)return e.aborted=!0,e;if((o.direction||"forward")==="forward"){let t=n.transform(e.value,e);return t instanceof Promise?t.then(i=>Ar(e,i,n.out,o)):Ar(e,t,n.out,o)}else{let t=n.reverseTransform(e.value,e);return t instanceof Promise?t.then(i=>Ar(e,i,n.in,o)):Ar(e,t,n.in,o)}}function Ar(e,n,o,r){return e.issues.length?(e.aborted=!0,e):o._zod.run({value:n,issues:e.issues},r)}var il=h("$ZodPreprocess",(e,n)=>{Lr.init(e,n)}),sl=h("$ZodReadonly",(e,n)=>{R.init(e,n),V(e._zod,"propValues",()=>n.innerType._zod.propValues),V(e._zod,"values",()=>n.innerType._zod.values),V(e._zod,"optin",()=>n.innerType?._zod?.optin),V(e._zod,"optout",()=>n.innerType?._zod?.optout),e._zod.parse=(o,r)=>{if(r.direction==="backward")return n.innerType._zod.run(o,r);let t=n.innerType._zod.run(o,r);return t instanceof Promise?t.then(Jm):Jm(t)}});function Jm(e){return e.value=Object.freeze(e.value),e}var al=h("$ZodTemplateLiteral",(e,n)=>{R.init(e,n);let o=[];for(let r of n.parts)if(typeof r=="object"&&r!==null){if(!r._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...r._zod.traits].shift()}`);let t=r._zod.pattern instanceof RegExp?r._zod.pattern.source:r._zod.pattern;if(!t)throw new Error(`Invalid template literal part: ${r._zod.traits}`);let i=t.startsWith("^")?1:0,s=t.endsWith("$")?t.length-1:t.length;o.push(t.slice(i,s))}else if(r===null||Qs.has(typeof r))o.push(Be(`${r}`));else throw new Error(`Invalid template literal part: ${r}`);e._zod.pattern=new RegExp(`^${o.join("")}$`),e._zod.parse=(r,t)=>typeof r.value!="string"?(r.issues.push({input:r.value,inst:e,expected:"string",code:"invalid_type"}),r):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(r.value)||r.issues.push({input:r.value,inst:e,code:"invalid_format",format:n.format??"template_literal",pattern:e._zod.pattern.source}),r)}),cl=h("$ZodFunction",(e,n)=>(R.init(e,n),e._def=n,e._zod.def=n,e.implement=o=>{if(typeof o!="function")throw new Error("implement() must be called with a function");return function(...r){let t=e._def.input?hr(e._def.input,r):r,i=Reflect.apply(o,this,t);return e._def.output?hr(e._def.output,i):i}},e.implementAsync=o=>{if(typeof o!="function")throw new Error("implementAsync() must be called with a function");return async function(...r){let t=e._def.input?await vr(e._def.input,r):r,i=await Reflect.apply(o,this,t);return e._def.output?await vr(e._def.output,i):i}},e._zod.parse=(o,r)=>typeof o.value!="function"?(o.issues.push({code:"invalid_type",expected:"function",input:o.value,inst:e}),o):(e._def.output&&e._def.output._zod.def.type==="promise"?o.value=e.implementAsync(o.value):o.value=e.implement(o.value),o),e.input=(...o)=>{let r=e.constructor;return Array.isArray(o[0])?new r({type:"function",input:new jr({type:"tuple",items:o[0],rest:o[1]}),output:e._def.output}):new r({type:"function",input:o[0],output:e._def.output})},e.output=o=>{let r=e.constructor;return new r({type:"function",input:e._def.input,output:o})},e)),ll=h("$ZodPromise",(e,n)=>{R.init(e,n),e._zod.parse=(o,r)=>Promise.resolve(o.value).then(t=>n.innerType._zod.run({value:t,issues:[]},r))}),ul=h("$ZodLazy",(e,n)=>{R.init(e,n),V(e._zod,"innerType",()=>{let o=n;return o._cachedInner||(o._cachedInner=n.getter()),o._cachedInner}),V(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),V(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),V(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),V(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(o,r)=>e._zod.innerType._zod.run(o,r)}),dl=h("$ZodCustom",(e,n)=>{oe.init(e,n),R.init(e,n),e._zod.parse=(o,r)=>o,e._zod.check=o=>{let r=o.value,t=n.fn(r);if(t instanceof Promise)return t.then(i=>Wm(i,o,r,e));Wm(t,o,r,e)}});function Wm(e,n,o,r){if(!e){let t={code:"custom",input:o,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(t.params=r._zod.def.params),n.issues.push(un(t))}}var Co={};lt(Co,{ar:()=>Qm,az:()=>eg,be:()=>ng,bg:()=>og,ca:()=>rg,cs:()=>ig,da:()=>sg,de:()=>ag,el:()=>cg,en:()=>Ur,eo:()=>lg,es:()=>ug,fa:()=>dg,fi:()=>pg,fr:()=>mg,frCA:()=>gg,he:()=>fg,hr:()=>hg,hu:()=>vg,hy:()=>$g,id:()=>bg,is:()=>kg,it:()=>Sg,ja:()=>xg,ka:()=>wg,kh:()=>Cg,km:()=>Rr,ko:()=>_g,lt:()=>Ig,mk:()=>Tg,ms:()=>Eg,nl:()=>Og,no:()=>Ag,ota:()=>zg,pl:()=>Dg,ps:()=>Mg,pt:()=>jg,ro:()=>Ng,ru:()=>Ug,sl:()=>Rg,sv:()=>Fg,ta:()=>Zg,th:()=>Bg,tr:()=>Vg,ua:()=>Gg,uk:()=>Fr,ur:()=>Jg,uz:()=>Wg,vi:()=>qg,yo:()=>Xg,zhCN:()=>Hg,zhTW:()=>Kg});var zb=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function n(t){return e[t]??null}let o={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},r={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${t.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`}case"invalid_value":return t.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${k(t.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${t.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${t.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${t.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${t.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${t.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${t.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${t.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${o[i.format]??t.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${t.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${t.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${t.keys.length>1?"\u0629":""}: ${y(t.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${t.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${t.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function Qm(){return{localeError:zb()}}var Mb=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function n(t){return e[t]??null}let o={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${t.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${a}`}case"invalid_value":return t.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${k(t.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${t.origin??"d\u0259y\u0259r"} ${i}${t.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${t.origin??"d\u0259y\u0259r"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${t.origin} ${i}${t.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${o[i.format]??t.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${t.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${t.keys.length>1?"lar":""}: ${y(t.keys,", ")}`;case"invalid_key":return`${t.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${t.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function eg(){return{localeError:Mb()}}function tg(e,n,o,r){let t=Math.abs(e),i=t%10,s=t%100;return s>=11&&s<=19?r:i===1?n:i>=2&&i<=4?o:r}var Db=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function n(t){return e[t]??null}let o={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},r={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${t.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`}case"invalid_value":return t.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${k(t.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);if(s){let a=Number(t.maximum),l=tg(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${t.maximum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);if(s){let a=Number(t.minimum),l=tg(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${t.minimum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${o[i.format]??t.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${t.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${y(t.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${t.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${t.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function ng(){return{localeError:Db()}}var jb=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function n(t){return e[t]??null}let o={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${t.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`}case"invalid_value":return t.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${k(t.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${t.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${t.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${t.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${t.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${t.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${t.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${o[i.format]??t.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${t.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${t.keys.length>1?"\u043E\u0432\u0435":""}: ${y(t.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${t.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${t.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function og(){return{localeError:jb()}}var Nb=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function n(t){return e[t]??null}let o={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${t.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${a}`}case"invalid_value":return t.values.length===1?`Valor inv\xE0lid: s'esperava ${k(t.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${y(t.values," o ")}`;case"too_big":{let i=t.inclusive?"com a m\xE0xim":"menys de",s=n(t.origin);return s?`Massa gran: s'esperava que ${t.origin??"el valor"} contingu\xE9s ${i} ${t.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${t.origin??"el valor"} fos ${i} ${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?"com a m\xEDnim":"m\xE9s de",s=n(t.origin);return s?`Massa petit: s'esperava que ${t.origin} contingu\xE9s ${i} ${t.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${t.origin} fos ${i} ${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${o[i.format]??t.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${t.divisor}`;case"unrecognized_keys":return`Clau${t.keys.length>1?"s":""} no reconeguda${t.keys.length>1?"s":""}: ${y(t.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${t.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${t.origin}`;default:return"Entrada inv\xE0lida"}}};function rg(){return{localeError:Nb()}}var Lb=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function n(t){return e[t]??null}let o={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},r={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${t.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${a}`}case"invalid_value":return t.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${k(t.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${t.origin??"hodnota"} mus\xED m\xEDt ${i}${t.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${t.origin??"hodnota"} mus\xED b\xFDt ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${t.origin??"hodnota"} mus\xED m\xEDt ${i}${t.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${t.origin??"hodnota"} mus\xED b\xFDt ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${o[i.format]??t.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${t.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${y(t.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${t.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${t.origin}`;default:return"Neplatn\xFD vstup"}}};function ig(){return{localeError:Lb()}}var Ub=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function n(t){return e[t]??null}let o={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},r={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Ugyldigt input: forventede instanceof ${t.expected}, fik ${a}`:`Ugyldigt input: forventede ${i}, fik ${a}`}case"invalid_value":return t.values.length===1?`Ugyldig v\xE6rdi: forventede ${k(t.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin),a=r[t.origin]??t.origin;return s?`For stor: forventede ${a??"value"} ${s.verb} ${i} ${t.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${i} ${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin),a=r[t.origin]??t.origin;return s?`For lille: forventede ${a} ${s.verb} ${i} ${t.minimum.toString()} ${s.unit}`:`For lille: forventede ${a} havde ${i} ${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${o[i.format]??t.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${y(t.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${t.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${t.origin}`;default:return"Ugyldigt input"}}};function sg(){return{localeError:Ub()}}var Rb=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function n(t){return e[t]??null}let o={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},r={nan:"NaN",number:"Zahl",array:"Array"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${t.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${a}`}case"invalid_value":return t.values.length===1?`Ung\xFCltige Eingabe: erwartet ${k(t.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`Zu gro\xDF: erwartet, dass ${t.origin??"Wert"} ${i}${t.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${t.origin??"Wert"} ${i}${t.maximum.toString()} ist`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`Zu klein: erwartet, dass ${t.origin} ${i}${t.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${t.origin} ${i}${t.minimum.toString()} ist`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${o[i.format]??t.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${t.divisor} sein`;case"unrecognized_keys":return`${t.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${y(t.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${t.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${t.origin}`;default:return"Ung\xFCltige Eingabe"}}};function ag(){return{localeError:Rb()}}var Fb=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function n(t){return e[t]??null}let o={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},r={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return typeof t.expected=="string"&&/^[A-Z]/.test(t.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${t.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${a}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${a}`}case"invalid_value":return t.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${k(t.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${t.maximum.toString()} ${s.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${t.minimum.toString()} ${s.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${o[i.format]??t.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${t.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${t.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${t.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${y(t.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${t.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${t.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function cg(){return{localeError:Fb()}}var Zb=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function n(t){return e[t]??null}let o={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return`Invalid input: expected ${i}, received ${a}`}case"invalid_value":return t.values.length===1?`Invalid input: expected ${k(t.values[0])}`:`Invalid option: expected one of ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`Too big: expected ${t.origin??"value"} to have ${i}${t.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${t.origin??"value"} to be ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`Too small: expected ${t.origin} to have ${i}${t.minimum.toString()} ${s.unit}`:`Too small: expected ${t.origin} to be ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${o[i.format]??t.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${t.divisor}`;case"unrecognized_keys":return`Unrecognized key${t.keys.length>1?"s":""}: ${y(t.keys,", ")}`;case"invalid_key":return`Invalid key in ${t.origin}`;case"invalid_union":return t.options&&Array.isArray(t.options)&&t.options.length>0?`Invalid discriminator value. Expected ${t.options.map(s=>`'${s}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${t.origin}`;default:return"Invalid input"}}};function Ur(){return{localeError:Zb()}}var Bb=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function n(t){return e[t]??null}let o={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},r={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${t.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${a}`}case"invalid_value":return t.values.length===1?`Nevalida enigo: atendi\u011Dis ${k(t.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`Tro granda: atendi\u011Dis ke ${t.origin??"valoro"} havu ${i}${t.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${t.origin??"valoro"} havu ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`Tro malgranda: atendi\u011Dis ke ${t.origin} havu ${i}${t.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${t.origin} estu ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${o[i.format]??t.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${t.divisor}`;case"unrecognized_keys":return`Nekonata${t.keys.length>1?"j":""} \u015Dlosilo${t.keys.length>1?"j":""}: ${y(t.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${t.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${t.origin}`;default:return"Nevalida enigo"}}};function lg(){return{localeError:Bb()}}var Vb=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function n(t){return e[t]??null}let o={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${t.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${a}`}case"invalid_value":return t.values.length===1?`Entrada inv\xE1lida: se esperaba ${k(t.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin),a=r[t.origin]??t.origin;return s?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${i}${t.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin),a=r[t.origin]??t.origin;return s?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${i}${t.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} fuera ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${o[i.format]??t.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${t.divisor}`;case"unrecognized_keys":return`Llave${t.keys.length>1?"s":""} desconocida${t.keys.length>1?"s":""}: ${y(t.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${r[t.origin]??t.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${r[t.origin]??t.origin}`;default:return"Entrada inv\xE1lida"}}};function ug(){return{localeError:Vb()}}var Gb=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function n(t){return e[t]??null}let o={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},r={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${t.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return t.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${k(t.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${y(t.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${t.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${t.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${t.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${t.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${t.origin} \u0628\u0627\u06CC\u062F ${i}${t.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${t.origin} \u0628\u0627\u06CC\u062F ${i}${t.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${o[i.format]??t.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${t.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${t.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${y(t.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${t.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${t.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function dg(){return{localeError:Gb()}}var Jb=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function n(t){return e[t]??null}let o={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},r={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Virheellinen tyyppi: odotettiin instanceof ${t.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${a}`}case"invalid_value":return t.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${k(t.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${t.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${t.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${o[i.format]??t.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${t.divisor} monikerta`;case"unrecognized_keys":return`${t.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${y(t.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function pg(){return{localeError:Jb()}}var Wb=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function n(t){return e[t]??null}let o={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},r={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Entr\xE9e invalide : instanceof ${t.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${a} re\xE7u`}case"invalid_value":return t.values.length===1?`Entr\xE9e invalide : ${k(t.values[0])} attendu`:`Option invalide : une valeur parmi ${y(t.values,"|")} attendue`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`Trop grand : ${r[t.origin]??"valeur"} doit ${s.verb} ${i}${t.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${r[t.origin]??"valeur"} doit \xEAtre ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`Trop petit : ${r[t.origin]??"valeur"} doit ${s.verb} ${i}${t.minimum.toString()} ${s.unit}`:`Trop petit : ${r[t.origin]??"valeur"} doit \xEAtre ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${o[i.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${t.divisor}`;case"unrecognized_keys":return`Cl\xE9${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${y(t.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${t.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entr\xE9e invalide"}}};function mg(){return{localeError:Wb()}}var qb=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function n(t){return e[t]??null}let o={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},r={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Entr\xE9e invalide : attendu instanceof ${t.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${a}`}case"invalid_value":return t.values.length===1?`Entr\xE9e invalide : attendu ${k(t.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"\u2264":"<",s=n(t.origin);return s?`Trop grand : attendu que ${t.origin??"la valeur"} ait ${i}${t.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${t.origin??"la valeur"} soit ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?"\u2265":">",s=n(t.origin);return s?`Trop petit : attendu que ${t.origin} ait ${i}${t.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${t.origin} soit ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${o[i.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${t.divisor}`;case"unrecognized_keys":return`Cl\xE9${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${y(t.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${t.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entr\xE9e invalide"}}};function gg(){return{localeError:qb()}}var Hb=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},n={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},o=d=>d?e[d]:void 0,r=d=>{let p=o(d);return p?p.label:d??e.unknown.label},t=d=>`\u05D4${r(d)}`,i=d=>(o(d)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=d=>d?n[d]??null:null,a={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},l={nan:"NaN"};return d=>{switch(d.code){case"invalid_type":{let p=d.expected,m=l[p??""]??r(p),g=S(d.input),v=l[g]??e[g]?.label??g;return/^[A-Z]/.test(d.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${d.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${v}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}, \u05D4\u05EA\u05E7\u05D1\u05DC ${v}`}case"invalid_value":{if(d.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${k(d.values[0])}`;let p=d.values.map(v=>k(v));if(d.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${p[0]} \u05D0\u05D5 ${p[1]}`;let m=p[p.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${p.slice(0,-1).join(", ")} \u05D0\u05D5 ${m}`}case"too_big":{let p=s(d.origin),m=t(d.origin??"value");if(d.origin==="string")return`${p?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${d.maximum.toString()} ${p?.unit??""} ${d.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(d.origin==="number"){let $=d.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${d.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${d.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${$}`}if(d.origin==="array"||d.origin==="set"){let $=d.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",M=d.inclusive?`${d.maximum} ${p?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${d.maximum} ${p?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} ${$} \u05DC\u05D4\u05DB\u05D9\u05DC ${M}`.trim()}let g=d.inclusive?"<=":"<",v=i(d.origin??"value");return p?.unit?`${p.longLabel} \u05DE\u05D3\u05D9: ${m} ${v} ${g}${d.maximum.toString()} ${p.unit}`:`${p?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${m} ${v} ${g}${d.maximum.toString()}`}case"too_small":{let p=s(d.origin),m=t(d.origin??"value");if(d.origin==="string")return`${p?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${d.minimum.toString()} ${p?.unit??""} ${d.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(d.origin==="number"){let $=d.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${d.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${d.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${$}`}if(d.origin==="array"||d.origin==="set"){let $=d.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(d.minimum===1&&d.inclusive){let _=(d.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${$} \u05DC\u05D4\u05DB\u05D9\u05DC ${_}`}let M=d.inclusive?`${d.minimum} ${p?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${d.minimum} ${p?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${$} \u05DC\u05D4\u05DB\u05D9\u05DC ${M}`.trim()}let g=d.inclusive?">=":">",v=i(d.origin??"value");return p?.unit?`${p.shortLabel} \u05DE\u05D3\u05D9: ${m} ${v} ${g}${d.minimum.toString()} ${p.unit}`:`${p?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${m} ${v} ${g}${d.minimum.toString()}`}case"invalid_format":{let p=d;if(p.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${p.prefix}"`;if(p.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${p.suffix}"`;if(p.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${p.includes}"`;if(p.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${p.pattern}`;let m=a[p.format],g=m?.label??p.format,$=(m?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${g} \u05DC\u05D0 ${$}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${d.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${d.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${d.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${y(d.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${t(d.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function fg(){return{localeError:Hb()}}var Kb=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function n(t){return e[t]??null}let o={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},r={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${t.expected}, a primljeno je ${a}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${a}`}case"invalid_value":return t.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${k(t.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin),a=r[t.origin]??t.origin;return s?`Preveliko: o\u010Dekivano da ${a??"vrijednost"} ima ${i}${t.maximum.toString()} ${s.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${a??"vrijednost"} bude ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin),a=r[t.origin]??t.origin;return s?`Premalo: o\u010Dekivano da ${a} ima ${i}${t.minimum.toString()} ${s.unit}`:`Premalo: o\u010Dekivano da ${a} bude ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${o[i.format]??t.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${t.divisor}`;case"unrecognized_keys":return`Neprepoznat${t.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${y(t.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${r[t.origin]??t.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${r[t.origin]??t.origin}`;default:return"Neispravan unos"}}};function hg(){return{localeError:Kb()}}var Xb=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function n(t){return e[t]??null}let o={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},r={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${t.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${a}`}case"invalid_value":return t.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${k(t.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`T\xFAl nagy: ${t.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${t.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${t.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${t.origin} m\xE9rete t\xFAl kicsi ${i}${t.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${t.origin} t\xFAl kicsi ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${o[i.format]??t.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${t.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${t.keys.length>1?"s":""}: ${y(t.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${t.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${t.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function vg(){return{localeError:Xb()}}function yg(e,n,o){return Math.abs(e)===1?n:o}function hn(e){if(!e)return"";let n=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],o=e[e.length-1];return e+(n.includes(o)?"\u0576":"\u0568")}var Yb=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function n(t){return e[t]??null}let o={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},r={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${t.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`}case"invalid_value":return t.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${k(t.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);if(s){let a=Number(t.maximum),l=yg(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${hn(t.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${t.maximum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${hn(t.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);if(s){let a=Number(t.minimum),l=yg(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${hn(t.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${t.minimum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${hn(t.origin)} \u056C\u056B\u0576\u056B ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${o[i.format]??t.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${t.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${t.keys.length>1?"\u0576\u0565\u0580":""}. ${y(t.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${hn(t.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${hn(t.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function $g(){return{localeError:Yb()}}var Qb=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function n(t){return e[t]??null}let o={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Input tidak valid: diharapkan instanceof ${t.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${i}, diterima ${a}`}case"invalid_value":return t.values.length===1?`Input tidak valid: diharapkan ${k(t.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`Terlalu besar: diharapkan ${t.origin??"value"} memiliki ${i}${t.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${t.origin??"value"} menjadi ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`Terlalu kecil: diharapkan ${t.origin} memiliki ${i}${t.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${t.origin} menjadi ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${o[i.format]??t.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${t.keys.length>1?"s":""}: ${y(t.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${t.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${t.origin}`;default:return"Input tidak valid"}}};function bg(){return{localeError:Qb()}}var ek=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function n(t){return e[t]??null}let o={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},r={nan:"NaN",number:"n\xFAmer",array:"fylki"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${t.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return t.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${k(t.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${t.origin??"gildi"} hafi ${i}${t.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${t.origin??"gildi"} s\xE9 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${t.origin} hafi ${i}${t.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${t.origin} s\xE9 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${o[i.format]??t.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${t.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${t.keys.length>1?"ir lyklar":"ur lykill"}: ${y(t.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${t.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${t.origin}`;default:return"Rangt gildi"}}};function kg(){return{localeError:ek()}}var tk=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function n(t){return e[t]??null}let o={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"numero",array:"vettore"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Input non valido: atteso instanceof ${t.expected}, ricevuto ${a}`:`Input non valido: atteso ${i}, ricevuto ${a}`}case"invalid_value":return t.values.length===1?`Input non valido: atteso ${k(t.values[0])}`:`Opzione non valida: atteso uno tra ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`Troppo grande: ${t.origin??"valore"} deve avere ${i}${t.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${t.origin??"valore"} deve essere ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`Troppo piccolo: ${t.origin} deve avere ${i}${t.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${t.origin} deve essere ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${o[i.format]??t.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${t.divisor}`;case"unrecognized_keys":return`Chiav${t.keys.length>1?"i":"e"} non riconosciut${t.keys.length>1?"e":"a"}: ${y(t.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${t.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${t.origin}`;default:return"Input non valido"}}};function Sg(){return{localeError:tk()}}var nk=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function n(t){return e[t]??null}let o={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},r={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${t.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return t.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${k(t.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${y(t.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=t.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=n(t.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${t.origin??"\u5024"}\u306F${t.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${t.origin??"\u5024"}\u306F${t.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=t.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=n(t.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${t.origin}\u306F${t.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${t.origin}\u306F${t.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${o[i.format]??t.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${t.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${t.keys.length>1?"\u7FA4":""}: ${y(t.keys,"\u3001")}`;case"invalid_key":return`${t.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${t.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function xg(){return{localeError:nk()}}var ok=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function n(t){return e[t]??null}let o={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},r={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${t.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`}case"invalid_value":return t.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${k(t.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${y(t.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${i}${t.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t.origin} ${s.verb} ${i}${t.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${o[i.format]??t.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${t.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${t.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${y(t.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${t.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${t.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function wg(){return{localeError:ok()}}var rk=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function n(t){return e[t]??null}let o={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},r={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${t.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`}case"invalid_value":return t.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${k(t.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${t.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin} ${i} ${t.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin} ${i} ${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${o[i.format]??t.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${t.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${y(t.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${t.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${t.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function Rr(){return{localeError:rk()}}function Cg(){return Rr()}var ik=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function n(t){return e[t]??null}let o={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},r={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${t.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case"invalid_value":return t.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${k(t.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${y(t.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=t.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=n(t.origin),l=a?.unit??"\uC694\uC18C";return a?`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${t.maximum.toString()}${l} ${i}${s}`:`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${t.maximum.toString()} ${i}${s}`}case"too_small":{let i=t.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=n(t.origin),l=a?.unit??"\uC694\uC18C";return a?`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${t.minimum.toString()}${l} ${i}${s}`:`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${t.minimum.toString()} ${i}${s}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${o[i.format]??t.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${t.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${y(t.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${t.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${t.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function _g(){return{localeError:ik()}}var wo=e=>e.charAt(0).toUpperCase()+e.slice(1);function Pg(e){let n=Math.abs(e),o=n%10,r=n%100;return r>=11&&r<=19||o===0?"many":o===1?"one":"few"}var sk=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function n(t,i,s,a){let l=e[t]??null;return l===null?l:{unit:l.unit[i],verb:l.verb[a][s?"inclusive":"notInclusive"]}}let o={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},r={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${t.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${i}`}case"invalid_value":return t.values.length===1?`Privalo b\u016Bti ${k(t.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${y(t.values,"|")} pasirinkim\u0173`;case"too_big":{let i=r[t.origin]??t.origin,s=n(t.origin,Pg(Number(t.maximum)),t.inclusive??!1,"smaller");if(s?.verb)return`${wo(i??t.origin??"reik\u0161m\u0117")} ${s.verb} ${t.maximum.toString()} ${s.unit??"element\u0173"}`;let a=t.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${wo(i??t.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${t.maximum.toString()} ${s?.unit}`}case"too_small":{let i=r[t.origin]??t.origin,s=n(t.origin,Pg(Number(t.minimum)),t.inclusive??!1,"bigger");if(s?.verb)return`${wo(i??t.origin??"reik\u0161m\u0117")} ${s.verb} ${t.minimum.toString()} ${s.unit??"element\u0173"}`;let a=t.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${wo(i??t.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${t.minimum.toString()} ${s?.unit}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${o[i.format]??t.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${t.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${t.keys.length>1?"i":"as"} rakt${t.keys.length>1?"ai":"as"}: ${y(t.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=r[t.origin]??t.origin;return`${wo(i??t.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Ig(){return{localeError:sk()}}var ak=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function n(t){return e[t]??null}let o={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},r={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${t.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`}case"invalid_value":return t.values.length===1?`Invalid input: expected ${k(t.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${t.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${t.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${o[i.format]??t.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${y(t.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${t.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${t.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function Tg(){return{localeError:ak()}}var ck=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function n(t){return e[t]??null}let o={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"nombor"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Input tidak sah: dijangka instanceof ${t.expected}, diterima ${a}`:`Input tidak sah: dijangka ${i}, diterima ${a}`}case"invalid_value":return t.values.length===1?`Input tidak sah: dijangka ${k(t.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`Terlalu besar: dijangka ${t.origin??"nilai"} ${s.verb} ${i}${t.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${t.origin??"nilai"} adalah ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`Terlalu kecil: dijangka ${t.origin} ${s.verb} ${i}${t.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${t.origin} adalah ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${o[i.format]??t.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${y(t.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${t.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${t.origin}`;default:return"Input tidak sah"}}};function Eg(){return{localeError:ck()}}var lk=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function n(t){return e[t]??null}let o={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},r={nan:"NaN",number:"getal"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Ongeldige invoer: verwacht instanceof ${t.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${i}, ontving ${a}`}case"invalid_value":return t.values.length===1?`Ongeldige invoer: verwacht ${k(t.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin),a=t.origin==="date"?"laat":t.origin==="string"?"lang":"groot";return s?`Te ${a}: verwacht dat ${t.origin??"waarde"} ${i}${t.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${a}: verwacht dat ${t.origin??"waarde"} ${i}${t.maximum.toString()} is`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin),a=t.origin==="date"?"vroeg":t.origin==="string"?"kort":"klein";return s?`Te ${a}: verwacht dat ${t.origin} ${i}${t.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${a}: verwacht dat ${t.origin} ${i}${t.minimum.toString()} is`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${o[i.format]??t.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${t.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${t.keys.length>1?"s":""}: ${y(t.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${t.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${t.origin}`;default:return"Ongeldige invoer"}}};function Og(){return{localeError:lk()}}var uk=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function n(t){return e[t]??null}let o={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"tall",array:"liste"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Ugyldig input: forventet instanceof ${t.expected}, fikk ${a}`:`Ugyldig input: forventet ${i}, fikk ${a}`}case"invalid_value":return t.values.length===1?`Ugyldig verdi: forventet ${k(t.values[0])}`:`Ugyldig valg: forventet en av ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`For stor(t): forventet ${t.origin??"value"} til \xE5 ha ${i}${t.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${t.origin??"value"} til \xE5 ha ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`For lite(n): forventet ${t.origin} til \xE5 ha ${i}${t.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${t.origin} til \xE5 ha ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${o[i.format]??t.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${y(t.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${t.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${t.origin}`;default:return"Ugyldig input"}}};function Ag(){return{localeError:uk()}}var dk=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function n(t){return e[t]??null}let o={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},r={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`F\xE2sit giren: umulan instanceof ${t.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${a}`}case"invalid_value":return t.values.length===1?`F\xE2sit giren: umulan ${k(t.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`Fazla b\xFCy\xFCk: ${t.origin??"value"}, ${i}${t.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${t.origin??"value"}, ${i}${t.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`Fazla k\xFC\xE7\xFCk: ${t.origin}, ${i}${t.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${t.origin}, ${i}${t.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=t;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${o[i.format]??t.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${t.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${t.keys.length>1?"s":""}: ${y(t.keys,", ")}`;case"invalid_key":return`${t.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${t.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function zg(){return{localeError:dk()}}var pk=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function n(t){return e[t]??null}let o={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},r={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${t.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return t.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${k(t.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${y(t.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${t.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${t.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${t.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${t.maximum.toString()} \u0648\u064A`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${t.origin} \u0628\u0627\u06CC\u062F ${i}${t.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${t.origin} \u0628\u0627\u06CC\u062F ${i}${t.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${o[i.format]??t.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${t.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${t.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${y(t.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${t.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${t.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function Mg(){return{localeError:pk()}}var mk=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function n(t){return e[t]??null}let o={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},r={nan:"NaN",number:"liczba",array:"tablica"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${t.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${a}`}case"invalid_value":return t.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${k(t.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${t.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${t.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${o[i.format]??t.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${t.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${t.keys.length>1?"s":""}: ${y(t.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${t.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${t.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function Dg(){return{localeError:mk()}}var gk=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function n(t){return e[t]??null}let o={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN",number:"n\xFAmero",null:"nulo"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Tipo inv\xE1lido: esperado instanceof ${t.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${a}`}case"invalid_value":return t.values.length===1?`Entrada inv\xE1lida: esperado ${k(t.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`Muito grande: esperado que ${t.origin??"valor"} tivesse ${i}${t.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${t.origin??"valor"} fosse ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`Muito pequeno: esperado que ${t.origin} tivesse ${i}${t.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${t.origin} fosse ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${o[i.format]??t.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${t.divisor}`;case"unrecognized_keys":return`Chave${t.keys.length>1?"s":""} desconhecida${t.keys.length>1?"s":""}: ${y(t.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${t.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${t.origin}`;default:return"Campo inv\xE1lido"}}};function jg(){return{localeError:gk()}}var fk=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function n(t){return e[t]??null}let o={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},r={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${a}`}case"invalid_value":return t.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${k(t.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`Prea mare: a\u0219teptat ca ${t.origin??"valoarea"} ${s.verb} ${i}${t.maximum.toString()} ${s.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${t.origin??"valoarea"} s\u0103 fie ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`Prea mic: a\u0219teptat ca ${t.origin} ${s.verb} ${i}${t.minimum.toString()} ${s.unit}`:`Prea mic: a\u0219teptat ca ${t.origin} s\u0103 fie ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${o[i.format]??t.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${t.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${y(t.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${t.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${t.origin}`;default:return"Intrare invalid\u0103"}}};function Ng(){return{localeError:fk()}}function Lg(e,n,o,r){let t=Math.abs(e),i=t%10,s=t%100;return s>=11&&s<=19?r:i===1?n:i>=2&&i<=4?o:r}var hk=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function n(t){return e[t]??null}let o={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${t.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`}case"invalid_value":return t.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${k(t.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);if(s){let a=Number(t.maximum),l=Lg(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${t.maximum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);if(s){let a=Number(t.minimum),l=Lg(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${t.minimum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${o[i.format]??t.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${t.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${t.keys.length>1?"\u0438":""}: ${y(t.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${t.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${t.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function Ug(){return{localeError:hk()}}var vk=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function n(t){return e[t]??null}let o={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},r={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${t.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${a}`}case"invalid_value":return t.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${k(t.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${t.origin??"vrednost"} imelo ${i}${t.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${t.origin??"vrednost"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${t.origin} imelo ${i}${t.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${o[i.format]??t.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${t.divisor}`;case"unrecognized_keys":return`Neprepoznan${t.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${y(t.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${t.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${t.origin}`;default:return"Neveljaven vnos"}}};function Rg(){return{localeError:vk()}}var yk=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function n(t){return e[t]??null}let o={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},r={nan:"NaN",number:"antal",array:"lista"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${t.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${a}`}case"invalid_value":return t.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${k(t.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${t.origin??"v\xE4rdet"} att ha ${i}${t.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${t.origin??"v\xE4rdet"} att ha ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${t.origin??"v\xE4rdet"} att ha ${i}${t.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${t.origin??"v\xE4rdet"} att ha ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${o[i.format]??t.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${y(t.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${t.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${t.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function Fg(){return{localeError:yk()}}var $k=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function n(t){return e[t]??null}let o={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${t.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`}case"invalid_value":return t.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${k(t.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${y(t.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${t.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${t.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin} ${i}${t.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin} ${i}${t.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${o[i.format]??t.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${t.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${t.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${y(t.keys,", ")}`;case"invalid_key":return`${t.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${t.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function Zg(){return{localeError:$k()}}var bk=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function n(t){return e[t]??null}let o={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},r={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${t.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`}case"invalid_value":return t.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${k(t.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=n(t.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${t.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=n(t.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${t.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${o[i.format]??t.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${t.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${y(t.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${t.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${t.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function Bg(){return{localeError:bk()}}var kk=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function n(t){return e[t]??null}let o={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},r={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${t.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${a}`}case"invalid_value":return t.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${k(t.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${t.origin??"de\u011Fer"} ${i}${t.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${t.origin??"de\u011Fer"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${t.origin} ${i}${t.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${o[i.format]??t.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${t.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${t.keys.length>1?"lar":""}: ${y(t.keys,", ")}`;case"invalid_key":return`${t.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${t.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function Vg(){return{localeError:kk()}}var Sk=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function n(t){return e[t]??null}let o={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${t.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`}case"invalid_value":return t.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${k(t.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${t.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin} ${s.verb} ${i}${t.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin} \u0431\u0443\u0434\u0435 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${o[i.format]??t.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${t.keys.length>1?"\u0456":""}: ${y(t.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${t.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${t.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Fr(){return{localeError:Sk()}}function Gg(){return Fr()}var xk=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function n(t){return e[t]??null}let o={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},r={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${t.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return t.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${k(t.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${y(t.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${t.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${t.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${t.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${t.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${t.origin} \u06A9\u06D2 ${i}${t.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${t.origin} \u06A9\u0627 ${i}${t.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${o[i.format]??t.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${t.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${t.keys.length>1?"\u0632":""}: ${y(t.keys,"\u060C ")}`;case"invalid_key":return`${t.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${t.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function Jg(){return{localeError:xk()}}var wk=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function n(t){return e[t]??null}let o={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},r={nan:"NaN",number:"raqam",array:"massiv"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${t.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${a}`}case"invalid_value":return t.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${k(t.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`Juda katta: kutilgan ${t.origin??"qiymat"} ${i}${t.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${t.origin??"qiymat"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`Juda kichik: kutilgan ${t.origin} ${i}${t.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${o[i.format]??t.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${t.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${t.keys.length>1?"lar":""}: ${y(t.keys,", ")}`;case"invalid_key":return`${t.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${t.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function Wg(){return{localeError:wk()}}var Ck=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function n(t){return e[t]??null}let o={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},r={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${t.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case"invalid_value":return t.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${k(t.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${t.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${t.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${t.origin??"gi\xE1 tr\u1ECB"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${t.origin} ${s.verb} ${i}${t.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${o[i.format]??t.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${t.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${y(t.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${t.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${t.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function qg(){return{localeError:Ck()}}var _k=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function n(t){return e[t]??null}let o={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},r={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${t.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case"invalid_value":return t.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${k(t.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${t.origin??"\u503C"} ${i}${t.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${t.origin??"\u503C"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${t.origin} ${i}${t.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${o[i.format]??t.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${t.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${y(t.keys,", ")}`;case"invalid_key":return`${t.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${t.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function Hg(){return{localeError:_k()}}var Pk=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function n(t){return e[t]??null}let o={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},r={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${t.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${a}`}case"invalid_value":return t.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${k(t.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${t.origin??"\u503C"} \u61C9\u70BA ${i}${t.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${t.origin??"\u503C"} \u61C9\u70BA ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${t.origin} \u61C9\u70BA ${i}${t.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${t.origin} \u61C9\u70BA ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${o[i.format]??t.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${t.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${t.keys.length>1?"\u5011":""}\uFF1A${y(t.keys,"\u3001")}`;case"invalid_key":return`${t.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${t.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Kg(){return{localeError:Pk()}}var Ik=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function n(t){return e[t]??null}let o={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},r={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return t=>{switch(t.code){case"invalid_type":{let i=r[t.expected]??t.expected,s=S(t.input),a=r[s]??s;return/^[A-Z]/.test(t.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${t.expected}, \xE0m\u1ECD\u0300 a r\xED ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case"invalid_value":return t.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${k(t.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${y(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",s=n(t.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${t.origin??"iye"} ${s.verb} ${i}${t.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${t.maximum}`}case"too_small":{let i=t.inclusive?">=":">",s=n(t.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${t.origin} ${s.verb} ${i}${t.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${t.minimum}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${o[i.format]??t.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${t.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${y(t.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${t.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${t.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function Xg(){return{localeError:Ik()}}var Yg,pl=Symbol("ZodOutput"),ml=Symbol("ZodInput"),Zr=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...o){let r=o[0];return this._map.set(n,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,n),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){let o=this._map.get(n);return o&&typeof o=="object"&&"id"in o&&this._idmap.delete(o.id),this._map.delete(n),this}get(n){let o=n._zod.parent;if(o){let r={...this.get(o)??{}};delete r.id;let t={...r,...this._map.get(n)};return Object.keys(t).length?t:void 0}return this._map.get(n)}has(n){return this._map.has(n)}};function Br(){return new Zr}(Yg=globalThis).__zod_globalRegistry??(Yg.__zod_globalRegistry=Br());var ye=globalThis.__zod_globalRegistry;function gl(e,n){return new e({type:"string",...C(n)})}function fl(e,n){return new e({type:"string",coerce:!0,...C(n)})}function Vr(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...C(n)})}function _o(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...C(n)})}function Gr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...C(n)})}function Jr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...C(n)})}function Wr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...C(n)})}function qr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...C(n)})}function Po(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...C(n)})}function Hr(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...C(n)})}function Kr(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...C(n)})}function Xr(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...C(n)})}function Yr(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...C(n)})}function Qr(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...C(n)})}function ei(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...C(n)})}function ti(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...C(n)})}function ni(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...C(n)})}function oi(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...C(n)})}function hl(e,n){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...C(n)})}function ri(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...C(n)})}function ii(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...C(n)})}function si(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...C(n)})}function ai(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...C(n)})}function ci(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...C(n)})}function li(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...C(n)})}var vl={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function yl(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...C(n)})}function $l(e,n){return new e({type:"string",format:"date",check:"string_format",...C(n)})}function bl(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...C(n)})}function kl(e,n){return new e({type:"string",format:"duration",check:"string_format",...C(n)})}function Sl(e,n){return new e({type:"number",checks:[],...C(n)})}function xl(e,n){return new e({type:"number",coerce:!0,checks:[],...C(n)})}function wl(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...C(n)})}function Cl(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...C(n)})}function _l(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...C(n)})}function Pl(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...C(n)})}function Il(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...C(n)})}function Tl(e,n){return new e({type:"boolean",...C(n)})}function El(e,n){return new e({type:"boolean",coerce:!0,...C(n)})}function Ol(e,n){return new e({type:"bigint",...C(n)})}function Al(e,n){return new e({type:"bigint",coerce:!0,...C(n)})}function zl(e,n){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...C(n)})}function Ml(e,n){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...C(n)})}function Dl(e,n){return new e({type:"symbol",...C(n)})}function jl(e,n){return new e({type:"undefined",...C(n)})}function Nl(e,n){return new e({type:"null",...C(n)})}function Ll(e){return new e({type:"any"})}function Ul(e){return new e({type:"unknown"})}function Rl(e,n){return new e({type:"never",...C(n)})}function Fl(e,n){return new e({type:"void",...C(n)})}function Zl(e,n){return new e({type:"date",...C(n)})}function Bl(e,n){return new e({type:"date",coerce:!0,...C(n)})}function Vl(e,n){return new e({type:"nan",...C(n)})}function He(e,n){return new Ir({check:"less_than",...C(n),value:e,inclusive:!1})}function Le(e,n){return new Ir({check:"less_than",...C(n),value:e,inclusive:!0})}function Ke(e,n){return new Tr({check:"greater_than",...C(n),value:e,inclusive:!1})}function Ce(e,n){return new Tr({check:"greater_than",...C(n),value:e,inclusive:!0})}function ui(e){return Ke(0,e)}function di(e){return He(0,e)}function pi(e){return Le(0,e)}function mi(e){return Ce(0,e)}function Ct(e,n){return new Na({check:"multiple_of",...C(n),value:e})}function _t(e,n){return new Ra({check:"max_size",...C(n),maximum:e})}function Xe(e,n){return new Fa({check:"min_size",...C(n),minimum:e})}function Bt(e,n){return new Za({check:"size_equals",...C(n),size:e})}function Vt(e,n){return new Ba({check:"max_length",...C(n),maximum:e})}function dt(e,n){return new Va({check:"min_length",...C(n),minimum:e})}function Gt(e,n){return new Ga({check:"length_equals",...C(n),length:e})}function vn(e,n){return new Ja({check:"string_format",format:"regex",...C(n),pattern:e})}function yn(e){return new Wa({check:"string_format",format:"lowercase",...C(e)})}function $n(e){return new qa({check:"string_format",format:"uppercase",...C(e)})}function bn(e,n){return new Ha({check:"string_format",format:"includes",...C(n),includes:e})}function kn(e,n){return new Ka({check:"string_format",format:"starts_with",...C(n),prefix:e})}function Sn(e,n){return new Xa({check:"string_format",format:"ends_with",...C(n),suffix:e})}function gi(e,n,o){return new Ya({check:"property",property:e,schema:n,...C(o)})}function xn(e,n){return new Qa({check:"mime_type",mime:e,...C(n)})}function qe(e){return new ec({check:"overwrite",tx:e})}function wn(e){return qe(n=>n.normalize(e))}function Cn(){return qe(e=>e.trim())}function _n(){return qe(e=>e.toLowerCase())}function Pn(){return qe(e=>e.toUpperCase())}function In(){return qe(e=>Ks(e))}function Gl(e,n,o){return new e({type:"array",element:n,...C(o)})}function Ek(e,n,o){return new e({type:"union",options:n,...C(o)})}function Ok(e,n,o){return new e({type:"union",options:n,inclusive:!1,...C(o)})}function Ak(e,n,o,r){return new e({type:"union",options:o,discriminator:n,...C(r)})}function zk(e,n,o){return new e({type:"intersection",left:n,right:o})}function Mk(e,n,o,r){let t=o instanceof R,i=t?r:o,s=t?o:null;return new e({type:"tuple",items:n,rest:s,...C(i)})}function Dk(e,n,o,r){return new e({type:"record",keyType:n,valueType:o,...C(r)})}function jk(e,n,o,r){return new e({type:"map",keyType:n,valueType:o,...C(r)})}function Nk(e,n,o){return new e({type:"set",valueType:n,...C(o)})}function Lk(e,n,o){let r=Array.isArray(n)?Object.fromEntries(n.map(t=>[t,t])):n;return new e({type:"enum",entries:r,...C(o)})}function Uk(e,n,o){return new e({type:"enum",entries:n,...C(o)})}function Rk(e,n,o){return new e({type:"literal",values:Array.isArray(n)?n:[n],...C(o)})}function Jl(e,n){return new e({type:"file",...C(n)})}function Fk(e,n){return new e({type:"transform",transform:n})}function Zk(e,n){return new e({type:"optional",innerType:n})}function Bk(e,n){return new e({type:"nullable",innerType:n})}function Vk(e,n,o){return new e({type:"default",innerType:n,get defaultValue(){return typeof o=="function"?o():Ys(o)}})}function Gk(e,n,o){return new e({type:"nonoptional",innerType:n,...C(o)})}function Jk(e,n){return new e({type:"success",innerType:n})}function Wk(e,n,o){return new e({type:"catch",innerType:n,catchValue:typeof o=="function"?o:()=>o})}function qk(e,n,o){return new e({type:"pipe",in:n,out:o})}function Hk(e,n){return new e({type:"readonly",innerType:n})}function Kk(e,n,o){return new e({type:"template_literal",parts:n,...C(o)})}function Xk(e,n){return new e({type:"lazy",getter:n})}function Yk(e,n){return new e({type:"promise",innerType:n})}function Wl(e,n,o){let r=C(o);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:n,...r})}function ql(e,n,o){return new e({type:"custom",check:"custom",fn:n,...C(o)})}function Hl(e,n){let o=Qg(r=>(r.addIssue=t=>{if(typeof t=="string")r.issues.push(un(t,r.value,o._zod.def));else{let i=t;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=o),i.continue??(i.continue=!o._zod.def.abort),r.issues.push(un(i))}},e(r.value,r)),n);return o}function Qg(e,n){let o=new oe({check:"custom",...C(n)});return o._zod.check=e,o}function Kl(e){let n=new oe({check:"describe"});return n._zod.onattach=[o=>{let r=ye.get(o)??{};ye.add(o,{...r,description:e})}],n._zod.check=()=>{},n}function Xl(e){let n=new oe({check:"meta"});return n._zod.onattach=[o=>{let r=ye.get(o)??{};ye.add(o,{...r,...e})}],n._zod.check=()=>{},n}function Yl(e,n){let o=C(n),r=o.truthy??["true","1","yes","on","y","enabled"],t=o.falsy??["false","0","no","off","n","disabled"];o.case!=="sensitive"&&(r=r.map(v=>typeof v=="string"?v.toLowerCase():v),t=t.map(v=>typeof v=="string"?v.toLowerCase():v));let i=new Set(r),s=new Set(t),a=e.Codec??xo,l=e.Boolean??ko,d=e.String??Zt,p=new d({type:"string",error:o.error}),m=new l({type:"boolean",error:o.error}),g=new a({type:"pipe",in:p,out:m,transform:((v,$)=>{let M=v;return o.case!=="sensitive"&&(M=M.toLowerCase()),i.has(M)?!0:s.has(M)?!1:($.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:$.value,inst:g,continue:!1}),{})}),reverseTransform:((v,$)=>v===!0?r[0]||"true":t[0]||"false"),error:o.error});return g}function Tn(e,n,o,r={}){let t=C(r),i={...C(r),check:"string_format",type:"string",format:n,fn:typeof o=="function"?o:a=>o.test(a),...t};return o instanceof RegExp&&(i.pattern=o),new e(i)}function Pt(e){let n=e?.target??"draft-2020-12";return n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ye,target:n,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function K(e,n,o={path:[],schemaPath:[]}){var r;let t=e._zod.def,i=n.seen.get(e);if(i)return i.count++,o.schemaPath.includes(e)&&(i.cycle=o.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:o.path};n.seen.set(e,s);let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{let p={...o,schemaPath:[...o.schemaPath,e],path:o.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,s.schema,p);else{let g=s.schema,v=n.processors[t.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${t.type}`);v(e,n,g,p)}let m=e._zod.parent;m&&(s.ref||(s.ref=m),K(m,n,p),n.seen.get(m).isParent=!0)}let l=n.metadataRegistry.get(e);return l&&Object.assign(s.schema,l),n.io==="input"&&_e(e)&&(delete s.schema.examples,delete s.schema.default),n.io==="input"&&"_prefault"in s.schema&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault,n.seen.get(e).schema}function It(e,n){let o=e.seen.get(n);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let l=r.get(a);if(l&&l!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(a,s[0])}}let t=s=>{let a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let m=e.external.registry.get(s[0])?.id,g=e.external.uri??($=>$);if(m)return{ref:g(m)};let v=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=v,{defId:v,ref:`${g("__shared")}#/${a}/${v}`}}if(s[1]===o)return{ref:"#"};let d=`#/${a}/`,p=s[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:d+p}},i=s=>{if(s[1].schema.$ref)return;let a=s[1],{ref:l,defId:d}=t(s);a.def={...a.schema},d&&(a.defId=d);let p=a.schema;for(let m in p)delete p[m];p.$ref=l};if(e.cycles==="throw")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
71
|
+
|
|
72
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(n===s[0]){i(s);continue}if(e.external){let d=e.external.registry.get(s[0])?.id;if(n!==s[0]&&d){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1&&e.reused==="ref"){i(s);continue}}}function Tt(e,n){let o=e.seen.get(n);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=a=>{let l=e.seen.get(a);if(l.ref===null)return;let d=l.def??l.schema,p={...d},m=l.ref;if(l.ref=null,m){r(m);let v=e.seen.get(m),$=v.schema;if($.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push($)):Object.assign(d,$),Object.assign(d,p),a._zod.parent===m)for(let _ in d)_==="$ref"||_==="allOf"||_ in p||delete d[_];if($.$ref&&v.def)for(let _ in d)_==="$ref"||_==="allOf"||_ in v.def&&JSON.stringify(d[_])===JSON.stringify(v.def[_])&&delete d[_]}let g=a._zod.parent;if(g&&g!==m){r(g);let v=e.seen.get(g);if(v?.schema.$ref&&(d.$ref=v.schema.$ref,v.def))for(let $ in d)$==="$ref"||$==="allOf"||$ in v.def&&JSON.stringify(d[$])===JSON.stringify(v.def[$])&&delete d[$]}e.override({zodSchema:a,jsonSchema:d,path:l.path??[]})};for(let a of[...e.seen.entries()].reverse())r(a[0]);let t={};if(e.target==="draft-2020-12"?t.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?t.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?t.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let a=e.external.registry.get(n)?.id;if(!a)throw new Error("Schema is missing an `id` property");t.$id=e.external.uri(a)}Object.assign(t,o.def??o.schema);let i=e.metadataRegistry.get(n)?.id;i!==void 0&&t.id===i&&delete t.id;let s=e.external?.defs??{};for(let a of e.seen.entries()){let l=a[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,s[l.defId]=l.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?t.$defs=s:t.definitions=s);try{let a=JSON.parse(JSON.stringify(t));return Object.defineProperty(a,"~standard",{value:{...n["~standard"],jsonSchema:{input:En(n,"input",e.processors),output:En(n,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function _e(e,n){let o=n??{seen:new Set};if(o.seen.has(e))return!1;o.seen.add(e);let r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return _e(r.element,o);if(r.type==="set")return _e(r.valueType,o);if(r.type==="lazy")return _e(r.getter(),o);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return _e(r.innerType,o);if(r.type==="intersection")return _e(r.left,o)||_e(r.right,o);if(r.type==="record"||r.type==="map")return _e(r.keyType,o)||_e(r.valueType,o);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:_e(r.in,o)||_e(r.out,o);if(r.type==="object"){for(let t in r.shape)if(_e(r.shape[t],o))return!0;return!1}if(r.type==="union"){for(let t of r.options)if(_e(t,o))return!0;return!1}if(r.type==="tuple"){for(let t of r.items)if(_e(t,o))return!0;return!!(r.rest&&_e(r.rest,o))}return!1}var Ql=(e,n={})=>o=>{let r=Pt({...o,processors:n});return K(e,r),It(r,e),Tt(r,e)},En=(e,n,o={})=>r=>{let{libraryOptions:t,target:i}=r??{},s=Pt({...t??{},target:i,io:n,processors:o});return K(e,s),It(s,e),Tt(s,e)};var Qk={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},eu=(e,n,o,r)=>{let t=o;t.type="string";let{minimum:i,maximum:s,format:a,patterns:l,contentEncoding:d}=e._zod.bag;if(typeof i=="number"&&(t.minLength=i),typeof s=="number"&&(t.maxLength=s),a&&(t.format=Qk[a]??a,t.format===""&&delete t.format,a==="time"&&delete t.format),d&&(t.contentEncoding=d),l&&l.size>0){let p=[...l];p.length===1?t.pattern=p[0].source:p.length>1&&(t.allOf=[...p.map(m=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},tu=(e,n,o,r)=>{let t=o,{minimum:i,maximum:s,format:a,multipleOf:l,exclusiveMaximum:d,exclusiveMinimum:p}=e._zod.bag;typeof a=="string"&&a.includes("int")?t.type="integer":t.type="number";let m=typeof p=="number"&&p>=(i??Number.NEGATIVE_INFINITY),g=typeof d=="number"&&d<=(s??Number.POSITIVE_INFINITY),v=n.target==="draft-04"||n.target==="openapi-3.0";m?v?(t.minimum=p,t.exclusiveMinimum=!0):t.exclusiveMinimum=p:typeof i=="number"&&(t.minimum=i),g?v?(t.maximum=d,t.exclusiveMaximum=!0):t.exclusiveMaximum=d:typeof s=="number"&&(t.maximum=s),typeof l=="number"&&(t.multipleOf=l)},nu=(e,n,o,r)=>{o.type="boolean"},ou=(e,n,o,r)=>{if(n.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},ru=(e,n,o,r)=>{if(n.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},iu=(e,n,o,r)=>{n.target==="openapi-3.0"?(o.type="string",o.nullable=!0,o.enum=[null]):o.type="null"},su=(e,n,o,r)=>{if(n.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},au=(e,n,o,r)=>{if(n.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},cu=(e,n,o,r)=>{o.not={}},lu=(e,n,o,r)=>{},uu=(e,n,o,r)=>{},du=(e,n,o,r)=>{if(n.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},pu=(e,n,o,r)=>{let t=e._zod.def,i=lo(t.entries);i.every(s=>typeof s=="number")&&(o.type="number"),i.every(s=>typeof s=="string")&&(o.type="string"),o.enum=i},mu=(e,n,o,r)=>{let t=e._zod.def,i=[];for(let s of t.values)if(s===void 0){if(n.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(n.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];o.type=s===null?"null":typeof s,n.target==="draft-04"||n.target==="openapi-3.0"?o.enum=[s]:o.const=s}else i.every(s=>typeof s=="number")&&(o.type="number"),i.every(s=>typeof s=="string")&&(o.type="string"),i.every(s=>typeof s=="boolean")&&(o.type="boolean"),i.every(s=>s===null)&&(o.type="null"),o.enum=i},gu=(e,n,o,r)=>{if(n.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},fu=(e,n,o,r)=>{let t=o,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");t.type="string",t.pattern=i.source},hu=(e,n,o,r)=>{let t=o,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:l}=e._zod.bag;s!==void 0&&(i.minLength=s),a!==void 0&&(i.maxLength=a),l?l.length===1?(i.contentMediaType=l[0],Object.assign(t,i)):(Object.assign(t,i),t.anyOf=l.map(d=>({contentMediaType:d}))):Object.assign(t,i)},vu=(e,n,o,r)=>{o.type="boolean"},yu=(e,n,o,r)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},$u=(e,n,o,r)=>{if(n.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},bu=(e,n,o,r)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},ku=(e,n,o,r)=>{if(n.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Su=(e,n,o,r)=>{if(n.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},xu=(e,n,o,r)=>{let t=o,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(t.minItems=s),typeof a=="number"&&(t.maxItems=a),t.type="array",t.items=K(i.element,n,{...r,path:[...r.path,"items"]})},wu=(e,n,o,r)=>{let t=o,i=e._zod.def;t.type="object",t.properties={};let s=i.shape;for(let d in s)t.properties[d]=K(s[d],n,{...r,path:[...r.path,"properties",d]});let a=new Set(Object.keys(s)),l=new Set([...a].filter(d=>{let p=i.shape[d]._zod;return n.io==="input"?p.optin===void 0:p.optout===void 0}));l.size>0&&(t.required=Array.from(l)),i.catchall?._zod.def.type==="never"?t.additionalProperties=!1:i.catchall?i.catchall&&(t.additionalProperties=K(i.catchall,n,{...r,path:[...r.path,"additionalProperties"]})):n.io==="output"&&(t.additionalProperties=!1)},hi=(e,n,o,r)=>{let t=e._zod.def,i=t.inclusive===!1,s=t.options.map((a,l)=>K(a,n,{...r,path:[...r.path,i?"oneOf":"anyOf",l]}));i?o.oneOf=s:o.anyOf=s},Cu=(e,n,o,r)=>{let t=e._zod.def,i=K(t.left,n,{...r,path:[...r.path,"allOf",0]}),s=K(t.right,n,{...r,path:[...r.path,"allOf",1]}),a=d=>"allOf"in d&&Object.keys(d).length===1,l=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];o.allOf=l},_u=(e,n,o,r)=>{let t=o,i=e._zod.def;t.type="array";let s=n.target==="draft-2020-12"?"prefixItems":"items",a=n.target==="draft-2020-12"||n.target==="openapi-3.0"?"items":"additionalItems",l=i.items.map((g,v)=>K(g,n,{...r,path:[...r.path,s,v]})),d=i.rest?K(i.rest,n,{...r,path:[...r.path,a,...n.target==="openapi-3.0"?[i.items.length]:[]]}):null;n.target==="draft-2020-12"?(t.prefixItems=l,d&&(t.items=d)):n.target==="openapi-3.0"?(t.items={anyOf:l},d&&t.items.anyOf.push(d),t.minItems=l.length,d||(t.maxItems=l.length)):(t.items=l,d&&(t.additionalItems=d));let{minimum:p,maximum:m}=e._zod.bag;typeof p=="number"&&(t.minItems=p),typeof m=="number"&&(t.maxItems=m)},Pu=(e,n,o,r)=>{let t=o,i=e._zod.def;t.type="object";let s=i.keyType,l=s._zod.bag?.patterns;if(i.mode==="loose"&&l&&l.size>0){let p=K(i.valueType,n,{...r,path:[...r.path,"patternProperties","*"]});t.patternProperties={};for(let m of l)t.patternProperties[m.source]=p}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(t.propertyNames=K(i.keyType,n,{...r,path:[...r.path,"propertyNames"]})),t.additionalProperties=K(i.valueType,n,{...r,path:[...r.path,"additionalProperties"]});let d=s._zod.values;if(d){let p=[...d].filter(m=>typeof m=="string"||typeof m=="number");p.length>0&&(t.required=p)}},Iu=(e,n,o,r)=>{let t=e._zod.def,i=K(t.innerType,n,r),s=n.seen.get(e);n.target==="openapi-3.0"?(s.ref=t.innerType,o.nullable=!0):o.anyOf=[i,{type:"null"}]},Tu=(e,n,o,r)=>{let t=e._zod.def;K(t.innerType,n,r);let i=n.seen.get(e);i.ref=t.innerType},Eu=(e,n,o,r)=>{let t=e._zod.def;K(t.innerType,n,r);let i=n.seen.get(e);i.ref=t.innerType,o.default=JSON.parse(JSON.stringify(t.defaultValue))},Ou=(e,n,o,r)=>{let t=e._zod.def;K(t.innerType,n,r);let i=n.seen.get(e);i.ref=t.innerType,n.io==="input"&&(o._prefault=JSON.parse(JSON.stringify(t.defaultValue)))},Au=(e,n,o,r)=>{let t=e._zod.def;K(t.innerType,n,r);let i=n.seen.get(e);i.ref=t.innerType;let s;try{s=t.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}o.default=s},zu=(e,n,o,r)=>{let t=e._zod.def,i=t.in._zod.traits.has("$ZodTransform"),s=n.io==="input"?i?t.out:t.in:t.out;K(s,n,r);let a=n.seen.get(e);a.ref=s},Mu=(e,n,o,r)=>{let t=e._zod.def;K(t.innerType,n,r);let i=n.seen.get(e);i.ref=t.innerType,o.readOnly=!0},Du=(e,n,o,r)=>{let t=e._zod.def;K(t.innerType,n,r);let i=n.seen.get(e);i.ref=t.innerType},vi=(e,n,o,r)=>{let t=e._zod.def;K(t.innerType,n,r);let i=n.seen.get(e);i.ref=t.innerType},ju=(e,n,o,r)=>{let t=e._zod.innerType;K(t,n,r);let i=n.seen.get(e);i.ref=t},fi={string:eu,number:tu,boolean:nu,bigint:ou,symbol:ru,null:iu,undefined:su,void:au,never:cu,any:lu,unknown:uu,date:du,enum:pu,literal:mu,nan:gu,template_literal:fu,file:hu,success:vu,custom:yu,function:$u,transform:bu,map:ku,set:Su,array:xu,object:wu,union:hi,intersection:Cu,tuple:_u,record:Pu,nullable:Iu,nonoptional:Tu,default:Eu,prefault:Ou,catch:Au,pipe:zu,readonly:Mu,promise:Du,optional:vi,lazy:ju};function yi(e,n){if("_idmap"in e){let r=e,t=Pt({...n,processors:fi}),i={};for(let l of r._idmap.entries()){let[d,p]=l;K(p,t)}let s={},a={registry:r,uri:n?.uri,defs:i};t.external=a;for(let l of r._idmap.entries()){let[d,p]=l;It(t,p),s[d]=Tt(t,p)}if(Object.keys(i).length>0){let l=t.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[l]:i}}return{schemas:s}}let o=Pt({...n,processors:fi});return K(e,o),It(o,e),Tt(o,e)}var $i=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(n){this.ctx.counter=n}get seen(){return this.ctx.seen}constructor(n){let o=n?.target??"draft-2020-12";o==="draft-4"&&(o="draft-04"),o==="draft-7"&&(o="draft-07"),this.ctx=Pt({processors:fi,target:o,...n?.metadata&&{metadata:n.metadata},...n?.unrepresentable&&{unrepresentable:n.unrepresentable},...n?.override&&{override:n.override},...n?.io&&{io:n.io}})}process(n,o={path:[],schemaPath:[]}){return K(n,this.ctx,o)}emit(n,o){o&&(o.cycles&&(this.ctx.cycles=o.cycles),o.reused&&(this.ctx.reused=o.reused),o.external&&(this.ctx.external=o.external)),It(this.ctx,n);let r=Tt(this.ctx,n),{"~standard":t,...i}=r;return i}};var ef={};var Io={};lt(Io,{ZodAny:()=>sd,ZodArray:()=>ud,ZodBase64:()=>Ri,ZodBase64URL:()=>Fi,ZodBigInt:()=>Ln,ZodBigIntFormat:()=>Vi,ZodBoolean:()=>Nn,ZodCIDRv4:()=>Li,ZodCIDRv6:()=>Ui,ZodCUID:()=>Oi,ZodCUID2:()=>Ai,ZodCatch:()=>Ad,ZodCodec:()=>Ro,ZodCustom:()=>Fo,ZodCustomStringFormat:()=>Dn,ZodDate:()=>Do,ZodDefault:()=>_d,ZodDiscriminatedUnion:()=>pd,ZodE164:()=>Zi,ZodEmail:()=>Ii,ZodEmoji:()=>Ti,ZodEnum:()=>zn,ZodExactOptional:()=>xd,ZodFile:()=>kd,ZodFunction:()=>Zd,ZodGUID:()=>Eo,ZodIPv4:()=>ji,ZodIPv6:()=>Ni,ZodIntersection:()=>md,ZodJWT:()=>Bi,ZodKSUID:()=>Di,ZodLazy:()=>Ud,ZodLiteral:()=>bd,ZodMAC:()=>Qu,ZodMap:()=>yd,ZodNaN:()=>Md,ZodNanoID:()=>Ei,ZodNever:()=>cd,ZodNonOptional:()=>Ki,ZodNull:()=>rd,ZodNullable:()=>Cd,ZodNumber:()=>jn,ZodNumberFormat:()=>Wt,ZodObject:()=>No,ZodOptional:()=>Hi,ZodPipe:()=>Uo,ZodPrefault:()=>Id,ZodPreprocess:()=>Dd,ZodPromise:()=>Fd,ZodReadonly:()=>jd,ZodRecord:()=>An,ZodSet:()=>$d,ZodString:()=>Mn,ZodStringFormat:()=>ee,ZodSuccess:()=>Od,ZodSymbol:()=>nd,ZodTemplateLiteral:()=>Ld,ZodTransform:()=>Sd,ZodTuple:()=>fd,ZodType:()=>B,ZodULID:()=>zi,ZodURL:()=>Mo,ZodUUID:()=>Ye,ZodUndefined:()=>od,ZodUnion:()=>Lo,ZodUnknown:()=>ad,ZodVoid:()=>ld,ZodXID:()=>Mi,ZodXor:()=>dd,_ZodString:()=>Pi,_default:()=>Pd,_function:()=>uh,any:()=>Ff,array:()=>jo,base64:()=>wf,base64url:()=>Cf,bigint:()=>jf,boolean:()=>td,catch:()=>zd,check:()=>dh,cidrv4:()=>Sf,cidrv6:()=>xf,codec:()=>sh,cuid:()=>gf,cuid2:()=>ff,custom:()=>ph,date:()=>Bf,describe:()=>mh,discriminatedUnion:()=>Hf,e164:()=>_f,email:()=>of,emoji:()=>pf,enum:()=>Wi,exactOptional:()=>wd,file:()=>nh,float32:()=>Af,float64:()=>zf,function:()=>uh,guid:()=>rf,hash:()=>Of,hex:()=>Ef,hostname:()=>Tf,httpUrl:()=>df,instanceof:()=>fh,int:()=>Ci,int32:()=>Mf,int64:()=>Nf,intersection:()=>gd,invertCodec:()=>ah,ipv4:()=>$f,ipv6:()=>kf,json:()=>vh,jwt:()=>Pf,keyof:()=>Vf,ksuid:()=>yf,lazy:()=>Rd,literal:()=>th,looseObject:()=>Wf,looseRecord:()=>Xf,mac:()=>bf,map:()=>Yf,meta:()=>gh,nan:()=>ih,nanoid:()=>mf,nativeEnum:()=>eh,never:()=>Gi,nonoptional:()=>Ed,null:()=>id,nullable:()=>Ao,nullish:()=>oh,number:()=>ed,object:()=>Gf,optional:()=>Oo,partialRecord:()=>Kf,pipe:()=>_i,prefault:()=>Td,preprocess:()=>yh,promise:()=>lh,readonly:()=>Nd,record:()=>vd,refine:()=>Bd,set:()=>Qf,strictObject:()=>Jf,string:()=>To,stringFormat:()=>If,stringbool:()=>hh,success:()=>rh,superRefine:()=>Vd,symbol:()=>Uf,templateLiteral:()=>ch,transform:()=>qi,tuple:()=>hd,uint32:()=>Df,uint64:()=>Lf,ulid:()=>hf,undefined:()=>Rf,union:()=>Ji,unknown:()=>Jt,url:()=>uf,uuid:()=>sf,uuidv4:()=>af,uuidv6:()=>cf,uuidv7:()=>lf,void:()=>Zf,xid:()=>vf,xor:()=>qf});var bi={};lt(bi,{endsWith:()=>Sn,gt:()=>Ke,gte:()=>Ce,includes:()=>bn,length:()=>Gt,lowercase:()=>yn,lt:()=>He,lte:()=>Le,maxLength:()=>Vt,maxSize:()=>_t,mime:()=>xn,minLength:()=>dt,minSize:()=>Xe,multipleOf:()=>Ct,negative:()=>di,nonnegative:()=>mi,nonpositive:()=>pi,normalize:()=>wn,overwrite:()=>qe,positive:()=>ui,property:()=>gi,regex:()=>vn,size:()=>Bt,slugify:()=>In,startsWith:()=>kn,toLowerCase:()=>_n,toUpperCase:()=>Pn,trim:()=>Cn,uppercase:()=>$n});var On={};lt(On,{ZodISODate:()=>Si,ZodISODateTime:()=>ki,ZodISODuration:()=>wi,ZodISOTime:()=>xi,date:()=>Lu,datetime:()=>Nu,duration:()=>Ru,time:()=>Uu});var ki=h("ZodISODateTime",(e,n)=>{gc.init(e,n),ee.init(e,n)});function Nu(e){return yl(ki,e)}var Si=h("ZodISODate",(e,n)=>{fc.init(e,n),ee.init(e,n)});function Lu(e){return $l(Si,e)}var xi=h("ZodISOTime",(e,n)=>{hc.init(e,n),ee.init(e,n)});function Uu(e){return bl(xi,e)}var wi=h("ZodISODuration",(e,n)=>{vc.init(e,n),ee.init(e,n)});function Ru(e){return kl(wi,e)}var tf=(e,n)=>{fo.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:o=>vo(e,o)},flatten:{value:o=>ho(e,o)},addIssue:{value:o=>{e.issues.push(o),e.message=JSON.stringify(e.issues,cn,2)}},addIssues:{value:o=>{e.issues.push(...o),e.message=JSON.stringify(e.issues,cn,2)}},isEmpty:{get(){return e.issues.length===0}}})},tS=h("ZodError",tf),ze=h("ZodError",tf,{Parent:Error});var Fu=dn(ze),Zu=pn(ze),Bu=mn(ze),Vu=gn(ze),Gu=yr(ze),Ju=$r(ze),Wu=br(ze),qu=kr(ze),Hu=Sr(ze),Ku=xr(ze),Xu=wr(ze),Yu=Cr(ze);var nf=new WeakMap;function zo(e,n,o){let r=Object.getPrototypeOf(e),t=nf.get(r);if(t||(t=new Set,nf.set(r,t)),!t.has(n)){t.add(n);for(let i in o){let s=o[i];Object.defineProperty(r,i,{configurable:!0,enumerable:!1,get(){let a=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}}var B=h("ZodType",(e,n)=>(R.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:En(e,"input"),output:En(e,"output")}}),e.toJSONSchema=Ql(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.parse=(o,r)=>Fu(e,o,r,{callee:e.parse}),e.safeParse=(o,r)=>Bu(e,o,r),e.parseAsync=async(o,r)=>Zu(e,o,r,{callee:e.parseAsync}),e.safeParseAsync=async(o,r)=>Vu(e,o,r),e.spa=e.safeParseAsync,e.encode=(o,r)=>Gu(e,o,r),e.decode=(o,r)=>Ju(e,o,r),e.encodeAsync=async(o,r)=>Wu(e,o,r),e.decodeAsync=async(o,r)=>qu(e,o,r),e.safeEncode=(o,r)=>Hu(e,o,r),e.safeDecode=(o,r)=>Ku(e,o,r),e.safeEncodeAsync=async(o,r)=>Xu(e,o,r),e.safeDecodeAsync=async(o,r)=>Yu(e,o,r),zo(e,"ZodType",{check(...o){let r=this.def;return this.clone(w.mergeDefs(r,{checks:[...r.checks??[],...o.map(t=>typeof t=="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}),{parent:!0})},with(...o){return this.check(...o)},clone(o,r){return xe(this,o,r)},brand(){return this},register(o,r){return o.add(this,r),this},refine(o,r){return this.check(Bd(o,r))},superRefine(o,r){return this.check(Vd(o,r))},overwrite(o){return this.check(qe(o))},optional(){return Oo(this)},exactOptional(){return wd(this)},nullable(){return Ao(this)},nullish(){return Oo(Ao(this))},nonoptional(o){return Ed(this,o)},array(){return jo(this)},or(o){return Ji([this,o])},and(o){return gd(this,o)},transform(o){return _i(this,qi(o))},default(o){return Pd(this,o)},prefault(o){return Td(this,o)},catch(o){return zd(this,o)},pipe(o){return _i(this,o)},readonly(){return Nd(this)},describe(o){let r=this.clone();return ye.add(r,{description:o}),r},meta(...o){if(o.length===0)return ye.get(this);let r=this.clone();return ye.add(r,o[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(o){return o(this)}}),Object.defineProperty(e,"description",{get(){return ye.get(e)?.description},configurable:!0}),e)),Pi=h("_ZodString",(e,n)=>{Zt.init(e,n),B.init(e,n),e._zod.processJSONSchema=(r,t,i)=>eu(e,r,t,i);let o=e._zod.bag;e.format=o.format??null,e.minLength=o.minimum??null,e.maxLength=o.maximum??null,zo(e,"_ZodString",{regex(...r){return this.check(vn(...r))},includes(...r){return this.check(bn(...r))},startsWith(...r){return this.check(kn(...r))},endsWith(...r){return this.check(Sn(...r))},min(...r){return this.check(dt(...r))},max(...r){return this.check(Vt(...r))},length(...r){return this.check(Gt(...r))},nonempty(...r){return this.check(dt(1,...r))},lowercase(r){return this.check(yn(r))},uppercase(r){return this.check($n(r))},trim(){return this.check(Cn())},normalize(...r){return this.check(wn(...r))},toLowerCase(){return this.check(_n())},toUpperCase(){return this.check(Pn())},slugify(){return this.check(In())}})}),Mn=h("ZodString",(e,n)=>{Zt.init(e,n),Pi.init(e,n),e.email=o=>e.check(Vr(Ii,o)),e.url=o=>e.check(Po(Mo,o)),e.jwt=o=>e.check(li(Bi,o)),e.emoji=o=>e.check(Hr(Ti,o)),e.guid=o=>e.check(_o(Eo,o)),e.uuid=o=>e.check(Gr(Ye,o)),e.uuidv4=o=>e.check(Jr(Ye,o)),e.uuidv6=o=>e.check(Wr(Ye,o)),e.uuidv7=o=>e.check(qr(Ye,o)),e.nanoid=o=>e.check(Kr(Ei,o)),e.guid=o=>e.check(_o(Eo,o)),e.cuid=o=>e.check(Xr(Oi,o)),e.cuid2=o=>e.check(Yr(Ai,o)),e.ulid=o=>e.check(Qr(zi,o)),e.base64=o=>e.check(si(Ri,o)),e.base64url=o=>e.check(ai(Fi,o)),e.xid=o=>e.check(ei(Mi,o)),e.ksuid=o=>e.check(ti(Di,o)),e.ipv4=o=>e.check(ni(ji,o)),e.ipv6=o=>e.check(oi(Ni,o)),e.cidrv4=o=>e.check(ri(Li,o)),e.cidrv6=o=>e.check(ii(Ui,o)),e.e164=o=>e.check(ci(Zi,o)),e.datetime=o=>e.check(Nu(o)),e.date=o=>e.check(Lu(o)),e.time=o=>e.check(Uu(o)),e.duration=o=>e.check(Ru(o))});function To(e){return gl(Mn,e)}var ee=h("ZodStringFormat",(e,n)=>{Q.init(e,n),Pi.init(e,n)}),Ii=h("ZodEmail",(e,n)=>{ic.init(e,n),ee.init(e,n)});function of(e){return Vr(Ii,e)}var Eo=h("ZodGUID",(e,n)=>{oc.init(e,n),ee.init(e,n)});function rf(e){return _o(Eo,e)}var Ye=h("ZodUUID",(e,n)=>{rc.init(e,n),ee.init(e,n)});function sf(e){return Gr(Ye,e)}function af(e){return Jr(Ye,e)}function cf(e){return Wr(Ye,e)}function lf(e){return qr(Ye,e)}var Mo=h("ZodURL",(e,n)=>{sc.init(e,n),ee.init(e,n)});function uf(e){return Po(Mo,e)}function df(e){return Po(Mo,{protocol:Ne.httpProtocol,hostname:Ne.domain,...w.normalizeParams(e)})}var Ti=h("ZodEmoji",(e,n)=>{ac.init(e,n),ee.init(e,n)});function pf(e){return Hr(Ti,e)}var Ei=h("ZodNanoID",(e,n)=>{cc.init(e,n),ee.init(e,n)});function mf(e){return Kr(Ei,e)}var Oi=h("ZodCUID",(e,n)=>{lc.init(e,n),ee.init(e,n)});function gf(e){return Xr(Oi,e)}var Ai=h("ZodCUID2",(e,n)=>{uc.init(e,n),ee.init(e,n)});function ff(e){return Yr(Ai,e)}var zi=h("ZodULID",(e,n)=>{dc.init(e,n),ee.init(e,n)});function hf(e){return Qr(zi,e)}var Mi=h("ZodXID",(e,n)=>{pc.init(e,n),ee.init(e,n)});function vf(e){return ei(Mi,e)}var Di=h("ZodKSUID",(e,n)=>{mc.init(e,n),ee.init(e,n)});function yf(e){return ti(Di,e)}var ji=h("ZodIPv4",(e,n)=>{yc.init(e,n),ee.init(e,n)});function $f(e){return ni(ji,e)}var Qu=h("ZodMAC",(e,n)=>{bc.init(e,n),ee.init(e,n)});function bf(e){return hl(Qu,e)}var Ni=h("ZodIPv6",(e,n)=>{$c.init(e,n),ee.init(e,n)});function kf(e){return oi(Ni,e)}var Li=h("ZodCIDRv4",(e,n)=>{kc.init(e,n),ee.init(e,n)});function Sf(e){return ri(Li,e)}var Ui=h("ZodCIDRv6",(e,n)=>{Sc.init(e,n),ee.init(e,n)});function xf(e){return ii(Ui,e)}var Ri=h("ZodBase64",(e,n)=>{wc.init(e,n),ee.init(e,n)});function wf(e){return si(Ri,e)}var Fi=h("ZodBase64URL",(e,n)=>{Cc.init(e,n),ee.init(e,n)});function Cf(e){return ai(Fi,e)}var Zi=h("ZodE164",(e,n)=>{_c.init(e,n),ee.init(e,n)});function _f(e){return ci(Zi,e)}var Bi=h("ZodJWT",(e,n)=>{Pc.init(e,n),ee.init(e,n)});function Pf(e){return li(Bi,e)}var Dn=h("ZodCustomStringFormat",(e,n)=>{Ic.init(e,n),ee.init(e,n)});function If(e,n,o={}){return Tn(Dn,e,n,o)}function Tf(e){return Tn(Dn,"hostname",Ne.hostname,e)}function Ef(e){return Tn(Dn,"hex",Ne.hex,e)}function Of(e,n){let o=n?.enc??"hex",r=`${e}_${o}`,t=Ne[r];if(!t)throw new Error(`Unrecognized hash format: ${r}`);return Tn(Dn,r,t,n)}var jn=h("ZodNumber",(e,n)=>{Mr.init(e,n),B.init(e,n),e._zod.processJSONSchema=(r,t,i)=>tu(e,r,t,i),zo(e,"ZodNumber",{gt(r,t){return this.check(Ke(r,t))},gte(r,t){return this.check(Ce(r,t))},min(r,t){return this.check(Ce(r,t))},lt(r,t){return this.check(He(r,t))},lte(r,t){return this.check(Le(r,t))},max(r,t){return this.check(Le(r,t))},int(r){return this.check(Ci(r))},safe(r){return this.check(Ci(r))},positive(r){return this.check(Ke(0,r))},nonnegative(r){return this.check(Ce(0,r))},negative(r){return this.check(He(0,r))},nonpositive(r){return this.check(Le(0,r))},multipleOf(r,t){return this.check(Ct(r,t))},step(r,t){return this.check(Ct(r,t))},finite(){return this}});let o=e._zod.bag;e.minValue=Math.max(o.minimum??Number.NEGATIVE_INFINITY,o.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(o.maximum??Number.POSITIVE_INFINITY,o.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(o.format??"").includes("int")||Number.isSafeInteger(o.multipleOf??.5),e.isFinite=!0,e.format=o.format??null});function ed(e){return Sl(jn,e)}var Wt=h("ZodNumberFormat",(e,n)=>{Tc.init(e,n),jn.init(e,n)});function Ci(e){return wl(Wt,e)}function Af(e){return Cl(Wt,e)}function zf(e){return _l(Wt,e)}function Mf(e){return Pl(Wt,e)}function Df(e){return Il(Wt,e)}var Nn=h("ZodBoolean",(e,n)=>{ko.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>nu(e,o,r,t)});function td(e){return Tl(Nn,e)}var Ln=h("ZodBigInt",(e,n)=>{Dr.init(e,n),B.init(e,n),e._zod.processJSONSchema=(r,t,i)=>ou(e,r,t,i),e.gte=(r,t)=>e.check(Ce(r,t)),e.min=(r,t)=>e.check(Ce(r,t)),e.gt=(r,t)=>e.check(Ke(r,t)),e.gte=(r,t)=>e.check(Ce(r,t)),e.min=(r,t)=>e.check(Ce(r,t)),e.lt=(r,t)=>e.check(He(r,t)),e.lte=(r,t)=>e.check(Le(r,t)),e.max=(r,t)=>e.check(Le(r,t)),e.positive=r=>e.check(Ke(BigInt(0),r)),e.negative=r=>e.check(He(BigInt(0),r)),e.nonpositive=r=>e.check(Le(BigInt(0),r)),e.nonnegative=r=>e.check(Ce(BigInt(0),r)),e.multipleOf=(r,t)=>e.check(Ct(r,t));let o=e._zod.bag;e.minValue=o.minimum??null,e.maxValue=o.maximum??null,e.format=o.format??null});function jf(e){return Ol(Ln,e)}var Vi=h("ZodBigIntFormat",(e,n)=>{Ec.init(e,n),Ln.init(e,n)});function Nf(e){return zl(Vi,e)}function Lf(e){return Ml(Vi,e)}var nd=h("ZodSymbol",(e,n)=>{Oc.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>ru(e,o,r,t)});function Uf(e){return Dl(nd,e)}var od=h("ZodUndefined",(e,n)=>{Ac.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>su(e,o,r,t)});function Rf(e){return jl(od,e)}var rd=h("ZodNull",(e,n)=>{zc.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>iu(e,o,r,t)});function id(e){return Nl(rd,e)}var sd=h("ZodAny",(e,n)=>{Mc.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>lu(e,o,r,t)});function Ff(){return Ll(sd)}var ad=h("ZodUnknown",(e,n)=>{Dc.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>uu(e,o,r,t)});function Jt(){return Ul(ad)}var cd=h("ZodNever",(e,n)=>{jc.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>cu(e,o,r,t)});function Gi(e){return Rl(cd,e)}var ld=h("ZodVoid",(e,n)=>{Nc.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>au(e,o,r,t)});function Zf(e){return Fl(ld,e)}var Do=h("ZodDate",(e,n)=>{Lc.init(e,n),B.init(e,n),e._zod.processJSONSchema=(r,t,i)=>du(e,r,t,i),e.min=(r,t)=>e.check(Ce(r,t)),e.max=(r,t)=>e.check(Le(r,t));let o=e._zod.bag;e.minDate=o.minimum?new Date(o.minimum):null,e.maxDate=o.maximum?new Date(o.maximum):null});function Bf(e){return Zl(Do,e)}var ud=h("ZodArray",(e,n)=>{Uc.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>xu(e,o,r,t),e.element=n.element,zo(e,"ZodArray",{min(o,r){return this.check(dt(o,r))},nonempty(o){return this.check(dt(1,o))},max(o,r){return this.check(Vt(o,r))},length(o,r){return this.check(Gt(o,r))},unwrap(){return this.element}})});function jo(e,n){return Gl(ud,e,n)}function Vf(e){let n=e._zod.def.shape;return Wi(Object.keys(n))}var No=h("ZodObject",(e,n)=>{Rc.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>wu(e,o,r,t),w.defineLazy(e,"shape",()=>n.shape),zo(e,"ZodObject",{keyof(){return Wi(Object.keys(this._zod.def.shape))},catchall(o){return this.clone({...this._zod.def,catchall:o})},passthrough(){return this.clone({...this._zod.def,catchall:Jt()})},loose(){return this.clone({...this._zod.def,catchall:Jt()})},strict(){return this.clone({...this._zod.def,catchall:Gi()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(o){return w.extend(this,o)},safeExtend(o){return w.safeExtend(this,o)},merge(o){return w.merge(this,o)},pick(o){return w.pick(this,o)},omit(o){return w.omit(this,o)},partial(...o){return w.partial(Hi,this,o[0])},required(...o){return w.required(Ki,this,o[0])}})});function Gf(e,n){let o={type:"object",shape:e??{},...w.normalizeParams(n)};return new No(o)}function Jf(e,n){return new No({type:"object",shape:e,catchall:Gi(),...w.normalizeParams(n)})}function Wf(e,n){return new No({type:"object",shape:e,catchall:Jt(),...w.normalizeParams(n)})}var Lo=h("ZodUnion",(e,n)=>{So.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>hi(e,o,r,t),e.options=n.options});function Ji(e,n){return new Lo({type:"union",options:e,...w.normalizeParams(n)})}var dd=h("ZodXor",(e,n)=>{Lo.init(e,n),Fc.init(e,n),e._zod.processJSONSchema=(o,r,t)=>hi(e,o,r,t),e.options=n.options});function qf(e,n){return new dd({type:"union",options:e,inclusive:!1,...w.normalizeParams(n)})}var pd=h("ZodDiscriminatedUnion",(e,n)=>{Lo.init(e,n),Zc.init(e,n)});function Hf(e,n,o){return new pd({type:"union",options:n,discriminator:e,...w.normalizeParams(o)})}var md=h("ZodIntersection",(e,n)=>{Bc.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>Cu(e,o,r,t)});function gd(e,n){return new md({type:"intersection",left:e,right:n})}var fd=h("ZodTuple",(e,n)=>{jr.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>_u(e,o,r,t),e.rest=o=>e.clone({...e._zod.def,rest:o})});function hd(e,n,o){let r=n instanceof R,t=r?o:n,i=r?n:null;return new fd({type:"tuple",items:e,rest:i,...w.normalizeParams(t)})}var An=h("ZodRecord",(e,n)=>{Vc.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>Pu(e,o,r,t),e.keyType=n.keyType,e.valueType=n.valueType});function vd(e,n,o){return!n||!n._zod?new An({type:"record",keyType:To(),valueType:e,...w.normalizeParams(n)}):new An({type:"record",keyType:e,valueType:n,...w.normalizeParams(o)})}function Kf(e,n,o){let r=xe(e);return r._zod.values=void 0,new An({type:"record",keyType:r,valueType:n,...w.normalizeParams(o)})}function Xf(e,n,o){return new An({type:"record",keyType:e,valueType:n,mode:"loose",...w.normalizeParams(o)})}var yd=h("ZodMap",(e,n)=>{Gc.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>ku(e,o,r,t),e.keyType=n.keyType,e.valueType=n.valueType,e.min=(...o)=>e.check(Xe(...o)),e.nonempty=o=>e.check(Xe(1,o)),e.max=(...o)=>e.check(_t(...o)),e.size=(...o)=>e.check(Bt(...o))});function Yf(e,n,o){return new yd({type:"map",keyType:e,valueType:n,...w.normalizeParams(o)})}var $d=h("ZodSet",(e,n)=>{Jc.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>Su(e,o,r,t),e.min=(...o)=>e.check(Xe(...o)),e.nonempty=o=>e.check(Xe(1,o)),e.max=(...o)=>e.check(_t(...o)),e.size=(...o)=>e.check(Bt(...o))});function Qf(e,n){return new $d({type:"set",valueType:e,...w.normalizeParams(n)})}var zn=h("ZodEnum",(e,n)=>{Wc.init(e,n),B.init(e,n),e._zod.processJSONSchema=(r,t,i)=>pu(e,r,t,i),e.enum=n.entries,e.options=Object.values(n.entries);let o=new Set(Object.keys(n.entries));e.extract=(r,t)=>{let i={};for(let s of r)if(o.has(s))i[s]=n.entries[s];else throw new Error(`Key ${s} not found in enum`);return new zn({...n,checks:[],...w.normalizeParams(t),entries:i})},e.exclude=(r,t)=>{let i={...n.entries};for(let s of r)if(o.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new zn({...n,checks:[],...w.normalizeParams(t),entries:i})}});function Wi(e,n){let o=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new zn({type:"enum",entries:o,...w.normalizeParams(n)})}function eh(e,n){return new zn({type:"enum",entries:e,...w.normalizeParams(n)})}var bd=h("ZodLiteral",(e,n)=>{qc.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>mu(e,o,r,t),e.values=new Set(n.values),Object.defineProperty(e,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function th(e,n){return new bd({type:"literal",values:Array.isArray(e)?e:[e],...w.normalizeParams(n)})}var kd=h("ZodFile",(e,n)=>{Hc.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>hu(e,o,r,t),e.min=(o,r)=>e.check(Xe(o,r)),e.max=(o,r)=>e.check(_t(o,r)),e.mime=(o,r)=>e.check(xn(Array.isArray(o)?o:[o],r))});function nh(e){return Jl(kd,e)}var Sd=h("ZodTransform",(e,n)=>{Kc.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>bu(e,o,r,t),e._zod.parse=(o,r)=>{if(r.direction==="backward")throw new bt(e.constructor.name);o.addIssue=i=>{if(typeof i=="string")o.issues.push(w.issue(i,o.value,n));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=o.value),s.inst??(s.inst=e),o.issues.push(w.issue(s))}};let t=n.transform(o.value,o);return t instanceof Promise?t.then(i=>(o.value=i,o.fallback=!0,o)):(o.value=t,o.fallback=!0,o)}});function qi(e){return new Sd({type:"transform",transform:e})}var Hi=h("ZodOptional",(e,n)=>{Nr.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>vi(e,o,r,t),e.unwrap=()=>e._zod.def.innerType});function Oo(e){return new Hi({type:"optional",innerType:e})}var xd=h("ZodExactOptional",(e,n)=>{Xc.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>vi(e,o,r,t),e.unwrap=()=>e._zod.def.innerType});function wd(e){return new xd({type:"optional",innerType:e})}var Cd=h("ZodNullable",(e,n)=>{Yc.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>Iu(e,o,r,t),e.unwrap=()=>e._zod.def.innerType});function Ao(e){return new Cd({type:"nullable",innerType:e})}function oh(e){return Oo(Ao(e))}var _d=h("ZodDefault",(e,n)=>{Qc.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>Eu(e,o,r,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Pd(e,n){return new _d({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():w.shallowClone(n)}})}var Id=h("ZodPrefault",(e,n)=>{el.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>Ou(e,o,r,t),e.unwrap=()=>e._zod.def.innerType});function Td(e,n){return new Id({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():w.shallowClone(n)}})}var Ki=h("ZodNonOptional",(e,n)=>{tl.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>Tu(e,o,r,t),e.unwrap=()=>e._zod.def.innerType});function Ed(e,n){return new Ki({type:"nonoptional",innerType:e,...w.normalizeParams(n)})}var Od=h("ZodSuccess",(e,n)=>{nl.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>vu(e,o,r,t),e.unwrap=()=>e._zod.def.innerType});function rh(e){return new Od({type:"success",innerType:e})}var Ad=h("ZodCatch",(e,n)=>{ol.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>Au(e,o,r,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function zd(e,n){return new Ad({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}var Md=h("ZodNaN",(e,n)=>{rl.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>gu(e,o,r,t)});function ih(e){return Vl(Md,e)}var Uo=h("ZodPipe",(e,n)=>{Lr.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>zu(e,o,r,t),e.in=n.in,e.out=n.out});function _i(e,n){return new Uo({type:"pipe",in:e,out:n})}var Ro=h("ZodCodec",(e,n)=>{Uo.init(e,n),xo.init(e,n)});function sh(e,n,o){return new Ro({type:"pipe",in:e,out:n,transform:o.decode,reverseTransform:o.encode})}function ah(e){let n=e._zod.def;return new Ro({type:"pipe",in:n.out,out:n.in,transform:n.reverseTransform,reverseTransform:n.transform})}var Dd=h("ZodPreprocess",(e,n)=>{Uo.init(e,n),il.init(e,n)}),jd=h("ZodReadonly",(e,n)=>{sl.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>Mu(e,o,r,t),e.unwrap=()=>e._zod.def.innerType});function Nd(e){return new jd({type:"readonly",innerType:e})}var Ld=h("ZodTemplateLiteral",(e,n)=>{al.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>fu(e,o,r,t)});function ch(e,n){return new Ld({type:"template_literal",parts:e,...w.normalizeParams(n)})}var Ud=h("ZodLazy",(e,n)=>{ul.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>ju(e,o,r,t),e.unwrap=()=>e._zod.def.getter()});function Rd(e){return new Ud({type:"lazy",getter:e})}var Fd=h("ZodPromise",(e,n)=>{ll.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>Du(e,o,r,t),e.unwrap=()=>e._zod.def.innerType});function lh(e){return new Fd({type:"promise",innerType:e})}var Zd=h("ZodFunction",(e,n)=>{cl.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>$u(e,o,r,t)});function uh(e){return new Zd({type:"function",input:Array.isArray(e?.input)?hd(e?.input):e?.input??jo(Jt()),output:e?.output??Jt()})}var Fo=h("ZodCustom",(e,n)=>{dl.init(e,n),B.init(e,n),e._zod.processJSONSchema=(o,r,t)=>yu(e,o,r,t)});function dh(e){let n=new oe({check:"custom"});return n._zod.check=e,n}function ph(e,n){return Wl(Fo,e??(()=>!0),n)}function Bd(e,n={}){return ql(Fo,e,n)}function Vd(e,n){return Hl(e,n)}var mh=Kl,gh=Xl;function fh(e,n={}){let o=new Fo({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...w.normalizeParams(n)});return o._zod.bag.Class=e,o._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:o,path:[...o._zod.def.path??[]]})},o}var hh=(...e)=>Yl({Codec:Ro,Boolean:Nn,String:Mn},...e);function vh(e){let n=Rd(()=>Ji([To(e),ed(),td(),id(),jo(n),vd(To(),n)]));return n}function yh(e,n){return new Dd({type:"pipe",in:qi(e),out:n})}var oS={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function rS(e){pe({customError:e})}function iS(){return pe().customError}var Gd;Gd||(Gd={});var I={...Io,...bi,iso:On},sS=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function aS(e,n){let o=e.$schema;return o==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":o==="http://json-schema.org/draft-07/schema#"?"draft-7":o==="http://json-schema.org/draft-04/schema#"?"draft-4":n??"draft-2020-12"}function cS(e,n){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let o=e.slice(1).split("/").filter(Boolean);if(o.length===0)return n.rootSchema;let r=n.version==="draft-2020-12"?"$defs":"definitions";if(o[0]===r){let t=o[1];if(!t||!n.defs[t])throw new Error(`Reference not found: ${e}`);return n.defs[t]}throw new Error(`Reference not found: ${e}`)}function $h(e,n){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return I.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let t=e.$ref;if(n.refs.has(t))return n.refs.get(t);if(n.processing.has(t))return I.lazy(()=>{if(!n.refs.has(t))throw new Error(`Circular reference not resolved: ${t}`);return n.refs.get(t)});n.processing.add(t);let i=cS(t,n),s=be(i,n);return n.refs.set(t,s),n.processing.delete(t),s}if(e.enum!==void 0){let t=e.enum;if(n.version==="openapi-3.0"&&e.nullable===!0&&t.length===1&&t[0]===null)return I.null();if(t.length===0)return I.never();if(t.length===1)return I.literal(t[0]);if(t.every(s=>typeof s=="string"))return I.enum(t);let i=t.map(s=>I.literal(s));return i.length<2?i[0]:I.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return I.literal(e.const);let o=e.type;if(Array.isArray(o)){let t=o.map(i=>{let s={...e,type:i};return $h(s,n)});return t.length===0?I.never():t.length===1?t[0]:I.union(t)}if(!o)return I.any();let r;switch(o){case"string":{let t=I.string();if(e.format){let i=e.format;i==="email"?t=t.check(I.email()):i==="uri"||i==="uri-reference"?t=t.check(I.url()):i==="uuid"||i==="guid"?t=t.check(I.uuid()):i==="date-time"?t=t.check(I.iso.datetime()):i==="date"?t=t.check(I.iso.date()):i==="time"?t=t.check(I.iso.time()):i==="duration"?t=t.check(I.iso.duration()):i==="ipv4"?t=t.check(I.ipv4()):i==="ipv6"?t=t.check(I.ipv6()):i==="mac"?t=t.check(I.mac()):i==="cidr"?t=t.check(I.cidrv4()):i==="cidr-v6"?t=t.check(I.cidrv6()):i==="base64"?t=t.check(I.base64()):i==="base64url"?t=t.check(I.base64url()):i==="e164"?t=t.check(I.e164()):i==="jwt"?t=t.check(I.jwt()):i==="emoji"?t=t.check(I.emoji()):i==="nanoid"?t=t.check(I.nanoid()):i==="cuid"?t=t.check(I.cuid()):i==="cuid2"?t=t.check(I.cuid2()):i==="ulid"?t=t.check(I.ulid()):i==="xid"?t=t.check(I.xid()):i==="ksuid"&&(t=t.check(I.ksuid()))}typeof e.minLength=="number"&&(t=t.min(e.minLength)),typeof e.maxLength=="number"&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case"number":case"integer":{let t=o==="integer"?I.number().int():I.number();typeof e.minimum=="number"&&(t=t.min(e.minimum)),typeof e.maximum=="number"&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum=="number"?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(t=t.lt(e.maximum)),typeof e.multipleOf=="number"&&(t=t.multipleOf(e.multipleOf)),r=t;break}case"boolean":{r=I.boolean();break}case"null":{r=I.null();break}case"object":{let t={},i=e.properties||{},s=new Set(e.required||[]);for(let[l,d]of Object.entries(i)){let p=be(d,n);t[l]=s.has(l)?p:p.optional()}if(e.propertyNames){let l=be(e.propertyNames,n),d=e.additionalProperties&&typeof e.additionalProperties=="object"?be(e.additionalProperties,n):I.any();if(Object.keys(t).length===0){r=I.record(l,d);break}let p=I.object(t).passthrough(),m=I.looseRecord(l,d);r=I.intersection(p,m);break}if(e.patternProperties){let l=e.patternProperties,d=Object.keys(l),p=[];for(let g of d){let v=be(l[g],n),$=I.string().regex(new RegExp(g));p.push(I.looseRecord($,v))}let m=[];if(Object.keys(t).length>0&&m.push(I.object(t).passthrough()),m.push(...p),m.length===0)r=I.object({}).passthrough();else if(m.length===1)r=m[0];else{let g=I.intersection(m[0],m[1]);for(let v=2;v<m.length;v++)g=I.intersection(g,m[v]);r=g}break}let a=I.object(t);e.additionalProperties===!1?r=a.strict():typeof e.additionalProperties=="object"?r=a.catchall(be(e.additionalProperties,n)):r=a.passthrough();break}case"array":{let t=e.prefixItems,i=e.items;if(t&&Array.isArray(t)){let s=t.map(l=>be(l,n)),a=i&&typeof i=="object"&&!Array.isArray(i)?be(i,n):void 0;a?r=I.tuple(s).rest(a):r=I.tuple(s),typeof e.minItems=="number"&&(r=r.check(I.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(I.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(l=>be(l,n)),a=e.additionalItems&&typeof e.additionalItems=="object"?be(e.additionalItems,n):void 0;a?r=I.tuple(s).rest(a):r=I.tuple(s),typeof e.minItems=="number"&&(r=r.check(I.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(I.maxLength(e.maxItems)))}else if(i!==void 0){let s=be(i,n),a=I.array(s);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),r=a}else r=I.array(I.any());break}default:throw new Error(`Unsupported type: ${o}`)}return r}function be(e,n){if(typeof e=="boolean")return e?I.any():I.never();let o=$h(e,n),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map(d=>be(d,n)),l=I.union(a);o=r?I.intersection(o,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(d=>be(d,n)),l=I.xor(a);o=r?I.intersection(o,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)o=r?o:I.any();else{let a=r?o:be(e.allOf[0],n),l=r?0:1;for(let d=l;d<e.allOf.length;d++)a=I.intersection(a,be(e.allOf[d],n));o=a}e.nullable===!0&&n.version==="openapi-3.0"&&(o=I.nullable(o)),e.readOnly===!0&&(o=I.readonly(o)),e.default!==void 0&&(o=o.default(e.default));let t={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of i)a in e&&(t[a]=e[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in e&&(t[a]=e[a]);for(let a of Object.keys(e))sS.has(a)||(t[a]=e[a]);return Object.keys(t).length>0&&n.registry.add(o,t),e.description&&(o=o.describe(e.description)),o}function bh(e,n){if(typeof e=="boolean")return e?I.any():I.never();let o;try{o=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let r=aS(o,n?.defaultTarget),t=o.$defs||o.definitions||{},i={version:r,defs:t,refs:new Map,processing:new Set,rootSchema:o,registry:n?.registry??ye};return be(o,i)}var Jd={};lt(Jd,{bigint:()=>pS,boolean:()=>dS,date:()=>mS,number:()=>uS,string:()=>lS});function lS(e){return fl(Mn,e)}function uS(e){return xl(jn,e)}function dS(e){return El(Nn,e)}function pS(e){return Al(Ln,e)}function mS(e){return Bl(Do,e)}pe(Ur());function Un(){return typeof navigator=="object"&&"userAgent"in navigator?navigator.userAgent:typeof process=="object"&&process.version!==void 0?`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`:"<environment undetectable>"}var gS="0.0.0-development",fS=`octokit-endpoint.js/${gS} ${Un()}`,hS={method:"GET",baseUrl:"https://api.github.com",headers:{accept:"application/vnd.github.v3+json","user-agent":fS},mediaType:{format:""}};function vS(e){return e?Object.keys(e).reduce((n,o)=>(n[o.toLowerCase()]=e[o],n),{}):{}}function yS(e){if(typeof e!="object"||e===null||Object.prototype.toString.call(e)!=="[object Object]")return!1;let n=Object.getPrototypeOf(e);if(n===null)return!0;let o=Object.prototype.hasOwnProperty.call(n,"constructor")&&n.constructor;return typeof o=="function"&&o instanceof o&&Function.prototype.call(o)===Function.prototype.call(e)}function xh(e,n){let o=Object.assign({},e);return Object.keys(n).forEach(r=>{yS(n[r])?r in e?o[r]=xh(e[r],n[r]):Object.assign(o,{[r]:n[r]}):Object.assign(o,{[r]:n[r]})}),o}function kh(e){for(let n in e)e[n]===void 0&&delete e[n];return e}function qd(e,n,o){if(typeof n=="string"){let[t,i]=n.split(" ");o=Object.assign(i?{method:t,url:i}:{url:t},o)}else o=Object.assign({},n);o.headers=vS(o.headers),kh(o),kh(o.headers);let r=xh(e||{},o);return o.url==="/graphql"&&(e&&e.mediaType.previews?.length&&(r.mediaType.previews=e.mediaType.previews.filter(t=>!r.mediaType.previews.includes(t)).concat(r.mediaType.previews)),r.mediaType.previews=(r.mediaType.previews||[]).map(t=>t.replace(/-preview/,""))),r}function $S(e,n){let o=/\?/.test(e)?"&":"?",r=Object.keys(n);return r.length===0?e:e+o+r.map(t=>t==="q"?"q="+n.q.split("+").map(encodeURIComponent).join("+"):`${t}=${encodeURIComponent(n[t])}`).join("&")}var bS=/\{[^{}}]+\}/g;function kS(e){return e.replace(/(?:^\W+)|(?:(?<!\W)\W+$)/g,"").split(/,/)}function SS(e){let n=e.match(bS);return n?n.map(kS).reduce((o,r)=>o.concat(r),[]):[]}function Sh(e,n){let o={__proto__:null};for(let r of Object.keys(e))n.indexOf(r)===-1&&(o[r]=e[r]);return o}function wh(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map(function(n){return/%[0-9A-Fa-f]/.test(n)||(n=encodeURI(n).replace(/%5B/g,"[").replace(/%5D/g,"]")),n}).join("")}function Fn(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16).toUpperCase()})}function Zo(e,n,o){return n=e==="+"||e==="#"?wh(n):Fn(n),o?Fn(o)+"="+n:n}function Rn(e){return e!=null}function Wd(e){return e===";"||e==="&"||e==="?"}function xS(e,n,o,r){var t=e[o],i=[];if(Rn(t)&&t!=="")if(typeof t=="string"||typeof t=="number"||typeof t=="bigint"||typeof t=="boolean")t=t.toString(),r&&r!=="*"&&(t=t.substring(0,parseInt(r,10))),i.push(Zo(n,t,Wd(n)?o:""));else if(r==="*")Array.isArray(t)?t.filter(Rn).forEach(function(s){i.push(Zo(n,s,Wd(n)?o:""))}):Object.keys(t).forEach(function(s){Rn(t[s])&&i.push(Zo(n,t[s],s))});else{let s=[];Array.isArray(t)?t.filter(Rn).forEach(function(a){s.push(Zo(n,a))}):Object.keys(t).forEach(function(a){Rn(t[a])&&(s.push(Fn(a)),s.push(Zo(n,t[a].toString())))}),Wd(n)?i.push(Fn(o)+"="+s.join(",")):s.length!==0&&i.push(s.join(","))}else n===";"?Rn(t)&&i.push(Fn(o)):t===""&&(n==="&"||n==="?")?i.push(Fn(o)+"="):t===""&&i.push("");return i}function wS(e){return{expand:CS.bind(null,e)}}function CS(e,n){var o=["+","#",".","/",";","?","&"];return e=e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(r,t,i){if(t){let a="",l=[];if(o.indexOf(t.charAt(0))!==-1&&(a=t.charAt(0),t=t.substr(1)),t.split(/,/g).forEach(function(d){var p=/([^:\*]*)(?::(\d+)|(\*))?/.exec(d);l.push(xS(n,a,p[1],p[2]||p[3]))}),a&&a!=="+"){var s=",";return a==="?"?s="&":a!=="#"&&(s=a),(l.length!==0?a:"")+l.join(s)}else return l.join(",")}else return wh(i)}),e==="/"?e:e.replace(/\/$/,"")}function Ch(e){let n=e.method.toUpperCase(),o=(e.url||"/").replace(/:([a-z]\w+)/g,"{$1}"),r=Object.assign({},e.headers),t,i=Sh(e,["method","baseUrl","url","headers","request","mediaType"]),s=SS(o);o=wS(o).expand(i),/^http/.test(o)||(o=e.baseUrl+o);let a=Object.keys(e).filter(p=>s.includes(p)).concat("baseUrl"),l=Sh(i,a);if(!/application\/octet-stream/i.test(r.accept)&&(e.mediaType.format&&(r.accept=r.accept.split(/,/).map(p=>p.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${e.mediaType.format}`)).join(",")),o.endsWith("/graphql")&&e.mediaType.previews?.length)){let p=r.accept.match(/(?<![\w-])[\w-]+(?=-preview)/g)||[];r.accept=p.concat(e.mediaType.previews).map(m=>{let g=e.mediaType.format?`.${e.mediaType.format}`:"+json";return`application/vnd.github.${m}-preview${g}`}).join(",")}return["GET","HEAD"].includes(n)?o=$S(o,l):"data"in l?t=l.data:Object.keys(l).length&&(t=l),!r["content-type"]&&typeof t<"u"&&(r["content-type"]="application/json; charset=utf-8"),["PATCH","PUT"].includes(n)&&typeof t>"u"&&(t=""),Object.assign({method:n,url:o,headers:r},typeof t<"u"?{body:t}:null,e.request?{request:e.request}:null)}function _S(e,n,o){return Ch(qd(e,n,o))}function _h(e,n){let o=qd(e,n),r=_S.bind(null,o);return Object.assign(r,{DEFAULTS:o,defaults:_h.bind(null,o),merge:qd.bind(null,o),parse:Ch})}var Ph=_h(null,hS);var Rh=w$(Oh(),1);var PS=/^-?\d+$/,Mh=/^-?\d+n+$/,Hd=JSON.stringify,Ah=JSON.parse,IS=/^-?\d+n$/,TS=/([\[:])?"(-?\d+)n"($|([\\n]|\s)*(\s|[\\n])*[,\}\]])/g,ES=/([\[:])?("-?\d+n+)n("$|"([\\n]|\s)*(\s|[\\n])*[,\}\]])/g,Dh=(e,n,o)=>"rawJSON"in JSON?Hd(e,(s,a)=>typeof a=="bigint"?JSON.rawJSON(a.toString()):typeof n=="function"?n(s,a):(Array.isArray(n)&&n.includes(s),a),o):e?Hd(e,(s,a)=>typeof a=="string"&&Mh.test(a)||typeof a=="bigint"?a.toString()+"n":typeof n=="function"?n(s,a):(Array.isArray(n)&&n.includes(s),a),o).replace(TS,"$1$2$3").replace(ES,"$1$2$3"):Hd(e,n,o),es=new Map,OS=()=>{let e=JSON.parse.toString();if(es.has(e))return es.get(e);try{let n=JSON.parse("1",(o,r,t)=>!!t?.source&&t.source==="1");return es.set(e,n),n}catch{return es.set(e,!1),!1}},AS=(e,n,o,r)=>typeof n=="string"&&IS.test(n)?BigInt(n.slice(0,-1)):typeof n=="string"&&Mh.test(n)?n.slice(0,-1):typeof r!="function"?n:r(e,n,o),zS=(e,n)=>JSON.parse(e,(o,r,t)=>{let i=typeof r=="number"&&(r>Number.MAX_SAFE_INTEGER||r<Number.MIN_SAFE_INTEGER),s=t&&PS.test(t.source);return i&&s?BigInt(t.source):typeof n!="function"?r:n(o,r,t)}),jh=Number.MAX_SAFE_INTEGER.toString(),zh=jh.length,MS=/"(?:\\.|[^"])*"|-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/g,DS=/^"-?\d+n+"$/,Nh=(e,n)=>{if(!e)return Ah(e,n);if(OS())return zS(e,n);let o=e.replace(MS,(r,t,i,s)=>{let a=r[0]==='"';if(a&&DS.test(r))return r.substring(0,r.length-1)+'n"';let d=i||s,p=t&&(t.length<zh||t.length===zh&&t<=jh);return a||d||p?r:'"'+r+'n"'});return Ah(o,(r,t,i)=>AS(r,t,i,n))};var mt=class extends Error{name;status;request;response;constructor(n,o,r){super(n,{cause:r.cause}),this.name="HttpError",this.status=Number.parseInt(o),Number.isNaN(this.status)&&(this.status=0);"response"in r&&(this.response=r.response);let t=Object.assign({},r.request);r.request.headers.authorization&&(t.headers=Object.assign({},r.request.headers,{authorization:r.request.headers.authorization.replace(/(?<! ) .*$/," [REDACTED]")})),t.url=t.url.replace(/\bclient_secret=\w+/g,"client_secret=[REDACTED]").replace(/\baccess_token=\w+/g,"access_token=[REDACTED]"),this.request=t}};var jS="10.0.8",NS={headers:{"user-agent":`octokit-request.js/${jS} ${Un()}`}};function LS(e){if(typeof e!="object"||e===null||Object.prototype.toString.call(e)!=="[object Object]")return!1;let n=Object.getPrototypeOf(e);if(n===null)return!0;let o=Object.prototype.hasOwnProperty.call(n,"constructor")&&n.constructor;return typeof o=="function"&&o instanceof o&&Function.prototype.call(o)===Function.prototype.call(e)}var Lh=()=>"";async function Uh(e){let n=e.request?.fetch||globalThis.fetch;if(!n)throw new Error("fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing");let o=e.request?.log||console,r=e.request?.parseSuccessResponseBody!==!1,t=LS(e.body)||Array.isArray(e.body)?Dh(e.body):e.body,i=Object.fromEntries(Object.entries(e.headers).map(([m,g])=>[m,String(g)])),s;try{s=await n(e.url,{method:e.method,body:t,redirect:e.request?.redirect,headers:i,signal:e.request?.signal,...e.body&&{duplex:"half"}})}catch(m){let g="Unknown Error";if(m instanceof Error){if(m.name==="AbortError")throw m.status=500,m;g=m.message,m.name==="TypeError"&&"cause"in m&&(m.cause instanceof Error?g=m.cause.message:typeof m.cause=="string"&&(g=m.cause))}let v=new mt(g,500,{request:e});throw v.cause=m,v}let a=s.status,l=s.url,d={};for(let[m,g]of s.headers)d[m]=g;let p={url:l,status:a,headers:d,data:""};if("deprecation"in d){let m=d.link&&d.link.match(/<([^<>]+)>; rel="deprecation"/),g=m&&m.pop();o.warn(`[@octokit/request] "${e.method} ${e.url}" is deprecated. It is scheduled to be removed on ${d.sunset}${g?`. See ${g}`:""}`)}if(a===204||a===205)return p;if(e.method==="HEAD"){if(a<400)return p;throw new mt(s.statusText,a,{response:p,request:e})}if(a===304)throw p.data=await Kd(s),new mt("Not modified",a,{response:p,request:e});if(a>=400)throw p.data=await Kd(s),new mt(RS(p.data),a,{response:p,request:e});return p.data=r?await Kd(s):s.body,p}async function Kd(e){let n=e.headers.get("content-type");if(!n)return e.text().catch(Lh);let o=(0,Rh.safeParse)(n);if(US(o)){let r="";try{return r=await e.text(),Nh(r)}catch{return r}}else return o.type.startsWith("text/")||o.parameters.charset?.toLowerCase()==="utf-8"?e.text().catch(Lh):e.arrayBuffer().catch(()=>new ArrayBuffer(0))}function US(e){return e.type==="application/json"||e.type==="application/scim+json"}function RS(e){if(typeof e=="string")return e;if(e instanceof ArrayBuffer)return"Unknown error";if("message"in e){let n="documentation_url"in e?` - ${e.documentation_url}`:"";return Array.isArray(e.errors)?`${e.message}: ${e.errors.map(o=>JSON.stringify(o)).join(", ")}${n}`:`${e.message}${n}`}return`Unknown error: ${JSON.stringify(e)}`}function Xd(e,n){let o=e.defaults(n);return Object.assign(function(t,i){let s=o.merge(t,i);if(!s.request||!s.request.hook)return Uh(o.parse(s));let a=(l,d)=>Uh(o.parse(o.merge(l,d)));return Object.assign(a,{endpoint:o,defaults:Xd.bind(null,o)}),s.request.hook(a,s)},{endpoint:o,defaults:Xd.bind(null,o)})}var ke=Xd(Ph,NS);function FS(e){let n=e.endpoint.DEFAULTS;return/^https:\/\/(api\.)?github\.com$/.test(n.baseUrl)?"https://github.com":n.baseUrl.replace("/api/v3","")}async function Yd(e,n,o){let r={baseUrl:FS(e),headers:{accept:"application/json"},...o},t=await e(n,r);if("error"in t.data){let i=new mt(`${t.data.error_description} (${t.data.error}, ${t.data.error_uri})`,400,{request:e.endpoint.merge(n,r)});throw i.response=t,i}return t}async function Bh(e){let n=e.request||ke,o={client_id:e.clientId};return"scopes"in e&&Array.isArray(e.scopes)&&(o.scope=e.scopes.join(" ")),Yd(n,"POST /login/device/code",o)}async function Qd(e){let n=e.request||ke,o=await Yd(n,"POST /login/oauth/access_token",{client_id:e.clientId,device_code:e.code,grant_type:"urn:ietf:params:oauth:grant-type:device_code"}),r={clientType:e.clientType,clientId:e.clientId,token:o.data.access_token,scopes:o.data.scope.split(/\s+/).filter(Boolean)};if("clientSecret"in e&&(r.clientSecret=e.clientSecret),e.clientType==="github-app"){if("refresh_token"in o.data){let t=new Date(o.headers.date).getTime();r.refreshToken=o.data.refresh_token,r.expiresAt=Fh(t,o.data.expires_in),r.refreshTokenExpiresAt=Fh(t,o.data.refresh_token_expires_in)}delete r.scopes}return{...o,authentication:r}}function Fh(e,n){return new Date(e+n*1e3).toISOString()}async function Vh(e){let n=e.request||ke,o=await Yd(n,"POST /login/oauth/access_token",{client_id:e.clientId,client_secret:e.clientSecret,grant_type:"refresh_token",refresh_token:e.refreshToken}),r=new Date(o.headers.date).getTime(),t={clientType:"github-app",clientId:e.clientId,clientSecret:e.clientSecret,token:o.data.access_token,refreshToken:o.data.refresh_token,expiresAt:Zh(r,o.data.expires_in),refreshTokenExpiresAt:Zh(r,o.data.refresh_token_expires_in)};return{...o,authentication:t}}function Zh(e,n){return new Date(e+n*1e3).toISOString()}async function Gh(e){let n=e.request||ke,o=btoa(`${e.clientId}:${e.clientSecret}`);return n("DELETE /applications/{client_id}/token",{headers:{authorization:`basic ${o}`},client_id:e.clientId,access_token:e.token})}import{execFile as vx}from"child_process";import{randomUUID as OE}from"node:crypto";import{existsSync as zE,readFileSync as ME,writeFileSync as DE,unlinkSync as jE,renameSync as NE}from"node:fs";import{existsSync as GE,readFileSync as JE}from"node:fs";import{existsSync as Cx,readdirSync as _x,lstatSync as Px}from"node:fs";import{join as Ix}from"node:path";var ZS=null;function BS(e){let n=`[${e.module}]`,o=e.data&&Object.keys(e.data).length>0?` ${JSON.stringify(e.data)}`:"";process.stderr.write(`${n} ${e.level}: ${e.message}${o}
|
|
73
|
+
`)}function os(e){function n(o,r,t){let i={level:o,module:e,message:r,...t&&{data:t}};(ZS??BS)(i)}return{debug:(o,r)=>n("debug",o,r),info:(o,r)=>n("info",o,r),warn:(o,r)=>n("warn",o,r),error:(o,r)=>n("error",o,r)}}function Ot(e){return e.toLowerCase().replace(/^https?:\/\//,"").replace(/\/$/,"")}function Zn(e){if(!e.token.expiresAt)return!1;let n=new Date(e.token.expiresAt);if(isNaN(n.getTime()))return!0;let o=new Date;return n.getTime()-o.getTime()<300*1e3}function qh(e){if(!e.token.refreshTokenExpiresAt)return!1;let n=new Date(e.token.refreshTokenExpiresAt);return isNaN(n.getTime())?!0:new Date>=n}var Vo=new Map,VS=300*1e3;function GS(e){let n=Ot(e),o=Vo.get(n);return!o||Date.now()-o.cachedAt>=VS?!1:o.credentials?!Zn(o.credentials):!0}function Hh(e){e?Vo.delete(Ot(e)):Vo.clear()}function JS(e){let n=Ot(e);if(GS(n))return Vo.get(n).credentials}function WS(e,n){let o=Ot(e);Vo.set(o,{credentials:n,cachedAt:Date.now()})}var ce=rs.platform()==="win32",tt=rs.platform()==="darwin",wE=rs.platform()==="linux",q=rs.homedir();function Ve(){return ce?process.env.APPDATA||ex.join(q,"AppData","Roaming"):q}var tx=et(q,".octocode"),nx=448,Qe=process.env.OCTOCODE_HOME||tx,ge={home:Qe,config:et(Qe,".octocoderc"),credentials:et(Qe,"credentials.json"),key:et(Qe,".key"),session:et(Qe,"session.json"),stats:et(Qe,"stats.json"),repos:et(Qe,"repos"),logs:et(Qe,"logs"),cliConfig:et(Qe,"config.json"),lspConfig:et(Qe,"lsp-servers.json")};function ox(){YS(ge.home)||QS(ge.home,{recursive:!0,mode:nx})}var rx=b.object({token:b.string(),tokenType:b.literal("oauth"),scopes:b.array(b.string()).optional(),refreshToken:b.string().optional(),expiresAt:b.string().optional(),refreshTokenExpiresAt:b.string().optional()}),ix=b.object({hostname:b.string(),username:b.string(),token:rx,gitProtocol:b.enum(["ssh","https"]),createdAt:b.string(),updatedAt:b.string()}),sx=b.object({version:b.number(),credentials:b.record(b.string(),ix)}),Wh=os("token-storage");function ax(e){return e.replace(/\b(ghp_|gho_|ghu_|ghs_|ghr_)[a-zA-Z0-9]{36,}\b/g,"***MASKED***").replace(/\b[a-zA-Z0-9]{40,}\b/g,"***MASKED***")}var _E=ge.home,Et=ge.credentials,Ht=ge.key,Qh="aes-256-gcm",cx=16;function tp(){ox()}function ev(){if(tp(),ts(Ht))return qS(Ht).mode&511&63&&HS(Ht,384),Buffer.from(Kh(Ht,"utf8"),"hex");let e=Yh(32);return Xh(Ht,e.toString("hex"),{mode:384}),e}function lx(e){let n=ev(),o=Yh(cx),r=KS(Qh,n,o),t=r.update(e,"utf8","hex");t+=r.final("hex");let i=r.getAuthTag();return`${o.toString("hex")}:${i.toString("hex")}:${t}`}function ux(e){let n=ev(),[o,r,t]=e.split(":");if(!o||!r||!t)throw new Error("Invalid encrypted data format");let i=Buffer.from(o,"hex"),s=Buffer.from(r,"hex"),a=XS(Qh,n,i);a.setAuthTag(s);let l=a.update(t,"hex","utf8");return l+=a.final("utf8"),l}function is(){if(tp(),!ts(Et))return{version:1,credentials:{}};try{let e=Kh(Et,"utf8"),n=ux(e),o=JSON.parse(n),r=sx.safeParse(o);return r.success?r.data:(Wh.warn("Credentials file has invalid format \u2014 starting fresh",{file:Et}),{version:1,credentials:{}})}catch(e){let n=e instanceof Error&&e.message?ax(e.message):void 0;return Wh.warn("Could not read credentials file \u2014 you may need to login again",{file:Et,...n&&{reason:n}}),{version:1,credentials:{}}}}function tv(e){tp();let n=lx(JSON.stringify(e,null,2));Xh(Et,n,{mode:384})}function dx(){try{ts(Et)&&Jh(Et),ts(Ht)&&Jh(Ht)}catch{}}var np="178c6fc778ccc68e1d6a",ss="github.com";function px(e){return e.replace(/\b(ghp_|gho_|ghu_|ghs_|ghr_)[a-zA-Z0-9]{36,}\b/g,"***MASKED***").replace(/\b[a-zA-Z0-9]{40,}\b/g,"***MASKED***")}function mx(e){return e==="github.com"||e===ss?"https://api.github.com":`https://${e}/api/v3`}async function nv(e,n=ss,o=np){let r=await e.getCredentials(n);if(!r)return{success:!1,error:`Not logged in to ${n}`};if(!r.token.refreshToken)return{success:!1,error:"Token does not support refresh (OAuth App tokens do not expire)"};if(qh(r))return{success:!1,error:"Refresh token has expired. Please login again."};try{let t=await Vh({clientType:"github-app",clientId:o,clientSecret:"",refreshToken:r.token.refreshToken,request:ke.defaults({baseUrl:mx(n)})}),i={token:t.authentication.token,tokenType:"oauth",refreshToken:t.authentication.refreshToken,expiresAt:t.authentication.expiresAt,refreshTokenExpiresAt:t.authentication.refreshTokenExpiresAt};return await e.updateToken(n,i),{success:!0,username:r.username,hostname:n}}catch(t){return{success:!1,error:t instanceof Error?px(t.message):"Token refresh failed"}}}async function gx(e,n=ss,o=np){let r=await e.getCredentials(n);if(!r||!r.token)return{token:null,source:"none"};if(!Zn(r))return{token:r.token.token,source:"stored",username:r.username};if(r.token.refreshToken){let t=await nv(e,n,o);if(t.success){let i=await e.getCredentials(n);if(i?.token.token)return{token:i.token.token,source:"refreshed",username:i.username}}return{token:null,source:"none",refreshError:t.error}}return{token:null,source:"none",refreshError:"Token expired and no refresh token available"}}var op=["OCTOCODE_TOKEN","GH_TOKEN","GITHUB_TOKEN"];function fx(){for(let e of op){let n=process.env[e];if(n&&n.trim())return n.trim()}return null}function as(){for(let e of op){let n=process.env[e];if(n&&n.trim())return`env:${e}`}return null}function Bn(){return fx()!==null}function hx(){for(let e of op){let n=process.env[e];if(n?.trim())return{token:n.trim(),source:`env:${e}`}}return null}var yx=["/opt/homebrew/bin","/usr/local/bin","/home/linuxbrew/.linuxbrew/bin"];function Vn(e){return new Promise(n=>{let o=["auth","token"];e&&o.push("--hostname",e);let r=process.env.PATH??"",t=new Set(r.split(":")),i=yx.filter(a=>!t.has(a)),s=i.length?`${i.join(":")}:${r}`:r;vx("gh",o,{encoding:"utf8",timeout:5e3,env:{...process.env,PATH:s}},(a,l)=>{if(a||!l){n(null);return}n(l.trim()||null)})})}var ep=null;function $x(e){ep=e}function bx(){if(!ep)throw new Error("Token resolution not initialized. Call initTokenResolution() first.");return ep}async function rp(e){let n=e?.hostname??ss,o=e?.clientId??np,r=e?.getGhCliToken??Vn,t=hx();if(t)return{token:t.token,source:t.source,wasRefreshed:!1};let i=await bx().getTokenWithRefresh(n,o);if(i.token)return{token:i.token,source:"octocode-storage",wasRefreshed:i.source==="refreshed",username:i.username};try{let s=await Promise.resolve(r(n));if(s?.trim())return{token:s.trim(),source:"gh-cli",wasRefreshed:!1}}catch{}return null}var kx=os("token-storage");async function cs(e){let n=Ot(e.hostname),o={...e,hostname:n,updatedAt:new Date().toISOString()};try{let r=is();return r.credentials[n]=o,tv(r),Hh(n),{success:!0}}catch(r){let t=r instanceof Error?r.message:String(r);throw kx.error("CRITICAL: Storage failed",{error:t.replace(/\b(ghp_|gho_|ghu_|ghs_|ghr_)[a-zA-Z0-9]{36,}\b/g,"***MASKED***").replace(/\b[a-zA-Z0-9]{40,}\b/g,"***MASKED***")}),new Error("Failed to store credentials")}}async function gt(e="github.com",n){let o=Ot(e);if(!n?.bypassCache){let i=JS(o);if(i!==void 0)return i}let t=is().credentials[o]||null;return WS(o,t),t}function ip(e="github.com"){let n=Ot(e);return is().credentials[n]||null}async function sp(e="github.com"){let n=Ot(e),o=!1,r=is();return r.credentials[n]&&(delete r.credentials[n],Object.keys(r.credentials).length===0?dx():tv(r),o=!0),Hh(n),{success:o,deletedFromFile:o}}async function ov(e,n){let o=await gt(e);return o?(o.token=n,o.updatedAt=new Date().toISOString(),await cs(o),!0):!1}function ap(){return Et}async function cp(e,n){return nv({getCredentials:gt,updateToken:ov},e,n)}async function ls(e,n){return gx({getCredentials:gt,updateToken:ov},e,n)}$x({getTokenWithRefresh:ls});var Sx=b.object({rawChars:b.number(),responseChars:b.number(),savedChars:b.number(),calls:b.number()}),xx=b.object({hits:b.record(b.string(),b.number()).default({}),rateLimits:b.number().default(0)}),ns=b.record(b.string(),b.number()).default({}),wx=b.object({toolCalls:b.number(),errors:b.number(),rateLimits:b.number(),rateLimitsByProvider:ns,rawChars:b.number(),responseChars:b.number(),savedChars:b.number(),charSavingsCalls:b.number(),githubCacheHits:b.number(),githubCacheRateLimits:b.number(),packageRegistryFailures:b.number().default(0),packageRegistryFailuresByRegistry:ns}),rv=b.object({toolCalls:b.number(),errors:b.number(),rateLimits:b.number(),rateLimitsByProvider:ns,charsSavedByTool:b.record(b.string(),Sx).default({}),githubCacheHits:xx.default({hits:{},rateLimits:0}),packageRegistryFailures:ns,totalUsage:wx.optional()}),UE=b.object({version:b.literal(1),sessionId:b.string(),createdAt:b.string(),lastActiveAt:b.string(),stats:rv.optional()}),RE=b.object({version:b.literal(1),stats:rv});var FE=os("session"),ZE=ge.session,BE=ge.stats;var qE=b.looseObject({$schema:b.string().optional(),version:b.number().int().optional(),github:b.record(b.string(),b.unknown()).optional(),local:b.record(b.string(),b.unknown()).optional(),tools:b.record(b.string(),b.unknown()).optional(),network:b.record(b.string(),b.unknown()).optional(),telemetry:b.record(b.string(),b.unknown()).optional(),lsp:b.record(b.string(),b.unknown()).optional(),output:b.record(b.string(),b.unknown()).optional()}),HE=ge.config;var KE=os("octocode-config");function Pe(e){if(!Cx(e))return 0;let n=0,o=[e];for(;o.length>0;){let r=o.pop(),t;try{t=_x(r)}catch{continue}for(let i of t){let s=Ix(r,i);try{let a=Px(s);if(a.isSymbolicLink())continue;a.isDirectory()?o.push(s):a.isFile()&&(n+=a.size)}catch{}}}return n}function ae(e){if(e<1024)return`${e} B`;let n=e/1024;if(n<1024)return`${n.toFixed(1)} KB`;let o=n/1024;return o<1024?`${o.toFixed(1)} MB`:`${(o/1024).toFixed(2)} GB`}function us(){process.stdout.write("\x1B[2J\x1B[3J\x1B[H")}function lp(e,n){try{let o,r;return n?(o=n,r=[e]):tt?(o="open",r=[e]):ce?(o="cmd",r=["/c","start",'""',e]):(o="xdg-open",r=[e]),Tx(o,r,{stdio:"ignore",shell:ce&&!n}).status===0}catch{return!1}}function iv(e,n){switch(n){case"cursor":return lp(e,"cursor");case"vscode":return lp(e,"code");default:return lp(e)}}import H from"node:path";import Me from"node:fs";import ds from"node:path";var Ex=process.env.OCTOCODE_DEBUG==="1";function he(e,n){try{return e()}catch(o){return Ex&&console.error("[trySafe]",o instanceof Error?o.message:o),n}}function F(e){return he(()=>Me.existsSync(e)&&Me.statSync(e).isDirectory(),!1)}function fe(e){return he(()=>Me.existsSync(e)&&Me.statSync(e).isFile(),!1)}function nt(e){return he(()=>fe(e)?Me.readFileSync(e,"utf8"):null,null)}function Go(e,n){return he(()=>{let o=ds.dirname(e);return F(o)||Me.mkdirSync(o,{recursive:!0,mode:448}),Me.writeFileSync(e,n,{encoding:"utf8",mode:384}),!0},!1)}function sv(e){return fe(e)?he(()=>{let n=new Date().toISOString().replace(/[:.]/g,"-"),o=`${e}.backup-${n}`;return Me.copyFileSync(e,o),o},null):null}function av(e){let n=nt(e);return n?he(()=>JSON.parse(n),null):null}function cv(e,n){return he(()=>{let o=JSON.stringify(n,null,2)+`
|
|
74
|
+
`;return Go(e,o)},!1)}function up(e,n){return he(()=>{if(!F(e))return!1;F(n)||Me.mkdirSync(n,{recursive:!0});let o=Me.readdirSync(e,{withFileTypes:!0});for(let r of o){let t=ds.join(e,r.name),i=ds.join(n,r.name);if(r.isDirectory()){if(!up(t,i))return!1}else Me.copyFileSync(t,i)}return!0},!1)}function Ue(e){return he(()=>F(e)?Me.readdirSync(e,{withFileTypes:!0}).filter(n=>{if(n.isDirectory())return!0;if(n.isSymbolicLink())try{return Me.statSync(ds.join(e,n.name)).isDirectory()}catch{return!1}return!1}).map(n=>n.name):[],[])}function Gn(e){return he(()=>F(e)?(Me.rmSync(e,{recursive:!0,force:!0}),!0):!1,!1)}function lv(){return ce?Ve():tt?H.join(q,"Library","Application Support"):process.env.XDG_CONFIG_HOME||H.join(q,".config")}function Ox(){let e=lv();return ce?H.join(e,"Code","User","globalStorage"):tt?H.join(e,"Code","User","globalStorage"):H.join(e,"Code","User","globalStorage")}var J={cursor:{id:"cursor",name:"Cursor",description:"AI-first code editor",category:"ide",url:"https://cursor.sh",envVars:["CURSOR_AGENT","CURSOR_TRACE_ID","CURSOR_SESSION_ID","CURSOR"]},"claude-desktop":{id:"claude-desktop",name:"Claude Desktop",description:"Anthropic's desktop app",category:"desktop",url:"https://claude.ai/download"},"claude-code":{id:"claude-code",name:"Claude Code",description:"Claude CLI for terminal",category:"cli",url:"https://docs.anthropic.com/claude-code",envVars:["CLAUDE_CODE"]},"vscode-cline":{id:"vscode-cline",name:"Cline (VS Code)",description:"AI coding assistant extension",category:"extension",url:"https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev",envVars:["VSCODE_PID","TERM_PROGRAM"]},"vscode-roo":{id:"vscode-roo",name:"Roo-Cline (VS Code)",description:"Roo AI coding extension",category:"extension",envVars:["VSCODE_PID"]},windsurf:{id:"windsurf",name:"Windsurf",description:"Codeium AI IDE",category:"ide",url:"https://codeium.com/windsurf",envVars:["WINDSURF_SESSION"]},trae:{id:"trae",name:"Trae",description:"Adaptive AI IDE",category:"ide",url:"https://trae.ai"},antigravity:{id:"antigravity",name:"Antigravity",description:"Gemini-powered AI IDE",category:"ide"},"vscode-continue":{id:"vscode-continue",name:"Continue (VS Code)",description:"Open-source AI assistant",category:"extension",url:"https://continue.dev",envVars:["VSCODE_PID"]},zed:{id:"zed",name:"Zed",description:"High-performance code editor",category:"ide",url:"https://zed.dev",envVars:["ZED_TERM"]},opencode:{id:"opencode",name:"Opencode",description:"AI coding agent CLI",category:"cli",url:"https://opencode.ai",envVars:["OPENCODE"]},codex:{id:"codex",name:"Codex",description:"OpenAI Codex CLI agent",category:"cli",url:"https://github.com/openai/codex",envVars:["CODEX_HOME","CODEX_SANDBOX_TYPE"]},"gemini-cli":{id:"gemini-cli",name:"Gemini CLI",description:"Google Gemini CLI",category:"cli",url:"https://github.com/google-gemini/gemini-cli",envVars:["GEMINI_API_KEY"]},goose:{id:"goose",name:"Goose",description:"Block AI coding agent",category:"desktop",url:"https://block.github.io/goose",envVars:["GOOSE_MODE"]},kiro:{id:"kiro",name:"Kiro",description:"AWS AI IDE",category:"ide",url:"https://kiro.dev"},custom:{id:"custom",name:"Custom Path",description:"Specify your own MCP config path",category:"cli"}},ot=Object.keys(J).filter(e=>e!=="custom");function te(e,n){if(e==="custom"&&n)return n;let o=lv(),r=Ox();switch(e){case"cursor":return ce?H.join(Ve(),"Cursor","mcp.json"):H.join(q,".cursor","mcp.json");case"claude-desktop":return ce?H.join(o,"Claude","claude_desktop_config.json"):tt?H.join(o,"Claude","claude_desktop_config.json"):H.join(o,"claude","claude_desktop_config.json");case"claude-code":return H.join(q,".claude.json");case"vscode-cline":return H.join(r,"saoudrizwan.claude-dev","settings","cline_mcp_settings.json");case"vscode-roo":return H.join(r,"rooveterinaryinc.roo-cline","settings","mcp_settings.json");case"windsurf":return H.join(q,".codeium","windsurf","mcp_config.json");case"trae":return ce?H.join(Ve(),"Trae","mcp.json"):tt?H.join(o,"Trae","mcp.json"):H.join(o,"Trae","mcp.json");case"antigravity":return H.join(q,".gemini","antigravity","mcp_config.json");case"vscode-continue":return H.join(q,".continue","config.json");case"zed":return ce?H.join(Ve(),"Zed","settings.json"):tt?H.join(q,".config","zed","settings.json"):H.join(o,"zed","settings.json");case"opencode":return ce?H.join(Ve(),"opencode","config.json"):H.join(o,"opencode","config.json");case"codex":return H.join(q,".codex","config.toml");case"gemini-cli":return H.join(q,".gemini","settings.json");case"goose":return ce?H.join(Ve(),"goose","config.yaml"):tt?H.join(o,"goose","config.yaml"):H.join(o,"goose","config.yaml");case"kiro":return ce?H.join(Ve(),"Kiro","mcp.json"):H.join(q,".kiro","mcp.json");case"custom":throw new Error("Custom path requires customPath parameter");default:throw new Error(`Unknown MCP client: ${e}`)}}function At(e,n){try{let o=te(e,n),r=H.dirname(o);return F(r)}catch{return!1}}function zt(e,n){try{let o=te(e,n);return fe(o)}catch{return!1}}function Jn(){let e=process.env;return e.CURSOR_AGENT||e.CURSOR_TRACE_ID||e.CURSOR_SESSION_ID||e.CURSOR?"cursor":e.WINDSURF_SESSION?"windsurf":e.CLAUDE_CODE?"claude-code":e.ZED_TERM||e.ZED?"zed":e.OPENCODE?"opencode":e.CODEX_HOME||e.CODEX_SANDBOX_TYPE?"codex":e.GEMINI_API_KEY?"gemini-cli":e.GOOSE_MODE?"goose":e.VSCODE_PID||e.TERM_PROGRAM==="vscode"?e.ROO_CLINE||e.ROO?"vscode-roo":e.CONTINUE_GLOBAL_DIR?"vscode-continue":"vscode-cline":null}function uv(){let e=[];for(let n of ot)At(n)&&e.push(n);return e}import Ax from"node:path";import zx from"node:fs";function X(e){return fe(e)?av(e):{mcpServers:{}}}function De(e,n,o=!0){try{let r;if(o&&fe(e)){let s=sv(e);s&&(r=s)}let t=Ax.dirname(e);return F(t)||zx.mkdirSync(t,{recursive:!0,mode:448}),cv(e,n)?{success:!0,backupPath:r}:{success:!1,error:"Failed to write config file"}}catch(r){return{success:!1,error:r instanceof Error?r.message:"Unknown error"}}}function ps(e,n){let o;if(e==="npx")o={command:"npx",args:["octocode-mcp@latest"]};else throw new Error(`Unknown install method: ${e}`);if(n){let r={};n.enableLocal&&(r.ENABLE_LOCAL="true"),n.githubToken&&(r.GITHUB_TOKEN=n.githubToken),Object.keys(r).length>0&&(o.env=r)}return o}function dp(e,n){return ps(e,n)}function dv(e,n,o){let r=ce?dp(n,o):ps(n,o);return{...e,mcpServers:{...e.mcpServers,octocode:r}}}function Kt(e){return!!e.mcpServers?.octocode}function pp(e){let n=e.mcpServers?.octocode;return n&&n.command==="npx"?"npx":null}function mp(e,n){let o=te(e,n),r=zt(e,n),t=!1,i=null;if(r){let s=X(o);s&&(t=Kt(s),i=pp(s))}return{client:e,configExists:r,octocodeInstalled:t,method:i,configPath:o}}function ms(){return["cursor","claude-desktop","claude-code","opencode","vscode-cline","vscode-roo","vscode-continue","windsurf","trae","antigravity","zed"].map(n=>mp(n))}function pv(e,n){if(!e.mcpServers?.[n])return e;let o=Object.fromEntries(Object.entries(e.mcpServers).filter(([r])=>r!==n));return{...e,mcpServers:o}}function Mx(e,n){let o=e==="custom"&&n?n:te(e,n);if(!fe(o))return{installed:!1,configPath:o,configExists:!1};let t=X(o);return t?{installed:Kt(t),configPath:o,configExists:!0}:{installed:!1,configPath:o,configExists:!0}}function gs(e){let{client:n,method:o,customPath:r,force:t=!1,envOptions:i}=e,s=n==="custom"&&r?r:te(n,r),a=X(s)||{mcpServers:{}};if(Kt(a)&&!t)return{success:!1,configPath:s,alreadyInstalled:!0,error:"Octocode is already configured. Use --force to overwrite."};a=dv(a,o,i);let l=De(s,a);return l.success?{success:!0,configPath:s,backupPath:l.backupPath}:{success:!1,configPath:s,error:l.error||"Failed to write config"}}function Jo(e,n,o,r){let t=e==="custom"&&o?o:te(e,o),i=Mx(e,o),s=X(t),a=ce?dp(n,r):ps(n,r),l="create";return i.installed?l="override":i.configExists&&(l="add"),{client:e,method:n,configPath:t,serverConfig:a,action:l,existingMethod:s?pp(s):null}}import{execSync as mv,exec as Dx}from"node:child_process";import{promisify as jx}from"node:util";var MO=jx(Dx),Nx=1e3,Lx=3e3,Ux=4e3;function fs(){try{return{installed:!0,version:mv("node --version",{encoding:"utf-8",timeout:5e3,stdio:["pipe","pipe","pipe"]}).trim()}}catch{return{installed:!1,version:null}}}function hs(){try{return{installed:!0,version:`v${mv("npm --version",{encoding:"utf-8",timeout:5e3,stdio:["pipe","pipe","pipe"]}).trim()}`}}catch{return{installed:!1,version:null}}}async function gv(){let e="https://registry.npmjs.org";try{let n=Date.now(),o=new AbortController,r=setTimeout(()=>o.abort(),Ux),t=await fetch(e,{method:"HEAD",signal:o.signal});clearTimeout(r);let i=Date.now()-n;return t.ok?i>Lx?{status:"slow",latency:i}:i>Nx?{status:"slow",latency:i}:{status:"ok",latency:i}:{status:"failed",latency:i}}catch{return{status:"failed",latency:null}}}var Wo={cursor:{name:"Cursor",description:"AI-first code editor",url:"https://cursor.sh"},"claude-desktop":{name:"Claude Desktop",description:"Anthropic's Claude desktop app",url:"https://claude.ai/download"},"claude-code":{name:"Claude Code",description:"Claude CLI for terminal",url:"https://docs.anthropic.com/claude-code"},opencode:{name:"Opencode",description:"AI coding agent CLI",url:"https://opencode.ai"},"vscode-cline":{name:"Cline (VS Code)",description:"AI coding assistant extension",url:"https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev"},"vscode-roo":{name:"Roo-Cline (VS Code)",description:"Roo AI coding extension",url:"https://github.com/RooVetGit/Roo-Cline"},"vscode-continue":{name:"Continue (VS Code)",description:"Open-source AI assistant",url:"https://continue.dev"},windsurf:{name:"Windsurf",description:"Codeium AI IDE",url:"https://codeium.com/windsurf"},trae:{name:"Trae",description:"Adaptive AI IDE",url:"https://trae.ai"},antigravity:{name:"Antigravity",description:"Gemini-powered AI IDE",url:"https://antigravity.dev"},zed:{name:"Zed",description:"High-performance code editor",url:"https://zed.dev"},codex:{name:"Codex",description:"OpenAI Codex CLI agent",url:"https://github.com/openai/codex"},"gemini-cli":{name:"Gemini CLI",description:"Google Gemini CLI",url:"https://github.com/google-gemini/gemini-cli"},goose:{name:"Goose",description:"Block AI coding agent",url:"https://block.github.io/goose"},kiro:{name:"Kiro",description:"AWS AI IDE",url:"https://kiro.dev"},custom:{name:"Custom Path",description:"Specify your own MCP config path",url:""},claude:{name:"Claude Desktop",description:"Anthropic's Claude desktop app",url:"https://claude.ai/download"}},gp={cursor:Wo.cursor,claude:Wo.claude},fv={npx:{name:"NPX",description:"Run via npx from npm registry",pros:["Standard npm workflow","Faster after first run (cached)"],cons:["Requires Node.js/npm"]}};import{homedir as Rx}from"node:os";import fp from"node:path";import{spawnSync as hv}from"node:child_process";function Wn(e,n=[]){try{let o=hv(e,n,{encoding:"utf8",stdio:["pipe","pipe","pipe"],shell:!1,timeout:3e4});return{success:o.status===0,stdout:o.stdout?.trim()||"",stderr:o.stderr?.trim()||"",exitCode:o.status}}catch(o){return{success:!1,stdout:"",stderr:o instanceof Error?o.message:"Unknown error",exitCode:null}}}function vv(e){let n=process.platform==="win32"?"where":"which";return Wn(n,[e]).success}function yv(e,n=[]){try{let o=hv(e,n,{stdio:"inherit",shell:!1});return{success:o.status===0,exitCode:o.status}}catch{return{success:!1,exitCode:null}}}function $v(){return{cwd:Fx(),ide:Zx(),git:Bx()}}function Fx(){let e=process.cwd(),n=Rx(),o=fp.normalize(e),r=fp.normalize(n);return o.toLowerCase().startsWith(r.toLowerCase())?"~"+o.slice(r.length):e}function Zx(){let e=process.env;return e.CURSOR_AGENT||e.CURSOR_TRACE_ID?"Cursor":e.TERM_PROGRAM==="vscode"||e.VSCODE_PID?"VS Code":(e.TERM_PROGRAM==="Apple_Terminal","Terminal")}function Bx(){let e=Wn("git",["rev-parse","--show-toplevel"]);if(!e.success)return;let n=Wn("git",["branch","--show-current"]);return{root:fp.basename(e.stdout.trim())||"repo",branch:n.success?n.stdout:"HEAD"}}function Vx(){let e=[" \u2584\u2584\u2588\u2588\u2588\u2588\u2588\u2588\u2584\u2584"," \u2584\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2584"," \u2590\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u258C"," \u2590\u2588\u2588\u2580 \u2580\u2588\u2588\u2588\u2588\u2580 \u2580\u2588\u2588\u258C"," \u2590\u2588\u2588 \u2584 \u2588\u2588\u2588\u2588 \u2584 \u2588\u2588\u258C"," \u2590\u2588\u2588\u2588\u2588\u2584\u2584\u2580\u2580\u2580\u2580\u2584\u2584\u2588\u2588\u2588\u2588\u258C"," \u2580\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2580"," \u2584\u2584\u2584\u2588\u2588\u2588\u2588\u2580\u2580 \u2580\u2580\u2588\u2588\u2588\u2588\u2584\u2584\u2584"," \u2584\u2588\u2588\u2588\u2588\u2580\u2580\u2584\u2584\u2584\u2588\u2588\u2588\u2588\u2588\u2588\u2584\u2584\u2584\u2580\u2580\u2588\u2588\u2588\u2588\u2584","\u2590\u2588\u2588\u258C \u2584\u2588\u2588\u2580\u2580 \u2580\u2580\u2588\u2588\u2584 \u2590\u2588\u2588\u258C"," \u2580\u2580 \u2590\u2588\u2588\u258C \u2590\u2588\u2588\u258C \u2580\u2580"," \u2580\u2580 \u2580\u2580"];for(let n of e)console.log(c("magenta"," "+n))}function Gx(){let e=[" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D","\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557 ","\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D ","\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557"," \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D"];for(let n of e)console.log(c("magenta"," "+n))}function vs(){console.log(),Vx(),console.log(),Gx(),console.log(),console.log();try{let e=$v(),n=e.ide==="Cursor"||e.ide==="VS Code",o=`${u("Path")} ${e.cwd}`,r=n?`${u("IDE")} ${f(e.ide)}`:"",t=e.git?`${e.git.root} ${u("(")}${e.git.branch}${u(")")}`:"",i=[r,t].filter(Boolean).join(" ");console.log(` ${o}${i?` ${i}`:""}`),console.log()}catch{console.log()}}function ys(){console.log(),console.log(` ${c("cyan","Tip")} ${f("Quick tips for better AI coding with Octocode:")}`),console.log(),console.log(` ${c("green","-")} ${u("Prompts:")} Use ${c("cyan","/research")}, ${c("cyan","/plan")}, ${c("cyan","/implement")} in chat`),console.log(` ${c("green","-")} ${u("Skills:")} Add all via ${c("cyan","Octocode Skills")} or ${c("cyan","Manage System Skills")} -> ${c("cyan","Browse Marketplace")}`),console.log(` ${c("green","-")} ${u("Context:")} Add ${c("cyan","AGENTS.md")} to your project ${u("(you can ask octocode)")}`),console.log(),console.log(` Search${c("underscore","https://octocode.ai")}`),console.log()}import hp from"node:path";function kv(e){return e.octocodeInstalled?c("green","\u2705 installed"):e.configExists?c("blue","\u25CB Ready"):At(e.client)?c("dim","\u25CB Available"):c("dim","\u25CB Not found")}function Sv(){return["cursor","claude-desktop","claude-code","opencode","codex","gemini-cli","windsurf","trae","antigravity","goose","kiro","zed","vscode-cline","vscode-roo","vscode-continue"].map(n=>({clientId:n,status:mp(n),isAvailable:At(n)}))}async function qo(){let e=Jn(),n=Sv(),o=n.filter(t=>t.status.octocodeInstalled),r=n.filter(t=>t.isAvailable&&!t.status.octocodeInstalled);return o.length===0?await Jx(r,e):await xv(o,r,e)}async function Jx(e,n){if(console.log(),console.log(c("yellow"," \u250C"+"\u2500".repeat(60)+"\u2510")),console.log(c("yellow"," \u2502 ")+`${c("yellow","INFO")} No octocode configurations found`+" ".repeat(24)+c("yellow","\u2502")),console.log(c("yellow"," \u2514"+"\u2500".repeat(60)+"\u2518")),console.log(),console.log(` ${u("Octocode is not configured in any MCP client yet.")}`),console.log(),e.length===0){console.log(` ${c("red","X")} ${u("No MCP clients detected on this system.")}`),console.log(),console.log(` ${u("Supported clients:")}`),console.log(` ${u("\u2022 Cursor, Claude Desktop, Claude Code")}`),console.log(` ${u("\u2022 Windsurf, Zed, VS Code (Cline/Roo/Continue)")}`),console.log(),console.log(` ${u("Install a supported client and try again,")}`),console.log(` ${u('or use "Custom Path" to specify a config file.')}`),console.log();let t=[{name:`${c("cyan","-")} Custom Path - ${u("Specify your own MCP config path")}`,value:"custom"},new z,{name:`${c("dim","- Back")}`,value:"back"}],i=await j({message:"What would you like to do?",choices:t,loop:!1});if(i==="back")return null;if(i==="custom"){let s=await vp();return s?{client:"custom",customPath:s}:null}return null}let o=[];for(let{clientId:t,status:i}of e){let s=J[t],a=`${s.name} - ${u(s.description)}`;a+=` ${kv(i)}`,n===t&&(a=`${c("green","\u2605")} ${a} ${c("yellow","(Current)")}`),o.push({name:a,value:t})}o.sort((t,i)=>n===t.value?-1:n===i.value?1:0),o.push(new z),o.push({name:`${c("cyan","-")} Custom Path - ${u("Specify your own MCP config path")}`,value:"custom"}),o.push(new z),o.push({name:`${c("dim","- Back")}`,value:"back"});let r=await j({message:"Select a client to install Octocode:",choices:o,loop:!1});if(r==="back")return null;if(r==="custom"){let t=await vp();return t?{client:"custom",customPath:t}:null}return{client:r}}async function xv(e,n,o){console.log(),console.log(` ${c("green","\u2705")} Found ${f(String(e.length))} octocode configuration${e.length>1?"s":""}`),console.log();let r=[];for(let{clientId:i}of e){let s=J[i],a=`${c("green","\u2705")} ${s.name} - ${u("View/Edit configuration")}`;o===i&&(a+=` ${c("yellow","(Current)")}`),r.push({name:a,value:i})}r.sort((i,s)=>o===i.value?-1:o===s.value?1:0),n.length>0&&(r.push(new z),r.push({name:`${c("blue","+")} Install to another client - ${u(`${n.length} available`)}`,value:"install-new"})),r.push(new z),r.push({name:`${c("cyan","-")} Custom Path - ${u("Specify your own MCP config path")}`,value:"custom"}),r.push(new z),r.push({name:`${c("dim","- Back")}`,value:"back"});let t=await j({message:"Select configuration to manage:",choices:r,loop:!1});if(t==="back")return null;if(t==="install-new")return await Wx(n,o);if(t==="custom"){let i=await vp();return i?{client:"custom",customPath:i}:null}return{client:t}}async function Wx(e,n){console.log(),console.log(` ${c("blue","INFO")} Select a client for new installation:`),console.log();let o=[];for(let{clientId:t,status:i}of e){let s=J[t],a=`${s.name} - ${u(s.description)}`;a+=` ${kv(i)}`,n===t&&(a=`${c("green","\u2605")} ${a} ${c("yellow","(Current)")}`),o.push({name:a,value:t})}o.sort((t,i)=>n===t.value?-1:n===i.value?1:0),o.push(new z),o.push({name:`${c("dim","- Back to configurations")}`,value:"back"});let r=await j({message:"Select client to install Octocode:",choices:o,loop:!1});if(r==="back"){let i=Sv().filter(s=>s.status.octocodeInstalled);return await xv(i,e,n)}return{client:r}}function bv(e){if(e.startsWith("~")){let n=process.env.HOME||process.env.USERPROFILE||"";return hp.join(n,e.slice(1))}return e}async function vp(){console.log(),console.log(` ${c("blue","INFO")} Enter the full path to your MCP config file (JSON)`),console.log(` ${u("Leave empty to go back")}`),console.log(),console.log(` ${u("Common paths:")}`),console.log(` ${u("\u2022")} ~/.cursor/mcp.json ${u("(Cursor)")}`),console.log(` ${u("\u2022")} ~/Library/Application Support/Claude/claude_desktop_config.json`),console.log(` ${u("(Claude Desktop)")}`),console.log(` ${u("\u2022")} ~/.claude.json ${u("(Claude Code)")}`),console.log(` ${u("\u2022")} ~/.config/opencode/config.json ${u("(Opencode)")}`),console.log(` ${u("\u2022")} ~/.codeium/windsurf/mcp_config.json ${u("(Windsurf)")}`),console.log(` ${u("\u2022")} ~/Library/Application Support/Trae/mcp.json ${u("(Trae)")}`),console.log(` ${u("\u2022")} ~/.gemini/antigravity/mcp_config.json ${u("(Antigravity)")}`),console.log(` ${u("\u2022")} ~/.config/zed/settings.json ${u("(Zed)")}`),console.log(` ${u("\u2022")} ~/.continue/config.json ${u("(Continue)")}`),console.log(` ${u("\u2022")} ~/.codex/config.toml ${u("(Codex - TOML format)")}`),console.log(` ${u("\u2022")} ~/.gemini/settings.json ${u("(Gemini CLI)")}`),console.log(` ${u("\u2022")} ~/.kiro/mcp.json ${u("(Kiro)")}`),console.log();let e=await de({message:"MCP config path (or press Enter to go back):",validate:n=>{if(!n.trim())return!0;let o=bv(n);if(!o.endsWith(".json"))return"Path must be a .json file (e.g., mcp.json, config.json)";if(!hp.isAbsolute(o))return"Please provide an absolute path (starting with / or ~)";let r=hp.dirname(o);return F(r)?!0:`Parent directory does not exist: ${r}
|
|
75
|
+
Create it first or choose a different location.`}});return!e||!e.trim()?null:bv(e)}async function wv(){console.log(),console.log(` ${c("blue","INFO")} ${f("Local Tools")}`),console.log(` ${u("Enable local filesystem tools for searching and reading files")}`),console.log(` ${u("in your local codebase.")}`),console.log();let e=await j({message:"Enable local tools?",choices:[{name:`${c("green","\u25CF")} Disable ${u("(Recommended)")} - ${u("Use only GitHub tools")}`,value:"disable"},{name:`${c("yellow","\u25CB")} Enable - ${u("Allow local file exploration")}`,value:"enable"},new z,{name:`${c("dim","- Back")}`,value:"back"}],loop:!1});return e==="back"?null:e==="enable"}async function Cv(){console.log(),console.log(` ${c("blue","INFO")} ${f("GitHub Authentication")}`),console.log(` ${u("Required for accessing GitHub repositories.")}`),console.log();let e=await j({message:"How would you like to authenticate with GitHub?",choices:[{name:`${c("green","\u25CF")} gh CLI ${u("(Recommended)")} - ${u("Uses existing gh auth")}`,value:"gh-cli"},{name:`${c("yellow","\u25CF")} GITHUB_TOKEN - ${u("Enter personal access token")}`,value:"token"},{name:`${c("dim","\u25CB")} Skip - ${u("Configure manually later")}`,value:"skip"},new z,{name:`${c("dim","- Back")}`,value:"back"}],loop:!1});if(e==="back")return null;if(e==="gh-cli")return console.log(),console.log(` ${c("cyan","->")} Make sure gh CLI is installed and authenticated:`),console.log(` ${u("https://cli.github.com/")}`),console.log(),console.log(` ${u("Run")} ${c("cyan","gh auth login")} ${u("if not already authenticated.")}`),console.log(),{method:"gh-cli"};if(e==="token"){console.log(),console.log(` ${u("Leave empty and press Enter to go back")}`),console.log();let n=await de({message:"Enter your GitHub personal access token:",validate:o=>o.trim()&&o.length<20?"Token appears too short":!0});return!n||!n.trim()?null:(console.log(),console.log(` ${c("yellow","WARN")} ${f("Security Note:")}`),console.log(` ${u("Your token will be saved in the MCP configuration file.")}`),console.log(` ${u("Make sure this file is not committed to version control.")}`),console.log(),{method:"token",token:n})}return{method:"skip"}}function _v(e){let n=e.env&&Object.keys(e.env).length>0,o=e.args??[];if(console.log(),console.log(c("dim"," {")),console.log(c("dim",' "mcpServers": {')),console.log(c("magenta",' "octocode"')+c("dim",": {")),console.log(c("dim",' "command": ')+c("green",`"${e.command}"`)+c("dim",",")),console.log(c("dim",' "args": [')),o.forEach((r,t)=>{let i=t===o.length-1,s=r.length>50?r.slice(0,47)+"...":r;console.log(c("dim"," ")+c("green",`"${s}"`)+(i&&!n?"":c("dim",",")))}),console.log(c("dim"," ]")+(n?c("dim",","):"")),n&&e.env){console.log(c("dim",' "env": {'));let r=Object.entries(e.env);r.forEach(([t,i],s)=>{let a=s===r.length-1,l=t.toLowerCase(),p=l.includes("token")||l.includes("secret")?"***":i;console.log(c("dim"," ")+c("cyan",`"${t}"`)+c("dim",": ")+c("green",`"${p}"`)+(a?"":c("dim",",")))}),console.log(c("dim"," }"))}console.log(c("dim"," }")),console.log(c("dim"," }")),console.log(c("dim"," }")),console.log()}function Pv(e){console.log(),console.log(` ${c("red","X")} ${f("Installation failed")}`),e.error&&console.log(` ${u("Error:")} ${e.error}`),console.log()}function Iv(e){console.log(),console.log(c("cyan"," \u250C"+"\u2500".repeat(60)+"\u2510"));let o;if(e.url)o=e.url;else{let s=e.args??[];o=e.command?`${e.command} ${s.join(" ")}`.trim():"(no command configured)"}let r=56,t=o.length>r?o.slice(0,r-3)+"...":o,i=Math.max(0,58-t.length);if(console.log(c("cyan"," \u2502 ")+u(t)+" ".repeat(i)+c("cyan","\u2502")),e.env&&Object.keys(e.env).length>0){console.log(c("cyan"," \u2502")+" ".repeat(60)+c("cyan","\u2502"));let s="Environment:",a=58-s.length;console.log(c("cyan"," \u2502 ")+f(s)+" ".repeat(a)+c("cyan","\u2502"));for(let[l,d]of Object.entries(e.env)){let p=l.toLowerCase(),g=p.includes("token")||p.includes("secret")?"***":d,v=` ${l}: ${g}`,$=v.length>r?v.slice(0,r-3)+"...":v,M=Math.max(0,58-$.length);console.log(c("cyan"," \u2502 ")+u($)+" ".repeat(M)+c("cyan","\u2502"))}}console.log(c("cyan"," \u2514"+"\u2500".repeat(60)+"\u2518"))}async function yp(){await se(),console.log(),console.log(c("blue","\u2501".repeat(66))),console.log(` ${f("Configure MCP server for your environment")}`),console.log(c("blue","\u2501".repeat(66))),console.log();let e={client:null,hasExistingOctocode:!1,enableLocal:!1,githubAuth:{method:"skip"}},n="client";for(;n!=="done";)switch(n){case"client":{let o=await qo();if(!o)return;e.client=o.client,e.customPath=o.customPath;let r=e.customPath||te(e.client),t=X(r);e.hasExistingOctocode=!!t?.mcpServers?.octocode,e.hasExistingOctocode?n="updateConfirm":n="localTools";break}case"updateConfirm":{let o=e.customPath||te(e.client),r=X(o);console.log(),console.log(c("yellow"," \u250C"+"\u2500".repeat(60)+"\u2510")),console.log(c("yellow"," \u2502 ")+`${c("yellow","WARN")} ${f("Octocode is already configured!")}`+" ".repeat(28)+c("yellow","\u2502")),console.log(c("yellow"," \u2514"+"\u2500".repeat(60)+"\u2518")),console.log(),console.log(` ${f("Current octocode configuration:")}`),Iv(r.mcpServers.octocode),console.log(),console.log(` ${u("Config file:")} ${c("cyan",o)}`),console.log(),await j({message:"What would you like to do?",choices:[{name:`${c("green","\u2705")} Update existing configuration`,value:"update"},new z,{name:`${c("dim","- Back to client selection")}`,value:"back"}],loop:!1})==="back"?n="client":n="localTools";break}case"localTools":{let o=await wv();o===null?n=e.hasExistingOctocode?"updateConfirm":"client":(e.enableLocal=o,n="githubAuth");break}case"githubAuth":{let o=await Cv();o===null?n="localTools":(e.githubAuth=o,n="confirm");break}case"confirm":{let o=await qx(e);if(o==="proceed")n="install";else if(o==="back")n="githubAuth";else{console.log(` ${u("Configuration cancelled.")}`);return}break}case"install":{await Hx(e),n="done";break}default:break}}async function qx(e){let n=J[e.client],o="npx",r={};e.enableLocal&&(r.enableLocal=!0),e.githubAuth.method==="token"&&e.githubAuth.token&&(r.githubToken=e.githubAuth.token);let t=Jo(e.client,o,e.customPath,r);console.log(),e.hasExistingOctocode?console.log(` ${c("yellow","WARN")} Will ${c("yellow","UPDATE")} existing octocode configuration`):t.action==="add"?console.log(` ${c("blue","INFO")} Config file exists, will ${c("green","ADD")} octocode entry`):console.log(` ${c("green","\u2705")} Will ${c("green","CREATE")} new config file`),console.log(),console.log(c("blue"," \u250C"+"\u2500".repeat(60)+"\u2510")),console.log(c("blue"," \u2502 ")+f("Configuration to be added:")+" ".repeat(33)+c("blue","\u2502")),console.log(c("blue"," \u2514"+"\u2500".repeat(60)+"\u2518")),_v(t.serverConfig),console.log(),console.log(` ${f("Summary:")}`),console.log(` ${u("Client:")} ${n.name}`),console.log(` ${u("Method:")} npx (octocode-mcp@latest)`);let i=e.enableLocal?c("green","Enabled"):c("dim","Disabled");console.log(` ${u("Local Tools:")} ${i}`);let s;e.githubAuth.method==="token"?s=c("green","Token configured"):e.githubAuth.method==="gh-cli"?s=c("cyan","Using gh CLI"):s=c("dim","Not configured"),console.log(` ${u("GitHub Auth:")} ${s}`);let a;return e.hasExistingOctocode?a=c("yellow","UPDATE"):t.action==="add"?a=c("green","ADD"):a=c("green","CREATE"),console.log(` ${u("Action:")} ${a}`),console.log(),console.log(` ${c("yellow","WARN")} ${f("Note:")}`),console.log(` ${u("Nothing is saved to any server. Configuration is stored locally at:")}`),console.log(` ${c("cyan",t.configPath)}`),console.log(),await j({message:"What would you like to do?",choices:[{name:`${c("green","\u2705")} Proceed with configuration`,value:"proceed"},new z,{name:`${c("dim","- Back to edit options")}`,value:"back"},{name:`${c("dim","X Cancel")}`,value:"cancel"}],loop:!1})}async function Hx(e){let o={};e.enableLocal&&(o.enableLocal=!0),e.githubAuth.method==="token"&&e.githubAuth.token&&(o.githubToken=e.githubAuth.token);let r=Jo(e.client,"npx",e.customPath,o),t=new U("Configuring octocode-mcp...").start(),i=gs({client:e.client,method:"npx",customPath:e.customPath,force:e.hasExistingOctocode,envOptions:o});i.success?(t.succeed("Octocode configured successfully!"),Kx(i,e.client,r.configPath)):(t.fail("Configuration failed"),Pv(i))}function Kx(e,n,o){let r=J[n];console.log(),console.log(c("green"," \u250C"+"\u2500".repeat(60)+"\u2510")),console.log(c("green"," \u2502 ")+`${c("green","\u2705")} ${f("Octocode installed successfully!")}`+" ".repeat(26)+c("green","\u2502")),console.log(c("green"," \u2514"+"\u2500".repeat(60)+"\u2518")),console.log(),console.log(` ${f("Configuration saved to:")}`),console.log(` ${c("cyan",o)}`),console.log(),e.backupPath&&(console.log(` ${u("Backup saved to:")} ${e.backupPath}`),console.log()),console.log(` ${f("Next steps:")}`),console.log(` 1. Restart ${r?.name||n}`),console.log(` 2. Look for ${c("cyan","octocode")} in MCP servers`),console.log()}var rt=null;function Tv(e,n){console.log(e?` ${c("green","\u2705")} Node ${f(n||"unknown")}`:` ${c("red","X")} Node ${c("red","not found")}`)}function Ev(e,n){console.log(e?` ${c("green","\u2705")} npm ${f(n||"unknown")}`:` ${c("yellow","WARN")} npm ${c("yellow","not found")}`)}function Ov(e,n){let o=n!==null?`(${n}ms)`:"";switch(e){case"ok":console.log(` ${c("green","\u2705")} Registry ${u(o)}`);break;case"slow":console.log(` ${c("yellow","WARN")} Registry ${c("yellow","slow")} ${u(o)}`);break;case"failed":console.log(` ${c("red","X")} Registry ${c("red","unreachable")} ${n!==null?u(o):""}`);break;default:break}}async function Ho(){if(rt)return Tv(rt.nodeInstalled,rt.nodeVersion),Ev(rt.npmInstalled,rt.npmVersion),Ov(rt.registryStatus,rt.registryLatency),rt;let e=fs();Tv(e.installed,e.version);let n=hs();Ev(n.installed,n.version);let o=new U(" Registry: Checking...").start(),r=await gv();return o.clear(),Ov(r.status,r.latency),rt={nodeInstalled:e.installed,nodeVersion:e.version,npmInstalled:n.installed,npmVersion:n.version,registryStatus:r.status,registryLatency:r.latency,octocodePackageAvailable:n.installed&&r.status==="ok",octocodePackageVersion:null},rt}function $p(){console.log(` ${u("For deeper diagnostics:")} ${c("cyan","npx node-doctor")}`)}function Ko(e){return!e.nodeInstalled||!e.npmInstalled||e.registryStatus==="slow"||e.registryStatus==="failed"}function Xx(e){let n=J[e.client]?.name||e.client;return e.octocodeInstalled?`${n} ${u("(Octocode installed)")}`:n}async function Yx(e,n,o){if(console.log(),console.log(c("blue","\u2501".repeat(66))),console.log(` ${f("MCP Server Details")}`),console.log(c("blue","\u2501".repeat(66))),console.log(),console.log(` ${u("ID:")} ${c("cyan",n)}`),console.log(` ${u("Command:")} ${c("green",o.command||"unknown")}`),o.args&&o.args.length>0&&(console.log(` ${u("Args:")}`),o.args.forEach(t=>{console.log(` ${t}`)})),o.env&&Object.keys(o.env).length>0&&(console.log(` ${u("Environment:")}`),Object.entries(o.env).forEach(([t,i])=>{let a=t.includes("KEY")||t.includes("TOKEN")||t.includes("SECRET")?"********":i;console.log(` ${t}=${a}`)})),console.log(),await j({message:"",choices:[{name:`${c("red","Delete")} - Remove Server`,value:"remove",description:"Remove this server from configuration"},new z,{name:`${c("dim","- Back")}`,value:"back"}],loop:!1,theme:{prefix:" ",style:{highlight:t=>c("cyan",t)}}})==="remove"&&await Nt({message:`Are you sure you want to remove "${n}" from ${J[e.client]?.name}?`,default:!1})){let i=e.configPath,s=X(i);if(s){let a=new U("Removing server...").start(),l=pv(s,n),d=De(i,l);d.success?a.succeed(`Removed ${n}`):a.fail(`Failed to remove: ${d.error}`),console.log(),await new Promise(p=>setTimeout(p,1e3))}}}async function Qx(e){let n=!0;for(;n;){let o=e.configPath,r=X(o);if(!r||!r.mcpServers){console.log(),console.log(` ${c("yellow","WARN")} No MCP configuration found or empty.`),console.log(),await new Promise(a=>setTimeout(a,1500));return}let t=Object.keys(r.mcpServers);if(t.length===0){console.log(),console.log(` ${c("yellow","WARN")} No MCP servers configured.`),console.log(),await new Promise(a=>setTimeout(a,1500));return}console.log(),console.log(` ${f(J[e.client]?.name||e.client)}`),console.log(` ${u(o)}`),console.log();let i=t.map(a=>({name:a==="octocode"?`${a}`:`MCP ${a}`,value:a,description:r.mcpServers[a].command}));i.push(new z),i.push({name:`${c("dim","- Back")}`,value:"back"});let s=await j({message:"Select an MCP server to inspect:",choices:i,pageSize:10,loop:!1,theme:{prefix:" ",style:{highlight:a=>c("cyan",a),message:a=>f(a)}}});s==="back"?n=!1:await Yx(e,s,r.mcpServers[s])}}async function bp(){await se();let e=!0;for(;e;){let o=ms().filter(i=>i.configExists);if(o.length===0){console.log(),console.log(` ${c("yellow","WARN")} No configured MCP clients found.`),console.log();return}console.log(),console.log(c("blue","\u2501".repeat(66))),console.log(` Info: ${f("MCP Configuration Details")}`),console.log(c("blue","\u2501".repeat(66))),console.log();let r=o.map(i=>({name:Xx(i),value:i.client,description:i.configPath}));r.push(new z),r.push({name:`${c("dim","- Back")}`,value:"back"});let t=await j({message:"Select a client to inspect:",choices:r,pageSize:10,loop:!1,theme:{prefix:" ",style:{highlight:i=>c("cyan",i),message:i=>f(i)}}});if(t==="back")e=!1;else{let i=o.find(s=>s.client===t);i&&await Qx(i)}}}var Av={github:[{id:"githubSearchCode",name:"Search Code",description:"Search for code patterns in GitHub repositories"},{id:"githubGetFileContent",name:"Get File Content",description:"Fetch file content from GitHub repositories"},{id:"githubViewRepoStructure",name:"View Repo Structure",description:"Browse repository directory structure"},{id:"githubSearchRepositories",name:"Search Repositories",description:"Search for GitHub repositories"},{id:"githubSearchPullRequests",name:"Search Pull Requests",description:"Search for pull requests and view diffs"},{id:"packageSearch",name:"Package Search",description:"Search npm/Python packages and find their repos"}],local:[{id:"localSearchCode",name:"Ripgrep Search",description:"Fast content search with regex support"},{id:"localViewStructure",name:"View Structure",description:"Browse local directory structure"},{id:"localFindFiles",name:"Find Files",description:"Find files by name, time, size, permissions"},{id:"localGetFileContent",name:"Fetch Content",description:"Read targeted sections of local files"}]},Xt=[{id:"enableLocal",envVar:"ENABLE_LOCAL",name:"Local File Tools",description:"Enable local file exploration tools for searching and browsing local files",type:"boolean",defaultValue:"false"},{id:"githubApiUrl",envVar:"GITHUB_API_URL",name:"GitHub API URL",description:"Custom GitHub API endpoint (for GitHub Enterprise)",type:"string",defaultValue:"https://api.github.com"},{id:"toolsToRun",envVar:"TOOLS_TO_RUN",name:"Tools to Run",description:"Specific tools to enable (all others disabled)",type:"array",defaultValue:"",toolCategory:"all"},{id:"enableTools",envVar:"ENABLE_TOOLS",name:"Enable Tools",description:"Additional tools to enable",type:"array",defaultValue:"",toolCategory:"all"},{id:"disableTools",envVar:"DISABLE_TOOLS",name:"Disable Tools",description:"Tools to disable",type:"array",defaultValue:"",toolCategory:"all"},{id:"requestTimeout",envVar:"REQUEST_TIMEOUT",name:"Request Timeout",description:"API request timeout in milliseconds",type:"number",defaultValue:"30000",validation:{min:3e4,max:6e5}},{id:"maxRetries",envVar:"MAX_RETRIES",name:"Max Retries",description:"Maximum number of API retry attempts",type:"number",defaultValue:"3",validation:{min:0,max:10}}];function ew(){return[...Av.github.map(e=>({...e,category:"github"})),...Av.local.map(e=>({...e,category:"local"}))]}function Xo(e,n){let o=e[n.envVar];return o==null||o===""?n.defaultValue:o}function $s(e,n,o=!1){let r=o?c("yellow"," \u2022"):"";if(e.type==="boolean"){let t=n==="1"||n.toLowerCase()==="true",i=t?c("green","\u2705"):c("dim","\u25CB"),s=t?c("green","enabled"):c("dim","disabled");return`${i} ${s}${r}`}if(e.type==="array"){if(!n||n===""){let s=e.id==="toolsToRun"?"(all tools)":"(none)";return`${c("dim","\u25CB")} ${c("dim",s)}${r}`}let t=n.split(",").filter(s=>s.trim()),i=t.length>2?`${t.slice(0,2).join(", ")} ${c("dim",`+${t.length-2} more`)}`:t.join(", ");return`${c("green","\u25CF")} ${i}${r}`}return e.type==="number"?n===e.defaultValue?`${c("dim","\u25CB")} ${n} ${c("dim","(default)")}${r}`:`${c("cyan","\u25CF")} ${c("cyan",n)}${r}`:n===e.defaultValue?`${c("dim","\u25CB")} ${c("dim",n)}${r}`:`${c("cyan","\u25CF")} ${c("cyan",n)}${r}`}function tw(e){return e==="1"||e.toLowerCase()==="true"}async function nw(){return await j({message:"",choices:[{name:"- Edit configuration",value:"edit",description:"Configure all octocode-mcp settings for a client"},{name:"- View all configuration options",value:"view",description:"Show available environment variables and their defaults"},{name:"- Show current JSON config",value:"show-json",description:"Display the actual MCP config JSON for a client"},new z,{name:`${c("dim","- Back to main menu")}`,value:"back"}],pageSize:10,loop:!1,theme:{prefix:" ",style:{highlight:n=>c("cyan",n)}}})}async function zv(){switch(await se(),await nw()){case"view":gw(),await ow();break;case"edit":await uw();break;case"show-json":await dw();break;default:break}}async function ow(){console.log(),await de({message:u("Press Enter to continue..."),default:""})}async function Mv(e){console.log();let n=await j({message:"Open config file?",choices:[{name:"- Open in Cursor",value:"cursor",description:"Open in Cursor IDE"},{name:"- Open in VS Code",value:"vscode",description:"Open in Visual Studio Code"},{name:"- Open in default app",value:"default",description:"Open with system default application"},new z,{name:`${c("dim","- Skip")}`,value:"no"}],pageSize:10,loop:!1,theme:{prefix:" ",style:{highlight:r=>c("cyan",r),message:r=>f(r)}}});if(n==="no")return;iv(e,n)?console.log(` ${c("green","\u2705")} Opened ${e}`):(console.log(` ${c("yellow","WARN")} Could not open file automatically`),console.log(` ${u("Try opening manually:")} ${c("cyan",e)}`)),console.log()}async function rw(e,n){let r=tw(n)?c("green","enabled"):c("dim","disabled");console.log(),console.log(` ${f(e.name)}`),console.log(` ${u(e.description)}`),console.log(` ${u("Current:")} ${r}`),console.log();let t=await j({message:`${e.name}:`,choices:[{name:`${c("green","\u2705")} Enable`,value:"enable"},{name:`${c("yellow","\u25CB")} Disable`,value:"disable"},new z,{name:`${c("dim","- Cancel")}`,value:"cancel"}],loop:!1});return t==="cancel"?null:t==="enable"?"1":"false"}async function iw(e,n){let o=n&&n!==e.defaultValue?c("cyan",n):c("dim",n||e.defaultValue);console.log(),console.log(` ${f(e.name)}`),console.log(` ${u(e.description)}`),console.log(` ${u("Current:")} ${o}`),console.log(` ${u("Default:")} ${e.defaultValue}`),console.log(` ${u("(Leave empty and press Enter to cancel)")}`),console.log();let r=await de({message:`${e.name}:`,default:"",validate:t=>t.trim()&&e.validation?.pattern&&!e.validation.pattern.test(t)?"Invalid format":!0});return r.trim()?r===e.defaultValue?"":r:null}async function sw(e,n){let o=n&&n!==e.defaultValue?c("cyan",n):c("dim",n||e.defaultValue);if(console.log(),console.log(` ${f(e.name)}`),console.log(` ${u(e.description)}`),console.log(` ${u("Current:")} ${o}`),e.validation?.min!==void 0||e.validation?.max!==void 0){let t=e.validation?.min??0,i=e.validation?.max??1/0;console.log(` ${u("Range:")} ${t} - ${i===1/0?"\u221E":i}`)}console.log(` ${u("Default:")} ${e.defaultValue}`),console.log(` ${u("(Leave empty and press Enter to cancel)")}`),console.log();let r=await de({message:`${e.name}:`,default:"",validate:t=>{if(!t.trim())return!0;let i=parseInt(t,10);return isNaN(i)?"Please enter a valid number":e.validation?.min!==void 0&&i<e.validation.min?`Minimum value is ${e.validation.min}`:e.validation?.max!==void 0&&i>e.validation.max?`Maximum value is ${e.validation.max}`:!0}});return r.trim()?r===e.defaultValue?"":r:null}async function aw(e,n){let o=ew(),r=n?n.split(",").map(d=>d.trim()).filter(Boolean):[],t=r.length>0?r.join(", "):e.id==="toolsToRun"?c("dim","(all tools)"):c("dim","(none)");console.log(),console.log(` ${f(e.name)}`),console.log(` ${u(e.description)}`),console.log(` ${u("Current:")} ${t}`),console.log();let i=await j({message:`${e.name}:`,choices:[{name:"EDIT Select tools",value:"select",description:"Choose which tools to include"},{name:`${c("yellow","\u21BA")} Clear all`,value:"clear",description:e.id==="toolsToRun"?"Reset to all tools enabled":"Remove all tools from this list"},new z,{name:`${c("dim","- Cancel")}`,value:"cancel"}],loop:!1});if(i==="cancel")return null;if(i==="clear")return"";let s=[];s.push({name:c("blue","\u2500\u2500 GitHub Tools \u2500\u2500"),value:"__separator_github__",disabled:!0});for(let d of o.filter(p=>p.category==="github"))s.push({name:`${d.name} ${c("dim",`(${d.id})`)}`,value:d.id,checked:r.includes(d.id),description:d.description});s.push({name:c("yellow","\u2500\u2500 Local Tools \u2500\u2500"),value:"__separator_local__",disabled:!0});for(let d of o.filter(p=>p.category==="local"))s.push({name:`${d.name} ${c("dim",`(${d.id})`)}`,value:d.id,checked:r.includes(d.id),description:d.description});s.push({name:c("dim","\u2500\u2500 Actions \u2500\u2500"),value:"__separator_actions__",disabled:!0}),s.push({name:`${c("dim","- Cancel (keep current)")}`,value:"__cancel__",checked:!1,description:"Go back without changes"}),console.log(),console.log(` ${u("Use Space to select/deselect, Enter to confirm, or select Cancel")}`);let a=await mr({message:`Select tools for ${e.name}:`,choices:s,pageSize:16,loop:!1,theme:{prefix:" ",style:{highlight:d=>c("cyan",d),message:d=>f(d)}}});if(a.includes("__cancel__"))return null;let l=a.filter(d=>!d.startsWith("__separator")&&d!=="__cancel__");return l.length>0?l.join(","):""}function Yo(e,n,o){let r=e[o.envVar]??"",t=n[o.envVar]??"";return r!==t}function cw(e,n){let o=0;for(let r of Xt)Yo(e,n,r)&&o++;return o}async function lw(e,n){let o=[],r=Xt.filter(p=>p.type==="boolean"),t=Xt.filter(p=>p.type==="string"),i=Xt.filter(p=>p.type==="number"),s=Xt.filter(p=>p.type==="array"),a=cw(n,e),l=a>0?`${c("yellow","\u25CF")} ${a} unsaved ${a===1?"change":"changes"}`:`${c("green","\u25CF")} No unsaved changes`;if(o.push({name:`${c("dim","\u2500\u2500")} ${l} ${c("dim","\u2500\u2500")}`,value:"__status__"}),r.length>0){o.push({name:c("dim","\u2500\u2500 Features \u2500\u2500"),value:"__sep1__"});for(let p of r){let m=Xo(e,p),g=Yo(n,e,p),v=$s(p,m,g);o.push({name:`${p.name}: ${v}`,value:p.id,description:p.description})}}if(t.length>0){o.push({name:c("dim","\u2500\u2500 Endpoints \u2500\u2500"),value:"__sep2__"});for(let p of t){let m=Xo(e,p),g=Yo(n,e,p),v=$s(p,m,g);o.push({name:`${p.name}: ${v}`,value:p.id,description:p.description})}}if(i.length>0){o.push({name:c("dim","\u2500\u2500 Performance \u2500\u2500"),value:"__sep3__"});for(let p of i){let m=Xo(e,p),g=Yo(n,e,p),v=$s(p,m,g);o.push({name:`${p.name}: ${v}`,value:p.id,description:p.description})}}if(s.length>0){o.push({name:c("dim","\u2500\u2500 Tool Selection \u2500\u2500"),value:"__sep4__"});for(let p of s){let m=Xo(e,p),g=Yo(n,e,p),v=$s(p,m,g);o.push({name:`${p.name}: ${v}`,value:p.id,description:p.description})}}return o.push({name:c("dim","\u2500\u2500 Actions \u2500\u2500"),value:"__sep5__"}),a>0?o.push({name:`${c("green","Save")} Save changes ${c("yellow",`(${a})`)}`,value:"save",description:"Save configuration and exit"}):o.push({name:`${c("dim","Save")} Save changes`,value:"save",description:u("No changes to save")}),o.push({name:`${c("yellow","\u21BA")} Reset to defaults`,value:"reset",description:"Clear all custom configuration"}),o.push({name:`${c("dim","- Back")}`,value:"back"}),await j({message:"Select option to configure:",choices:o,pageSize:20,loop:!1,theme:{prefix:" ",style:{highlight:p=>c("cyan",p),message:p=>f(p)}}})}async function uw(){let e=await qo();if(!e)return;let{client:n,customPath:o}=e,r=J[n],t=o||te(n),i=X(t);if(!i){console.log(),console.log(` ${c("red","X")} Failed to read config file: ${t}`),console.log();return}if(!Kt(i)){console.log(),console.log(` ${c("yellow","WARN")} Octocode is not configured for ${r.name}.`),console.log(` ${u('Please install Octocode first using "Install octocode-mcp".')}`),console.log();return}console.log(),console.log(` ${u("Config file:")} ${c("cyan",t)}`),console.log(` ${u("Client:")} ${r.name}`),console.log();let s={...i.mcpServers?.octocode?.env||{}},a={...s},l=!0;for(;l;){let d=await lw(a,s);if(!(d.startsWith("__sep")||d==="__status__"))switch(d){case"save":{if(!(JSON.stringify(s)!==JSON.stringify(a))){console.log(),console.log(` ${u("No changes to save.")}`),console.log(),l=!1;break}let m=new U("Saving configuration...").start(),g={};for(let[M,_]of Object.entries(a))_&&_!==""&&(g[M]=_);let v={...i,mcpServers:{...i.mcpServers,octocode:{...i.mcpServers.octocode,env:Object.keys(g).length>0?g:void 0}}};v.mcpServers?.octocode?.env&&Object.keys(v.mcpServers.octocode.env).length===0&&delete v.mcpServers.octocode.env;let $=De(t,v);$.success?(m.succeed("Configuration saved!"),console.log(),console.log(` ${c("green","\u2705")} Config saved to: ${t}`),$.backupPath&&console.log(` ${u("Backup:")} ${$.backupPath}`),console.log(),console.log(` ${f("Note:")} Restart ${r.name} for changes to take effect.`),await Mv(t)):(m.fail("Failed to save configuration"),console.log(),console.log(` ${c("red","X")} ${$.error||"Unknown error"}`),console.log()),l=!1;break}case"reset":{if(await Nt({message:"Reset all configuration to defaults?",default:!1})){for(let m of Object.keys(a))delete a[m];console.log(` ${c("yellow","\u21BA")} Configuration reset to defaults`)}break}case"back":{if(JSON.stringify(s)!==JSON.stringify(a)&&!await Nt({message:"Discard unsaved changes?",default:!1}))break;l=!1;break}default:{let p=Xt.find(v=>v.id===d);if(!p)break;let m=Xo(a,p),g=null;switch(p.type){case"boolean":g=await rw(p,m);break;case"string":g=await iw(p,m);break;case"number":g=await sw(p,m);break;case"array":g=await aw(p,m);break;default:break}g!==null&&(g===""||g===p.defaultValue?delete a[p.envVar]:a[p.envVar]=g);break}}}}async function dw(){let e=await qo();if(!e)return;let{client:n,customPath:o}=e,r=J[n],t=o||te(n),i=X(t);if(!i){console.log(),console.log(` ${c("red","X")} Failed to read config file: ${t}`),console.log();return}if(!Kt(i)){console.log(),console.log(` ${c("yellow","WARN")} Octocode is not configured for ${r.name}.`),console.log(` ${u('Please install Octocode first using "Install octocode-mcp".')}`),console.log();return}let s=i.mcpServers?.octocode;console.log(),console.log(` ${u("Client:")} ${r.name} ${u("\u2022")} ${c("cyan",t)}`),console.log();let l=JSON.stringify({octocode:s},null,2).split(`
|
|
76
|
+
`);for(let d of l){let p=d.replace(/"([^"]+)":/g,`${c("cyan",'"$1"')}:`).replace(/: "([^"]+)"/g,`: ${c("green",'"$1"')}`).replace(/: (\d+)/g,`: ${c("yellow","$1")}`).replace(/: (true|false)/g,`: ${c("magenta","$1")}`);console.log(` ${p}`)}console.log(),await Mv(t)}function pw(e){switch(e.id){case"enableLocal":return"ENABLE_LOCAL=1";case"githubApiUrl":return"GITHUB_API_URL=https://github.mycompany.com/api/v3";case"toolsToRun":return"TOOLS_TO_RUN=githubSearchCode,githubGetFileContent";case"enableTools":return"ENABLE_TOOLS=localSearchCode,localFindFiles";case"disableTools":return"DISABLE_TOOLS=githubSearchPullRequests";case"requestTimeout":return"REQUEST_TIMEOUT=60000";case"maxRetries":return"MAX_RETRIES=5";default:return`${e.envVar}=${e.defaultValue}`}}function mw(e){return e.type==="array"?e.id==="toolsToRun"?"(all tools)":"(none)":e.defaultValue}function gw(){console.log(),console.log(` ${f("All Available Configuration Options")}`),console.log(),console.log(` ${u("These options can be set as environment variables in your MCP config.")}`),console.log(` ${u('Add them to the "env" object in your octocode server configuration.')}`),console.log(),console.log(` ${u("Example config:")}`),console.log(` ${u("{")}
|
|
77
|
+
${u(' "mcpServers": {')}
|
|
78
|
+
${u(' "octocode": {')}
|
|
79
|
+
${u(' "command": "npx",')}
|
|
80
|
+
${u(' "args": ["octocode-mcp@latest"],')}
|
|
81
|
+
${c("green",' "env": { "ENABLE_LOCAL": "1" }')}
|
|
82
|
+
${u(" }")}
|
|
83
|
+
${u(" }")}
|
|
84
|
+
${u("}")}`),console.log(),console.log(c("blue","\u2501".repeat(66))),console.log();for(let e of Xt){let n=e.type==="boolean"?"green":e.type==="number"?"yellow":e.type==="array"?"magenta":"cyan";console.log(` ${c("cyan",e.envVar)} ${u(`(${e.type})`)}`),console.log(` ${e.description}`),console.log(` ${u("Default:")} ${mw(e)}`),console.log(` ${u("Example:")} ${c(n,pw(e))}`),console.log()}}function Ge(e,n){if(e==null)throw new Error(`Assertion failed: ${n}`);return e}var fw=b.enum(["browser-automation","database","cloud-platform","developer-tools","file-system","communication","search-web","ai-services","workflow-automation","version-control","data-visualization","coding-agents","security","productivity","monitoring","finance","social-media","aggregator","other"]),hw=b.object({id:b.string().min(1),name:b.string().min(1),description:b.string().min(1),category:fw,repository:b.string(),website:b.string().optional(),stars:b.number().optional(),installationType:b.enum(["npm","npx","pip","docker","source"]),npmPackage:b.string().optional(),pipPackage:b.string().optional(),dockerImage:b.string().optional(),installConfig:b.object({command:b.string().min(1),args:b.array(b.string()),env:b.record(b.string(),b.string()).optional()}),requiredEnvVars:b.array(b.object({name:b.string(),description:b.string(),example:b.string().optional()})).optional(),official:b.boolean().optional(),tags:b.array(b.string()).optional()}),Ie=[{id:"playwright-mcp",name:"Playwright MCP",description:"Official Microsoft Playwright MCP server for browser automation via accessibility snapshots",category:"browser-automation",repository:"https://github.com/microsoft/playwright-mcp",website:"https://playwright.dev",installationType:"npx",npmPackage:"@playwright/mcp",official:!0,installConfig:{command:"npx",args:["-y","@playwright/mcp@latest"]},tags:["browser","automation","testing","microsoft","official"]},{id:"firecrawl-mcp-server",name:"Firecrawl MCP",description:"Powerful web scraping and search for Claude, Cursor and LLM clients",category:"browser-automation",repository:"https://github.com/firecrawl/firecrawl-mcp-server",website:"https://firecrawl.dev",installationType:"npx",npmPackage:"firecrawl-mcp",official:!0,installConfig:{command:"npx",args:["-y","firecrawl-mcp"]},requiredEnvVars:[{name:"FIRECRAWL_API_KEY",description:"Firecrawl API key",example:"fc-xxxxx"}],tags:["scraping","web","search","official"]},{id:"browserbase-mcp",name:"Browserbase MCP",description:"Cloud browser automation for web navigation, data extraction, form filling",category:"browser-automation",repository:"https://github.com/browserbase/mcp-server-browserbase",website:"https://browserbase.com",installationType:"npx",npmPackage:"@browserbasehq/mcp-server-browserbase",official:!0,installConfig:{command:"npx",args:["-y","@browserbasehq/mcp-server-browserbase"]},requiredEnvVars:[{name:"BROWSERBASE_API_KEY",description:"Browserbase API key"},{name:"BROWSERBASE_PROJECT_ID",description:"Browserbase project ID"}],tags:["browser","cloud","automation","official"]},{id:"chrome-devtools-mcp",name:"Chrome DevTools MCP",description:"Chrome DevTools for coding agents - debugging and browser control",category:"browser-automation",repository:"https://github.com/ChromeDevTools/chrome-devtools-mcp",installationType:"npx",npmPackage:"chrome-devtools-mcp",official:!0,installConfig:{command:"npx",args:["-y","chrome-devtools-mcp"]},tags:["chrome","devtools","debugging","official"]},{id:"github-mcp-server",name:"GitHub MCP",description:"GitHub's official MCP Server for repository management, PRs, issues, and more",category:"version-control",repository:"https://github.com/github/github-mcp-server",website:"https://github.com",installationType:"docker",dockerImage:"ghcr.io/github/github-mcp-server",official:!0,installConfig:{command:"docker",args:["run","-i","--rm","-e","GITHUB_PERSONAL_ACCESS_TOKEN","ghcr.io/github/github-mcp-server"]},requiredEnvVars:[{name:"GITHUB_PERSONAL_ACCESS_TOKEN",description:"GitHub Personal Access Token"}],tags:["github","git","repository","official"]},{id:"sqlite-mcp",name:"SQLite MCP",description:"Comprehensive SQLite database interaction capabilities for Cursor, Windsurf, and AI tools",category:"database",repository:"https://github.com/jparkerweb/mcp-sqlite",installationType:"npx",npmPackage:"mcp-sqlite",installConfig:{command:"npx",args:["-y","mcp-sqlite","${DATABASE_PATH}"]},requiredEnvVars:[{name:"DATABASE_PATH",description:"Path to SQLite database file",example:"/path/to/database.db"}],tags:["database","sqlite","sql","cursor","windsurf"]},{id:"mysql-mcp",name:"MySQL MCP",description:"MySQL database integration with configurable access controls and schema inspection",category:"database",repository:"https://github.com/designcomputer/mysql_mcp_server",installationType:"pip",pipPackage:"mysql-mcp-server",installConfig:{command:"uvx",args:["mysql-mcp-server"]},requiredEnvVars:[{name:"MYSQL_HOST",description:"MySQL host"},{name:"MYSQL_USER",description:"MySQL username"},{name:"MYSQL_PASSWORD",description:"MySQL password"},{name:"MYSQL_DATABASE",description:"MySQL database name"}],tags:["database","mysql","sql"]},{id:"mongodb-mcp",name:"MongoDB MCP",description:"MongoDB integration for querying and analyzing collections",category:"database",repository:"https://github.com/kiliczsh/mcp-mongo-server",installationType:"npx",npmPackage:"mcp-mongo-server",installConfig:{command:"npx",args:["-y","mcp-mongo-server"]},requiredEnvVars:[{name:"MONGODB_URI",description:"MongoDB connection URI",example:"mongodb://localhost:27017/mydb"}],tags:["database","mongodb","nosql"]},{id:"redis-mcp",name:"Redis MCP",description:"Natural language interface for managing and searching data in Redis",category:"database",repository:"https://github.com/redis/mcp-redis",website:"https://redis.io",installationType:"pip",pipPackage:"redis-mcp-server",official:!0,installConfig:{command:"uvx",args:["redis-mcp-server"]},requiredEnvVars:[{name:"REDIS_URL",description:"Redis connection URL",example:"redis://localhost:6379"}],tags:["database","redis","cache","official"]},{id:"neon-mcp",name:"Neon MCP",description:"Neon Serverless Postgres - create and manage databases with natural language",category:"database",repository:"https://github.com/neondatabase/mcp-server-neon",website:"https://neon.tech",installationType:"npx",npmPackage:"@neondatabase/mcp-server-neon",official:!0,installConfig:{command:"npx",args:["-y","@neondatabase/mcp-server-neon"]},requiredEnvVars:[{name:"NEON_API_KEY",description:"Neon API key"}],tags:["database","postgres","serverless","official"]},{id:"qdrant-mcp",name:"Qdrant MCP",description:"Vector search engine for keeping and retrieving memories",category:"database",repository:"https://github.com/qdrant/mcp-server-qdrant",website:"https://qdrant.tech",installationType:"pip",pipPackage:"mcp-server-qdrant",official:!0,installConfig:{command:"uvx",args:["mcp-server-qdrant"]},requiredEnvVars:[{name:"QDRANT_URL",description:"Qdrant server URL"},{name:"QDRANT_API_KEY",description:"Qdrant API key (optional)"}],tags:["database","vector","search","official"]},{id:"snowflake-mcp",name:"Snowflake MCP",description:"Snowflake data warehouse integration with read/write capabilities",category:"database",repository:"https://github.com/isaacwasserman/mcp-snowflake-server",website:"https://snowflake.com",installationType:"pip",pipPackage:"mcp-snowflake-server",installConfig:{command:"uvx",args:["mcp-snowflake-server"]},requiredEnvVars:[{name:"SNOWFLAKE_ACCOUNT",description:"Snowflake account identifier"},{name:"SNOWFLAKE_USER",description:"Snowflake username"},{name:"SNOWFLAKE_PASSWORD",description:"Snowflake password"}],tags:["database","snowflake","data-warehouse"]},{id:"bigquery-mcp",name:"BigQuery MCP",description:"Google BigQuery integration for schema inspection and queries",category:"database",repository:"https://github.com/LucasHild/mcp-server-bigquery",website:"https://cloud.google.com/bigquery",installationType:"pip",pipPackage:"mcp-server-bigquery",installConfig:{command:"uvx",args:["mcp-server-bigquery"]},requiredEnvVars:[{name:"GOOGLE_APPLICATION_CREDENTIALS",description:"Path to GCP service account JSON"}],tags:["database","bigquery","google","analytics"]},{id:"dbhub-mcp",name:"DBHub MCP",description:"Zero-dependency, token-efficient database MCP for Postgres, MySQL, SQL Server, MariaDB, SQLite",category:"database",repository:"https://github.com/bytebase/dbhub",installationType:"npx",npmPackage:"dbhub",installConfig:{command:"npx",args:["-y","dbhub"]},requiredEnvVars:[{name:"DATABASE_URL",description:"Database connection URL",example:"postgres://user:pass@localhost:5432/db"}],tags:["database","postgres","mysql","sqlite","mariadb","sqlserver","multi-database"]},{id:"pg-aiguide-mcp",name:"PostgreSQL AI Guide MCP",description:"PostgreSQL documentation and best practices through semantic search and curated skills",category:"database",repository:"https://github.com/timescale/pg-aiguide",website:"https://tigerdata.com",installationType:"npx",npmPackage:"@tigerdata/pg-aiguide",installConfig:{command:"npx",args:["-y","@tigerdata/pg-aiguide"]},tags:["database","postgres","postgresql","documentation","timescale"]},{id:"cloudflare-mcp",name:"Cloudflare MCP",description:"Integration with Cloudflare Workers, KV, R2, and D1",category:"cloud-platform",repository:"https://github.com/cloudflare/mcp-server-cloudflare",website:"https://cloudflare.com",installationType:"npx",npmPackage:"@cloudflare/mcp-server-cloudflare",official:!0,installConfig:{command:"npx",args:["-y","@cloudflare/mcp-server-cloudflare"]},requiredEnvVars:[{name:"CLOUDFLARE_API_TOKEN",description:"Cloudflare API Token"},{name:"CLOUDFLARE_ACCOUNT_ID",description:"Cloudflare Account ID"}],tags:["cloudflare","cloud","workers","official"]},{id:"docker-mcp",name:"Docker MCP",description:"Docker operations for container and compose stack management",category:"cloud-platform",repository:"https://github.com/sondt2709/docker-mcp",installationType:"npx",npmPackage:"docker-mcp",installConfig:{command:"npx",args:["-y","docker-mcp"]},tags:["docker","containers","devops"]},{id:"filesystem-mcp",name:"Filesystem MCP",description:"Direct local file system access with configurable permissions",category:"file-system",repository:"https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem",installationType:"npx",npmPackage:"@modelcontextprotocol/server-filesystem",official:!0,installConfig:{command:"npx",args:["-y","@modelcontextprotocol/server-filesystem","${ALLOWED_DIRECTORIES}"]},requiredEnvVars:[{name:"ALLOWED_DIRECTORIES",description:"Comma-separated list of allowed directories",example:"/home/user/projects,/tmp"}],tags:["filesystem","files","local","official"]},{id:"git-mcp-official",name:"Git MCP",description:"Official Git integration for repository operations, commits, and history",category:"version-control",repository:"https://github.com/modelcontextprotocol/servers/tree/main/src/git",installationType:"pip",pipPackage:"mcp-server-git",official:!0,installConfig:{command:"uvx",args:["mcp-server-git"]},tags:["git","version-control","repository","official"]},{id:"memory-mcp",name:"Memory MCP",description:"Official memory/persistence server for maintaining context across sessions",category:"developer-tools",repository:"https://github.com/modelcontextprotocol/servers/tree/main/src/memory",installationType:"npx",npmPackage:"@modelcontextprotocol/server-memory",official:!0,installConfig:{command:"npx",args:["-y","@modelcontextprotocol/server-memory"]},tags:["memory","persistence","context","official"]},{id:"fetch-mcp",name:"Fetch MCP",description:"Official HTTP fetch server for making web requests",category:"developer-tools",repository:"https://github.com/modelcontextprotocol/servers/tree/main/src/fetch",installationType:"pip",pipPackage:"mcp-server-fetch",official:!0,installConfig:{command:"uvx",args:["mcp-server-fetch"]},tags:["fetch","http","web","requests","official"]},{id:"time-mcp",name:"Time MCP",description:"Official time server for date/time operations and timezones",category:"developer-tools",repository:"https://github.com/modelcontextprotocol/servers/tree/main/src/time",installationType:"pip",pipPackage:"mcp-server-time",official:!0,installConfig:{command:"uvx",args:["mcp-server-time"]},tags:["time","date","timezone","official"]},{id:"sequential-thinking-mcp",name:"Sequential Thinking MCP",description:"Official server for step-by-step reasoning and problem solving",category:"developer-tools",repository:"https://github.com/modelcontextprotocol/servers/tree/main/src/sequentialthinking",installationType:"npx",npmPackage:"@modelcontextprotocol/server-sequential-thinking",official:!0,installConfig:{command:"npx",args:["-y","@modelcontextprotocol/server-sequential-thinking"]},tags:["reasoning","thinking","problem-solving","official"]},{id:"everything-mcp",name:"Everything MCP",description:"Official demo server showcasing all MCP capabilities in one package",category:"developer-tools",repository:"https://github.com/modelcontextprotocol/servers/tree/main/src/everything",installationType:"npx",npmPackage:"@modelcontextprotocol/server-everything",official:!0,installConfig:{command:"npx",args:["-y","@modelcontextprotocol/server-everything"]},tags:["demo","all-in-one","example","official"]},{id:"exa-mcp",name:"Exa Search MCP",description:"Exa AI Search API for real-time web information retrieval",category:"search-web",repository:"https://github.com/exa-labs/exa-mcp-server",website:"https://exa.ai",installationType:"npx",npmPackage:"exa-mcp-server",official:!0,installConfig:{command:"npx",args:["-y","exa-mcp-server"]},requiredEnvVars:[{name:"EXA_API_KEY",description:"Exa API key"}],tags:["search","exa","ai","official"]},{id:"perplexity-mcp",name:"Perplexity MCP",description:"Official Perplexity AI search and research integration",category:"search-web",repository:"https://github.com/perplexityai/modelcontextprotocol",website:"https://perplexity.ai",installationType:"npx",npmPackage:"@perplexity-ai/mcp-server",official:!0,installConfig:{command:"npx",args:["-y","@perplexity-ai/mcp-server"]},requiredEnvVars:[{name:"PERPLEXITY_API_KEY",description:"Perplexity API key"}],tags:["search","perplexity","ai","research","official"]},{id:"kagi-mcp",name:"Kagi MCP",description:"Official Kagi search and tools integration",category:"search-web",repository:"https://github.com/kagisearch/kagi-mcp",website:"https://kagi.com",installationType:"pip",pipPackage:"kagimcp",official:!0,installConfig:{command:"uvx",args:["kagimcp"]},requiredEnvVars:[{name:"KAGI_API_KEY",description:"Kagi API key"}],tags:["search","kagi","official"]},{id:"tavily-mcp",name:"Tavily MCP",description:"Tavily AI search API for intelligent web search",category:"search-web",repository:"https://github.com/tavily-ai/tavily-mcp",website:"https://tavily.com",installationType:"npx",npmPackage:"tavily-mcp",official:!0,installConfig:{command:"npx",args:["-y","tavily-mcp"]},requiredEnvVars:[{name:"TAVILY_API_KEY",description:"Tavily API key"}],tags:["search","tavily","ai","official"]},{id:"slack-mcp",name:"Slack MCP",description:"Most powerful MCP server for Slack with Stdio and SSE transports",category:"communication",repository:"https://github.com/korotovsky/slack-mcp-server",website:"https://slack.com",installationType:"npx",npmPackage:"slack-mcp-server",installConfig:{command:"npx",args:["-y","slack-mcp-server"]},requiredEnvVars:[{name:"SLACK_BOT_TOKEN",description:"Slack Bot OAuth Token"}],tags:["slack","chat","team"]},{id:"discord-mcp",name:"Discord MCP",description:"Discord API integration via JDA for seamless bot interaction with MCP clients",category:"communication",repository:"https://github.com/SaseQ/discord-mcp",website:"https://discord.com",installationType:"docker",dockerImage:"saseq/discord-mcp:latest",installConfig:{command:"docker",args:["run","--rm","-i","-e","DISCORD_TOKEN","-e","DISCORD_GUILD_ID","saseq/discord-mcp:latest"]},requiredEnvVars:[{name:"DISCORD_TOKEN",description:"Discord Bot Token"},{name:"DISCORD_GUILD_ID",description:"Default Discord Server ID (optional)"}],tags:["discord","chat","community","bot"]},{id:"linear-mcp",name:"Linear MCP",description:"Linear project management integration for issues, projects, and teams",category:"communication",repository:"https://github.com/tacticlaunch/mcp-linear",website:"https://linear.app",installationType:"npx",npmPackage:"@tacticlaunch/mcp-linear",installConfig:{command:"npx",args:["-y","@tacticlaunch/mcp-linear"]},requiredEnvVars:[{name:"LINEAR_API_KEY",description:"Linear API key"}],tags:["linear","issues","project-management"]},{id:"atlassian-mcp",name:"Atlassian MCP",description:"Confluence and Jira integration for documentation and issue tracking",category:"communication",repository:"https://github.com/sooperset/mcp-atlassian",website:"https://atlassian.com",installationType:"pip",pipPackage:"mcp-atlassian",installConfig:{command:"uvx",args:["mcp-atlassian"]},requiredEnvVars:[{name:"ATLASSIAN_URL",description:"Atlassian instance URL"},{name:"ATLASSIAN_EMAIL",description:"Atlassian email"},{name:"ATLASSIAN_API_TOKEN",description:"Atlassian API token"}],tags:["atlassian","jira","confluence"]},{id:"notion-mcp",name:"Notion MCP",description:"Official Notion integration for pages, databases, and blocks",category:"productivity",repository:"https://github.com/makenotion/notion-mcp-server",website:"https://notion.so",installationType:"npx",npmPackage:"@notionhq/notion-mcp-server",official:!0,installConfig:{command:"npx",args:["-y","@notionhq/notion-mcp-server"]},requiredEnvVars:[{name:"NOTION_API_KEY",description:"Notion API integration token"}],tags:["notion","productivity","notes","database","official"]},{id:"obsidian-mcp",name:"Obsidian MCP",description:"Obsidian vault integration for file management, search, and manipulation",category:"productivity",repository:"https://github.com/MarkusPfundstein/mcp-obsidian",website:"https://obsidian.md",installationType:"npx",npmPackage:"mcp-obsidian",installConfig:{command:"npx",args:["-y","mcp-obsidian"]},requiredEnvVars:[{name:"OBSIDIAN_VAULT_PATH",description:"Path to Obsidian vault"}],tags:["obsidian","notes","markdown"]},{id:"todoist-mcp",name:"Todoist MCP",description:"Natural language task management with Todoist",category:"productivity",repository:"https://github.com/stevengonsalvez/todoist-mcp",website:"https://todoist.com",installationType:"npx",npmPackage:"todoist-mcp-server",installConfig:{command:"npx",args:["-y","todoist-mcp-server"]},requiredEnvVars:[{name:"TODOIST_API_TOKEN",description:"Todoist API token"}],tags:["todoist","tasks","productivity"]},{id:"google-workspace-mcp",name:"Google Workspace MCP",description:"Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Drive and more",category:"productivity",repository:"https://github.com/taylorwilsdon/google_workspace_mcp",website:"https://workspace.google.com",installationType:"pip",pipPackage:"google-workspace-mcp",installConfig:{command:"uvx",args:["google-workspace-mcp"]},requiredEnvVars:[{name:"GOOGLE_APPLICATION_CREDENTIALS",description:"Path to Google credentials"}],tags:["google","workspace","gmail","docs"]},{id:"context7-mcp",name:"Context7 MCP",description:"Up-to-date code documentation for LLMs and AI code editors",category:"developer-tools",repository:"https://github.com/upstash/context7",website:"https://context7.com",installationType:"npx",npmPackage:"@upstash/context7-mcp",official:!0,installConfig:{command:"npx",args:["-y","@upstash/context7-mcp"]},tags:["documentation","context","code","official"]},{id:"desktop-commander-mcp",name:"Desktop Commander MCP",description:"Terminal control, file system search, and diff file editing capabilities",category:"developer-tools",repository:"https://github.com/wonderwhy-er/DesktopCommanderMCP",installationType:"npx",npmPackage:"@wonderwhy-er/desktop-commander",installConfig:{command:"npx",args:["-y","@wonderwhy-er/desktop-commander"]},tags:["terminal","file-editing","diff","command-line","process"]},{id:"gemini-mcp-tool",name:"Gemini MCP Tool",description:"Interact with Google Gemini CLI for large file analysis and codebase exploration",category:"ai-services",repository:"https://github.com/jamubc/gemini-mcp-tool",installationType:"npx",npmPackage:"gemini-mcp-tool",installConfig:{command:"npx",args:["-y","gemini-mcp-tool"]},tags:["gemini","google","ai","file-analysis","codebase"]},{id:"sentry-mcp",name:"Sentry MCP",description:"Sentry.io integration for error tracking and performance monitoring",category:"developer-tools",repository:"https://github.com/getsentry/sentry-mcp",website:"https://sentry.io",installationType:"npx",npmPackage:"@sentry/mcp-server",official:!0,installConfig:{command:"npx",args:["-y","@sentry/mcp-server"]},requiredEnvVars:[{name:"SENTRY_AUTH_TOKEN",description:"Sentry Auth Token"},{name:"SENTRY_ORG",description:"Sentry Organization Slug"}],tags:["sentry","errors","monitoring","official"]},{id:"mcp-memory-service",name:"Memory Service MCP",description:"Automatic context memory for Claude, VS Code, Cursor - stop re-explaining",category:"developer-tools",repository:"https://github.com/doobidoo/mcp-memory-service",installationType:"pip",pipPackage:"mcp-memory-service",installConfig:{command:"uvx",args:["mcp-memory-service"]},tags:["memory","context","persistence"]},{id:"serena-mcp",name:"Serena MCP",description:"Powerful coding agent with semantic retrieval and editing via language servers",category:"coding-agents",repository:"https://github.com/oraios/serena",installationType:"pip",installConfig:{command:"uvx",args:["--from","git+https://github.com/oraios/serena","serena","start-mcp-server"]},tags:["coding","agent","language-server"]},{id:"figma-mcp",name:"Figma Context MCP",description:"Get Figma design data in ready-to-implement format",category:"developer-tools",repository:"https://github.com/GLips/Figma-Context-MCP",website:"https://figma.com",installationType:"npx",npmPackage:"figma-context-mcp",installConfig:{command:"npx",args:["-y","figma-context-mcp"]},requiredEnvVars:[{name:"FIGMA_ACCESS_TOKEN",description:"Figma Personal Access Token"}],tags:["figma","design","ui"]},{id:"talk-to-figma-mcp",name:"Talk to Figma MCP",description:"Cursor + Figma integration for reading and modifying designs",category:"developer-tools",repository:"https://github.com/grab/cursor-talk-to-figma-mcp",website:"https://figma.com",installationType:"npx",npmPackage:"cursor-talk-to-figma-mcp",installConfig:{command:"npx",args:["-y","cursor-talk-to-figma-mcp"]},requiredEnvVars:[{name:"FIGMA_ACCESS_TOKEN",description:"Figma Personal Access Token"}],tags:["figma","cursor","design"]},{id:"xcodebuild-mcp",name:"XcodeBuild MCP",description:"Xcode-related tools for building, testing, and managing iOS/macOS projects",category:"developer-tools",repository:"https://github.com/cameroncooke/XcodeBuildMCP",website:"https://developer.apple.com/xcode",installationType:"npx",npmPackage:"xcodebuildmcp",installConfig:{command:"npx",args:["-y","xcodebuildmcp"]},tags:["xcode","ios","macos","apple","swift"]},{id:"markdownify-mcp",name:"Markdownify MCP",description:"Convert almost anything to Markdown - PDFs, URLs, images, and more",category:"developer-tools",repository:"https://github.com/zcaceres/markdownify-mcp",installationType:"npx",npmPackage:"mcp-markdownify-server",installConfig:{command:"npx",args:["-y","mcp-markdownify-server"]},tags:["markdown","converter","pdf","ocr"]},{id:"elevenlabs-mcp",name:"ElevenLabs MCP",description:"Official ElevenLabs text-to-speech, voice cloning, and audio generation",category:"ai-services",repository:"https://github.com/elevenlabs/elevenlabs-mcp",website:"https://elevenlabs.io",installationType:"pip",pipPackage:"elevenlabs-mcp",official:!0,installConfig:{command:"uvx",args:["elevenlabs-mcp"]},requiredEnvVars:[{name:"ELEVENLABS_API_KEY",description:"ElevenLabs API key"}],tags:["elevenlabs","tts","voice","audio","official"]},{id:"llamacloud-mcp",name:"LlamaCloud MCP",description:"Connect to managed indices on LlamaCloud",category:"ai-services",repository:"https://github.com/run-llama/mcp-server-llamacloud",website:"https://cloud.llamaindex.ai",installationType:"npx",npmPackage:"@llamaindex/mcp-server-llamacloud",official:!0,installConfig:{command:"npx",args:["-y","@llamaindex/mcp-server-llamacloud"]},requiredEnvVars:[{name:"LLAMA_CLOUD_API_KEY",description:"LlamaCloud API key"}],tags:["llamaindex","rag","index","official"]},{id:"huggingface-spaces-mcp",name:"HuggingFace Spaces MCP",description:"Use HuggingFace Spaces from your MCP Client - images, audio, text",category:"ai-services",repository:"https://github.com/evalstate/mcp-hfspace",website:"https://huggingface.co/spaces",installationType:"npx",npmPackage:"@llmindset/mcp-hfspace",installConfig:{command:"npx",args:["-y","@llmindset/mcp-hfspace"]},requiredEnvVars:[{name:"HF_TOKEN",description:"HuggingFace API token"}],tags:["huggingface","spaces","models"]},{id:"n8n-mcp",name:"n8n MCP",description:"Build n8n workflows using Claude Desktop, Cursor, or Windsurf",category:"workflow-automation",repository:"https://github.com/czlonkowski/n8n-mcp",website:"https://n8n.io",installationType:"npx",npmPackage:"n8n-mcp",installConfig:{command:"npx",args:["-y","n8n-mcp"]},requiredEnvVars:[{name:"N8N_API_URL",description:"n8n instance URL"},{name:"N8N_API_KEY",description:"n8n API key"}],tags:["n8n","automation","workflows"]},{id:"echarts-mcp",name:"ECharts MCP",description:"Generate visual charts using Apache ECharts dynamically",category:"data-visualization",repository:"https://github.com/hustcc/mcp-echarts",website:"https://echarts.apache.org",installationType:"npx",npmPackage:"mcp-echarts",installConfig:{command:"npx",args:["-y","mcp-echarts"]},tags:["visualization","charts","echarts"]},{id:"mermaid-mcp",name:"Mermaid MCP",description:"Generate Mermaid diagrams and charts dynamically",category:"data-visualization",repository:"https://github.com/hustcc/mcp-mermaid",website:"https://mermaid.js.org",installationType:"npx",npmPackage:"mcp-mermaid",installConfig:{command:"npx",args:["-y","mcp-mermaid"]},tags:["diagrams","mermaid","flowcharts"]},{id:"datadog-mcp",name:"Datadog MCP",description:"Datadog monitoring and observability integration",category:"monitoring",repository:"https://github.com/winor30/mcp-server-datadog",website:"https://datadoghq.com",installationType:"npx",npmPackage:"@winor30/mcp-server-datadog",installConfig:{command:"npx",args:["-y","@winor30/mcp-server-datadog"]},requiredEnvVars:[{name:"DD_API_KEY",description:"Datadog API key"},{name:"DD_APP_KEY",description:"Datadog Application key"}],tags:["datadog","monitoring","observability"]},{id:"browserstack-mcp",name:"BrowserStack MCP",description:"Official BrowserStack testing and automation integration",category:"developer-tools",repository:"https://github.com/browserstack/mcp-server",website:"https://browserstack.com",installationType:"npx",npmPackage:"@browserstack/mcp-server",official:!0,installConfig:{command:"npx",args:["-y","@browserstack/mcp-server"]},requiredEnvVars:[{name:"BROWSERSTACK_USERNAME",description:"BrowserStack username"},{name:"BROWSERSTACK_ACCESS_KEY",description:"BrowserStack access key"}],tags:["browserstack","testing","automation","official"]},{id:"tableau-mcp",name:"Tableau MCP",description:"Official Tableau data visualization and analytics integration",category:"data-visualization",repository:"https://github.com/tableau/tableau-mcp",website:"https://tableau.com",installationType:"npx",npmPackage:"@tableau/mcp-server",official:!0,installConfig:{command:"npx",args:["-y","@tableau/mcp-server"]},requiredEnvVars:[{name:"TABLEAU_TOKEN",description:"Tableau API token"},{name:"TABLEAU_SITE",description:"Tableau site name"}],tags:["tableau","visualization","analytics","official"]},{id:"stripe-mcp",name:"Stripe MCP",description:"Official Stripe Agent Toolkit for payment integration",category:"finance",repository:"https://github.com/stripe/agent-toolkit",website:"https://stripe.com",installationType:"npx",npmPackage:"@stripe/agent-toolkit",official:!0,installConfig:{command:"npx",args:["-y","@stripe/agent-toolkit","mcp"]},requiredEnvVars:[{name:"STRIPE_SECRET_KEY",description:"Stripe Secret Key"}],tags:["stripe","payments","finance","official"]},{id:"alpaca-mcp",name:"Alpaca MCP",description:"Official Alpaca trading - stocks, ETFs, crypto, and options in plain English",category:"finance",repository:"https://github.com/alpacahq/alpaca-mcp-server",website:"https://alpaca.markets",installationType:"pip",pipPackage:"alpaca-mcp-server",official:!0,installConfig:{command:"uvx",args:["alpaca-mcp-server"]},requiredEnvVars:[{name:"ALPACA_API_KEY",description:"Alpaca API key"},{name:"ALPACA_SECRET_KEY",description:"Alpaca secret key"}],tags:["alpaca","trading","stocks","crypto","finance","official"]},{id:"paypal-mcp",name:"PayPal MCP",description:"PayPal Agent Toolkit for payment integration",category:"finance",repository:"https://github.com/paypal/agent-toolkit",website:"https://paypal.com",installationType:"npx",npmPackage:"@paypal/agent-toolkit",official:!0,installConfig:{command:"npx",args:["-y","@paypal/agent-toolkit"]},requiredEnvVars:[{name:"PAYPAL_CLIENT_ID",description:"PayPal Client ID"},{name:"PAYPAL_CLIENT_SECRET",description:"PayPal Client Secret"}],tags:["paypal","payments","finance","official"]},{id:"semgrep-mcp",name:"Semgrep MCP",description:"Static code analysis and security scanning with Semgrep integration",category:"security",repository:"https://github.com/Szowesgad/mcp-server-semgrep",website:"https://semgrep.dev",installationType:"npx",npmPackage:"mcp-server-semgrep",installConfig:{command:"npx",args:["-y","mcp-server-semgrep"]},tags:["semgrep","security","sast","static-analysis"]},{id:"pipedream-mcp",name:"Pipedream MCP",description:"Connect with 2,500+ APIs with 8,000+ prebuilt tools",category:"aggregator",repository:"https://github.com/PipedreamHQ/pipedream/tree/master/modelcontextprotocol",website:"https://pipedream.com",installationType:"npx",npmPackage:"@pipedream/mcp",official:!0,installConfig:{command:"npx",args:["-y","@pipedream/mcp"]},requiredEnvVars:[{name:"PIPEDREAM_API_KEY",description:"Pipedream API key"}],tags:["pipedream","integrations","apis","official"]},{id:"fastmcp",name:"FastMCP",description:"The fast, Pythonic way to build MCP servers and clients",category:"developer-tools",repository:"https://github.com/jlowin/fastmcp",installationType:"pip",pipPackage:"fastmcp",installConfig:{command:"pip",args:["install","fastmcp"]},tags:["framework","python","sdk"]},{id:"mcp-use",name:"MCP Use",description:"Easiest way to interact with MCP servers with custom agents",category:"developer-tools",repository:"https://github.com/mcp-use/mcp-use",installationType:"pip",pipPackage:"mcp-use",installConfig:{command:"pip",args:["install","mcp-use"]},tags:["framework","agents","python"]},{id:"unity-mcp",name:"Unity MCP",description:"MCP server for Unity Editor - designed for Claude, Cursor, Gemini and more",category:"developer-tools",repository:"https://github.com/CoplayDev/unity-mcp",website:"https://unity.com",installationType:"pip",installConfig:{command:"uvx",args:["--from","git+https://github.com/CoplayDev/unity-mcp","unity-mcp"]},tags:["unity","game-dev","editor","gamedev"]},{id:"arxiv-mcp",name:"ArXiv MCP",description:"Search ArXiv research papers",category:"other",repository:"https://github.com/blazickjp/arxiv-mcp-server",website:"https://arxiv.org",installationType:"pip",pipPackage:"arxiv-mcp-server",installConfig:{command:"uvx",args:["arxiv-mcp-server"]},tags:["arxiv","research","papers"]},{id:"octocode-mcp",name:"Octocode MCP",description:"AI-powered developer assistant for GitHub and NPM research",category:"developer-tools",repository:"https://github.com/bgauryy/octocode-mcp",installationType:"npx",npmPackage:"octocode-mcp",installConfig:{command:"npx",args:["-y","octocode-mcp@latest"]},requiredEnvVars:[{name:"GITHUB_TOKEN",description:"GitHub token (also accepts OCTOCODE_TOKEN or GH_TOKEN)"}],tags:["github","npm","research","code"]},{id:"gpt-researcher-mcp",name:"GPT Researcher MCP",description:"Deep research agent with MCP support for comprehensive web research and report generation",category:"search-web",repository:"https://github.com/assafelovic/gptr-mcp",website:"https://gptr.dev",stars:24750,installationType:"source",installConfig:{command:"python",args:["server.py"]},requiredEnvVars:[{name:"OPENAI_API_KEY",description:"OpenAI API key for LLM capabilities",example:"sk-xxxxx"},{name:"TAVILY_API_KEY",description:"Tavily API key for web search",example:"tvly-xxxxx"}],tags:["research","web-search","deep-research","ai","tavily"]},{id:"mcp-chrome",name:"Chrome MCP",description:"Chrome extension-based MCP server for browser automation, screenshots, and content analysis",category:"browser-automation",repository:"https://github.com/hangwin/mcp-chrome",stars:9803,installationType:"npx",npmPackage:"mcp-chrome-bridge",installConfig:{command:"npx",args:["-y","mcp-chrome-bridge"]},tags:["chrome","browser","automation","extension","screenshot"]},{id:"aws-mcp",name:"AWS Core MCP",description:"AWS MCP Servers - dynamic orchestrator for specialized AWS services including Bedrock, Lambda, S3, and CloudWatch",category:"cloud-platform",repository:"https://github.com/awslabs/mcp",website:"https://awslabs.github.io/mcp/",stars:7801,installationType:"pip",pipPackage:"awslabs.core-mcp-server",official:!0,installConfig:{command:"uvx",args:["awslabs.core-mcp-server@latest"]},requiredEnvVars:[{name:"AWS_PROFILE",description:"AWS profile name for credentials",example:"default"},{name:"AWS_REGION",description:"AWS region",example:"us-east-1"}],tags:["aws","cloud","bedrock","lambda","s3","cloudwatch","official"]},{id:"git-mcp",name:"GitMCP",description:"Remote MCP server that transforms GitHub projects into documentation hubs for AI tools",category:"version-control",repository:"https://github.com/idosal/git-mcp",website:"https://gitmcp.io",stars:7328,installationType:"npx",npmPackage:"mcp-remote",installConfig:{command:"npx",args:["-y","mcp-remote","https://gitmcp.io/docs"]},tags:["git","github","documentation","remote","version-control"]},{id:"browser-tools-mcp",name:"BrowserTools MCP",description:"Monitor browser logs and capture browser data from Cursor and MCP-compatible IDEs via Chrome extension",category:"browser-automation",repository:"https://github.com/AgentDeskAI/browser-tools-mcp",website:"https://browsertools.agentdesk.ai",stars:6961,installationType:"npx",npmPackage:"@agentdeskai/browser-tools-mcp",installConfig:{command:"npx",args:["-y","@agentdeskai/browser-tools-mcp@latest"]},tags:["browser","devtools","chrome","logs","debugging"]},{id:"hexstrike-ai",name:"HexStrike AI",description:"Advanced MCP server for AI agents to run 150+ cybersecurity tools for pentesting and vulnerability discovery",category:"security",repository:"https://github.com/0x4m4/hexstrike-ai",stars:5690,installationType:"source",installConfig:{command:"python3",args:["hexstrike_mcp.py","--server","http://localhost:8888"]},requiredEnvVars:[{name:"HEXSTRIKE_PATH",description:"Path to cloned hexstrike-ai repository",example:"/path/to/hexstrike-ai"}],tags:["security","pentesting","cybersecurity","vulnerability"]},{id:"spec-workflow-mcp",name:"Spec Workflow MCP",description:"Structured spec-driven development workflow tools for AI-assisted software development with real-time web dashboard",category:"developer-tools",repository:"https://github.com/Pimzino/spec-workflow-mcp",stars:3569,installationType:"npx",npmPackage:"@pimzino/spec-workflow-mcp",installConfig:{command:"npx",args:["-y","@pimzino/spec-workflow-mcp@latest","${PROJECT_PATH}"]},requiredEnvVars:[{name:"PROJECT_PATH",description:"Path to your project directory",example:"/path/to/your/project"}],tags:["workflow","spec-driven","dashboard","vscode","development"]},{id:"excel-mcp-server",name:"Excel MCP",description:"Manipulate Excel files without Microsoft Excel - create, read, modify workbooks with formulas, formatting, and charts",category:"productivity",repository:"https://github.com/haris-musa/excel-mcp-server",stars:3079,installationType:"pip",pipPackage:"excel-mcp-server",installConfig:{command:"uvx",args:["excel-mcp-server","stdio"]},tags:["excel","spreadsheet","office","xlsx","formulas","charts"]},{id:"mcp-context-forge",name:"MCP Context Forge",description:"IBM MCP Gateway & Registry - federates MCP and REST services with discovery, auth, rate-limiting, and observability",category:"aggregator",repository:"https://github.com/IBM/mcp-context-forge",website:"https://ibm.github.io/mcp-context-forge/",stars:3056,installationType:"pip",pipPackage:"mcp-contextforge-gateway",official:!0,installConfig:{command:"uvx",args:["--from","mcp-contextforge-gateway","mcpgateway","--host","0.0.0.0","--port","4444"]},requiredEnvVars:[{name:"JWT_SECRET_KEY",description:"JWT secret key for authentication",example:"my-secret-key"}],tags:["ibm","gateway","registry","federation","proxy","official","enterprise"]},{id:"mobile-mcp",name:"Mobile MCP",description:"Scalable mobile automation and development through a platform-agnostic interface for iOS and Android devices",category:"developer-tools",repository:"https://github.com/mobile-next/mobile-mcp",stars:2969,installationType:"npx",npmPackage:"@mobilenext/mobile-mcp",installConfig:{command:"npx",args:["-y","@mobilenext/mobile-mcp@latest"]},tags:["mobile","ios","android","automation","simulator","emulator","testing"]},{id:"claude-code-mcp",name:"Claude Code MCP",description:"Run Claude Code in one-shot mode with permissions bypassed for direct agent access to file editing and terminal",category:"coding-agents",repository:"https://github.com/steipete/claude-code-mcp",stars:989,installationType:"npx",npmPackage:"@steipete/claude-code-mcp",installConfig:{command:"npx",args:["-y","@steipete/claude-code-mcp@latest"]},tags:["claude","coding","agent","cursor","windsurf"]},{id:"ros-mcp-server",name:"ROS MCP Server",description:"Connect LLMs with ROS/ROS2 robots for natural language robot commanding and real-time sensor visibility",category:"other",repository:"https://github.com/robotmcp/ros-mcp-server",stars:913,installationType:"pip",pipPackage:"ros-mcp-server",official:!0,installConfig:{command:"python",args:["-m","ros_mcp_server.server"]},tags:["ros","ros2","robotics","robots","sensors"]},{id:"gmail-mcp",name:"Gmail MCP",description:"Gmail integration with auto authentication for AI assistants to manage email through natural language",category:"communication",repository:"https://github.com/GongRzhe/Gmail-MCP-Server",website:"https://gmail.google.com",stars:895,installationType:"npx",npmPackage:"@gongrzhe/server-gmail-autoauth-mcp",installConfig:{command:"npx",args:["-y","@gongrzhe/server-gmail-autoauth-mcp"]},requiredEnvVars:[{name:"GMAIL_OAUTH_PATH",description:"Path to GCP OAuth credentials JSON file",example:"/path/to/gcp-oauth.keys.json"},{name:"GMAIL_CREDENTIALS_PATH",description:"Path where authenticated tokens are stored",example:"/path/to/credentials.json"}],tags:["gmail","email","google","communication","oauth"]},{id:"mcp-knowledge-graph",name:"MCP Knowledge Graph",description:"Persistent memory for AI models through a local knowledge graph with entities, relations, and observations",category:"developer-tools",repository:"https://github.com/shaneholloman/mcp-knowledge-graph",stars:764,installationType:"npx",npmPackage:"mcp-knowledge-graph",installConfig:{command:"npx",args:["-y","mcp-knowledge-graph","--memory-path","${MEMORY_PATH}"]},requiredEnvVars:[{name:"MEMORY_PATH",description:"Directory path where memory files are stored",example:"/Users/username/.aim"}],tags:["memory","knowledge-graph","persistence","context","entities"]},{id:"kubectl-mcp",name:"kubectl MCP",description:"Kubernetes cluster management for AI assistants with pod, service, Helm, and monitoring capabilities",category:"cloud-platform",repository:"https://github.com/rohitg00/kubectl-mcp-server",stars:750,installationType:"pip",pipPackage:"kubectl-mcp-tool",installConfig:{command:"python",args:["-m","kubectl_mcp_tool.mcp_server"]},requiredEnvVars:[{name:"KUBECONFIG",description:"Path to Kubernetes config file",example:"~/.kube/config"}],tags:["kubernetes","k8s","kubectl","helm","cloud","devops"]},{id:"apple-docs-mcp",name:"Apple Docs MCP",description:"Access Apple developer documentation, frameworks, APIs, SwiftUI, UIKit, and WWDC videos through MCP",category:"developer-tools",repository:"https://github.com/kimsungwhee/apple-docs-mcp",website:"https://developer.apple.com",stars:697,installationType:"npx",npmPackage:"@kimsungwhee/apple-docs-mcp",installConfig:{command:"npx",args:["-y","@kimsungwhee/apple-docs-mcp"]},tags:["apple","documentation","swiftui","uikit","wwdc","ios","macos"]},{id:"linkedin-mcp",name:"LinkedIn MCP",description:"LinkedIn integration for AI assistants to scrape profiles, companies, and search jobs",category:"social-media",repository:"https://github.com/stickerdaniel/linkedin-mcp-server",website:"https://linkedin.com",stars:685,installationType:"docker",dockerImage:"stickerdaniel/linkedin-mcp-server:latest",installConfig:{command:"docker",args:["run","--rm","-i","-e","LINKEDIN_COOKIE","stickerdaniel/linkedin-mcp-server:latest"]},requiredEnvVars:[{name:"LINKEDIN_COOKIE",description:"LinkedIn session cookie for authentication",example:"li_at=YOUR_COOKIE_VALUE"}],tags:["linkedin","social","jobs","profiles","scraping"]},{id:"mcp-proxy",name:"MCP Proxy",description:"Aggregates multiple MCP servers behind a single HTTP entrypoint with SSE and streamable HTTP support",category:"aggregator",repository:"https://github.com/TBXark/mcp-proxy",stars:612,installationType:"docker",dockerImage:"ghcr.io/tbxark/mcp-proxy:latest",installConfig:{command:"docker",args:["run","-i","--rm","-p","9090:9090","-v","${MCP_PROXY_CONFIG}:/config/config.json","ghcr.io/tbxark/mcp-proxy:latest"]},requiredEnvVars:[{name:"MCP_PROXY_CONFIG",description:"Path to MCP proxy configuration JSON file",example:"/path/to/config.json"}],tags:["proxy","aggregator","sse","http","multi-server"]},{id:"iterm-mcp",name:"iTerm MCP",description:"Execute commands in active iTerm sessions with REPL interactions and CLI assistance",category:"developer-tools",repository:"https://github.com/ferrislucas/iterm-mcp",stars:505,installationType:"npx",npmPackage:"iterm-mcp",installConfig:{command:"npx",args:["-y","iterm-mcp"]},tags:["iterm","terminal","macos","repl","cli"]},{id:"genai-toolbox-mcp",name:"GenAI Toolbox MCP",description:"Google's official MCP Toolbox for Databases - Postgres, MySQL, MongoDB, Redis, BigQuery, Spanner, and more",category:"database",repository:"https://github.com/googleapis/genai-toolbox",website:"https://googleapis.github.io/genai-toolbox/",stars:12234,installationType:"pip",pipPackage:"toolbox-core",official:!0,installConfig:{command:"uvx",args:["toolbox-langchain"]},tags:["google","database","postgres","mysql","mongodb","redis","bigquery","spanner","official"]},{id:"fastapi-mcp",name:"FastAPI MCP",description:"Expose FastAPI endpoints as MCP tools with authentication and authorization support",category:"developer-tools",repository:"https://github.com/tadata-org/fastapi_mcp",stars:11346,installationType:"pip",pipPackage:"fastapi-mcp",installConfig:{command:"pip",args:["install","fastapi-mcp"]},tags:["fastapi","api","rest","python","authentication","framework"]},{id:"claude-flow-mcp",name:"Claude Flow MCP",description:"Agent orchestration platform for Claude - deploy multi-agent swarms and coordinate autonomous workflows",category:"coding-agents",repository:"https://github.com/ruvnet/claude-flow",stars:11184,installationType:"npx",npmPackage:"claude-flow",installConfig:{command:"npx",args:["-y","claude-flow@alpha","init"]},tags:["claude","multi-agent","swarm","orchestration","workflow","autonomous"]},{id:"pal-mcp-server",name:"PAL MCP Server",description:"Multi-model support for Claude Code - use Gemini, OpenAI, OpenRouter, Azure, Grok, Ollama together",category:"ai-services",repository:"https://github.com/BeehiveInnovations/pal-mcp-server",stars:10758,installationType:"source",installConfig:{command:"python",args:["-m","pal_mcp_server"]},requiredEnvVars:[{name:"OPENROUTER_API_KEY",description:"OpenRouter API key (optional)",example:"sk-or-xxxxx"}],tags:["multi-model","gemini","openai","ollama","azure","grok","openrouter"]},{id:"browser-mcp",name:"Browser MCP",description:"Browser control MCP server via Chrome extension - navigate, click, type, and extract data",category:"browser-automation",repository:"https://github.com/BrowserMCP/mcp",stars:5362,installationType:"npx",npmPackage:"@anthropic/browser-mcp",installConfig:{command:"npx",args:["-y","@anthropic/browser-mcp"]},tags:["browser","chrome","extension","automation","web"]},{id:"mcp-playwright-ea",name:"Playwright MCP (ExecuteAutomation)",description:"Alternative Playwright MCP server for browser and API automation in Claude, Cursor, and more",category:"browser-automation",repository:"https://github.com/executeautomation/mcp-playwright",stars:5116,installationType:"npx",npmPackage:"@executeautomation/playwright-mcp-server",installConfig:{command:"npx",args:["-y","@executeautomation/playwright-mcp-server"]},tags:["playwright","browser","automation","testing","api"]},{id:"claude-context-mcp",name:"Claude Context MCP",description:"Code search MCP for Claude Code using vector database - make entire codebase the context",category:"developer-tools",repository:"https://github.com/zilliztech/claude-context",stars:4955,installationType:"npx",npmPackage:"@anthropic/claude-context",installConfig:{command:"npx",args:["-y","@anthropic/claude-context"]},tags:["code-search","vector-db","context","semantic-search","zilliz","milvus"]},{id:"ida-pro-mcp",name:"IDA Pro MCP",description:"AI-powered reverse engineering assistant bridging IDA Pro with language models",category:"security",repository:"https://github.com/mrexodia/ida-pro-mcp",stars:4906,installationType:"pip",pipPackage:"ida-pro-mcp",installConfig:{command:"pip",args:["install","ida-pro-mcp"]},tags:["ida-pro","reverse-engineering","binary-analysis","security","malware"]},{id:"deep-research-mcp",name:"Deep Research MCP",description:"Use any LLM for deep research with SSE API and MCP server support",category:"search-web",repository:"https://github.com/u14app/deep-research",stars:4302,installationType:"pip",pipPackage:"deep-research",installConfig:{command:"uvx",args:["deep-research"]},requiredEnvVars:[{name:"OPENAI_API_KEY",description:"OpenAI API key for LLM"}],tags:["research","deep-research","llm","sse","web-search"]},{id:"cipher-mcp",name:"Cipher MCP",description:"Memory layer for coding agents - persistent context for Cursor, Claude Code, Windsurf, and Cline",category:"developer-tools",repository:"https://github.com/campfirein/cipher",stars:3399,installationType:"npx",npmPackage:"@byterover/cipher-mcp",installConfig:{command:"npx",args:["-y","@byterover/cipher-mcp"]},tags:["memory","context","persistence","coding-agents","byterover"]},{id:"metorial-mcp",name:"Metorial MCP",description:"Connect any AI model to 600+ integrations powered by MCP with containerized security",category:"aggregator",repository:"https://github.com/metorial/metorial",stars:3201,installationType:"docker",dockerImage:"metorial/metorial:latest",installConfig:{command:"docker",args:["run","-i","--rm","metorial/metorial:latest"]},tags:["integrations","aggregator","docker","multi-tool","security"]},{id:"osaurus-mcp",name:"Osaurus MCP",description:"macOS LLM server - run local or cloud models with OpenAI/Anthropic compatible APIs",category:"ai-services",repository:"https://github.com/dinoki-ai/osaurus",stars:2962,installationType:"source",installConfig:{command:"osaurus",args:["serve"]},tags:["macos","local-llm","mlx","apple-silicon","openai-compatible","swift"]},{id:"shadcn-ui-mcp",name:"shadcn/ui MCP",description:"Context about shadcn/ui components for LLMs - React, Vue, Svelte, and React Native support",category:"developer-tools",repository:"https://github.com/Jpisnice/shadcn-ui-mcp-server",stars:2582,installationType:"npx",npmPackage:"shadcn-ui-mcp",installConfig:{command:"npx",args:["-y","shadcn-ui-mcp"]},tags:["shadcn","ui","react","vue","svelte","react-native","tailwind"]},{id:"shippie-mcp",name:"Shippie MCP",description:"Extendable code review and QA agent for CI/CD pipelines and GitHub",category:"developer-tools",repository:"https://github.com/mattzcarey/shippie",stars:2317,installationType:"npx",npmPackage:"shippie",installConfig:{command:"npx",args:["-y","shippie"]},tags:["code-review","qa","ci-cd","github","agent"]},{id:"devdocs-mcp",name:"DevDocs MCP",description:"Free, private, UI-based tech documentation MCP server for coders and developers",category:"developer-tools",repository:"https://github.com/cyberagiinc/DevDocs",stars:2003,installationType:"source",installConfig:{command:"python",args:["-m","devdocs"]},tags:["documentation","docs","reference","api-docs","crawler"]},{id:"brightdata-mcp",name:"Bright Data MCP",description:"Official Bright Data MCP for web scraping, data extraction, and anti-bot bypass",category:"browser-automation",repository:"https://github.com/brightdata/brightdata-mcp",website:"https://brightdata.com",stars:1845,installationType:"npx",npmPackage:"@anthropic/brightdata-mcp",official:!0,installConfig:{command:"npx",args:["-y","@anthropic/brightdata-mcp"]},requiredEnvVars:[{name:"BRIGHTDATA_API_KEY",description:"Bright Data API key"}],tags:["scraping","web-data","anti-bot","proxy","data-extraction","official"]},{id:"mcpjam-inspector",name:"MCP Inspector",description:"Build ChatGPT Apps and MCP servers locally with inspection and debugging tools",category:"developer-tools",repository:"https://github.com/MCPJam/inspector",stars:1545,installationType:"npx",npmPackage:"@mcpjam/inspector",installConfig:{command:"npx",args:["-y","@mcpjam/inspector"]},tags:["inspector","debugging","chatgpt","development","testing"]},{id:"mcptools",name:"MCP Tools CLI",description:"Command-line interface for interacting with MCP servers via stdio and HTTP transport",category:"developer-tools",repository:"https://github.com/f/mcptools",stars:1426,installationType:"npx",npmPackage:"mcptools",installConfig:{command:"npx",args:["-y","mcptools"]},tags:["cli","tools","stdio","http","debugging"]},{id:"mcp-scan",name:"MCP Scan",description:"Security vulnerability scanner for MCP connections - constrain, log, and audit",category:"security",repository:"https://github.com/invariantlabs-ai/mcp-scan",stars:1381,installationType:"pip",pipPackage:"mcp-scan",installConfig:{command:"uvx",args:["mcp-scan"]},tags:["security","vulnerability","audit","scanning","compliance"]},{id:"unreal-mcp",name:"Unreal Engine MCP",description:"Control Unreal Engine 5 through natural language via MCP for Cursor, Windsurf, and Claude",category:"developer-tools",repository:"https://github.com/chongdashu/unreal-mcp",stars:1239,installationType:"pip",pipPackage:"unreal-mcp",installConfig:{command:"uvx",args:["unreal-mcp"]},tags:["unreal-engine","ue5","game-dev","editor","blueprints"]},{id:"web-eval-agent",name:"Web Eval Agent MCP",description:"Autonomous web application evaluation and testing with Playwright integration",category:"developer-tools",repository:"https://github.com/refreshdotdev/web-eval-agent",stars:1231,installationType:"npx",npmPackage:"@refreshdotdev/web-eval-agent",installConfig:{command:"npx",args:["-y","@refreshdotdev/web-eval-agent"]},tags:["testing","qa","evaluation","playwright","autonomous"]},{id:"mcp-unity-alt",name:"MCP Unity (CoderGamester)",description:"Unity Editor MCP plugin for OpenAI, Gemini, Claude, Deepseek, and Grok integration",category:"developer-tools",repository:"https://github.com/CoderGamester/mcp-unity",stars:1193,installationType:"npx",npmPackage:"mcp-unity",installConfig:{command:"npx",args:["-y","mcp-unity"]},tags:["unity","game-dev","editor","c-sharp","multi-model"]},{id:"xmcp-framework",name:"xMCP Framework",description:"TypeScript MCP framework for building MCP servers with type safety and DX focus",category:"developer-tools",repository:"https://github.com/basementstudio/xmcp",stars:1168,installationType:"npm",npmPackage:"xmcp",installConfig:{command:"npm",args:["install","xmcp"]},tags:["framework","typescript","sdk","type-safe","developer-tools"]}];function Qo(e){return Ie.filter(n=>n.category===e)}function Dv(e){let n=e.toLowerCase();return Ie.filter(o=>o.name.toLowerCase().includes(n)||o.description.toLowerCase().includes(n)||o.tags?.some(r=>r.toLowerCase().includes(n)))}function kp(){return Array.from(new Set(Ie.map(e=>e.category)))}function bs(){let e=new Map;return Ie.forEach(n=>{n.tags?.forEach(o=>{e.set(o,(e.get(o)||0)+1)})}),Array.from(e.keys()).sort((n,o)=>{let r=(e.get(o)||0)-(e.get(n)||0);return r!==0?r:n.localeCompare(o)})}function jv(e){return Ie.filter(n=>n.tags?.includes(e))}function Nv(e){return Ie.filter(n=>n.tags?.includes(e)).length}if(process.env.OCTOCODE_DEBUG==="1"){let e=b.array(hw).safeParse(Ie);e.success||console.error("[mcp-registry] Schema validation failed:",e.error.message)}function Lv(e){return e.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function Rv(e){return{"browser-automation":"WEB",database:"DB","cloud-platform":"CLOUD","developer-tools":"DEV","file-system":"FS",communication:"CHAT","search-web":"Search","ai-services":"AI","workflow-automation":"Fast","version-control":"EDIT","data-visualization":"DATA","coding-agents":"AGENT",security:"SEC",productivity:"List",monitoring:"MON",finance:"FIN","social-media":"SOCIAL",aggregator:"LINK",other:"Package"}[e]||"Package"}function Sp(e){let n=`${Rv(e.category)} ${e.name}`;return e.official&&(n+=` ${c("cyan","[Official]")}`),n+=` - ${u(e.description.slice(0,45))}${e.description.length>45?"...":""}`,n}async function Fv(){let e=Jn();console.log(),console.log(c("blue"," \u250C"+"\u2500".repeat(60)+"\u2510")),console.log(c("blue"," \u2502 ")+u("[Step 1/6]")+" "+f("Select Target Client")+" ".repeat(28)+c("blue","\u2502")),console.log(c("blue"," \u2514"+"\u2500".repeat(60)+"\u2518")),console.log();let n=["cursor","claude-desktop","claude-code","opencode","codex","gemini-cli","windsurf","trae","antigravity","goose","kiro","zed","vscode-cline","vscode-roo","vscode-continue"],o=[];for(let t of n){let i=J[t],s=At(t),a=`${i.name} - ${u(i.description)}`;s?a+=` ${c("green","\u25CB")}`:a+=` ${c("dim","X")}`,e===t&&(a=`${c("green","\u2605")} ${a} ${c("yellow","(Current)")}`),o.push({name:a,value:t,disabled:s?!1:"Not installed"})}o.sort((t,i)=>t.disabled&&!i.disabled?1:!t.disabled&&i.disabled||e===t.value?-1:e===i.value?1:0),o.push(new z),o.push({name:`${c("cyan","-")} Custom Path - ${u("Specify your own config path")}`,value:"custom"}),o.push(new z),o.push({name:`${c("dim","- Back")}`,value:"back"});let r=await j({message:"Where would you like to install the MCP?",choices:o,loop:!1,pageSize:15});if(r==="back")return null;if(r==="custom"){let t=await vw();return t?{client:"custom",customPath:t}:null}return{client:r}}async function vw(){console.log(),console.log(` ${c("blue","INFO")} Enter the full path to your MCP config file`),console.log(` ${u("Leave empty to go back")}`),console.log();let e=await de({message:"Config path (or Enter to go back):",validate:n=>n.trim()?n.endsWith(".json")?!0:"Path must be a .json file":!0});if(!e||!e.trim())return null;if(e.startsWith("~")){let n=process.env.HOME||process.env.USERPROFILE||"";return e.replace("~",n)}return e}async function Zv(){console.log(),console.log(` ${u("[Step 2/6]")} ${f("Browse Method")}`),console.log();let e=[{name:`- Search MCPs - ${u("Find by name, description, or tags")}`,value:"search"},{name:`- Browse by Category - ${u(`${kp().length} categories`)}`,value:"category"},{name:`- Browse by Tag - ${u(`${bs().length} tags`)}`,value:"tag"},{name:`- Popular MCPs - ${u("Top 20 most popular")}`,value:"popular"},{name:`- Full List (A-Z) - ${u(`All ${Ie.length} MCPs alphabetically`)}`,value:"all"},new z,{name:`${c("dim","- Back")}`,value:"back"}];return await j({message:"",choices:e,loop:!1})}async function Bv(){return console.log(),console.log(` ${u("[Step 3/6]")} ${f("Select MCP")}`),console.log(),console.log(` ${c("blue","INFO")} Type to search by name, description, or tags`),console.log(),await ao({message:"Search MCPs:",source:n=>{let o={name:`${c("dim","- Back to browse options")}`,value:"back"};if(!n||!n.trim())return[...Ie.slice(0,15).map(t=>({name:Sp(t),value:t,description:t.tags?.slice(0,3).join(", ")})),{name:"\u2500".repeat(40),value:"back",disabled:!0},o];let r=Dv(n.trim());return r.length===0?[{name:`${c("yellow","WARN")} No MCPs found matching "${n}"`,value:"back",disabled:"Try different keywords"},o]:[...r.map(t=>({name:Sp(t),value:t,description:t.tags?.slice(0,3).join(", ")})),{name:"\u2500".repeat(40),value:"back",disabled:!0},o]},pageSize:12})}async function Vv(){console.log(),console.log(` ${u("[Step 3/6]")} ${f("Select MCP")}`),console.log();let n=kp().map(t=>({name:`${Rv(t)} ${Lv(t)} (${Qo(t).length})`,value:t}));n.sort((t,i)=>{let s=Qo(t.value).length;return Qo(i.value).length-s}),n.push(new z),n.push({name:`${c("dim","- Back")}`,value:"back"});let o=await j({message:"Select a category:",choices:n,loop:!1,pageSize:15});if(o==="back")return"back";let r=Qo(o);return await ks(r,Lv(o))}function Uv(e){return e.charAt(0).toUpperCase()+e.slice(1)}async function Gv(){console.log(),console.log(` ${u("[Step 3/6]")} ${f("Select MCP")}`),console.log(),console.log(` ${c("blue","INFO")} Type to filter ${bs().length} tags`),console.log();let e=bs(),n=await ao({message:"Search tags:",source:r=>{let t={name:`${c("dim","- Back to browse options")}`,value:"back"},i=!r||!r.trim()?e.slice(0,20):e.filter(s=>s.toLowerCase().includes(r.toLowerCase().trim()));return i.length===0?[{name:`${c("yellow","WARN")} No tags found matching "${r}"`,value:"back",disabled:"Try different keywords"},t]:[...i.map(s=>({name:`- ${Uv(s)} (${Nv(s)} MCPs)`,value:s})),{name:"\u2500".repeat(40),value:"back",disabled:!0},t]},pageSize:15});if(n==="back")return"back";let o=jv(n);return await ks(o,`Tag: ${Uv(n)}`)}async function Jv(){console.log(),console.log(` ${u("[Step 3/6]")} ${f("Select MCP")}`);let e=[...Ie].sort((n,o)=>(o.stars??0)-(n.stars??0)).slice(0,20);return await ks(e,"Popular MCPs")}async function Wv(){console.log(),console.log(` ${u("[Step 3/6]")} ${f("Select MCP")}`);let e=[...Ie].sort((n,o)=>n.name.localeCompare(o.name));return await ks(e,`All MCPs (A-Z) - ${e.length} total`)}async function ks(e,n){console.log(),console.log(` ${f(n)}`),console.log();let o=e.map(t=>({name:Sp(t),value:t}));return o.push(new z),o.push({name:`${c("dim","- Back")}`,value:"back"}),await j({message:"Select an MCP to install:",choices:o,loop:!1,pageSize:15})}async function qv(e){let n=e.requiredEnvVars;if(!n||n.length===0)return{};console.log(),console.log(` ${u("[Step 5/6]")} ${f("Environment Variables")}`),console.log(),console.log(c("yellow"," \u250C"+"\u2500".repeat(60)+"\u2510")),console.log(c("yellow"," \u2502 ")+`${c("yellow","WARN")} ${f("Environment Variables Required")}`+" ".repeat(26)+c("yellow","\u2502")),console.log(c("yellow"," \u2514"+"\u2500".repeat(60)+"\u2518")),console.log(),console.log(` ${u("This MCP requires the following environment variables:")}`),console.log();for(let t of n)console.log(` ${c("cyan",t.name)}`),console.log(` ${u(t.description)}`),t.example&&console.log(` ${u("Example:")} ${c("dim",t.example)}`),console.log();let o=await j({message:"Would you like to configure these now?",choices:[{name:`${c("green","\u2705")} Configure environment variables`,value:"configure"},{name:`${c("yellow","\u25CB")} Skip - ${u("Configure later manually")}`,value:"skip"},new z,{name:`${c("dim","- Back")}`,value:"back"}],loop:!1});if(o==="back")return"back";if(o==="skip")return{};let r={};for(let t of n){console.log(),console.log(` ${c("cyan",t.name)}: ${u(t.description)}`),t.example&&console.log(` ${u("Example:")} ${t.example}`);let i=await de({message:`${t.name}:`,validate:s=>!s.trim()&&!t.name.includes("OPTIONAL")?`${t.name} is required`:!0});i.trim()&&(r[t.name]=i.trim())}return r}async function Hv(e,n){let o=J[n];return console.log(),await j({message:`Install ${e.name} to ${o?.name||n}?`,choices:[{name:`${c("green","\u2705")} Proceed with installation`,value:"proceed"},new z,{name:`${c("dim","- Back to edit options")}`,value:"back"},{name:`${c("dim","X Cancel")}`,value:"cancel"}],loop:!1})}function Kv(e){console.log(),console.log(c("blue"," \u250C"+"\u2500".repeat(60)+"\u2510")),console.log(c("blue"," \u2502 ")+f(e.name)+(e.official?` ${c("cyan","[Official]")}`:"")+" ".repeat(Math.max(0,60-e.name.length-(e.official?12:0)))+c("blue","\u2502")),console.log(c("blue"," \u2514"+"\u2500".repeat(60)+"\u2518")),console.log(),console.log(` ${u("Description:")} ${e.description}`),console.log(` ${u("Category:")} ${c("cyan",e.category)}`),console.log(` ${u("Installation:")} ${c("yellow",e.installationType)}`),e.website&&console.log(` ${u("Website:")} ${c("blue",e.website)}`),console.log(` ${u("Repository:")} ${c("blue",e.repository)}`),e.tags&&e.tags.length>0&&console.log(` ${u("Tags:")} ${e.tags.map(n=>c("dim",n)).join(", ")}`),console.log()}function Xv(e,n,o,r){let t=J[n];console.log(c("blue"," \u250C"+"\u2500".repeat(60)+"\u2510")),console.log(c("blue"," \u2502 ")+f("Configuration Preview")+" ".repeat(39)+c("blue","\u2502")),console.log(c("blue"," \u2514"+"\u2500".repeat(60)+"\u2518")),console.log();let i={...e.installConfig.env||{},...r},s={command:e.installConfig.command,args:[...e.installConfig.args],...Object.keys(i).length>0&&{env:i}};if(console.log(` ${u("Server ID:")} ${c("cyan",e.id)}`),console.log(` ${u("Command:")} ${c("green",s.command)}`),console.log(` ${u("Args:")} ${c("yellow",s.args.join(" "))}`),Object.keys(i).length>0){console.log(` ${u("Environment Variables:")}`);for(let[a,l]of Object.entries(i)){let d=l.length>30?l.slice(0,27)+"...":l;console.log(` ${c("cyan",a)}: ${u(d)}`)}}console.log(),console.log(` ${f("Target:")}`),console.log(` ${u("Client:")} ${t?.name||n}`),console.log(` ${u("Config:")} ${c("cyan",o)}`),console.log()}function Yv(e,n,o,r){let t=J[n];console.log(),console.log(c("green"," \u250C"+"\u2500".repeat(60)+"\u2510")),console.log(c("green"," \u2502 ")+`${c("green","\u2705")} ${f("MCP installed successfully!")}`+" ".repeat(30)+c("green","\u2502")),console.log(c("green"," \u2514"+"\u2500".repeat(60)+"\u2518")),console.log(),console.log(` ${f("Installed:")} ${e.name}`),console.log(` ${f("To:")} ${t?.name||n}`),console.log(` ${u("Config:")} ${c("cyan",o)}`),r&&console.log(` ${u("Backup:")} ${r}`),console.log(),console.log(` ${f("Next steps:")}`),console.log(` 1. Restart ${t?.name||n}`),console.log(` 2. Look for ${c("cyan",e.id)} in MCP servers`),e.website&&console.log(` 3. Check ${c("blue",e.website)} for usage docs`),console.log()}function Qv(e){console.log(),console.log(c("red"," \u250C"+"\u2500".repeat(60)+"\u2510")),console.log(c("red"," \u2502 ")+`${c("red","X")} ${f("Installation failed")}`+" ".repeat(38)+c("red","\u2502")),console.log(c("red"," \u2514"+"\u2500".repeat(60)+"\u2518")),console.log(),console.log(` ${c("red","Error:")} ${e}`),console.log()}var yw={search:Bv,category:Vv,tag:Gv,popular:Jv,all:Wv},ey=["npx","node","python","python3","uvx","uv","docker","deno","bun","bunx","pnpm","yarn","npm"];function $w(e){if(!e||typeof e!="string")return{valid:!1,error:"Command is required"};let n=e.trim();if(n.includes("..")||n.includes("\0"))return{valid:!1,error:"Command contains invalid characters"};let o=n.split(/[/\\]/),r=o[o.length-1]?.split(/\s+/)[0]||"";return ey.includes(r)?{valid:!0}:{valid:!1,error:`Untrusted command: "${r}". Allowed: ${ey.join(", ")}`}}var bw=[/[;&|`$]/,/[(){}[\]]/,/[<>]/,/[!^]/,/\\(?!["'\\])/,/[\n\r\x00]/,/'.*'/,/".*\$.*"/],kw=/^--?[a-zA-Z][a-zA-Z0-9-]*(=\S+)?$/;function Sw(e){return kw.test(e)}function xw(e){if(!Array.isArray(e))return{valid:!1,error:"Arguments must be an array"};for(let n of e){if(typeof n!="string")return{valid:!1,problematic:String(n),error:"Argument must be a string"};if(!Sw(n)){for(let o of bw)if(o.test(n))return{valid:!1,problematic:n,error:`Potentially unsafe argument: "${n.slice(0,50)}${n.length>50?"...":""}"`};if(n.length>4096)return{valid:!1,problematic:n.slice(0,50)+"...",error:"Argument exceeds maximum length (4096 chars)"}}}return{valid:!0}}function ww(e){if(!e||typeof e!="object")return{valid:!0};let n=/^[A-Za-z_][A-Za-z0-9_]*$/;for(let[o,r]of Object.entries(e)){if(!n.test(o))return{valid:!1,problematic:o,error:`Invalid environment variable name: "${o}"`};if(typeof r!="string")return{valid:!1,problematic:o,error:`Environment variable value must be a string: "${o}"`};if(/[\x00-\x08\x0B\x0C\x0E-\x1F]/.test(r))return{valid:!1,problematic:o,error:`Environment variable "${o}" contains invalid control characters`};if(r.length>32768)return{valid:!1,problematic:o,error:`Environment variable "${o}" exceeds maximum length (32KB)`}}return{valid:!0}}function Cw(e,n){let o=$w(e.installConfig.command);if(!o.valid)throw new Error(o.error||"Invalid command");let r=xw(e.installConfig.args);if(!r.valid)throw new Error(r.error||`Potentially unsafe argument: "${r.problematic}"`);let t={...e.installConfig.env||{},...n},i=ww(t);if(!i.valid)throw new Error(i.error||`Invalid environment variable: "${i.problematic}"`);let s={command:e.installConfig.command,args:[...e.installConfig.args]};return Object.keys(t).length>0&&(s.env=t),s}function _w(e,n,o){let r=n==="custom"&&o?o:te(n,o),t=X(r);return!t||!t.mcpServers?!1:e in t.mcpServers}function Pw(e,n,o,r){let t=n==="custom"&&o?o:te(n,o),i=X(t)||{mcpServers:{}},s=Cw(e,r);i={...i,mcpServers:{...i.mcpServers,[e.id]:s}};let a=De(t,i);return a.success?{success:!0,configPath:t,backupPath:a.backupPath}:{success:!1,configPath:t,error:a.error||"Failed to write config"}}async function Iw(){console.log(),await de({message:u("Press Enter to continue..."),default:""})}async function xp(){await se(),console.log(),console.log(` ${c("yellow","WARN")} ${u("70+ community servers \u2022 MCPs install on your behalf")}`);let e={client:null,browseMode:null,selectedMCP:null,envValues:{}},n="client";for(;n!=="done";)switch(n){case"client":{let o=await Fv();if(!o)return;e.client=o.client,e.customPath=o.customPath,n="browse";break}case"browse":{let o=await Zv();if(o==="back"||o===null){n="client";break}e.browseMode=o,n="selectMCP";break}case"selectMCP":{let o=e.browseMode?yw[e.browseMode]:null,r=o?await o():null;if(!r||r==="back"){n="browse";break}e.selectedMCP=r,n="details";break}case"details":{let o=Ge(e.selectedMCP,"selectedMCP should be set before details step");if(console.log(),console.log(` ${u("[Step 4/6]")} ${f("MCP Details")}`),Kv(o),await j({message:"What would you like to do?",choices:[{name:`${c("green","\u2705")} Continue to install`,value:"continue"},new z,{name:`${c("dim","- Back to MCP list")}`,value:"back"}],loop:!1})==="back"){n="selectMCP";break}n="envVars";break}case"envVars":{let o=Ge(e.selectedMCP,"selectedMCP should be set before envVars step"),r=await qv(o);if(r==="back"){n="details";break}if(r===null){n="details";break}e.envValues=r,n="confirm";break}case"confirm":{let o=Ge(e.selectedMCP,"selectedMCP should be set before confirm step"),r=Ge(e.client,"client should be set before confirm step");console.log(),console.log(` ${u("[Step 6/6]")} ${f("Confirm Installation")}`);let t=r==="custom"&&e.customPath?e.customPath:te(r,e.customPath);if(_w(o.id,r,e.customPath)){console.log(),console.log(` ${c("yellow","\u26A0")} MCP "${f(o.name)}" is already installed.`),console.log();let a=await j({message:"What would you like to do?",choices:[{name:`${c("blue","\u21BB")} Update configuration`,value:"update"},{name:`${c("dim","\u23ED")} Skip (keep existing)`,value:"skip"},new z,{name:`${c("dim","\u2190 Back")}`,value:"back"}],loop:!1});if(a==="skip"){console.log(),console.log(` ${u("Skipped - keeping existing configuration.")}`),n="browse";break}if(a==="back"){n="envVars";break}console.log(),console.log(` ${c("blue","\u2192")} Updating MCP configuration...`)}Xv(o,r,t,e.envValues);let s=await Hv(o,r);if(s==="back"){n="envVars";break}if(s==="cancel"){console.log(),console.log(` ${u("Installation cancelled.")}`);return}n="install";break}case"install":{let o=Ge(e.selectedMCP,"selectedMCP should be set before install step"),r=Ge(e.client,"client should be set before install step"),t=new U("Installing MCP...").start(),i=Pw(o,r,e.customPath,e.envValues);i.success?(t.succeed("MCP installed successfully!"),Yv(o,r,i.configPath,i.backupPath)):(t.fail("Installation failed"),Qv(i.error||"Unknown error")),await Iw(),n="done";break}default:break}}function Mt(){let e=uv(),n=[];for(let o of e){let r=te(o),t=zt(o),i=null,s=0;t&&(i=X(r),i?.mcpServers&&(s=Object.keys(i.mcpServers).length)),n.push({client:o,configPath:r,config:i,exists:t,mcpCount:s})}return n}function Tw(e,n){if(e.command!==n.command)return!1;let o=e.args||[],r=n.args||[];if(o.length!==r.length)return!1;for(let s=0;s<o.length;s++)if(o[s]!==r[s])return!1;let t=Object.keys(e.env||{}).sort(),i=Object.keys(n.env||{}).sort();if(t.length!==i.length)return!1;for(let s=0;s<t.length;s++)if(t[s]!==i[s]||(e.env||{})[t[s]]!==(n.env||{})[i[s]])return!1;return!0}function Dt(e){let n=e.filter(d=>d.exists&&d.config),o=new Set,r=new Map;for(let d of n)if(d.config?.mcpServers)for(let[p,m]of Object.entries(d.config.mcpServers))o.add(p),r.has(p)||r.set(p,new Map),r.get(p).set(d.client,m);let t=[],i=n.map(d=>d.client);for(let d of o){let p=r.get(d)||new Map,m=Array.from(p.keys()),g=i.filter(M=>!p.has(M)),v=!1,$=Array.from(p.values());if($.length>1){let M=$[0];for(let _=1;_<$.length;_++)if(!Tw(M,$[_])){v=!0;break}}t.push({mcpId:d,presentIn:m,missingIn:g,hasConflict:v,variants:p})}let s=t.filter(d=>d.missingIn.length===0&&!d.hasConflict),a=t.filter(d=>d.missingIn.length>0&&!d.hasConflict),l=t.filter(d=>d.hasConflict);return{clients:e,allMCPs:o,diffs:t,fullyConsistent:s,needsSync:a,conflicts:l,summary:{totalClients:e.length,clientsWithConfig:n.length,totalUniqueMCPs:o.size,consistentMCPs:s.length,needsSyncCount:a.length,conflictCount:l.length}}}function Ew(e,n){let o={mcpServers:{...e?.mcpServers||{}}};for(let{mcpId:r,server:t}of n)o.mcpServers[r]=t;return o}function Ow(e,n){return n?n.chosenConfig:!e.hasConflict&&e.variants.size>0?Array.from(e.variants.values())[0]:null}function wp(e,n,o){let r=new Map,t=[],i=[],s=o?e.filter(l=>o.includes(l.client)):e.filter(l=>l.exists);for(let l of s){if(l.exists&&l.config===null){r.set(l.client,{success:!1,error:"Config file exists but could not be parsed (corrupt JSON?) \u2014 skipping to avoid data loss"}),t.push(`${J[l.client]?.name||l.client}: corrupt config \u2014 skipped`);continue}let d=Ew(l.config,n),p=De(l.configPath,d);if(p.success)r.set(l.client,{success:!0,backupPath:p.backupPath});else{let m=p.error||"Unknown write error";r.set(l.client,{success:!1,error:m}),t.push(`${J[l.client]?.name||l.client}: ${m}`)}}for(let{mcpId:l}of n)i.includes(l)||i.push(l);return{success:Array.from(r.values()).every(l=>l.success),clientResults:r,mcpsSynced:i,errors:t}}function Ss(e,n){let o=[],r=new Map(n.map(t=>[t.mcpId,t]));for(let t of e.needsSync){let i=Ow(t);i&&o.push({mcpId:t.mcpId,server:i})}for(let t of e.conflicts){let i=r.get(t.mcpId);i&&o.push({mcpId:t.mcpId,server:i.chosenConfig})}return o}function Cp(e){return e.summary.needsSyncCount>0||e.summary.conflictCount>0}function Se(e){return J[e]?.name||e}async function _p(e){let n=Mt(),o=Dt(n);if(o.summary.clientsWithConfig<2)return{success:!1,message:`Not enough clients to sync (found ${o.summary.clientsWithConfig})`,syncPerformed:!1};if(!Cp(o))return{success:!0,message:"All MCPs are already in sync",syncPerformed:!1};if(o.conflicts.length>0&&!e.force)return{success:!1,message:`${o.conflicts.length} conflict(s) found. Use --force to auto-resolve or run interactive mode.`,syncPerformed:!1};let r=[];if(e.force)for(let a of o.conflicts){let l=Array.from(a.variants.entries())[0];l&&r.push({mcpId:a.mcpId,chosenConfig:l[1],sourceClient:l[0]})}let t=Ss(o,r);if(e.dryRun)return{success:!0,message:`Would sync ${t.length} MCP(s) to ${o.summary.clientsWithConfig} client(s)`,syncPerformed:!1};let i=o.clients.filter(a=>a.exists),s=wp(o.clients,t,i.map(a=>a.client));return s.success?{success:!0,message:`Synced ${s.mcpsSynced.length} MCP(s) to ${i.length} client(s)`,syncPerformed:!0}:{success:!1,message:`Sync failed: ${s.errors.join(", ")}`,syncPerformed:!0}}function ny(e){let{summary:n}=e;if(console.log(),console.log(c("blue"," \u250C"+"\u2500".repeat(60)+"\u2510")),console.log(c("blue"," \u2502 ")+f("MCP Sync Status")+" ".repeat(44)+c("blue","\u2502")),console.log(c("blue"," \u2514"+"\u2500".repeat(60)+"\u2518")),console.log(),console.log(` ${f("Clients:")}`),console.log(` ${c("cyan","\u2022")} ${n.clientsWithConfig} of ${n.totalClients} with MCP configs`),console.log(),console.log(` ${f("MCPs:")}`),console.log(` ${c("cyan","\u2022")} ${n.totalUniqueMCPs} unique MCPs found`),n.consistentMCPs>0){console.log(` ${c("green","\u2705")} ${n.consistentMCPs} fully synced`);for(let o of e.fullyConsistent)console.log(` ${u("\u2022")} ${o.mcpId}`)}if(n.needsSyncCount>0){let o=n.needsSyncCount;console.log(` ${c("yellow","\u25CB")} ${o} can be synced`);for(let r of e.needsSync){let t=r.missingIn.map(Se).join(", ");console.log(` ${c("yellow","\u2022")} ${r.mcpId}`),console.log(` ${u(`missing from: ${t}`)}`)}}if(n.conflictCount>0){console.log(` ${c("red","!")} ${n.conflictCount} have conflicts`);for(let o of e.conflicts){let r=Array.from(o.variants.keys()).map(Se).join(" vs ");console.log(` ${c("red","\u2022")} ${o.mcpId}`),console.log(` ${u(`different in: ${r}`)}`)}console.log(),console.log(` ${c("cyan","INFO")} ${u("Continue to choose which config to use for each conflict")}`)}console.log()}function oy(e){console.log(` ${f("Client Configurations:")}`),console.log();for(let n of e){let o=Se(n.client),r=n.exists?c("green","\u25CF"):c("dim","\u25CB"),t=n.exists?`${n.mcpCount} MCPs`:u("no config");console.log(` ${r} ${o}`),console.log(` ${u(n.configPath)}`),console.log(` ${u(t)}`),console.log()}}function ty(e){let n=e.hasConflict?c("red","!"):e.missingIn.length>0?c("yellow","\u25CB"):c("green","\u2705");console.log(` ${n} ${f(e.mcpId)}`);let o=e.presentIn.map(Se).join(", ");if(console.log(` ${u("Present in:")} ${o}`),e.missingIn.length>0){let r=e.missingIn.map(Se).join(", ");console.log(` ${c("yellow","Missing from:")} ${r}`)}e.hasConflict&&console.log(` ${c("red","Conflict:")} Different configurations detected`),console.log()}function ry(e){if(e.fullyConsistent.length>0){console.log(` ${c("green","\u2705")} ${f("Fully Synced:")}`);for(let n of e.fullyConsistent)console.log(` ${c("dim","\u2022")} ${n.mcpId}`);console.log()}if(e.needsSync.length>0){console.log(` ${c("yellow","\u25CB")} ${f("Needs Sync (auto-resolvable):")}`);for(let n of e.needsSync)ty(n)}if(e.conflicts.length>0){console.log(` ${c("red","!")} ${f("Conflicts (requires resolution):")}`);for(let n of e.conflicts)ty(n)}}function Aw(e,n=" "){console.log(`${n}${u("command:")} ${e.command||u("(none)")}`);let o=e.args?.join(" ")||"";if(o&&console.log(`${n}${u("args:")} ${o}`),e.env&&Object.keys(e.env).length>0){console.log(`${n}${u("env:")}`);for(let[r,t]of Object.entries(e.env)){let s=/token|secret|key|password|auth|credential/i.test(r)?"***":t&&t.length>30?t.slice(0,30)+"...":t||"";console.log(`${n} ${c("cyan",r)}: ${s}`)}}}function iy(e,n=!1){console.log(),console.log(c("yellow"," \u250C"+"\u2500".repeat(60)+"\u2510")),console.log(c("yellow"," \u2502 ")+`${c("yellow","WARN")} Conflict: ${f(e.mcpId)}`+" ".repeat(Math.max(0,43-e.mcpId.length))+c("yellow","\u2502")),console.log(c("yellow"," \u2514"+"\u2500".repeat(60)+"\u2518")),console.log(),console.log(` ${u("This MCP has different configurations across clients:")}`),console.log();let o=1;for(let[r,t]of e.variants){let i=Se(r);if(console.log(` ${c("cyan",`[${o}]`)} ${f(i)}`),n)Aw(t," ");else{let s=t.args?.join(" ")||"",a=[t.command,s].filter(Boolean).join(" ");console.log(` ${u("command:")} ${a||u("(none)")}`),t.env&&Object.keys(t.env).length>0&&console.log(` ${u("env:")} ${Object.keys(t.env).length} variables`)}console.log(),o++}}function sy(e,n){console.log(),console.log(c("blue"," \u250C"+"\u2500".repeat(60)+"\u2510")),console.log(c("blue"," \u2502 ")+f("Sync Preview")+" ".repeat(47)+c("blue","\u2502")),console.log(c("blue"," \u2514"+"\u2500".repeat(60)+"\u2518")),console.log(),console.log(` ${f("MCPs to sync:")} ${e.length}`);for(let{mcpId:o}of e)console.log(` ${c("cyan","\u2022")} ${o}`);console.log(),console.log(` ${f("Target clients:")} ${n.length}`);for(let o of n){let r=Se(o.client);console.log(` ${c("cyan","\u2022")} ${r}`),console.log(` ${u(o.configPath)}`)}console.log(),console.log(` ${c("yellow","WARN")} ${f("Note:")}`),console.log(` ${u("Backups will be created before modifying any config.")}`),console.log()}function ay(e){if(console.log(),e.success?(console.log(c("green"," \u250C"+"\u2500".repeat(60)+"\u2510")),console.log(c("green"," \u2502 ")+`${c("green","\u2705")} ${f("Sync Complete!")}`+" ".repeat(43)+c("green","\u2502")),console.log(c("green"," \u2514"+"\u2500".repeat(60)+"\u2518"))):(console.log(c("red"," \u250C"+"\u2500".repeat(60)+"\u2510")),console.log(c("red"," \u2502 ")+`${c("red","X")} ${f("Sync completed with errors")}`+" ".repeat(32)+c("red","\u2502")),console.log(c("red"," \u2514"+"\u2500".repeat(60)+"\u2518"))),console.log(),e.mcpsSynced.length>0){console.log(` ${f("Synced MCPs:")} ${e.mcpsSynced.length}`);for(let n of e.mcpsSynced)console.log(` ${c("green","\u2705")} ${n}`);console.log()}console.log(` ${f("Client Results:")}`);for(let[n,o]of e.clientResults){let r=Se(n);o.success?(console.log(` ${c("green","\u2705")} ${r}`),o.backupPath&&console.log(` ${u("Backup:")} ${o.backupPath}`)):(console.log(` ${c("red","X")} ${r}`),o.error&&console.log(` ${c("red","Error:")} ${o.error}`))}if(e.errors.length>0){console.log(),console.log(` ${c("red","Errors:")}`);for(let n of e.errors)console.log(` ${c("red","\u2022")} ${n}`)}console.log()}function cy(){console.log(),console.log(c("green"," \u250C"+"\u2500".repeat(60)+"\u2510")),console.log(c("green"," \u2502 ")+`${c("green","\u2705")} ${f("All MCPs are already in sync!")}`+" ".repeat(28)+c("green","\u2502")),console.log(c("green"," \u2514"+"\u2500".repeat(60)+"\u2518")),console.log(),console.log(` ${u("All your MCP configurations are consistent across clients.")}`),console.log()}async function qn(){console.log(),await de({message:u("Press Enter to continue..."),default:""})}async function zw(e){iy(e,!0);let n=[],o=1;for(let[t,i]of e.variants){let s=Se(t),a=i.args?.join(" ")||"",l=[i.command,a].filter(Boolean).join(" ");n.push({name:`${c("cyan",`[${o}]`)} Use config from ${f(s)}`,value:{client:t,server:i},description:l||"(no command)"}),o++}n.push(new z),n.push({name:`${c("yellow","Skip")} Skip this MCP (don't sync)`,value:"skip"}),n.push({name:`${c("dim","- Back")}`,value:"back"});let r=await j({message:`Choose config for ${f(e.mcpId)}:`,choices:n,loop:!1});return r==="back"||r==="skip"?null:{mcpId:e.mcpId,chosenConfig:r.server,sourceClient:r.client}}async function Pp(){await se(),console.log(),console.log(c("blue","\u2501".repeat(66))),console.log(` Sync ${f("Sync System MCP")}`),console.log(c("blue","\u2501".repeat(66))),console.log(),console.log(` ${u("Synchronize MCP servers across all your IDE clients")}`);let e={analysis:null,resolutions:[],currentConflictIndex:0},n="analyze";for(;n!=="done";)switch(n){case"analyze":{let o=new U("Scanning client configurations...").start(),r=Mt();if(e.analysis=Dt(r),o.succeed("Configuration scan complete!"),e.analysis.summary.clientsWithConfig<2){console.log(),console.log(` ${c("yellow","WARN")} ${f("Not enough clients to sync")}`),console.log(` ${u("Found only")} ${e.analysis.summary.clientsWithConfig} ${u("client(s) with MCP configs.")}`),console.log(` ${u("Need at least 2 clients to sync.")}`),console.log(),await qn();return}n="showStatus";break}case"showStatus":{let o=Ge(e.analysis,"Analysis should be populated before showStatus step");if(ny(o),!Cp(o)){cy(),await qn();return}let r=await j({message:"What would you like to do?",choices:[{name:`${c("green","\u2705")} Continue to sync`,value:"continue"},{name:`${c("cyan","INFO")} Show MCP details`,value:"details"},{name:`${c("cyan","INFO")} Show client details`,value:"clients"},new z,{name:`${c("dim","- Back to menu")}`,value:"back"}],loop:!1});if(r==="back")return;if(r==="details"){console.log(),ry(o),await qn();break}if(r==="clients"){console.log(),oy(o.clients),await qn();break}o.conflicts.length>0?n="resolveConflicts":n="preview";break}case"resolveConflicts":{let r=Ge(e.analysis,"Analysis should be populated before resolveConflicts step").conflicts;console.log(),console.log(` ${c("yellow","WARN")} ${f(`Resolve ${r.length} conflict(s)`)}`),console.log(` ${u("You need to choose which configuration to use for each conflicting MCP.")}`),e.resolutions=[];for(let t=0;t<r.length;t++){console.log(),console.log(` ${u(`Conflict ${t+1} of ${r.length}`)}`);let i=await zw(r[t]);if(i===null){console.log(` ${c("yellow","Skip")} Skipping ${f(r[t].mcpId)}`);continue}e.resolutions.push(i),console.log(` ${c("green","\u2705")} Using config from ${f(Se(i.sourceClient))}`)}n="preview";break}case"preview":{let o=Ge(e.analysis,"Analysis should be populated before preview step"),r=Ss(o,e.resolutions);if(r.length===0){console.log(),console.log(` ${c("yellow","WARN")} ${f("No MCPs to sync")}`),console.log(` ${u("All conflicts were skipped or no sync is needed.")}`),console.log(),await qn();return}let t=o.clients.filter(i=>i.exists);sy(r.map(i=>({mcpId:i.mcpId})),t),n="confirm";break}case"confirm":{let o=await j({message:"Proceed with sync?",choices:[{name:`${c("green","\u2705")} Yes, sync all clients`,value:"proceed"},new z,{name:`${c("dim","- Back to review")}`,value:"back"},{name:`${c("dim","X Cancel")}`,value:"cancel"}],loop:!1});if(o==="cancel"){console.log(` ${u("Sync cancelled.")}`);return}if(o==="back"){n="showStatus";break}n="execute";break}case"execute":{let o=Ge(e.analysis,"Analysis should be populated before execute step"),r=Ss(o,e.resolutions),t=o.clients.filter(a=>a.exists),i=new U("Syncing configurations...").start(),s=wp(o.clients,r,t.map(a=>a.client));s.success?i.succeed("Sync complete!"):i.fail("Sync completed with errors"),ay(s),console.log(` ${f("Next steps:")}`),console.log(` ${u("Restart your IDEs to apply the changes.")}`),console.log(),await qn(),n="done";break}default:break}}import{fileURLToPath as Dw}from"node:url";import{basename as jw,dirname as uy,isAbsolute as Nw,join as Te,relative as Lw,resolve as Yt,sep as Uw}from"node:path";import{existsSync as dy,readFileSync as Rw,writeFileSync as $z,mkdirSync as Fw,rmSync as Zw,symlinkSync as Bw}from"node:fs";function Mw(e){if(e.length>=2){let n=e[0],o=e[e.length-1];if((n==='"'||n==="'")&&n===o)return e.slice(1,-1)}return e}function Ip(e,n){let o=new RegExp(`^${n}:(.*)$`),r=e.findIndex(i=>o.test(i));if(r===-1)return;let t=(e[r].match(o)?.[1]??"").trim();if(/^[|>][+-]?\d*$/.test(t)){let i=t.startsWith(">"),s=[];for(let l=r+1;l<e.length;l++){let d=e[l];if(d.trim()===""){s.push("");continue}if(!/^\s/.test(d))break;s.push(d.replace(/^\s+/,""))}for(;s.length>0&&s[s.length-1]==="";)s.pop();if(!i)return s.join(`
|
|
85
|
+
`).trim();let a="";for(let l of s)l===""?a+=`
|
|
86
|
+
`:a+=a&&!a.endsWith(`
|
|
87
|
+
`)?` ${l}`:l;return a.trim()}if(t!=="")return Mw(t).trim()}function it(e){let n=e.match(/^---\s*\n([\s\S]*?)\n---/);if(!n)return null;let o=n[1].split(`
|
|
88
|
+
`);return{name:Ip(o,"name"),description:Ip(o,"description"),category:Ip(o,"category")}}var Vw=ge.home||process.env.OCTOCODE_HOME||Te(q,".octocode"),ly=ge.cliConfig||Te(Vw,"config.json"),Gw=b.object({skillsDestDir:b.string().optional()}).passthrough(),ft=["claude-code","claude-desktop","cursor","codex","opencode","agents"],py=["claude-code"],Tp=["claude-code","claude-desktop"],Jw={claude:"claude-code","claude-code":"claude-code",claudecode:"claude-code","claude-desktop":"claude-desktop",claudedesktop:"claude-desktop",cursor:"cursor",codex:"codex",opencode:"opencode",agents:"agents"};function Ww(){return he(()=>{if(dy(ly)){let e=Rw(ly,"utf-8"),n=Gw.safeParse(JSON.parse(e));return n.success?n.data:{}}return{}},{})}function qw(){return Ww().skillsDestDir||null}function Hw(){if(ce){let e=Ve();return Te(e,"Claude","skills")}return Te(q,".claude","skills")}function Ep(e){return Jw[e.trim().toLowerCase()]??null}function ht(){return ft.join(", ")}function Hn(e,n=Ee()){if(e==="claude-code")return n;if(ce){let o=Ve();switch(e){case"claude-desktop":return Te(o,"Claude Desktop","skills");case"cursor":return Te(q,".cursor","skills");case"codex":return Te(q,".codex","skills");case"opencode":return Te(q,".opencode","skills");case"agents":return Te(q,".agents","skills")}}switch(e){case"claude-desktop":return Te(q,".claude-desktop","skills");case"cursor":return Te(q,".cursor","skills");case"codex":return Te(q,".codex","skills");case"opencode":return Te(q,".opencode","skills");case"agents":return Te(q,".agents","skills")}}function my(e,n){return e==="hybrid"?n==="claude-code"||n==="claude-desktop"?"copy":"symlink":e}function xs(e,n){let o=Yt(e),r=Yt(n),t=Lw(o,r);return t!==".."&&!t.startsWith(`..${Uw}`)&&!Nw(t)}function Qt(e){let n=e.trim();return n.length>0&&n===e&&n!=="."&&n!==".."&&!n.includes("\0")&&!n.includes("/")&&!n.includes("\\")}function en(e,n){if(!Qt(n))return null;let o=Yt(e,n);return xs(e,o)?o:null}function Kw(){let e=Dw(import.meta.url),n=uy(e);return[Yt(n,"..","skills"),Yt(n,"..","..","skills"),Yt(n,"..","..","..","..","skills"),Yt(n,"..","..","..","skills")]}function gy(e){let n=Kw();for(let o of n)if(F(o))return o;if(e.fallback)return n[0];throw new Error("Skills directory not found")}function ws(){return gy({fallback:!1})}function fy(){let e=ws();return Ue(e).filter(n=>n.startsWith("octocode-")&&Qt(n))}function tn(){return gy({fallback:!0})}function Ee(){let e=qw();return e||Hw()}function hy(e){let n=Te(e,"SKILL.md");if(!fe(n))return null;let o=nt(n);if(!o)return null;let r=it(o);return!r?.name||!r.description?null:{name:r.name,description:r.description,folder:jw(e)}}function Cs({sourcePath:e,destinationPath:n,mode:o,force:r}){try{if(!F(e))return"failed";if(dy(n)){if(!r)return"skipped";Zw(n,{recursive:!0,force:!0})}let t=uy(n);return F(t)||Fw(t,{recursive:!0,mode:448}),o==="symlink"?(Bw(e,n,ce?"junction":"dir"),"installed"):up(e,n)?"installed":"failed"}catch{return"failed"}}import eo from"node:path";import zy from"node:process";import My from"node:path";import{fileURLToPath as PC}from"node:url";import IC from"node:child_process";import TC,{constants as EC}from"node:fs/promises";import{promisify as sC}from"node:util";import aC from"node:child_process";import jp,{constants as xy}from"node:fs/promises";import $y from"node:process";import tC from"node:os";import Mp from"node:fs";import Qw from"node:fs";import vy from"node:fs";var Op;function Xw(){try{return vy.statSync("/.dockerenv"),!0}catch{return!1}}function Yw(){try{return vy.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function Ap(){return Op===void 0&&(Op=Xw()||Yw()),Op}var zp,eC=()=>{try{return Qw.statSync("/run/.containerenv"),!0}catch{return!1}};function nn(){return zp===void 0&&(zp=eC()||Ap()),zp}var yy=()=>{if($y.platform!=="linux")return!1;if(tC.release().toLowerCase().includes("microsoft"))return!nn();try{if(Mp.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft"))return!nn()}catch{}return Mp.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")||Mp.existsSync("/run/WSL")?!nn():!1},vt=$y.env.__IS_WSL_TEST__?yy:yy();import by from"node:process";import{Buffer as nC}from"node:buffer";import{promisify as oC}from"node:util";import rC from"node:child_process";import Zz,{constants as Bz}from"node:fs/promises";var iC=oC(rC.execFile),Dp=()=>`${by.env.SYSTEMROOT||by.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;var Re=async(e,n={})=>{let{powerShellPath:o,...r}=n,t=Re.encodeCommand(e);return iC(o??Dp(),[...Re.argumentsPrefix,t],{encoding:"utf8",...r})};Re.argumentsPrefix=["-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"];Re.encodeCommand=e=>nC.from(e,"utf16le").toString("base64");Re.escapeArgument=e=>`'${String(e).replaceAll("'","''")}'`;function ky(e){for(let n of e.split(`
|
|
89
|
+
`)){if(/^\s*#/.test(n))continue;let o=/^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(n);if(o)return o.groups.mountPoint.trim().replaceAll(/^["']|["']$/g,"")}}var cC=sC(aC.execFile),lC=(()=>{let e="/mnt/",n;return async function(){if(n)return n;let o="/etc/wsl.conf",r=!1;try{await jp.access(o,xy.F_OK),r=!0}catch{}if(!r)return e;let t=await jp.readFile(o,{encoding:"utf8"}),i=ky(t);return i===void 0?e:(n=i,n=n.endsWith("/")?n:`${n}/`,n)}})(),uC=async()=>`${await lC()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`,_s=vt?uC:Dp,Sy,wy=async()=>(Sy??=(async()=>{try{let e=await _s();return await jp.access(e,xy.X_OK),!0}catch{return!1}})(),Sy),Cy=async()=>{let e=await _s(),n=String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`,{stdout:o}=await Re(n,{powerShellPath:e});return o.trim()},_y=async e=>{if(/^[a-z]+:\/\//i.test(e))return e;try{let{stdout:n}=await cC("wslpath",["-aw",e],{encoding:"utf8"});return n.trim()}catch{return e}};function on(e,n,o){let r=t=>Object.defineProperty(e,n,{value:t,enumerable:!0,writable:!0});return Object.defineProperty(e,n,{configurable:!0,enumerable:!0,get(){let t=o();return r(t),t},set(t){r(t)}}),e}import{promisify as SC}from"node:util";import Zp from"node:process";import{execFile as xC}from"node:child_process";import{promisify as dC}from"node:util";import pC from"node:process";import{execFile as mC}from"node:child_process";var gC=dC(mC);async function Np(){if(pC.platform!=="darwin")throw new Error("macOS only");let{stdout:e}=await gC("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]),o=/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(e)?.groups.id??"com.apple.Safari";return o==="com.apple.safari"?"com.apple.Safari":o}import fC from"node:process";import{promisify as hC}from"node:util";import{execFile as vC,execFileSync as cM}from"node:child_process";var yC=hC(vC);async function Py(e,{humanReadableOutput:n=!0,signal:o}={}){if(fC.platform!=="darwin")throw new Error("macOS only");let r=n?[]:["-ss"],t={};o&&(t.signal=o);let{stdout:i}=await yC("osascript",["-e",e,r],t);return i.trim()}async function Lp(e){return Py(`tell application "Finder" to set app_path to application file id "${e}" as string
|
|
90
|
+
tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}import{promisify as $C}from"node:util";import{execFile as bC}from"node:child_process";var kC=$C(bC),Ps={MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},MSEdgeBHTML:{name:"Edge Beta",id:"com.microsoft.edge.beta"},MSEdgeDHTML:{name:"Edge Dev",id:"com.microsoft.edge.dev"},AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},ChromeBHTML:{name:"Chrome Beta",id:"com.google.chrome.beta"},ChromeDHTML:{name:"Chrome Dev",id:"com.google.chrome.dev"},ChromiumHTM:{name:"Chromium",id:"org.chromium.Chromium"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveDHTML:{name:"Brave Dev",id:"com.brave.Browser.dev"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},OperaStable:{name:"Opera",id:"com.operasoftware.Opera"},VivaldiHTM:{name:"Vivaldi",id:"com.vivaldi.Vivaldi"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"}},Rp=new Map(Object.entries(Ps)),Up=class extends Error{};async function Fp(e=kC){let{stdout:n}=await e("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),o=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(n);if(!o)throw new Up(`Cannot find Windows browser in stdout: ${JSON.stringify(n)}`);let{id:r}=o.groups,t=r.lastIndexOf("."),i=r.lastIndexOf("-"),s=t===-1?void 0:r.slice(0,t),a=i===-1?void 0:r.slice(0,i);return Ps[r]??Ps[s]??Ps[a]??{name:r,id:r}}var wC=SC(xC),CC=e=>e.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,n=>n.toUpperCase());async function Bp(){if(Zp.platform==="darwin"){let e=await Np();return{name:await Lp(e),id:e}}if(Zp.platform==="linux"){let{stdout:e}=await wC("xdg-mime",["query","default","x-scheme-handler/http"]),n=e.trim();return{name:CC(n.replace(/.desktop$/,"").replace("-"," ")),id:n}}if(Zp.platform==="win32")return Fp();throw new Error("Only macOS, Linux, and Windows are supported")}import Vp from"node:process";var _C=!!(Vp.env.SSH_CONNECTION||Vp.env.SSH_CLIENT||Vp.env.SSH_TTY),Iy=_C;var Is=Symbol("fallbackAttempt"),Gp=import.meta.url?My.dirname(PC(import.meta.url)):"",Ty=My.join(Gp,"xdg-open"),{platform:Kn,arch:Ey}=zy,Oy=async(e,n)=>{if(e.length===0)return;let o=[];for(let r of e)try{return await n(r)}catch(t){o.push(t)}throw new AggregateError(o,"Failed to open in all supported apps")},Ts=async e=>{e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e};let n=e[Is]===!0;if(delete e[Is],Array.isArray(e.app))return Oy(e.app,d=>Ts({...e,app:d,[Is]:!0}));let{name:o,arguments:r=[]}=e.app??{};if(r=[...r],Array.isArray(o))return Oy(o,d=>Ts({...e,app:{name:d,arguments:r},[Is]:!0}));if(o==="browser"||o==="browserPrivate"){let d={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","com.brave.browser":"brave","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","com.microsoft.edgemac":"edge","microsoft-edge.desktop":"edge","com.apple.safari":"safari"},p={chrome:"--incognito",brave:"--incognito",firefox:"--private-window",edge:"--inPrivate"},m;if(vt){let g=await Cy();m=Rp.get(g)??{}}else m=await Bp();if(m.id in d){let g=d[m.id.toLowerCase()];if(o==="browserPrivate"){if(g==="safari")throw new Error("Safari doesn't support opening in private mode via command line");r.push(p[g])}return Ts({...e,app:{name:Xn[g],arguments:r}})}throw new Error(`${m.name} is not supported as a default browser`)}let t,i=[],s={},a=!1;if(vt&&!nn()&&!Iy&&!o&&(a=await wy()),Kn==="darwin")t="open",e.wait&&i.push("--wait-apps"),e.background&&i.push("--background"),e.newInstance&&i.push("--new"),o&&i.push("-a",o);else if(Kn==="win32"||a){t=await _s(),i.push(...Re.argumentsPrefix),vt||(s.windowsVerbatimArguments=!0),vt&&e.target&&(e.target=await _y(e.target));let d=["$ProgressPreference = 'SilentlyContinue';","Start"];e.wait&&d.push("-Wait"),o?(d.push(Re.escapeArgument(o)),e.target&&r.push(e.target)):e.target&&d.push(Re.escapeArgument(e.target)),r.length>0&&(r=r.map(p=>Re.escapeArgument(p)),d.push("-ArgumentList",r.join(","))),e.target=Re.encodeCommand(d.join(" ")),e.wait||(s.stdio="ignore")}else{if(o)t=o;else{let d=!Gp||Gp==="/",p=!1;try{await TC.access(Ty,EC.X_OK),p=!0}catch{}t=zy.versions.electron??(Kn==="android"||d||!p)?"xdg-open":Ty}r.length>0&&i.push(...r),e.wait||(s.stdio="ignore",s.detached=!0)}Kn==="darwin"&&r.length>0&&i.push("--args",...r),e.target&&i.push(e.target);let l=IC.spawn(t,i,s);return e.wait?new Promise((d,p)=>{l.once("error",p),l.once("close",m=>{if(!e.allowNonzeroExitCode&&m!==0){p(new Error(`Exited with code ${m}`));return}d(l)})}):n?new Promise((d,p)=>{l.once("error",p),l.once("spawn",()=>{l.once("close",m=>{if(l.off("error",p),m!==0){p(new Error(`Exited with code ${m}`));return}l.unref(),d(l)})})}):(l.unref(),new Promise((d,p)=>{l.once("error",p),l.once("spawn",()=>{l.off("error",p),d(l)})}))},OC=(e,n)=>{if(typeof e!="string")throw new TypeError("Expected a `target`");return Ts({...n,target:e})};function Ay(e){if(typeof e=="string"||Array.isArray(e))return e;let{[Ey]:n}=e;if(!n)throw new Error(`${Ey} is not supported`);return n}function er({[Kn]:e},{wsl:n}={}){if(n&&vt)return Ay(n);if(!e)throw new Error(`${Kn} is not supported`);return Ay(e)}var Xn={browser:"browser",browserPrivate:"browserPrivate"};on(Xn,"chrome",()=>er({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium","chromium-browser"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));on(Xn,"brave",()=>er({darwin:"brave browser",win32:"brave",linux:["brave-browser","brave"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",x64:["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe","/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]}}));on(Xn,"firefox",()=>er({darwin:"firefox",win32:String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));on(Xn,"edge",()=>er({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));on(Xn,"safari",()=>er({darwin:"Safari"}));var Yn=OC;var tr=[{id:"octocode-skills",name:"Octocode",type:"github",owner:"bgauryy",repo:"octocode-mcp",branch:"main",skillsPath:"skills",skillPattern:"skill-folders",description:"Research, planning, code review & documentation",url:"https://github.com/bgauryy/octocode-mcp/tree/main/skills"},{id:"anthropic-skills",name:"Anthropic Official",type:"github",owner:"anthropics",repo:"skills",branch:"main",skillsPath:"skills",skillPattern:"skill-folders",description:"Official Anthropic skills \u2014 artifacts, design & docs",url:"https://github.com/anthropics/skills/tree/main/skills"},{id:"superpowers",name:"Superpowers",type:"github",owner:"obra",repo:"superpowers",branch:"main",skillsPath:"skills",skillPattern:"skill-folders",description:"TDD, debugging, worktrees & disciplined development",url:"https://github.com/obra/superpowers"},{id:"everything-claude-code",name:"Everything Claude Code",type:"github",owner:"affaan-m",repo:"everything-claude-code",branch:"main",skillsPath:"skills",skillPattern:"skill-folders",description:"Performance, security, memory & agent harness",url:"https://github.com/affaan-m/everything-claude-code/tree/main/skills"},{id:"composio-skills",name:"Composio Skills",type:"github",owner:"ComposioHQ",repo:"awesome-claude-skills",branch:"master",skillsPath:"",skillPattern:"skill-folders",description:"Brand, canvas, MCP builder, invoicing & testing",url:"https://github.com/ComposioHQ/awesome-claude-skills"},{id:"antigravity-awesome-skills",name:"Antigravity Awesome",type:"github",owner:"sickn33",repo:"antigravity-awesome-skills",branch:"main",skillsPath:"skills",skillPattern:"skill-folders",description:"1,300+ agentic skills across all coding domains",url:"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills"},{id:"obsidian-skills",name:"Obsidian Skills",type:"github",owner:"kepano",repo:"obsidian-skills",branch:"main",skillsPath:"skills",skillPattern:"skill-folders",description:"Markdown editing & Obsidian vault productivity",url:"https://github.com/kepano/obsidian-skills/tree/main/skills"},{id:"planning-with-files",name:"Planning with Files",type:"github",owner:"OthmanAdi",repo:"planning-with-files",branch:"master",skillsPath:"skills",skillPattern:"skill-folders",description:"Manus-style persistent markdown planning workflow",url:"https://github.com/OthmanAdi/planning-with-files/tree/master/skills"},{id:"marketing-skills",name:"Marketing Skills",type:"github",owner:"coreyhaines31",repo:"marketingskills",branch:"main",skillsPath:"skills",skillPattern:"skill-folders",description:"SEO, copywriting, CRO, analytics & growth engineering",url:"https://github.com/coreyhaines31/marketingskills/tree/main/skills"},{id:"claude-scientific-skills",name:"Scientific Skills",type:"github",owner:"K-Dense-AI",repo:"claude-scientific-skills",branch:"main",skillsPath:"scientific-skills",skillPattern:"skill-folders",description:"Biopython, astropy, deepchem & scientific computing",url:"https://github.com/K-Dense-AI/claude-scientific-skills"},{id:"dev-browser",name:"Dev Browser",type:"github",owner:"SawyerHood",repo:"dev-browser",branch:"main",skillsPath:"skills",skillPattern:"skill-folders",description:"Browser control via Playwright with persistent state",url:"https://github.com/SawyerHood/dev-browser"},{id:"aris-research",name:"ARIS Research",type:"github",owner:"wanshuiyin",repo:"Auto-claude-code-research-in-sleep",branch:"main",skillsPath:"skills",skillPattern:"skill-folders",description:"Autonomous ML research \u2014 papers, reviews & experiments",url:"https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/tree/main/skills"},{id:"buildwithclaude",name:"Build With Claude",type:"github",owner:"davepoon",repo:"buildwithclaude",branch:"main",skillsPath:"commands",skillPattern:"flat-md",description:"170+ commands, agents & skills hub",url:"https://github.com/davepoon/buildwithclaude"},{id:"claude-code-plugins-plus-skills",name:"Plugins + Skills",type:"github",owner:"jeremylongshore",repo:"claude-code-plugins-plus-skills",branch:"main",skillsPath:"skills",skillPattern:"skill-folders",description:"1,300+ skills with tutorials & orchestration",url:"https://github.com/jeremylongshore/claude-code-plugins-plus-skills"},{id:"ui-ux-pro-max",name:"UI/UX Pro Max",type:"github",owner:"nextlevelbuilder",repo:"ui-ux-pro-max-skill",branch:"main",skillsPath:".claude/skills",skillPattern:"skill-folders",description:"UI/UX, brand guidelines, design systems & styling",url:"https://github.com/nextlevelbuilder/ui-ux-pro-max-skill/tree/main/.claude/skills"},{id:"ctf-skills",name:"CTF Skills",type:"github",owner:"ljagiello",repo:"ctf-skills",branch:"main",skillsPath:"",skillPattern:"skill-folders",description:"Web exploitation, crypto, pwn, reverse & forensics",url:"https://github.com/ljagiello/ctf-skills"},{id:"vltansky-skills",name:"Vltansky Skills",type:"github",owner:"vltansky",repo:"skills",branch:"master",skillsPath:"skills",skillPattern:"skill-folders",description:"QA, interviews, retros, RFC research & code reviews",url:"https://github.com/vltansky/skills/tree/master/skills"},{id:"claude-skills-marketplace",name:"Claude Skills Marketplace",type:"github",owner:"mhattingpete",repo:"claude-skills-marketplace",branch:"main",skillsPath:"",skillPattern:"skill-folders",description:"Git automation, testing & code review",url:"https://github.com/mhattingpete/claude-skills-marketplace"},{id:"daymade-claude-code-skills",name:"Daymade Skills",type:"github",owner:"daymade",repo:"claude-code-skills",branch:"main",skillsPath:"",skillPattern:"skill-folders",description:"Production-ready development workflows",url:"https://github.com/daymade/claude-code-skills"},{id:"webmaxru-agent-skills",name:"Web AI Skills",type:"github",owner:"webmaxru",repo:"agent-skills",branch:"main",skillsPath:"skills",skillPattern:"skill-folders",description:"Web APIs for Web AI \u2014 auto-updated, manually reviewed",url:"https://github.com/webmaxru/agent-skills/tree/main/skills"},{id:"vercel-labs-skills",name:"Vercel Labs",type:"github",owner:"vercel-labs",repo:"skills",branch:"main",skillsPath:"skills",skillPattern:"skill-folders",description:"Open agent skills ecosystem CLI by Vercel",url:"https://github.com/vercel-labs/skills/tree/main/skills"}];var Dy=new Map,AC=300*1e3;function rn(e){return e.type==="local"}async function zC(e){if(e.type==="local")return null;let n=`${e.owner}/${e.repo}`,o=Dy.get(n);if(o&&Date.now()-o.timestamp<AC)return o.stars;try{let r=`https://api.github.com/repos/${e.owner}/${e.repo}`,t=await fetch(r,{headers:{Accept:"application/vnd.github.v3+json","User-Agent":"octocode-cli"}});if(!t.ok)return null;let s=(await t.json()).stargazers_count;return Dy.set(n,{stars:s,timestamp:Date.now()}),s}catch{return null}}async function jy(){let e=new Map,n=tr.map(async o=>{let r=await zC(o);r!==null&&e.set(o.id,r)});return await Promise.all(n),e}import{join as Je,isAbsolute as MC}from"node:path";import{mkdirSync as Wp,statSync as DC,readdirSync as jC,unlinkSync as NC,rmSync as LC}from"node:fs";import Ny from"node:os";var Ry=1440*60*1e3,UC=b.object({timestamp:b.number(),skills:b.array(b.object({}).passthrough())});function qp(){let e=Ny.homedir(),n=process.env.npm_config_cache||Je(e,".npm"),o=Je(n,"_cacache","octocode-skills"),t=Ny.platform()==="win32"?Je(process.env.LOCALAPPDATA||Je(e,"AppData","Local"),"octocode","cache","skills"):Je(e,".cache","octocode","skills");return F(n)?o:t}function RC(){let e=qp();return F(e)||Wp(e,{recursive:!0,mode:448}),e}function Fy(e){let n=RC();return Je(n,`${e.id}.json`)}function FC(e){return he(()=>{if(!fe(e))return!1;let n=DC(e);return Date.now()-n.mtimeMs<Ry},!1)}function ZC(e){return he(()=>{let n=Fy(e);if(!FC(n))return null;let o=nt(n);if(!o)return null;let r=JSON.parse(o);if(!UC.safeParse(r).success)return null;let i=r;return Date.now()-i.timestamp>Ry?null:i.skills.map(s=>({...s,source:e}))},null)}function BC(e,n){he(()=>{let o=Fy(e),r=n.map(({source:i,...s})=>s),t={timestamp:Date.now(),skills:r};return Go(o,JSON.stringify(t,null,2)),!0},!1)}function Jp(e){let n=["PR","API","UI","CLI","MCP","AI"];return e.replace(/\.md$/i,"").replace(/[-_]/g," ").replace(/\b\w/g,o=>o.toUpperCase()).replace(new RegExp(`\\b(${n.join("|")})\\b`,"gi"),o=>o.toUpperCase())}function VC(e){try{let n=ws(),o=fy(),r=[];for(let t of o){let i=Je(n,t),s=Je(i,"SKILL.md");if(fe(s)){let a=nt(s);if(a){let l=it(a);r.push({name:t,displayName:Jp(t),description:l?.description||By(a)||"No description",category:l?.category||"Official",path:t,source:e})}}}return r}catch{return[]}}function GC(e,n){try{let o=ws(),r=en(o,e.name),t=en(n,e.name);return!r||!t?{success:!1,error:"Invalid skill name"}:F(r)?Cs({sourcePath:r,destinationPath:t,mode:"copy",force:!0})!=="installed"?{success:!1,error:"Failed to copy bundled skill"}:{success:!0}:{success:!1,error:"Skill not found in bundled source"}}catch(o){return{success:!1,error:o instanceof Error?o.message:"Unknown error"}}}async function Zy(e){let n=`https://api.github.com/repos/${e.owner}/${e.repo}/git/trees/${e.branch}?recursive=1`,o=await fetch(n,{headers:{Accept:"application/vnd.github.v3+json","User-Agent":"octocode-cli"}});if(!o.ok)throw o.status===403?new Error("GitHub API rate limit exceeded. Try again later."):new Error(`Failed to fetch marketplace: ${o.statusText}`);let r=await o.json();return r.truncated&&console.warn(`[octocode] GitHub tree response was truncated for ${e.owner}/${e.repo}. Some skills may be missing.`),r.tree}var nr=1024*1024,Ly=500;async function Es(e,n){let o=`https://raw.githubusercontent.com/${e.owner}/${e.repo}/${e.branch}/${n}`,r=await fetch(o,{headers:{"User-Agent":"octocode-cli"}});if(!r.ok)throw new Error(`Failed to fetch content: ${r.statusText}`);let t=r.headers?.get?.("Content-Length"),i=t?Number(t):NaN;if(Number.isFinite(i)&&i>nr)throw new Error(`Content too large: ${i} bytes exceeds ${nr} byte limit`);let s=await r.text(),a=Buffer.byteLength(s,"utf8");if(a>nr)throw new Error(`Content too large: ${a} bytes exceeds ${nr} byte limit`);return s}async function Hp(e,n={}){if(rn(e))return VC(e);if(!n.skipCache){let t=ZC(e);if(t)return t}let o=await Zy(e),r=[];if(e.skillPattern==="flat-md"){let t=e.skillsPath?`${e.skillsPath}/`:"",s=o.filter(l=>l.type==="blob"&&l.path.startsWith(t)&&l.path.endsWith(".md")&&!l.path.includes("/")==(t==="")&&(t===""||l.path.split("/").length===2)).slice(0,100),a=await Promise.all(s.map(async l=>{try{let d=await Es(e,l.path),p=it(d),m=l.path.split("/").pop()||l.path;return{name:m.replace(/\.md$/i,""),displayName:Jp(m),description:p?.description||"No description available",category:p?.category,path:l.path,source:e}}catch{return null}}));r.push(...a.filter(l=>l!==null))}else{let t=e.skillsPath?`${e.skillsPath}/`:"",i=o.filter(a=>a.type==="tree"&&(t===""||a.path.startsWith(t))&&!a.path.includes(".")&&!a.path.startsWith(".")),s=await Promise.all(i.slice(0,50).map(async a=>{let l=`${a.path}/SKILL.md`,d=`${a.path}/README.md`,p=o.some(v=>v.path===l&&v.type==="blob"),m=o.some(v=>v.path===d&&v.type==="blob"),g=p?l:m?d:null;if(!g)return null;try{let v=await Es(e,g),$=it(v),M=a.path.split("/").pop()||a.path;return{name:M,displayName:Jp(M),description:$?.description||By(v)||"No description",category:$?.category,path:a.path,source:e}}catch{return null}}));r.push(...s.filter(a=>a!==null))}return BC(e,r),r}function By(e){let o=e.replace(/^---[\s\S]*?---\s*/,"").split(`
|
|
91
|
+
`),r="";for(let t of o){let i=t.trim();if(!i){if(r)break;continue}i.startsWith("#")||(r+=(r?" ":"")+i)}return r?r.slice(0,200):null}async function Kp(e,n){try{let o=e.source;if(rn(o))return GC(e,n);let r=await Zy(o),t=en(n,e.name);if(!t)return{success:!1,error:"Invalid skill name"};if(o.skillPattern==="flat-md"){let i=await Es(o,e.path),s=Je(t,"SKILL.md");if(!xs(t,s))throw new Error("Invalid skill destination path");if(Uy(t),!Go(s,i))throw new Error("Failed to write skill file")}else{let i=`${e.path}/`,s=r.filter(d=>d.type==="blob"&&d.path.startsWith(i));if(s.length>Ly)throw new Error(`Skill has too many files: ${s.length} exceeds ${Ly}`);let a=s.map(d=>{let p=d.path.slice(i.length);if(!p||MC(p))throw new Error("Invalid skill file path");let m=Je(t,p);if(!xs(t,m))throw new Error("Invalid skill file path traversal");return{relativePath:p,destPath:m,sourcePath:d.path}}),l=await Promise.all(a.map(async d=>({...d,content:await Es(o,d.sourcePath)})));Uy(t);for(let d of l){let p=Je(t,d.relativePath.split("/").slice(0,-1).join("/"));if(p!==t&&!F(p)&&Wp(p,{recursive:!0,mode:448}),!Go(d.destPath,d.content))throw new Error(`Failed to write skill file: ${d.relativePath}`)}}return{success:!0}}catch(o){return{success:!1,error:o instanceof Error?o.message:"Unknown error"}}}function Uy(e){F(e)&&LC(e,{recursive:!0,force:!0}),F(e)||Wp(e,{recursive:!0,mode:448})}function Vy(){he(()=>{let e=qp();if(F(e)){let n=jC(e);for(let o of n)o.endsWith(".json")&&NC(Je(e,o))}return!0},!1)}function Os(){return qp()}async function As(e,n,o,r="main"){let t=o.endsWith("/SKILL.md")||o.endsWith("SKILL.md")?o:`${o}/SKILL.md`,i=`https://raw.githubusercontent.com/${e}/${n}/${r}/${t}`,s=await fetch(i,{headers:{"User-Agent":"octocode-cli"},signal:AbortSignal.timeout(8e3)});if(s.status===404){if(r==="main")return As(e,n,o,"master");throw new Error(`SKILL.md not found at ${e}/${n}/${t} (tried main and master)`)}if(!s.ok)throw new Error(`Failed to fetch SKILL.md: ${s.status} ${s.statusText}`);let a=await s.text();if(a.length>nr)throw new Error(`SKILL.md too large (${a.length} bytes)`);return a}var JC="https://www.skills.sh/api/search";async function Gy(e,n=20){let o=`${JC}?q=${encodeURIComponent(e)}&limit=${Math.min(n,100)}`,r=await fetch(o,{headers:{"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:150.0) Gecko/20100101 Firefox/150.0",Accept:"application/json"},signal:AbortSignal.timeout(8e3)});if(!r.ok)throw new Error(`skills.sh search failed: ${r.status} ${r.statusText}`);let t=await r.json(),i=[...t.skills??[]].sort((s,a)=>a.installs-s.installs);return{results:i.slice(0,n),count:t.count??i.length}}import Ms from"node:path";var zs=new Set(["octocode-research","octocode-pull-request-reviewer","octocode-researcher"]);async function st(){console.log(),await de({message:u("Press Enter to continue..."),default:""})}function WC(e,n){if(rn(e))return`${f(e.name)} ${c("cyan","bundled")} - ${u(e.description)}`;let o=n?` ${n.toLocaleString()}`:"";return`${f(e.name)}${c("yellow",o)} - ${u(e.description)}`}function qC(e,n){let o=n?c("green","\u2705 "):"",r=zs.has(e.name)?c("yellow"," *"):"",t=e.description.slice(0,50),i=e.description.length>50?"...":"";return`${o}${e.displayName}${r} ${u(t)}${u(i)}`}function Qn(e){let n=Ee();return F(Ms.join(n,e))}async function HC(e){console.log(),console.log(` ${f("Select a marketplace to browse:")}`),console.log();let n=tr.filter(a=>rn(a)),r=[...tr.filter(a=>!rn(a))].sort((a,l)=>(e.get(l.id)??0)-(e.get(a.id)??0)),t=[...n,...r],i=[];for(let a of t)i.push({name:WC(a,e.get(a.id)),value:a,description:u(a.url)});return i.push(new z),i.push({name:`${c("dim","- Back to skills menu")}`,value:"back"}),await j({message:"",choices:i,pageSize:10,loop:!1,theme:{prefix:" ",style:{highlight:a=>c("magenta",a)}}})}async function Jy(e,n){console.log(),console.log(` ${f(e.name)} - ${n.length} skills available`),console.log(` ${u(e.url)}`),console.log();let r=[...n].sort((s,a)=>{let l=Qn(s.name),d=Qn(a.name);if(l!==d)return l?-1:1;let p=zs.has(s.name),m=zs.has(a.name);return p!==m?p?-1:1:s.displayName.localeCompare(a.displayName)}).map(s=>{let a=Qn(s.name);return{name:qC(s,a),value:s,description:s.category?`[${s.category}]`:void 0}}),t={name:`${c("dim","- Back to marketplaces")}`,value:"back"};return await ao({message:`Type to filter skills (${n.length} available)`,source:s=>{if(!s||!s.trim())return[...r,t];let a=s.toLowerCase();return[...r.filter(d=>{if(typeof d.value=="string")return!1;let p=d.value;return p.name.toLowerCase().includes(a)||p.displayName.toLowerCase().includes(a)||p.description.toLowerCase().includes(a)||p.category?.toLowerCase().includes(a)}),t]},pageSize:20,theme:{prefix:" ",style:{highlight:s=>c("magenta",s)}}})}async function Wy(e){let n=Qn(e.name),o=Ee(),r=zs.has(e.name)?c("yellow"," recommended"):"";console.log(),console.log(` ${f(e.displayName)}${r}`),console.log(` ${u(e.description)}`),console.log(),e.category&&(console.log(` ${f("Category:")} ${e.category}`),console.log()),console.log(` ${f("Source:")} ${e.source.name}`),console.log(` ${u(e.source.url)}`),console.log(),console.log(` ${f("Install path:")}`),console.log(` ${c("cyan",Ms.join(o,e.name))}`),console.log();let t=[{name:n?`${c("yellow","\u2B06")} Reinstall skill`:`${c("green","\u2705")} Install skill`,value:"install"}];return n&&t.push({name:`${c("red","Delete")} Delete skill`,value:"delete"}),t.push(new z),t.push({name:`${c("dim","- Back")}`,value:"back"}),await j({message:n?"Choose an action:":"Install this skill?",choices:t,loop:!1,theme:{prefix:" ",style:{highlight:s=>c("magenta",s),message:s=>f(s)}}})}async function qy(e){let n=Ee();console.log();let o=new U(`Installing ${e.displayName}...`).start(),r=await Kp(e,n);return r.success?(o.succeed(`Installed ${e.displayName}!`),console.log(),console.log(` ${c("green","\u2705")} Skill installed successfully`),console.log(` ${u("Location:")} ${c("cyan",Ms.join(n,e.name))}`),console.log(),console.log(` ${f("The skill is now available in your AI client!")}`)):(o.fail(`Failed to install ${e.displayName}`),console.log(),console.log(` ${c("red","X")} Installation failed: ${r.error}`)),console.log(),await st(),r.success}async function Hy(e){let n=Ee(),o=Ms.join(n,e.name);if(console.log(),await j({message:"Delete this installed skill?",choices:[{name:`${c("red","Delete")} Yes, delete skill`,value:"yes"},new z,{name:`${c("dim","- Cancel")}`,value:"no"}],loop:!1,theme:{prefix:" ",style:{highlight:i=>c("magenta",i),message:i=>f(i)}}})!=="yes")return!1;console.log();let t=new U(`Deleting ${e.displayName}...`).start();return Gn(o)?(t.succeed(`Deleted ${e.displayName}`),console.log(),console.log(` ${c("green","\u2705")} Skill deleted successfully`),console.log(),await st(),!0):(t.fail(`Failed to delete ${e.displayName}`),console.log(),console.log(` ${c("red","X")} Could not delete skill directory`),console.log(` ${u("Path:")} ${c("cyan",o)}`),console.log(),await st(),!1)}async function KC(e,n){console.log(),console.log(` ${f("Octocode Skills")}`),console.log(` ${u(`${e} skills available`)}`),console.log();let o=[];return n>0?(o.push({name:`${c("green","Fast")} Install All Skills (${n} to install)`,value:"install-all",description:u("One-click install of all Octocode skills")}),o.push({name:`${c("cyan","List")} Browse Skills Individually`,value:"browse",description:u("View details and install one by one")})):o.push({name:`${c("green","\u2705")} All skills installed \u2014 Browse to reinstall or view details`,value:"browse",description:u("View details and reinstall individually")}),o.push(new z),o.push({name:`${c("dim","- Back")}`,value:"back"}),await j({message:"",choices:o,loop:!1,theme:{prefix:" ",style:{highlight:t=>c("magenta",t)}}})}async function XC(e){let n=Ee(),o=e.filter(a=>!Qn(a.name));if(o.length===0){console.log(),console.log(` ${c("green","\u2705")} All skills are already installed!`),console.log(),await st();return}console.log(),console.log(` ${f("Installing")} ${o.length} ${f("skills...")}`),console.log();let r=new U(`Installing ${o.length} skills...`).start(),t=0,i=0,s=[];for(let a of o){r.update(`Installing ${a.displayName}... (${t+i+1}/${o.length})`);let l=await Kp(a,n);l.success?t++:(i++,s.push({skill:a.displayName,error:l.error||"Unknown error"}))}if(i===0?r.succeed(`All ${t} skills installed successfully!`):r.warn(`Installed ${t} skills, ${i} failed`),console.log(),t>0&&(console.log(` ${c("green","\u2705")} Successfully installed ${t} skill(s)`),console.log(` ${u("Location:")} ${c("cyan",n)}`)),s.length>0){console.log(),console.log(` ${c("red","X")} Failed to install:`);for(let{skill:a,error:l}of s)console.log(` ${c("red","\u2022")} ${a}: ${u(l)}`)}console.log(),console.log(` ${f("Skills are now available in your AI client!")}`),console.log(),await st()}async function Ky(){console.log(),console.log(` ${c("yellow","WARN")} ${u("Community list \u2022 Skills install on your behalf")}`);let e=new U("Fetching marketplace info...").start(),n;try{n=await jy(),e.succeed("Loaded marketplace info")}catch{e.fail("Could not fetch stars"),n=new Map}let o=!0;for(;o;){let r=await HC(n);if(r==="back"){o=!1;continue}console.log();let t=new U(`Loading skills from ${r.name}...`).start(),i;try{i=await Hp(r),t.stop()}catch(a){t.fail("Failed to load skills"),console.log(),console.log(` ${c("red","X")} ${a instanceof Error?a.message:"Unknown error"}`),console.log(),await st();continue}if(i.length===0){console.log(),console.log(` ${c("yellow","WARN")} No skills found in this marketplace`),console.log(),await st();continue}let s=!0;for(;s;){let a=await Jy(r,i);if(a==="back"){s=!1;continue}let l=await Wy(a);l==="install"?await qy(a):l==="delete"&&await Hy(a)}}}async function Xy(){let e=tr.find(t=>t.id==="octocode-skills");if(!e){console.log(),console.log(` ${c("red","X")} Octocode Skills source not found`),console.log(),await st();return}console.log();let n=new U("Loading Octocode Skills...").start(),o;try{o=await Hp(e),n.stop()}catch(t){n.fail("Failed to load skills"),console.log(),console.log(` ${c("red","X")} ${t instanceof Error?t.message:"Unknown error"}`),console.log(),await st();return}if(o.length===0){console.log(),console.log(` ${c("yellow","WARN")} No skills found`),console.log(),await st();return}let r=!0;for(;r;){let t=o.filter(s=>!Qn(s.name)).length;switch(await KC(o.length,t)){case"install-all":await XC(o),r=!1;break;case"browse":{let s=!0;for(;s;){let a=await Jy(e,o);if(a==="back"){s=!1;continue}let l=await Wy(a);l==="install"?await qy(a):l==="delete"&&await Hy(a)}break}default:r=!1;break}}}var YC=new Set(["octocode-research","octocode-pull-request-reviewer","octocode-researcher"]);async function or(){console.log(),await de({message:u("Press Enter to continue..."),default:""})}function Qy(){let e=Ee(),n=tn();if(!F(e))return[];let o=Ue(e).filter(t=>!t.startsWith(".")),r=[];for(let t of o){let i=eo.join(e,t),s=eo.join(i,"SKILL.md"),a=t.startsWith("octocode-")&&F(n)&&F(eo.join(n,t)),l=YC.has(t);if(fe(s)){let d=nt(s);if(d){let p=it(d);if(p?.name&&p.description){r.push({name:p.name,description:p.description,folder:t,path:i,isBundled:a,isRecommended:l});continue}}}r.push({name:e_(t),description:"No description available",folder:t,path:i,isBundled:a,isRecommended:l})}return r.sort((t,i)=>t.isRecommended!==i.isRecommended?t.isRecommended?-1:1:t.name.localeCompare(i.name)),r}function Yy(){let e=tn(),n=Ee();if(!F(e))return{srcDir:e,destDir:n,skillsStatus:[],notInstalled:[],sourceExists:!1};let r=Ue(e).filter(i=>!i.startsWith(".")).map(i=>({name:i,installed:F(eo.join(n,i)),srcPath:eo.join(e,i),destPath:eo.join(n,i)})),t=r.filter(i=>!i.installed);return{srcDir:e,destDir:n,skillsStatus:r,notInstalled:t,sourceExists:!0}}async function QC(e){let n=[];return e>0&&n.push({name:`- Manage installed skills ${u(`(${e})`)}`,value:"manage",description:"View, remove, or inspect individual skills"}),n.push({name:"- Browse Marketplace",value:"marketplace",description:"Community skills \u2022 installs on your behalf"}),n.push(new z),n.push({name:`${c("dim","- Back to main menu")}`,value:"back"}),await j({message:"",choices:n,pageSize:10,loop:!1,theme:{prefix:" ",style:{highlight:r=>c("magenta",r)}}})}function e_(e){let n=["PR","API","UI","CLI","MCP","AI"];return e.replace(/^octocode-/,"").split("-").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ").replace(new RegExp(`\\b(${n.join("|")})\\b`,"gi"),r=>r.toUpperCase())}async function t_(e){console.log(),console.log(` ${f("Installed Skills")} ${u(`(${e.length} total)`)}`),console.log(` ${u("Select a skill to manage")}`),console.log();let n=[];for(let r of e){let t=r.isRecommended?c("yellow","\u2605 "):"",i=r.isBundled?c("cyan"," [bundled]"):c("magenta"," [community]"),s=r.description.slice(0,40),a=r.description.length>40?"...":"";n.push({name:`${t}${r.name}${i} - ${u(s)}${u(a)}`,value:r})}return n.push(new z),n.push({name:`${c("dim","- Back to skills menu")}`,value:"back"}),await j({message:"",choices:n,pageSize:15,loop:!1,theme:{prefix:" ",style:{highlight:r=>c("magenta",r)}}})}async function n_(e){let n=e.isRecommended?c("yellow","recommended "):"",o=e.isBundled?c("cyan","[bundled]"):c("magenta","[community]");console.log(),console.log(` ${f(e.name)} ${n}${o}`),console.log(` ${u(e.description)}`),console.log(` ${u(e.path)}`),console.log();let r=[{name:`${c("red","Delete")} Remove this skill`,value:"remove"},{name:"- Open skill location",value:"view"},new z,{name:`${c("dim","- Back")}`,value:"back"}];return await j({message:"",choices:r,loop:!1,theme:{prefix:" ",style:{highlight:i=>c("magenta",i)}}})}async function o_(e){console.log(),console.log(` ${c("cyan","Path")} Opening ${f(e.name)} location...`),console.log(` ${u(e.path)}`),console.log();try{await Yn(e.path),console.log(` ${c("green","\u2705")} Opened in file explorer`)}catch{console.log(` ${c("yellow","!")} Could not open location automatically`),console.log(` ${u("Path:")} ${c("cyan",e.path)}`)}console.log()}async function r_(e){console.log(),console.log(` ${c("yellow","WARN")} You are about to remove:`),console.log(` ${f(e.name)}`),console.log(` ${u(e.path)}`),console.log();let n=[{name:`${c("red","Delete")} Yes, remove this skill`,value:!0},new z,{name:`${c("dim","- Cancel")}`,value:!1}];if(!await j({message:"Confirm removal?",choices:n,loop:!1,theme:{prefix:" ",style:{highlight:t=>c("magenta",t),message:t=>f(t)}}}))return!1;console.log();let r=new U(`Removing ${e.name}...`).start();return Gn(e.path)?(r.succeed(`Removed ${e.name}`),console.log(),console.log(` ${c("green","\u2705")} Skill removed successfully`),!0):(r.fail(`Failed to remove ${e.name}`),console.log(),console.log(` ${c("red","X")} Could not remove skill directory`),!1)}async function i_(){let e=!0;for(;e;){let n=Qy();if(n.length===0){console.log(),console.log(` ${c("yellow","INFO")} No skills installed`),console.log(` ${u("Browse the marketplace to install skills")}`),console.log(),await or();return}let o=await t_(n);if(o==="back"){e=!1;continue}let r=!0;for(;r;)switch(await n_(o)){case"remove":{await r_(o)&&(await or(),r=!1);break}case"view":await o_(o),await or();break;default:r=!1;break}}}async function e$(){await se();let e=Yy();if(!e.sourceExists){console.log(` ${c("yellow","WARN")} Skills source directory not found.`),console.log(` ${u("This may happen if running from source.")}`),console.log(),await or();return}if(e.skillsStatus.length===0){console.log(` ${u("No skills available.")}`),console.log(),await or();return}let n=!0;for(;n;){e=Yy();let r=Qy().length;switch(await QC(r)){case"manage":await i_();break;case"marketplace":await Ky();break;default:n=!1;break}}}async function n$(e,n){let o=s_(e,n.auth);if(o)return o;let{data:r}=await Bh({clientType:e.clientType,clientId:e.clientId,request:n.request||e.request,scopes:n.auth.scopes||e.scopes});await e.onVerification(r);let t=await Xp(n.request||e.request,e.clientId,e.clientType,r);return e.authentication=t,t}function s_(e,n){if(n.refresh===!0||!e.authentication)return!1;if(e.clientType==="github-app")return e.authentication;let o=e.authentication,r=("scopes"in n&&n.scopes||e.scopes).join(" "),t=o.scopes.join(" ");return r===t?o:!1}async function t$(e){await new Promise(n=>setTimeout(n,e*1e3))}async function Xp(e,n,o,r){try{let t={clientId:n,request:e,code:r.device_code},{authentication:i}=o==="oauth-app"?await Qd({...t,clientType:"oauth-app"}):await Qd({...t,clientType:"github-app"});return{type:"token",tokenType:"oauth",...i}}catch(t){if(!t.response)throw t;let i=t.response.data.error;if(i==="authorization_pending")return await t$(r.interval),Xp(e,n,o,r);if(i==="slow_down")return await t$(r.interval+7),Xp(e,n,o,r);throw t}}async function a_(e,n){return n$(e,{auth:n})}async function c_(e,n,o,r){let t=n.endpoint.merge(o,r);if(/\/login\/(oauth\/access_token|device\/code)$/.test(t.url))return n(t);let{token:i}=await n$(e,{request:n,auth:{type:"oauth"}});return t.headers.authorization=`token ${i}`,n(t)}var l_="0.0.0-development";function o$(e){let n=e.request||ke.defaults({headers:{"user-agent":`octokit-auth-oauth-device.js/${l_} ${Un()}`}}),{request:o=n,...r}=e,t=e.clientType==="github-app"?{...r,clientType:"github-app",request:o}:{...r,clientType:"oauth-app",request:o,scopes:e.scopes||[]};if(!e.clientId)throw new Error('[@octokit/auth-oauth-device] "clientId" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)');if(!e.onVerification)throw new Error('[@octokit/auth-oauth-device] "onVerification" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)');return Object.assign(a_.bind(null,t),{hook:c_.bind(null,t)})}function u_(){return vv("gh")}function sn(){if(!u_())return{installed:!1,authenticated:!1,error:"GitHub CLI (gh) is not installed"};let e=Wn("gh",["auth","status"]);if(e.success){let n=e.stdout.match(/Logged in to \S+.*account\s+(\S+)/i);return{installed:!0,authenticated:!0,username:n?n[1]:void 0}}return{installed:!0,authenticated:!1,error:e.stderr||"Not authenticated"}}function r$(e){let n=["auth","logout"];return e&&n.push("--hostname",e),yv("gh",n)}var Ds="178c6fc778ccc68e1d6a",d_=["repo","read:org","gist"],yt="github.com";function Yp(e){return e==="github.com"||e===yt?"https://api.github.com":`https://${e}/api/v3`}async function p_(e,n){let o=Yp(n);return(await ke("GET /user",{headers:{authorization:`token ${e}`},baseUrl:o})).data.login}async function js(e={}){let{hostname:n=yt,scopes:o=d_,gitProtocol:r="https",clientId:t=Ds,onVerification:i,openBrowser:s=!0}=e;try{let l=await o$({clientType:"oauth-app",clientId:t,scopes:o,onVerification:async g=>{if(i&&i(g),s)try{await Yn(g.verification_uri)}catch{console.log(),console.log(" \u26A0 Could not open browser automatically."),console.log(" \u2192 Please open this URL manually:"),console.log(` ${g.verification_uri}`),console.log()}},request:ke.defaults({baseUrl:Yp(n)})})({type:"oauth"}),d=await p_(l.token,n),p={token:l.token,tokenType:"oauth",scopes:"scopes"in l?l.scopes:void 0};"refreshToken"in l&&l.refreshToken&&(p.refreshToken=l.refreshToken,p.expiresAt="expiresAt"in l?l.expiresAt:void 0,p.refreshTokenExpiresAt="refreshTokenExpiresAt"in l?l.refreshTokenExpiresAt:void 0);let m={hostname:n,username:d,token:p,gitProtocol:r,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};return await cs(m),{success:!0,username:d,hostname:n}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Authentication failed"}}}async function an(e=yt,n){let o=await gt(e);if(!o)return{success:!1,error:`Not logged in to ${e}`};if(n?.clientSecret)try{await Gh({clientType:"oauth-app",clientId:Ds,clientSecret:n.clientSecret,token:o.token.token,request:ke.defaults({baseUrl:Yp(e)})})}catch(r){console.error(`[github-oauth] Token revocation failed: ${r instanceof Error?r.message:String(r)}`)}return await sp(e),{success:!0}}async function i$(e=yt){return cp(e,Ds)}function jt(e=yt){if(Bn()){let r=as();return{authenticated:!0,hostname:e,username:void 0,tokenSource:"env",envTokenSource:r??void 0}}let n=ip(e);if(n){let r=Zn(n);return{authenticated:!r,hostname:n.hostname,username:n.username,tokenExpired:r,tokenSource:"octocode"}}let o=sn();return o.authenticated?{authenticated:!0,hostname:e,username:o.username,tokenSource:"gh-cli"}:{authenticated:!1,tokenSource:"none"}}async function rr(e=yt){if(Bn()){let r=as();return{authenticated:!0,hostname:e,username:void 0,tokenSource:"env",envTokenSource:r??void 0}}let n=await gt(e);if(n){let r=Zn(n);return{authenticated:!r,hostname:n.hostname,username:n.username,tokenExpired:r,tokenSource:"octocode"}}let o=sn();return o.authenticated?{authenticated:!0,hostname:e,username:o.username,tokenSource:"gh-cli"}:{authenticated:!1,tokenSource:"none"}}async function m_(e=yt){let n=await ls(e,Ds);return n.token?{token:n.token,source:"octocode",username:n.username}:{token:null,source:"none"}}async function g_(e=yt){let n=await Vn(e);if(n){let o=sn();return{token:n,source:"gh-cli",username:o.username}}return{token:null,source:"none"}}async function s$(e=yt,n="auto"){if(n==="octocode")return m_(e);if(n==="gh")return g_(e);let o=await rp({hostname:e});if(o?.token){let r=o.source==="gh-cli"?"gh-cli":o.source?.startsWith("env:")?"env":"octocode";return{token:o.token,source:r,username:o.username,envSource:o.source?.startsWith("env:")?o.source:void 0}}return{token:null,source:"none"}}function to(){return ap()}function Qp(e,n){switch(e){case"env":return n??"env:GITHUB_TOKEN";case"gh-cli":return"gh-cli";case"octocode":return"octocode-storage";default:return"none"}}import em from"node:path";function f_(){let e=ms(),n=e.filter(r=>r.octocodeInstalled),o=e.filter(r=>r.configExists&&!r.octocodeInstalled);return{installedClients:n,availableClients:o,installedCount:n.length,availableCount:o.length,isInstalled:n.length>0,hasMoreToInstall:o.length>0}}function h_(){let e=tn(),n=Ee(),o=F(n)?Ue(n).filter(a=>!a.startsWith(".")).length:0;if(!F(e))return{sourceExists:!1,destDir:n,skills:[],installedCount:0,notInstalledCount:0,totalInstalledCount:o,allInstalled:!1,hasSkills:!1};let t=Ue(e).filter(a=>!a.startsWith(".")).map(a=>({name:a,installed:F(em.join(n,a)),srcPath:em.join(e,a),destPath:em.join(n,a)})),i=t.filter(a=>a.installed).length,s=t.filter(a=>!a.installed).length;return{sourceExists:!0,destDir:n,skills:t,installedCount:i,notInstalledCount:s,totalInstalledCount:o,allInstalled:s===0&&t.length>0,hasSkills:t.length>0}}async function ir(){return{octocode:f_(),skills:h_(),currentClient:Jn(),githubAuth:await rr()}}function v_(e){let n=e.trim();if(n.length===0)return{kind:"empty"};if(["exit","quit","back"].includes(n))return{kind:"exit"};if(n==="list"||n==="help")return{kind:"list"};let o=n.search(/\s/);return o===-1?{kind:"execute",toolName:n}:{kind:"execute",toolName:n.slice(0,o),inputText:n.slice(o).trim()}}function y_(e,n){return{command:"tool",args:n?[e,n]:[e],options:{}}}async function a$(){for(await se(),console.log(),console.log(` ${c("magenta",f("Tool Terminal"))}`),console.log(` ${u("Type")} ${c("cyan","list")} ${u("for tools,")} ${c("cyan",'<toolName> {"path":".","pattern":"runCLI"}')} ${u("to run, or")} ${c("cyan","exit")} ${u("to return.")}`),await Vs();;){let e=await de({message:c("cyan","tool>"),default:""}),n=v_(e);if(n.kind!=="empty"){if(n.kind==="exit"){console.log();return}if(n.kind==="list"){await Vs();continue}await bm(y_(n.toolName,n.inputText)),console.log()}}}async function Ns(){console.log(),await de({message:u("Press Enter to continue..."),default:""})}function $_(e){return e.map(n=>J[n.client]?.name||n.client).join(", ")}function b_(e){if(e.length===0){console.log(` ${u("No IDEs configured yet")}`);return}console.log(` ${u("Installed on:")}`);for(let n of e){let o=J[n.client]?.name||n.client;console.log(` ${u("\u2022")} ${u(o)} ${u("->")} ${c("cyan",n.configPath)}`)}}function k_(e){return!e.sourceExists||!e.hasSkills?{name:`${u("- Manage System Skills")}`,value:"skills",description:u("Not available \u2014 no skill sources found")}:e.allInstalled?{name:`- Manage System Skills ${c("green","\u2705")}`,value:"skills",description:`${e.totalInstalledCount} installed \u2022 Research, PR Review & more`}:e.totalInstalledCount>0?{name:"- Manage System Skills",value:"skills",description:`${e.totalInstalledCount}/${e.skills.length} installed \u2022 Get more skills!`}:{name:`- ${f("Manage System Skills")} ${c("cyan","[NEW]")}`,value:"skills",description:"Install skills for AI-powered coding workflows"}}function S_(e){let n=e.skills.filter(o=>o.name.startsWith("octocode-")&&o.installed).length;return n>0?{name:`- Octocode Skills ${c("green","\u2705")}`,value:"octocode-skills",description:`${n} installed \u2022 Research, planning & review`}:{name:"- Octocode Skills",value:"octocode-skills",description:"Install AI-powered research, planning & review skills"}}function x_(e){switch(e.tokenSource){case"gh-cli":return"gh CLI";case"env":return e.envTokenSource?`env (${e.envTokenSource.replace("env:","")})`:"env var";case"octocode":return"Octocode";default:return"unknown"}}function w_(e){if(e.authenticated){let n=x_(e),o=e.username?`@${e.username}`:"",r=o?`${o} `:"";return{name:`- Manage Auth ${c("green","\u2705")}`,value:"auth",description:`${r}via ${n}`}}return{name:`- ${f("Manage Auth")} ${c("red","[Required]")}`,value:"auth",description:"Sign in to access GitHub"}}function C_(e){let n=[];if(e.octocode.isInstalled){let o=e.octocode.installedCount===1?"client":"clients";n.push(`${c("green","\u25CF")} ${e.octocode.installedCount} ${o}`)}else n.push(`${c("yellow","\u25CB")} Not installed`);return e.skills.totalInstalledCount>0?n.push(`${c("green","\u25CF")} ${e.skills.totalInstalledCount} skills`):e.skills.sourceExists&&e.skills.hasSkills&&n.push(`${c("yellow","\u25CB")} ${e.skills.skills.length} skills`),n.join(u(" \u2502 "))}function __(e){if(e.octocode.isInstalled){let n=e.octocode.installedCount===1?"IDE":"IDEs";return e.githubAuth.authenticated?{name:`- Octocode MCP ${c("green","\u2705")}`,value:"octocode",description:`Configure Octocode MCP - ${e.octocode.installedCount} ${n} configured`}:{name:`- Octocode MCP ${c("red","[X]")}`,value:"octocode",description:`Configure Octocode MCP - ${e.octocode.installedCount} ${n} configured`}}return{name:`- ${f("Octocode Configuration")}`,value:"octocode",description:"Configure Octocode MCP - 0 IDEs configured"}}function P_(e){e.githubAuth.authenticated?e.octocode.isInstalled&&e.skills.totalInstalledCount===0&&(console.log(),console.log(` ${c("cyan","Tip:")} ${u("Boost your AI coding:")} Install ${c("magenta","Skills")} for research, PR review & more!`)):(console.log(),console.log(` ${c("yellow","Warning:")} ${f("Auth required!")} Run ${c("cyan","Manage Auth")} to access GitHub repos`))}async function I_(e){console.log(),console.log(` ${u("Status:")} ${C_(e)}`),P_(e);let n=[];return n.push(__(e)),n.push(S_(e.skills)),n.push(k_(e.skills)),n.push(w_(e.githubAuth)),n.push({name:"- Manage System MCP",value:"mcp-config",description:"Add, sync and configure MCP across all IDEs"}),n.push({name:"- Tool Terminal",value:"terminal",description:"Run Octocode tools directly from an interactive terminal"}),n.push(new z),n.push({name:u("Exit"),value:"exit"}),console.log(),await Lt({message:"What would you like to do?",choices:n,pageSize:12,loop:!1,theme:{prefix:" ",style:{highlight:r=>c("magenta",r),message:r=>f(r)}}})}async function T_(e){let n=[];if(e.octocode.isInstalled){if(e.octocode.hasMoreToInstall){let r=$_(e.octocode.availableClients);n.push({name:"- Add Octocode",value:"install",description:r})}}else n.push({name:`- ${f("Install")} ${c("red","[X]")}`,value:"install",description:"Setup for Cursor, Claude, Windsurf..."});return e.octocode.isInstalled&&n.push({name:"- Configure Octocode",value:"configure",description:"Server options & preferences"}),n.push(new z),n.push({name:`${c("dim","- Back to main menu")}`,value:"back"}),await Lt({message:"",choices:n,pageSize:12,loop:!1,theme:{prefix:" ",style:{highlight:r=>c("magenta",r)}}})}async function E_(){await se();let e=await ir();console.log(),b_(e.octocode.installedClients);let n=!0,o=!0;for(;n;){if(o)o=!1;else{let t=new U(" Refreshing...").start();e=await ir(),t.clear()}switch(await T_(e)){case"install":await yp(),console.log();break;case"configure":await zv(),console.log();break;default:n=!1;break}}}async function O_(){let e=[];return e.push({name:"- Show MCP details",value:"inspect",description:"View and manage configured MCP servers"}),e.push({name:"- Sync Configurations",value:"sync",description:"Sync MCP configs across all IDEs"}),e.push({name:"- MCP Marketplace",value:"marketplace",description:"Browse and install community MCP servers"}),e.push(new z),e.push({name:`${c("dim","- Back to main menu")}`,value:"back"}),await Lt({message:"",choices:e,pageSize:12,loop:!1,theme:{prefix:" ",style:{highlight:o=>c("magenta",o)}}})}async function A_(){await se(),console.log();let e=!0;for(;e;)switch(await O_()){case"inspect":await bp();break;case"sync":await Pp(),console.log();break;case"marketplace":await xp(),console.log();break;default:e=!1;break}}async function z_(e){let n=[],o=e.tokenSource==="env",r=await Vn(),t=sn(),i=await gt(),s=!!r,a=!!i,l=Bn();if(o&&l){let p=e.envTokenSource?.replace("env:","")||"environment variable";n.push(new z(` ${c("green","\u2705")} Using ${c("cyan",p)} ${u("(takes priority)")}`)),n.push(new z)}if(s){let p=t.username?` (@${t.username})`:"";n.push({name:`- Delete gh CLI token${p}`,value:"gh-logout",description:"Opens gh auth logout"})}if(a){let p=i.username?` (@${i.username})`:"";n.push({name:`- Delete Octocode token${p}`,value:"logout",description:"Remove from file"})}return a||n.push({name:`- Sign In via Octocode ${c("green","(Recommended)")}`,value:"login",description:"Quick browser sign in"}),s||n.push({name:"- Sign In via gh CLI",value:"gh-guidance",description:t.installed?"Use existing GitHub CLI":"GitHub CLI not installed"}),n.push(new z),n.push({name:`${c("dim","- Back")}`,value:"back"}),await Lt({message:"",choices:n,pageSize:12,loop:!1,theme:{prefix:" ",style:{highlight:p=>c("magenta",p)}}})}async function M_(){console.log(),console.log(c("blue","\u2501".repeat(66))),console.log(` ${f("GitHub Authentication")}`),console.log(c("blue","\u2501".repeat(66))),console.log(),console.log(` ${u("This will open your browser to authenticate with GitHub.")}`),console.log();let e=!1,n=null,o=new U("Connecting to GitHub...").start(),r=await js({onVerification:t=>{o.stop(),e=!0,console.log(),console.log(c("yellow"," \u250C"+"\u2500".repeat(50)+"\u2510")),console.log(c("yellow"," \u2502 ")+`${c("yellow","!")} Your one-time code: ${f(c("cyan",t.user_code))}`+" ".repeat(24-t.user_code.length)+c("yellow","\u2502")),console.log(c("yellow"," \u2514"+"\u2500".repeat(50)+"\u2518")),console.log(),console.log(` ${f("1.")} Copy the code above`),console.log(` ${f("2.")} ${f("Press Enter")} to open ${c("cyan",t.verification_uri)}`),console.log(` ${f("3.")} Paste the code in your browser`),console.log(),n=new U(`Waiting for browser authentication... ${u("(typically 10-30 seconds)")}`).start()}});return n&&n.stop(),e||o.stop(),console.log(),r.success?(console.log(c("green"," \u250C"+"\u2500".repeat(50)+"\u2510")),console.log(c("green"," \u2502 ")+`${c("green","\u2705")} ${f("Authentication successful!")}`+" ".repeat(22)+c("green","\u2502")),console.log(c("green"," \u2514"+"\u2500".repeat(50)+"\u2518")),console.log(),console.log(` ${c("green","\u2705")} Logged in as ${c("cyan","@"+(r.username||"unknown"))}`),console.log(` ${u("Credentials stored in:")} ${to()}`),console.log(),console.log(` ${c("cyan","Tip:")} ${f("What's next?")}`),console.log(` ${u("\u2022")} Install ${c("magenta","Skills")} for AI-powered research & PR reviews`),console.log(` ${u("\u2022")} Use ${c("cyan","/research")} prompt to explore any GitHub repo`),console.log(` ${u("\u2022")} Add ${c("cyan","AGENTS.md")} to your project for better AI context`)):(console.log(c("red"," \u250C"+"\u2500".repeat(50)+"\u2510")),console.log(c("red"," \u2502 ")+`${c("red","X")} ${f("Authentication failed")}`+" ".repeat(27)+c("red","\u2502")),console.log(c("red"," \u2514"+"\u2500".repeat(50)+"\u2518")),console.log(),console.log(` ${c("red","Error:")} ${r.error||"Unknown error"}`),console.log(),console.log(` ${f("Troubleshooting:")}`),console.log(` ${u("\u2022")} Make sure you copied the code correctly`),console.log(` ${u("\u2022")} Check your browser didn't block the popup`),console.log(` ${u("\u2022")} Try running ${c("cyan","octocode login")} again`)),console.log(),await Ns(),r.success}async function D_(){let e=await rr();console.log(),console.log(` ${f("Sign Out")}`),console.log(` ${u("Signed in as:")} ${c("cyan","@"+(e.username||"unknown"))}`),console.log();let n=await an();if(n.success){console.log(` ${c("green","\u2705")} Signed out successfully`);let o=sn();o.authenticated&&console.log(` ${u("Tip:")} You can still use gh CLI (@${o.username||"unknown"})`)}else console.log(` ${c("red","X")} Sign out failed: ${n.error||"Unknown error"}`);return console.log(),await Ns(),n.success}async function j_(){let e="https://cli.github.com/";console.log(),console.log(` ${f("Setup Instructions:")}`),console.log(),console.log(" 1. Install GitHub CLI from:"),console.log(` ${c("cyan",e)}`),console.log(),console.log(" 2. Run the following command to authenticate:"),console.log(` ${c("cyan","gh auth login")}`),console.log(),console.log(` ${u("Once authenticated, octocode will automatically")}`),console.log(` ${u("use your gh CLI token.")}`),console.log();let n=await Lt({message:"",choices:[{name:"- Open GitHub CLI website",value:"open-site"},new z,{name:`${c("dim","- Back")}`,value:"back"}],pageSize:10,loop:!1,theme:{prefix:" ",style:{highlight:o=>c("cyan",o),message:o=>o}}});if(n!=="back"&&n==="open-site"){try{await Yn(e),console.log(),console.log(` ${c("green","\u2705")} Opened ${c("cyan",e)} in browser`)}catch{console.log(),console.log(` ${c("yellow","!")} Could not open browser automatically`),console.log(` ${u("Please visit:")} ${c("cyan",e)}`)}console.log(),await Ns()}}function N_(e){switch(e.tokenSource){case"gh-cli":return"gh CLI";case"env":return e.envTokenSource?`${e.envTokenSource.replace("env:","")} env var`:"environment variable";case"octocode":return"file";default:return"unknown"}}function L_(e){if(console.log(` ${f("GitHub Authentication")}`),console.log(),e.authenticated){let n=N_(e);if(e.tokenSource==="env"){let o=e.envTokenSource?e.envTokenSource.replace("env:",""):"environment variable";console.log(` ${c("green","\u2705")} Using ${c("cyan",o)} ${u("(token configured)")}`)}else console.log(` ${c("green","\u2705")} Signed in as ${c("cyan","@"+(e.username||"unknown"))} ${u(`via ${n}`)}`);e.tokenExpired&&console.log(` ${c("yellow","Warning:")} Session expired - please sign in again`),console.log(),console.log(` ${c("green","\u2705")} ${u("Ready to access GitHub repositories!")}`)}else console.log(c("yellow"," \u250C"+"\u2500".repeat(56)+"\u2510")),console.log(c("yellow"," \u2502 ")+`${c("yellow","Warning:")} ${f("Authentication Required")}`+" ".repeat(31)+c("yellow","\u2502")),console.log(c("yellow"," \u2514"+"\u2500".repeat(56)+"\u2518")),console.log(),console.log(` ${u("Without auth, Octocode cannot:")}`),console.log(` ${c("red","X")} Access private repositories`),console.log(` ${c("red","X")} Search code in your organization`),console.log(` ${c("red","X")} Provide full GitHub research capabilities`),console.log(),console.log(` ${c("cyan","->")} Select ${c("green",'"Sign In via Octocode"')} below to authenticate`);console.log()}async function U_(){await se(),console.log();let e=!0;for(;e;){let n=await rr();switch(L_(n),await z_(n)){case"login":{let r=await M_();console.log(),r&&(e=!1);break}case"gh-guidance":await j_();break;case"logout":await D_(),console.log();break;case"gh-logout":{if(await Lt({message:"Sign out of gh CLI?",choices:[{name:"Yes, sign out",value:"yes"},{name:"No, cancel",value:"no"}],theme:{prefix:" ",style:{highlight:i=>c("red",i)}}})!=="yes")break;console.log(),console.log(` ${u("Opening gh auth logout...")}`),console.log(),r$().success?(console.log(),console.log(` ${c("green","\u2705")} Signed out of gh CLI`)):(console.log(),console.log(` ${c("yellow","!")} Sign out was cancelled`)),console.log(),await Ns();break}default:e=!1;break}}}async function R_(e){switch(e){case"octocode":return await E_(),!0;case"octocode-skills":return await Xy(),!0;case"skills":return await e$(),!0;case"auth":return await U_(),!0;case"mcp-config":return await A_(),!0;case"terminal":return await a$(),!0;case"exit":return ys(),!1;default:return!0}}function F_(){console.log(` ${f("Environment")}`)}async function Z_(){F_();let e=await Ho();Ko(e)&&(console.log(),console.log(` ${u("Tip:")} ${u("Run")} ${c("cyan","npx node-doctor")} ${u("for diagnostics")}`))}async function c$(){let e=!0,n=!0;for(;n;){let o;if(e)o=await ir();else{let t=new U(" Loading...").start();o=await ir(),t.clear()}e||(us(),vs(),await Z_()),e=!1;let r=await I_(o);n=await R_(r)}}function B_(){console.log(c("blue","\u2501".repeat(66))),console.log(` \u{1F50D} ${f("Environment")}`),console.log(c("blue","\u2501".repeat(66)))}async function l$(){let e=new U(" Starting...").start();await se(),e.clear(),us(),vs(),B_();let n=await Ho();if(Ko(n)&&(console.log(),console.log(` ${u("\u{1F4A1}")} ${u("Run")} ${c("cyan","npx node-doctor")} ${u("for diagnostics")}`)),!n.nodeInstalled){console.log(),console.log(` ${c("red","\u2717")} ${f("Node.js is required to run octocode-mcp")}`),$p(),ys();return}await c$()}var V_={claude:"claude-desktop","claude-desktop":"claude-desktop",claudedesktop:"claude-desktop","claude-code":"claude-code",claudecode:"claude-code",cursor:"cursor",windsurf:"windsurf",trae:"trae",antigravity:"antigravity",zed:"zed","vscode-cline":"vscode-cline",cline:"vscode-cline","vscode-roo":"vscode-roo",roo:"vscode-roo","roo-cline":"vscode-roo","vscode-continue":"vscode-continue",continue:"vscode-continue",opencode:"opencode",codex:"codex",gemini:"gemini-cli","gemini-cli":"gemini-cli",geminicli:"gemini-cli",goose:"goose",kiro:"kiro",custom:"custom"};function Ls(e){return V_[e.trim().toLowerCase()]??null}function Us(e){return[...e?.includeInstallAlias?["claude"]:[],...ot].join(", ")}function sr(e){return e in Wo?Wo[e].name:e in gp?gp[e].name:e.charAt(0).toUpperCase()+e.slice(1)}function tm(e){return e.length<=8?"****":e.slice(0,4)+"****"+e.slice(-4)}function u$(e){return process.stdout.isTTY?tm(e):e}function ar(){console.log(` ${u("To login:")}`),console.log(` ${c("cyan","\u2192")} ${c("yellow","octocode login")}`),console.log(` ${u("or")}`),console.log(` ${c("cyan","\u2192")} ${c("yellow","gh auth login")}`)}function cr(e){let n=jt(e);return{authenticated:n.authenticated,username:n.username||null,hostname:n.hostname,tokenSource:n.tokenSource||null,tokenExpired:!!n.tokenExpired}}function no(e="github.com"){console.log(),console.log(` ${f("\u{1F510} GitHub Authentication")}`),console.log();let n=jt(e);n.authenticated?(console.log(` ${c("green","\u2713")} Authenticated as ${c("cyan",n.username||"unknown")}`),console.log(` ${u("Logged in:")} yes`),n.tokenExpired&&console.log(` ${c("yellow","\u26A0")} Token has expired - please login again`),console.log(` ${u("Host:")} ${n.hostname}`),console.log(` ${u("Source:")} ${om(n.tokenSource||"none",n.envTokenSource)}`)):(console.log(` ${c("yellow","\u26A0")} ${c("yellow","Not authenticated")} ${u("(Not logged in)")}`),console.log(),console.log(` ${f("To authenticate:")}`),ar()),console.log(),console.log(` ${u("Credentials stored in:")} ${to()}`),console.log()}function nm(){console.log(` ${u("For deeper diagnostics:")} ${c("cyan","npx node-doctor")}`),console.log()}function om(e,n){switch(e){case"octocode":return c("cyan","octocode");case"gh-cli":return c("magenta","gh cli");case"env":if(n){let o=n.replace("env:","");return c("green",o)}return c("green","environment variable");default:return u("none")}}function d$(e){if(!e||e.trim().length===0)return{values:{}};let n=e.split(",").map(t=>t.trim()).filter(Boolean),o={},r=/^[A-Za-z_][A-Za-z0-9_]*$/;for(let t of n){let i=t.indexOf("=");if(i<=0)return{values:{},error:`Invalid --env pair: "${t}" (expected KEY=VALUE)`};let s=t.slice(0,i).trim(),a=t.slice(i+1);if(!r.test(s))return{values:{},error:`Invalid env var name: "${s}"`};o[s]=a}return{values:o}}import{existsSync as rm,copyFileSync as G_,accessSync as p$,constants as m$}from"node:fs";import{mkdirSync as J_}from"node:fs";import im from"node:path";var W_=ot,lr=Us({includeInstallAlias:!0}),sm={name:"install",aliases:["i","setup"],description:"Install octocode-mcp for an IDE",usage:"octocode install --ide <ide> [--method npx] [--force] [--json]",options:[{name:"ide",description:`IDE to configure: ${lr}`,hasValue:!0},{name:"method",short:"m",description:"Installation method (npx)",hasValue:!0,default:"npx"},{name:"force",short:"f",description:"Overwrite existing configuration"},{name:"check",description:"Pre-flight only: verify config path is writable and show what would be written"},{name:"rollback",description:"Restore the most recent backup (--backup-path <path> or auto-detected)"},{name:"backup-path",description:"Path to the backup file to restore (used with --rollback)",hasValue:!0},{name:"json",short:"j",description:"Output result as JSON: { success, ide, configPath, method, error }"}],handler:async e=>{let n=e.options.ide,o=e.options.method??e.options.m,r=typeof o=="string"?o:"npx",t=!!(e.options.force||e.options.f),i=!!e.options.check,s=!!e.options.rollback,a=e.options["backup-path"],l=!!(e.options.json||e.options.j);if(typeof n!="string"||n.trim().length===0){if(!process.stdout.isTTY||l){l?console.log(JSON.stringify({success:!1,ide:null,configPath:null,method:r,error:`Missing required option: --ide. Supported: ${lr}`})):(console.log(),console.log(" Missing required option: --ide"),console.log(` Supported: ${lr}`),console.log(" Example: octocode install --ide cursor"),console.log()),process.exitCode=1;return}await l$();return}let d=Ls(n);if(s){let M=d,_=te(M),N=typeof a=="string"&&a.length>0?a:`${_}.bak`;if(!rm(N)){l?console.log(JSON.stringify({success:!1,ide:n,configPath:_,backupPath:N,error:`Backup not found: ${N}`})):(console.log(),console.log(` ${c("red","\u2717")} Backup not found: ${N}`),console.log(` ${u("Provide the path via --backup-path <path>")}`),console.log()),process.exitCode=1;return}try{J_(im.dirname(_),{recursive:!0,mode:448}),G_(N,_)}catch(D){let E=D instanceof Error?D.message:String(D);l?console.log(JSON.stringify({success:!1,ide:n,configPath:_,backupPath:N,error:E})):(console.log(),console.log(` ${c("red","\u2717")} Rollback failed: ${E}`),console.log()),process.exitCode=1;return}l?console.log(JSON.stringify({success:!0,ide:n,configPath:_,backupPath:N})):(console.log(),console.log(` ${c("green","\u2713")} Rolled back ${c("cyan",n)} config from backup`),console.log(` ${u("Config:")} ${_}`),console.log(` ${u("Backup:")} ${N}`),console.log(),console.log(` ${f("Next:")} Restart ${sr(M)} to apply.`),console.log());return}if(r==="npx"){let M=fs(),_=hs();if(!M.installed){if(l){console.log(JSON.stringify({success:!1,ide:n,configPath:null,method:r,error:"Node.js is not found in PATH"})),process.exitCode=1;return}console.log(),console.log(` ${c("red","\u2717")} Node.js is ${c("red","not found in PATH")}`),console.log(` ${u("Node.js is required for npx installation method.")}`),console.log(),nm(),process.exitCode=1;return}if(!_.installed){if(l){console.log(JSON.stringify({success:!1,ide:n,configPath:null,method:r,error:"npm is not found in PATH"})),process.exitCode=1;return}console.log(),console.log(` ${c("yellow","\u26A0")} npm is ${c("yellow","not found in PATH")}`),console.log(` ${u("npm is required for npx installation method.")}`),console.log(),nm(),process.exitCode=1;return}}if(!d||d==="custom"||!W_.includes(d)){if(l){console.log(JSON.stringify({success:!1,ide:n,configPath:null,method:r,error:`Invalid IDE: ${n}. Supported: ${lr}`})),process.exitCode=1;return}console.log(),console.log(` ${c("red","\u2717")} Invalid IDE: ${n}`),console.log(` ${u("Supported:")} ${lr}`),console.log(),process.exitCode=1;return}if(r!=="npx"){if(l){console.log(JSON.stringify({success:!1,ide:n,configPath:null,method:r,error:`Invalid method: ${r}. Supported: npx`})),process.exitCode=1;return}console.log(),console.log(` ${c("red","\u2717")} Invalid method: ${r}`),console.log(` ${u("Supported:")} npx`),console.log(),process.exitCode=1;return}let p=r,m=d,g=Jo(m,p);if(i){let M=g.configPath,_=rm(M),D=!!(_?X(M):null)?.mcpServers?.["octocode-mcp"],E=im.dirname(M),A=rm(E),O=!1;if(A)try{p$(E,m$.W_OK),O=!0}catch{O=!1}else try{p$(im.dirname(E),m$.W_OK),O=!0}catch{O=!1}let Z=O&&(g.action!=="override"||t);if(l){console.log(JSON.stringify({ide:m,configPath:M,configExists:_,octocodeInstalled:D,parentDirExists:A,parentDirWritable:O,action:g.action,method:p,wouldOverwrite:g.action==="override",ready:Z}));return}console.log(),console.log(` ${f("Install pre-flight check")}`),console.log(),console.log(` ${u("IDE:")} ${sr(m)}`),console.log(` ${u("Config:")} ${M}`),console.log(` Config exists: ${_?c("green","yes"):c("yellow","no (will be created)")}`),console.log(` Parent dir writable: ${O?c("green","yes"):c("red","no \u2014 check permissions")}`),console.log(` Octocode installed: ${D?c("green","yes"):c("yellow","no")}`),console.log(` Action: ${g.action==="override"?c("yellow","overwrite"):c("green",g.action)}`),O?g.action==="override"&&!t?(console.log(),console.log(` ${c("yellow","\u26A0")} Already configured. Add --force to overwrite.`)):(console.log(),console.log(` ${c("green","\u2713")} Ready to install.`)):(console.log(),console.log(` ${c("red","\u2717")} Cannot write to ${E} \u2014 check permissions.`),process.exitCode=1),console.log();return}if(g.action==="override"&&!t){if(l){console.log(JSON.stringify({success:!1,ide:m,configPath:g.configPath,method:r,error:"Already configured. Use --force to overwrite."})),process.exitCode=1;return}console.log(),console.log(` ${c("yellow","\u26A0")} Octocode is already configured.`),console.log(` ${u("Use")} ${c("cyan","--force")} ${u("to overwrite.")}`),console.log(),process.exitCode=1;return}let v=l?null:new U("Writing configuration...").start(),$=gs({client:m,method:p,force:t});if(l){console.log(JSON.stringify({success:$.success,ide:m,configPath:$.success?g.configPath:null,method:r,backupPath:$.backupPath||null,error:$.error||null})),$.success||(process.exitCode=1);return}$.success?(v?.succeed("Installation complete!"),console.log(),console.log(` ${f("Installing octocode-mcp")}`),console.log(` ${u("IDE:")} ${sr(m)}`),console.log(` ${u("Method:")} ${fv[p].name}`),console.log(),console.log(` ${c("green","\u2713")} Config saved to: ${g.configPath}`),$.backupPath&&console.log(` ${u("Backup:")} ${$.backupPath}`),console.log(),console.log(` ${f("Next:")} Restart ${sr(m)} to activate.`),console.log()):(v?.fail("Installation failed"),console.log(),$.error&&console.log(` ${c("red","\u2717")} ${$.error}`),console.log(),process.exitCode=1)}};import q_ from"node:https";function g$(e,n){return new Promise(o=>{let r=n==="github.com"?"api.github.com":`${n}/api/v3`,t=q_.request({method:"GET",hostname:r.replace(/\/.*/,""),path:r.includes("/")?`/${r.split("/").slice(1).join("/")}/user`:"/user",headers:{Authorization:`Bearer ${e}`,"User-Agent":"octocode-cli/1.0",Accept:"application/vnd.github+json"},timeout:8e3},i=>{let s="";i.on("data",a=>s+=a.toString()),i.on("end",()=>{if(i.statusCode===401||i.statusCode===403){o({valid:!1,error:`HTTP ${i.statusCode}`});return}try{let a=JSON.parse(s),l=Number(i.headers["x-ratelimit-remaining"]??0),d=Number(i.headers["x-ratelimit-limit"]??0),p=Number(i.headers["x-ratelimit-reset"]??0);o({valid:!!a.login,login:a.login,rateLimit:{remaining:l,limit:d,reset:p}})}catch{o({valid:!1,error:"Invalid API response"})}})});t.on("error",i=>o({valid:!1,error:i.message})),t.on("timeout",()=>{t.destroy(),o({valid:!1,error:"Request timed out"})}),t.end()})}var ur={name:"token",aliases:["t"],description:"Print the GitHub token (matches octocode-mcp priority)",usage:"octocode token [--type <auto|octocode|gh>] [--hostname <host>] [--source] [--validate] [--json]",options:[{name:"type",short:"t",description:"Token source: auto (default: env\u2192octocode\u2192gh), octocode, gh",hasValue:!0,default:"auto"},{name:"hostname",short:"H",description:"GitHub Enterprise hostname (default: github.com)",hasValue:!0},{name:"source",short:"s",description:"Show token source and user info"},{name:"validate",description:"Ping the GitHub API to verify the token is valid and show rate-limit info"},{name:"reveal",description:"Print the full token on screen (default: masked on a terminal; raw when piped, e.g. $(octocode token))"},{name:"json",short:"j",description:"Output as JSON: { token, type, valid?, login?, rateLimit? }"}],handler:async e=>{let n=e.options.hostname??e.options.H,o=(typeof n=="string"?n:void 0)||"github.com",r=!!(e.options.source||e.options.s),t=!!e.options.validate,i=!!(e.options.reveal||e.options.raw),s=!!(e.options.json||e.options.j),a=e.options.type??e.options.t,l=(typeof a=="string"?a:void 0)||"auto",d;switch(l.toLowerCase()){case"octocode":case"octocode-cli":case"o":d="octocode";break;case"gh":case"gh-cli":case"g":d="gh";break;case"auto":case"a":d="auto";break;default:if(s){console.log(JSON.stringify({token:null,type:"none"})),process.exitCode=1;return}console.log(),console.log(` ${c("red","\u2717")} Invalid token type: ${l}`),console.log(` ${u("Valid options:")} octocode, gh, auto`),console.log(),process.exitCode=1;return}let p=await s$(o,d);if(s){if(!p.token){console.log(JSON.stringify({token:null,type:"none",valid:!1})),process.exitCode=1;return}if(t){let m=await g$(p.token,o);console.log(JSON.stringify({token:p.token,type:Qp(p.source,p.envSource),valid:m.valid,login:m.login??null,rateLimit:m.rateLimit??null,error:m.error??null})),m.valid||(process.exitCode=1);return}console.log(JSON.stringify({token:p.token,type:Qp(p.source,p.envSource)}));return}if(!p.token){console.log(),d==="octocode"?(console.log(` ${c("yellow","\u26A0")} No Octocode token found for ${o}`),console.log(),console.log(` ${u("To login with Octocode:")}`),console.log(` ${c("cyan","\u2192")} ${c("yellow","octocode login")}`),console.log(),console.log(` ${u("Or use gh CLI token:")}`),console.log(` ${c("cyan","\u2192")} ${c("yellow","octocode token --type=gh")}`)):d==="gh"?(console.log(` ${c("yellow","\u26A0")} No gh CLI token found for ${o}`),console.log(),console.log(` ${u("To login with gh CLI:")}`),console.log(` ${c("cyan","\u2192")} ${c("yellow","gh auth login")}`),console.log(),console.log(` ${u("Or use Octocode token:")}`),console.log(` ${c("cyan","\u2192")} ${c("yellow","octocode token --type=octocode")}`)):(console.log(` ${c("yellow","\u26A0")} Not authenticated to ${o}`),console.log(),ar()),console.log(),process.exitCode=1;return}if(t){let{Spinner:m}=await import("./spinner-DXD4JQIU.js"),g=new m("Validating token against GitHub API...").start(),v=await g$(p.token,o);if(g.stop(),console.log(),v.valid){if(console.log(` ${c("green","\u2713")} Token is valid \u2014 authenticated as ${c("cyan","@"+(v.login??"unknown"))}`),v.rateLimit){let $=new Date(v.rateLimit.reset*1e3).toLocaleTimeString();console.log(` ${u("Rate limit:")} ${v.rateLimit.remaining}/${v.rateLimit.limit} remaining, resets at ${$}`)}}else console.log(` ${c("red","\u2717")} Token validation failed: ${v.error??"unknown error"}`),process.exitCode=1;console.log();return}r?(console.log(),console.log(` ${c("green","\u2713")} Token found`),console.log(` ${u("Source:")} ${om(p.source,p.envSource)}`),p.username&&console.log(` ${u("User:")} ${c("cyan","@"+p.username)}`),console.log(),console.log(` ${u("Token:")} ${i?p.token:tm(p.token)}`),console.log()):console.log(i?p.token:u$(p.token))}};var oo={name:"login",aliases:["l"],description:"Authenticate with GitHub",usage:"octocode login [--hostname <host>] [--git-protocol <ssh|https>] [--force] [--json]",options:[{name:"hostname",short:"H",description:"GitHub Enterprise hostname (default: github.com)",hasValue:!0},{name:"git-protocol",short:"p",description:"Git protocol to use (ssh or https)",hasValue:!0},{name:"force",short:"f",description:"Re-authenticate even if already logged in (logout then login)"},{name:"json",short:"j",description:"Output result as JSON: { success, username, error }"}],handler:async e=>{let n=e.options.hostname??e.options.H,o=(typeof n=="string"?n:void 0)||"github.com",r=!!(e.options.json||e.options.j),t=!!(e.options.force||e.options.f),i=jt(o);if(i.authenticated&&!t){if(r){console.log(JSON.stringify({success:!0,username:i.username||null,error:null,alreadyAuthenticated:!0}));return}console.log(),console.log(` ${c("green","\u2713")} Already authenticated as ${c("cyan",i.username||"unknown")}`),console.log(),console.log(` ${u("To switch accounts, use --force:")}`),console.log(` ${c("cyan","\u2192")} ${c("yellow","octocode login --force")}`),console.log();return}if(t&&i.authenticated&&(r||(console.log(),console.log(` ${u("Logging out")} ${c("cyan",i.username||o)} ${u("before re-authenticating...")}`)),await an(o)),!process.stdout.isTTY){r?console.log(JSON.stringify({success:!1,error:'Login requires browser interaction. Run "octocode login" in an interactive terminal.',requiresInteraction:!0})):(console.log(),console.log(` ${c("red","\u2717")} Login requires browser interaction.`),console.log(` ${u("Run")} ${c("yellow","octocode login")} ${u("in an interactive terminal.")}`),console.log()),process.exitCode=1;return}let s=e.options["git-protocol"]??e.options.p,a=typeof s=="string"?s:"https";if(a!=="ssh"&&a!=="https"){if(r){console.log(JSON.stringify({success:!1,username:null,error:`Invalid git protocol: ${a}. Supported: ssh, https`})),process.exitCode=1;return}console.log(),console.log(` ${c("red","\u2717")} Invalid git protocol: ${a}`),console.log(` ${u("Supported:")} ssh, https`),console.log(),process.exitCode=1;return}r||(console.log(),console.log(` ${f("\u{1F510} GitHub Authentication")}`),console.log());let l=!1,d=r?null:new U("Waiting for GitHub authentication...").start(),p=await js({hostname:o,gitProtocol:a,onVerification:m=>{d?.stop(),l=!0,r?console.log(JSON.stringify({step:"verification",userCode:m.user_code,verificationUri:m.verification_uri,expiresIn:m.expires_in})):(console.log(` ${c("yellow","!")} First copy your one-time code: ${f(m.user_code)}`),console.log(),console.log(` ${f("Opening")} ${c("cyan",m.verification_uri)} ${f("in your browser...")}`),console.log(),console.log(` ${u("Waiting for authentication...")}`))}});if(l||d?.stop(),r){console.log(JSON.stringify({step:"result",success:p.success,username:p.username||null,error:p.error||null})),p.success||(process.exitCode=1);return}console.log(),p.success?(console.log(` ${c("green","\u2713")} Authentication complete!`),console.log(` ${c("green","\u2713")} Logged in as ${c("cyan",p.username||"unknown")}`),console.log(),console.log(` ${u("Credentials stored in:")} ${to()}`)):(console.log(` ${c("red","\u2717")} Authentication failed: ${p.error||"Unknown error"}`),process.exitCode=1),console.log()}},Rs={name:"logout",description:"Sign out from GitHub",usage:"octocode logout [--hostname <host>] [--yes] [--json]",options:[{name:"hostname",short:"H",description:"GitHub Enterprise hostname",hasValue:!0},{name:"yes",short:"y",description:"Skip confirmation prompt"},{name:"json",short:"j",description:"Output result as JSON: { success, hostname, error }"}],handler:async e=>{let n=e.options.hostname??e.options.H,o=(typeof n=="string"?n:void 0)||"github.com",r=!!(e.options.json||e.options.j),t=!!(e.options.yes||e.options.y),i=jt(o);if(!i.authenticated){if(r){console.log(JSON.stringify({success:!0,hostname:o,error:null,alreadyLoggedOut:!0}));return}console.log(),console.log(` ${c("yellow","\u26A0")} Not currently authenticated to ${o}`),console.log(),ar(),console.log();return}if(!t&&!r&&process.stdout.isTTY){let{confirm:a}=await import("./prompts-5E6VKRX5.js");if(!await a({message:`Log out from ${c("cyan",i.username||o)}?`,default:!1})){console.log(),console.log(` ${u("Logout cancelled.")}`),console.log();return}}let s=await an(o);if(r){console.log(JSON.stringify({success:s.success,hostname:o,error:s.error||null})),s.success||(process.exitCode=1);return}console.log(),console.log(` ${f("\u{1F510} GitHub Logout")}`),console.log(` ${u("Currently authenticated as:")} ${c("cyan",i.username||"unknown")}`),console.log(),s.success?console.log(` ${c("green","\u2713")} Successfully logged out from ${o}`):(console.log(` ${c("red","\u2717")} Logout failed: ${s.error||"Unknown error"}`),process.exitCode=1),console.log()}},am={name:"auth",aliases:["a","gh"],description:"Manage GitHub authentication",usage:"octocode auth [login|logout|status|token|refresh] [--json]",options:[{name:"hostname",short:"H",description:"GitHub Enterprise hostname (default: github.com)",hasValue:!0},{name:"json",short:"j",description:"Output as JSON (supported by all subcommands)"}],handler:async e=>{let n=e.args[0],o=e.options.hostname??e.options.H,r=(typeof o=="string"?o:void 0)||"github.com",t=!!(e.options.json||e.options.j);if(n==="login")return oo.handler(e);if(n==="logout")return Rs.handler(e);if(n==="status"){if(t){let l=cr(r);console.log(JSON.stringify(l)),l.authenticated||(process.exitCode=1);return}no(r);return}if(n==="token")return ur.handler(e);if(n==="refresh"){let l=jt(r),d=l.tokenSource;if(d==="env"){let g=l.envTokenSource,v=`Token is from environment variable${g?` (${g})`:""} \u2014 update it directly to refresh.`;t?console.log(JSON.stringify({success:!1,hostname:r,tokenSource:d,refreshable:!1,error:v})):(console.log(),console.log(` ${c("yellow","\u26A0")} ${v}`),console.log()),process.exitCode=1;return}if(d==="gh-cli"){let g="Token is managed by the gh CLI \u2014 run `gh auth refresh` instead.";t?console.log(JSON.stringify({success:!1,hostname:r,tokenSource:d,refreshable:!1,error:g,hint:"gh auth refresh"})):(console.log(),console.log(` ${c("yellow","\u26A0")} ${g}`),console.log(` ${u("Run:")} ${c("cyan","gh auth refresh")}${r!=="github.com"?` ${u(`--hostname ${r}`)}`:""}`),console.log()),process.exitCode=1;return}if(d==="none"||!l.authenticated){let g="Not authenticated. Run `octocode login` first.";t?console.log(JSON.stringify({success:!1,hostname:r,tokenSource:d,refreshable:!1,error:g})):(console.log(),console.log(` ${c("red","\u2717")} ${g}`),console.log()),process.exitCode=1;return}let p=t?null:new U("Refreshing Octocode token...").start(),m=await i$(r);if(p?.stop(),t){console.log(JSON.stringify({success:m.success,hostname:r,tokenSource:d,refreshable:!0,username:m.username??null,error:m.error??null})),m.success||(process.exitCode=1);return}console.log(),m.success?console.log(` ${c("green","\u2713")} Token refreshed for ${c("cyan",m.username??r)}`):(console.log(` ${c("red","\u2717")} Token refresh failed: ${m.error??"unknown error"}`),console.log(` ${u("Tip:")} run ${c("yellow","octocode login")} to re-authenticate`),process.exitCode=1),console.log();return}if(!process.stdout.isTTY){if(t){let l=cr(r);console.log(JSON.stringify(l)),l.authenticated||(process.exitCode=1)}else no(r);return}let i=jt(r);no(r),await se();let s=i.authenticated?[{name:"\u{1F513} Logout from GitHub",value:"logout"},{name:"\u{1F504} Switch account (logout & login)",value:"switch"},{name:"\u2190 Back",value:"back"}]:[{name:"\u{1F510} Login to GitHub",value:"login"},{name:"\u2190 Back",value:"back"}],a=await j({message:"What would you like to do?",choices:s});a==="login"?await oo.handler({command:"login",args:[],options:{hostname:r}}):a==="logout"?(await an(r),console.log(),console.log(` ${c("green","\u2713")} Successfully logged out`),console.log()):a==="switch"&&(console.log(),console.log(` ${u("Logging out...")}`),await an(r),console.log(` ${c("green","\u2713")} Logged out`),console.log(),console.log(` ${u("Starting new login...")}`),await oo.handler({command:"login",args:[],options:{hostname:r}}))}};import H_ from"node:path";function f$(e){let n=e.split(",").map(r=>Ep(r)).filter(r=>r!==null),o=[...new Set(n)];return o.length===0?{targets:o,error:"No valid targets provided"}:{targets:o}}function cm(e,n){return e.map(o=>({target:o,destDir:Hn(o,n)}))}function h$(e){return Ue(e).filter(Qt)}function K_(e,n){n==="installed"?e.installed++:n==="skipped"?e.skipped++:e.failed++}function lm({skillName:e,sourceDir:n,destinations:o,strategy:r,force:t}){let i=H_.join(n,e),s={installed:0,skipped:0,failed:0,targetCount:o.length};for(let a of o){let l=en(a.destDir,e),d=l?Cs({sourcePath:i,destinationPath:l,mode:my(r,a.target),force:t}):"failed";K_(s,d)}return s}function Fs({skillNames:e,sourceDir:n,destinations:o,strategy:r,force:t}){let i={installed:0,skipped:0,failed:0,targetCount:o.length};for(let s of e){let a=lm({skillName:s,sourceDir:n,destinations:o,strategy:r,force:t});i.installed+=a.installed,i.skipped+=a.skipped,i.failed+=a.failed}return i}function v$({skillName:e,destinations:n}){let o={removed:0,missing:0,failed:0,targetCount:n.length,failures:[]};for(let r of n){let t=en(r.destDir,e);if(!t){o.failed++,o.failures.push({target:r.target,reason:"invalid-skill-name"});continue}if(!F(t)){o.missing++;continue}Gn(t)?o.removed++:(o.failed++,o.failures.push({target:r.target,path:t,reason:"remove-failed"}))}return o}import{resolve as pm,basename as um}from"node:path";import Fe from"node:path";function X_(e){let n=e.startsWith("~/")?e.replace("~/",`${q}/`):e;if(n.startsWith("/")||n.startsWith("./")||n.startsWith("../")){let r=pm(n);return{type:"local",skillDir:r.endsWith("SKILL.md")?r.slice(0,-9):r}}if(n.startsWith("https://github.com/")){let r=n.match(/github\.com\/([^/]+)\/([^/]+)\/(tree|blob)\/([^/]+)\/(.+)/);if(r){let i=r[5].replace(/\/SKILL\.md$/,"");return{type:"github",owner:r[1],repo:r[2],branch:r[4],skillPath:i}}let t=n.match(/github\.com\/([^/]+)\/([^/]+)\/?$/);return t?{type:"github",owner:t[1],repo:t[2],skillPath:"",branch:"main"}:null}let o=n.split("/");if(o.length>=2){let r=o[0],t=o[1],i=o.slice(2).join("/").replace(/\/SKILL\.md$/,"").replace(/\/SKILL\.md$/,"");return{type:"github",owner:r,repo:t,skillPath:i,branch:"main"}}return null}async function Y_(){await se();let e=await j({message:"Install skills to which platforms?",choices:[{name:"- Claude locations (claude-code + claude-desktop)",value:"claude-only"},{name:"- All supported platforms",value:"all"},{name:"- Custom selection",value:"custom"},{name:`${u("- Cancel")}`,value:"cancel"}],loop:!1});return e==="cancel"?[]:e==="claude-only"?[...Tp]:e==="all"?[...ft]:await mr({message:"Select target platforms",choices:ft.map(n=>({name:`- ${n}`,value:n,checked:Tp.includes(n)})),required:!0,loop:!1})}async function Q_(){await se();let e=await j({message:"How should skills be installed?",choices:[{name:"- Hybrid (copy for Claude targets, symlink for others)",value:"hybrid"},{name:"- Full copies everywhere",value:"copy"},{name:"- Symlinks everywhere",value:"symlink"},{name:`${u("- Cancel")}`,value:"cancel"}],loop:!1});return e==="cancel"?null:e}var dm=3e3,mm={name:"skills",aliases:["sk"],description:"Search, install, and manage Octocode skills across AI clients",usage:"octocode skills [search|read|install|remove|list|sync] [--skill <name>] [--targets <list>] [--mode <copy|symlink>] [--json]",options:[{name:"force",short:"f",description:"Overwrite existing skills"},{name:"skill",short:"k",description:"Skill folder name (install/remove from bundled)",hasValue:!0},{name:"local",description:"Path to a local skill folder \u2014 for read, install, or remove (e.g. ./my-skill or /abs/path)",hasValue:!0},{name:"targets",short:"t",description:`Comma-separated targets: ${ht()}`,hasValue:!0},{name:"mode",short:"m",description:"Install mode: copy (default) or symlink",hasValue:!0,default:"copy"},{name:"limit",short:"l",description:"Max results for search (default: 20)",hasValue:!0},{name:"full",description:"Show full SKILL.md without truncation (read only)"},{name:"direct",description:"Search skills.sh directly and show results (human mode \u2014 skips agent protocol)"},{name:"target",description:`Filter list to one target: ${ht()} (list only)`,hasValue:!0},{name:"install",short:"i",description:"Install the top search result (use with search --direct)"},{name:"dry-run",short:"n",description:"Show what would be installed without writing anything (install only)"},{name:"json",short:"j",description:"Output as JSON"}],handler:async e=>{let n=e.args[0]||"list",o=!!(e.options.force||e.options.f),r=!!(e.options.json||e.options.j),t=!!e.options.full,i=!!(e.options["dry-run"]||e.options.n),s=!!(e.options.install||e.options.i),a=e.options.target,l=typeof a=="string"&&a.length>0?a.trim().toLowerCase():void 0,d=e.options.skill??e.options.k,p=typeof d=="string"&&d.length>0?d:void 0,m=e.options.local,g=typeof m=="string"&&m.length>0?m:void 0,v=e.options.targets??e.options.t,$=n==="remove"?void 0:e.options.mode??e.options.m,M="copy";if(typeof $=="string"&&$.trim().length>0){let x=$.trim().toLowerCase();if(x!=="copy"&&x!=="symlink"){console.log(),console.log(` ${c("red","X")} Invalid --mode value: ${c("yellow",$)}`),console.log(` ${u("Allowed values:")} copy, symlink`),console.log(` ${u("Example:")} octocode skills install --mode symlink`),console.log(),process.exitCode=1;return}M=x}let _=typeof v=="string"&&v.trim().length>0,N=typeof $=="string"&&$.length>0,D=tn(),E=Ee(),A=[...py];if(typeof v=="string"&&v.trim().length>0){let x=f$(v);if(A=x.targets,x.error){console.log(),console.log(` ${c("red","X")} ${x.error}`),console.log(` ${u("Valid targets:")} ${ht()}`),console.log(),process.exitCode=1;return}}let O=M;if(n==="install"&&!g&&!r&&process.stdout.isTTY&&(!_||!N)){let x=await Y_();if(x.length===0){console.log(),console.log(` ${c("yellow","WARN")} Skills install cancelled`),console.log();return}A=x;let T=await Q_();if(!T){console.log(),console.log(` ${c("yellow","WARN")} Skills install cancelled`),console.log();return}O=T}let Z=cm(A,E);if(n==="install"&&!g&&!p&&!F(D)){console.log(),console.log(` ${c("red","\u2717")} Skills directory not found`),console.log(` ${u("Expected:")} ${D}`),console.log(),process.exitCode=1;return}let Y=h$(D);if(n==="read"){let x=e.args[1]??g;if(!x){console.log(),console.log(` ${c("red","\u2717")} Missing path`),console.log(` ${u("Usage:")} octocode skills read <path-to-SKILL.md>`),console.log(` ${u("Local:")} skills read ./my-skill/SKILL.md`),console.log(` ${u("GitHub:")} skills read owner/repo/skills/my-skill`),console.log(` ${u("GitHub:")} skills read https://github.com/owner/repo/tree/main/skills/my-skill`),console.log(),process.exitCode=1;return}let T=X_(x);if(!T){console.log(),console.log(` ${c("red","\u2717")} Cannot parse path: ${c("yellow",x)}`),console.log(` ${u("Expected:")} /local/path, ./relative, owner/repo/path, or https://github.com/...`),console.log(),process.exitCode=1;return}let G=r?null:new U("Reading SKILL.md...").start(),P=null,L=null,re="";try{if(T.type==="local"){let W=T.skillDir.endsWith("SKILL.md")?T.skillDir:Fe.join(T.skillDir,"SKILL.md");if(!fe(W))throw new Error(`SKILL.md not found at ${W}`);P=nt(W)??null,re=W}else P=await As(T.owner,T.repo,T.skillPath,T.branch),re=`https://github.com/${T.owner}/${T.repo}/tree/${T.branch}/${T.skillPath}`}catch(W){L=W instanceof Error?W.message:String(W)}if(G?.stop(),L||!P){if(r){console.log(JSON.stringify({success:!1,error:L??"Empty content"})),process.exitCode=1;return}if(console.log(),console.log(` ${c("red","\u2717")} ${L??"Empty content"}`),L?.includes("not found")||L?.includes("tried main")){console.log(` ${u("This skill may have been moved or removed from the registry.")}`);let W=x.replace(/\/SKILL\.md$/i,"").split("/").at(-1)??"";W&&console.log(` ${u("Search for it:")} octocode skills search "${W}" --direct`)}console.log(),process.exitCode=1;return}let le=it(P),ne=le?.name??(T.type==="local"?um(T.skillDir):T.skillPath.split("/").pop()??T.repo),Ze=!t&&P.length>dm,ve=Ze?P.slice(0,dm):P;if(r){console.log(JSON.stringify({success:!0,name:ne,description:le?.description??null,source:re,content:ve,truncated:Ze,totalChars:P.length}));return}console.log(),console.log(` ${f(ne)}`),le?.description&&console.log(` ${u(le.description)}`),console.log(` ${u(re)}`),console.log(),console.log(` ${c("cyan",f("\u2500\u2500 SKILL.md \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"))}`),console.log(),console.log(ve),Ze&&(console.log(),console.log(` ${u(`... (${P.length-dm} more chars \u2014 use --full to show all)`)}`)),console.log();return}if(n==="search"){let x=e.args[1]||e.options.query||e.options.q,T=process.stdout.isTTY===!0,G=!!e.options.direct||T,P=e.options.limit??e.options.l,L=typeof P=="string"&&/^\d+$/.test(P)?Math.max(1,Math.min(100,parseInt(P,10))):20;if(!x||typeof x!="string"){console.log(),console.log(` ${c("red","\u2717")} Missing search query`),console.log(` ${u("Usage:")} octocode skills search <query> [--direct] [--json] [--limit N]`),console.log(` ${u("Example:")} octocode skills search "code review" --direct`),console.log(),process.exitCode=1;return}let re="https://github.com/bgauryy/octocode/blob/main/skills/octocode-search-skill/SKILL.md",le="https://raw.githubusercontent.com/bgauryy/octocode/main/skills/octocode-search-skill/SKILL.md",ne="https://github.com/bgauryy/octocode/tree/main/skills/octocode-search-skill/references";if(G){let Ze=r?null:new U(`Searching skills.sh for "${x}"...`).start(),ve=null,W=null;try{ve=await Gy(x,L)}catch(ue){W=String(ue)}if(Ze?.stop(),r){console.log(JSON.stringify({query:x,source:"skills.sh",count:ve?.count??0,results:(ve?.results??[]).map(ue=>({name:ue.name,skillId:ue.skillId,repo:ue.source,installs:ue.installs,url:`https://github.com/${ue.source}`,readCmd:`octocode skills read ${ue.source}/${ue.skillId}/SKILL.md`,installCmd:`octocode skills install --local ${ue.source}/${ue.skillId}`})),error:W??void 0}));return}if(console.log(),console.log(` ${f(`Skill Search: "${x}"`)}`),!ve||ve.results.length===0){console.log(),console.log(W?` ${c("yellow","WARN")} skills.sh unavailable: ${W}`:` ${u(`No results for "${x}" \u2014 try broader terms`)}`),console.log();return}let me=new Map;for(let ue of ve.results){let $e=me.get(ue.source)??[];$e.push(ue),me.set(ue.source,$e)}let at=[...me.entries()].sort((ue,$e)=>$e[1].reduce(($t,je)=>$t+je.installs,0)-ue[1].reduce(($t,je)=>$t+je.installs,0));console.log(` ${u(`${ve.count} results from skills.sh \u2014 grouped by repo`)}`);for(let[ue,$e]of at){let $t=$e.reduce((je,ct)=>je+ct.installs,0);console.log(),console.log(` ${c("cyan",f(ue))} ${u(`(${$t.toLocaleString()} total installs)`)}`);for(let je of $e.sort((ct,ro)=>ro.installs-ct.installs)){let ct=je.installs>0?u(` \xB7 ${je.installs.toLocaleString()} installs`):"";console.log(` ${c("green","\u2022")} ${f(je.name)}${ct}`),console.log(` ${u("read:")} octocode skills read ${je.source}/${je.skillId}/SKILL.md`)}}if(s&&ve.results.length>0){let $e=ve.results.sort((io,Bs)=>Bs.installs-io.installs)[0],$t=`${$e.source}/${$e.skillId}`;console.log(),console.log(` ${f("Auto-installing top result:")} ${c("cyan",$e.name)}`),console.log(` ${u("Source:")} https://github.com/${$t}`),console.log();let je=new U(`Fetching SKILL.md from ${$t}...`).start(),ct=null,ro=null;try{ro=await As($e.source.split("/")[0],$e.source.split("/").slice(1).join("/"),`${$e.skillId}/SKILL.md`,"main")}catch(io){ct=String(io)}if(je.stop(),ct||!ro)console.log(` ${c("red","\u2717")} Could not fetch skill: ${ct??"empty content"}`),console.log(` ${u("Try manually:")} octocode skills install --local <path>`);else{let{mkdirSync:io,writeFileSync:Bs}=await import("node:fs"),dr=0,so=0;for(let k$ of Z){let pr=Fe.join(k$.destDir,$e.skillId);try{if(!o&&F(pr))continue;io(pr,{recursive:!0,mode:493}),Bs(Fe.join(pr,"SKILL.md"),ro,"utf8"),dr++}catch(S$){console.log(` ${c("red","X")} Failed to write to ${pr}: ${S$}`),so++}}so===0&&dr>0?console.log(` ${c("green","\u2705")} Installed ${$e.name} to ${dr} target(s)`):dr===0&&so===0?console.log(` ${c("yellow","\u26A0")} Already installed in all targets \u2014 use --force to overwrite`):so>0&&(console.log(` ${c("red","X")} Installation failed for ${so} target(s)`),process.exitCode=1)}}console.log();return}if(r){console.log(JSON.stringify({query:x,instruction:"Read the skill protocol and all its referenced files, then execute the search for the given query.",skillProtocol:{url:re,raw:le,references:ne}}));return}console.log(),console.log(` ${f(`Skill Search: "${x}"`)}`),console.log(` ${u("This is the agent search protocol. For human-readable results now, add --direct.")}`),console.log(),console.log(` Read and follow the search protocol, then search for: ${c("cyan",f(x))}`),console.log(),console.log(` ${f("Protocol:")} ${re}`),console.log(` ${f("References:")} ${ne}`),console.log(),console.log(` ${u("For immediate results: octocode skills search <query> --direct")}`),console.log();return}if(n==="list"){if(l&&!ft.includes(l)){r?console.log(JSON.stringify({error:`Invalid target: ${l}. Valid: ${ht()}`})):(console.log(),console.log(` ${c("red","\u2717")} Invalid --target: ${l}`),console.log(` ${u("Valid targets:")} ${ht()}`),console.log()),process.exitCode=1;return}let T=(l?ft.filter(P=>P===l):ft).map(P=>{let L=Hn(P),re=F(L),le=re?Ue(L).filter(ne=>Qt(ne)).map(ne=>{let Ze=Fe.join(L,ne),ve=hy(Ze),W=ve?.description||null,me=W&&W.length>200?`${W.slice(0,200)}\u2026`:W;return{folder:ne,name:ve?.name||ne,description:me,path:Fe.join(Ze,"SKILL.md")}}):[];return{target:P,destDir:L,exists:re,skills:le}});if(r){console.log(JSON.stringify({targets:T}));return}let G=T.reduce((P,L)=>P+L.skills.length,0);console.log(),console.log(` ${f("Skills on OS")} ${u(`(${G} total)`)}`);for(let P of T){if(console.log(),console.log(` ${c("cyan",f(P.target))} ${u(P.destDir)}`),!P.exists){console.log(` ${u("(directory not found)")}`);continue}if(P.skills.length===0){console.log(` ${u("(no skills installed)")}`);continue}for(let L of P.skills){let re=L.name!==L.folder?`${f(L.name)} ${u(`(${L.folder})`)}`:f(L.folder);if(console.log(` ${c("green","\u2022")} ${re}`),L.description){let le=L.description,ne=le.length>200?`${le.slice(0,200)}\u2026`:le;console.log(` ${u(ne)}`)}console.log(` ${u(L.path)}`)}}console.log(),Y.length>0&&(console.log(` ${u("Available to install:")} ${Y.join(", ")}`),console.log(` ${u("Install:")} octocode skills install --targets <targets>`)),console.log();return}if(n==="install"){if(g){let G=pm(g.startsWith("~/")?g.replace("~/",`${q}/`):g),P=G.endsWith("SKILL.md")?G:Fe.join(G,"SKILL.md"),L=P.replace(/\/SKILL\.md$/,""),re=um(L);if(!fe(P)){r?console.log(JSON.stringify({success:!1,error:`SKILL.md not found at ${P}`})):(console.log(),console.log(` ${c("red","\u2717")} SKILL.md not found at ${P}`),console.log()),process.exitCode=1;return}let le=r?null:new U(`Installing ${re} from local path...`).start(),ne=Fs({skillNames:[re],sourceDir:Fe.dirname(L),destinations:Z,strategy:O,force:o});if(r){le?.stop(),console.log(JSON.stringify({installed:ne.installed,skipped:ne.skipped,failed:ne.failed,skill:re,source:G,targets:Z.map(Ze=>Ze.target)})),ne.failed>0&&(process.exitCode=1);return}ne.failed===0?(le?.succeed(`Installed ${re}!`),console.log(),console.log(` ${c("green","\u2705")} Installed to ${ne.installed}/${ne.targetCount} targets`)):(le?.fail(`Failed to install ${re}`),process.exitCode=1),console.log();return}if(p){if(console.log(),console.log(` ${f(`Installing skill: ${p}`)}`),console.log(),!Y.includes(p)){console.log(` ${c("red","\u2717")} Skill not found: ${p}`),console.log(),console.log(` ${u("Available skills:")}`);for(let L of Y)console.log(` ${c("cyan","\u2022")} ${L}`);console.log(),process.exitCode=1;return}let G=r?null:new U(`Installing ${p}...`).start(),P=lm({skillName:p,sourceDir:D,destinations:Z,strategy:O,force:o});if(r){console.log(JSON.stringify({installed:P.installed,skipped:P.skipped,failed:P.failed,skill:p,targets:Z.map(L=>L.target)})),P.failed>0&&(process.exitCode=1);return}if(P.failed===0){G?.succeed(`Installed ${p}!`),console.log(),console.log(` ${c("green","\u2705")} Installed to ${P.installed}/${P.targetCount} targets`);for(let L of Z)console.log(` ${c("cyan","\u2022")} ${L.target}: ${Fe.join(L.destDir,p)}`);P.skipped>0&&console.log(` ${c("yellow","WARN")} Skipped ${P.skipped} existing target(s) ${u("(use --force to overwrite)")}`)}else G?.fail(`Failed to install ${p}`),process.exitCode=1;console.log();return}if(r||(console.log(),console.log(` ${f("Installing Octocode Skills")}`),console.log()),Y.length===0){r?console.log(JSON.stringify({dryRun:i,skills:[],targets:Z.map(G=>G.target),plan:[]})):(console.log(` ${c("yellow","\u26A0")} No skills to install.`),console.log());return}if(i){let G=Y.flatMap(P=>Z.map(L=>({skill:P,target:L.target,dest:Fe.join(L.destDir,P),exists:F(Fe.join(L.destDir,P))})));if(r){console.log(JSON.stringify({dryRun:!0,skills:Y,targets:Z.map(P=>P.target),plan:G}));return}console.log(` ${c("yellow","DRY RUN")} ${u("(no files written)")}`),console.log();for(let P of G){let L=P.exists?o?c("yellow","overwrite"):c("dim","skip (exists)"):c("green","install");console.log(` ${c("cyan",P.target)} / ${f(P.skill)} ${L}`),console.log(` ${u(P.dest)}`)}console.log(),console.log(` ${u("Remove --dry-run to apply.")}`),console.log();return}let x=r?null:new U("Installing skills...").start(),T=Fs({skillNames:Y,sourceDir:D,destinations:Z,strategy:O,force:o});if(r){console.log(JSON.stringify({installed:T.installed,skipped:T.skipped,failed:T.failed,targets:Z.map(G=>G.target)})),T.failed>0&&(process.exitCode=1);return}T.failed===0?x?.succeed("Skills installation complete!"):x?.fail("Skills installation completed with errors"),console.log(),T.installed>0&&console.log(` ${c("green","\u2705")} Installed ${T.installed} skill target(s)`),T.skipped>0&&(console.log(` ${c("yellow","WARN")} Skipped ${T.skipped} existing skill target(s)`),console.log(` ${u("Use")} ${c("cyan","--force")} ${u("to overwrite.")}`)),T.failed>0&&(console.log(` ${c("red","X")} Failed ${T.failed} skill target(s)`),process.exitCode=1),console.log(),console.log(` ${f("Targets:")}`);for(let G of Z)console.log(` ${c("cyan","\u2022")} ${G.target}: ${G.destDir}`);console.log(),console.log(` ${f("Skills installation finished.")}`),console.log();return}if(n==="remove"){let x=p??(g?um(pm(g.startsWith("~/")?g.replace("~/",`${q}/`):g).replace(/\/SKILL\.md$/,"")):void 0);if(!x){console.log(),console.log(` ${c("red","X")} Missing required option: ${c("cyan","--skill <name>")} or ${c("cyan","--local <path>")}`),console.log(),console.log(` ${u("Usage:")} octocode skills remove --skill <name>`),console.log(` ${u(" or:")} octocode skills remove --local ./my-skill`),console.log(),process.exitCode=1;return}console.log(),console.log(` ${f(`Removing skill: ${x}`)}`),console.log();let T=v$({skillName:x,destinations:Z});if(T.failures.some(P=>P.reason==="invalid-skill-name")){if(r){console.log(JSON.stringify({removed:0,missing:0,failed:1,targets:Z.map(P=>P.target),error:`Invalid skill name: ${x}`})),process.exitCode=1;return}console.log(` ${c("red","X")} Invalid skill name: ${x}`),process.exitCode=1;return}if(r){console.log(JSON.stringify({removed:T.removed,missing:T.missing,failed:T.failed,skill:x,targets:Z.map(P=>P.target)})),T.failed>0&&(process.exitCode=1);return}for(let P of T.failures)P.reason==="remove-failed"&&console.log(` ${c("red","X")} Failed to remove from ${P.target}: ${P.path}`);T.removed>0&&console.log(` ${c("green","\u2705")} Removed from ${T.removed}/${T.targetCount} targets`),T.missing>0&&console.log(` ${c("yellow","WARN")} Not found in ${T.missing} target(s) ${u("(already absent)")}`),T.failed>0&&(process.exitCode=1),console.log();return}if(n==="sync"){let x=e.args[1],T=e.args[2];if(!x||!T){let me="Usage: octocode skills sync <from-target> <to-target>";r?console.log(JSON.stringify({success:!1,error:me})):(console.log(),console.log(` ${c("red","\u2717")} ${me}`),console.log(` ${u("Example:")} octocode skills sync cursor agents`),console.log(` ${u("Targets:")} ${ht()}`),console.log()),process.exitCode=1;return}let G=ft.find(me=>me===x.toLowerCase()),P=ft.find(me=>me===T.toLowerCase()),L=[!G&&x,!P&&T].filter(Boolean);if(L.length>0){let me=`Invalid target(s): ${L.join(", ")}. Valid: ${ht()}`;r?console.log(JSON.stringify({success:!1,error:me})):(console.log(),console.log(` ${c("red","\u2717")} ${me}`),console.log()),process.exitCode=1;return}let re=Hn(G),le=Hn(P);if(!F(re)){let me=`Source target has no skills: ${G} (${re})`;r?console.log(JSON.stringify({success:!1,error:me})):(console.log(),console.log(` ${c("red","\u2717")} ${me}`),console.log()),process.exitCode=1;return}let ne=Ue(re).filter(Qt);if(i){let me=ne.map(at=>({skill:at,from:Fe.join(re,at),to:Fe.join(le,at),exists:F(Fe.join(le,at))}));if(r){console.log(JSON.stringify({dryRun:!0,from:G,to:P,skills:ne,plan:me}));return}console.log(),console.log(` ${c("yellow","DRY RUN")} sync ${c("cyan",G)} \u2192 ${c("cyan",P)} ${u("(no files written)")}`),console.log();for(let at of me){let ue=at.exists?o?c("yellow","overwrite"):c("dim","skip (exists)"):c("green","copy");console.log(` ${c("green","\u2022")} ${f(at.skill)} ${ue}`)}console.log();return}let Ze=r?null:new U(`Syncing ${ne.length} skills from ${G} \u2192 ${P}...`).start(),ve=cm([P],Ee()),W=Fs({skillNames:ne,sourceDir:re,destinations:ve,strategy:"copy",force:o});if(Ze?.stop(),r){console.log(JSON.stringify({success:W.failed===0,from:G,to:P,installed:W.installed,skipped:W.skipped,failed:W.failed,skills:ne})),W.failed>0&&(process.exitCode=1);return}console.log(),console.log(` ${c("green","\u2705")} Synced ${W.installed} skill(s) from ${c("cyan",G)} \u2192 ${c("cyan",P)}`),W.skipped>0&&console.log(` ${c("yellow","WARN")} Skipped ${W.skipped} (already exists \u2014 use --force to overwrite)`),W.failed>0&&(console.log(` ${c("red","X")} Failed ${W.failed}`),process.exitCode=1),console.log();return}console.log(),console.log(` ${c("red","\u2717")} Unknown subcommand: ${n}`),console.log(` ${u("Usage:")} octocode skills [search|read|install|remove|list|sync]`),console.log(),process.exitCode=1}};import eP from"node:https";import tP from"node:http";function nP(e,n=5e3){return new Promise(o=>{try{let r=new URL(e),i=(r.protocol==="https:"?eP:tP).request({method:"HEAD",hostname:r.hostname,path:r.pathname||"/",timeout:n},()=>o(!0));i.on("error",()=>o(!1)),i.on("timeout",()=>{i.destroy(),o(!1)}),i.end()}catch{o(!1)}})}function oP(e){let n=e.installConfig.command;return n!=="npx"&&n!=="uvx"&&n!=="pip"&&n!=="pipx"?null:e.npmPackage?`https://registry.npmjs.org/${e.npmPackage.replace(/^@/,"").replace("/","%2F")}`:e.pythonPackage?`https://pypi.org/pypi/${e.pythonPackage}/json`:e.repository}function y$(e){let n=process.env[e];return n&&n.trim().length>0?"set":"missing"}var $$=Us(),gm={name:"mcp",description:"Non-interactive MCP marketplace management",usage:"octocode mcp [list|install|remove|status] [--id <mcp-id>] [--client <client>|--config <path>] [--search <text>] [--category <name>] [--env KEY=VALUE[,KEY=VALUE]] [--force]",options:[{name:"id",description:"MCP registry id \u2014 comma-separated for batch install: --id id1,id2,id3",hasValue:!0},{name:"client",short:"c",description:`Target client: ${$$}`,hasValue:!0},{name:"config",description:"Custom MCP config path (uses custom client)",hasValue:!0},{name:"search",description:"Filter list by id/name/description/tags",hasValue:!0},{name:"category",description:"Filter list by category",hasValue:!0},{name:"env",description:"Comma-separated env values: KEY=VALUE,KEY2=VALUE2",hasValue:!0},{name:"installed",description:"List only MCPs installed in target config"},{name:"force",short:"f",description:"Overwrite existing MCP entry on install"},{name:"json",description:"Output results as JSON"}],handler:async e=>{let n=(e.args[0]||"list").toLowerCase(),o=e.options.id,r=typeof o=="string"&&o.trim().length>0?o.trim():void 0,t=e.options.client??e.options.c,i=e.options.config,s=e.options.search,a=e.options.category,l=e.options.env,d=!!e.options.installed,p=!!(e.options.force||e.options.f),m=!!e.options.json,g="claude-code",v;if(typeof i=="string"&&i.trim().length>0)g="custom",v=i.trim();else if(typeof t=="string"&&t.trim().length>0){let N=Ls(t);if(!N){console.log(),console.log(` ${c("red","X")} Invalid --client value: ${c("yellow",t)}`),console.log(` ${u("Allowed values:")} ${$$}`),console.log(),process.exitCode=1;return}g=N}let $=te(g,v),M=X($)||{mcpServers:{}},_=M.mcpServers||{};if(n==="list"){if(!t&&!i&&typeof s!="string"&&typeof a!="string"&&!d){let E=ot.map(O=>{let Z=te(O),ie=zt(O),Y=ie?Object.keys(X(Z)?.mcpServers||{}):null;return{client:O,name:J[O]?.name||O,configPath:Z,exists:ie,servers:Y}});if(m){console.log(JSON.stringify({configs:E}));return}let A=E.filter(O=>O.exists);if(console.log(),console.log(` ${f("MCP Configs on OS")} ${u(`(${A.length}/${E.length} found)`)}`),A.length===0){console.log(),console.log(` ${u("No MCP config files found on OS.")}`),console.log();return}for(let O of A){let Z=O.servers?.length??0;if(console.log(),console.log(` ${c("cyan",f(O.name))} ${u(O.configPath)}`),!O.servers||Z===0)console.log(` ${u("(no servers configured)")}`);else for(let ie of O.servers)console.log(` ${c("green","\u2022")} ${ie}`)}console.log();return}let D=Ie;if(typeof s=="string"&&s.trim().length>0){let E=s.trim().toLowerCase();D=D.filter(A=>A.id.toLowerCase().includes(E)||A.name.toLowerCase().includes(E)||A.description.toLowerCase().includes(E)||A.tags?.some(O=>O.toLowerCase().includes(E)))}if(typeof a=="string"&&a.trim().length>0){let E=a.trim().toLowerCase();D=D.filter(A=>A.category===E)}if(d){let E=new Set(Object.keys(_));D=D.filter(A=>E.has(A.id))}if(m){console.log(JSON.stringify({client:g,configPath:$,results:D.map(E=>({id:E.id,name:E.name,category:E.category,installed:!!_[E.id],requiredEnvVars:d?(E.requiredEnvVars??[]).map(A=>({name:A.name,description:A.description,status:y$(A.name)})):void 0}))}));return}if(console.log(),console.log(` ${f("MCP Marketplace")}`),console.log(` ${u("Client:")} ${J[g]?.name||g}`),console.log(` ${u("Config:")} ${$}`),console.log(` ${u("Results:")} ${D.length}`),console.log(),D.length===0){console.log(` ${u("No MCP entries matched your filters.")}`),console.log();return}for(let E of D){let A=!!_[E.id],O=A?c("green","installed"):u("not installed");if(console.log(` ${c("cyan","\u2022")} ${E.id} ${u("("+E.category+")")} ${O}`),A&&d&&E.requiredEnvVars?.length)for(let Z of E.requiredEnvVars){let ie=y$(Z.name),Y=ie==="set"?c("green","\u2713"):c("red","\u2717");console.log(` ${Y} ${Z.name} ${u(ie==="set"?"(set)":"(missing)")}`)}}console.log();return}if(n==="status"){let N=Object.keys(_).sort((D,E)=>D.localeCompare(E));if(m){console.log(JSON.stringify({client:g,configPath:$,servers:N}));return}console.log(),console.log(` ${f("MCP Config Status")}`),console.log(` ${u("Client:")} ${J[g]?.name||g}`),console.log(` ${u("Config:")} ${$}`),console.log(` ${u("Installed MCPs:")} ${N.length}`),console.log();for(let D of N)console.log(` ${c("cyan","\u2022")} ${D}`);N.length===0&&console.log(` ${u("No MCP servers configured yet.")}`),console.log();return}if(n==="install"){if(!r){m?console.log(JSON.stringify({success:!1,error:"Missing required option: --id <mcp-id>"})):(console.log(),console.log(` ${c("red","X")} Missing required option: --id <mcp-id>`),console.log()),process.exitCode=1;return}let N=r.split(",").map(x=>x.trim()).filter(Boolean),D=d$(typeof l=="string"?l:void 0);if(D.error){m?console.log(JSON.stringify({success:!1,error:D.error})):(console.log(),console.log(` ${c("red","X")} ${D.error}`),console.log()),process.exitCode=1;return}let E=[],A=N.map(x=>({id:x,entry:Ie.find(T=>T.id.toLowerCase()===x.toLowerCase())}));for(let x of A.filter(T=>!T.entry))E.push({id:x.id,success:!1,error:`MCP not found in registry: ${x.id}`});let Z=A.filter(x=>!!x.entry).filter(x=>_[x.entry.id]&&!p?(E.push({id:x.entry.id,success:!1,error:`MCP already installed: ${x.entry.id}`,hint:"Use --force to overwrite"}),!1):!0),ie=new Map;await Promise.allSettled(Z.map(async x=>{let T=oP(x.entry),G=T?await nP(T):!0;ie.set(x.entry.id,{ok:G,url:T})}));for(let x of Z){let T=ie.get(x.entry.id);if(T&&!T.ok&&!p){E.push({id:x.entry.id,success:!1,preflightUrl:T.url??void 0,error:`Pre-flight check failed: ${T.url} is unreachable`,hint:"Use --force to skip pre-flight and install anyway",preflightFailed:!0});continue}let G={command:x.entry.installConfig.command,args:[...x.entry.installConfig.args]},P={...x.entry.installConfig.env||{},...D.values};Object.keys(P).length>0&&(G.env=P);let L=X($)||{mcpServers:{}},re={...L,mcpServers:{...L.mcpServers||{},[x.entry.id]:G}},le=De($,re);E.push(le.success?{id:x.entry.id,success:!0}:{id:x.entry.id,success:!1,error:le.error||"Failed to write MCP config"})}let Y=E.filter(x=>!x.success);if(m){if(N.length===1){let x=E[0];console.log(JSON.stringify({success:x.success,id:x.id,client:g,configPath:$,error:x.error??null,hint:x.hint??null}))}else console.log(JSON.stringify({results:E,client:g,configPath:$}));Y.length>0&&(process.exitCode=1);return}console.log();for(let x of E)x.success?console.log(` ${c("green","\u2705")} Installed: ${x.id}`):(console.log(` ${c("red","X")} ${x.error}`),x.hint&&console.log(` ${u(x.hint)}`));E.length>1?(console.log(),console.log(` ${u("Client:")} ${J[g]?.name||g} ${u("Config:")} ${$}`)):E[0]?.success&&(console.log(` ${u("Client:")} ${J[g]?.name||g}`),console.log(` ${u("Config:")} ${$}`)),console.log(),Y.length>0&&(process.exitCode=1);return}if(n==="remove"){if(!r){m?console.log(JSON.stringify({success:!1,error:"Missing required option: --id <mcp-id>"})):(console.log(),console.log(` ${c("red","X")} Missing required option: --id <mcp-id>`),console.log()),process.exitCode=1;return}let N=Object.keys(_).find(A=>A.toLowerCase()===r.toLowerCase());if(!N){m?console.log(JSON.stringify({success:!1,error:`MCP not installed: ${r}`})):(console.log(),console.log(` ${c("yellow","WARN")} MCP not installed: ${r}`),console.log(` ${u("Nothing to remove from target config.")}`),console.log()),process.exitCode=1;return}let D={..._};delete D[N];let E=De($,{...M,mcpServers:D});if(!E.success){m?console.log(JSON.stringify({success:!1,error:E.error||"Failed to update MCP config"})):(console.log(),console.log(` ${c("red","X")} Failed to update MCP config`),console.log(` ${u(E.error||"Unknown write error")}`),console.log()),process.exitCode=1;return}m?console.log(JSON.stringify({success:!0,id:r,client:g,configPath:$})):(console.log(),console.log(` ${c("green","\u2705")} Removed MCP: ${r}`),console.log(` ${u("Client:")} ${J[g]?.name||g}`),console.log(` ${u("Config:")} ${$}`),console.log());return}console.log(),console.log(` ${c("red","X")} Unknown mcp subcommand: ${n}`),console.log(` ${u("Usage:")} octocode mcp [list|install|remove|status]`),console.log(),process.exitCode=1}};import fm from"node:path";import{existsSync as Zs,rmSync as b$}from"node:fs";var hm={name:"cache",description:"Inspect and clean Octocode cache and logs",usage:"octocode cache [status|clean] [--repos] [--skills] [--logs] [--tools|--local|--lsp|--api] [--all]",options:[{name:"json",short:"j",description:"Output result as JSON: { repos, skills, logs, totalBytes, totalFormatted }"},{name:"dry-run",short:"n",description:"Show what would be deleted and bytes freed without deleting (clean only)"},{name:"yes",short:"y",description:"Skip confirmation prompt when using --all (clean only)"},{name:"repos",description:"Target cloned repositories cache"},{name:"skills",description:"Target marketplace skills cache"},{name:"logs",description:"Target Octocode logs directory"},{name:"all",short:"a",description:"Target repos + skills + logs (tool flags are advisory)"},{name:"tools",description:"Target tool caches (local + lsp + api). In-memory caches clear on MCP restart."},{name:"local",description:"Target local tool cache. In-memory cache clears on MCP restart."},{name:"lsp",description:"Target LSP tool cache. In-memory cache clears on MCP restart."},{name:"api",description:"Target remote API tool cache. In-memory cache clears on MCP restart."}],handler:async e=>{let n=(e.args[0]||"status").toLowerCase(),o=!!(e.options.json||e.options.j),r=!!(e.options["dry-run"]||e.options.n),t=!!(e.options.yes||e.options.y),i=ge.home||process.env.OCTOCODE_HOME||fm.join(process.env.HOME||"",".octocode"),s=ge.repos||fm.join(i,"repos"),a=ge.logs||fm.join(i,"logs"),l=Os(),d=!!e.options.repos,p=!!e.options.skills,m=!!e.options.logs,g=!!e.options.tools,v=!!e.options.local,$=!!e.options.lsp,M=!!e.options.api,_=!!(e.options.all||e.options.a),N=_||d,D=_||p,E=_||m,A=g||v||$||M;if(n==="status"){let O=Pe(s),Z=Pe(l),ie=Pe(a),Y=O+Z+ie;if(o){console.log(JSON.stringify({home:i,repos:{path:s,sizeBytes:O,sizeFormatted:ae(O)},skills:{path:l,sizeBytes:Z,sizeFormatted:ae(Z)},logs:{path:a,sizeBytes:ie,sizeFormatted:ae(ie)},totalBytes:Y,totalFormatted:ae(Y)}));return}console.log(),console.log(` ${f("\u{1F9F9} Octocode Cache Status")}`),console.log(),console.log(` ${u("Home:")} ${i}`),console.log(),console.log(` ${c("cyan","\u2022")} repos: ${ae(O)} ${u(`(${s})`)}`),console.log(` ${c("cyan","\u2022")} skills: ${ae(Z)} ${u(`(${l})`)}`),console.log(` ${c("cyan","\u2022")} logs: ${ae(ie)} ${u(`(${a})`)}`),console.log(),console.log(` ${f("Total:")} ${ae(Y)}`),console.log(),console.log(` ${u("Clean examples:")}`),console.log(` ${c("yellow","octocode cache clean --repos")}`),console.log(` ${c("yellow","octocode cache clean --tools")}`),console.log(` ${c("yellow","octocode cache clean --all")}`),console.log();return}if(n==="clean"){if(!N&&!D&&!E&&!A){let x="Missing clean target. Use --repos, --skills, --logs, --tools, or --all";o?console.log(JSON.stringify({success:!1,error:x})):(console.log(),console.log(` ${c("red","X")} ${x}`),console.log(` ${u("Example:")} octocode cache clean --all`),console.log()),process.exitCode=1;return}let O=[];N&&Zs(s)&&O.push({target:"repos",path:s,sizeBytes:Pe(s)}),D&&O.push({target:"skills",path:l,sizeBytes:Pe(l)}),E&&Zs(a)&&O.push({target:"logs",path:a,sizeBytes:Pe(a)});let Z=O.reduce((x,T)=>x+T.sizeBytes,0);if(r){if(o){console.log(JSON.stringify({dryRun:!0,plan:O.map(x=>({...x,sizeFormatted:ae(x.sizeBytes)})),totalBytes:Z,totalFormatted:ae(Z)}));return}console.log(),console.log(` ${c("yellow","DRY RUN")} \u2014 would free ${f(ae(Z))}`),console.log();for(let x of O)console.log(` ${c("cyan","\u2022")} ${x.target}: ${ae(x.sizeBytes)} ${u(x.path)}`);A&&console.log(` ${c("dim","\u25CB")} tools: in-memory only (no disk bytes to free)`),console.log(),console.log(` ${u("Remove --dry-run to apply.")}`),console.log();return}if(_&&!t&&!o&&process.stdout.isTTY&&Z>0&&!await Nt({message:`Delete ${ae(Z)} of cache? (repos + skills + logs)`,default:!1})){console.log(),console.log(` ${u("Cancelled.")}`),console.log();return}let ie=!1,Y=0;if(N&&Zs(s)&&(Y+=Pe(s),b$(s,{recursive:!0,force:!0}),ie=!0),D){let x=Pe(l);Vy();let T=Pe(l);(x>0||T===0)&&(Y+=Math.max(0,x-T),ie=!0)}if(E&&Zs(a)&&(Y+=Pe(a),b$(a,{recursive:!0,force:!0}),ie=!0),A){let x=[g?"--tools":"",v?"--local":"",$?"--lsp":"",M?"--api":""].filter(Boolean).join(", ");o||console.log(` ${c("yellow","\u2139")} ${x}: No disk caches to clean. Tool caches are in-memory and clear on MCP server restart.`)}if(o){console.log(JSON.stringify({success:!0,cleaned:ie,freedBytes:Y,freedFormatted:ae(Y),targets:O.map(x=>x.target)}));return}console.log(),ie?(console.log(` ${c("green","\u2713")} Cache cleanup complete`),console.log(` ${u("Freed:")} ${ae(Y)}`)):A||console.log(` ${c("yellow","\u26A0")} Nothing to clean`),console.log();return}console.log(),console.log(` ${c("red","\u2717")} Unknown cache subcommand: ${n}`),console.log(` ${u("Usage:")} octocode cache [status|clean] [--repos] [--skills] [--logs] [--tools|--local|--lsp|--api] [--all]`),console.log(),process.exitCode=1}};import vm from"node:path";var ym={name:"status",aliases:["s"],description:"Show full Octocode health status (auth + MCPs + cache)",usage:"octocode status [--hostname <host>] [--json]",options:[{name:"hostname",short:"H",description:"GitHub Enterprise hostname (default: github.com)",hasValue:!0},{name:"sync",description:"Include MCP sync analysis (needsSync, conflicts)"},{name:"json",short:"j",description:"Output as JSON: { auth, mcpClients, cache, sync? }"}],handler:async e=>{let n=e.options.hostname??e.options.H,o=(typeof n=="string"?n:void 0)||"github.com",r=!!(e.options.json||e.options.j),t=!!e.options.sync,i=cr(o),s=ot.map(_=>{let N=te(_),D=zt(_),E=D?Object.keys(X(N)?.mcpServers||{}):[];return{client:_,name:J[_]?.name||_,configPath:N,exists:D,serverCount:E.length,servers:E,octocodeInstalled:E.includes("octocode-mcp")}}),a=ge.home||process.env.OCTOCODE_HOME||vm.join(process.env.HOME||"",".octocode"),l=ge.repos||vm.join(a,"repos"),d=ge.logs||vm.join(a,"logs"),p=Os(),m=Pe(l),g=Pe(p),v=Pe(d),$=null;if(t){let _=Mt(),N=Dt(_);$={summary:{needsSyncCount:N.summary.needsSyncCount,conflictCount:N.summary.conflictCount,consistentMCPs:N.summary.consistentMCPs,totalUniqueMCPs:N.summary.totalUniqueMCPs},needsSync:N.needsSync.map(D=>({mcpId:D.mcpId,missingIn:D.missingIn})),conflicts:N.conflicts.map(D=>({mcpId:D.mcpId,presentIn:D.presentIn}))}}if(r){console.log(JSON.stringify({auth:i,mcpClients:s,cache:{home:a,repos:{path:l,sizeBytes:m,sizeFormatted:ae(m)},skills:{path:p,sizeBytes:g,sizeFormatted:ae(g)},logs:{path:d,sizeBytes:v,sizeFormatted:ae(v)},totalBytes:m+g+v,totalFormatted:ae(m+g+v)},...$?{sync:$}:{}})),i.authenticated||(process.exitCode=1);return}console.log(),console.log(` ${f("\u{1F7E2} Octocode Status")}`),console.log(),no(o);let M=s.filter(_=>_.exists);console.log(),console.log(` ${f("MCP Clients")} ${u(`(${M.length}/${s.length} configured)`)}`),console.log();for(let _ of s){if(!_.exists)continue;let N=_.octocodeInstalled?c("green","\u2713"):c("yellow","\u25CB");console.log(` ${N} ${f(_.name)} ${u(`${_.serverCount} MCPs ${_.configPath}`)}`)}M.length===0&&console.log(` ${u("No MCP config files found.")}`),console.log(),console.log(` ${f("Cache")} ${u(ae(m+g+v))} total`),console.log(` ${c("cyan","\u2022")} repos: ${ae(m)}`),console.log(` ${c("cyan","\u2022")} skills: ${ae(g)}`),console.log(` ${c("cyan","\u2022")} logs: ${ae(v)}`),$?(console.log(),console.log(` ${f("Sync")} ${u(`${$.summary.totalUniqueMCPs} unique MCPs`)}`),$.summary.consistentMCPs>0&&console.log(` ${c("green","\u2713")} ${$.summary.consistentMCPs} fully synced`),$.summary.needsSyncCount>0&&console.log(` ${c("yellow","\u25CB")} ${$.summary.needsSyncCount} can be auto-synced \u2014 run ${c("cyan","octocode sync")}`),$.summary.conflictCount>0&&console.log(` ${c("red","!")} ${$.summary.conflictCount} conflicts \u2014 run ${c("cyan","octocode sync --force")}`)):(console.log(),console.log(` ${u("Run")} ${c("cyan","octocode status --sync")} ${u("to include sync analysis.")}`)),console.log()}};var $m={name:"sync",aliases:["sy"],description:"Sync MCP configurations across all IDE clients",usage:"octocode sync [--force] [--dry-run] [--status]",options:[{name:"force",short:"f",description:"Auto-resolve conflicts (use first variant)"},{name:"dry-run",short:"n",description:"Show what would be synced without making changes"},{name:"status",short:"s",description:"Show sync status without syncing"},{name:"json",short:"j",description:"Output as JSON"}],handler:async e=>{let o=e.args[0]==="plan",r=!!(e.options.force||e.options.f),t=o||!!(e.options["dry-run"]||e.options.n),i=!!(e.options.status||e.options.s),s=!!(e.options.json||e.options.j);if(i){let d=s?null:new U("Scanning configurations...").start(),p=Mt(),m=Dt(p);if(d?.stop(),s){console.log(JSON.stringify({clients:m.clients.map(g=>({client:g.client,name:Se(g.client),exists:g.exists,mcpCount:g.mcpCount})),summary:m.summary}));return}console.log(),console.log(` ${f("\u{1F504} MCP Sync Status")}`),console.log(),console.log(` ${f("Clients:")} ${m.summary.clientsWithConfig} with MCP configs`),console.log();for(let g of m.clients){let v=Se(g.client),$=g.exists?c("green","\u25CF"):c("dim","\u25CB"),M=g.exists?`${g.mcpCount} MCPs`:u("no config");console.log(` ${$} ${v}: ${M}`)}if(console.log(),console.log(` ${f("MCPs:")}`),console.log(` ${c("cyan","\u2022")} ${m.summary.totalUniqueMCPs} unique MCPs`),m.summary.consistentMCPs>0&&console.log(` ${c("green","\u2713")} ${m.summary.consistentMCPs} fully synced`),m.summary.needsSyncCount>0&&console.log(` ${c("yellow","\u25CB")} ${m.summary.needsSyncCount} can be auto-synced`),m.summary.conflictCount>0){console.log(` ${c("red","!")} ${m.summary.conflictCount} have conflicts`);for(let g of m.conflicts){let v=Array.from(g.variants.keys()).map(Se).join(" vs ");console.log(` ${c("red","\u2022")} ${g.mcpId} ${u(`(${v})`)}`)}}console.log(),(m.summary.needsSyncCount>0||m.summary.conflictCount>0)&&(console.log(` ${u("Run")} ${c("cyan","octocode sync")} ${u("to synchronize.")}`),m.summary.conflictCount>0&&console.log(` ${u("Use")} ${c("cyan","--force")} ${u("to auto-resolve conflicts.")}`),console.log());return}if(t){let d=s?null:new U("Analyzing configurations...").start(),p=Mt(),m=Dt(p);d?.stop();let g=[...m.needsSync.map($=>({type:"add",mcpId:$.mcpId,presentIn:$.presentIn,missingIn:$.missingIn,hasConflict:!1})),...m.conflicts.map($=>({type:"conflict",mcpId:$.mcpId,presentIn:$.presentIn,missingIn:$.missingIn,hasConflict:!0})),...m.fullyConsistent.map($=>({type:"ok",mcpId:$.mcpId,presentIn:$.presentIn,missingIn:[],hasConflict:!1}))];if(s){console.log(JSON.stringify({dryRun:!0,operations:g,summary:m.summary}));return}console.log(),console.log(` ${f("\u{1F504} Sync Plan")} ${u(`(${g.length} MCPs across ${m.summary.clientsWithConfig} clients)`)}`),console.log();let v=g.filter($=>$.type!=="ok");for(let $ of v){let M=$.type==="conflict"?c("red","!"):c("yellow","\u25CB"),_=$.type==="conflict"?`${c("red","conflict")} \u2014 needs --force to resolve`:`add to ${$.missingIn.join(", ")}`;console.log(` ${M} ${f($.mcpId)} ${u(_)}`)}v.length===0&&console.log(` ${c("green","\u2713")} All MCPs are in sync.`),console.log(),(m.needsSync.length>0||m.conflicts.length>0)&&(console.log(` ${u("Run")} ${c("cyan","octocode sync")} ${u("to apply.")}`),m.conflicts.length>0&&console.log(` ${u("Use")} ${c("cyan","--force")} ${u("to auto-resolve conflicts.")}`),console.log());return}let a=s?null:new U("Analyzing configurations...").start(),l=await _p({force:r,dryRun:!1});if(s){console.log(JSON.stringify({success:l.success,syncPerformed:l.syncPerformed,dryRun:!1,message:l.message})),l.success||(process.exitCode=1);return}console.log(),console.log(` ${f("\u{1F504} MCP Sync")}`),console.log(),l.syncPerformed?l.success?(a?.succeed(l.message),console.log(),console.log(` ${f("Next:")} Restart your IDEs to apply changes.`)):(a?.fail(l.message),process.exitCode=1):(a?.stop(),l.success?console.log(` ${c("green","\u2713")} ${l.message}`):(console.log(` ${c("yellow","\u26A0")} ${l.message}`),!r&&l.message.includes("conflict")&&(console.log(),console.log(` ${u("Options:")}`),console.log(` ${c("cyan","\u2022")} Run ${c("cyan","octocode")} for interactive mode`),console.log(` ${c("cyan","\u2022")} Use ${c("cyan","--force")} to auto-resolve`)),process.exitCode=1)),console.log()}};var rP=[sm,am,oo,Rs,mm,gm,km,hm,ur,ym,$m];function iP(e){return rP.find(n=>n.name===e||n.aliases?.includes(e))}export{sm as a,ur as b,oo as c,Rs as d,am as e,mm as f,gm as g,hm as h,ym as i,$m as j,iP as k};
|
|
92
|
+
/*! Bundled license information:
|
|
93
|
+
|
|
94
|
+
@octokit/request-error/dist-src/index.js:
|
|
95
|
+
(* v8 ignore else -- @preserve -- Bug with vitest coverage where it sees an else branch that doesn't exist *)
|
|
96
|
+
|
|
97
|
+
@octokit/request/dist-bundle/index.js:
|
|
98
|
+
(* v8 ignore next -- @preserve *)
|
|
99
|
+
(* v8 ignore else -- @preserve *)
|
|
100
|
+
*/
|