@precisionutilityguild/liquid-shadow 1.0.0 → 1.0.1

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.
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
- var t_=Object.defineProperty;var de=(t,e)=>()=>(t&&(e=t(t=0)),e);var Ze=(t,e)=>{for(var r in e)t_(t,r,{get:e[r],enumerable:!0})};import Zx from"pino";var Hx,Wx,$,F=de(()=>{"use strict";Hx={10:"TRACE",20:"DEBUG",30:"INFO",40:"WARN",50:"ERROR",60:"FATAL"},Wx=Zx({level:process.env.LOG_LEVEL||"info",base:{service:"liquid-shadow"},formatters:{level(t,e){return{level:t,severity:Hx[e]??"INFO"}}},transport:{target:"pino-pretty",options:{colorize:!0,translateTime:"HH:MM:ss",destination:2,levelKey:"severity",messageKey:"message"}}}),$=Wx});import Or from"fs";import Hp from"path";import{fileURLToPath as Bx}from"url";function Vx(t){t.exec(`
2
+ var Qv=Object.defineProperty;var de=(t,e)=>()=>(t&&(e=t(t=0)),e);var Ue=(t,e)=>{for(var r in e)Qv(t,r,{get:e[r],enumerable:!0})};import Ux from"pino";var Fx,Zx,$,F=de(()=>{"use strict";Fx={10:"TRACE",20:"DEBUG",30:"INFO",40:"WARN",50:"ERROR",60:"FATAL"},Zx=Ux({level:process.env.LOG_LEVEL||"info",base:{service:"liquid-shadow"},formatters:{level(t,e){return{level:t,severity:Fx[e]??"INFO"}}},transport:{target:"pino-pretty",options:{colorize:!0,translateTime:"HH:MM:ss",destination:2,levelKey:"severity",messageKey:"message"}}}),$=Zx});import Dr from"fs";import Up from"path";import{fileURLToPath as Bx}from"url";function Gx(t){t.exec(`
3
3
  CREATE TABLE IF NOT EXISTS schema_migrations (
4
4
  version INTEGER PRIMARY KEY,
5
5
  name TEXT NOT NULL,
6
6
  applied_at REAL DEFAULT (unixepoch())
7
7
  );
8
- `)}function qx(t){Vx(t);let e=t.prepare("SELECT version FROM schema_migrations ORDER BY version").all();return new Set(e.map(r=>r.version))}function Kx(){let t=Gx;if(!Or.readdirSync(t).some(o=>o.match(/^\d{3}_.*\.sql$/))){let o=Hp.resolve(t,"../../data/migrations");Or.existsSync(o)&&Or.readdirSync(o).some(a=>a.match(/^\d{3}_.*\.sql$/))&&(t=o)}let i=Or.readdirSync(t).filter(o=>o.match(/^\d{3}_.*\.sql$/)).sort(),n=[];for(let o of i){let s=o.match(/^(\d{3})_(.+)\.sql$/);if(!s)continue;let a=parseInt(s[1],10),l=s[2],u=Or.readFileSync(Hp.join(t,o),"utf-8").split(/^-- DOWN$/m),d=u[0].trim(),p=u[1]?.trim();n.push({version:a,name:l,up:d,down:p})}return n}function Yx(t,e){Ar.info({version:e.version,name:e.name},"Applying migration"),t.transaction(()=>{t.exec(e.up),t.prepare("INSERT INTO schema_migrations (version, name) VALUES (?, ?)").run(e.version,e.name)})(),Ar.info({version:e.version},"Migration applied successfully")}function Th(t){let e=qx(t),i=Kx().filter(n=>!e.has(n.version));if(i.length===0){Ar.debug("No pending migrations");return}Ar.info({count:i.length},"Running pending migrations");for(let n of i)Yx(t,n);Ar.info("All migrations complete")}var Ar,Jx,Gx,Rh=de(()=>{"use strict";F();Ar=$.child({module:"migrations"}),Jx=Bx(import.meta.url),Gx=Hp.dirname(Jx)});import Xx from"better-sqlite3";import Jo from"path";import Wp from"fs";import Ph from"crypto";import Qx from"os";function Vo(t){let e=Qx.homedir(),r=Jo.join(e,".mcp-liquid-shadow"),i=Jo.join(r,"dbs");Wp.existsSync(i)||Wp.mkdirSync(i,{recursive:!0});let n=Ph.createHash("sha256").update(t).digest("hex").substring(0,12),s=`${Jo.basename(t).replace(/[^a-zA-Z0-9-_]/g,"_")}_${n}.db`;return Jo.join(i,s)}function e$(t,e){let r=e||Vo(t);pt.info({repoPath:t,dbPath:r},"Initializing database");let i=new Xx(r);return i.pragma("journal_mode = WAL"),i.pragma("busy_timeout = 5000"),Th(i),Go.set(t,r),Rt.set(r,i),pt.info({repoPath:t,dbPath:r},"Database initialized successfully"),i}function Bp(t){return Ph.createHash("sha256").update(t,"utf8").digest("hex")}function Nh(t,e){return e?Bp(t)!==e:!0}function Ae(t){let e=Go.get(t)||Vo(t),r=Rt.get(e);if(r){if(r.open)return r;Rt.delete(e)}let i=e$(t);return Rt.set(e,i),i}function je(t){let e=Vo(t);if(!Wp.existsSync(e))return!1;try{let r=Ae(t);return r.prepare(`
8
+ `)}function qx(t){Gx(t);let e=t.prepare("SELECT version FROM schema_migrations ORDER BY version").all();return new Set(e.map(r=>r.version))}function Kx(){let t=Vx;if(!Dr.readdirSync(t).some(o=>o.match(/^\d{3}_.*\.sql$/))){let o=Up.resolve(t,"../../data/migrations");Dr.existsSync(o)&&Dr.readdirSync(o).some(a=>a.match(/^\d{3}_.*\.sql$/))&&(t=o)}let i=Dr.readdirSync(t).filter(o=>o.match(/^\d{3}_.*\.sql$/)).sort(),n=[];for(let o of i){let s=o.match(/^(\d{3})_(.+)\.sql$/);if(!s)continue;let a=parseInt(s[1],10),l=s[2],u=Dr.readFileSync(Up.join(t,o),"utf-8").split(/^-- DOWN$/m),d=u[0].trim(),p=u[1]?.trim();n.push({version:a,name:l,up:d,down:p})}return n}function Yx(t,e){Or.info({version:e.version,name:e.name},"Applying migration"),t.transaction(()=>{t.exec(e.up),t.prepare("INSERT INTO schema_migrations (version, name) VALUES (?, ?)").run(e.version,e.name)})(),Or.info({version:e.version},"Migration applied successfully")}function wh(t){let e=qx(t),i=Kx().filter(n=>!e.has(n.version));if(i.length===0){Or.debug("No pending migrations");return}Or.info({count:i.length},"Running pending migrations");for(let n of i)Yx(t,n);Or.info("All migrations complete")}var Or,Jx,Vx,Ih=de(()=>{"use strict";F();Or=$.child({module:"migrations"}),Jx=Bx(import.meta.url),Vx=Up.dirname(Jx)});import Xx from"better-sqlite3";import Wo from"path";import Fp from"fs";import Th from"crypto";import Qx from"os";function Jo(t){let e=Qx.homedir(),r=Wo.join(e,".mcp-liquid-shadow"),i=Wo.join(r,"dbs");Fp.existsSync(i)||Fp.mkdirSync(i,{recursive:!0});let n=Th.createHash("sha256").update(t).digest("hex").substring(0,12),s=`${Wo.basename(t).replace(/[^a-zA-Z0-9-_]/g,"_")}_${n}.db`;return Wo.join(i,s)}function e$(t,e){let r=e||Jo(t);pt.info({repoPath:t,dbPath:r},"Initializing database");let i=new Xx(r);return i.pragma("journal_mode = WAL"),i.pragma("busy_timeout = 5000"),wh(i),Bo.set(t,r),Rt.set(r,i),pt.info({repoPath:t,dbPath:r},"Database initialized successfully"),i}function Zp(t){return Th.createHash("sha256").update(t,"utf8").digest("hex")}function Rh(t,e){return e?Zp(t)!==e:!0}function Oe(t){let e=Bo.get(t)||Jo(t),r=Rt.get(e);if(r){if(r.open)return r;Rt.delete(e)}let i=e$(t);return Rt.set(e,i),i}function Qe(t){let e=Jo(t);if(!Fp.existsSync(e))return!1;try{let r=Oe(t);return r.prepare(`
9
9
  SELECT value FROM index_metadata
10
10
  WHERE key = 'index_completed'
11
- `).get()?.value==="true"?!0:r.prepare("SELECT COUNT(*) as count FROM files").get().count>0}catch(r){return pt.debug({repoPath:t,error:r},"Error checking index status"),!1}}function Jp(t,e){let r=Ae(t);r.prepare(`
11
+ `).get()?.value==="true"?!0:r.prepare("SELECT COUNT(*) as count FROM files").get().count>0}catch(r){return pt.debug({repoPath:t,error:r},"Error checking index status"),!1}}function Hp(t,e){let r=Oe(t);r.prepare(`
12
12
  INSERT OR REPLACE INTO index_metadata (key, value, updated_at)
13
13
  VALUES ('index_completed', 'true', unixepoch())
14
14
  `).run(),r.prepare(`
@@ -17,10 +17,10 @@ var t_=Object.defineProperty;var de=(t,e)=>()=>(t&&(e=t(t=0)),e);var Ze=(t,e)=>{
17
17
  `).run(Date.now().toString()),e&&r.prepare(`
18
18
  INSERT OR REPLACE INTO index_metadata (key, value, updated_at)
19
19
  VALUES ('last_indexed_commit', ?, unixepoch())
20
- `).run(e),pt.info({repoPath:t,commitSha:e},"Repository marked as indexed")}function qo(t){try{return Ae(t).prepare(`
20
+ `).run(e),pt.info({repoPath:t,commitSha:e},"Repository marked as indexed")}function Ph(t){try{return Oe(t).prepare(`
21
21
  SELECT value FROM index_metadata
22
22
  WHERE key = 'last_indexed_commit'
23
- `).get()?.value||null}catch(e){return pt.debug({repoPath:t,error:e},"Error getting last indexed commit"),null}}function zh(t){let e=Go.get(t)||Vo(t),r=Rt.get(e);r&&(r.open&&(pt.info({repoPath:t,dbPath:e},"Closing database connection"),r.close()),Rt.delete(e)),Go.delete(t)}function Dh(){for(let[t,e]of Rt.entries())try{e.open&&(pt.info({dbPath:t},"Closing database connection"),e.close())}catch(r){pt.error({dbPath:t,err:r},"Error closing database execution")}Rt.clear()}var pt,Rt,Go,Oh,Pt=de(()=>{"use strict";F();Rh();pt=$.child({module:"db"});Rt=new Map,Go=new Map;process.on("exit",()=>Dh());Oh=t=>{pt.info({signal:t},"Received termination signal, closing databases"),Dh(),process.exit(0)};process.on("SIGINT",()=>Oh("SIGINT"));process.on("SIGTERM",()=>Oh("SIGTERM"))});var ge,et=de(()=>{"use strict";ge=class{db;constructor(e){this.db=e}get database(){return this.db}all(e,...r){return this.db.prepare(e).all(...r)}get(e,...r){return this.db.prepare(e).get(...r)}run(e,...r){return this.db.prepare(e).run(...r).changes}insert(e,...r){return this.db.prepare(e).run(...r).lastInsertRowid}transaction(e){return this.db.transaction(e)()}}});import t$ from"path";var Ko,Ah=de(()=>{"use strict";et();Ko=class extends ge{findByPath(e){return this.get("SELECT * FROM files WHERE path = ?",e)}findAll(e){let r="SELECT * FROM files ORDER BY path ASC";return e&&(r+=` LIMIT ${e}`),this.all(r)}getAllPaths(){return this.all("SELECT path FROM files").map(r=>r.path)}findInSubPath(e,r){let i=t$.resolve(e,r),n=i.endsWith("/")?i:i+"/";return this.all(`
23
+ `).get()?.value||null}catch(e){return pt.debug({repoPath:t,error:e},"Error getting last indexed commit"),null}}function Nh(t){let e=Bo.get(t)||Jo(t),r=Rt.get(e);r&&(r.open&&(pt.info({repoPath:t,dbPath:e},"Closing database connection"),r.close()),Rt.delete(e)),Bo.delete(t)}function zh(){for(let[t,e]of Rt.entries())try{e.open&&(pt.info({dbPath:t},"Closing database connection"),e.close())}catch(r){pt.error({dbPath:t,err:r},"Error closing database execution")}Rt.clear()}var pt,Rt,Bo,Dh,Kt=de(()=>{"use strict";F();Ih();pt=$.child({module:"db"});Rt=new Map,Bo=new Map;process.on("exit",()=>zh());Dh=t=>{pt.info({signal:t},"Received termination signal, closing databases"),zh(),process.exit(0)};process.on("SIGINT",()=>Dh("SIGINT"));process.on("SIGTERM",()=>Dh("SIGTERM"))});var ye,et=de(()=>{"use strict";ye=class{db;constructor(e){this.db=e}get database(){return this.db}all(e,...r){return this.db.prepare(e).all(...r)}get(e,...r){return this.db.prepare(e).get(...r)}run(e,...r){return this.db.prepare(e).run(...r).changes}insert(e,...r){return this.db.prepare(e).run(...r).lastInsertRowid}transaction(e){return this.db.transaction(e)()}}});import u$ from"path";var Vo,Hh=de(()=>{"use strict";et();Vo=class extends ye{findByPath(e){return this.get("SELECT * FROM files WHERE path = ?",e)}findAll(e){let r="SELECT * FROM files ORDER BY path ASC";return e&&(r+=` LIMIT ${e}`),this.all(r)}getAllPaths(){return this.all("SELECT path FROM files").map(r=>r.path)}findInSubPath(e,r){let i=u$.resolve(e,r),n=i.endsWith("/")?i:i+"/";return this.all(`
24
24
  SELECT * FROM files
25
25
  WHERE (path LIKE ? OR path = ?)
26
26
  ORDER BY path ASC
@@ -97,7 +97,7 @@ var t_=Object.defineProperty;var de=(t,e)=>()=>(t&&(e=t(t=0)),e);var Ze=(t,e)=>{
97
97
  summary=excluded.summary,
98
98
  embedding=excluded.embedding,
99
99
  content_hash=excluded.content_hash
100
- `);this.db.transaction(_=>{for(let g of _){let{meta:x,exports:E,imports:A,configs:I,events:R,content:k,classification:j,summary:w,embedding:P}=g;o.run(x.path),s.run(x.path),a.run(x.path),l.run(x.path),c.run(x.path);let J=k?i(k):null;if(y.run(x.path,x.mtime,Date.now(),j||"Unknown",w||"",P?JSON.stringify(P):null,J),E){let O=(M,q,oe)=>{for(let B of q){let Z=B.embedding?JSON.stringify(B.embedding):null,G=u.run(M,B.name,B.kind,B.signature,B.doc||"",B.line,B.endLine||B.line,B.classification||"Other",B.capabilities||"[]",oe,Z);B.members&&B.members.length>0&&O(M,B.members,G.lastInsertRowid)}};O(x.path,E,null)}if(A)for(let O of A){let M=n(O.module,x.path,r);d.run(x.path,O.module,O.name,M)}if(I)for(let O of I)p.run(x.path,O.key,O.value,O.kind);if(k!==void 0&&m.run(x.path,k),R)for(let O of R)f.run(x.path,O.type,O.name,O.direction,O.line,O.snippet)}})(e)}getLatestScanTime(){return this.get("SELECT MAX(last_scanned_at) as t FROM files")?.t||null}}});var Yo,Lh=de(()=>{"use strict";et();Yo=class extends ge{findByNameAndFile(e,r){return this.all("SELECT * FROM exports WHERE file_path = ? AND name = ?",r,e)}findByNameGlobal(e){return this.all("SELECT * FROM exports WHERE name = ?",e)}findAtLine(e,r){return this.get(`
100
+ `);this.db.transaction(_=>{for(let g of _){let{meta:x,exports:E,imports:A,configs:I,events:R,content:k,classification:j,summary:w,embedding:P}=g;o.run(x.path),s.run(x.path),a.run(x.path),l.run(x.path),c.run(x.path);let J=k?i(k):null;if(y.run(x.path,x.mtime,Date.now(),j||"Unknown",w||"",P?JSON.stringify(P):null,J),E){let O=(M,q,oe)=>{for(let B of q){let Z=B.embedding?JSON.stringify(B.embedding):null,V=u.run(M,B.name,B.kind,B.signature,B.doc||"",B.line,B.endLine||B.line,B.classification||"Other",B.capabilities||"[]",oe,Z);B.members&&B.members.length>0&&O(M,B.members,V.lastInsertRowid)}};O(x.path,E,null)}if(A)for(let O of A){let M=n(O.module,x.path,r);d.run(x.path,O.module,O.name,M)}if(I)for(let O of I)p.run(x.path,O.key,O.value,O.kind);if(k!==void 0&&m.run(x.path,k),R)for(let O of R)f.run(x.path,O.type,O.name,O.direction,O.line,O.snippet)}})(e)}getLatestScanTime(){return this.get("SELECT MAX(last_scanned_at) as t FROM files")?.t||null}}});var Go,Wh=de(()=>{"use strict";et();Go=class extends ye{findByNameAndFile(e,r){return this.all("SELECT * FROM exports WHERE file_path = ? AND name = ?",r,e)}findByNameGlobal(e){return this.all("SELECT * FROM exports WHERE name = ?",e)}findAtLine(e,r){return this.get(`
101
101
  SELECT * FROM exports
102
102
  WHERE file_path = ? AND start_line <= ? AND end_line >= ?
103
103
  ORDER BY (end_line - start_line) ASC -- Get innermost symbol
@@ -231,7 +231,7 @@ var t_=Object.defineProperty;var de=(t,e)=>()=>(t&&(e=t(t=0)),e);var Ze=(t,e)=>{
231
231
  OR name LIKE ?
232
232
  OR name LIKE ?
233
233
  LIMIT 10
234
- `,e,`%.${e}`,`%::${e}`)}}});var Ch,jh=de(()=>{"use strict";Ch=`
234
+ `,e,`%.${e}`,`%::${e}`)}}});var Bh,Jh=de(()=>{"use strict";Bh=`
235
235
  WITH RECURSIVE dependency_chain AS (
236
236
  -- Base case: Direct dependents of the target symbol
237
237
  -- Meaning: Files that import the file where the symbol is defined
@@ -275,7 +275,7 @@ SELECT DISTINCT
275
275
  dc.imported_symbols
276
276
  FROM dependency_chain dc
277
277
  ORDER BY dc.depth, dc.consumer_path;
278
- `});var Xo,Mh=de(()=>{"use strict";et();jh();Xo=class extends ge{findByFile(e){return this.all("SELECT * FROM imports WHERE file_path = ?",e)}findByFiles(e){if(e.length===0)return[];let r=e.map(()=>"?").join(", ");return this.all(`SELECT * FROM imports WHERE file_path IN (${r}) ORDER BY file_path`,...e)}getAllResolved(){return this.all(`
278
+ `});var qo,Vh=de(()=>{"use strict";et();Jh();qo=class extends ye{findByFile(e){return this.all("SELECT * FROM imports WHERE file_path = ?",e)}findByFiles(e){if(e.length===0)return[];let r=e.map(()=>"?").join(", ");return this.all(`SELECT * FROM imports WHERE file_path IN (${r}) ORDER BY file_path`,...e)}getAllResolved(){return this.all(`
279
279
  SELECT * FROM imports
280
280
  WHERE resolved_path IS NOT NULL AND resolved_path != ''
281
281
  `)}findDependents(e){return this.all("SELECT * FROM imports WHERE resolved_path = ?",e)}countByFile(e){return this.get("SELECT COUNT(*) as count FROM imports WHERE file_path = ?",e)?.count||0}countDependents(e){return this.get("SELECT COUNT(*) as count FROM imports WHERE resolved_path = ?",e)?.count||0}getImportsForFile(e){return this.all("SELECT module_specifier, imported_symbols, resolved_path FROM imports WHERE file_path = ?",e)}findImportSource(e,r){return this.get(`
@@ -301,7 +301,7 @@ ORDER BY dc.depth, dc.consumer_path;
301
301
  SELECT COUNT(*) as count FROM imports
302
302
  WHERE resolved_path IN (${i})
303
303
  AND (imported_symbols LIKE ? OR imported_symbols = '' OR imported_symbols = '*')
304
- `,...e,`%${r}%`)?.count||0}findImpactDependents(e,r,i){return this.all(Ch,e,r,i)}getCount(){return this.get("SELECT COUNT(*) as count FROM imports")?.count||0}}});var Qo,Uh=de(()=>{"use strict";et();Qo=class extends ge{findById(e){return this.get("SELECT * FROM missions WHERE id = ?",e)}findByIds(e){if(e.length===0)return[];let r=e.map(()=>"?").join(", ");return this.all(`SELECT * FROM missions WHERE id IN (${r})`,...e)}findActive(e){let r="SELECT * FROM missions WHERE status IN ('in-progress', 'planned', 'verifying')",i=[];return e&&(r+=" AND git_branch = ?",i.push(e)),r+=` ORDER BY
304
+ `,...e,`%${r}%`)?.count||0}findImpactDependents(e,r,i){return this.all(Bh,e,r,i)}getCount(){return this.get("SELECT COUNT(*) as count FROM imports")?.count||0}}});var Ko,Gh=de(()=>{"use strict";et();Ko=class extends ye{findById(e){return this.get("SELECT * FROM missions WHERE id = ?",e)}findByIds(e){if(e.length===0)return[];let r=e.map(()=>"?").join(", ");return this.all(`SELECT * FROM missions WHERE id IN (${r})`,...e)}findActive(e){let r="SELECT * FROM missions WHERE status IN ('in-progress', 'planned', 'verifying')",i=[];return e&&(r+=" AND git_branch = ?",i.push(e)),r+=` ORDER BY
305
305
  CASE WHEN status = 'in-progress' THEN 0 WHEN status = 'verifying' THEN 1 ELSE 2 END,
306
306
  created_at ASC`,this.all(r,...i)}findAll(e){let r="SELECT * FROM missions",i=[];return e&&(r+=" WHERE status = ?",i.push(e)),r+=` ORDER BY
307
307
  CASE WHEN status = 'in-progress' THEN 0 WHEN status = 'verifying' THEN 1 ELSE 2 END,
@@ -356,7 +356,7 @@ ORDER BY dc.depth, dc.consumer_path;
356
356
  SELECT linked_repo_path, linked_mission_id, relationship, direction
357
357
  FROM cross_repo_links
358
358
  WHERE mission_id = ?
359
- `,e)}catch{return[]}}findLastMission(){return this.get("SELECT * FROM missions ORDER BY updated_at DESC, id DESC LIMIT 1")}findActiveByPriority(){return this.get("SELECT * FROM missions WHERE status IN ('in-progress', 'active', 'verifying') ORDER BY CASE WHEN status = 'in-progress' THEN 0 ELSE 1 END, created_at ASC LIMIT 1")}}});var es,Fh=de(()=>{"use strict";et();es=class extends ge{findByMission(e,r=50){return this.all(`
359
+ `,e)}catch{return[]}}findLastMission(){return this.get("SELECT * FROM missions ORDER BY updated_at DESC, id DESC LIMIT 1")}findActiveByPriority(){return this.get("SELECT * FROM missions WHERE status IN ('in-progress', 'active', 'verifying') ORDER BY CASE WHEN status = 'in-progress' THEN 0 ELSE 1 END, created_at ASC LIMIT 1")}}});var Yo,qh=de(()=>{"use strict";et();Yo=class extends ye{findByMission(e,r=50){return this.all(`
360
360
  SELECT * FROM intent_logs
361
361
  WHERE mission_id = ?
362
362
  ORDER BY created_at DESC
@@ -394,30 +394,30 @@ ORDER BY dc.depth, dc.consumer_path;
394
394
  `,e)}importHeritage(e,r,i,n){this.run(`
395
395
  INSERT INTO intent_logs (type, content, commit_sha, created_at, confidence, mission_id)
396
396
  VALUES ('heritage', ?, ?, ?, ?, 0)
397
- `,e,r,i,n)}countByType(e){return this.get("SELECT COUNT(*) as count FROM intent_logs WHERE type = ?",e)?.count||0}}});var ts,Zh=de(()=>{"use strict";et();ts=class extends ge{findByKey(e,r=20){return this.all(`
397
+ `,e,r,i,n)}countByType(e){return this.get("SELECT COUNT(*) as count FROM intent_logs WHERE type = ?",e)?.count||0}}});var Xo,Kh=de(()=>{"use strict";et();Xo=class extends ye{findByKey(e,r=20){return this.all(`
398
398
  SELECT file_path, key, value, kind
399
399
  FROM configs
400
400
  WHERE key LIKE ? OR value LIKE ?
401
401
  LIMIT ?
402
- `,`%${e}%`,`%${e}%`,r)}findByKind(e,r=50){let i="SELECT key, value, kind, file_path FROM configs",n=[];return e&&(i+=" WHERE kind = ?",n.push(e)),i+=" LIMIT ?",n.push(r),this.all(i,...n)}findEnvValue(e){return this.get("SELECT value FROM configs WHERE key LIKE ? OR key = ? LIMIT 1",`%:env:${e}`,e)?.value}countByKind(e){return this.get("SELECT COUNT(*) as count FROM configs WHERE kind = ?",e)?.count||0}getAll(){return this.all("SELECT key, value, kind, file_path FROM configs")}}});var ns,Hh=de(()=>{"use strict";et();ns=class extends ge{search(e,r=10){return this.all(`
402
+ `,`%${e}%`,`%${e}%`,r)}findByKind(e,r=50){let i="SELECT key, value, kind, file_path FROM configs",n=[];return e&&(i+=" WHERE kind = ?",n.push(e)),i+=" LIMIT ?",n.push(r),this.all(i,...n)}findEnvValue(e){return this.get("SELECT value FROM configs WHERE key LIKE ? OR key = ? LIMIT 1",`%:env:${e}`,e)?.value}countByKind(e){return this.get("SELECT COUNT(*) as count FROM configs WHERE kind = ?",e)?.count||0}getAll(){return this.all("SELECT key, value, kind, file_path FROM configs")}}});var Qo,Yh=de(()=>{"use strict";et();Qo=class extends ye{search(e,r=10){return this.all(`
403
403
  SELECT file_path, snippet(content_fts, 1, '<b>', '</b>', '...', 20) as snippet
404
404
  FROM content_fts
405
405
  WHERE content_fts MATCH ?
406
406
  LIMIT ?
407
- `,e,r)}}});var Wh,rs,Bh=de(()=>{"use strict";et();Wh=500,rs=class extends ge{record(e,r,i=null){this.run("INSERT INTO search_history (query, mode, branch) VALUES (?, ?, ?)",e,r,i),this.pruneIfNeeded()}findRecent(e=20){return this.all("SELECT id, query, mode, branch, created_at FROM search_history ORDER BY created_at DESC LIMIT ?",e)}findRecentByQueryPrefix(e,r=10){return e.trim()?this.all(`SELECT id, query, mode, branch, created_at FROM search_history
408
- WHERE query LIKE ? ORDER BY created_at DESC LIMIT ?`,`${e}%`,r):this.findRecent(r)}pruneIfNeeded(){(this.get("SELECT COUNT(*) as count FROM search_history")?.count??0)<=Wh||this.run(`DELETE FROM search_history WHERE id NOT IN (
407
+ `,e,r)}}});var Xh,es,Qh=de(()=>{"use strict";et();Xh=500,es=class extends ye{record(e,r,i=null){this.run("INSERT INTO search_history (query, mode, branch) VALUES (?, ?, ?)",e,r,i),this.pruneIfNeeded()}findRecent(e=20){return this.all("SELECT id, query, mode, branch, created_at FROM search_history ORDER BY created_at DESC LIMIT ?",e)}findRecentByQueryPrefix(e,r=10){return e.trim()?this.all(`SELECT id, query, mode, branch, created_at FROM search_history
408
+ WHERE query LIKE ? ORDER BY created_at DESC LIMIT ?`,`${e}%`,r):this.findRecent(r)}pruneIfNeeded(){(this.get("SELECT COUNT(*) as count FROM search_history")?.count??0)<=Xh||this.run(`DELETE FROM search_history WHERE id NOT IN (
409
409
  SELECT id FROM search_history ORDER BY created_at DESC LIMIT ?
410
- )`,Wh)}}});var is,Jh=de(()=>{"use strict";et();is=class extends ge{getSection(e){return this.get("SELECT section, data, updated_at FROM hologram_snapshot WHERE section = ?",e)}getAllSections(){return this.all("SELECT section, data, updated_at FROM hologram_snapshot ORDER BY section")}upsertSection(e,r){this.run(`
410
+ )`,Xh)}}});var ts,eg=de(()=>{"use strict";et();ts=class extends ye{getSection(e){return this.get("SELECT section, data, updated_at FROM hologram_snapshot WHERE section = ?",e)}getAllSections(){return this.all("SELECT section, data, updated_at FROM hologram_snapshot ORDER BY section")}upsertSection(e,r){this.run(`
411
411
  INSERT INTO hologram_snapshot (section, data, updated_at)
412
412
  VALUES (?, ?, unixepoch())
413
413
  ON CONFLICT(section) DO UPDATE SET
414
414
  data = excluded.data,
415
415
  updated_at = excluded.updated_at
416
- `,e,r)}deleteSection(e){this.run("DELETE FROM hologram_snapshot WHERE section = ?",e)}deleteAll(){this.run("DELETE FROM hologram_snapshot")}hasSection(e){return(this.get("SELECT COUNT(*) as count FROM hologram_snapshot WHERE section = ?",e)?.count??0)>0}}});var L,X=de(()=>{"use strict";Pt();Ah();Lh();Mh();Uh();Fh();Zh();Hh();Bh();Jh();L=class{static repositoryCache=new Map;static getInstance(e){let r=this.repositoryCache.get(e);if(r){let o=Ae(e),s=r.files?.database,a=!r.intentLogs||!r.searchHistory||!r.missions||!r.hologram;if(s===o&&o.open&&!a)return r;this.repositoryCache.delete(e)}let i=Ae(e),n={files:new Ko(i),exports:new Yo(i),imports:new Xo(i),missions:new Qo(i),intentLogs:new es(i),configs:new ts(i),content:new ns(i),searchHistory:new rs(i),hologram:new is(i)};return this.repositoryCache.set(e,n),n}static closeInstance(e){this.repositoryCache.delete(e),zh(e)}static clearCache(e){this.repositoryCache.delete(e)}}});var ys,vs,Fg,_s,Zg,Hg,Wg,Bg,Jg,Gg,Vg,qg,Kg,Yg,Jr,bs,Xg,Qg,fd=de(()=>{"use strict";ys=[/\/pages\/(?!_)[^/]+\.(tsx?|jsx?)$/i,/\/pages\/.*\/index\.(tsx?|jsx?)$/i,/\/app\/.*\/page\.(tsx?|jsx?)$/i,/\/app\/.*\/layout\.(tsx?|jsx?)$/i,/\/app\/api\/.*\/route\.(ts|js)$/i,/\/pages\/api\/.*\.(ts|js)$/i],vs=[/\.(routes?|router|controller|handler|endpoint|api)\.(ts|js|tsx|jsx)$/i,/\/routes?\//i,/\/controllers?\//i,/index\.(ts|js|tsx|jsx)$/i],Fg=[/\/components?\/.*\.(tsx|jsx)$/i,/\/features?\/.*\.(tsx|jsx)$/i,/\/views?\/.*\.(tsx|jsx)$/i,/\/screens?\/.*\.(tsx|jsx)$/i,/\/widgets?\/.*\.(tsx|jsx)$/i],_s=[/\.(service|usecase|interactor|manager|facade)\.(ts|js)$/i,/\/services?\//i,/\/usecases?\//i,/\/domain\//i,/\/business\//i],Zg=[/\/mcp\/handlers?\/[^/]+\.(ts|js)$/i,/\/mcp\/tools?\/[^/]+\.(ts|js)$/i,/\/mcp\/server\.(ts|js)$/i,/\/mcp\/index\.(ts|js)$/i],Hg=[/\/mcp\/utils?\.(ts|js)$/i,/\/mcp\/schemas?\.(ts|js)$/i,/\/mcp\/resources?\.(ts|js)$/i],Wg=[/\/commands?\/[^/]+\.(ts|js|py|php)$/i,/\/cli\/[^/]+\.(ts|js|py|php)$/i,/\/bin\/[^/]+\.(ts|js|py|php)$/i,/cli\.(ts|js|py|php)$/i,/main\.(ts|js|py|php)$/i],Bg=[/\/parser\/[^/]+\.(ts|js)$/i,/\/ast\/[^/]+\.(ts|js)$/i,/\.(parser|visitor|walker|transformer)\.(ts|js)$/i],Jg=[/\/core\/[^/]+\.(ts|js)$/i,/\/engine\/[^/]+\.(ts|js)$/i,/\/processing\/[^/]+\.(ts|js)$/i,/\/analysis\/[^/]+\.(ts|js)$/i,/\.(analyzer|processor|scanner|indexer|resolver)\.(ts|js)$/i],Gg=[/\/ui\/[^/]+\.(ts|js|tsx|jsx)$/i,/\/display\/[^/]+\.(ts|js)$/i,/\/output\/[^/]+\.(ts|js)$/i,/\.(formatter|renderer|printer)\.(ts|js)$/i],Vg=[/\/stores?\//i,/\/slices?\//i,/\/reducers?\//i,/\/atoms?\//i,/\/selectors?\//i,/\.(store|slice|reducer|atom|selector)\.(ts|js)$/i,/.*Slice\.(ts|js)$/i,/.*Store\.(ts|js)$/i],qg=[/\/hooks?\//i,/\/contexts?\//i,/\/providers?\//i,/use[A-Z].*\.(ts|js)$/,/.*Context\.(ts|tsx|js|jsx)$/i,/.*Provider\.(ts|tsx|js|jsx)$/i],Kg=[/\/schemas?\//i,/\/validations?\//i,/\.(schema|validation|validator)\.(ts|js)$/i],Yg=[/\.(types?|dto|interface|interfaces)\.(ts|js)$/i,/types\.ts$/i,/\/types?\//i,/\/dtos?\//i,/\/interfaces?\//i,/\/contracts?\//i,/\.d\.ts$/i],Jr=[/\.(model|entity|schema|repository|repo|dao|migration|query|mutation|resolver|connection|db)\.(ts|js)$/i,/queries\.(ts|js)$/i,/mutations\.(ts|js)$/i,/resolvers\.(ts|js)$/i,/connection\.(ts|js)$/i,/\/models?\//i,/\/entities?\//i,/\/repositories?\//i,/\/repos?\//i,/\/data\//i,/\/database\//i,/\/prisma\//i,/\/drizzle\//i,/\/api\/.*client\.(ts|js|tsx)$/i,/(^|\/)[A-Z0-9_-]*API\.(tsx?|js|jsx)$/],bs=[/\.(util|utils|helper|helpers|lib|common|shared)\.(ts|js)$/i,/\/utils?\//i,/\/helpers?\//i,/\/lib\//i,/\/common\//i,/\/shared\//i],Xg=["express","fastify","koa","hapi","restify","next","nuxt","gatsby","remix","@nestjs/common","@nestjs/core","react-router","vue-router","@angular/router","zod","joi","yup","valibot","superstruct"],Qg=["prisma","@prisma/client","typeorm","sequelize","mongoose","drizzle-orm","knex","pg","mysql","sqlite","better-sqlite3","mongodb","redis","ioredis","zustand","redux","recoil","jotai","mobx"]});var xs,ty,$s,ny,hd=de(()=>{"use strict";xs=[/urls\.py$/i,/wsgi\.py$/i,/asgi\.py$/i,/manage\.py$/i,/main\.py$/i,/app\.py$/i,/\/endpoints?\/.*\.py$/i,/\/commands?\/.*\.py$/i],ty=[/views\.py$/i,/forms\.py$/i,/serializers\.py$/i,/admin\.py$/i,/apps\.py$/i,/tasks\.py$/i,/middlewares?\.py$/i,/signals?\.py$/i,/context_processors\.py$/i],$s=[/models\.py$/i,/\/models\/.*\.py$/i,/\/migrations\/.*\.py$/i,/schema\.py$/i,/documents\.py$/i],ny=["django.urls","django.http","flask","fastapi","chalice","tornado"]});var Ss,iy,ks,oy,gd=de(()=>{"use strict";Ss=[/\/routes?\/.*\.php$/i,/\/controllers?\/.*\.php$/i,/index\.php$/i,/server\.php$/i,/artisan$/i,/console$/i],iy=[/\/services?\/.*\.php$/i,/\/providers?\/.*\.php$/i,/\/middleware\/.*\.php$/i,/\/jobs?\/.*\.php$/i,/\/listeners?\/.*\.php$/i,/\/events?\/.*\.php$/i,/\/observers?\/.*\.php$/i,/\/console\/commands\/.*\.php$/i,/\/actions?\/.*\.php$/i,/\/traits?\/.*\.php$/i,/\/concerns?\/.*\.php$/i,/\/contracts?\/.*\.php$/i],ks=[/\/models?\/.*\.php$/i,/\/eloquent\/.*\.php$/i,/\/migrations?\/.*\.php$/i,/\/seeders?\/.*\.php$/i,/\/factories?\/.*\.php$/i,/\/repositories?\/.*\.php$/i,/\/resources?\/.*\.php$/i],oy=["laravel","symfony","slim","cakephp","codeigniter"]});import ay from"path";function Gr(t,e,r){let i=[],n="Unknown",o=0;r||(r=q$(t,e));let{inDegree:s,outDegree:a}=r,l=(p,m,f,y)=>{for(let b of p)if(b.test(t))return i.push(`${y}: ${b.source}`),n=m,o+=f,!0;return!1},c=!1;if(c||(c=l(ys,"Entry",45,"Next.js entry")),c||(c=l(Zg,"Entry",40,"MCP handler")),c||(c=l(Wg,"Entry",40,"CLI command")),c||(c=l(Jr,"Data",45,"Data layer/Repository")),c||(c=l(Vg,"Data",35,"State management")),c||(c=l(Fg,"Logic",40,"React component")),c||(c=l(_s,"Logic",35,"Logic pattern")),c||(c=l(Bg,"Logic",35,"Parser/AST")),c||(c=l(Jg,"Logic",35,"Core module")),c||(c=l(Gg,"Logic",30,"UI layer")),c||(c=l(Yg,"Types",35,"Type definition")),c||(c=l(xs,"Entry",40,"Python Entry")),c||(c=l($s,"Data",40,"Python Data")),c||(c=l(ty,"Logic",35,"Python Logic")),c||(c=l(Ss,"Entry",40,"PHP Entry")),c||(c=l(ks,"Data",40,"PHP Data")),c||(c=l(iy,"Logic",35,"PHP Logic")),c||(c=l(qg,"Logic",35,"Hook/Context")),!c){for(let p of Hg)if(p.test(t)){i.push(`MCP utility: ${p.source}`),/schemas?/i.test(t)?n="Types":/resources?/i.test(t)?n="Data":n="Utility",o+=35,c=!0;break}}c||l(Kg,"Data",35,"Schema definition")&&(c=!0),c||(l(Jr,"Data",30,"Path matches data pattern")||l(bs,"Utility",25,"Path matches utility pattern")||l(vs,"Entry",30,"Path matches entry pattern"))&&(c=!0);for(let p of yd)if(p.test(t)){i.push(`Test file: ${p.source}`),n="Test",o=50,c=!0;break}c||l(vd,"Infrastructure",40,"Infrastructure")&&(c=!0);for(let p of V$)p.test(t)&&(i.push(`Monorepo component: ${p.source}`),/\/apps\/[^/]+\/src\/pages\//i.test(t)&&(i.push("Monorepo App Entry"),n==="Unknown"&&(n="Entry"),o+=20),/\/packages\/[^/]+\/src\//i.test(t)&&(o+=10));let d=e.imports.getImportsForFile(t).map(p=>p.module_specifier.toLowerCase());for(let p of Qg)if(d.some(m=>m.includes(p))){i.push(`Imports JS data library: ${p}`),(n==="Unknown"||n==="Data")&&(n="Data",o+=25);break}for(let p of ny)if(d.some(m=>m.includes(p))){i.push(`Imports Python framework: ${p}`),(n==="Unknown"||n==="Entry")&&(n="Entry",o+=20);break}for(let p of oy)if(d.some(m=>m.includes(p))){i.push(`Imports PHP framework: ${p}`),(n==="Unknown"||n==="Entry")&&(n="Entry",o+=20);break}for(let p of Xg)if(d.some(m=>m.includes(p))){i.push(`Imports JS framework: ${p}`),(n==="Unknown"||n==="Entry")&&(n="Entry",o+=20);break}if(s===0&&a>0&&(i.push("Entry point: nothing imports this file (in-degree=0)"),n==="Unknown"?(n="Entry",o+=30):n==="Entry"&&(o+=15)),s>5&&a<=2&&(i.push(`High reuse: ${s} files import this (candidate for Utility)`),n==="Unknown"?(n="Utility",o+=25):n==="Utility"&&(o+=10)),n==="Unknown"&&s>0&&a>0){let p=s/(s+a);p>.3&&p<.7&&(i.push(`Balanced traffic: in=${s}, out=${a} (likely Logic layer)`),n="Logic",o+=25)}return n==="Unknown"&&(i.push("No strong classification signals detected"),o=10),o=Math.min(o,100),{layer:n,confidence:o,signals:i}}function q$(t,e){let r=e.imports.countDependents(t),i=e.imports.countByFile(t);return{inDegree:r,outDegree:i}}function nt(t,e){let r=t.files.getAllPaths().map(f=>({path:f})),i=new Map,n={Entry:[],Logic:[],Data:[],Utility:[],Infrastructure:[],Test:[],Types:[],Unknown:[]};for(let f of r){let y=Gr(f.path,t);i.set(f.path,y),n[y.layer].push({path:f.path,classification:y})}let o={Entry:At(n.Entry,e),Logic:At(n.Logic,e),Data:At(n.Data,e),Utility:At(n.Utility,e),Infrastructure:At(n.Infrastructure,e),Test:At(n.Test,e),Types:At(n.Types,e),Unknown:At(n.Unknown,e)},s={};r.forEach(f=>{let y=ay.extname(f.path).toLowerCase();y&&(s[y]=(s[y]||0)+1)});let a={".ts":"TypeScript",".tsx":"Typescript (React)",".js":"JavaScript",".jsx":"JavaScript (React)",".py":"Python",".php":"PHP",".go":"Go",".rs":"Rust",".java":"Java",".cs":"C#",".rb":"Ruby",".vue":"Vue"},l={};Object.entries(s).forEach(([f,y])=>{let b=a[f];b&&(l[b]=(l[b]||0)+y)});let c=Object.entries(l).sort((f,y)=>y[1]-f[1]),u=c.length>0?c[0][0]:"Unknown",{pattern:d,patternConfidence:p,insights:m}=K$(o,r.length,t);return{pattern:d,patternConfidence:p,layers:o,insights:m,primaryStack:u}}function At(t,e){return t.sort((r,i)=>i.classification.confidence-r.classification.confidence),{count:t.length,topFiles:t.slice(0,5).map(r=>({path:ay.relative(e,r.path),confidence:r.classification.confidence,signals:r.classification.signals.slice(0,2)}))}}function K$(t,e,r){let i=[],n="Unknown",o=0,s=t.Entry.count/e*100,a=t.Logic.count/e*100,l=t.Data.count/e*100,c=t.Utility.count/e*100,u=t.Unknown.count/e*100;s>5&&a>10&&l>5&&u<40?(n="Layered",o=60+Math.min(30,(100-u)/3),i.push(`Clear layer separation: Entry (${s.toFixed(1)}%), Logic (${a.toFixed(1)}%), Data (${l.toFixed(1)}%)`)):c>20?(n="Modular",o=50+c/2,i.push(`High shared module usage: ${c.toFixed(1)}% utility files`)):u>60&&(n="Monolithic",o=40+u/4,i.push(`Limited architectural structure: ${u.toFixed(1)}% files with unclear layer assignment`));let d=r.configs.countByKind("Service");return d>3&&(n="Microservices",o=55+d*5,i.push(`Detected ${d} service definitions (likely microservices)`)),t.Entry.count===0&&i.push("\u26A0\uFE0F No clear entry points detected - consider adding route/controller files"),t.Data.count===0&&i.push("\u26A0\uFE0F No data layer detected - repository may not use traditional ORM patterns"),c>30&&i.push(`High utility concentration (${c.toFixed(1)}%) - good reusability`),{pattern:n,patternConfidence:Math.min(100,o),insights:i}}var yd,vd,V$,Lt=de(()=>{"use strict";fd();hd();gd();yd=[/\.(test|spec)\.(ts|tsx|js|jsx)$/i,/tests?\.py$/i,/\/__tests__\//i,/\/tests?\//i,/\.e2e\.(ts|js)$/i,/\.integration\.(ts|js)$/i],vd=[/Dockerfile/i,/docker-compose/i,/\.ya?ml$/i,/nginx\.conf/i,/\/infra\//i,/\/deploy\//i,/\/k8s\//i,/\/kubernetes\//i,/\/terraform\//i,/\/ansible\//i,/package\.json/i,/tsconfig.*\.json/i,/\.env/i],V$=[/\/apps\/[^/]+\//i,/\/services\/[^/]+\//i,/\/packages\/[^/]+\//i,/\/backends\/[^/]+\//i,/\/backends_python\/[^/]+\//i]});var cy={};Ze(cy,{HologramService:()=>ae});var Ve,ae,Fe=de(()=>{"use strict";X();Lt();F();Ve=$.child({module:"hologram"}),ae=class{repos;repoPath;constructor(e){this.repoPath=e,this.repos=L.getInstance(e)}updateTopography(e){Ve.debug({repoPath:this.repoPath},"Updating topography snapshot");let r=Object.values(e.layers).reduce((o,s)=>o+s.count,0),i={};for(let[o,s]of Object.entries(e.layers)){let a=r>0?s.count/r*100:0;i[o]={count:s.count,percentage:Math.round(a*10)/10,topFiles:s.topFiles.slice(0,3).map(l=>({path:l.path,confidence:l.confidence}))}}let n={pattern:e.pattern,patternConfidence:e.patternConfidence,layerDistribution:i,insights:e.insights,updatedAt:Date.now()};this.repos.hologram.upsertSection("topography",JSON.stringify(n)),Ve.info({repoPath:this.repoPath},"Topography snapshot updated")}updateGravityZones(e){Ve.debug({repoPath:this.repoPath,count:e.length},"Updating gravity zones");let r={hotspots:e.slice(0,10),updatedAt:Date.now()};this.repos.hologram.upsertSection("gravity",JSON.stringify(r)),Ve.info({repoPath:this.repoPath},"Gravity zones updated")}updateGhostBridges(e){Ve.debug({repoPath:this.repoPath,count:e.length},"Updating ghost bridges");let r={bridges:e.slice(0,20),updatedAt:Date.now()};this.repos.hologram.upsertSection("ghosts",JSON.stringify(r)),Ve.info({repoPath:this.repoPath},"Ghost bridges updated")}getSnapshot(){let e=this.repos.hologram.getAllSections(),r={metadata:{repoPath:this.repoPath,lastUpdated:Date.now(),version:"1.0.0"}};for(let i of e)try{let n=JSON.parse(i.data);switch(i.section){case"topography":r.topography=n;break;case"gravity":r.gravity=n;break;case"ghosts":r.ghosts=n;break}}catch(n){Ve.error({repoPath:this.repoPath,section:i.section,error:n},"Failed to parse hologram section")}return r}getSection(e){let r=this.repos.hologram.getSection(e);if(!r)return null;try{return JSON.parse(r.data)}catch(i){return Ve.error({repoPath:this.repoPath,section:e,error:i},"Failed to parse section"),null}}computeGravityZones(){Ve.debug({repoPath:this.repoPath},"Computing gravity zones from import graph");let e=this.repos.files.getAllPaths(),r=new Map;for(let n of e){let o=Gr(n,this.repos);if(o.layer==="Test"||o.layer==="Unknown")continue;let s=this.repos.exports.findByFile(n);if(s.length===0)continue;let a=this.repos.imports.countDependents(n),l=this.repos.imports.countByFile(n),c=a*2+l;if(c>0){let u=s.find(p=>p.kind!=="TsTypeAliasDeclaration"&&p.kind!=="TsInterfaceDeclaration")||s[0],d=`${n}::${u.name}`;r.set(d,{symbol:u.name,filePath:n,inDegree:a,outDegree:l,gravity:c})}}let i=Array.from(r.values()).sort((n,o)=>o.gravity-n.gravity).slice(0,20);return Ve.info({repoPath:this.repoPath,count:i.length},"Gravity zones computed"),i}isInitialized(){return this.repos.hologram.getAllSections().length>0}clear(){this.repos.hologram.deleteAll(),Ve.info({repoPath:this.repoPath},"Hologram cleared")}}});var Ty={};Ze(Ty,{GraphExporterService:()=>xd});var Iy,xd,Ry=de(()=>{"use strict";X();F();Iy=$.child({module:"graph-exporter"}),xd=class{constructor(e){this.repoPath=e;this.repos=L.getInstance(e)}repos;async generateGraph(e={}){let{includeCompleted:r=!0,format:i="mermaid",focusMissionId:n,depth:o=10,limit:s=100}=e;Iy.info({focusMissionId:n,depth:o,format:i,includeCompleted:r},"Generating mission graph");let a=this.buildMissionTree(n,r,o,s);return i==="json"?JSON.stringify(a,null,2):this.generateMermaidDiagram(a)}buildMissionTree(e,r,i,n){let o;if(e){let l=this.repos.missions.findById(e);o=l?[l]:[]}else o=this.repos.missions.findAll().filter(c=>!c.parent_id),r||(o=o.filter(c=>c.status!=="completed"));let s=0,a=[];for(let l of o){if(s>=n)break;let c=this.buildNode(l,r,i,1,{count:s,max:n});c&&(a.push(c),s+=this.countNodes(c))}return a}buildNode(e,r,i,n,o){if(n>i||o.count>=o.max)return null;let s;if(e.strategy_graph)try{let u=JSON.parse(e.strategy_graph);s=this.parseStrategySteps(u)}catch(u){Iy.debug({missionId:e.id,err:u},"Failed to parse strategy graph")}let a={id:e.id,name:e.name,status:e.status,goal:e.goal,branch:e.git_branch||void 0,children:[],steps:s},l=this.repos.missions.findByParentId(e.id),c=r?l:l.filter(u=>u.status!=="completed");for(let u of c){if(o.count>=o.max)break;let d=this.buildNode(u,r,i,n+1,o);d&&(a.children.push(d),o.count++)}return a}parseStrategySteps(e){let r=[];return Array.isArray(e)?e.map((i,n)=>({id:i.id||`step-${n}`,description:i.description||i.content||i.name||`Step ${n+1}`,status:i.status,dependencies:i.dependencies||i.deps})):e.steps&&Array.isArray(e.steps)?this.parseStrategySteps(e.steps):typeof e=="object"?Object.entries(e).map(([i,n])=>({id:i,description:n.description||n.content||i,status:n.status,dependencies:n.dependencies||n.deps})):r}countNodes(e){let r=1;for(let i of e.children)r+=this.countNodes(i);return r}generateMermaidDiagram(e){let r=["graph TD"];for(let i of e)this.addMermaidNode(i,r);return r.join(`
417
- `)}addMermaidNode(e,r,i){let n=`M${e.id}`,o=this.getStatusIcon(e.status),s=this.getStatusClass(e.status),a=`${o} ${e.name}`;if(r.push(` ${n}["${this.escapeMermaid(a)}"]:::${s}`),i&&r.push(` ${i} --> ${n}`),e.steps&&e.steps.length>0&&e.steps.length<=10)for(let l of e.steps){let c=`S${e.id}_${l.id}`,u=l.status||"pending",d=this.getStatusIcon(u),p=this.getStatusClass(u),m=`${d} ${l.description}`;if(r.push(` ${c}["${this.escapeMermaid(m)}"]:::${p}`),r.push(` ${n} -.-> ${c}`),l.dependencies&&l.dependencies.length>0)for(let f of l.dependencies){let y=`S${e.id}_${f}`;r.push(` ${y} --> ${c}`)}}for(let l of e.children)this.addMermaidNode(l,r,n);i||(r.push(""),r.push(" classDef completed fill:#90EE90,stroke:#2E8B57,stroke-width:2px"),r.push(" classDef inProgress fill:#87CEEB,stroke:#4682B4,stroke-width:2px"),r.push(" classDef planned fill:#FFE4B5,stroke:#DAA520,stroke-width:2px"),r.push(" classDef suspended fill:#D3D3D3,stroke:#808080,stroke-width:2px"),r.push(" classDef failed fill:#FFB6C1,stroke:#DC143C,stroke-width:2px"),r.push(" classDef pending fill:#FFF8DC,stroke:#B8860B,stroke-width:1px"))}getStatusIcon(e){return{completed:"\u2713","in-progress":"\u26A1",planned:"\u{1F4CB}",suspended:"\u23F8",failed:"\u2717",pending:"\u25CB",verifying:"\u{1F50D}"}[e]||"\u25CB"}getStatusClass(e){return{completed:"completed","in-progress":"inProgress",planned:"planned",suspended:"suspended",failed:"failed",pending:"pending",verifying:"inProgress"}[e]||"pending"}escapeMermaid(e){return e.replace(/"/g,"#quot;").replace(/\n/g," ").replace(/\[/g,"#91;").replace(/]/g,"#93;").slice(0,100)}}});import{Server as qS}from"@modelcontextprotocol/sdk/server/index.js";import{StdioServerTransport as KS}from"@modelcontextprotocol/sdk/server/stdio.js";import{CallToolRequestSchema as YS,ListToolsRequestSchema as XS,ListResourcesRequestSchema as QS,ReadResourceRequestSchema as ek}from"@modelcontextprotocol/sdk/types.js";var Od=[{name:"shadow_recon_onboard",description:"Initial onboarding for a repository. Indexes all files, extracts symbols, and detects services.",inputSchema:{type:"object",properties:{repoPath:{type:"string",description:"Absolute path to the repository root"}},required:["repoPath"]}},{name:"shadow_recon_topography",description:"Analyze architectural layers (Entry/Logic/Data/Utility). Returns layer breakdown and architectural insights.",inputSchema:{type:"object",properties:{repoPath:{type:"string",description:"Absolute path to the repository root"}},required:["repoPath"]}},{name:"shadow_recon_scout",description:"(Expert) Detect architectural drift, pattern violations, and gravity anomalies.",inputSchema:{type:"object",properties:{repoPath:{type:"string",description:"Absolute path to the repository root"}},required:["repoPath"]}},{name:"shadow_recon_tree",description:"Generate hierarchical file tree with file classifications and export summaries.",inputSchema:{type:"object",properties:{repoPath:{type:"string",description:"Absolute path to the repository root"},subPath:{type:"string",description:"Relative path to focus tree on a specific subdirectory"},maxDepth:{type:"number",description:"Maximum directory depth to traverse"}},required:["repoPath"]}},{name:"shadow_recon_hologram",description:"Get the project hologram (persistent architectural snapshot) and gravity zones.",inputSchema:{type:"object",properties:{repoPath:{type:"string",description:"Absolute path to the repository root"}},required:["repoPath"]}},{name:"shadow_search_concept",description:"Semantic/Vector-based intent search across file purpose and logic.",inputSchema:{type:"object",properties:{repoPath:{type:"string",description:"Absolute path to the repository"},query:{type:"string",description:"Search term or semantic intent"},limit:{type:"number",description:"Max results (default 10)"},offset:{type:"number",description:"Pagination offset"},skipSync:{type:"boolean",description:"Skip index sync before search"},compact:{type:"boolean",description:"Return compact output (no snippets)"},fileType:{type:"string",description:"Filter by extension(s)"},layer:{type:"string",enum:["Solid","Liquid","Virtual","Intel","Phantom"]},includeTests:{type:"boolean",description:"Include test files (Virtual)"}},required:["repoPath","query"]}},{name:"shadow_search_symbol",description:"Exact and fuzzy code symbol matching (classes, functions, methods).",inputSchema:{type:"object",properties:{repoPath:{type:"string",description:"Absolute path to the repository"},query:{type:"string",description:"Symbol name or partial name"},limit:{type:"number",description:"Max results"},offset:{type:"number",description:"Pagination offset"},skipSync:{type:"boolean",description:"Skip index sync"},fileType:{type:"string",description:"Filter by extension(s)"}},required:["repoPath","query"]}},{name:"shadow_search_config",description:"Environment and configuration discovery (ENV, Ports, Docker, YAML).",inputSchema:{type:"object",properties:{repoPath:{type:"string",description:"Absolute path to the repository"},query:{type:"string",description:"Search term for values/keys"},key:{type:"string",description:"Specific config key match"},kind:{type:"string",enum:["Service","Image","Port","Env"]},limit:{type:"number"}},required:["repoPath"]}},{name:"shadow_search_path",description:"Filename-keyword resolution using the search index.",inputSchema:{type:"object",properties:{repoPath:{type:"string",description:"Absolute path to the repository"},query:{type:"string",description:"Filename part or path keyword"},limit:{type:"number"}},required:["repoPath","query"]}},{name:"shadow_analyze_impact",description:"Calculate blast radius and Strategic Risk Scoring of changing a symbol.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},symbolName:{type:"string",description:"Symbol to analyze"},filePath:{type:"string",description:"Specific file where symbol is defined"},depth:{type:"number",description:"Traversal depth (default 3)"}},required:["repoPath","symbolName"]}},{name:"shadow_analyze_flow",description:"Execution call-chain tracing (AST-based) for a specific function/method.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},filePath:{type:"string",description:"File to start trace from"},symbolName:{type:"string",description:"Function/method name"}},required:["repoPath","filePath"]}},{name:"shadow_analyze_deps",description:"Direct file import/export mapping and dependency graph inspection.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},filePath:{type:"string"},direction:{type:"string",enum:["imports","imported_by"]}},required:["repoPath","filePath","direction"]}},{name:"shadow_analyze_debt",description:"Recursive dead-code detection and circular import identification.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},mode:{type:"string",enum:["dead-code","circular-deps"]},limit:{type:"number"},includeTests:{type:"boolean"}},required:["repoPath","mode"]}}];var Ad=[{name:"shadow_ops_plan",description:"Create a new development mission or strategic initiative with goals and strategy.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},name:{type:"string",description:"Mission name"},goal:{type:"string",description:"Objective and success criteria"},strategy:{type:"string",description:"JSON strategy (steps DAG)"},parentId:{type:"number",description:"ID of parent mission"},outcomeContract:{type:"string",description:"Success verification contract"},templateId:{type:"string",enum:["refactoring","feature","bug-fix"]},templateVars:{type:"object",description:"Template variables"}},required:["repoPath"]}},{name:"shadow_ops_track",description:"Update mission step status, record progress, and track completion.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},missionId:{type:"number"},stepId:{type:"string"},status:{type:"string",enum:["pending","in-progress","completed","failed","skipped"]},contextPivot:{type:"string",description:"Rationale for status change"},updates:{type:"array",items:{type:"object",properties:{stepId:{type:"string"},status:{type:"string"},contextPivot:{type:"string"}}}}},required:["repoPath","missionId"]}},{name:"shadow_ops_log",description:"Record architectural decisions, discoveries, or blockers to the intent log.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},missionId:{type:"number"},type:{type:"string",enum:["decision","blocker","discovery","fix"]},content:{type:"string"},symbolName:{type:"string",description:"Symbol related to this intent"}},required:["repoPath","missionId","type","content"]}},{name:"shadow_ops_briefing",description:"Active situational awareness - Get details on missions, decisions, and next steps.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},missionId:{type:"number",description:"Optional specific mission ID"},scope:{type:"string",enum:["mission","project"]},includeGroupedByParent:{type:"boolean"}},required:["repoPath"]}},{name:"shadow_ops_synthesize",description:"Distill mission context and logs into an Architectural Decision Record (ADR).",inputSchema:{type:"object",properties:{repoPath:{type:"string"},missionId:{type:"number"}},required:["repoPath","missionId"]}},{name:"shadow_ops_chronicle",description:"Archive feed of the repository narrative (initiatives and standalones).",inputSchema:{type:"object",properties:{repoPath:{type:"string"},format:{type:"string",enum:["markdown","json"]},limit:{type:"number"},offset:{type:"number"},since:{type:"number"},until:{type:"number"}},required:["repoPath"]}},{name:"shadow_ops_context",description:'Session-start bundle in one call: hologram + chronicle (last 5) + briefing summary (counts, next_work_candidates). Use for "new chat, give me the world" without multiple round-trips.',inputSchema:{type:"object",properties:{repoPath:{type:"string"}},required:["repoPath"]}},{name:"shadow_ops_health",description:"System health metrics and intelligence index status.",inputSchema:{type:"object",properties:{repoPath:{type:"string"}},required:["repoPath"]}},{name:"shadow_ops_graph",description:"Visualize mission lineage and dependencies.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},missionId:{type:"number"},depth:{type:"number"},limit:{type:"number"},format:{type:"string",enum:["mermaid","json"]}},required:["repoPath"]}},{name:"shadow_inspect_symbol",description:"Dense code retrieval for a single symbol with semantic folding and usage context.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},symbolName:{type:"string"},filePath:{type:"string"},context:{type:"string",enum:["definition","full"]}},required:["repoPath","symbolName"]}},{name:"shadow_inspect_file",description:"Token-efficient summary of ALL symbols and exports in a file.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},filePath:{type:"string"},detailLevel:{type:"string",enum:["structure","signatures","summaries","detailed"]}},required:["repoPath","filePath"]}},{name:"shadow_sync_trace",description:"Full lifecycle synchronization - Repairs index, analyzes changes, and re-hydrates state.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},sinceCommit:{type:"string"}},required:["repoPath"]}},{name:"shadow_sync_index",description:"Incremental code re-indexing to reflect latest file changes.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},deep:{type:"boolean",description:"Force full rebuild"}},required:["repoPath"]}},{name:"shadow_sync_repair",description:"NanoRepair only - Heals broken intent links and symbol shifts.",inputSchema:{type:"object",properties:{repoPath:{type:"string"}},required:["repoPath"]}},{name:"shadow_env_hooks",description:"Install and manage Git hooks for automated intelligence maintenance.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},action:{type:"string",enum:["install","remove","status"]},enableAutoRefresh:{type:"boolean"},enableSymbolHealing:{type:"boolean"}},required:["repoPath","action"]}},{name:"shadow_env_diagnose",description:"Missions and intelligence toolset health check.",inputSchema:{type:"object",properties:{repoPath:{type:"string"}},required:["repoPath"]}},{name:"shadow_workspace_list",description:"Federated view of active missions across multiple repositories.",inputSchema:{type:"object",properties:{repoPaths:{type:"array",items:{type:"string"}},status:{type:"string"}},required:["repoPaths"]}},{name:"shadow_workspace_link",description:"Establish intent-level dependencies between missions in different repos.",inputSchema:{type:"object",properties:{parentRepoPath:{type:"string"},parentMissionId:{type:"number"},childRepoPath:{type:"string"},childMissionId:{type:"number"},relationship:{type:"string"}},required:["parentRepoPath","parentMissionId","childRepoPath","childMissionId","relationship"]}},{name:"shadow_workspace_fuse",description:"Create unified cross-repo search indices using SQLite fusion.",inputSchema:{type:"object",properties:{repoPaths:{type:"array",items:{type:"string"}},name:{type:"string"}},required:["repoPaths"]}}];var h={};Ze(h,{$brand:()=>ni,$input:()=>ll,$output:()=>cl,NEVER:()=>Ws,TimePrecision:()=>ml,ZodAny:()=>np,ZodArray:()=>sp,ZodBase64:()=>Po,ZodBase64URL:()=>No,ZodBigInt:()=>Dn,ZodBigIntFormat:()=>Oo,ZodBoolean:()=>zn,ZodCIDRv4:()=>To,ZodCIDRv6:()=>Ro,ZodCUID:()=>xo,ZodCUID2:()=>$o,ZodCatch:()=>Tp,ZodCodec:()=>Zo,ZodCustom:()=>Dr,ZodCustomStringFormat:()=>Pn,ZodDate:()=>Tr,ZodDefault:()=>$p,ZodDiscriminatedUnion:()=>cp,ZodE164:()=>zo,ZodEmail:()=>vo,ZodEmoji:()=>_o,ZodEnum:()=>Tn,ZodError:()=>Rx,ZodExactOptional:()=>_p,ZodFile:()=>yp,ZodFirstPartyTypeKind:()=>Up,ZodFunction:()=>Cp,ZodGUID:()=>Sr,ZodIPv4:()=>wo,ZodIPv6:()=>Io,ZodISODate:()=>po,ZodISODateTime:()=>uo,ZodISODuration:()=>fo,ZodISOTime:()=>mo,ZodIntersection:()=>lp,ZodIssueCode:()=>Nx,ZodJWT:()=>Do,ZodKSUID:()=>Eo,ZodLazy:()=>Op,ZodLiteral:()=>gp,ZodMAC:()=>qu,ZodMap:()=>fp,ZodNaN:()=>Pp,ZodNanoID:()=>bo,ZodNever:()=>ip,ZodNonOptional:()=>Uo,ZodNull:()=>ep,ZodNullable:()=>xp,ZodNumber:()=>Nn,ZodNumberFormat:()=>Kt,ZodObject:()=>Pr,ZodOptional:()=>Mo,ZodPipe:()=>Fo,ZodPrefault:()=>kp,ZodPromise:()=>Lp,ZodReadonly:()=>Np,ZodRealError:()=>Re,ZodRecord:()=>zr,ZodSet:()=>hp,ZodString:()=>Rn,ZodStringFormat:()=>re,ZodSuccess:()=>Ip,ZodSymbol:()=>Xu,ZodTemplateLiteral:()=>Dp,ZodTransform:()=>vp,ZodTuple:()=>pp,ZodType:()=>K,ZodULID:()=>So,ZodURL:()=>Ir,ZodUUID:()=>Qe,ZodUndefined:()=>Qu,ZodUnion:()=>Nr,ZodUnknown:()=>rp,ZodVoid:()=>op,ZodXID:()=>ko,ZodXor:()=>ap,_ZodString:()=>yo,_default:()=>Sp,_function:()=>hh,any:()=>Gf,array:()=>Rr,base64:()=>Pf,base64url:()=>Nf,bigint:()=>Zf,boolean:()=>Yu,catch:()=>Rp,check:()=>gh,cidrv4:()=>Tf,cidrv6:()=>Rf,clone:()=>ke,codec:()=>dh,coerce:()=>Fp,config:()=>pe,core:()=>ut,cuid:()=>bf,cuid2:()=>xf,custom:()=>yh,date:()=>qf,decode:()=>Zu,decodeAsync:()=>Wu,describe:()=>vh,discriminatedUnion:()=>th,e164:()=>zf,email:()=>uf,emoji:()=>vf,encode:()=>Fu,encodeAsync:()=>Hu,endsWith:()=>vn,enum:()=>Co,exactOptional:()=>bp,file:()=>ch,flattenError:()=>ur,float32:()=>jf,float64:()=>Mf,formatError:()=>pr,fromJSONSchema:()=>Eh,function:()=>hh,getErrorMap:()=>Dx,globalRegistry:()=>xe,gt:()=>Ye,gte:()=>Ee,guid:()=>pf,hash:()=>Cf,hex:()=>Lf,hostname:()=>Af,httpUrl:()=>yf,includes:()=>gn,instanceof:()=>bh,int:()=>go,int32:()=>Uf,int64:()=>Hf,intersection:()=>up,ipv4:()=>Ef,ipv6:()=>If,iso:()=>In,json:()=>$h,jwt:()=>Df,keyof:()=>Kf,ksuid:()=>kf,lazy:()=>Ap,length:()=>Vt,literal:()=>ah,locales:()=>_r,looseObject:()=>Qf,looseRecord:()=>rh,lowercase:()=>fn,lt:()=>Ke,lte:()=>Oe,mac:()=>wf,map:()=>ih,maxLength:()=>Gt,maxSize:()=>Et,meta:()=>_h,mime:()=>_n,minLength:()=>lt,minSize:()=>Xe,multipleOf:()=>kt,nan:()=>ph,nanoid:()=>_f,nativeEnum:()=>sh,negative:()=>eo,never:()=>Ao,nonnegative:()=>no,nonoptional:()=>wp,nonpositive:()=>to,normalize:()=>bn,null:()=>tp,nullable:()=>Er,nullish:()=>lh,number:()=>Ku,object:()=>Yf,optional:()=>kr,overwrite:()=>We,parse:()=>Cu,parseAsync:()=>ju,partialRecord:()=>nh,pipe:()=>wr,positive:()=>Qi,prefault:()=>Ep,preprocess:()=>Sh,prettifyError:()=>na,promise:()=>fh,property:()=>ro,readonly:()=>zp,record:()=>mp,refine:()=>jp,regex:()=>mn,regexes:()=>Ce,registry:()=>zi,safeDecode:()=>Ju,safeDecodeAsync:()=>Vu,safeEncode:()=>Bu,safeEncodeAsync:()=>Gu,safeParse:()=>Mu,safeParseAsync:()=>Uu,set:()=>oh,setErrorMap:()=>zx,size:()=>Jt,slugify:()=>kn,startsWith:()=>yn,strictObject:()=>Xf,string:()=>ho,stringFormat:()=>Of,stringbool:()=>xh,success:()=>uh,superRefine:()=>Mp,symbol:()=>Bf,templateLiteral:()=>mh,toJSONSchema:()=>ao,toLowerCase:()=>$n,toUpperCase:()=>Sn,transform:()=>jo,treeifyError:()=>ta,trim:()=>xn,tuple:()=>dp,uint32:()=>Ff,uint64:()=>Wf,ulid:()=>$f,undefined:()=>Jf,union:()=>Lo,unknown:()=>qt,uppercase:()=>hn,url:()=>gf,util:()=>z,uuid:()=>df,uuidv4:()=>mf,uuidv6:()=>ff,uuidv7:()=>hf,void:()=>Vf,xid:()=>Sf,xor:()=>eh});var ut={};Ze(ut,{$ZodAny:()=>Pc,$ZodArray:()=>Ac,$ZodAsyncError:()=>He,$ZodBase64:()=>bc,$ZodBase64URL:()=>xc,$ZodBigInt:()=>Ei,$ZodBigIntFormat:()=>wc,$ZodBoolean:()=>hr,$ZodCIDRv4:()=>yc,$ZodCIDRv6:()=>vc,$ZodCUID:()=>oc,$ZodCUID2:()=>sc,$ZodCatch:()=>Qc,$ZodCheck:()=>ie,$ZodCheckBigIntFormat:()=>Aa,$ZodCheckEndsWith:()=>Ga,$ZodCheckGreaterThan:()=>vi,$ZodCheckIncludes:()=>Ba,$ZodCheckLengthEquals:()=>Fa,$ZodCheckLessThan:()=>yi,$ZodCheckLowerCase:()=>Ha,$ZodCheckMaxLength:()=>Ma,$ZodCheckMaxSize:()=>La,$ZodCheckMimeType:()=>qa,$ZodCheckMinLength:()=>Ua,$ZodCheckMinSize:()=>Ca,$ZodCheckMultipleOf:()=>Da,$ZodCheckNumberFormat:()=>Oa,$ZodCheckOverwrite:()=>Ka,$ZodCheckProperty:()=>Va,$ZodCheckRegex:()=>Za,$ZodCheckSizeEquals:()=>ja,$ZodCheckStartsWith:()=>Ja,$ZodCheckStringFormat:()=>pn,$ZodCheckUpperCase:()=>Wa,$ZodCodec:()=>yr,$ZodCustom:()=>al,$ZodCustomStringFormat:()=>kc,$ZodDate:()=>Oc,$ZodDefault:()=>qc,$ZodDiscriminatedUnion:()=>jc,$ZodE164:()=>$c,$ZodEmail:()=>tc,$ZodEmoji:()=>rc,$ZodEncodeError:()=>_t,$ZodEnum:()=>Hc,$ZodError:()=>lr,$ZodExactOptional:()=>Gc,$ZodFile:()=>Bc,$ZodFunction:()=>il,$ZodGUID:()=>Qa,$ZodIPv4:()=>fc,$ZodIPv6:()=>hc,$ZodISODate:()=>pc,$ZodISODateTime:()=>uc,$ZodISODuration:()=>mc,$ZodISOTime:()=>dc,$ZodIntersection:()=>Mc,$ZodJWT:()=>Sc,$ZodKSUID:()=>lc,$ZodLazy:()=>sl,$ZodLiteral:()=>Wc,$ZodMAC:()=>gc,$ZodMap:()=>Fc,$ZodNaN:()=>el,$ZodNanoID:()=>ic,$ZodNever:()=>zc,$ZodNonOptional:()=>Yc,$ZodNull:()=>Rc,$ZodNullable:()=>Vc,$ZodNumber:()=>ki,$ZodNumberFormat:()=>Ec,$ZodObject:()=>cm,$ZodObjectJIT:()=>Lc,$ZodOptional:()=>Ii,$ZodPipe:()=>tl,$ZodPrefault:()=>Kc,$ZodPromise:()=>ol,$ZodReadonly:()=>nl,$ZodRealError:()=>Te,$ZodRecord:()=>Uc,$ZodRegistry:()=>Ni,$ZodSet:()=>Zc,$ZodString:()=>Bt,$ZodStringFormat:()=>ne,$ZodSuccess:()=>Xc,$ZodSymbol:()=>Ic,$ZodTemplateLiteral:()=>rl,$ZodTransform:()=>Jc,$ZodTuple:()=>wi,$ZodType:()=>V,$ZodULID:()=>ac,$ZodURL:()=>nc,$ZodUUID:()=>ec,$ZodUndefined:()=>Tc,$ZodUnion:()=>gr,$ZodUnknown:()=>Nc,$ZodVoid:()=>Dc,$ZodXID:()=>cc,$ZodXor:()=>Cc,$brand:()=>ni,$constructor:()=>v,$input:()=>ll,$output:()=>cl,Doc:()=>fr,JSONSchema:()=>cf,JSONSchemaGenerator:()=>co,NEVER:()=>Ws,TimePrecision:()=>ml,_any:()=>Ol,_array:()=>Fl,_base64:()=>qi,_base64url:()=>Ki,_bigint:()=>Il,_boolean:()=>El,_catch:()=>xx,_check:()=>af,_cidrv4:()=>Gi,_cidrv6:()=>Vi,_coercedBigint:()=>Tl,_coercedBoolean:()=>wl,_coercedDate:()=>Ml,_coercedNumber:()=>_l,_coercedString:()=>pl,_cuid:()=>Ui,_cuid2:()=>Fi,_custom:()=>Hl,_date:()=>jl,_decode:()=>ci,_decodeAsync:()=>ui,_default:()=>vx,_discriminatedUnion:()=>sx,_e164:()=>Yi,_email:()=>Di,_emoji:()=>ji,_encode:()=>ai,_encodeAsync:()=>li,_endsWith:()=>vn,_enum:()=>dx,_file:()=>Zl,_float32:()=>xl,_float64:()=>$l,_gt:()=>Ye,_gte:()=>Ee,_guid:()=>br,_includes:()=>gn,_int:()=>bl,_int32:()=>Sl,_int64:()=>Rl,_intersection:()=>ax,_ipv4:()=>Bi,_ipv6:()=>Ji,_isoDate:()=>hl,_isoDateTime:()=>fl,_isoDuration:()=>yl,_isoTime:()=>gl,_jwt:()=>Xi,_ksuid:()=>Wi,_lazy:()=>Ex,_length:()=>Vt,_literal:()=>fx,_lowercase:()=>fn,_lt:()=>Ke,_lte:()=>Oe,_mac:()=>dl,_map:()=>ux,_max:()=>Oe,_maxLength:()=>Gt,_maxSize:()=>Et,_mime:()=>_n,_min:()=>Ee,_minLength:()=>lt,_minSize:()=>Xe,_multipleOf:()=>kt,_nan:()=>Ul,_nanoid:()=>Mi,_nativeEnum:()=>mx,_negative:()=>eo,_never:()=>Ll,_nonnegative:()=>no,_nonoptional:()=>_x,_nonpositive:()=>to,_normalize:()=>bn,_null:()=>Dl,_nullable:()=>yx,_number:()=>vl,_optional:()=>gx,_overwrite:()=>We,_parse:()=>an,_parseAsync:()=>cn,_pipe:()=>$x,_positive:()=>Qi,_promise:()=>wx,_property:()=>ro,_readonly:()=>Sx,_record:()=>lx,_refine:()=>Wl,_regex:()=>mn,_safeDecode:()=>di,_safeDecodeAsync:()=>fi,_safeEncode:()=>pi,_safeEncodeAsync:()=>mi,_safeParse:()=>ln,_safeParseAsync:()=>un,_set:()=>px,_size:()=>Jt,_slugify:()=>kn,_startsWith:()=>yn,_string:()=>ul,_stringFormat:()=>En,_stringbool:()=>Vl,_success:()=>bx,_superRefine:()=>Bl,_symbol:()=>Nl,_templateLiteral:()=>kx,_toLowerCase:()=>$n,_toUpperCase:()=>Sn,_transform:()=>hx,_trim:()=>xn,_tuple:()=>cx,_uint32:()=>kl,_uint64:()=>Pl,_ulid:()=>Zi,_undefined:()=>zl,_union:()=>ix,_unknown:()=>Al,_uppercase:()=>hn,_url:()=>xr,_uuid:()=>Oi,_uuidv4:()=>Ai,_uuidv6:()=>Li,_uuidv7:()=>Ci,_void:()=>Cl,_xid:()=>Hi,_xor:()=>ox,clone:()=>ke,config:()=>pe,createStandardJSONSchemaMethod:()=>wn,createToJSONSchemaMethod:()=>ql,decode:()=>R_,decodeAsync:()=>N_,describe:()=>Jl,encode:()=>T_,encodeAsync:()=>P_,extractDefs:()=>It,finalize:()=>Tt,flattenError:()=>ur,formatError:()=>pr,globalConfig:()=>nr,globalRegistry:()=>xe,initializeContext:()=>wt,isValidBase64:()=>_c,isValidBase64URL:()=>im,isValidJWT:()=>om,locales:()=>_r,meta:()=>Gl,parse:()=>oi,parseAsync:()=>si,prettifyError:()=>na,process:()=>te,regexes:()=>Ce,registry:()=>zi,safeDecode:()=>D_,safeDecodeAsync:()=>A_,safeEncode:()=>z_,safeEncodeAsync:()=>O_,safeParse:()=>ra,safeParseAsync:()=>ia,toDotPath:()=>Ud,toJSONSchema:()=>ao,treeifyError:()=>ta,util:()=>z,version:()=>Ya});var Ws=Object.freeze({status:"aborted"});function v(t,e,r){function i(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,l);let c=s.prototype,u=Object.keys(c);for(let d=0;d<u.length;d++){let p=u[d];p in a||(a[p]=c[p].bind(a))}}let n=r?.Parent??Object;class o extends n{}Object.defineProperty(o,"name",{value:t});function s(a){var l;let c=r?.Parent?new o:this;i(c,a),(l=c._zod).deferred??(l.deferred=[]);for(let u of c._zod.deferred)u();return c}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(s,"name",{value:t}),s}var ni=Symbol("zod_brand"),He=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},_t=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}},nr={};function pe(t){return t&&Object.assign(nr,t),nr}var z={};Ze(z,{BIGINT_FORMAT_RANGES:()=>ea,Class:()=>Js,NUMBER_FORMAT_RANGES:()=>Qs,aborted:()=>St,allowsEval:()=>qs,assert:()=>s_,assertEqual:()=>n_,assertIs:()=>i_,assertNever:()=>o_,assertNotEqual:()=>r_,assignProp:()=>xt,base64ToUint8Array:()=>Cd,base64urlToUint8Array:()=>S_,cached:()=>on,captureStackTrace:()=>ii,cleanEnum:()=>$_,cleanRegex:()=>or,clone:()=>ke,cloneDef:()=>c_,createTransparentProxy:()=>f_,defineLazy:()=>Y,esc:()=>ri,escapeRegex:()=>Le,extend:()=>y_,finalizeIssue:()=>Ie,floatSafeRemainder:()=>Gs,getElementAtPath:()=>l_,getEnumValues:()=>ir,getLengthableOrigin:()=>cr,getParsedType:()=>m_,getSizableOrigin:()=>ar,hexToUint8Array:()=>E_,isObject:()=>Ht,isPlainObject:()=>$t,issue:()=>sn,joinValues:()=>S,jsonStringifyReplacer:()=>rn,merge:()=>__,mergeDefs:()=>ct,normalizeParams:()=>D,nullish:()=>bt,numKeys:()=>d_,objectClone:()=>a_,omit:()=>g_,optionalKeys:()=>Xs,parsedType:()=>N,partial:()=>b_,pick:()=>h_,prefixIssues:()=>De,primitiveTypes:()=>Ys,promiseAllObject:()=>u_,propertyKeyTypes:()=>sr,randomString:()=>p_,required:()=>x_,safeExtend:()=>v_,shallowClone:()=>Ks,slugify:()=>Vs,stringifyPrimitive:()=>T,uint8ArrayToBase64:()=>jd,uint8ArrayToBase64url:()=>k_,uint8ArrayToHex:()=>w_,unwrapMessage:()=>rr});function n_(t){return t}function r_(t){return t}function i_(t){}function o_(t){throw new Error("Unexpected value in exhaustive check")}function s_(t){}function ir(t){let e=Object.values(t).filter(i=>typeof i=="number");return Object.entries(t).filter(([i,n])=>e.indexOf(+i)===-1).map(([i,n])=>n)}function S(t,e="|"){return t.map(r=>T(r)).join(e)}function rn(t,e){return typeof e=="bigint"?e.toString():e}function on(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function bt(t){return t==null}function or(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function Gs(t,e){let r=(t.toString().split(".")[1]||"").length,i=e.toString(),n=(i.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(i)){let l=i.match(/\d?e-(\d?)/);l?.[1]&&(n=Number.parseInt(l[1]))}let o=r>n?r:n,s=Number.parseInt(t.toFixed(o).replace(".","")),a=Number.parseInt(e.toFixed(o).replace(".",""));return s%a/10**o}var Ld=Symbol("evaluating");function Y(t,e,r){let i;Object.defineProperty(t,e,{get(){if(i!==Ld)return i===void 0&&(i=Ld,i=r()),i},set(n){Object.defineProperty(t,e,{value:n})},configurable:!0})}function a_(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function xt(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function ct(...t){let e={};for(let r of t){let i=Object.getOwnPropertyDescriptors(r);Object.assign(e,i)}return Object.defineProperties({},e)}function c_(t){return ct(t._zod.def)}function l_(t,e){return e?e.reduce((r,i)=>r?.[i],t):t}function u_(t){let e=Object.keys(t),r=e.map(i=>t[i]);return Promise.all(r).then(i=>{let n={};for(let o=0;o<e.length;o++)n[e[o]]=i[o];return n})}function p_(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<t;i++)r+=e[Math.floor(Math.random()*e.length)];return r}function ri(t){return JSON.stringify(t)}function Vs(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var ii="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Ht(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var qs=on(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function $t(t){if(Ht(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(Ht(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Ks(t){return $t(t)?{...t}:Array.isArray(t)?[...t]:t}function d_(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}var m_=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},sr=new Set(["string","number","symbol"]),Ys=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Le(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ke(t,e,r){let i=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(i._zod.parent=t),i}function D(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function f_(t){let e;return new Proxy({},{get(r,i,n){return e??(e=t()),Reflect.get(e,i,n)},set(r,i,n,o){return e??(e=t()),Reflect.set(e,i,n,o)},has(r,i){return e??(e=t()),Reflect.has(e,i)},deleteProperty(r,i){return e??(e=t()),Reflect.deleteProperty(e,i)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,i){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,i)},defineProperty(r,i,n){return e??(e=t()),Reflect.defineProperty(e,i,n)}})}function T(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Xs(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var Qs={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]},ea={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function h_(t,e){let r=t._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=ct(t._zod.def,{get shape(){let s={};for(let a in e){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&(s[a]=r.shape[a])}return xt(this,"shape",s),s},checks:[]});return ke(t,o)}function g_(t,e){let r=t._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=ct(t._zod.def,{get shape(){let s={...t._zod.def.shape};for(let a in e){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&delete s[a]}return xt(this,"shape",s),s},checks:[]});return ke(t,o)}function y_(t,e){if(!$t(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let o=t._zod.def.shape;for(let s in e)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=ct(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e};return xt(this,"shape",o),o}});return ke(t,n)}function v_(t,e){if(!$t(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r=ct(t._zod.def,{get shape(){let i={...t._zod.def.shape,...e};return xt(this,"shape",i),i}});return ke(t,r)}function __(t,e){let r=ct(t._zod.def,{get shape(){let i={...t._zod.def.shape,...e._zod.def.shape};return xt(this,"shape",i),i},get catchall(){return e._zod.def.catchall},checks:[]});return ke(t,r)}function b_(t,e,r){let n=e._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=ct(e._zod.def,{get shape(){let a=e._zod.def.shape,l={...a};if(r)for(let c in r){if(!(c in a))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(l[c]=t?new t({type:"optional",innerType:a[c]}):a[c])}else for(let c in a)l[c]=t?new t({type:"optional",innerType:a[c]}):a[c];return xt(this,"shape",l),l},checks:[]});return ke(e,s)}function x_(t,e,r){let i=ct(e._zod.def,{get shape(){let n=e._zod.def.shape,o={...n};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new t({type:"nonoptional",innerType:n[s]}))}else for(let s in n)o[s]=new t({type:"nonoptional",innerType:n[s]});return xt(this,"shape",o),o}});return ke(e,i)}function St(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function De(t,e){return e.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(t),r})}function rr(t){return typeof t=="string"?t:t?.message}function Ie(t,e,r){let i={...t,path:t.path??[]};if(!t.message){let n=rr(t.inst?._zod.def?.error?.(t))??rr(e?.error?.(t))??rr(r.customError?.(t))??rr(r.localeError?.(t))??"Invalid input";i.message=n}return delete i.inst,delete i.continue,e?.reportInput||delete i.input,i}function ar(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function cr(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function N(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function sn(...t){let[e,r,i]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:i}:{...e}}function $_(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Cd(t){let e=atob(t),r=new Uint8Array(e.length);for(let i=0;i<e.length;i++)r[i]=e.charCodeAt(i);return r}function jd(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function S_(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return Cd(e+r)}function k_(t){return jd(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function E_(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(e.length/2);for(let i=0;i<e.length;i+=2)r[i/2]=Number.parseInt(e.slice(i,i+2),16);return r}function w_(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var Js=class{constructor(...e){}};var Md=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,rn,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},lr=v("$ZodError",Md),Te=v("$ZodError",Md,{Parent:Error});function ur(t,e=r=>r.message){let r={},i=[];for(let n of t.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(e(n))):i.push(e(n));return{formErrors:i,fieldErrors:r}}function pr(t,e=r=>r.message){let r={_errors:[]},i=n=>{for(let o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>i({issues:s}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)r._errors.push(e(o));else{let s=r,a=0;for(;a<o.path.length;){let l=o.path[a];a===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(e(o))):s[l]=s[l]||{_errors:[]},s=s[l],a++}}};return i(t),r}function ta(t,e=r=>r.message){let r={errors:[]},i=(n,o=[])=>{var s,a;for(let l of n.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>i({issues:c},l.path));else if(l.code==="invalid_key")i({issues:l.issues},l.path);else if(l.code==="invalid_element")i({issues:l.issues},l.path);else{let c=[...o,...l.path];if(c.length===0){r.errors.push(e(l));continue}let u=r,d=0;for(;d<c.length;){let p=c[d],m=d===c.length-1;typeof p=="string"?(u.properties??(u.properties={}),(s=u.properties)[p]??(s[p]={errors:[]}),u=u.properties[p]):(u.items??(u.items=[]),(a=u.items)[p]??(a[p]={errors:[]}),u=u.items[p]),m&&u.errors.push(e(l)),d++}}};return i(t),r}function Ud(t){let e=[],r=t.map(i=>typeof i=="object"?i.key:i);for(let i of r)typeof i=="number"?e.push(`[${i}]`):typeof i=="symbol"?e.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?e.push(`[${JSON.stringify(i)}]`):(e.length&&e.push("."),e.push(i));return e.join("")}function na(t){let e=[],r=[...t.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(let i of r)e.push(`\u2716 ${i.message}`),i.path?.length&&e.push(` \u2192 at ${Ud(i.path)}`);return e.join(`
418
- `)}var an=t=>(e,r,i,n)=>{let o=i?Object.assign(i,{async:!1}):{async:!1},s=e._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new He;if(s.issues.length){let a=new(n?.Err??t)(s.issues.map(l=>Ie(l,o,pe())));throw ii(a,n?.callee),a}return s.value},oi=an(Te),cn=t=>async(e,r,i,n)=>{let o=i?Object.assign(i,{async:!0}):{async:!0},s=e._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(n?.Err??t)(s.issues.map(l=>Ie(l,o,pe())));throw ii(a,n?.callee),a}return s.value},si=cn(Te),ln=t=>(e,r,i)=>{let n=i?{...i,async:!1}:{async:!1},o=e._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new He;return o.issues.length?{success:!1,error:new(t??lr)(o.issues.map(s=>Ie(s,n,pe())))}:{success:!0,data:o.value}},ra=ln(Te),un=t=>async(e,r,i)=>{let n=i?Object.assign(i,{async:!0}):{async:!0},o=e._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new t(o.issues.map(s=>Ie(s,n,pe())))}:{success:!0,data:o.value}},ia=un(Te),ai=t=>(e,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return an(t)(e,r,n)},T_=ai(Te),ci=t=>(e,r,i)=>an(t)(e,r,i),R_=ci(Te),li=t=>async(e,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return cn(t)(e,r,n)},P_=li(Te),ui=t=>async(e,r,i)=>cn(t)(e,r,i),N_=ui(Te),pi=t=>(e,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return ln(t)(e,r,n)},z_=pi(Te),di=t=>(e,r,i)=>ln(t)(e,r,i),D_=di(Te),mi=t=>async(e,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return un(t)(e,r,n)},O_=mi(Te),fi=t=>async(e,r,i)=>un(t)(e,r,i),A_=fi(Te);var Ce={};Ze(Ce,{base64:()=>ba,base64url:()=>hi,bigint:()=>wa,boolean:()=>Ta,browserEmail:()=>H_,cidrv4:()=>va,cidrv6:()=>_a,cuid:()=>oa,cuid2:()=>sa,date:()=>$a,datetime:()=>ka,domain:()=>J_,duration:()=>pa,e164:()=>xa,email:()=>ma,emoji:()=>fa,extendedDuration:()=>L_,guid:()=>da,hex:()=>G_,hostname:()=>B_,html5Email:()=>U_,idnEmail:()=>Z_,integer:()=>Ia,ipv4:()=>ha,ipv6:()=>ga,ksuid:()=>la,lowercase:()=>Na,mac:()=>ya,md5_base64:()=>q_,md5_base64url:()=>K_,md5_hex:()=>V_,nanoid:()=>ua,null:()=>Ra,number:()=>gi,rfc5322Email:()=>F_,sha1_base64:()=>X_,sha1_base64url:()=>Q_,sha1_hex:()=>Y_,sha256_base64:()=>tb,sha256_base64url:()=>nb,sha256_hex:()=>eb,sha384_base64:()=>ib,sha384_base64url:()=>ob,sha384_hex:()=>rb,sha512_base64:()=>ab,sha512_base64url:()=>cb,sha512_hex:()=>sb,string:()=>Ea,time:()=>Sa,ulid:()=>aa,undefined:()=>Pa,unicodeEmail:()=>Fd,uppercase:()=>za,uuid:()=>Wt,uuid4:()=>C_,uuid6:()=>j_,uuid7:()=>M_,xid:()=>ca});var oa=/^[cC][^\s-]{8,}$/,sa=/^[0-9a-z]+$/,aa=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ca=/^[0-9a-vA-V]{20}$/,la=/^[A-Za-z0-9]{27}$/,ua=/^[a-zA-Z0-9_-]{21}$/,pa=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,L_=/^[-+]?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)?)??$/,da=/^([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})$/,Wt=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,C_=Wt(4),j_=Wt(6),M_=Wt(7),ma=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,U_=/^[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])?)*$/,F_=/^(([^<>()\[\]\\.,;:\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,}))$/,Fd=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Z_=Fd,H_=/^[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])?)*$/,W_="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function fa(){return new RegExp(W_,"u")}var ha=/^(?:(?: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])$/,ga=/^(([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}|:))$/,ya=t=>{let e=Le(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},va=/^((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])$/,_a=/^(([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])$/,ba=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,hi=/^[A-Za-z0-9_-]*$/,B_=/^(?=.{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])?)*\.?$/,J_=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,xa=/^\+[1-9]\d{6,14}$/,Zd="(?:(?:\\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(`^${Zd}$`);function Hd(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Sa(t){return new RegExp(`^${Hd(t)}$`)}function ka(t){let e=Hd({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${e}(?:${r.join("|")})`;return new RegExp(`^${Zd}T(?:${i})$`)}var Ea=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},wa=/^-?\d+n?$/,Ia=/^-?\d+$/,gi=/^-?\d+(?:\.\d+)?$/,Ta=/^(?:true|false)$/i,Ra=/^null$/i;var Pa=/^undefined$/i;var Na=/^[^A-Z]*$/,za=/^[^a-z]*$/,G_=/^[0-9a-fA-F]*$/;function dr(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function mr(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var V_=/^[0-9a-fA-F]{32}$/,q_=dr(22,"=="),K_=mr(22),Y_=/^[0-9a-fA-F]{40}$/,X_=dr(27,"="),Q_=mr(27),eb=/^[0-9a-fA-F]{64}$/,tb=dr(43,"="),nb=mr(43),rb=/^[0-9a-fA-F]{96}$/,ib=dr(64,""),ob=mr(64),sb=/^[0-9a-fA-F]{128}$/,ab=dr(86,"=="),cb=mr(86);var ie=v("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),Bd={number:"number",bigint:"bigint",object:"date"},yi=v("$ZodCheckLessThan",(t,e)=>{ie.init(t,e);let r=Bd[typeof e.value];t._zod.onattach.push(i=>{let n=i._zod.bag,o=(e.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<o&&(e.inclusive?n.maximum=e.value:n.exclusiveMaximum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value<=e.value:i.value<e.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),vi=v("$ZodCheckGreaterThan",(t,e)=>{ie.init(t,e);let r=Bd[typeof e.value];t._zod.onattach.push(i=>{let n=i._zod.bag,o=(e.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>o&&(e.inclusive?n.minimum=e.value:n.exclusiveMinimum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value>=e.value:i.value>e.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Da=v("$ZodCheckMultipleOf",(t,e)=>{ie.init(t,e),t._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):Gs(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),Oa=v("$ZodCheckNumberFormat",(t,e)=>{ie.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),i=r?"int":"number",[n,o]=Qs[e.format];t._zod.onattach.push(s=>{let a=s._zod.bag;a.format=e.format,a.minimum=n,a.maximum=o,r&&(a.pattern=Ia)}),t._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:i,format:e.format,code:"invalid_type",continue:!1,input:a,inst:t});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,inclusive:!0,continue:!e.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,inclusive:!0,continue:!e.abort});return}}a<n&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:!0,inst:t,continue:!e.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!e.abort})}}),Aa=v("$ZodCheckBigIntFormat",(t,e)=>{ie.init(t,e);let[r,i]=ea[e.format];t._zod.onattach.push(n=>{let o=n._zod.bag;o.format=e.format,o.minimum=r,o.maximum=i}),t._zod.check=n=>{let o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:t,continue:!e.abort})}}),La=v("$ZodCheckMaxSize",(t,e)=>{var r;ie.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!bt(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{let n=i.value;n.size<=e.maximum||i.issues.push({origin:ar(n),code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Ca=v("$ZodCheckMinSize",(t,e)=>{var r;ie.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!bt(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{let n=i.value;n.size>=e.minimum||i.issues.push({origin:ar(n),code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),ja=v("$ZodCheckSizeEquals",(t,e)=>{var r;ie.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!bt(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=e.size,n.maximum=e.size,n.size=e.size}),t._zod.check=i=>{let n=i.value,o=n.size;if(o===e.size)return;let s=o>e.size;i.issues.push({origin:ar(n),...s?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),Ma=v("$ZodCheckMaxLength",(t,e)=>{var r;ie.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!bt(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{let n=i.value;if(n.length<=e.maximum)return;let s=cr(n);i.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Ua=v("$ZodCheckMinLength",(t,e)=>{var r;ie.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!bt(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{let n=i.value;if(n.length>=e.minimum)return;let s=cr(n);i.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Fa=v("$ZodCheckLengthEquals",(t,e)=>{var r;ie.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!bt(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=e.length,n.maximum=e.length,n.length=e.length}),t._zod.check=i=>{let n=i.value,o=n.length;if(o===e.length)return;let s=cr(n),a=o>e.length;i.issues.push({origin:s,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),pn=v("$ZodCheckStringFormat",(t,e)=>{var r,i;ie.init(t,e),t._zod.onattach.push(n=>{let o=n._zod.bag;o.format=e.format,e.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:e.format,input:n.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(i=t._zod).check??(i.check=()=>{})}),Za=v("$ZodCheckRegex",(t,e)=>{pn.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Ha=v("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Na),pn.init(t,e)}),Wa=v("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=za),pn.init(t,e)}),Ba=v("$ZodCheckIncludes",(t,e)=>{ie.init(t,e);let r=Le(e.includes),i=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=i,t._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),t._zod.check=n=>{n.value.includes(e.includes,e.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:n.value,inst:t,continue:!e.abort})}}),Ja=v("$ZodCheckStartsWith",(t,e)=>{ie.init(t,e);let r=new RegExp(`^${Le(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),t._zod.check=i=>{i.value.startsWith(e.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:i.value,inst:t,continue:!e.abort})}}),Ga=v("$ZodCheckEndsWith",(t,e)=>{ie.init(t,e);let r=new RegExp(`.*${Le(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),t._zod.check=i=>{i.value.endsWith(e.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:i.value,inst:t,continue:!e.abort})}});function Wd(t,e,r){t.issues.length&&e.issues.push(...De(r,t.issues))}var Va=v("$ZodCheckProperty",(t,e)=>{ie.init(t,e),t._zod.check=r=>{let i=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>Wd(n,r,e.property));Wd(i,r,e.property)}}),qa=v("$ZodCheckMimeType",(t,e)=>{ie.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(i=>{i._zod.bag.mime=e.mime}),t._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:e.mime,input:i.value.type,inst:t,continue:!e.abort})}}),Ka=v("$ZodCheckOverwrite",(t,e)=>{ie.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});var fr=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let i=e.split(`
416
+ `,e,r)}deleteSection(e){this.run("DELETE FROM hologram_snapshot WHERE section = ?",e)}deleteAll(){this.run("DELETE FROM hologram_snapshot")}hasSection(e){return(this.get("SELECT COUNT(*) as count FROM hologram_snapshot WHERE section = ?",e)?.count??0)>0}}});var L,X=de(()=>{"use strict";Kt();Hh();Wh();Vh();Gh();qh();Kh();Yh();Qh();eg();L=class{static repositoryCache=new Map;static getInstance(e){let r=this.repositoryCache.get(e);if(r){let o=Oe(e),s=r.files?.database,a=!r.intentLogs||!r.searchHistory||!r.missions||!r.hologram;if(s===o&&o.open&&!a)return r;this.repositoryCache.delete(e)}let i=Oe(e),n={files:new Vo(i),exports:new Go(i),imports:new qo(i),missions:new Ko(i),intentLogs:new Yo(i),configs:new Xo(i),content:new Qo(i),searchHistory:new es(i),hologram:new ts(i)};return this.repositoryCache.set(e,n),n}static closeInstance(e){this.repositoryCache.delete(e),Nh(e)}static clearCache(e){this.repositoryCache.delete(e)}}});var ls,us,sg,ps,ag,cg,lg,ug,pg,dg,mg,fg,hg,gg,Lr,ds,yg,vg,Gp=de(()=>{"use strict";ls=[/\/pages\/(?!_)[^/]+\.(tsx?|jsx?)$/i,/\/pages\/.*\/index\.(tsx?|jsx?)$/i,/\/app\/.*\/page\.(tsx?|jsx?)$/i,/\/app\/.*\/layout\.(tsx?|jsx?)$/i,/\/app\/api\/.*\/route\.(ts|js)$/i,/\/pages\/api\/.*\.(ts|js)$/i],us=[/\.(routes?|router|controller|handler|endpoint|api)\.(ts|js|tsx|jsx)$/i,/\/routes?\//i,/\/controllers?\//i,/index\.(ts|js|tsx|jsx)$/i],sg=[/\/components?\/.*\.(tsx|jsx)$/i,/\/features?\/.*\.(tsx|jsx)$/i,/\/views?\/.*\.(tsx|jsx)$/i,/\/screens?\/.*\.(tsx|jsx)$/i,/\/widgets?\/.*\.(tsx|jsx)$/i],ps=[/\.(service|usecase|interactor|manager|facade)\.(ts|js)$/i,/\/services?\//i,/\/usecases?\//i,/\/domain\//i,/\/business\//i],ag=[/\/mcp\/handlers?\/[^/]+\.(ts|js)$/i,/\/mcp\/tools?\/[^/]+\.(ts|js)$/i,/\/mcp\/server\.(ts|js)$/i,/\/mcp\/index\.(ts|js)$/i],cg=[/\/mcp\/utils?\.(ts|js)$/i,/\/mcp\/schemas?\.(ts|js)$/i,/\/mcp\/resources?\.(ts|js)$/i],lg=[/\/commands?\/[^/]+\.(ts|js|py|php)$/i,/\/cli\/[^/]+\.(ts|js|py|php)$/i,/\/bin\/[^/]+\.(ts|js|py|php)$/i,/cli\.(ts|js|py|php)$/i,/main\.(ts|js|py|php)$/i],ug=[/\/parser\/[^/]+\.(ts|js)$/i,/\/ast\/[^/]+\.(ts|js)$/i,/\.(parser|visitor|walker|transformer)\.(ts|js)$/i],pg=[/\/core\/[^/]+\.(ts|js)$/i,/\/engine\/[^/]+\.(ts|js)$/i,/\/processing\/[^/]+\.(ts|js)$/i,/\/analysis\/[^/]+\.(ts|js)$/i,/\.(analyzer|processor|scanner|indexer|resolver)\.(ts|js)$/i],dg=[/\/ui\/[^/]+\.(ts|js|tsx|jsx)$/i,/\/display\/[^/]+\.(ts|js)$/i,/\/output\/[^/]+\.(ts|js)$/i,/\.(formatter|renderer|printer)\.(ts|js)$/i],mg=[/\/stores?\//i,/\/slices?\//i,/\/reducers?\//i,/\/atoms?\//i,/\/selectors?\//i,/\.(store|slice|reducer|atom|selector)\.(ts|js)$/i,/.*Slice\.(ts|js)$/i,/.*Store\.(ts|js)$/i],fg=[/\/hooks?\//i,/\/contexts?\//i,/\/providers?\//i,/use[A-Z].*\.(ts|js)$/,/.*Context\.(ts|tsx|js|jsx)$/i,/.*Provider\.(ts|tsx|js|jsx)$/i],hg=[/\/schemas?\//i,/\/validations?\//i,/\.(schema|validation|validator)\.(ts|js)$/i],gg=[/\.(types?|dto|interface|interfaces)\.(ts|js)$/i,/types\.ts$/i,/\/types?\//i,/\/dtos?\//i,/\/interfaces?\//i,/\/contracts?\//i,/\.d\.ts$/i],Lr=[/\.(model|entity|schema|repository|repo|dao|migration|query|mutation|resolver|connection|db)\.(ts|js)$/i,/queries\.(ts|js)$/i,/mutations\.(ts|js)$/i,/resolvers\.(ts|js)$/i,/connection\.(ts|js)$/i,/\/models?\//i,/\/entities?\//i,/\/repositories?\//i,/\/repos?\//i,/\/data\//i,/\/database\//i,/\/prisma\//i,/\/drizzle\//i,/\/api\/.*client\.(ts|js|tsx)$/i,/(^|\/)[A-Z0-9_-]*API\.(tsx?|js|jsx)$/],ds=[/\.(util|utils|helper|helpers|lib|common|shared)\.(ts|js)$/i,/\/utils?\//i,/\/helpers?\//i,/\/lib\//i,/\/common\//i,/\/shared\//i],yg=["express","fastify","koa","hapi","restify","next","nuxt","gatsby","remix","@nestjs/common","@nestjs/core","react-router","vue-router","@angular/router","zod","joi","yup","valibot","superstruct"],vg=["prisma","@prisma/client","typeorm","sequelize","mongoose","drizzle-orm","knex","pg","mysql","sqlite","better-sqlite3","mongodb","redis","ioredis","zustand","redux","recoil","jotai","mobx"]});var ms,bg,fs,xg,qp=de(()=>{"use strict";ms=[/urls\.py$/i,/wsgi\.py$/i,/asgi\.py$/i,/manage\.py$/i,/main\.py$/i,/app\.py$/i,/\/endpoints?\/.*\.py$/i,/\/commands?\/.*\.py$/i],bg=[/views\.py$/i,/forms\.py$/i,/serializers\.py$/i,/admin\.py$/i,/apps\.py$/i,/tasks\.py$/i,/middlewares?\.py$/i,/signals?\.py$/i,/context_processors\.py$/i],fs=[/models\.py$/i,/\/models\/.*\.py$/i,/\/migrations\/.*\.py$/i,/schema\.py$/i,/documents\.py$/i],xg=["django.urls","django.http","flask","fastapi","chalice","tornado"]});var hs,Sg,gs,kg,Kp=de(()=>{"use strict";hs=[/\/routes?\/.*\.php$/i,/\/controllers?\/.*\.php$/i,/index\.php$/i,/server\.php$/i,/artisan$/i,/console$/i],Sg=[/\/services?\/.*\.php$/i,/\/providers?\/.*\.php$/i,/\/middleware\/.*\.php$/i,/\/jobs?\/.*\.php$/i,/\/listeners?\/.*\.php$/i,/\/events?\/.*\.php$/i,/\/observers?\/.*\.php$/i,/\/console\/commands\/.*\.php$/i,/\/actions?\/.*\.php$/i,/\/traits?\/.*\.php$/i,/\/concerns?\/.*\.php$/i,/\/contracts?\/.*\.php$/i],gs=[/\/models?\/.*\.php$/i,/\/eloquent\/.*\.php$/i,/\/migrations?\/.*\.php$/i,/\/seeders?\/.*\.php$/i,/\/factories?\/.*\.php$/i,/\/repositories?\/.*\.php$/i,/\/resources?\/.*\.php$/i],kg=["laravel","symfony","slim","cakephp","codeigniter"]});import wg from"path";function Cr(t,e,r){let i=[],n="Unknown",o=0;r||(r=g$(t,e));let{inDegree:s,outDegree:a}=r,l=(p,m,f,y)=>{for(let b of p)if(b.test(t))return i.push(`${y}: ${b.source}`),n=m,o+=f,!0;return!1},c=!1;if(c||(c=l(ls,"Entry",45,"Next.js entry")),c||(c=l(ag,"Entry",40,"MCP handler")),c||(c=l(lg,"Entry",40,"CLI command")),c||(c=l(Lr,"Data",45,"Data layer/Repository")),c||(c=l(mg,"Data",35,"State management")),c||(c=l(sg,"Logic",40,"React component")),c||(c=l(ps,"Logic",35,"Logic pattern")),c||(c=l(ug,"Logic",35,"Parser/AST")),c||(c=l(pg,"Logic",35,"Core module")),c||(c=l(dg,"Logic",30,"UI layer")),c||(c=l(gg,"Types",35,"Type definition")),c||(c=l(ms,"Entry",40,"Python Entry")),c||(c=l(fs,"Data",40,"Python Data")),c||(c=l(bg,"Logic",35,"Python Logic")),c||(c=l(hs,"Entry",40,"PHP Entry")),c||(c=l(gs,"Data",40,"PHP Data")),c||(c=l(Sg,"Logic",35,"PHP Logic")),c||(c=l(fg,"Logic",35,"Hook/Context")),!c){for(let p of cg)if(p.test(t)){i.push(`MCP utility: ${p.source}`),/schemas?/i.test(t)?n="Types":/resources?/i.test(t)?n="Data":n="Utility",o+=35,c=!0;break}}c||l(hg,"Data",35,"Schema definition")&&(c=!0),c||(l(Lr,"Data",30,"Path matches data pattern")||l(ds,"Utility",25,"Path matches utility pattern")||l(us,"Entry",30,"Path matches entry pattern"))&&(c=!0);for(let p of Yp)if(p.test(t)){i.push(`Test file: ${p.source}`),n="Test",o=50,c=!0;break}c||l(Xp,"Infrastructure",40,"Infrastructure")&&(c=!0);for(let p of h$)p.test(t)&&(i.push(`Monorepo component: ${p.source}`),/\/apps\/[^/]+\/src\/pages\//i.test(t)&&(i.push("Monorepo App Entry"),n==="Unknown"&&(n="Entry"),o+=20),/\/packages\/[^/]+\/src\//i.test(t)&&(o+=10));let d=e.imports.getImportsForFile(t).map(p=>p.module_specifier.toLowerCase());for(let p of vg)if(d.some(m=>m.includes(p))){i.push(`Imports JS data library: ${p}`),(n==="Unknown"||n==="Data")&&(n="Data",o+=25);break}for(let p of xg)if(d.some(m=>m.includes(p))){i.push(`Imports Python framework: ${p}`),(n==="Unknown"||n==="Entry")&&(n="Entry",o+=20);break}for(let p of kg)if(d.some(m=>m.includes(p))){i.push(`Imports PHP framework: ${p}`),(n==="Unknown"||n==="Entry")&&(n="Entry",o+=20);break}for(let p of yg)if(d.some(m=>m.includes(p))){i.push(`Imports JS framework: ${p}`),(n==="Unknown"||n==="Entry")&&(n="Entry",o+=20);break}if(s===0&&a>0&&(i.push("Entry point: nothing imports this file (in-degree=0)"),n==="Unknown"?(n="Entry",o+=30):n==="Entry"&&(o+=15)),s>5&&a<=2&&(i.push(`High reuse: ${s} files import this (candidate for Utility)`),n==="Unknown"?(n="Utility",o+=25):n==="Utility"&&(o+=10)),n==="Unknown"&&s>0&&a>0){let p=s/(s+a);p>.3&&p<.7&&(i.push(`Balanced traffic: in=${s}, out=${a} (likely Logic layer)`),n="Logic",o+=25)}return n==="Unknown"&&(i.push("No strong classification signals detected"),o=10),o=Math.min(o,100),{layer:n,confidence:o,signals:i}}function g$(t,e){let r=e.imports.countDependents(t),i=e.imports.countByFile(t);return{inDegree:r,outDegree:i}}function nt(t,e){let r=t.files.getAllPaths().map(f=>({path:f})),i=new Map,n={Entry:[],Logic:[],Data:[],Utility:[],Infrastructure:[],Test:[],Types:[],Unknown:[]};for(let f of r){let y=Cr(f.path,t);i.set(f.path,y),n[y.layer].push({path:f.path,classification:y})}let o={Entry:zt(n.Entry,e),Logic:zt(n.Logic,e),Data:zt(n.Data,e),Utility:zt(n.Utility,e),Infrastructure:zt(n.Infrastructure,e),Test:zt(n.Test,e),Types:zt(n.Types,e),Unknown:zt(n.Unknown,e)},s={};r.forEach(f=>{let y=wg.extname(f.path).toLowerCase();y&&(s[y]=(s[y]||0)+1)});let a={".ts":"TypeScript",".tsx":"Typescript (React)",".js":"JavaScript",".jsx":"JavaScript (React)",".py":"Python",".php":"PHP",".go":"Go",".rs":"Rust",".java":"Java",".cs":"C#",".rb":"Ruby",".vue":"Vue"},l={};Object.entries(s).forEach(([f,y])=>{let b=a[f];b&&(l[b]=(l[b]||0)+y)});let c=Object.entries(l).sort((f,y)=>y[1]-f[1]),u=c.length>0?c[0][0]:"Unknown",{pattern:d,patternConfidence:p,insights:m}=y$(o,r.length,t);return{pattern:d,patternConfidence:p,layers:o,insights:m,primaryStack:u}}function zt(t,e){return t.sort((r,i)=>i.classification.confidence-r.classification.confidence),{count:t.length,topFiles:t.slice(0,5).map(r=>({path:wg.relative(e,r.path),confidence:r.classification.confidence,signals:r.classification.signals.slice(0,2)}))}}function y$(t,e,r){let i=[],n="Unknown",o=0,s=t.Entry.count/e*100,a=t.Logic.count/e*100,l=t.Data.count/e*100,c=t.Utility.count/e*100,u=t.Unknown.count/e*100;s>5&&a>10&&l>5&&u<40?(n="Layered",o=60+Math.min(30,(100-u)/3),i.push(`Clear layer separation: Entry (${s.toFixed(1)}%), Logic (${a.toFixed(1)}%), Data (${l.toFixed(1)}%)`)):c>20?(n="Modular",o=50+c/2,i.push(`High shared module usage: ${c.toFixed(1)}% utility files`)):u>60&&(n="Monolithic",o=40+u/4,i.push(`Limited architectural structure: ${u.toFixed(1)}% files with unclear layer assignment`));let d=r.configs.countByKind("Service");return d>3&&(n="Microservices",o=55+d*5,i.push(`Detected ${d} service definitions (likely microservices)`)),t.Entry.count===0&&i.push("\u26A0\uFE0F No clear entry points detected - consider adding route/controller files"),t.Data.count===0&&i.push("\u26A0\uFE0F No data layer detected - repository may not use traditional ORM patterns"),c>30&&i.push(`High utility concentration (${c.toFixed(1)}%) - good reusability`),{pattern:n,patternConfidence:Math.min(100,o),insights:i}}var Yp,Xp,h$,Dt=de(()=>{"use strict";Gp();qp();Kp();Yp=[/\.(test|spec)\.(ts|tsx|js|jsx)$/i,/tests?\.py$/i,/\/__tests__\//i,/\/tests?\//i,/\.e2e\.(ts|js)$/i,/\.integration\.(ts|js)$/i],Xp=[/Dockerfile/i,/docker-compose/i,/\.ya?ml$/i,/nginx\.conf/i,/\/infra\//i,/\/deploy\//i,/\/k8s\//i,/\/kubernetes\//i,/\/terraform\//i,/\/ansible\//i,/package\.json/i,/tsconfig.*\.json/i,/\.env/i],h$=[/\/apps\/[^/]+\//i,/\/services\/[^/]+\//i,/\/packages\/[^/]+\//i,/\/backends\/[^/]+\//i,/\/backends_python\/[^/]+\//i]});var Ig={};Ue(Ig,{HologramService:()=>pe});var We,pe,Be=de(()=>{"use strict";X();Dt();F();We=$.child({module:"hologram"}),pe=class{repos;repoPath;constructor(e){this.repoPath=e,this.repos=L.getInstance(e)}updateTopography(e){We.debug({repoPath:this.repoPath},"Updating topography snapshot");let r=Object.values(e.layers).reduce((o,s)=>o+s.count,0),i={};for(let[o,s]of Object.entries(e.layers)){let a=r>0?s.count/r*100:0;i[o]={count:s.count,percentage:Math.round(a*10)/10,topFiles:s.topFiles.slice(0,3).map(l=>({path:l.path,confidence:l.confidence}))}}let n={pattern:e.pattern,patternConfidence:e.patternConfidence,layerDistribution:i,insights:e.insights,updatedAt:Date.now()};this.repos.hologram.upsertSection("topography",JSON.stringify(n)),We.info({repoPath:this.repoPath},"Topography snapshot updated")}updateGravityZones(e){We.debug({repoPath:this.repoPath,count:e.length},"Updating gravity zones");let r={hotspots:e.slice(0,10),updatedAt:Date.now()};this.repos.hologram.upsertSection("gravity",JSON.stringify(r)),We.info({repoPath:this.repoPath},"Gravity zones updated")}updateGhostBridges(e){We.debug({repoPath:this.repoPath,count:e.length},"Updating ghost bridges");let r={bridges:e.slice(0,20),updatedAt:Date.now()};this.repos.hologram.upsertSection("ghosts",JSON.stringify(r)),We.info({repoPath:this.repoPath},"Ghost bridges updated")}getSnapshot(){let e=this.repos.hologram.getAllSections(),r={metadata:{repoPath:this.repoPath,lastUpdated:Date.now(),version:"1.0.0"}};for(let i of e)try{let n=JSON.parse(i.data);switch(i.section){case"topography":r.topography=n;break;case"gravity":r.gravity=n;break;case"ghosts":r.ghosts=n;break}}catch(n){We.error({repoPath:this.repoPath,section:i.section,error:n},"Failed to parse hologram section")}return r}getSection(e){let r=this.repos.hologram.getSection(e);if(!r)return null;try{return JSON.parse(r.data)}catch(i){return We.error({repoPath:this.repoPath,section:e,error:i},"Failed to parse section"),null}}computeGravityZones(){We.debug({repoPath:this.repoPath},"Computing gravity zones from import graph");let e=this.repos.files.getAllPaths(),r=new Map;for(let n of e){let o=Cr(n,this.repos);if(o.layer==="Test"||o.layer==="Unknown")continue;let s=this.repos.exports.findByFile(n);if(s.length===0)continue;let a=this.repos.imports.countDependents(n),l=this.repos.imports.countByFile(n),c=a*2+l;if(c>0){let u=s.find(p=>p.kind!=="TsTypeAliasDeclaration"&&p.kind!=="TsInterfaceDeclaration")||s[0],d=`${n}::${u.name}`;r.set(d,{symbol:u.name,filePath:n,inDegree:a,outDegree:l,gravity:c})}}let i=Array.from(r.values()).sort((n,o)=>o.gravity-n.gravity).slice(0,20);return We.info({repoPath:this.repoPath,count:i.length},"Gravity zones computed"),i}isInitialized(){return this.repos.hologram.getAllSections().length>0}clear(){this.repos.hologram.deleteAll(),We.info({repoPath:this.repoPath},"Hologram cleared")}}});var Hg={};Ue(Hg,{GraphExporterService:()=>nd});var Zg,nd,Wg=de(()=>{"use strict";X();F();Zg=$.child({module:"graph-exporter"}),nd=class{constructor(e){this.repoPath=e;this.repos=L.getInstance(e)}repos;async generateGraph(e={}){let{includeCompleted:r=!0,format:i="mermaid",focusMissionId:n,depth:o=10,limit:s=100}=e;Zg.info({focusMissionId:n,depth:o,format:i,includeCompleted:r},"Generating mission graph");let a=this.buildMissionTree(n,r,o,s);return i==="json"?JSON.stringify(a,null,2):this.generateMermaidDiagram(a)}buildMissionTree(e,r,i,n){let o;if(e){let l=this.repos.missions.findById(e);o=l?[l]:[]}else o=this.repos.missions.findAll().filter(c=>!c.parent_id),r||(o=o.filter(c=>c.status!=="completed"));let s=0,a=[];for(let l of o){if(s>=n)break;let c=this.buildNode(l,r,i,1,{count:s,max:n});c&&(a.push(c),s+=this.countNodes(c))}return a}buildNode(e,r,i,n,o){if(n>i||o.count>=o.max)return null;let s;if(e.strategy_graph)try{let u=JSON.parse(e.strategy_graph);s=this.parseStrategySteps(u)}catch(u){Zg.debug({missionId:e.id,err:u},"Failed to parse strategy graph")}let a={id:e.id,name:e.name,status:e.status,goal:e.goal,branch:e.git_branch||void 0,children:[],steps:s},l=this.repos.missions.findByParentId(e.id),c=r?l:l.filter(u=>u.status!=="completed");for(let u of c){if(o.count>=o.max)break;let d=this.buildNode(u,r,i,n+1,o);d&&(a.children.push(d),o.count++)}return a}parseStrategySteps(e){let r=[];return Array.isArray(e)?e.map((i,n)=>({id:i.id||`step-${n}`,description:i.description||i.content||i.name||`Step ${n+1}`,status:i.status,dependencies:i.dependencies||i.deps})):e.steps&&Array.isArray(e.steps)?this.parseStrategySteps(e.steps):typeof e=="object"?Object.entries(e).map(([i,n])=>({id:i,description:n.description||n.content||i,status:n.status,dependencies:n.dependencies||n.deps})):r}countNodes(e){let r=1;for(let i of e.children)r+=this.countNodes(i);return r}generateMermaidDiagram(e){let r=["graph TD"];for(let i of e)this.addMermaidNode(i,r);return r.join(`
417
+ `)}addMermaidNode(e,r,i){let n=`M${e.id}`,o=this.getStatusIcon(e.status),s=this.getStatusClass(e.status),a=`${o} ${e.name}`;if(r.push(` ${n}["${this.escapeMermaid(a)}"]:::${s}`),i&&r.push(` ${i} --> ${n}`),e.steps&&e.steps.length>0&&e.steps.length<=10)for(let l of e.steps){let c=`S${e.id}_${l.id}`,u=l.status||"pending",d=this.getStatusIcon(u),p=this.getStatusClass(u),m=`${d} ${l.description}`;if(r.push(` ${c}["${this.escapeMermaid(m)}"]:::${p}`),r.push(` ${n} -.-> ${c}`),l.dependencies&&l.dependencies.length>0)for(let f of l.dependencies){let y=`S${e.id}_${f}`;r.push(` ${y} --> ${c}`)}}for(let l of e.children)this.addMermaidNode(l,r,n);i||(r.push(""),r.push(" classDef completed fill:#90EE90,stroke:#2E8B57,stroke-width:2px"),r.push(" classDef inProgress fill:#87CEEB,stroke:#4682B4,stroke-width:2px"),r.push(" classDef planned fill:#FFE4B5,stroke:#DAA520,stroke-width:2px"),r.push(" classDef suspended fill:#D3D3D3,stroke:#808080,stroke-width:2px"),r.push(" classDef failed fill:#FFB6C1,stroke:#DC143C,stroke-width:2px"),r.push(" classDef pending fill:#FFF8DC,stroke:#B8860B,stroke-width:1px"))}getStatusIcon(e){return{completed:"\u2713","in-progress":"\u26A1",planned:"\u{1F4CB}",suspended:"\u23F8",failed:"\u2717",pending:"\u25CB",verifying:"\u{1F50D}"}[e]||"\u25CB"}getStatusClass(e){return{completed:"completed","in-progress":"inProgress",planned:"planned",suspended:"suspended",failed:"failed",pending:"pending",verifying:"inProgress"}[e]||"pending"}escapeMermaid(e){return e.replace(/"/g,"#quot;").replace(/\n/g," ").replace(/\[/g,"#91;").replace(/]/g,"#93;").slice(0,100)}}});import{Server as JS}from"@modelcontextprotocol/sdk/server/index.js";import{StdioServerTransport as VS}from"@modelcontextprotocol/sdk/server/stdio.js";import{CallToolRequestSchema as GS,ListToolsRequestSchema as qS,ListResourcesRequestSchema as KS,ReadResourceRequestSchema as YS}from"@modelcontextprotocol/sdk/types.js";var Pd=[{name:"shadow_recon_onboard",description:"Initial onboarding for a repository. Indexes all files, extracts symbols, and detects services.",inputSchema:{type:"object",properties:{repoPath:{type:"string",description:"Absolute path to the repository root"}},required:["repoPath"]}},{name:"shadow_recon_topography",description:"Analyze architectural layers (Entry/Logic/Data/Utility). Returns layer breakdown and architectural insights.",inputSchema:{type:"object",properties:{repoPath:{type:"string",description:"Absolute path to the repository root"}},required:["repoPath"]}},{name:"shadow_recon_scout",description:"(Expert) Detect architectural drift, pattern violations, and gravity anomalies.",inputSchema:{type:"object",properties:{repoPath:{type:"string",description:"Absolute path to the repository root"}},required:["repoPath"]}},{name:"shadow_recon_tree",description:"Generate hierarchical file tree with file classifications and export summaries.",inputSchema:{type:"object",properties:{repoPath:{type:"string",description:"Absolute path to the repository root"},subPath:{type:"string",description:"Relative path to focus tree on a specific subdirectory"},maxDepth:{type:"number",description:"Maximum directory depth to traverse"}},required:["repoPath"]}},{name:"shadow_recon_hologram",description:"Get the project hologram (persistent architectural snapshot) and gravity zones.",inputSchema:{type:"object",properties:{repoPath:{type:"string",description:"Absolute path to the repository root"}},required:["repoPath"]}},{name:"shadow_search_concept",description:"Semantic/Vector-based intent search across file purpose and logic.",inputSchema:{type:"object",properties:{repoPath:{type:"string",description:"Absolute path to the repository"},query:{type:"string",description:"Search term or semantic intent"},limit:{type:"number",description:"Max results (default 10)"},offset:{type:"number",description:"Pagination offset"},skipSync:{type:"boolean",description:"Skip index sync before search"},compact:{type:"boolean",description:"Return compact output (no snippets)"},fileType:{type:"string",description:"Filter by extension(s)"},layer:{type:"string",enum:["Solid","Liquid","Virtual","Intel","Phantom"]},includeTests:{type:"boolean",description:"Include test files (Virtual)"}},required:["repoPath","query"]}},{name:"shadow_search_symbol",description:"Exact and fuzzy code symbol matching (classes, functions, methods).",inputSchema:{type:"object",properties:{repoPath:{type:"string",description:"Absolute path to the repository"},query:{type:"string",description:"Symbol name or partial name"},limit:{type:"number",description:"Max results"},offset:{type:"number",description:"Pagination offset"},skipSync:{type:"boolean",description:"Skip index sync"},fileType:{type:"string",description:"Filter by extension(s)"}},required:["repoPath","query"]}},{name:"shadow_search_config",description:"Environment and configuration discovery (ENV, Ports, Docker, YAML).",inputSchema:{type:"object",properties:{repoPath:{type:"string",description:"Absolute path to the repository"},query:{type:"string",description:"Search term for values/keys"},key:{type:"string",description:"Specific config key match"},kind:{type:"string",enum:["Service","Image","Port","Env"]},limit:{type:"number"}},required:["repoPath"]}},{name:"shadow_search_path",description:"Filename-keyword resolution using the search index.",inputSchema:{type:"object",properties:{repoPath:{type:"string",description:"Absolute path to the repository"},query:{type:"string",description:"Filename part or path keyword"},limit:{type:"number"}},required:["repoPath","query"]}},{name:"shadow_analyze_impact",description:"Calculate blast radius and Strategic Risk Scoring of changing a symbol.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},symbolName:{type:"string",description:"Symbol to analyze"},filePath:{type:"string",description:"Specific file where symbol is defined"},depth:{type:"number",description:"Traversal depth (default 3)"}},required:["repoPath","symbolName"]}},{name:"shadow_analyze_flow",description:"Execution call-chain tracing (AST-based) for a specific function/method.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},filePath:{type:"string",description:"File to start trace from"},symbolName:{type:"string",description:"Function/method name"}},required:["repoPath","filePath"]}},{name:"shadow_analyze_deps",description:"Direct file import/export mapping and dependency graph inspection.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},filePath:{type:"string"},direction:{type:"string",enum:["imports","imported_by"]}},required:["repoPath","filePath","direction"]}},{name:"shadow_analyze_debt",description:"Recursive dead-code detection and circular import identification.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},mode:{type:"string",enum:["dead-code","circular-deps"]},limit:{type:"number"},includeTests:{type:"boolean"}},required:["repoPath","mode"]}}];var Nd=[{name:"shadow_ops_plan",description:"Create a new development mission or strategic initiative with goals and strategy.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},name:{type:"string",description:"Mission name"},goal:{type:"string",description:"Objective and success criteria"},strategy:{type:"string",description:"JSON strategy (steps DAG)"},parentId:{type:"number",description:"ID of parent mission"},outcomeContract:{type:"string",description:"Success verification contract"},templateId:{type:"string",enum:["refactoring","feature","bug-fix"]},templateVars:{type:"object",description:"Template variables"}},required:["repoPath"]}},{name:"shadow_ops_track",description:"Update mission step status, record progress, and track completion.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},missionId:{type:"number"},stepId:{type:"string"},status:{type:"string",enum:["pending","in-progress","completed","failed","skipped"]},contextPivot:{type:"string",description:"Rationale for status change"},updates:{type:"array",items:{type:"object",properties:{stepId:{type:"string"},status:{type:"string"},contextPivot:{type:"string"}}}}},required:["repoPath","missionId"]}},{name:"shadow_ops_log",description:"Record architectural decisions, discoveries, or blockers to the intent log.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},missionId:{type:"number"},type:{type:"string",enum:["decision","blocker","discovery","fix"]},content:{type:"string"},symbolName:{type:"string",description:"Symbol related to this intent"}},required:["repoPath","missionId","type","content"]}},{name:"shadow_ops_briefing",description:"Active situational awareness - Get details on missions, decisions, and next steps.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},missionId:{type:"number",description:"Optional specific mission ID"},scope:{type:"string",enum:["mission","project"]},includeGroupedByParent:{type:"boolean"}},required:["repoPath"]}},{name:"shadow_ops_synthesize",description:"Distill mission context and logs into an Architectural Decision Record (ADR).",inputSchema:{type:"object",properties:{repoPath:{type:"string"},missionId:{type:"number"}},required:["repoPath","missionId"]}},{name:"shadow_ops_chronicle",description:"Archive feed of the repository narrative (initiatives and standalones).",inputSchema:{type:"object",properties:{repoPath:{type:"string"},format:{type:"string",enum:["markdown","json"]},limit:{type:"number"},offset:{type:"number"},since:{type:"number"},until:{type:"number"}},required:["repoPath"]}},{name:"shadow_ops_context",description:'Session-start bundle in one call: hologram + chronicle (last 5) + briefing summary (counts, next_work_candidates). Use for "new chat, give me the world" without multiple round-trips.',inputSchema:{type:"object",properties:{repoPath:{type:"string"}},required:["repoPath"]}},{name:"shadow_ops_health",description:"System health metrics and intelligence index status.",inputSchema:{type:"object",properties:{repoPath:{type:"string"}},required:["repoPath"]}},{name:"shadow_ops_graph",description:"Visualize mission lineage and dependencies.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},missionId:{type:"number"},depth:{type:"number"},limit:{type:"number"},format:{type:"string",enum:["mermaid","json"]}},required:["repoPath"]}},{name:"shadow_inspect_symbol",description:"Dense code retrieval for a single symbol with semantic folding and usage context.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},symbolName:{type:"string"},filePath:{type:"string"},context:{type:"string",enum:["definition","full"]}},required:["repoPath","symbolName"]}},{name:"shadow_inspect_file",description:"Token-efficient summary of ALL symbols and exports in a file.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},filePath:{type:"string"},detailLevel:{type:"string",enum:["structure","signatures","summaries","detailed"]}},required:["repoPath","filePath"]}},{name:"shadow_sync_trace",description:"Full lifecycle synchronization - Repairs index, analyzes changes, and re-hydrates state.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},sinceCommit:{type:"string"}},required:["repoPath"]}},{name:"shadow_sync_index",description:"Incremental code re-indexing to reflect latest file changes.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},deep:{type:"boolean",description:"Force full rebuild"}},required:["repoPath"]}},{name:"shadow_sync_repair",description:"NanoRepair only - Heals broken intent links and symbol shifts.",inputSchema:{type:"object",properties:{repoPath:{type:"string"}},required:["repoPath"]}},{name:"shadow_env_hooks",description:"Install and manage Git hooks for automated intelligence maintenance.",inputSchema:{type:"object",properties:{repoPath:{type:"string"},action:{type:"string",enum:["install","remove","status"]},enableAutoRefresh:{type:"boolean"},enableSymbolHealing:{type:"boolean"}},required:["repoPath","action"]}},{name:"shadow_env_diagnose",description:"Missions and intelligence toolset health check.",inputSchema:{type:"object",properties:{repoPath:{type:"string"}},required:["repoPath"]}},{name:"shadow_workspace_list",description:"Federated view of active missions across multiple repositories.",inputSchema:{type:"object",properties:{repoPaths:{type:"array",items:{type:"string"}},status:{type:"string"}},required:["repoPaths"]}},{name:"shadow_workspace_link",description:"Establish intent-level dependencies between missions in different repos.",inputSchema:{type:"object",properties:{parentRepoPath:{type:"string"},parentMissionId:{type:"number"},childRepoPath:{type:"string"},childMissionId:{type:"number"},relationship:{type:"string"}},required:["parentRepoPath","parentMissionId","childRepoPath","childMissionId","relationship"]}},{name:"shadow_workspace_fuse",description:"Create unified cross-repo search indices using SQLite fusion.",inputSchema:{type:"object",properties:{repoPaths:{type:"array",items:{type:"string"}},name:{type:"string"}},required:["repoPaths"]}}];var h={};Ue(h,{$brand:()=>ei,$input:()=>ol,$output:()=>il,NEVER:()=>Us,TimePrecision:()=>ll,ZodAny:()=>Xu,ZodArray:()=>np,ZodBase64:()=>To,ZodBase64URL:()=>Ro,ZodBigInt:()=>Dn,ZodBigIntFormat:()=>zo,ZodBoolean:()=>zn,ZodCIDRv4:()=>wo,ZodCIDRv6:()=>Io,ZodCUID:()=>_o,ZodCUID2:()=>bo,ZodCatch:()=>kp,ZodCodec:()=>Uo,ZodCustom:()=>zr,ZodCustomStringFormat:()=>Pn,ZodDate:()=>Ir,ZodDefault:()=>vp,ZodDiscriminatedUnion:()=>ip,ZodE164:()=>Po,ZodEmail:()=>go,ZodEmoji:()=>yo,ZodEnum:()=>Tn,ZodError:()=>Ix,ZodExactOptional:()=>hp,ZodFile:()=>mp,ZodFirstPartyTypeKind:()=>Lp,ZodFunction:()=>Dp,ZodGUID:()=>$r,ZodIPv4:()=>ko,ZodIPv6:()=>Eo,ZodISODate:()=>lo,ZodISODateTime:()=>co,ZodISODuration:()=>po,ZodISOTime:()=>uo,ZodIntersection:()=>op,ZodIssueCode:()=>Rx,ZodJWT:()=>No,ZodKSUID:()=>So,ZodLazy:()=>Pp,ZodLiteral:()=>dp,ZodMAC:()=>Bu,ZodMap:()=>up,ZodNaN:()=>wp,ZodNanoID:()=>vo,ZodNever:()=>ep,ZodNonOptional:()=>jo,ZodNull:()=>Ku,ZodNullable:()=>yp,ZodNumber:()=>Nn,ZodNumberFormat:()=>qt,ZodObject:()=>Rr,ZodOptional:()=>Co,ZodPipe:()=>Mo,ZodPrefault:()=>bp,ZodPromise:()=>zp,ZodReadonly:()=>Ip,ZodRealError:()=>Te,ZodRecord:()=>Nr,ZodSet:()=>pp,ZodString:()=>Rn,ZodStringFormat:()=>re,ZodSuccess:()=>Sp,ZodSymbol:()=>Gu,ZodTemplateLiteral:()=>Rp,ZodTransform:()=>fp,ZodTuple:()=>ap,ZodType:()=>K,ZodULID:()=>xo,ZodURL:()=>wr,ZodUUID:()=>Xe,ZodUndefined:()=>qu,ZodUnion:()=>Pr,ZodUnknown:()=>Qu,ZodVoid:()=>tp,ZodXID:()=>$o,ZodXor:()=>rp,_ZodString:()=>ho,_default:()=>_p,_function:()=>ph,any:()=>Hf,array:()=>Tr,base64:()=>wf,base64url:()=>If,bigint:()=>jf,boolean:()=>Vu,catch:()=>Ep,check:()=>dh,cidrv4:()=>kf,cidrv6:()=>Ef,clone:()=>Se,codec:()=>ch,coerce:()=>Cp,config:()=>ue,core:()=>ut,cuid:()=>gf,cuid2:()=>yf,custom:()=>mh,date:()=>Bf,decode:()=>ju,decodeAsync:()=>Uu,describe:()=>fh,discriminatedUnion:()=>Yf,e164:()=>Tf,email:()=>sf,emoji:()=>ff,encode:()=>Cu,encodeAsync:()=>Mu,endsWith:()=>vn,enum:()=>Ao,exactOptional:()=>gp,file:()=>ih,flattenError:()=>lr,float32:()=>Of,float64:()=>Af,formatError:()=>ur,fromJSONSchema:()=>xh,function:()=>ph,getErrorMap:()=>Nx,globalRegistry:()=>be,gt:()=>Ke,gte:()=>ke,guid:()=>af,hash:()=>Df,hex:()=>zf,hostname:()=>Nf,httpUrl:()=>mf,includes:()=>gn,instanceof:()=>gh,int:()=>fo,int32:()=>Lf,int64:()=>Mf,intersection:()=>sp,ipv4:()=>xf,ipv6:()=>Sf,iso:()=>In,json:()=>vh,jwt:()=>Rf,keyof:()=>Jf,ksuid:()=>bf,lazy:()=>Np,length:()=>Vt,literal:()=>rh,locales:()=>vr,looseObject:()=>qf,looseRecord:()=>Qf,lowercase:()=>fn,lt:()=>qe,lte:()=>De,mac:()=>$f,map:()=>eh,maxLength:()=>Jt,maxSize:()=>Et,meta:()=>hh,mime:()=>_n,minLength:()=>lt,minSize:()=>Ye,multipleOf:()=>kt,nan:()=>ah,nanoid:()=>hf,nativeEnum:()=>nh,negative:()=>Xi,never:()=>Do,nonnegative:()=>eo,nonoptional:()=>$p,nonpositive:()=>Qi,normalize:()=>bn,null:()=>Yu,nullable:()=>kr,nullish:()=>oh,number:()=>Ju,object:()=>Vf,optional:()=>Sr,overwrite:()=>Ze,parse:()=>Du,parseAsync:()=>Ou,partialRecord:()=>Xf,pipe:()=>Er,positive:()=>Yi,prefault:()=>xp,preprocess:()=>_h,prettifyError:()=>Xs,promise:()=>uh,property:()=>to,readonly:()=>Tp,record:()=>lp,refine:()=>Op,regex:()=>mn,regexes:()=>Ce,registry:()=>Pi,safeDecode:()=>Zu,safeDecodeAsync:()=>Wu,safeEncode:()=>Fu,safeEncodeAsync:()=>Hu,safeParse:()=>Au,safeParseAsync:()=>Lu,set:()=>th,setErrorMap:()=>Px,size:()=>Bt,slugify:()=>kn,startsWith:()=>yn,strictObject:()=>Gf,string:()=>mo,stringFormat:()=>Pf,stringbool:()=>yh,success:()=>sh,superRefine:()=>Ap,symbol:()=>Ff,templateLiteral:()=>lh,toJSONSchema:()=>oo,toLowerCase:()=>$n,toUpperCase:()=>Sn,transform:()=>Lo,treeifyError:()=>Ys,trim:()=>xn,tuple:()=>cp,uint32:()=>Cf,uint64:()=>Uf,ulid:()=>vf,undefined:()=>Zf,union:()=>Oo,unknown:()=>Gt,uppercase:()=>hn,url:()=>df,util:()=>z,uuid:()=>cf,uuidv4:()=>lf,uuidv6:()=>uf,uuidv7:()=>pf,void:()=>Wf,xid:()=>_f,xor:()=>Kf});var ut={};Ue(ut,{$ZodAny:()=>wc,$ZodArray:()=>Nc,$ZodAsyncError:()=>Fe,$ZodBase64:()=>gc,$ZodBase64URL:()=>yc,$ZodBigInt:()=>Si,$ZodBigIntFormat:()=>$c,$ZodBoolean:()=>fr,$ZodCIDRv4:()=>mc,$ZodCIDRv6:()=>fc,$ZodCUID:()=>tc,$ZodCUID2:()=>nc,$ZodCatch:()=>qc,$ZodCheck:()=>ie,$ZodCheckBigIntFormat:()=>Na,$ZodCheckEndsWith:()=>Ha,$ZodCheckGreaterThan:()=>gi,$ZodCheckIncludes:()=>Fa,$ZodCheckLengthEquals:()=>Ca,$ZodCheckLessThan:()=>hi,$ZodCheckLowerCase:()=>Ma,$ZodCheckMaxLength:()=>Aa,$ZodCheckMaxSize:()=>za,$ZodCheckMimeType:()=>Ba,$ZodCheckMinLength:()=>La,$ZodCheckMinSize:()=>Da,$ZodCheckMultipleOf:()=>Ra,$ZodCheckNumberFormat:()=>Pa,$ZodCheckOverwrite:()=>Ja,$ZodCheckProperty:()=>Wa,$ZodCheckRegex:()=>ja,$ZodCheckSizeEquals:()=>Oa,$ZodCheckStartsWith:()=>Za,$ZodCheckStringFormat:()=>pn,$ZodCheckUpperCase:()=>Ua,$ZodCodec:()=>gr,$ZodCustom:()=>rl,$ZodCustomStringFormat:()=>bc,$ZodDate:()=>Pc,$ZodDefault:()=>Bc,$ZodDiscriminatedUnion:()=>Oc,$ZodE164:()=>vc,$ZodEmail:()=>Ya,$ZodEmoji:()=>Qa,$ZodEncodeError:()=>_t,$ZodEnum:()=>Mc,$ZodError:()=>cr,$ZodExactOptional:()=>Hc,$ZodFile:()=>Fc,$ZodFunction:()=>el,$ZodGUID:()=>qa,$ZodIPv4:()=>uc,$ZodIPv6:()=>pc,$ZodISODate:()=>ac,$ZodISODateTime:()=>sc,$ZodISODuration:()=>lc,$ZodISOTime:()=>cc,$ZodIntersection:()=>Ac,$ZodJWT:()=>_c,$ZodKSUID:()=>oc,$ZodLazy:()=>nl,$ZodLiteral:()=>Uc,$ZodMAC:()=>dc,$ZodMap:()=>Cc,$ZodNaN:()=>Kc,$ZodNanoID:()=>ec,$ZodNever:()=>Tc,$ZodNonOptional:()=>Vc,$ZodNull:()=>Ec,$ZodNullable:()=>Wc,$ZodNumber:()=>$i,$ZodNumberFormat:()=>xc,$ZodObject:()=>im,$ZodObjectJIT:()=>zc,$ZodOptional:()=>Ei,$ZodPipe:()=>Yc,$ZodPrefault:()=>Jc,$ZodPromise:()=>tl,$ZodReadonly:()=>Xc,$ZodRealError:()=>Ie,$ZodRecord:()=>Lc,$ZodRegistry:()=>Ri,$ZodSet:()=>jc,$ZodString:()=>Wt,$ZodStringFormat:()=>ne,$ZodSuccess:()=>Gc,$ZodSymbol:()=>Sc,$ZodTemplateLiteral:()=>Qc,$ZodTransform:()=>Zc,$ZodTuple:()=>ki,$ZodType:()=>G,$ZodULID:()=>rc,$ZodURL:()=>Xa,$ZodUUID:()=>Ka,$ZodUndefined:()=>kc,$ZodUnion:()=>hr,$ZodUnknown:()=>Ic,$ZodVoid:()=>Rc,$ZodXID:()=>ic,$ZodXor:()=>Dc,$brand:()=>ei,$constructor:()=>v,$input:()=>ol,$output:()=>il,Doc:()=>mr,JSONSchema:()=>rf,JSONSchemaGenerator:()=>so,NEVER:()=>Us,TimePrecision:()=>ll,_any:()=>Pl,_array:()=>Cl,_base64:()=>Vi,_base64url:()=>Gi,_bigint:()=>Sl,_boolean:()=>xl,_catch:()=>_x,_check:()=>nf,_cidrv4:()=>Bi,_cidrv6:()=>Ji,_coercedBigint:()=>kl,_coercedBoolean:()=>$l,_coercedDate:()=>Al,_coercedNumber:()=>hl,_coercedString:()=>al,_cuid:()=>ji,_cuid2:()=>Mi,_custom:()=>Ml,_date:()=>Ol,_decode:()=>si,_decodeAsync:()=>ci,_default:()=>gx,_discriminatedUnion:()=>ix,_e164:()=>qi,_email:()=>Ni,_emoji:()=>Li,_encode:()=>oi,_encodeAsync:()=>ai,_endsWith:()=>vn,_enum:()=>ux,_file:()=>jl,_float32:()=>yl,_float64:()=>vl,_gt:()=>Ke,_gte:()=>ke,_guid:()=>_r,_includes:()=>gn,_int:()=>gl,_int32:()=>_l,_int64:()=>El,_intersection:()=>ox,_ipv4:()=>Hi,_ipv6:()=>Wi,_isoDate:()=>pl,_isoDateTime:()=>ul,_isoDuration:()=>ml,_isoTime:()=>dl,_jwt:()=>Ki,_ksuid:()=>Zi,_lazy:()=>Sx,_length:()=>Vt,_literal:()=>dx,_lowercase:()=>fn,_lt:()=>qe,_lte:()=>De,_mac:()=>cl,_map:()=>cx,_max:()=>De,_maxLength:()=>Jt,_maxSize:()=>Et,_mime:()=>_n,_min:()=>ke,_minLength:()=>lt,_minSize:()=>Ye,_multipleOf:()=>kt,_nan:()=>Ll,_nanoid:()=>Ci,_nativeEnum:()=>px,_negative:()=>Xi,_never:()=>zl,_nonnegative:()=>eo,_nonoptional:()=>yx,_nonpositive:()=>Qi,_normalize:()=>bn,_null:()=>Rl,_nullable:()=>hx,_number:()=>fl,_optional:()=>fx,_overwrite:()=>Ze,_parse:()=>an,_parseAsync:()=>cn,_pipe:()=>bx,_positive:()=>Yi,_promise:()=>kx,_property:()=>to,_readonly:()=>xx,_record:()=>ax,_refine:()=>Ul,_regex:()=>mn,_safeDecode:()=>ui,_safeDecodeAsync:()=>di,_safeEncode:()=>li,_safeEncodeAsync:()=>pi,_safeParse:()=>ln,_safeParseAsync:()=>un,_set:()=>lx,_size:()=>Bt,_slugify:()=>kn,_startsWith:()=>yn,_string:()=>sl,_stringFormat:()=>En,_stringbool:()=>Wl,_success:()=>vx,_superRefine:()=>Fl,_symbol:()=>Il,_templateLiteral:()=>$x,_toLowerCase:()=>$n,_toUpperCase:()=>Sn,_transform:()=>mx,_trim:()=>xn,_tuple:()=>sx,_uint32:()=>bl,_uint64:()=>wl,_ulid:()=>Ui,_undefined:()=>Tl,_union:()=>nx,_unknown:()=>Nl,_uppercase:()=>hn,_url:()=>br,_uuid:()=>zi,_uuidv4:()=>Di,_uuidv6:()=>Oi,_uuidv7:()=>Ai,_void:()=>Dl,_xid:()=>Fi,_xor:()=>rx,clone:()=>Se,config:()=>ue,createStandardJSONSchemaMethod:()=>wn,createToJSONSchemaMethod:()=>Bl,decode:()=>I_,decodeAsync:()=>R_,describe:()=>Zl,encode:()=>w_,encodeAsync:()=>T_,extractDefs:()=>It,finalize:()=>Tt,flattenError:()=>lr,formatError:()=>ur,globalConfig:()=>tr,globalRegistry:()=>be,initializeContext:()=>wt,isValidBase64:()=>hc,isValidBase64URL:()=>em,isValidJWT:()=>tm,locales:()=>vr,meta:()=>Hl,parse:()=>ri,parseAsync:()=>ii,prettifyError:()=>Xs,process:()=>te,regexes:()=>Ce,registry:()=>Pi,safeDecode:()=>N_,safeDecodeAsync:()=>D_,safeEncode:()=>P_,safeEncodeAsync:()=>z_,safeParse:()=>Qs,safeParseAsync:()=>ea,toDotPath:()=>Ld,toJSONSchema:()=>oo,treeifyError:()=>Ys,util:()=>z,version:()=>Va});var Us=Object.freeze({status:"aborted"});function v(t,e,r){function i(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,l);let c=s.prototype,u=Object.keys(c);for(let d=0;d<u.length;d++){let p=u[d];p in a||(a[p]=c[p].bind(a))}}let n=r?.Parent??Object;class o extends n{}Object.defineProperty(o,"name",{value:t});function s(a){var l;let c=r?.Parent?new o:this;i(c,a),(l=c._zod).deferred??(l.deferred=[]);for(let u of c._zod.deferred)u();return c}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(s,"name",{value:t}),s}var ei=Symbol("zod_brand"),Fe=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},_t=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}},tr={};function ue(t){return t&&Object.assign(tr,t),tr}var z={};Ue(z,{BIGINT_FORMAT_RANGES:()=>Ks,Class:()=>Zs,NUMBER_FORMAT_RANGES:()=>qs,aborted:()=>St,allowsEval:()=>Bs,assert:()=>i_,assertEqual:()=>e_,assertIs:()=>n_,assertNever:()=>r_,assertNotEqual:()=>t_,assignProp:()=>xt,base64ToUint8Array:()=>Dd,base64urlToUint8Array:()=>x_,cached:()=>on,captureStackTrace:()=>ni,cleanEnum:()=>b_,cleanRegex:()=>ir,clone:()=>Se,cloneDef:()=>s_,createTransparentProxy:()=>d_,defineLazy:()=>Y,esc:()=>ti,escapeRegex:()=>Le,extend:()=>h_,finalizeIssue:()=>we,floatSafeRemainder:()=>Hs,getElementAtPath:()=>a_,getEnumValues:()=>rr,getLengthableOrigin:()=>ar,getParsedType:()=>p_,getSizableOrigin:()=>sr,hexToUint8Array:()=>S_,isObject:()=>Zt,isPlainObject:()=>$t,issue:()=>sn,joinValues:()=>S,jsonStringifyReplacer:()=>rn,merge:()=>y_,mergeDefs:()=>ct,normalizeParams:()=>D,nullish:()=>bt,numKeys:()=>u_,objectClone:()=>o_,omit:()=>f_,optionalKeys:()=>Gs,parsedType:()=>N,partial:()=>v_,pick:()=>m_,prefixIssues:()=>ze,primitiveTypes:()=>Vs,promiseAllObject:()=>c_,propertyKeyTypes:()=>or,randomString:()=>l_,required:()=>__,safeExtend:()=>g_,shallowClone:()=>Js,slugify:()=>Ws,stringifyPrimitive:()=>T,uint8ArrayToBase64:()=>Od,uint8ArrayToBase64url:()=>$_,uint8ArrayToHex:()=>k_,unwrapMessage:()=>nr});function e_(t){return t}function t_(t){return t}function n_(t){}function r_(t){throw new Error("Unexpected value in exhaustive check")}function i_(t){}function rr(t){let e=Object.values(t).filter(i=>typeof i=="number");return Object.entries(t).filter(([i,n])=>e.indexOf(+i)===-1).map(([i,n])=>n)}function S(t,e="|"){return t.map(r=>T(r)).join(e)}function rn(t,e){return typeof e=="bigint"?e.toString():e}function on(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function bt(t){return t==null}function ir(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function Hs(t,e){let r=(t.toString().split(".")[1]||"").length,i=e.toString(),n=(i.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(i)){let l=i.match(/\d?e-(\d?)/);l?.[1]&&(n=Number.parseInt(l[1]))}let o=r>n?r:n,s=Number.parseInt(t.toFixed(o).replace(".","")),a=Number.parseInt(e.toFixed(o).replace(".",""));return s%a/10**o}var zd=Symbol("evaluating");function Y(t,e,r){let i;Object.defineProperty(t,e,{get(){if(i!==zd)return i===void 0&&(i=zd,i=r()),i},set(n){Object.defineProperty(t,e,{value:n})},configurable:!0})}function o_(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function xt(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function ct(...t){let e={};for(let r of t){let i=Object.getOwnPropertyDescriptors(r);Object.assign(e,i)}return Object.defineProperties({},e)}function s_(t){return ct(t._zod.def)}function a_(t,e){return e?e.reduce((r,i)=>r?.[i],t):t}function c_(t){let e=Object.keys(t),r=e.map(i=>t[i]);return Promise.all(r).then(i=>{let n={};for(let o=0;o<e.length;o++)n[e[o]]=i[o];return n})}function l_(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<t;i++)r+=e[Math.floor(Math.random()*e.length)];return r}function ti(t){return JSON.stringify(t)}function Ws(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var ni="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Zt(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var Bs=on(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function $t(t){if(Zt(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(Zt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Js(t){return $t(t)?{...t}:Array.isArray(t)?[...t]:t}function u_(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}var p_=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},or=new Set(["string","number","symbol"]),Vs=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Le(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Se(t,e,r){let i=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(i._zod.parent=t),i}function D(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function d_(t){let e;return new Proxy({},{get(r,i,n){return e??(e=t()),Reflect.get(e,i,n)},set(r,i,n,o){return e??(e=t()),Reflect.set(e,i,n,o)},has(r,i){return e??(e=t()),Reflect.has(e,i)},deleteProperty(r,i){return e??(e=t()),Reflect.deleteProperty(e,i)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,i){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,i)},defineProperty(r,i,n){return e??(e=t()),Reflect.defineProperty(e,i,n)}})}function T(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Gs(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var qs={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]},Ks={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function m_(t,e){let r=t._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=ct(t._zod.def,{get shape(){let s={};for(let a in e){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&(s[a]=r.shape[a])}return xt(this,"shape",s),s},checks:[]});return Se(t,o)}function f_(t,e){let r=t._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=ct(t._zod.def,{get shape(){let s={...t._zod.def.shape};for(let a in e){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&delete s[a]}return xt(this,"shape",s),s},checks:[]});return Se(t,o)}function h_(t,e){if(!$t(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let o=t._zod.def.shape;for(let s in e)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=ct(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e};return xt(this,"shape",o),o}});return Se(t,n)}function g_(t,e){if(!$t(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r=ct(t._zod.def,{get shape(){let i={...t._zod.def.shape,...e};return xt(this,"shape",i),i}});return Se(t,r)}function y_(t,e){let r=ct(t._zod.def,{get shape(){let i={...t._zod.def.shape,...e._zod.def.shape};return xt(this,"shape",i),i},get catchall(){return e._zod.def.catchall},checks:[]});return Se(t,r)}function v_(t,e,r){let n=e._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=ct(e._zod.def,{get shape(){let a=e._zod.def.shape,l={...a};if(r)for(let c in r){if(!(c in a))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(l[c]=t?new t({type:"optional",innerType:a[c]}):a[c])}else for(let c in a)l[c]=t?new t({type:"optional",innerType:a[c]}):a[c];return xt(this,"shape",l),l},checks:[]});return Se(e,s)}function __(t,e,r){let i=ct(e._zod.def,{get shape(){let n=e._zod.def.shape,o={...n};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new t({type:"nonoptional",innerType:n[s]}))}else for(let s in n)o[s]=new t({type:"nonoptional",innerType:n[s]});return xt(this,"shape",o),o}});return Se(e,i)}function St(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function ze(t,e){return e.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(t),r})}function nr(t){return typeof t=="string"?t:t?.message}function we(t,e,r){let i={...t,path:t.path??[]};if(!t.message){let n=nr(t.inst?._zod.def?.error?.(t))??nr(e?.error?.(t))??nr(r.customError?.(t))??nr(r.localeError?.(t))??"Invalid input";i.message=n}return delete i.inst,delete i.continue,e?.reportInput||delete i.input,i}function sr(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function ar(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function N(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function sn(...t){let[e,r,i]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:i}:{...e}}function b_(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Dd(t){let e=atob(t),r=new Uint8Array(e.length);for(let i=0;i<e.length;i++)r[i]=e.charCodeAt(i);return r}function Od(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function x_(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return Dd(e+r)}function $_(t){return Od(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function S_(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(e.length/2);for(let i=0;i<e.length;i+=2)r[i/2]=Number.parseInt(e.slice(i,i+2),16);return r}function k_(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var Zs=class{constructor(...e){}};var Ad=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,rn,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},cr=v("$ZodError",Ad),Ie=v("$ZodError",Ad,{Parent:Error});function lr(t,e=r=>r.message){let r={},i=[];for(let n of t.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(e(n))):i.push(e(n));return{formErrors:i,fieldErrors:r}}function ur(t,e=r=>r.message){let r={_errors:[]},i=n=>{for(let o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>i({issues:s}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)r._errors.push(e(o));else{let s=r,a=0;for(;a<o.path.length;){let l=o.path[a];a===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(e(o))):s[l]=s[l]||{_errors:[]},s=s[l],a++}}};return i(t),r}function Ys(t,e=r=>r.message){let r={errors:[]},i=(n,o=[])=>{var s,a;for(let l of n.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>i({issues:c},l.path));else if(l.code==="invalid_key")i({issues:l.issues},l.path);else if(l.code==="invalid_element")i({issues:l.issues},l.path);else{let c=[...o,...l.path];if(c.length===0){r.errors.push(e(l));continue}let u=r,d=0;for(;d<c.length;){let p=c[d],m=d===c.length-1;typeof p=="string"?(u.properties??(u.properties={}),(s=u.properties)[p]??(s[p]={errors:[]}),u=u.properties[p]):(u.items??(u.items=[]),(a=u.items)[p]??(a[p]={errors:[]}),u=u.items[p]),m&&u.errors.push(e(l)),d++}}};return i(t),r}function Ld(t){let e=[],r=t.map(i=>typeof i=="object"?i.key:i);for(let i of r)typeof i=="number"?e.push(`[${i}]`):typeof i=="symbol"?e.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?e.push(`[${JSON.stringify(i)}]`):(e.length&&e.push("."),e.push(i));return e.join("")}function Xs(t){let e=[],r=[...t.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(let i of r)e.push(`\u2716 ${i.message}`),i.path?.length&&e.push(` \u2192 at ${Ld(i.path)}`);return e.join(`
418
+ `)}var an=t=>(e,r,i,n)=>{let o=i?Object.assign(i,{async:!1}):{async:!1},s=e._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Fe;if(s.issues.length){let a=new(n?.Err??t)(s.issues.map(l=>we(l,o,ue())));throw ni(a,n?.callee),a}return s.value},ri=an(Ie),cn=t=>async(e,r,i,n)=>{let o=i?Object.assign(i,{async:!0}):{async:!0},s=e._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(n?.Err??t)(s.issues.map(l=>we(l,o,ue())));throw ni(a,n?.callee),a}return s.value},ii=cn(Ie),ln=t=>(e,r,i)=>{let n=i?{...i,async:!1}:{async:!1},o=e._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new Fe;return o.issues.length?{success:!1,error:new(t??cr)(o.issues.map(s=>we(s,n,ue())))}:{success:!0,data:o.value}},Qs=ln(Ie),un=t=>async(e,r,i)=>{let n=i?Object.assign(i,{async:!0}):{async:!0},o=e._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new t(o.issues.map(s=>we(s,n,ue())))}:{success:!0,data:o.value}},ea=un(Ie),oi=t=>(e,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return an(t)(e,r,n)},w_=oi(Ie),si=t=>(e,r,i)=>an(t)(e,r,i),I_=si(Ie),ai=t=>async(e,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return cn(t)(e,r,n)},T_=ai(Ie),ci=t=>async(e,r,i)=>cn(t)(e,r,i),R_=ci(Ie),li=t=>(e,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return ln(t)(e,r,n)},P_=li(Ie),ui=t=>(e,r,i)=>ln(t)(e,r,i),N_=ui(Ie),pi=t=>async(e,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return un(t)(e,r,n)},z_=pi(Ie),di=t=>async(e,r,i)=>un(t)(e,r,i),D_=di(Ie);var Ce={};Ue(Ce,{base64:()=>ga,base64url:()=>mi,bigint:()=>$a,boolean:()=>ka,browserEmail:()=>F_,cidrv4:()=>fa,cidrv6:()=>ha,cuid:()=>ta,cuid2:()=>na,date:()=>va,datetime:()=>ba,domain:()=>W_,duration:()=>aa,e164:()=>ya,email:()=>la,emoji:()=>ua,extendedDuration:()=>O_,guid:()=>ca,hex:()=>B_,hostname:()=>H_,html5Email:()=>j_,idnEmail:()=>U_,integer:()=>Sa,ipv4:()=>pa,ipv6:()=>da,ksuid:()=>oa,lowercase:()=>Ia,mac:()=>ma,md5_base64:()=>V_,md5_base64url:()=>G_,md5_hex:()=>J_,nanoid:()=>sa,null:()=>Ea,number:()=>fi,rfc5322Email:()=>M_,sha1_base64:()=>K_,sha1_base64url:()=>Y_,sha1_hex:()=>q_,sha256_base64:()=>Q_,sha256_base64url:()=>eb,sha256_hex:()=>X_,sha384_base64:()=>nb,sha384_base64url:()=>rb,sha384_hex:()=>tb,sha512_base64:()=>ob,sha512_base64url:()=>sb,sha512_hex:()=>ib,string:()=>xa,time:()=>_a,ulid:()=>ra,undefined:()=>wa,unicodeEmail:()=>Cd,uppercase:()=>Ta,uuid:()=>Ht,uuid4:()=>A_,uuid6:()=>L_,uuid7:()=>C_,xid:()=>ia});var ta=/^[cC][^\s-]{8,}$/,na=/^[0-9a-z]+$/,ra=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ia=/^[0-9a-vA-V]{20}$/,oa=/^[A-Za-z0-9]{27}$/,sa=/^[a-zA-Z0-9_-]{21}$/,aa=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,O_=/^[-+]?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)?)??$/,ca=/^([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})$/,Ht=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,A_=Ht(4),L_=Ht(6),C_=Ht(7),la=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,j_=/^[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])?)*$/,M_=/^(([^<>()\[\]\\.,;:\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,}))$/,Cd=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,U_=Cd,F_=/^[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])?)*$/,Z_="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function ua(){return new RegExp(Z_,"u")}var pa=/^(?:(?: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])$/,da=/^(([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}|:))$/,ma=t=>{let e=Le(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},fa=/^((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])$/,ha=/^(([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])$/,ga=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,mi=/^[A-Za-z0-9_-]*$/,H_=/^(?=.{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])?)*\.?$/,W_=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,ya=/^\+[1-9]\d{6,14}$/,jd="(?:(?:\\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])))",va=new RegExp(`^${jd}$`);function Md(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function _a(t){return new RegExp(`^${Md(t)}$`)}function ba(t){let e=Md({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${e}(?:${r.join("|")})`;return new RegExp(`^${jd}T(?:${i})$`)}var xa=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},$a=/^-?\d+n?$/,Sa=/^-?\d+$/,fi=/^-?\d+(?:\.\d+)?$/,ka=/^(?:true|false)$/i,Ea=/^null$/i;var wa=/^undefined$/i;var Ia=/^[^A-Z]*$/,Ta=/^[^a-z]*$/,B_=/^[0-9a-fA-F]*$/;function pr(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function dr(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var J_=/^[0-9a-fA-F]{32}$/,V_=pr(22,"=="),G_=dr(22),q_=/^[0-9a-fA-F]{40}$/,K_=pr(27,"="),Y_=dr(27),X_=/^[0-9a-fA-F]{64}$/,Q_=pr(43,"="),eb=dr(43),tb=/^[0-9a-fA-F]{96}$/,nb=pr(64,""),rb=dr(64),ib=/^[0-9a-fA-F]{128}$/,ob=pr(86,"=="),sb=dr(86);var ie=v("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),Fd={number:"number",bigint:"bigint",object:"date"},hi=v("$ZodCheckLessThan",(t,e)=>{ie.init(t,e);let r=Fd[typeof e.value];t._zod.onattach.push(i=>{let n=i._zod.bag,o=(e.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<o&&(e.inclusive?n.maximum=e.value:n.exclusiveMaximum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value<=e.value:i.value<e.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),gi=v("$ZodCheckGreaterThan",(t,e)=>{ie.init(t,e);let r=Fd[typeof e.value];t._zod.onattach.push(i=>{let n=i._zod.bag,o=(e.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>o&&(e.inclusive?n.minimum=e.value:n.exclusiveMinimum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value>=e.value:i.value>e.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Ra=v("$ZodCheckMultipleOf",(t,e)=>{ie.init(t,e),t._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):Hs(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),Pa=v("$ZodCheckNumberFormat",(t,e)=>{ie.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),i=r?"int":"number",[n,o]=qs[e.format];t._zod.onattach.push(s=>{let a=s._zod.bag;a.format=e.format,a.minimum=n,a.maximum=o,r&&(a.pattern=Sa)}),t._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:i,format:e.format,code:"invalid_type",continue:!1,input:a,inst:t});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,inclusive:!0,continue:!e.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,inclusive:!0,continue:!e.abort});return}}a<n&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:!0,inst:t,continue:!e.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!e.abort})}}),Na=v("$ZodCheckBigIntFormat",(t,e)=>{ie.init(t,e);let[r,i]=Ks[e.format];t._zod.onattach.push(n=>{let o=n._zod.bag;o.format=e.format,o.minimum=r,o.maximum=i}),t._zod.check=n=>{let o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:t,continue:!e.abort})}}),za=v("$ZodCheckMaxSize",(t,e)=>{var r;ie.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!bt(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{let n=i.value;n.size<=e.maximum||i.issues.push({origin:sr(n),code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Da=v("$ZodCheckMinSize",(t,e)=>{var r;ie.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!bt(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{let n=i.value;n.size>=e.minimum||i.issues.push({origin:sr(n),code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Oa=v("$ZodCheckSizeEquals",(t,e)=>{var r;ie.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!bt(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=e.size,n.maximum=e.size,n.size=e.size}),t._zod.check=i=>{let n=i.value,o=n.size;if(o===e.size)return;let s=o>e.size;i.issues.push({origin:sr(n),...s?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),Aa=v("$ZodCheckMaxLength",(t,e)=>{var r;ie.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!bt(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{let n=i.value;if(n.length<=e.maximum)return;let s=ar(n);i.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),La=v("$ZodCheckMinLength",(t,e)=>{var r;ie.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!bt(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{let n=i.value;if(n.length>=e.minimum)return;let s=ar(n);i.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Ca=v("$ZodCheckLengthEquals",(t,e)=>{var r;ie.init(t,e),(r=t._zod.def).when??(r.when=i=>{let n=i.value;return!bt(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=e.length,n.maximum=e.length,n.length=e.length}),t._zod.check=i=>{let n=i.value,o=n.length;if(o===e.length)return;let s=ar(n),a=o>e.length;i.issues.push({origin:s,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),pn=v("$ZodCheckStringFormat",(t,e)=>{var r,i;ie.init(t,e),t._zod.onattach.push(n=>{let o=n._zod.bag;o.format=e.format,e.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:e.format,input:n.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(i=t._zod).check??(i.check=()=>{})}),ja=v("$ZodCheckRegex",(t,e)=>{pn.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Ma=v("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Ia),pn.init(t,e)}),Ua=v("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Ta),pn.init(t,e)}),Fa=v("$ZodCheckIncludes",(t,e)=>{ie.init(t,e);let r=Le(e.includes),i=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=i,t._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),t._zod.check=n=>{n.value.includes(e.includes,e.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:n.value,inst:t,continue:!e.abort})}}),Za=v("$ZodCheckStartsWith",(t,e)=>{ie.init(t,e);let r=new RegExp(`^${Le(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),t._zod.check=i=>{i.value.startsWith(e.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:i.value,inst:t,continue:!e.abort})}}),Ha=v("$ZodCheckEndsWith",(t,e)=>{ie.init(t,e);let r=new RegExp(`.*${Le(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),t._zod.check=i=>{i.value.endsWith(e.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:i.value,inst:t,continue:!e.abort})}});function Ud(t,e,r){t.issues.length&&e.issues.push(...ze(r,t.issues))}var Wa=v("$ZodCheckProperty",(t,e)=>{ie.init(t,e),t._zod.check=r=>{let i=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>Ud(n,r,e.property));Ud(i,r,e.property)}}),Ba=v("$ZodCheckMimeType",(t,e)=>{ie.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(i=>{i._zod.bag.mime=e.mime}),t._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:e.mime,input:i.value.type,inst:t,continue:!e.abort})}}),Ja=v("$ZodCheckOverwrite",(t,e)=>{ie.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});var mr=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let i=e.split(`
419
419
  `).filter(s=>s),n=Math.min(...i.map(s=>s.length-s.trimStart().length)),o=i.map(s=>s.slice(n)).map(s=>" ".repeat(this.indent*2)+s);for(let s of o)this.content.push(s)}compile(){let e=Function,r=this?.args,n=[...(this?.content??[""]).map(o=>` ${o}`)];return new e(...r,n.join(`
420
- `))}};var Ya={major:4,minor:3,patch:5};var V=v("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Ya;let i=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&i.unshift(t);for(let n of i)for(let o of n._zod.onattach)o(t);if(i.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let n=(s,a,l)=>{let c=St(s),u;for(let d of a){if(d._zod.def.when){if(!d._zod.def.when(s))continue}else if(c)continue;let p=s.issues.length,m=d._zod.check(s);if(m instanceof Promise&&l?.async===!1)throw new He;if(u||m instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await m,s.issues.length!==p&&(c||(c=St(s,p)))});else{if(s.issues.length===p)continue;c||(c=St(s,p))}}return u?u.then(()=>s):s},o=(s,a,l)=>{if(St(s))return s.aborted=!0,s;let c=n(a,i,l);if(c instanceof Promise){if(l.async===!1)throw new He;return c.then(u=>t._zod.parse(u,l))}return t._zod.parse(c,l)};t._zod.run=(s,a)=>{if(a.skipChecks)return t._zod.parse(s,a);if(a.direction==="backward"){let c=t._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return c instanceof Promise?c.then(u=>o(u,s,a)):o(c,s,a)}let l=t._zod.parse(s,a);if(l instanceof Promise){if(a.async===!1)throw new He;return l.then(c=>n(c,i,a))}return n(l,i,a)}}Y(t,"~standard",()=>({validate:n=>{try{let o=ra(t,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return ia(t,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),Bt=v("$ZodString",(t,e)=>{V.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Ea(t._zod.bag),t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),ne=v("$ZodStringFormat",(t,e)=>{pn.init(t,e),Bt.init(t,e)}),Qa=v("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=da),ne.init(t,e)}),ec=v("$ZodUUID",(t,e)=>{if(e.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(i===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Wt(i))}else e.pattern??(e.pattern=Wt());ne.init(t,e)}),tc=v("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=ma),ne.init(t,e)}),nc=v("$ZodURL",(t,e)=>{ne.init(t,e),t._zod.check=r=>{try{let i=r.value.trim(),n=new URL(i);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=n.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),rc=v("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=fa()),ne.init(t,e)}),ic=v("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=ua),ne.init(t,e)}),oc=v("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=oa),ne.init(t,e)}),sc=v("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=sa),ne.init(t,e)}),ac=v("$ZodULID",(t,e)=>{e.pattern??(e.pattern=aa),ne.init(t,e)}),cc=v("$ZodXID",(t,e)=>{e.pattern??(e.pattern=ca),ne.init(t,e)}),lc=v("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=la),ne.init(t,e)}),uc=v("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=ka(e)),ne.init(t,e)}),pc=v("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=$a),ne.init(t,e)}),dc=v("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Sa(e)),ne.init(t,e)}),mc=v("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=pa),ne.init(t,e)}),fc=v("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=ha),ne.init(t,e),t._zod.bag.format="ipv4"}),hc=v("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=ga),ne.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),gc=v("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=ya(e.delimiter)),ne.init(t,e),t._zod.bag.format="mac"}),yc=v("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=va),ne.init(t,e)}),vc=v("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=_a),ne.init(t,e),t._zod.check=r=>{let i=r.value.split("/");try{if(i.length!==2)throw new Error;let[n,o]=i;if(!o)throw new Error;let s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function _c(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var bc=v("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=ba),ne.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{_c(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function im(t){if(!hi.test(t))return!1;let e=t.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return _c(r)}var xc=v("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=hi),ne.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{im(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),$c=v("$ZodE164",(t,e)=>{e.pattern??(e.pattern=xa),ne.init(t,e)});function om(t,e=null){try{let r=t.split(".");if(r.length!==3)return!1;let[i]=r;if(!i)return!1;let n=JSON.parse(atob(i));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||e&&(!("alg"in n)||n.alg!==e))}catch{return!1}}var Sc=v("$ZodJWT",(t,e)=>{ne.init(t,e),t._zod.check=r=>{om(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),kc=v("$ZodCustomStringFormat",(t,e)=>{ne.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),ki=v("$ZodNumber",(t,e)=>{V.init(t,e),t._zod.pattern=t._zod.bag.pattern??gi,t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:t,...o?{received:o}:{}}),r}}),Ec=v("$ZodNumberFormat",(t,e)=>{Oa.init(t,e),ki.init(t,e)}),hr=v("$ZodBoolean",(t,e)=>{V.init(t,e),t._zod.pattern=Ta,t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:t}),r}}),Ei=v("$ZodBigInt",(t,e)=>{V.init(t,e),t._zod.pattern=wa,t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}}),wc=v("$ZodBigIntFormat",(t,e)=>{Aa.init(t,e),Ei.init(t,e)}),Ic=v("$ZodSymbol",(t,e)=>{V.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:t}),r}}),Tc=v("$ZodUndefined",(t,e)=>{V.init(t,e),t._zod.pattern=Pa,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:t}),r}}),Rc=v("$ZodNull",(t,e)=>{V.init(t,e),t._zod.pattern=Ra,t._zod.values=new Set([null]),t._zod.parse=(r,i)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:t}),r}}),Pc=v("$ZodAny",(t,e)=>{V.init(t,e),t._zod.parse=r=>r}),Nc=v("$ZodUnknown",(t,e)=>{V.init(t,e),t._zod.parse=r=>r}),zc=v("$ZodNever",(t,e)=>{V.init(t,e),t._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),Dc=v("$ZodVoid",(t,e)=>{V.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:t}),r}}),Oc=v("$ZodDate",(t,e)=>{V.init(t,e),t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:t}),r}});function Gd(t,e,r){t.issues.length&&e.issues.push(...De(r,t.issues)),e.value[r]=t.value}var Ac=v("$ZodArray",(t,e)=>{V.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:t}),r;r.value=Array(n.length);let o=[];for(let s=0;s<n.length;s++){let a=n[s],l=e.element._zod.run({value:a,issues:[]},i);l instanceof Promise?o.push(l.then(c=>Gd(c,r,s))):Gd(l,r,s)}return o.length?Promise.all(o).then(()=>r):r}});function Si(t,e,r,i,n){if(t.issues.length){if(n&&!(r in i))return;e.issues.push(...De(r,t.issues))}t.value===void 0?r in i&&(e.value[r]=void 0):e.value[r]=t.value}function sm(t){let e=Object.keys(t.shape);for(let i of e)if(!t.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let r=Xs(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function am(t,e,r,i,n,o){let s=[],a=n.keySet,l=n.catchall._zod,c=l.def.type,u=l.optout==="optional";for(let d in e){if(a.has(d))continue;if(c==="never"){s.push(d);continue}let p=l.run({value:e[d],issues:[]},i);p instanceof Promise?t.push(p.then(m=>Si(m,r,d,e,u))):Si(p,r,d,e,u)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:e,inst:o}),t.length?Promise.all(t).then(()=>r):r}var cm=v("$ZodObject",(t,e)=>{if(V.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let a=e.shape;Object.defineProperty(e,"shape",{get:()=>{let l={...a};return Object.defineProperty(e,"shape",{value:l}),l}})}let i=on(()=>sm(e));Y(t._zod,"propValues",()=>{let a=e.shape,l={};for(let c in a){let u=a[c]._zod;if(u.values){l[c]??(l[c]=new Set);for(let d of u.values)l[c].add(d)}}return l});let n=Ht,o=e.catchall,s;t._zod.parse=(a,l)=>{s??(s=i.value);let c=a.value;if(!n(c))return a.issues.push({expected:"object",code:"invalid_type",input:c,inst:t}),a;a.value={};let u=[],d=s.shape;for(let p of s.keys){let m=d[p],f=m._zod.optout==="optional",y=m._zod.run({value:c[p],issues:[]},l);y instanceof Promise?u.push(y.then(b=>Si(b,a,p,c,f))):Si(y,a,p,c,f)}return o?am(u,c,a,l,i.value,t):u.length?Promise.all(u).then(()=>a):a}}),Lc=v("$ZodObjectJIT",(t,e)=>{cm.init(t,e);let r=t._zod.parse,i=on(()=>sm(e)),n=p=>{let m=new fr(["shape","payload","ctx"]),f=i.value,y=x=>{let E=ri(x);return`shape[${E}]._zod.run({ value: input[${E}], issues: [] }, ctx)`};m.write("const input = payload.value;");let b=Object.create(null),_=0;for(let x of f.keys)b[x]=`key_${_++}`;m.write("const newResult = {};");for(let x of f.keys){let E=b[x],A=ri(x),R=p[x]?._zod?.optout==="optional";m.write(`const ${E} = ${y(x)};`),R?m.write(`
420
+ `))}};var Va={major:4,minor:3,patch:5};var G=v("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Va;let i=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&i.unshift(t);for(let n of i)for(let o of n._zod.onattach)o(t);if(i.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let n=(s,a,l)=>{let c=St(s),u;for(let d of a){if(d._zod.def.when){if(!d._zod.def.when(s))continue}else if(c)continue;let p=s.issues.length,m=d._zod.check(s);if(m instanceof Promise&&l?.async===!1)throw new Fe;if(u||m instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await m,s.issues.length!==p&&(c||(c=St(s,p)))});else{if(s.issues.length===p)continue;c||(c=St(s,p))}}return u?u.then(()=>s):s},o=(s,a,l)=>{if(St(s))return s.aborted=!0,s;let c=n(a,i,l);if(c instanceof Promise){if(l.async===!1)throw new Fe;return c.then(u=>t._zod.parse(u,l))}return t._zod.parse(c,l)};t._zod.run=(s,a)=>{if(a.skipChecks)return t._zod.parse(s,a);if(a.direction==="backward"){let c=t._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return c instanceof Promise?c.then(u=>o(u,s,a)):o(c,s,a)}let l=t._zod.parse(s,a);if(l instanceof Promise){if(a.async===!1)throw new Fe;return l.then(c=>n(c,i,a))}return n(l,i,a)}}Y(t,"~standard",()=>({validate:n=>{try{let o=Qs(t,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return ea(t,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),Wt=v("$ZodString",(t,e)=>{G.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??xa(t._zod.bag),t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),ne=v("$ZodStringFormat",(t,e)=>{pn.init(t,e),Wt.init(t,e)}),qa=v("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=ca),ne.init(t,e)}),Ka=v("$ZodUUID",(t,e)=>{if(e.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(i===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Ht(i))}else e.pattern??(e.pattern=Ht());ne.init(t,e)}),Ya=v("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=la),ne.init(t,e)}),Xa=v("$ZodURL",(t,e)=>{ne.init(t,e),t._zod.check=r=>{try{let i=r.value.trim(),n=new URL(i);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=n.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),Qa=v("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=ua()),ne.init(t,e)}),ec=v("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=sa),ne.init(t,e)}),tc=v("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=ta),ne.init(t,e)}),nc=v("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=na),ne.init(t,e)}),rc=v("$ZodULID",(t,e)=>{e.pattern??(e.pattern=ra),ne.init(t,e)}),ic=v("$ZodXID",(t,e)=>{e.pattern??(e.pattern=ia),ne.init(t,e)}),oc=v("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=oa),ne.init(t,e)}),sc=v("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=ba(e)),ne.init(t,e)}),ac=v("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=va),ne.init(t,e)}),cc=v("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=_a(e)),ne.init(t,e)}),lc=v("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=aa),ne.init(t,e)}),uc=v("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=pa),ne.init(t,e),t._zod.bag.format="ipv4"}),pc=v("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=da),ne.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),dc=v("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=ma(e.delimiter)),ne.init(t,e),t._zod.bag.format="mac"}),mc=v("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=fa),ne.init(t,e)}),fc=v("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=ha),ne.init(t,e),t._zod.check=r=>{let i=r.value.split("/");try{if(i.length!==2)throw new Error;let[n,o]=i;if(!o)throw new Error;let s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function hc(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var gc=v("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=ga),ne.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{hc(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function em(t){if(!mi.test(t))return!1;let e=t.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return hc(r)}var yc=v("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=mi),ne.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{em(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),vc=v("$ZodE164",(t,e)=>{e.pattern??(e.pattern=ya),ne.init(t,e)});function tm(t,e=null){try{let r=t.split(".");if(r.length!==3)return!1;let[i]=r;if(!i)return!1;let n=JSON.parse(atob(i));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||e&&(!("alg"in n)||n.alg!==e))}catch{return!1}}var _c=v("$ZodJWT",(t,e)=>{ne.init(t,e),t._zod.check=r=>{tm(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),bc=v("$ZodCustomStringFormat",(t,e)=>{ne.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),$i=v("$ZodNumber",(t,e)=>{G.init(t,e),t._zod.pattern=t._zod.bag.pattern??fi,t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:t,...o?{received:o}:{}}),r}}),xc=v("$ZodNumberFormat",(t,e)=>{Pa.init(t,e),$i.init(t,e)}),fr=v("$ZodBoolean",(t,e)=>{G.init(t,e),t._zod.pattern=ka,t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:t}),r}}),Si=v("$ZodBigInt",(t,e)=>{G.init(t,e),t._zod.pattern=$a,t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}}),$c=v("$ZodBigIntFormat",(t,e)=>{Na.init(t,e),Si.init(t,e)}),Sc=v("$ZodSymbol",(t,e)=>{G.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:t}),r}}),kc=v("$ZodUndefined",(t,e)=>{G.init(t,e),t._zod.pattern=wa,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:t}),r}}),Ec=v("$ZodNull",(t,e)=>{G.init(t,e),t._zod.pattern=Ea,t._zod.values=new Set([null]),t._zod.parse=(r,i)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:t}),r}}),wc=v("$ZodAny",(t,e)=>{G.init(t,e),t._zod.parse=r=>r}),Ic=v("$ZodUnknown",(t,e)=>{G.init(t,e),t._zod.parse=r=>r}),Tc=v("$ZodNever",(t,e)=>{G.init(t,e),t._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),Rc=v("$ZodVoid",(t,e)=>{G.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:t}),r}}),Pc=v("$ZodDate",(t,e)=>{G.init(t,e),t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:t}),r}});function Hd(t,e,r){t.issues.length&&e.issues.push(...ze(r,t.issues)),e.value[r]=t.value}var Nc=v("$ZodArray",(t,e)=>{G.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:t}),r;r.value=Array(n.length);let o=[];for(let s=0;s<n.length;s++){let a=n[s],l=e.element._zod.run({value:a,issues:[]},i);l instanceof Promise?o.push(l.then(c=>Hd(c,r,s))):Hd(l,r,s)}return o.length?Promise.all(o).then(()=>r):r}});function xi(t,e,r,i,n){if(t.issues.length){if(n&&!(r in i))return;e.issues.push(...ze(r,t.issues))}t.value===void 0?r in i&&(e.value[r]=void 0):e.value[r]=t.value}function nm(t){let e=Object.keys(t.shape);for(let i of e)if(!t.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let r=Gs(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function rm(t,e,r,i,n,o){let s=[],a=n.keySet,l=n.catchall._zod,c=l.def.type,u=l.optout==="optional";for(let d in e){if(a.has(d))continue;if(c==="never"){s.push(d);continue}let p=l.run({value:e[d],issues:[]},i);p instanceof Promise?t.push(p.then(m=>xi(m,r,d,e,u))):xi(p,r,d,e,u)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:e,inst:o}),t.length?Promise.all(t).then(()=>r):r}var im=v("$ZodObject",(t,e)=>{if(G.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let a=e.shape;Object.defineProperty(e,"shape",{get:()=>{let l={...a};return Object.defineProperty(e,"shape",{value:l}),l}})}let i=on(()=>nm(e));Y(t._zod,"propValues",()=>{let a=e.shape,l={};for(let c in a){let u=a[c]._zod;if(u.values){l[c]??(l[c]=new Set);for(let d of u.values)l[c].add(d)}}return l});let n=Zt,o=e.catchall,s;t._zod.parse=(a,l)=>{s??(s=i.value);let c=a.value;if(!n(c))return a.issues.push({expected:"object",code:"invalid_type",input:c,inst:t}),a;a.value={};let u=[],d=s.shape;for(let p of s.keys){let m=d[p],f=m._zod.optout==="optional",y=m._zod.run({value:c[p],issues:[]},l);y instanceof Promise?u.push(y.then(b=>xi(b,a,p,c,f))):xi(y,a,p,c,f)}return o?rm(u,c,a,l,i.value,t):u.length?Promise.all(u).then(()=>a):a}}),zc=v("$ZodObjectJIT",(t,e)=>{im.init(t,e);let r=t._zod.parse,i=on(()=>nm(e)),n=p=>{let m=new mr(["shape","payload","ctx"]),f=i.value,y=x=>{let E=ti(x);return`shape[${E}]._zod.run({ value: input[${E}], issues: [] }, ctx)`};m.write("const input = payload.value;");let b=Object.create(null),_=0;for(let x of f.keys)b[x]=`key_${_++}`;m.write("const newResult = {};");for(let x of f.keys){let E=b[x],A=ti(x),R=p[x]?._zod?.optout==="optional";m.write(`const ${E} = ${y(x)};`),R?m.write(`
421
421
  if (${E}.issues.length) {
422
422
  if (${A} in input) {
423
423
  payload.issues = payload.issues.concat(${E}.issues.map(iss => ({
@@ -451,90 +451,18 @@ ORDER BY dc.depth, dc.consumer_path;
451
451
  newResult[${A}] = ${E}.value;
452
452
  }
453
453
 
454
- `)}m.write("payload.value = newResult;"),m.write("return payload;");let g=m.compile();return(x,E)=>g(p,x,E)},o,s=Ht,a=!nr.jitless,c=a&&qs.value,u=e.catchall,d;t._zod.parse=(p,m)=>{d??(d=i.value);let f=p.value;return s(f)?a&&c&&m?.async===!1&&m.jitless!==!0?(o||(o=n(e.shape)),p=o(p,m),u?am([],f,p,m,d,t):p):r(p,m):(p.issues.push({expected:"object",code:"invalid_type",input:f,inst:t}),p)}});function Vd(t,e,r,i){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;let n=t.filter(o=>!St(o));return n.length===1?(e.value=n[0].value,n[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(s=>Ie(s,i,pe())))}),e)}var gr=v("$ZodUnion",(t,e)=>{V.init(t,e),Y(t._zod,"optin",()=>e.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Y(t._zod,"optout",()=>e.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Y(t._zod,"values",()=>{if(e.options.every(n=>n._zod.values))return new Set(e.options.flatMap(n=>Array.from(n._zod.values)))}),Y(t._zod,"pattern",()=>{if(e.options.every(n=>n._zod.pattern)){let n=e.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>or(o.source)).join("|")})$`)}});let r=e.options.length===1,i=e.options[0]._zod.run;t._zod.parse=(n,o)=>{if(r)return i(n,o);let s=!1,a=[];for(let l of e.options){let c=l._zod.run({value:n.value,issues:[]},o);if(c instanceof Promise)a.push(c),s=!0;else{if(c.issues.length===0)return c;a.push(c)}}return s?Promise.all(a).then(l=>Vd(l,n,t,o)):Vd(a,n,t,o)}});function qd(t,e,r,i){let n=t.filter(o=>o.issues.length===0);return n.length===1?(e.value=n[0].value,e):(n.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(s=>Ie(s,i,pe())))}):e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:[],inclusive:!1}),e)}var Cc=v("$ZodXor",(t,e)=>{gr.init(t,e),e.inclusive=!1;let r=e.options.length===1,i=e.options[0]._zod.run;t._zod.parse=(n,o)=>{if(r)return i(n,o);let s=!1,a=[];for(let l of e.options){let c=l._zod.run({value:n.value,issues:[]},o);c instanceof Promise?(a.push(c),s=!0):a.push(c)}return s?Promise.all(a).then(l=>qd(l,n,t,o)):qd(a,n,t,o)}}),jc=v("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,gr.init(t,e);let r=t._zod.parse;Y(t._zod,"propValues",()=>{let n={};for(let o of e.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let[a,l]of Object.entries(s)){n[a]||(n[a]=new Set);for(let c of l)n[a].add(c)}}return n});let i=on(()=>{let n=e.options,o=new Map;for(let s of n){let a=s._zod.propValues?.[e.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let l of a){if(o.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);o.set(l,s)}}return o});t._zod.parse=(n,o)=>{let s=n.value;if(!Ht(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),n;let a=i.value.get(s?.[e.discriminator]);return a?a._zod.run(n,o):e.unionFallback?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:s,path:[e.discriminator],inst:t}),n)}}),Mc=v("$ZodIntersection",(t,e)=>{V.init(t,e),t._zod.parse=(r,i)=>{let n=r.value,o=e.left._zod.run({value:n,issues:[]},i),s=e.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([l,c])=>Kd(r,l,c)):Kd(r,o,s)}});function Xa(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if($t(t)&&$t(e)){let r=Object.keys(e),i=Object.keys(t).filter(o=>r.indexOf(o)!==-1),n={...t,...e};for(let o of i){let s=Xa(t[o],e[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n[o]=s.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<t.length;i++){let n=t[i],o=e[i],s=Xa(n,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Kd(t,e,r){let i=new Map,n;for(let a of e.issues)if(a.code==="unrecognized_keys"){n??(n=a);for(let l of a.keys)i.has(l)||i.set(l,{}),i.get(l).l=!0}else t.issues.push(a);for(let a of r.issues)if(a.code==="unrecognized_keys")for(let l of a.keys)i.has(l)||i.set(l,{}),i.get(l).r=!0;else t.issues.push(a);let o=[...i].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(o.length&&n&&t.issues.push({...n,keys:o}),St(t))return t;let s=Xa(e.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return t.value=s.data,t}var wi=v("$ZodTuple",(t,e)=>{V.init(t,e);let r=e.items;t._zod.parse=(i,n)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:t,expected:"tuple",code:"invalid_type"}),i;i.value=[];let s=[],a=[...r].reverse().findIndex(u=>u._zod.optin!=="optional"),l=a===-1?0:r.length-a;if(!e.rest){let u=o.length>r.length,d=o.length<l-1;if(u||d)return i.issues.push({...u?{code:"too_big",maximum:r.length,inclusive:!0}:{code:"too_small",minimum:r.length},input:o,inst:t,origin:"array"}),i}let c=-1;for(let u of r){if(c++,c>=o.length&&c>=l)continue;let d=u._zod.run({value:o[c],issues:[]},n);d instanceof Promise?s.push(d.then(p=>_i(p,i,c))):_i(d,i,c)}if(e.rest){let u=o.slice(r.length);for(let d of u){c++;let p=e.rest._zod.run({value:d,issues:[]},n);p instanceof Promise?s.push(p.then(m=>_i(m,i,c))):_i(p,i,c)}}return s.length?Promise.all(s).then(()=>i):i}});function _i(t,e,r){t.issues.length&&e.issues.push(...De(r,t.issues)),e.value[r]=t.value}var Uc=v("$ZodRecord",(t,e)=>{V.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;if(!$t(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:t}),r;let o=[],s=e.keyType._zod.values;if(s){r.value={};let a=new Set;for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){a.add(typeof c=="number"?c.toString():c);let u=e.valueType._zod.run({value:n[c],issues:[]},i);u instanceof Promise?o.push(u.then(d=>{d.issues.length&&r.issues.push(...De(c,d.issues)),r.value[c]=d.value})):(u.issues.length&&r.issues.push(...De(c,u.issues)),r.value[c]=u.value)}let l;for(let c in n)a.has(c)||(l=l??[],l.push(c));l&&l.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:t,keys:l})}else{r.value={};for(let a of Reflect.ownKeys(n)){if(a==="__proto__")continue;let l=e.keyType._zod.run({value:a,issues:[]},i);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&gi.test(a)&&l.issues.length&&l.issues.some(d=>d.code==="invalid_type"&&d.expected==="number")){let d=e.keyType._zod.run({value:Number(a),issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(l=d)}if(l.issues.length){e.mode==="loose"?r.value[a]=n[a]:r.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(d=>Ie(d,i,pe())),input:a,path:[a],inst:t});continue}let u=e.valueType._zod.run({value:n[a],issues:[]},i);u instanceof Promise?o.push(u.then(d=>{d.issues.length&&r.issues.push(...De(a,d.issues)),r.value[l.value]=d.value})):(u.issues.length&&r.issues.push(...De(a,u.issues)),r.value[l.value]=u.value)}}return o.length?Promise.all(o).then(()=>r):r}}),Fc=v("$ZodMap",(t,e)=>{V.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:t}),r;let o=[];r.value=new Map;for(let[s,a]of n){let l=e.keyType._zod.run({value:s,issues:[]},i),c=e.valueType._zod.run({value:a,issues:[]},i);l instanceof Promise||c instanceof Promise?o.push(Promise.all([l,c]).then(([u,d])=>{Yd(u,d,r,s,n,t,i)})):Yd(l,c,r,s,n,t,i)}return o.length?Promise.all(o).then(()=>r):r}});function Yd(t,e,r,i,n,o,s){t.issues.length&&(sr.has(typeof i)?r.issues.push(...De(i,t.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:t.issues.map(a=>Ie(a,s,pe()))})),e.issues.length&&(sr.has(typeof i)?r.issues.push(...De(i,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:e.issues.map(a=>Ie(a,s,pe()))})),r.value.set(t.value,e.value)}var Zc=v("$ZodSet",(t,e)=>{V.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:t,expected:"set",code:"invalid_type"}),r;let o=[];r.value=new Set;for(let s of n){let a=e.valueType._zod.run({value:s,issues:[]},i);a instanceof Promise?o.push(a.then(l=>Xd(l,r))):Xd(a,r)}return o.length?Promise.all(o).then(()=>r):r}});function Xd(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}var Hc=v("$ZodEnum",(t,e)=>{V.init(t,e);let r=ir(e.entries),i=new Set(r);t._zod.values=i,t._zod.pattern=new RegExp(`^(${r.filter(n=>sr.has(typeof n)).map(n=>typeof n=="string"?Le(n):n.toString()).join("|")})$`),t._zod.parse=(n,o)=>{let s=n.value;return i.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:t}),n}}),Wc=v("$ZodLiteral",(t,e)=>{if(V.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(e.values);t._zod.values=r,t._zod.pattern=new RegExp(`^(${e.values.map(i=>typeof i=="string"?Le(i):i?Le(i.toString()):String(i)).join("|")})$`),t._zod.parse=(i,n)=>{let o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:e.values,input:o,inst:t}),i}}),Bc=v("$ZodFile",(t,e)=>{V.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:t}),r}}),Jc=v("$ZodTransform",(t,e)=>{V.init(t,e),t._zod.parse=(r,i)=>{if(i.direction==="backward")throw new _t(t.constructor.name);let n=e.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r));if(n instanceof Promise)throw new He;return r.value=n,r}});function Qd(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}var Ii=v("$ZodOptional",(t,e)=>{V.init(t,e),t._zod.optin="optional",t._zod.optout="optional",Y(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),Y(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${or(r.source)})?$`):void 0}),t._zod.parse=(r,i)=>{if(e.innerType._zod.optin==="optional"){let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Qd(o,r.value)):Qd(n,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,i)}}),Gc=v("$ZodExactOptional",(t,e)=>{Ii.init(t,e),Y(t._zod,"values",()=>e.innerType._zod.values),Y(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(r,i)=>e.innerType._zod.run(r,i)}),Vc=v("$ZodNullable",(t,e)=>{V.init(t,e),Y(t._zod,"optin",()=>e.innerType._zod.optin),Y(t._zod,"optout",()=>e.innerType._zod.optout),Y(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${or(r.source)}|null)$`):void 0}),Y(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,i)=>r.value===null?r:e.innerType._zod.run(r,i)}),qc=v("$ZodDefault",(t,e)=>{V.init(t,e),t._zod.optin="optional",Y(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>{if(i.direction==="backward")return e.innerType._zod.run(r,i);if(r.value===void 0)return r.value=e.defaultValue,r;let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>em(o,e)):em(n,e)}});function em(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var Kc=v("$ZodPrefault",(t,e)=>{V.init(t,e),t._zod.optin="optional",Y(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,i))}),Yc=v("$ZodNonOptional",(t,e)=>{V.init(t,e),Y(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),t._zod.parse=(r,i)=>{let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>tm(o,t)):tm(n,t)}});function tm(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}var Xc=v("$ZodSuccess",(t,e)=>{V.init(t,e),t._zod.parse=(r,i)=>{if(i.direction==="backward")throw new _t("ZodSuccess");let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),Qc=v("$ZodCatch",(t,e)=>{V.init(t,e),Y(t._zod,"optin",()=>e.innerType._zod.optin),Y(t._zod,"optout",()=>e.innerType._zod.optout),Y(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>{if(i.direction==="backward")return e.innerType._zod.run(r,i);let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=e.catchValue({...r,error:{issues:o.issues.map(s=>Ie(s,i,pe()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=e.catchValue({...r,error:{issues:n.issues.map(o=>Ie(o,i,pe()))},input:r.value}),r.issues=[]),r)}}),el=v("$ZodNaN",(t,e)=>{V.init(t,e),t._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)}),tl=v("$ZodPipe",(t,e)=>{V.init(t,e),Y(t._zod,"values",()=>e.in._zod.values),Y(t._zod,"optin",()=>e.in._zod.optin),Y(t._zod,"optout",()=>e.out._zod.optout),Y(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,i)=>{if(i.direction==="backward"){let o=e.out._zod.run(r,i);return o instanceof Promise?o.then(s=>bi(s,e.in,i)):bi(o,e.in,i)}let n=e.in._zod.run(r,i);return n instanceof Promise?n.then(o=>bi(o,e.out,i)):bi(n,e.out,i)}});function bi(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}var yr=v("$ZodCodec",(t,e)=>{V.init(t,e),Y(t._zod,"values",()=>e.in._zod.values),Y(t._zod,"optin",()=>e.in._zod.optin),Y(t._zod,"optout",()=>e.out._zod.optout),Y(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){let o=e.in._zod.run(r,i);return o instanceof Promise?o.then(s=>xi(s,e,i)):xi(o,e,i)}else{let o=e.out._zod.run(r,i);return o instanceof Promise?o.then(s=>xi(s,e,i)):xi(o,e,i)}}});function xi(t,e,r){if(t.issues.length)return t.aborted=!0,t;if((r.direction||"forward")==="forward"){let n=e.transform(t.value,t);return n instanceof Promise?n.then(o=>$i(t,o,e.out,r)):$i(t,n,e.out,r)}else{let n=e.reverseTransform(t.value,t);return n instanceof Promise?n.then(o=>$i(t,o,e.in,r)):$i(t,n,e.in,r)}}function $i(t,e,r,i){return t.issues.length?(t.aborted=!0,t):r._zod.run({value:e,issues:t.issues},i)}var nl=v("$ZodReadonly",(t,e)=>{V.init(t,e),Y(t._zod,"propValues",()=>e.innerType._zod.propValues),Y(t._zod,"values",()=>e.innerType._zod.values),Y(t._zod,"optin",()=>e.innerType?._zod?.optin),Y(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(r,i)=>{if(i.direction==="backward")return e.innerType._zod.run(r,i);let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(nm):nm(n)}});function nm(t){return t.value=Object.freeze(t.value),t}var rl=v("$ZodTemplateLiteral",(t,e)=>{V.init(t,e);let r=[];for(let i of e.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let n=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,s))}else if(i===null||Ys.has(typeof i))r.push(Le(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:t,expected:"string",code:"invalid_type"}),i):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),i)}),il=v("$ZodFunction",(t,e)=>(V.init(t,e),t._def=e,t._zod.def=e,t.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){let n=t._def.input?oi(t._def.input,i):i,o=Reflect.apply(r,this,n);return t._def.output?oi(t._def.output,o):o}},t.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let n=t._def.input?await si(t._def.input,i):i,o=await Reflect.apply(r,this,n);return t._def.output?await si(t._def.output,o):o}},t._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:t}),r):(t._def.output&&t._def.output._zod.def.type==="promise"?r.value=t.implementAsync(r.value):r.value=t.implement(r.value),r),t.input=(...r)=>{let i=t.constructor;return Array.isArray(r[0])?new i({type:"function",input:new wi({type:"tuple",items:r[0],rest:r[1]}),output:t._def.output}):new i({type:"function",input:r[0],output:t._def.output})},t.output=r=>{let i=t.constructor;return new i({type:"function",input:t._def.input,output:r})},t)),ol=v("$ZodPromise",(t,e)=>{V.init(t,e),t._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>e.innerType._zod.run({value:n,issues:[]},i))}),sl=v("$ZodLazy",(t,e)=>{V.init(t,e),Y(t._zod,"innerType",()=>e.getter()),Y(t._zod,"pattern",()=>t._zod.innerType?._zod?.pattern),Y(t._zod,"propValues",()=>t._zod.innerType?._zod?.propValues),Y(t._zod,"optin",()=>t._zod.innerType?._zod?.optin??void 0),Y(t._zod,"optout",()=>t._zod.innerType?._zod?.optout??void 0),t._zod.parse=(r,i)=>t._zod.innerType._zod.run(r,i)}),al=v("$ZodCustom",(t,e)=>{ie.init(t,e),V.init(t,e),t._zod.parse=(r,i)=>r,t._zod.check=r=>{let i=r.value,n=e.fn(i);if(n instanceof Promise)return n.then(o=>rm(o,r,i,t));rm(n,r,i,t)}});function rm(t,e,r,i){if(!t){let n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),e.issues.push(sn(n))}}var _r={};Ze(_r,{ar:()=>lm,az:()=>um,be:()=>dm,bg:()=>mm,ca:()=>fm,cs:()=>hm,da:()=>gm,de:()=>ym,en:()=>Ti,eo:()=>vm,es:()=>_m,fa:()=>bm,fi:()=>xm,fr:()=>$m,frCA:()=>Sm,he:()=>km,hu:()=>Em,hy:()=>Im,id:()=>Tm,is:()=>Rm,it:()=>Pm,ja:()=>Nm,ka:()=>zm,kh:()=>Dm,km:()=>Ri,ko:()=>Om,lt:()=>Lm,mk:()=>Cm,ms:()=>jm,nl:()=>Mm,no:()=>Um,ota:()=>Fm,pl:()=>Hm,ps:()=>Zm,pt:()=>Wm,ru:()=>Jm,sl:()=>Gm,sv:()=>Vm,ta:()=>qm,th:()=>Km,tr:()=>Ym,ua:()=>Xm,uk:()=>Pi,ur:()=>Qm,uz:()=>ef,vi:()=>tf,yo:()=>of,zhCN:()=>nf,zhTW:()=>rf});var ub=()=>{let t={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function e(n){return t[n]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.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 ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`}case"invalid_value":return n.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 ${T(n.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: ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.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 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.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 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${n.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${S(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.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 ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function lm(){return{localeError:ub()}}var pb=()=>{let t={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function e(n){return t[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${a}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${T(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[o.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${S(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function um(){return{localeError:pb()}}function pm(t,e,r,i){let n=Math.abs(t),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?e:o>=2&&o<=4?r:i}var db=()=>{let t={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function e(n){return t[n]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`}case"invalid_value":return n.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 ${T(n.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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);if(s){let a=Number(n.maximum),l=pm(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 ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);if(s){let a=Number(n.minimum),l=pm(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 ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${n.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 ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${S(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.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 ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function dm(){return{localeError:db()}}var mb=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function e(n){return t[n]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${T(n.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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${n.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 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${n.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${S(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.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 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function mm(){return{localeError:mb()}}var fb=()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(n){return t[n]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${a}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${T(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${S(n.values," o ")}`;case"too_big":{let o=n.inclusive?"com a m\xE0xim":"menys de",s=e(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${o} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"com a m\xEDnim":"m\xE9s de",s=e(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${o} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}};function fm(){return{localeError:fb()}}var hb=()=>{let t={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function e(n){return t[n]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${a}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${T(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${S(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}};function hm(){return{localeError:hb()}}var gb=()=>{let t={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function e(n){return t[n]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${a}`:`Ugyldigt input: forventede ${o}, fik ${a}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${T(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin),a=i[n.origin]??n.origin;return s?`For stor: forventede ${a??"value"} ${s.verb} ${o} ${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin),a=i[n.origin]??n.origin;return s?`For lille: forventede ${a} ${s.verb} ${o} ${n.minimum.toString()} ${s.unit}`:`For lille: forventede ${a} havde ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${S(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${n.origin}`;default:return"Ugyldigt input"}}};function gm(){return{localeError:gb()}}var yb=()=>{let t={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function e(n){return t[n]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${a}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${T(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${S(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}};function ym(){return{localeError:yb()}}var vb=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function e(n){return t[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return`Invalid input: expected ${o}, received ${a}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${T(n.values[0])}`:`Invalid option: expected one of ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${s.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function Ti(){return{localeError:vb()}}var _b=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(n){return t[n]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${a}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${T(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${o}${n.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${r[o.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function vm(){return{localeError:_b()}}var bb=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(n){return t[n]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${a}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${T(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin),a=i[n.origin]??n.origin;return s?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin),a=i[n.origin]??n.origin;return s?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${o}${n.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}};function _m(){return{localeError:bb()}}var xb=()=>{let t={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function e(n){return t[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${T(n.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 ${S(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[o.format]??n.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 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${S(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.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 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function bm(){return{localeError:xb()}}var $b=()=>{let t={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function e(n){return t[n]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${a}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${T(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${o}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${o}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${r[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${S(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function xm(){return{localeError:$b()}}var Sb=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(n){return t[n]??null}let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN",number:"nombre",array:"tableau"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${a} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${T(n.values[0])} attendu`:`Option invalide : une valeur parmi ${S(n.values,"|")} attendue`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Trop grand : ${n.origin??"valeur"} doit ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Trop petit : ${n.origin} doit ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${S(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function $m(){return{localeError:Sb()}}var kb=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(n){return t[n]??null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${a}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${T(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u2264":"<",s=e(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"\u2265":">",s=e(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${S(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function Sm(){return{localeError:kb()}}var Eb=()=>{let t={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},e={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=c=>c?t[c]:void 0,i=c=>{let u=r(c);return u?u.label:c??t.unknown.label},n=c=>`\u05D4${i(c)}`,o=c=>(r(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=c=>c?e[c]??null:null,a={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},l={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let u=c.expected,d=l[u??""]??i(u),p=N(c.input),m=l[p]??t[p]?.label??p;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`}case"invalid_value":{if(c.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${T(c.values[0])}`;let u=c.values.map(m=>T(m));if(c.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u[0]} \u05D0\u05D5 ${u[1]}`;let d=u[u.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 ${u.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let u=s(c.origin),d=n(c.origin??"value");if(c.origin==="string")return`${u?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${u?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let f=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${f}`}if(c.origin==="array"||c.origin==="set"){let f=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",y=c.inclusive?`${c.maximum} ${u?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${u?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${f} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`.trim()}let p=c.inclusive?"<=":"<",m=o(c.origin??"value");return u?.unit?`${u.longLabel} \u05DE\u05D3\u05D9: ${d} ${m} ${p}${c.maximum.toString()} ${u.unit}`:`${u?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${m} ${p}${c.maximum.toString()}`}case"too_small":{let u=s(c.origin),d=n(c.origin??"value");if(c.origin==="string")return`${u?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${u?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let f=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${f}`}if(c.origin==="array"||c.origin==="set"){let f=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let b=(c.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${f} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`}let y=c.inclusive?`${c.minimum} ${u?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${u?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${f} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`.trim()}let p=c.inclusive?">=":">",m=o(c.origin??"value");return u?.unit?`${u.shortLabel} \u05DE\u05D3\u05D9: ${d} ${m} ${p}${c.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${m} ${p}${c.minimum.toString()}`}case"invalid_format":{let u=c;if(u.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${u.prefix}"`;if(u.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${u.suffix}"`;if(u.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${u.includes}"`;if(u.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 ${u.pattern}`;let d=a[u.format],p=d?.label??u.format,f=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${p} \u05DC\u05D0 ${f}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${S(c.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function km(){return{localeError:Eb()}}var wb=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(n){return t[n]??null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${a}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${T(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${n.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${o}${n.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[o.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Em(){return{localeError:wb()}}function wm(t,e,r){return Math.abs(t)===1?e:r}function dn(t){if(!t)return"";let e=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=t[t.length-1];return t+(e.includes(r)?"\u0576":"\u0568")}var Ib=()=>{let t={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function e(n){return t[n]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.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 ${n.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`}case"invalid_value":return n.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 ${T(n.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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);if(s){let a=Number(n.maximum),l=wm(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 ${dn(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${n.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 ${dn(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);if(s){let a=Number(n.minimum),l=wm(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 ${dn(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${n.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 ${dn(n.origin)} \u056C\u056B\u0576\u056B ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[o.format]??n.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 ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${S(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${dn(n.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 ${dn(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Im(){return{localeError:Ib()}}var Tb=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(n){return t[n]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${o}, diterima ${a}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${T(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${r[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function Tm(){return{localeError:Tb()}}var Rb=()=>{let t={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function e(n){return t[n]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${T(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${o}${n.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${o}${n.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${r[o.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${S(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}};function Rm(){return{localeError:Rb()}}var Pb=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(n){return t[n]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${a}`:`Input non valido: atteso ${o}, ricevuto ${a}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${T(n.values[0])}`:`Opzione non valida: atteso uno tra ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${S(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function Pm(){return{localeError:Pb()}}var Nb=()=>{let t={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function e(n){return t[n]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${T(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${S(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=e(n.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${s.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=e(n.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${s.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[o.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.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${n.keys.length>1?"\u7FA4":""}: ${S(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function Nm(){return{localeError:Nb()}}var zb=()=>{let t={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function e(n){return t[n]??null}let r={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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.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 ${n.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`}case"invalid_value":return n.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 ${T(n.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 ${S(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.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 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${o}${n.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 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.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 ${n.origin} ${s.verb} ${o}${n.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 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[o.format]??n.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 ${n.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${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${S(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.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 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function zm(){return{localeError:zb()}}var Db=()=>{let t={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function e(n){return t[n]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.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 ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`}case"invalid_value":return n.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 ${T(n.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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${n.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${S(n.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 ${n.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 ${n.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 Ri(){return{localeError:Db()}}function Dm(){return Ri()}var Ob=()=>{let t={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function e(n){return t[n]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${T(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${S(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=e(n.origin),l=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${l} ${o}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${o}${s}`}case"too_small":{let o=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=e(n.origin),l=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${l} ${o}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${o}${s}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[o.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${S(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function Om(){return{localeError:Ob()}}var vr=t=>t.charAt(0).toUpperCase()+t.slice(1);function Am(t){let e=Math.abs(t),r=e%10,i=e%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}var Ab=()=>{let t={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function e(n,o,s,a){let l=t[n]??null;return l===null?l:{unit:l.unit[o],verb:l.verb[a][s?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${o}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${T(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${S(n.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[n.origin]??n.origin,s=e(n.origin,Am(Number(n.maximum)),n.inclusive??!1,"smaller");if(s?.verb)return`${vr(o??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.maximum.toString()} ${s.unit??"element\u0173"}`;let a=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${vr(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${n.maximum.toString()} ${s?.unit}`}case"too_small":{let o=i[n.origin]??n.origin,s=e(n.origin,Am(Number(n.minimum)),n.inclusive??!1,"bigger");if(s?.verb)return`${vr(o??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.minimum.toString()} ${s.unit??"element\u0173"}`;let a=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${vr(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${n.minimum.toString()} ${s?.unit}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${r[o.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${S(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[n.origin]??n.origin;return`${vr(o??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Lm(){return{localeError:Ab()}}var Lb=()=>{let t={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function e(n){return t[n]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${T(n.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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.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 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.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 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`${n.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"}: ${S(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.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 ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function Cm(){return{localeError:Lb()}}var Cb=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(n){return t[n]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${a}`:`Input tidak sah: dijangka ${o}, diterima ${a}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${T(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${r[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${S(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function jm(){return{localeError:Cb()}}var jb=()=>{let t={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function e(n){return t[n]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${o}, ontving ${a}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${T(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin),a=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return s?`Te ${a}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${a}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin),a=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return s?`Te ${a}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${a}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function Mm(){return{localeError:jb()}}var Mb=()=>{let t={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function e(n){return t[n]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${a}`:`Ugyldig input: forventet ${o}, fikk ${a}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${T(n.values[0])}`:`Ugyldig valg: forventet en av ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${S(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function Um(){return{localeError:Mb()}}var Ub=()=>{let t={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function e(n){return t[n]??null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${a}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${T(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=n;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[o.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function Fm(){return{localeError:Ub()}}var Fb=()=>{let t={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function e(n){return t[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${T(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${S(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[o.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${S(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.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 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function Zm(){return{localeError:Fb()}}var Zb=()=>{let t={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function e(n){return t[n]??null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${a}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${T(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[o.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function Hm(){return{localeError:Zb()}}var Hb=()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(n){return t[n]??null}let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${a}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${T(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${r[o.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}};function Wm(){return{localeError:Hb()}}function Bm(t,e,r,i){let n=Math.abs(t),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?e:o>=2&&o<=4?r:i}var Wb=()=>{let t={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function e(n){return t[n]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${T(n.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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);if(s){let a=Number(n.maximum),l=Bm(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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);if(s){let a=Number(n.minimum),l=Bm(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 ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${n.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 ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${S(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.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 ${n.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 Jm(){return{localeError:Wb()}}var Bb=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(n){return t[n]??null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${a}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${T(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${r[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${S(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function Gm(){return{localeError:Bb()}}var Jb=()=>{let t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function e(n){return t[n]??null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${a}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${T(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${r[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${S(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function Vm(){return{localeError:Jb()}}var Gb=()=>{let t={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function e(n){return t[n]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.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 ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`}case"invalid_value":return n.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 ${T(n.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 ${S(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.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 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.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 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.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 ${n.origin} ${o}${n.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 ${n.origin} ${o}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.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${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${S(n.keys,", ")}`;case"invalid_key":return`${n.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`${n.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 qm(){return{localeError:Gb()}}var Vb=()=>{let t={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function e(n){return t[n]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.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 ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`}case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${T(n.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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=e(n.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=e(n.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[o.format]??n.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 ${n.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: ${S(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.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 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function Km(){return{localeError:Vb()}}var qb=()=>{let t={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function e(n){return t[n]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${a}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${T(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[o.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${S(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function Ym(){return{localeError:qb()}}var Kb=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function e(n){return t[n]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.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 ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`}case"invalid_value":return n.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 ${T(n.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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${o}${n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.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 ${n.origin} ${s.verb} ${o}${n.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 ${n.origin} \u0431\u0443\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${S(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.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 ${n.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 Pi(){return{localeError:Kb()}}function Xm(){return Pi()}var Yb=()=>{let t={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function e(n){return t[n]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${T(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${S(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${n.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: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${o}${n.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${o}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.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${n.keys.length>1?"\u0632":""}: ${S(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function Qm(){return{localeError:Yb()}}var Xb=()=>{let t={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"}};function e(n){return t[n]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${a}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${T(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[o.format]??n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${S(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${n.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function ef(){return{localeError:Xb()}}var Qb=()=>{let t={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function e(n){return t[n]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${T(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${S(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.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 ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function tf(){return{localeError:Qb()}}var ex=()=>{let t={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function e(n){return t[n]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${T(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${r[o.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${S(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function nf(){return{localeError:ex()}}var tx=()=>{let t={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function e(n){return t[n]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${a}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${T(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${S(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function rf(){return{localeError:tx()}}var nx=()=>{let t={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function e(n){return t[n]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${T(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${s.verb} ${o}${n.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.maximum}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${s.verb} ${o}${n.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.minimum}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${S(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.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 ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function of(){return{localeError:nx()}}var sf,cl=Symbol("ZodOutput"),ll=Symbol("ZodInput"),Ni=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let i=r[0];return this._map.set(e,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let i={...this.get(r)??{}};delete i.id;let n={...i,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function zi(){return new Ni}(sf=globalThis).__zod_globalRegistry??(sf.__zod_globalRegistry=zi());var xe=globalThis.__zod_globalRegistry;function ul(t,e){return new t({type:"string",...D(e)})}function pl(t,e){return new t({type:"string",coerce:!0,...D(e)})}function Di(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...D(e)})}function br(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...D(e)})}function Oi(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...D(e)})}function Ai(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...D(e)})}function Li(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...D(e)})}function Ci(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...D(e)})}function xr(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...D(e)})}function ji(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...D(e)})}function Mi(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...D(e)})}function Ui(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...D(e)})}function Fi(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...D(e)})}function Zi(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...D(e)})}function Hi(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...D(e)})}function Wi(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...D(e)})}function Bi(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...D(e)})}function Ji(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...D(e)})}function dl(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...D(e)})}function Gi(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...D(e)})}function Vi(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...D(e)})}function qi(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...D(e)})}function Ki(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...D(e)})}function Yi(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...D(e)})}function Xi(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...D(e)})}var ml={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function fl(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...D(e)})}function hl(t,e){return new t({type:"string",format:"date",check:"string_format",...D(e)})}function gl(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...D(e)})}function yl(t,e){return new t({type:"string",format:"duration",check:"string_format",...D(e)})}function vl(t,e){return new t({type:"number",checks:[],...D(e)})}function _l(t,e){return new t({type:"number",coerce:!0,checks:[],...D(e)})}function bl(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...D(e)})}function xl(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...D(e)})}function $l(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...D(e)})}function Sl(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...D(e)})}function kl(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...D(e)})}function El(t,e){return new t({type:"boolean",...D(e)})}function wl(t,e){return new t({type:"boolean",coerce:!0,...D(e)})}function Il(t,e){return new t({type:"bigint",...D(e)})}function Tl(t,e){return new t({type:"bigint",coerce:!0,...D(e)})}function Rl(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...D(e)})}function Pl(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...D(e)})}function Nl(t,e){return new t({type:"symbol",...D(e)})}function zl(t,e){return new t({type:"undefined",...D(e)})}function Dl(t,e){return new t({type:"null",...D(e)})}function Ol(t){return new t({type:"any"})}function Al(t){return new t({type:"unknown"})}function Ll(t,e){return new t({type:"never",...D(e)})}function Cl(t,e){return new t({type:"void",...D(e)})}function jl(t,e){return new t({type:"date",...D(e)})}function Ml(t,e){return new t({type:"date",coerce:!0,...D(e)})}function Ul(t,e){return new t({type:"nan",...D(e)})}function Ke(t,e){return new yi({check:"less_than",...D(e),value:t,inclusive:!1})}function Oe(t,e){return new yi({check:"less_than",...D(e),value:t,inclusive:!0})}function Ye(t,e){return new vi({check:"greater_than",...D(e),value:t,inclusive:!1})}function Ee(t,e){return new vi({check:"greater_than",...D(e),value:t,inclusive:!0})}function Qi(t){return Ye(0,t)}function eo(t){return Ke(0,t)}function to(t){return Oe(0,t)}function no(t){return Ee(0,t)}function kt(t,e){return new Da({check:"multiple_of",...D(e),value:t})}function Et(t,e){return new La({check:"max_size",...D(e),maximum:t})}function Xe(t,e){return new Ca({check:"min_size",...D(e),minimum:t})}function Jt(t,e){return new ja({check:"size_equals",...D(e),size:t})}function Gt(t,e){return new Ma({check:"max_length",...D(e),maximum:t})}function lt(t,e){return new Ua({check:"min_length",...D(e),minimum:t})}function Vt(t,e){return new Fa({check:"length_equals",...D(e),length:t})}function mn(t,e){return new Za({check:"string_format",format:"regex",...D(e),pattern:t})}function fn(t){return new Ha({check:"string_format",format:"lowercase",...D(t)})}function hn(t){return new Wa({check:"string_format",format:"uppercase",...D(t)})}function gn(t,e){return new Ba({check:"string_format",format:"includes",...D(e),includes:t})}function yn(t,e){return new Ja({check:"string_format",format:"starts_with",...D(e),prefix:t})}function vn(t,e){return new Ga({check:"string_format",format:"ends_with",...D(e),suffix:t})}function ro(t,e,r){return new Va({check:"property",property:t,schema:e,...D(r)})}function _n(t,e){return new qa({check:"mime_type",mime:t,...D(e)})}function We(t){return new Ka({check:"overwrite",tx:t})}function bn(t){return We(e=>e.normalize(t))}function xn(){return We(t=>t.trim())}function $n(){return We(t=>t.toLowerCase())}function Sn(){return We(t=>t.toUpperCase())}function kn(){return We(t=>Vs(t))}function Fl(t,e,r){return new t({type:"array",element:e,...D(r)})}function ix(t,e,r){return new t({type:"union",options:e,...D(r)})}function ox(t,e,r){return new t({type:"union",options:e,inclusive:!1,...D(r)})}function sx(t,e,r,i){return new t({type:"union",options:r,discriminator:e,...D(i)})}function ax(t,e,r){return new t({type:"intersection",left:e,right:r})}function cx(t,e,r,i){let n=r instanceof V,o=n?i:r,s=n?r:null;return new t({type:"tuple",items:e,rest:s,...D(o)})}function lx(t,e,r,i){return new t({type:"record",keyType:e,valueType:r,...D(i)})}function ux(t,e,r,i){return new t({type:"map",keyType:e,valueType:r,...D(i)})}function px(t,e,r){return new t({type:"set",valueType:e,...D(r)})}function dx(t,e,r){let i=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new t({type:"enum",entries:i,...D(r)})}function mx(t,e,r){return new t({type:"enum",entries:e,...D(r)})}function fx(t,e,r){return new t({type:"literal",values:Array.isArray(e)?e:[e],...D(r)})}function Zl(t,e){return new t({type:"file",...D(e)})}function hx(t,e){return new t({type:"transform",transform:e})}function gx(t,e){return new t({type:"optional",innerType:e})}function yx(t,e){return new t({type:"nullable",innerType:e})}function vx(t,e,r){return new t({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():Ks(r)}})}function _x(t,e,r){return new t({type:"nonoptional",innerType:e,...D(r)})}function bx(t,e){return new t({type:"success",innerType:e})}function xx(t,e,r){return new t({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}function $x(t,e,r){return new t({type:"pipe",in:e,out:r})}function Sx(t,e){return new t({type:"readonly",innerType:e})}function kx(t,e,r){return new t({type:"template_literal",parts:e,...D(r)})}function Ex(t,e){return new t({type:"lazy",getter:e})}function wx(t,e){return new t({type:"promise",innerType:e})}function Hl(t,e,r){let i=D(r);return i.abort??(i.abort=!0),new t({type:"custom",check:"custom",fn:e,...i})}function Wl(t,e,r){return new t({type:"custom",check:"custom",fn:e,...D(r)})}function Bl(t){let e=af(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(sn(i,r.value,e._zod.def));else{let n=i;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=e),n.continue??(n.continue=!e._zod.def.abort),r.issues.push(sn(n))}},t(r.value,r)));return e}function af(t,e){let r=new ie({check:"custom",...D(e)});return r._zod.check=t,r}function Jl(t){let e=new ie({check:"describe"});return e._zod.onattach=[r=>{let i=xe.get(r)??{};xe.add(r,{...i,description:t})}],e._zod.check=()=>{},e}function Gl(t){let e=new ie({check:"meta"});return e._zod.onattach=[r=>{let i=xe.get(r)??{};xe.add(r,{...i,...t})}],e._zod.check=()=>{},e}function Vl(t,e){let r=D(e),i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(m=>typeof m=="string"?m.toLowerCase():m),n=n.map(m=>typeof m=="string"?m.toLowerCase():m));let o=new Set(i),s=new Set(n),a=t.Codec??yr,l=t.Boolean??hr,c=t.String??Bt,u=new c({type:"string",error:r.error}),d=new l({type:"boolean",error:r.error}),p=new a({type:"pipe",in:u,out:d,transform:((m,f)=>{let y=m;return r.case!=="sensitive"&&(y=y.toLowerCase()),o.has(y)?!0:s.has(y)?!1:(f.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:f.value,inst:p,continue:!1}),{})}),reverseTransform:((m,f)=>m===!0?i[0]||"true":n[0]||"false"),error:r.error});return p}function En(t,e,r,i={}){let n=D(i),o={...D(i),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:a=>r.test(a),...n};return r instanceof RegExp&&(o.pattern=r),new t(o)}function wt(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??xe,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function te(t,e,r={path:[],schemaPath:[]}){var i;let n=t._zod.def,o=e.seen.get(t);if(o)return o.count++,r.schemaPath.includes(t)&&(o.cycle=r.path),o.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};e.seen.set(t,s);let a=t._zod.toJSONSchema?.();if(a)s.schema=a;else{let u={...r,schemaPath:[...r.schemaPath,t],path:r.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,s.schema,u);else{let p=s.schema,m=e.processors[n.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);m(t,e,p,u)}let d=t._zod.parent;d&&(s.ref||(s.ref=d),te(d,e,u),e.seen.get(d).isParent=!0)}let l=e.metadataRegistry.get(t);return l&&Object.assign(s.schema,l),e.io==="input"&&we(t)&&(delete s.schema.examples,delete s.schema.default),e.io==="input"&&s.schema._prefault&&((i=s.schema).default??(i.default=s.schema._prefault)),delete s.schema._prefault,e.seen.get(t).schema}function It(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let s of t.seen.entries()){let a=t.metadataRegistry.get(s[0])?.id;if(a){let l=i.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.`);i.set(a,s[0])}}let n=s=>{let a=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let d=t.external.registry.get(s[0])?.id,p=t.external.uri??(f=>f);if(d)return{ref:p(d)};let m=s[1].defId??s[1].schema.id??`schema${t.counter++}`;return s[1].defId=m,{defId:m,ref:`${p("__shared")}#/${a}/${m}`}}if(s[1]===r)return{ref:"#"};let c=`#/${a}/`,u=s[1].schema.id??`__schema${t.counter++}`;return{defId:u,ref:c+u}},o=s=>{if(s[1].schema.$ref)return;let a=s[1],{ref:l,defId:c}=n(s);a.def={...a.schema},c&&(a.defId=c);let u=a.schema;for(let d in u)delete u[d];u.$ref=l};if(t.cycles==="throw")for(let s of t.seen.entries()){let a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
454
+ `)}m.write("payload.value = newResult;"),m.write("return payload;");let g=m.compile();return(x,E)=>g(p,x,E)},o,s=Zt,a=!tr.jitless,c=a&&Bs.value,u=e.catchall,d;t._zod.parse=(p,m)=>{d??(d=i.value);let f=p.value;return s(f)?a&&c&&m?.async===!1&&m.jitless!==!0?(o||(o=n(e.shape)),p=o(p,m),u?rm([],f,p,m,d,t):p):r(p,m):(p.issues.push({expected:"object",code:"invalid_type",input:f,inst:t}),p)}});function Wd(t,e,r,i){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;let n=t.filter(o=>!St(o));return n.length===1?(e.value=n[0].value,n[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(s=>we(s,i,ue())))}),e)}var hr=v("$ZodUnion",(t,e)=>{G.init(t,e),Y(t._zod,"optin",()=>e.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Y(t._zod,"optout",()=>e.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Y(t._zod,"values",()=>{if(e.options.every(n=>n._zod.values))return new Set(e.options.flatMap(n=>Array.from(n._zod.values)))}),Y(t._zod,"pattern",()=>{if(e.options.every(n=>n._zod.pattern)){let n=e.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>ir(o.source)).join("|")})$`)}});let r=e.options.length===1,i=e.options[0]._zod.run;t._zod.parse=(n,o)=>{if(r)return i(n,o);let s=!1,a=[];for(let l of e.options){let c=l._zod.run({value:n.value,issues:[]},o);if(c instanceof Promise)a.push(c),s=!0;else{if(c.issues.length===0)return c;a.push(c)}}return s?Promise.all(a).then(l=>Wd(l,n,t,o)):Wd(a,n,t,o)}});function Bd(t,e,r,i){let n=t.filter(o=>o.issues.length===0);return n.length===1?(e.value=n[0].value,e):(n.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(s=>we(s,i,ue())))}):e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:[],inclusive:!1}),e)}var Dc=v("$ZodXor",(t,e)=>{hr.init(t,e),e.inclusive=!1;let r=e.options.length===1,i=e.options[0]._zod.run;t._zod.parse=(n,o)=>{if(r)return i(n,o);let s=!1,a=[];for(let l of e.options){let c=l._zod.run({value:n.value,issues:[]},o);c instanceof Promise?(a.push(c),s=!0):a.push(c)}return s?Promise.all(a).then(l=>Bd(l,n,t,o)):Bd(a,n,t,o)}}),Oc=v("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,hr.init(t,e);let r=t._zod.parse;Y(t._zod,"propValues",()=>{let n={};for(let o of e.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let[a,l]of Object.entries(s)){n[a]||(n[a]=new Set);for(let c of l)n[a].add(c)}}return n});let i=on(()=>{let n=e.options,o=new Map;for(let s of n){let a=s._zod.propValues?.[e.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let l of a){if(o.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);o.set(l,s)}}return o});t._zod.parse=(n,o)=>{let s=n.value;if(!Zt(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),n;let a=i.value.get(s?.[e.discriminator]);return a?a._zod.run(n,o):e.unionFallback?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:s,path:[e.discriminator],inst:t}),n)}}),Ac=v("$ZodIntersection",(t,e)=>{G.init(t,e),t._zod.parse=(r,i)=>{let n=r.value,o=e.left._zod.run({value:n,issues:[]},i),s=e.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([l,c])=>Jd(r,l,c)):Jd(r,o,s)}});function Ga(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if($t(t)&&$t(e)){let r=Object.keys(e),i=Object.keys(t).filter(o=>r.indexOf(o)!==-1),n={...t,...e};for(let o of i){let s=Ga(t[o],e[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n[o]=s.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<t.length;i++){let n=t[i],o=e[i],s=Ga(n,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Jd(t,e,r){let i=new Map,n;for(let a of e.issues)if(a.code==="unrecognized_keys"){n??(n=a);for(let l of a.keys)i.has(l)||i.set(l,{}),i.get(l).l=!0}else t.issues.push(a);for(let a of r.issues)if(a.code==="unrecognized_keys")for(let l of a.keys)i.has(l)||i.set(l,{}),i.get(l).r=!0;else t.issues.push(a);let o=[...i].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(o.length&&n&&t.issues.push({...n,keys:o}),St(t))return t;let s=Ga(e.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return t.value=s.data,t}var ki=v("$ZodTuple",(t,e)=>{G.init(t,e);let r=e.items;t._zod.parse=(i,n)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:t,expected:"tuple",code:"invalid_type"}),i;i.value=[];let s=[],a=[...r].reverse().findIndex(u=>u._zod.optin!=="optional"),l=a===-1?0:r.length-a;if(!e.rest){let u=o.length>r.length,d=o.length<l-1;if(u||d)return i.issues.push({...u?{code:"too_big",maximum:r.length,inclusive:!0}:{code:"too_small",minimum:r.length},input:o,inst:t,origin:"array"}),i}let c=-1;for(let u of r){if(c++,c>=o.length&&c>=l)continue;let d=u._zod.run({value:o[c],issues:[]},n);d instanceof Promise?s.push(d.then(p=>yi(p,i,c))):yi(d,i,c)}if(e.rest){let u=o.slice(r.length);for(let d of u){c++;let p=e.rest._zod.run({value:d,issues:[]},n);p instanceof Promise?s.push(p.then(m=>yi(m,i,c))):yi(p,i,c)}}return s.length?Promise.all(s).then(()=>i):i}});function yi(t,e,r){t.issues.length&&e.issues.push(...ze(r,t.issues)),e.value[r]=t.value}var Lc=v("$ZodRecord",(t,e)=>{G.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;if(!$t(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:t}),r;let o=[],s=e.keyType._zod.values;if(s){r.value={};let a=new Set;for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){a.add(typeof c=="number"?c.toString():c);let u=e.valueType._zod.run({value:n[c],issues:[]},i);u instanceof Promise?o.push(u.then(d=>{d.issues.length&&r.issues.push(...ze(c,d.issues)),r.value[c]=d.value})):(u.issues.length&&r.issues.push(...ze(c,u.issues)),r.value[c]=u.value)}let l;for(let c in n)a.has(c)||(l=l??[],l.push(c));l&&l.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:t,keys:l})}else{r.value={};for(let a of Reflect.ownKeys(n)){if(a==="__proto__")continue;let l=e.keyType._zod.run({value:a,issues:[]},i);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&fi.test(a)&&l.issues.length&&l.issues.some(d=>d.code==="invalid_type"&&d.expected==="number")){let d=e.keyType._zod.run({value:Number(a),issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(l=d)}if(l.issues.length){e.mode==="loose"?r.value[a]=n[a]:r.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(d=>we(d,i,ue())),input:a,path:[a],inst:t});continue}let u=e.valueType._zod.run({value:n[a],issues:[]},i);u instanceof Promise?o.push(u.then(d=>{d.issues.length&&r.issues.push(...ze(a,d.issues)),r.value[l.value]=d.value})):(u.issues.length&&r.issues.push(...ze(a,u.issues)),r.value[l.value]=u.value)}}return o.length?Promise.all(o).then(()=>r):r}}),Cc=v("$ZodMap",(t,e)=>{G.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:t}),r;let o=[];r.value=new Map;for(let[s,a]of n){let l=e.keyType._zod.run({value:s,issues:[]},i),c=e.valueType._zod.run({value:a,issues:[]},i);l instanceof Promise||c instanceof Promise?o.push(Promise.all([l,c]).then(([u,d])=>{Vd(u,d,r,s,n,t,i)})):Vd(l,c,r,s,n,t,i)}return o.length?Promise.all(o).then(()=>r):r}});function Vd(t,e,r,i,n,o,s){t.issues.length&&(or.has(typeof i)?r.issues.push(...ze(i,t.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:t.issues.map(a=>we(a,s,ue()))})),e.issues.length&&(or.has(typeof i)?r.issues.push(...ze(i,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:e.issues.map(a=>we(a,s,ue()))})),r.value.set(t.value,e.value)}var jc=v("$ZodSet",(t,e)=>{G.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:t,expected:"set",code:"invalid_type"}),r;let o=[];r.value=new Set;for(let s of n){let a=e.valueType._zod.run({value:s,issues:[]},i);a instanceof Promise?o.push(a.then(l=>Gd(l,r))):Gd(a,r)}return o.length?Promise.all(o).then(()=>r):r}});function Gd(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}var Mc=v("$ZodEnum",(t,e)=>{G.init(t,e);let r=rr(e.entries),i=new Set(r);t._zod.values=i,t._zod.pattern=new RegExp(`^(${r.filter(n=>or.has(typeof n)).map(n=>typeof n=="string"?Le(n):n.toString()).join("|")})$`),t._zod.parse=(n,o)=>{let s=n.value;return i.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:t}),n}}),Uc=v("$ZodLiteral",(t,e)=>{if(G.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(e.values);t._zod.values=r,t._zod.pattern=new RegExp(`^(${e.values.map(i=>typeof i=="string"?Le(i):i?Le(i.toString()):String(i)).join("|")})$`),t._zod.parse=(i,n)=>{let o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:e.values,input:o,inst:t}),i}}),Fc=v("$ZodFile",(t,e)=>{G.init(t,e),t._zod.parse=(r,i)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:t}),r}}),Zc=v("$ZodTransform",(t,e)=>{G.init(t,e),t._zod.parse=(r,i)=>{if(i.direction==="backward")throw new _t(t.constructor.name);let n=e.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r));if(n instanceof Promise)throw new Fe;return r.value=n,r}});function qd(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}var Ei=v("$ZodOptional",(t,e)=>{G.init(t,e),t._zod.optin="optional",t._zod.optout="optional",Y(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),Y(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${ir(r.source)})?$`):void 0}),t._zod.parse=(r,i)=>{if(e.innerType._zod.optin==="optional"){let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>qd(o,r.value)):qd(n,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,i)}}),Hc=v("$ZodExactOptional",(t,e)=>{Ei.init(t,e),Y(t._zod,"values",()=>e.innerType._zod.values),Y(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(r,i)=>e.innerType._zod.run(r,i)}),Wc=v("$ZodNullable",(t,e)=>{G.init(t,e),Y(t._zod,"optin",()=>e.innerType._zod.optin),Y(t._zod,"optout",()=>e.innerType._zod.optout),Y(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${ir(r.source)}|null)$`):void 0}),Y(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,i)=>r.value===null?r:e.innerType._zod.run(r,i)}),Bc=v("$ZodDefault",(t,e)=>{G.init(t,e),t._zod.optin="optional",Y(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>{if(i.direction==="backward")return e.innerType._zod.run(r,i);if(r.value===void 0)return r.value=e.defaultValue,r;let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Kd(o,e)):Kd(n,e)}});function Kd(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var Jc=v("$ZodPrefault",(t,e)=>{G.init(t,e),t._zod.optin="optional",Y(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,i))}),Vc=v("$ZodNonOptional",(t,e)=>{G.init(t,e),Y(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),t._zod.parse=(r,i)=>{let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Yd(o,t)):Yd(n,t)}});function Yd(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}var Gc=v("$ZodSuccess",(t,e)=>{G.init(t,e),t._zod.parse=(r,i)=>{if(i.direction==="backward")throw new _t("ZodSuccess");let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),qc=v("$ZodCatch",(t,e)=>{G.init(t,e),Y(t._zod,"optin",()=>e.innerType._zod.optin),Y(t._zod,"optout",()=>e.innerType._zod.optout),Y(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>{if(i.direction==="backward")return e.innerType._zod.run(r,i);let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=e.catchValue({...r,error:{issues:o.issues.map(s=>we(s,i,ue()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=e.catchValue({...r,error:{issues:n.issues.map(o=>we(o,i,ue()))},input:r.value}),r.issues=[]),r)}}),Kc=v("$ZodNaN",(t,e)=>{G.init(t,e),t._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)}),Yc=v("$ZodPipe",(t,e)=>{G.init(t,e),Y(t._zod,"values",()=>e.in._zod.values),Y(t._zod,"optin",()=>e.in._zod.optin),Y(t._zod,"optout",()=>e.out._zod.optout),Y(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,i)=>{if(i.direction==="backward"){let o=e.out._zod.run(r,i);return o instanceof Promise?o.then(s=>vi(s,e.in,i)):vi(o,e.in,i)}let n=e.in._zod.run(r,i);return n instanceof Promise?n.then(o=>vi(o,e.out,i)):vi(n,e.out,i)}});function vi(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}var gr=v("$ZodCodec",(t,e)=>{G.init(t,e),Y(t._zod,"values",()=>e.in._zod.values),Y(t._zod,"optin",()=>e.in._zod.optin),Y(t._zod,"optout",()=>e.out._zod.optout),Y(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){let o=e.in._zod.run(r,i);return o instanceof Promise?o.then(s=>_i(s,e,i)):_i(o,e,i)}else{let o=e.out._zod.run(r,i);return o instanceof Promise?o.then(s=>_i(s,e,i)):_i(o,e,i)}}});function _i(t,e,r){if(t.issues.length)return t.aborted=!0,t;if((r.direction||"forward")==="forward"){let n=e.transform(t.value,t);return n instanceof Promise?n.then(o=>bi(t,o,e.out,r)):bi(t,n,e.out,r)}else{let n=e.reverseTransform(t.value,t);return n instanceof Promise?n.then(o=>bi(t,o,e.in,r)):bi(t,n,e.in,r)}}function bi(t,e,r,i){return t.issues.length?(t.aborted=!0,t):r._zod.run({value:e,issues:t.issues},i)}var Xc=v("$ZodReadonly",(t,e)=>{G.init(t,e),Y(t._zod,"propValues",()=>e.innerType._zod.propValues),Y(t._zod,"values",()=>e.innerType._zod.values),Y(t._zod,"optin",()=>e.innerType?._zod?.optin),Y(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(r,i)=>{if(i.direction==="backward")return e.innerType._zod.run(r,i);let n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(Xd):Xd(n)}});function Xd(t){return t.value=Object.freeze(t.value),t}var Qc=v("$ZodTemplateLiteral",(t,e)=>{G.init(t,e);let r=[];for(let i of e.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let n=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,s))}else if(i===null||Vs.has(typeof i))r.push(Le(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:t,expected:"string",code:"invalid_type"}),i):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),i)}),el=v("$ZodFunction",(t,e)=>(G.init(t,e),t._def=e,t._zod.def=e,t.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){let n=t._def.input?ri(t._def.input,i):i,o=Reflect.apply(r,this,n);return t._def.output?ri(t._def.output,o):o}},t.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let n=t._def.input?await ii(t._def.input,i):i,o=await Reflect.apply(r,this,n);return t._def.output?await ii(t._def.output,o):o}},t._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:t}),r):(t._def.output&&t._def.output._zod.def.type==="promise"?r.value=t.implementAsync(r.value):r.value=t.implement(r.value),r),t.input=(...r)=>{let i=t.constructor;return Array.isArray(r[0])?new i({type:"function",input:new ki({type:"tuple",items:r[0],rest:r[1]}),output:t._def.output}):new i({type:"function",input:r[0],output:t._def.output})},t.output=r=>{let i=t.constructor;return new i({type:"function",input:t._def.input,output:r})},t)),tl=v("$ZodPromise",(t,e)=>{G.init(t,e),t._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>e.innerType._zod.run({value:n,issues:[]},i))}),nl=v("$ZodLazy",(t,e)=>{G.init(t,e),Y(t._zod,"innerType",()=>e.getter()),Y(t._zod,"pattern",()=>t._zod.innerType?._zod?.pattern),Y(t._zod,"propValues",()=>t._zod.innerType?._zod?.propValues),Y(t._zod,"optin",()=>t._zod.innerType?._zod?.optin??void 0),Y(t._zod,"optout",()=>t._zod.innerType?._zod?.optout??void 0),t._zod.parse=(r,i)=>t._zod.innerType._zod.run(r,i)}),rl=v("$ZodCustom",(t,e)=>{ie.init(t,e),G.init(t,e),t._zod.parse=(r,i)=>r,t._zod.check=r=>{let i=r.value,n=e.fn(i);if(n instanceof Promise)return n.then(o=>Qd(o,r,i,t));Qd(n,r,i,t)}});function Qd(t,e,r,i){if(!t){let n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),e.issues.push(sn(n))}}var vr={};Ue(vr,{ar:()=>om,az:()=>sm,be:()=>cm,bg:()=>lm,ca:()=>um,cs:()=>pm,da:()=>dm,de:()=>mm,en:()=>wi,eo:()=>fm,es:()=>hm,fa:()=>gm,fi:()=>ym,fr:()=>vm,frCA:()=>_m,he:()=>bm,hu:()=>xm,hy:()=>Sm,id:()=>km,is:()=>Em,it:()=>wm,ja:()=>Im,ka:()=>Tm,kh:()=>Rm,km:()=>Ii,ko:()=>Pm,lt:()=>zm,mk:()=>Dm,ms:()=>Om,nl:()=>Am,no:()=>Lm,ota:()=>Cm,pl:()=>Mm,ps:()=>jm,pt:()=>Um,ru:()=>Zm,sl:()=>Hm,sv:()=>Wm,ta:()=>Bm,th:()=>Jm,tr:()=>Vm,ua:()=>Gm,uk:()=>Ti,ur:()=>qm,uz:()=>Km,vi:()=>Ym,yo:()=>ef,zhCN:()=>Xm,zhTW:()=>Qm});var cb=()=>{let t={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function e(n){return t[n]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.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 ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`}case"invalid_value":return n.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 ${T(n.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: ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.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 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.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 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${n.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${S(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.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 ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function om(){return{localeError:cb()}}var lb=()=>{let t={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function e(n){return t[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${a}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${T(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[o.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${S(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function sm(){return{localeError:lb()}}function am(t,e,r,i){let n=Math.abs(t),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?e:o>=2&&o<=4?r:i}var ub=()=>{let t={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function e(n){return t[n]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`}case"invalid_value":return n.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 ${T(n.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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);if(s){let a=Number(n.maximum),l=am(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 ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);if(s){let a=Number(n.minimum),l=am(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 ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${n.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 ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${S(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.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 ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function cm(){return{localeError:ub()}}var pb=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function e(n){return t[n]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${T(n.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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${n.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 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${n.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${S(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.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 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function lm(){return{localeError:pb()}}var db=()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(n){return t[n]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${a}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${T(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${S(n.values," o ")}`;case"too_big":{let o=n.inclusive?"com a m\xE0xim":"menys de",s=e(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${o} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"com a m\xEDnim":"m\xE9s de",s=e(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${o} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}};function um(){return{localeError:db()}}var mb=()=>{let t={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function e(n){return t[n]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${a}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${T(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${S(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}};function pm(){return{localeError:mb()}}var fb=()=>{let t={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function e(n){return t[n]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${a}`:`Ugyldigt input: forventede ${o}, fik ${a}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${T(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin),a=i[n.origin]??n.origin;return s?`For stor: forventede ${a??"value"} ${s.verb} ${o} ${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin),a=i[n.origin]??n.origin;return s?`For lille: forventede ${a} ${s.verb} ${o} ${n.minimum.toString()} ${s.unit}`:`For lille: forventede ${a} havde ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${S(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${n.origin}`;default:return"Ugyldigt input"}}};function dm(){return{localeError:fb()}}var hb=()=>{let t={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function e(n){return t[n]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${a}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${T(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${S(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}};function mm(){return{localeError:hb()}}var gb=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function e(n){return t[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return`Invalid input: expected ${o}, received ${a}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${T(n.values[0])}`:`Invalid option: expected one of ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${s.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function wi(){return{localeError:gb()}}var yb=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(n){return t[n]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${a}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${T(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${o}${n.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${r[o.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function fm(){return{localeError:yb()}}var vb=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(n){return t[n]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${a}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${T(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin),a=i[n.origin]??n.origin;return s?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin),a=i[n.origin]??n.origin;return s?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${o}${n.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}};function hm(){return{localeError:vb()}}var _b=()=>{let t={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function e(n){return t[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${T(n.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 ${S(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[o.format]??n.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 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${S(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.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 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function gm(){return{localeError:_b()}}var bb=()=>{let t={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function e(n){return t[n]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${a}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${T(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${o}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${o}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${r[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${S(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function ym(){return{localeError:bb()}}var xb=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(n){return t[n]??null}let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN",number:"nombre",array:"tableau"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${a} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${T(n.values[0])} attendu`:`Option invalide : une valeur parmi ${S(n.values,"|")} attendue`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Trop grand : ${n.origin??"valeur"} doit ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Trop petit : ${n.origin} doit ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${S(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function vm(){return{localeError:xb()}}var $b=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(n){return t[n]??null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${a}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${T(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u2264":"<",s=e(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"\u2265":">",s=e(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${S(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function _m(){return{localeError:$b()}}var Sb=()=>{let t={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},e={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=c=>c?t[c]:void 0,i=c=>{let u=r(c);return u?u.label:c??t.unknown.label},n=c=>`\u05D4${i(c)}`,o=c=>(r(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=c=>c?e[c]??null:null,a={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},l={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let u=c.expected,d=l[u??""]??i(u),p=N(c.input),m=l[p]??t[p]?.label??p;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`}case"invalid_value":{if(c.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${T(c.values[0])}`;let u=c.values.map(m=>T(m));if(c.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u[0]} \u05D0\u05D5 ${u[1]}`;let d=u[u.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 ${u.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let u=s(c.origin),d=n(c.origin??"value");if(c.origin==="string")return`${u?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${u?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let f=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${f}`}if(c.origin==="array"||c.origin==="set"){let f=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",y=c.inclusive?`${c.maximum} ${u?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${u?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${f} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`.trim()}let p=c.inclusive?"<=":"<",m=o(c.origin??"value");return u?.unit?`${u.longLabel} \u05DE\u05D3\u05D9: ${d} ${m} ${p}${c.maximum.toString()} ${u.unit}`:`${u?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${m} ${p}${c.maximum.toString()}`}case"too_small":{let u=s(c.origin),d=n(c.origin??"value");if(c.origin==="string")return`${u?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${u?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let f=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${f}`}if(c.origin==="array"||c.origin==="set"){let f=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let b=(c.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${f} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`}let y=c.inclusive?`${c.minimum} ${u?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${u?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${f} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`.trim()}let p=c.inclusive?">=":">",m=o(c.origin??"value");return u?.unit?`${u.shortLabel} \u05DE\u05D3\u05D9: ${d} ${m} ${p}${c.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${m} ${p}${c.minimum.toString()}`}case"invalid_format":{let u=c;if(u.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${u.prefix}"`;if(u.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${u.suffix}"`;if(u.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${u.includes}"`;if(u.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 ${u.pattern}`;let d=a[u.format],p=d?.label??u.format,f=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${p} \u05DC\u05D0 ${f}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${S(c.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function bm(){return{localeError:Sb()}}var kb=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(n){return t[n]??null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${a}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${T(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${n.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${o}${n.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[o.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function xm(){return{localeError:kb()}}function $m(t,e,r){return Math.abs(t)===1?e:r}function dn(t){if(!t)return"";let e=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=t[t.length-1];return t+(e.includes(r)?"\u0576":"\u0568")}var Eb=()=>{let t={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function e(n){return t[n]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.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 ${n.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`}case"invalid_value":return n.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 ${T(n.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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);if(s){let a=Number(n.maximum),l=$m(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 ${dn(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${n.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 ${dn(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);if(s){let a=Number(n.minimum),l=$m(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 ${dn(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${n.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 ${dn(n.origin)} \u056C\u056B\u0576\u056B ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[o.format]??n.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 ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${S(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${dn(n.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 ${dn(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Sm(){return{localeError:Eb()}}var wb=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(n){return t[n]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${o}, diterima ${a}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${T(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${r[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function km(){return{localeError:wb()}}var Ib=()=>{let t={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function e(n){return t[n]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${T(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${o}${n.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${o}${n.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${r[o.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${S(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}};function Em(){return{localeError:Ib()}}var Tb=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(n){return t[n]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${a}`:`Input non valido: atteso ${o}, ricevuto ${a}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${T(n.values[0])}`:`Opzione non valida: atteso uno tra ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${S(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function wm(){return{localeError:Tb()}}var Rb=()=>{let t={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function e(n){return t[n]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${T(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${S(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=e(n.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${s.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=e(n.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${s.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[o.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.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${n.keys.length>1?"\u7FA4":""}: ${S(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function Im(){return{localeError:Rb()}}var Pb=()=>{let t={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function e(n){return t[n]??null}let r={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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.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 ${n.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`}case"invalid_value":return n.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 ${T(n.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 ${S(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.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 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${o}${n.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 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.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 ${n.origin} ${s.verb} ${o}${n.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 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[o.format]??n.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 ${n.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${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${S(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.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 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function Tm(){return{localeError:Pb()}}var Nb=()=>{let t={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function e(n){return t[n]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.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 ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`}case"invalid_value":return n.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 ${T(n.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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${n.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${S(n.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 ${n.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 ${n.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 Ii(){return{localeError:Nb()}}function Rm(){return Ii()}var zb=()=>{let t={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function e(n){return t[n]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${T(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${S(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=e(n.origin),l=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${l} ${o}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${o}${s}`}case"too_small":{let o=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=e(n.origin),l=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${l} ${o}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${o}${s}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[o.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${S(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function Pm(){return{localeError:zb()}}var yr=t=>t.charAt(0).toUpperCase()+t.slice(1);function Nm(t){let e=Math.abs(t),r=e%10,i=e%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}var Db=()=>{let t={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function e(n,o,s,a){let l=t[n]??null;return l===null?l:{unit:l.unit[o],verb:l.verb[a][s?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${o}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${T(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${S(n.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[n.origin]??n.origin,s=e(n.origin,Nm(Number(n.maximum)),n.inclusive??!1,"smaller");if(s?.verb)return`${yr(o??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.maximum.toString()} ${s.unit??"element\u0173"}`;let a=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${yr(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${n.maximum.toString()} ${s?.unit}`}case"too_small":{let o=i[n.origin]??n.origin,s=e(n.origin,Nm(Number(n.minimum)),n.inclusive??!1,"bigger");if(s?.verb)return`${yr(o??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.minimum.toString()} ${s.unit??"element\u0173"}`;let a=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${yr(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${n.minimum.toString()} ${s?.unit}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${r[o.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${S(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[n.origin]??n.origin;return`${yr(o??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function zm(){return{localeError:Db()}}var Ob=()=>{let t={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function e(n){return t[n]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${T(n.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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.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 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.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 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`${n.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"}: ${S(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.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 ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function Dm(){return{localeError:Ob()}}var Ab=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(n){return t[n]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${a}`:`Input tidak sah: dijangka ${o}, diterima ${a}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${T(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${r[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${S(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function Om(){return{localeError:Ab()}}var Lb=()=>{let t={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function e(n){return t[n]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${o}, ontving ${a}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${T(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin),a=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return s?`Te ${a}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${a}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin),a=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return s?`Te ${a}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${a}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function Am(){return{localeError:Lb()}}var Cb=()=>{let t={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function e(n){return t[n]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${a}`:`Ugyldig input: forventet ${o}, fikk ${a}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${T(n.values[0])}`:`Ugyldig valg: forventet en av ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${S(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function Lm(){return{localeError:Cb()}}var jb=()=>{let t={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function e(n){return t[n]??null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${a}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${T(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=n;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[o.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function Cm(){return{localeError:jb()}}var Mb=()=>{let t={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function e(n){return t[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${T(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${S(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[o.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${S(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.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 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function jm(){return{localeError:Mb()}}var Ub=()=>{let t={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function e(n){return t[n]??null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${a}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${T(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[o.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function Mm(){return{localeError:Ub()}}var Fb=()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(n){return t[n]??null}let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${a}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${T(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${r[o.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}};function Um(){return{localeError:Fb()}}function Fm(t,e,r,i){let n=Math.abs(t),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?e:o>=2&&o<=4?r:i}var Zb=()=>{let t={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function e(n){return t[n]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${T(n.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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);if(s){let a=Number(n.maximum),l=Fm(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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);if(s){let a=Number(n.minimum),l=Fm(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 ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${n.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 ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${S(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.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 ${n.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 Zm(){return{localeError:Zb()}}var Hb=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(n){return t[n]??null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${a}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${T(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${r[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${S(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function Hm(){return{localeError:Hb()}}var Wb=()=>{let t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function e(n){return t[n]??null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${a}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${T(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${r[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${S(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function Wm(){return{localeError:Wb()}}var Bb=()=>{let t={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function e(n){return t[n]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.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 ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`}case"invalid_value":return n.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 ${T(n.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 ${S(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.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 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.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 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.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 ${n.origin} ${o}${n.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 ${n.origin} ${o}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.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${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${S(n.keys,", ")}`;case"invalid_key":return`${n.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`${n.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 Bm(){return{localeError:Bb()}}var Jb=()=>{let t={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function e(n){return t[n]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.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 ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`}case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${T(n.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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=e(n.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=e(n.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[o.format]??n.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 ${n.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: ${S(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.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 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function Jm(){return{localeError:Jb()}}var Vb=()=>{let t={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function e(n){return t[n]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${a}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${T(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[o.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${S(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function Vm(){return{localeError:Vb()}}var Gb=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function e(n){return t[n]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.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 ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`}case"invalid_value":return n.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 ${T(n.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 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${o}${n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.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 ${n.origin} ${s.verb} ${o}${n.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 ${n.origin} \u0431\u0443\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${S(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.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 ${n.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 Ti(){return{localeError:Gb()}}function Gm(){return Ti()}var qb=()=>{let t={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function e(n){return t[n]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${T(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${S(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${n.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: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${o}${n.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${o}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.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${n.keys.length>1?"\u0632":""}: ${S(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function qm(){return{localeError:qb()}}var Kb=()=>{let t={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"}};function e(n){return t[n]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${a}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${T(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[o.format]??n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${S(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${n.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function Km(){return{localeError:Kb()}}var Yb=()=>{let t={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function e(n){return t[n]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${T(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${S(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.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 ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function Ym(){return{localeError:Yb()}}var Xb=()=>{let t={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function e(n){return t[n]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${T(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${r[o.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${S(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function Xm(){return{localeError:Xb()}}var Qb=()=>{let t={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function e(n){return t[n]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${a}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${T(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${S(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Qm(){return{localeError:Qb()}}var ex=()=>{let t={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function e(n){return t[n]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=N(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${T(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${S(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${s.verb} ${o}${n.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.maximum}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${s.verb} ${o}${n.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.minimum}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${S(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.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 ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function ef(){return{localeError:ex()}}var tf,il=Symbol("ZodOutput"),ol=Symbol("ZodInput"),Ri=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let i=r[0];return this._map.set(e,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let i={...this.get(r)??{}};delete i.id;let n={...i,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Pi(){return new Ri}(tf=globalThis).__zod_globalRegistry??(tf.__zod_globalRegistry=Pi());var be=globalThis.__zod_globalRegistry;function sl(t,e){return new t({type:"string",...D(e)})}function al(t,e){return new t({type:"string",coerce:!0,...D(e)})}function Ni(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...D(e)})}function _r(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...D(e)})}function zi(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...D(e)})}function Di(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...D(e)})}function Oi(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...D(e)})}function Ai(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...D(e)})}function br(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...D(e)})}function Li(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...D(e)})}function Ci(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...D(e)})}function ji(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...D(e)})}function Mi(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...D(e)})}function Ui(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...D(e)})}function Fi(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...D(e)})}function Zi(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...D(e)})}function Hi(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...D(e)})}function Wi(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...D(e)})}function cl(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...D(e)})}function Bi(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...D(e)})}function Ji(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...D(e)})}function Vi(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...D(e)})}function Gi(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...D(e)})}function qi(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...D(e)})}function Ki(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...D(e)})}var ll={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function ul(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...D(e)})}function pl(t,e){return new t({type:"string",format:"date",check:"string_format",...D(e)})}function dl(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...D(e)})}function ml(t,e){return new t({type:"string",format:"duration",check:"string_format",...D(e)})}function fl(t,e){return new t({type:"number",checks:[],...D(e)})}function hl(t,e){return new t({type:"number",coerce:!0,checks:[],...D(e)})}function gl(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...D(e)})}function yl(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...D(e)})}function vl(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...D(e)})}function _l(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...D(e)})}function bl(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...D(e)})}function xl(t,e){return new t({type:"boolean",...D(e)})}function $l(t,e){return new t({type:"boolean",coerce:!0,...D(e)})}function Sl(t,e){return new t({type:"bigint",...D(e)})}function kl(t,e){return new t({type:"bigint",coerce:!0,...D(e)})}function El(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...D(e)})}function wl(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...D(e)})}function Il(t,e){return new t({type:"symbol",...D(e)})}function Tl(t,e){return new t({type:"undefined",...D(e)})}function Rl(t,e){return new t({type:"null",...D(e)})}function Pl(t){return new t({type:"any"})}function Nl(t){return new t({type:"unknown"})}function zl(t,e){return new t({type:"never",...D(e)})}function Dl(t,e){return new t({type:"void",...D(e)})}function Ol(t,e){return new t({type:"date",...D(e)})}function Al(t,e){return new t({type:"date",coerce:!0,...D(e)})}function Ll(t,e){return new t({type:"nan",...D(e)})}function qe(t,e){return new hi({check:"less_than",...D(e),value:t,inclusive:!1})}function De(t,e){return new hi({check:"less_than",...D(e),value:t,inclusive:!0})}function Ke(t,e){return new gi({check:"greater_than",...D(e),value:t,inclusive:!1})}function ke(t,e){return new gi({check:"greater_than",...D(e),value:t,inclusive:!0})}function Yi(t){return Ke(0,t)}function Xi(t){return qe(0,t)}function Qi(t){return De(0,t)}function eo(t){return ke(0,t)}function kt(t,e){return new Ra({check:"multiple_of",...D(e),value:t})}function Et(t,e){return new za({check:"max_size",...D(e),maximum:t})}function Ye(t,e){return new Da({check:"min_size",...D(e),minimum:t})}function Bt(t,e){return new Oa({check:"size_equals",...D(e),size:t})}function Jt(t,e){return new Aa({check:"max_length",...D(e),maximum:t})}function lt(t,e){return new La({check:"min_length",...D(e),minimum:t})}function Vt(t,e){return new Ca({check:"length_equals",...D(e),length:t})}function mn(t,e){return new ja({check:"string_format",format:"regex",...D(e),pattern:t})}function fn(t){return new Ma({check:"string_format",format:"lowercase",...D(t)})}function hn(t){return new Ua({check:"string_format",format:"uppercase",...D(t)})}function gn(t,e){return new Fa({check:"string_format",format:"includes",...D(e),includes:t})}function yn(t,e){return new Za({check:"string_format",format:"starts_with",...D(e),prefix:t})}function vn(t,e){return new Ha({check:"string_format",format:"ends_with",...D(e),suffix:t})}function to(t,e,r){return new Wa({check:"property",property:t,schema:e,...D(r)})}function _n(t,e){return new Ba({check:"mime_type",mime:t,...D(e)})}function Ze(t){return new Ja({check:"overwrite",tx:t})}function bn(t){return Ze(e=>e.normalize(t))}function xn(){return Ze(t=>t.trim())}function $n(){return Ze(t=>t.toLowerCase())}function Sn(){return Ze(t=>t.toUpperCase())}function kn(){return Ze(t=>Ws(t))}function Cl(t,e,r){return new t({type:"array",element:e,...D(r)})}function nx(t,e,r){return new t({type:"union",options:e,...D(r)})}function rx(t,e,r){return new t({type:"union",options:e,inclusive:!1,...D(r)})}function ix(t,e,r,i){return new t({type:"union",options:r,discriminator:e,...D(i)})}function ox(t,e,r){return new t({type:"intersection",left:e,right:r})}function sx(t,e,r,i){let n=r instanceof G,o=n?i:r,s=n?r:null;return new t({type:"tuple",items:e,rest:s,...D(o)})}function ax(t,e,r,i){return new t({type:"record",keyType:e,valueType:r,...D(i)})}function cx(t,e,r,i){return new t({type:"map",keyType:e,valueType:r,...D(i)})}function lx(t,e,r){return new t({type:"set",valueType:e,...D(r)})}function ux(t,e,r){let i=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new t({type:"enum",entries:i,...D(r)})}function px(t,e,r){return new t({type:"enum",entries:e,...D(r)})}function dx(t,e,r){return new t({type:"literal",values:Array.isArray(e)?e:[e],...D(r)})}function jl(t,e){return new t({type:"file",...D(e)})}function mx(t,e){return new t({type:"transform",transform:e})}function fx(t,e){return new t({type:"optional",innerType:e})}function hx(t,e){return new t({type:"nullable",innerType:e})}function gx(t,e,r){return new t({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():Js(r)}})}function yx(t,e,r){return new t({type:"nonoptional",innerType:e,...D(r)})}function vx(t,e){return new t({type:"success",innerType:e})}function _x(t,e,r){return new t({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}function bx(t,e,r){return new t({type:"pipe",in:e,out:r})}function xx(t,e){return new t({type:"readonly",innerType:e})}function $x(t,e,r){return new t({type:"template_literal",parts:e,...D(r)})}function Sx(t,e){return new t({type:"lazy",getter:e})}function kx(t,e){return new t({type:"promise",innerType:e})}function Ml(t,e,r){let i=D(r);return i.abort??(i.abort=!0),new t({type:"custom",check:"custom",fn:e,...i})}function Ul(t,e,r){return new t({type:"custom",check:"custom",fn:e,...D(r)})}function Fl(t){let e=nf(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(sn(i,r.value,e._zod.def));else{let n=i;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=e),n.continue??(n.continue=!e._zod.def.abort),r.issues.push(sn(n))}},t(r.value,r)));return e}function nf(t,e){let r=new ie({check:"custom",...D(e)});return r._zod.check=t,r}function Zl(t){let e=new ie({check:"describe"});return e._zod.onattach=[r=>{let i=be.get(r)??{};be.add(r,{...i,description:t})}],e._zod.check=()=>{},e}function Hl(t){let e=new ie({check:"meta"});return e._zod.onattach=[r=>{let i=be.get(r)??{};be.add(r,{...i,...t})}],e._zod.check=()=>{},e}function Wl(t,e){let r=D(e),i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(m=>typeof m=="string"?m.toLowerCase():m),n=n.map(m=>typeof m=="string"?m.toLowerCase():m));let o=new Set(i),s=new Set(n),a=t.Codec??gr,l=t.Boolean??fr,c=t.String??Wt,u=new c({type:"string",error:r.error}),d=new l({type:"boolean",error:r.error}),p=new a({type:"pipe",in:u,out:d,transform:((m,f)=>{let y=m;return r.case!=="sensitive"&&(y=y.toLowerCase()),o.has(y)?!0:s.has(y)?!1:(f.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:f.value,inst:p,continue:!1}),{})}),reverseTransform:((m,f)=>m===!0?i[0]||"true":n[0]||"false"),error:r.error});return p}function En(t,e,r,i={}){let n=D(i),o={...D(i),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:a=>r.test(a),...n};return r instanceof RegExp&&(o.pattern=r),new t(o)}function wt(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??be,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function te(t,e,r={path:[],schemaPath:[]}){var i;let n=t._zod.def,o=e.seen.get(t);if(o)return o.count++,r.schemaPath.includes(t)&&(o.cycle=r.path),o.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};e.seen.set(t,s);let a=t._zod.toJSONSchema?.();if(a)s.schema=a;else{let u={...r,schemaPath:[...r.schemaPath,t],path:r.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,s.schema,u);else{let p=s.schema,m=e.processors[n.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);m(t,e,p,u)}let d=t._zod.parent;d&&(s.ref||(s.ref=d),te(d,e,u),e.seen.get(d).isParent=!0)}let l=e.metadataRegistry.get(t);return l&&Object.assign(s.schema,l),e.io==="input"&&Ee(t)&&(delete s.schema.examples,delete s.schema.default),e.io==="input"&&s.schema._prefault&&((i=s.schema).default??(i.default=s.schema._prefault)),delete s.schema._prefault,e.seen.get(t).schema}function It(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let s of t.seen.entries()){let a=t.metadataRegistry.get(s[0])?.id;if(a){let l=i.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.`);i.set(a,s[0])}}let n=s=>{let a=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let d=t.external.registry.get(s[0])?.id,p=t.external.uri??(f=>f);if(d)return{ref:p(d)};let m=s[1].defId??s[1].schema.id??`schema${t.counter++}`;return s[1].defId=m,{defId:m,ref:`${p("__shared")}#/${a}/${m}`}}if(s[1]===r)return{ref:"#"};let c=`#/${a}/`,u=s[1].schema.id??`__schema${t.counter++}`;return{defId:u,ref:c+u}},o=s=>{if(s[1].schema.$ref)return;let a=s[1],{ref:l,defId:c}=n(s);a.def={...a.schema},c&&(a.defId=c);let u=a.schema;for(let d in u)delete u[d];u.$ref=l};if(t.cycles==="throw")for(let s of t.seen.entries()){let a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
455
455
 
456
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of t.seen.entries()){let a=s[1];if(e===s[0]){o(s);continue}if(t.external){let c=t.external.registry.get(s[0])?.id;if(e!==s[0]&&c){o(s);continue}}if(t.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1&&t.reused==="ref"){o(s);continue}}}function Tt(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let a=t.seen.get(s);if(a.ref===null)return;let l=a.def??a.schema,c={...l},u=a.ref;if(a.ref=null,u){i(u);let p=t.seen.get(u),m=p.schema;if(m.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(m)):Object.assign(l,m),Object.assign(l,c),s._zod.parent===u)for(let y in l)y==="$ref"||y==="allOf"||y in c||delete l[y];if(m.$ref)for(let y in l)y==="$ref"||y==="allOf"||y in p.def&&JSON.stringify(l[y])===JSON.stringify(p.def[y])&&delete l[y]}let d=s._zod.parent;if(d&&d!==u){i(d);let p=t.seen.get(d);if(p?.schema.$ref&&(l.$ref=p.schema.$ref,p.def))for(let m in l)m==="$ref"||m==="allOf"||m in p.def&&JSON.stringify(l[m])===JSON.stringify(p.def[m])&&delete l[m]}t.override({zodSchema:s,jsonSchema:l,path:a.path??[]})};for(let s of[...t.seen.entries()].reverse())i(s[0]);let n={};if(t.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let s=t.external.registry.get(e)?.id;if(!s)throw new Error("Schema is missing an `id` property");n.$id=t.external.uri(s)}Object.assign(n,r.def??r.schema);let o=t.external?.defs??{};for(let s of t.seen.entries()){let a=s[1];a.def&&a.defId&&(o[a.defId]=a.def)}t.external||Object.keys(o).length>0&&(t.target==="draft-2020-12"?n.$defs=o:n.definitions=o);try{let s=JSON.parse(JSON.stringify(n));return Object.defineProperty(s,"~standard",{value:{...e["~standard"],jsonSchema:{input:wn(e,"input",t.processors),output:wn(e,"output",t.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function we(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let i=t._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return we(i.element,r);if(i.type==="set")return we(i.valueType,r);if(i.type==="lazy")return we(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return we(i.innerType,r);if(i.type==="intersection")return we(i.left,r)||we(i.right,r);if(i.type==="record"||i.type==="map")return we(i.keyType,r)||we(i.valueType,r);if(i.type==="pipe")return we(i.in,r)||we(i.out,r);if(i.type==="object"){for(let n in i.shape)if(we(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(let n of i.options)if(we(n,r))return!0;return!1}if(i.type==="tuple"){for(let n of i.items)if(we(n,r))return!0;return!!(i.rest&&we(i.rest,r))}return!1}var ql=(t,e={})=>r=>{let i=wt({...r,processors:e});return te(t,i),It(i,t),Tt(i,t)},wn=(t,e,r={})=>i=>{let{libraryOptions:n,target:o}=i??{},s=wt({...n??{},target:o,io:e,processors:r});return te(t,s),It(s,t),Tt(s,t)};var Ix={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Kl=(t,e,r,i)=>{let n=r;n.type="string";let{minimum:o,maximum:s,format:a,patterns:l,contentEncoding:c}=t._zod.bag;if(typeof o=="number"&&(n.minLength=o),typeof s=="number"&&(n.maxLength=s),a&&(n.format=Ix[a]??a,n.format===""&&delete n.format,a==="time"&&delete n.format),c&&(n.contentEncoding=c),l&&l.size>0){let u=[...l];u.length===1?n.pattern=u[0].source:u.length>1&&(n.allOf=[...u.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Yl=(t,e,r,i)=>{let n=r,{minimum:o,maximum:s,format:a,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=t._zod.bag;typeof a=="string"&&a.includes("int")?n.type="integer":n.type="number",typeof u=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(n.minimum=u,n.exclusiveMinimum=!0):n.exclusiveMinimum=u),typeof o=="number"&&(n.minimum=o,typeof u=="number"&&e.target!=="draft-04"&&(u>=o?delete n.minimum:delete n.exclusiveMinimum)),typeof c=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(n.maximum=c,n.exclusiveMaximum=!0):n.exclusiveMaximum=c),typeof s=="number"&&(n.maximum=s,typeof c=="number"&&e.target!=="draft-04"&&(c<=s?delete n.maximum:delete n.exclusiveMaximum)),typeof l=="number"&&(n.multipleOf=l)},Xl=(t,e,r,i)=>{r.type="boolean"},Ql=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},eu=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},tu=(t,e,r,i)=>{e.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},nu=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},ru=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},iu=(t,e,r,i)=>{r.not={}},ou=(t,e,r,i)=>{},su=(t,e,r,i)=>{},au=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},cu=(t,e,r,i)=>{let n=t._zod.def,o=ir(n.entries);o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),r.enum=o},lu=(t,e,r,i)=>{let n=t._zod.def,o=[];for(let s of n.values)if(s===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){let s=o[0];r.type=s===null?"null":typeof s,e.target==="draft-04"||e.target==="openapi-3.0"?r.enum=[s]:r.const=s}else o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),o.every(s=>typeof s=="boolean")&&(r.type="boolean"),o.every(s=>s===null)&&(r.type="null"),r.enum=o},uu=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},pu=(t,e,r,i)=>{let n=r,o=t._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=o.source},du=(t,e,r,i)=>{let n=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:l}=t._zod.bag;s!==void 0&&(o.minLength=s),a!==void 0&&(o.maxLength=a),l?l.length===1?(o.contentMediaType=l[0],Object.assign(n,o)):(Object.assign(n,o),n.anyOf=l.map(c=>({contentMediaType:c}))):Object.assign(n,o)},mu=(t,e,r,i)=>{r.type="boolean"},fu=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},hu=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},gu=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},yu=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},vu=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},_u=(t,e,r,i)=>{let n=r,o=t._zod.def,{minimum:s,maximum:a}=t._zod.bag;typeof s=="number"&&(n.minItems=s),typeof a=="number"&&(n.maxItems=a),n.type="array",n.items=te(o.element,e,{...i,path:[...i.path,"items"]})},bu=(t,e,r,i)=>{let n=r,o=t._zod.def;n.type="object",n.properties={};let s=o.shape;for(let c in s)n.properties[c]=te(s[c],e,{...i,path:[...i.path,"properties",c]});let a=new Set(Object.keys(s)),l=new Set([...a].filter(c=>{let u=o.shape[c]._zod;return e.io==="input"?u.optin===void 0:u.optout===void 0}));l.size>0&&(n.required=Array.from(l)),o.catchall?._zod.def.type==="never"?n.additionalProperties=!1:o.catchall?o.catchall&&(n.additionalProperties=te(o.catchall,e,{...i,path:[...i.path,"additionalProperties"]})):e.io==="output"&&(n.additionalProperties=!1)},oo=(t,e,r,i)=>{let n=t._zod.def,o=n.inclusive===!1,s=n.options.map((a,l)=>te(a,e,{...i,path:[...i.path,o?"oneOf":"anyOf",l]}));o?r.oneOf=s:r.anyOf=s},xu=(t,e,r,i)=>{let n=t._zod.def,o=te(n.left,e,{...i,path:[...i.path,"allOf",0]}),s=te(n.right,e,{...i,path:[...i.path,"allOf",1]}),a=c=>"allOf"in c&&Object.keys(c).length===1,l=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];r.allOf=l},$u=(t,e,r,i)=>{let n=r,o=t._zod.def;n.type="array";let s=e.target==="draft-2020-12"?"prefixItems":"items",a=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",l=o.items.map((p,m)=>te(p,e,{...i,path:[...i.path,s,m]})),c=o.rest?te(o.rest,e,{...i,path:[...i.path,a,...e.target==="openapi-3.0"?[o.items.length]:[]]}):null;e.target==="draft-2020-12"?(n.prefixItems=l,c&&(n.items=c)):e.target==="openapi-3.0"?(n.items={anyOf:l},c&&n.items.anyOf.push(c),n.minItems=l.length,c||(n.maxItems=l.length)):(n.items=l,c&&(n.additionalItems=c));let{minimum:u,maximum:d}=t._zod.bag;typeof u=="number"&&(n.minItems=u),typeof d=="number"&&(n.maxItems=d)},Su=(t,e,r,i)=>{let n=r,o=t._zod.def;n.type="object";let s=o.keyType,l=s._zod.bag?.patterns;if(o.mode==="loose"&&l&&l.size>0){let u=te(o.valueType,e,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(let d of l)n.patternProperties[d.source]=u}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(n.propertyNames=te(o.keyType,e,{...i,path:[...i.path,"propertyNames"]})),n.additionalProperties=te(o.valueType,e,{...i,path:[...i.path,"additionalProperties"]});let c=s._zod.values;if(c){let u=[...c].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(n.required=u)}},ku=(t,e,r,i)=>{let n=t._zod.def,o=te(n.innerType,e,i),s=e.seen.get(t);e.target==="openapi-3.0"?(s.ref=n.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},Eu=(t,e,r,i)=>{let n=t._zod.def;te(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType},wu=(t,e,r,i)=>{let n=t._zod.def;te(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},Iu=(t,e,r,i)=>{let n=t._zod.def;te(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},Tu=(t,e,r,i)=>{let n=t._zod.def;te(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType;let s;try{s=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},Ru=(t,e,r,i)=>{let n=t._zod.def,o=e.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;te(o,e,i);let s=e.seen.get(t);s.ref=o},Pu=(t,e,r,i)=>{let n=t._zod.def;te(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType,r.readOnly=!0},Nu=(t,e,r,i)=>{let n=t._zod.def;te(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType},so=(t,e,r,i)=>{let n=t._zod.def;te(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType},zu=(t,e,r,i)=>{let n=t._zod.innerType;te(n,e,i);let o=e.seen.get(t);o.ref=n},io={string:Kl,number:Yl,boolean:Xl,bigint:Ql,symbol:eu,null:tu,undefined:nu,void:ru,never:iu,any:ou,unknown:su,date:au,enum:cu,literal:lu,nan:uu,template_literal:pu,file:du,success:mu,custom:fu,function:hu,transform:gu,map:yu,set:vu,array:_u,object:bu,union:oo,intersection:xu,tuple:$u,record:Su,nullable:ku,nonoptional:Eu,default:wu,prefault:Iu,catch:Tu,pipe:Ru,readonly:Pu,promise:Nu,optional:so,lazy:zu};function ao(t,e){if("_idmap"in t){let i=t,n=wt({...e,processors:io}),o={};for(let l of i._idmap.entries()){let[c,u]=l;te(u,n)}let s={},a={registry:i,uri:e?.uri,defs:o};n.external=a;for(let l of i._idmap.entries()){let[c,u]=l;It(n,u),s[c]=Tt(n,u)}if(Object.keys(o).length>0){let l=n.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[l]:o}}return{schemas:s}}let r=wt({...e,processors:io});return te(t,r),It(r,t),Tt(r,t)}var co=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let r=e?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=wt({processors:io,target:r,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,r={path:[],schemaPath:[]}){return te(e,this.ctx,r)}emit(e,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),It(this.ctx,e);let i=Tt(this.ctx,e),{"~standard":n,...o}=i;return o}};var cf={};var $r={};Ze($r,{ZodAny:()=>np,ZodArray:()=>sp,ZodBase64:()=>Po,ZodBase64URL:()=>No,ZodBigInt:()=>Dn,ZodBigIntFormat:()=>Oo,ZodBoolean:()=>zn,ZodCIDRv4:()=>To,ZodCIDRv6:()=>Ro,ZodCUID:()=>xo,ZodCUID2:()=>$o,ZodCatch:()=>Tp,ZodCodec:()=>Zo,ZodCustom:()=>Dr,ZodCustomStringFormat:()=>Pn,ZodDate:()=>Tr,ZodDefault:()=>$p,ZodDiscriminatedUnion:()=>cp,ZodE164:()=>zo,ZodEmail:()=>vo,ZodEmoji:()=>_o,ZodEnum:()=>Tn,ZodExactOptional:()=>_p,ZodFile:()=>yp,ZodFunction:()=>Cp,ZodGUID:()=>Sr,ZodIPv4:()=>wo,ZodIPv6:()=>Io,ZodIntersection:()=>lp,ZodJWT:()=>Do,ZodKSUID:()=>Eo,ZodLazy:()=>Op,ZodLiteral:()=>gp,ZodMAC:()=>qu,ZodMap:()=>fp,ZodNaN:()=>Pp,ZodNanoID:()=>bo,ZodNever:()=>ip,ZodNonOptional:()=>Uo,ZodNull:()=>ep,ZodNullable:()=>xp,ZodNumber:()=>Nn,ZodNumberFormat:()=>Kt,ZodObject:()=>Pr,ZodOptional:()=>Mo,ZodPipe:()=>Fo,ZodPrefault:()=>kp,ZodPromise:()=>Lp,ZodReadonly:()=>Np,ZodRecord:()=>zr,ZodSet:()=>hp,ZodString:()=>Rn,ZodStringFormat:()=>re,ZodSuccess:()=>Ip,ZodSymbol:()=>Xu,ZodTemplateLiteral:()=>Dp,ZodTransform:()=>vp,ZodTuple:()=>pp,ZodType:()=>K,ZodULID:()=>So,ZodURL:()=>Ir,ZodUUID:()=>Qe,ZodUndefined:()=>Qu,ZodUnion:()=>Nr,ZodUnknown:()=>rp,ZodVoid:()=>op,ZodXID:()=>ko,ZodXor:()=>ap,_ZodString:()=>yo,_default:()=>Sp,_function:()=>hh,any:()=>Gf,array:()=>Rr,base64:()=>Pf,base64url:()=>Nf,bigint:()=>Zf,boolean:()=>Yu,catch:()=>Rp,check:()=>gh,cidrv4:()=>Tf,cidrv6:()=>Rf,codec:()=>dh,cuid:()=>bf,cuid2:()=>xf,custom:()=>yh,date:()=>qf,describe:()=>vh,discriminatedUnion:()=>th,e164:()=>zf,email:()=>uf,emoji:()=>vf,enum:()=>Co,exactOptional:()=>bp,file:()=>ch,float32:()=>jf,float64:()=>Mf,function:()=>hh,guid:()=>pf,hash:()=>Cf,hex:()=>Lf,hostname:()=>Af,httpUrl:()=>yf,instanceof:()=>bh,int:()=>go,int32:()=>Uf,int64:()=>Hf,intersection:()=>up,ipv4:()=>Ef,ipv6:()=>If,json:()=>$h,jwt:()=>Df,keyof:()=>Kf,ksuid:()=>kf,lazy:()=>Ap,literal:()=>ah,looseObject:()=>Qf,looseRecord:()=>rh,mac:()=>wf,map:()=>ih,meta:()=>_h,nan:()=>ph,nanoid:()=>_f,nativeEnum:()=>sh,never:()=>Ao,nonoptional:()=>wp,null:()=>tp,nullable:()=>Er,nullish:()=>lh,number:()=>Ku,object:()=>Yf,optional:()=>kr,partialRecord:()=>nh,pipe:()=>wr,prefault:()=>Ep,preprocess:()=>Sh,promise:()=>fh,readonly:()=>zp,record:()=>mp,refine:()=>jp,set:()=>oh,strictObject:()=>Xf,string:()=>ho,stringFormat:()=>Of,stringbool:()=>xh,success:()=>uh,superRefine:()=>Mp,symbol:()=>Bf,templateLiteral:()=>mh,transform:()=>jo,tuple:()=>dp,uint32:()=>Ff,uint64:()=>Wf,ulid:()=>$f,undefined:()=>Jf,union:()=>Lo,unknown:()=>qt,url:()=>gf,uuid:()=>df,uuidv4:()=>mf,uuidv6:()=>ff,uuidv7:()=>hf,void:()=>Vf,xid:()=>Sf,xor:()=>eh});var lo={};Ze(lo,{endsWith:()=>vn,gt:()=>Ye,gte:()=>Ee,includes:()=>gn,length:()=>Vt,lowercase:()=>fn,lt:()=>Ke,lte:()=>Oe,maxLength:()=>Gt,maxSize:()=>Et,mime:()=>_n,minLength:()=>lt,minSize:()=>Xe,multipleOf:()=>kt,negative:()=>eo,nonnegative:()=>no,nonpositive:()=>to,normalize:()=>bn,overwrite:()=>We,positive:()=>Qi,property:()=>ro,regex:()=>mn,size:()=>Jt,slugify:()=>kn,startsWith:()=>yn,toLowerCase:()=>$n,toUpperCase:()=>Sn,trim:()=>xn,uppercase:()=>hn});var In={};Ze(In,{ZodISODate:()=>po,ZodISODateTime:()=>uo,ZodISODuration:()=>fo,ZodISOTime:()=>mo,date:()=>Ou,datetime:()=>Du,duration:()=>Lu,time:()=>Au});var uo=v("ZodISODateTime",(t,e)=>{uc.init(t,e),re.init(t,e)});function Du(t){return fl(uo,t)}var po=v("ZodISODate",(t,e)=>{pc.init(t,e),re.init(t,e)});function Ou(t){return hl(po,t)}var mo=v("ZodISOTime",(t,e)=>{dc.init(t,e),re.init(t,e)});function Au(t){return gl(mo,t)}var fo=v("ZodISODuration",(t,e)=>{mc.init(t,e),re.init(t,e)});function Lu(t){return yl(fo,t)}var lf=(t,e)=>{lr.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>pr(t,r)},flatten:{value:r=>ur(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,rn,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,rn,2)}},isEmpty:{get(){return t.issues.length===0}}})},Rx=v("ZodError",lf),Re=v("ZodError",lf,{Parent:Error});var Cu=an(Re),ju=cn(Re),Mu=ln(Re),Uu=un(Re),Fu=ai(Re),Zu=ci(Re),Hu=li(Re),Wu=ui(Re),Bu=pi(Re),Ju=di(Re),Gu=mi(Re),Vu=fi(Re);var K=v("ZodType",(t,e)=>(V.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:wn(t,"input"),output:wn(t,"output")}}),t.toJSONSchema=ql(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone(z.mergeDefs(e,{checks:[...e.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),t.with=t.check,t.clone=(r,i)=>ke(t,r,i),t.brand=()=>t,t.register=((r,i)=>(r.add(t,i),t)),t.parse=(r,i)=>Cu(t,r,i,{callee:t.parse}),t.safeParse=(r,i)=>Mu(t,r,i),t.parseAsync=async(r,i)=>ju(t,r,i,{callee:t.parseAsync}),t.safeParseAsync=async(r,i)=>Uu(t,r,i),t.spa=t.safeParseAsync,t.encode=(r,i)=>Fu(t,r,i),t.decode=(r,i)=>Zu(t,r,i),t.encodeAsync=async(r,i)=>Hu(t,r,i),t.decodeAsync=async(r,i)=>Wu(t,r,i),t.safeEncode=(r,i)=>Bu(t,r,i),t.safeDecode=(r,i)=>Ju(t,r,i),t.safeEncodeAsync=async(r,i)=>Gu(t,r,i),t.safeDecodeAsync=async(r,i)=>Vu(t,r,i),t.refine=(r,i)=>t.check(jp(r,i)),t.superRefine=r=>t.check(Mp(r)),t.overwrite=r=>t.check(We(r)),t.optional=()=>kr(t),t.exactOptional=()=>bp(t),t.nullable=()=>Er(t),t.nullish=()=>kr(Er(t)),t.nonoptional=r=>wp(t,r),t.array=()=>Rr(t),t.or=r=>Lo([t,r]),t.and=r=>up(t,r),t.transform=r=>wr(t,jo(r)),t.default=r=>Sp(t,r),t.prefault=r=>Ep(t,r),t.catch=r=>Rp(t,r),t.pipe=r=>wr(t,r),t.readonly=()=>zp(t),t.describe=r=>{let i=t.clone();return xe.add(i,{description:r}),i},Object.defineProperty(t,"description",{get(){return xe.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return xe.get(t);let i=t.clone();return xe.add(i,r[0]),i},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=r=>r(t),t)),yo=v("_ZodString",(t,e)=>{Bt.init(t,e),K.init(t,e),t._zod.processJSONSchema=(i,n,o)=>Kl(t,i,n,o);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...i)=>t.check(mn(...i)),t.includes=(...i)=>t.check(gn(...i)),t.startsWith=(...i)=>t.check(yn(...i)),t.endsWith=(...i)=>t.check(vn(...i)),t.min=(...i)=>t.check(lt(...i)),t.max=(...i)=>t.check(Gt(...i)),t.length=(...i)=>t.check(Vt(...i)),t.nonempty=(...i)=>t.check(lt(1,...i)),t.lowercase=i=>t.check(fn(i)),t.uppercase=i=>t.check(hn(i)),t.trim=()=>t.check(xn()),t.normalize=(...i)=>t.check(bn(...i)),t.toLowerCase=()=>t.check($n()),t.toUpperCase=()=>t.check(Sn()),t.slugify=()=>t.check(kn())}),Rn=v("ZodString",(t,e)=>{Bt.init(t,e),yo.init(t,e),t.email=r=>t.check(Di(vo,r)),t.url=r=>t.check(xr(Ir,r)),t.jwt=r=>t.check(Xi(Do,r)),t.emoji=r=>t.check(ji(_o,r)),t.guid=r=>t.check(br(Sr,r)),t.uuid=r=>t.check(Oi(Qe,r)),t.uuidv4=r=>t.check(Ai(Qe,r)),t.uuidv6=r=>t.check(Li(Qe,r)),t.uuidv7=r=>t.check(Ci(Qe,r)),t.nanoid=r=>t.check(Mi(bo,r)),t.guid=r=>t.check(br(Sr,r)),t.cuid=r=>t.check(Ui(xo,r)),t.cuid2=r=>t.check(Fi($o,r)),t.ulid=r=>t.check(Zi(So,r)),t.base64=r=>t.check(qi(Po,r)),t.base64url=r=>t.check(Ki(No,r)),t.xid=r=>t.check(Hi(ko,r)),t.ksuid=r=>t.check(Wi(Eo,r)),t.ipv4=r=>t.check(Bi(wo,r)),t.ipv6=r=>t.check(Ji(Io,r)),t.cidrv4=r=>t.check(Gi(To,r)),t.cidrv6=r=>t.check(Vi(Ro,r)),t.e164=r=>t.check(Yi(zo,r)),t.datetime=r=>t.check(Du(r)),t.date=r=>t.check(Ou(r)),t.time=r=>t.check(Au(r)),t.duration=r=>t.check(Lu(r))});function ho(t){return ul(Rn,t)}var re=v("ZodStringFormat",(t,e)=>{ne.init(t,e),yo.init(t,e)}),vo=v("ZodEmail",(t,e)=>{tc.init(t,e),re.init(t,e)});function uf(t){return Di(vo,t)}var Sr=v("ZodGUID",(t,e)=>{Qa.init(t,e),re.init(t,e)});function pf(t){return br(Sr,t)}var Qe=v("ZodUUID",(t,e)=>{ec.init(t,e),re.init(t,e)});function df(t){return Oi(Qe,t)}function mf(t){return Ai(Qe,t)}function ff(t){return Li(Qe,t)}function hf(t){return Ci(Qe,t)}var Ir=v("ZodURL",(t,e)=>{nc.init(t,e),re.init(t,e)});function gf(t){return xr(Ir,t)}function yf(t){return xr(Ir,{protocol:/^https?$/,hostname:Ce.domain,...z.normalizeParams(t)})}var _o=v("ZodEmoji",(t,e)=>{rc.init(t,e),re.init(t,e)});function vf(t){return ji(_o,t)}var bo=v("ZodNanoID",(t,e)=>{ic.init(t,e),re.init(t,e)});function _f(t){return Mi(bo,t)}var xo=v("ZodCUID",(t,e)=>{oc.init(t,e),re.init(t,e)});function bf(t){return Ui(xo,t)}var $o=v("ZodCUID2",(t,e)=>{sc.init(t,e),re.init(t,e)});function xf(t){return Fi($o,t)}var So=v("ZodULID",(t,e)=>{ac.init(t,e),re.init(t,e)});function $f(t){return Zi(So,t)}var ko=v("ZodXID",(t,e)=>{cc.init(t,e),re.init(t,e)});function Sf(t){return Hi(ko,t)}var Eo=v("ZodKSUID",(t,e)=>{lc.init(t,e),re.init(t,e)});function kf(t){return Wi(Eo,t)}var wo=v("ZodIPv4",(t,e)=>{fc.init(t,e),re.init(t,e)});function Ef(t){return Bi(wo,t)}var qu=v("ZodMAC",(t,e)=>{gc.init(t,e),re.init(t,e)});function wf(t){return dl(qu,t)}var Io=v("ZodIPv6",(t,e)=>{hc.init(t,e),re.init(t,e)});function If(t){return Ji(Io,t)}var To=v("ZodCIDRv4",(t,e)=>{yc.init(t,e),re.init(t,e)});function Tf(t){return Gi(To,t)}var Ro=v("ZodCIDRv6",(t,e)=>{vc.init(t,e),re.init(t,e)});function Rf(t){return Vi(Ro,t)}var Po=v("ZodBase64",(t,e)=>{bc.init(t,e),re.init(t,e)});function Pf(t){return qi(Po,t)}var No=v("ZodBase64URL",(t,e)=>{xc.init(t,e),re.init(t,e)});function Nf(t){return Ki(No,t)}var zo=v("ZodE164",(t,e)=>{$c.init(t,e),re.init(t,e)});function zf(t){return Yi(zo,t)}var Do=v("ZodJWT",(t,e)=>{Sc.init(t,e),re.init(t,e)});function Df(t){return Xi(Do,t)}var Pn=v("ZodCustomStringFormat",(t,e)=>{kc.init(t,e),re.init(t,e)});function Of(t,e,r={}){return En(Pn,t,e,r)}function Af(t){return En(Pn,"hostname",Ce.hostname,t)}function Lf(t){return En(Pn,"hex",Ce.hex,t)}function Cf(t,e){let r=e?.enc??"hex",i=`${t}_${r}`,n=Ce[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return En(Pn,i,n,e)}var Nn=v("ZodNumber",(t,e)=>{ki.init(t,e),K.init(t,e),t._zod.processJSONSchema=(i,n,o)=>Yl(t,i,n,o),t.gt=(i,n)=>t.check(Ye(i,n)),t.gte=(i,n)=>t.check(Ee(i,n)),t.min=(i,n)=>t.check(Ee(i,n)),t.lt=(i,n)=>t.check(Ke(i,n)),t.lte=(i,n)=>t.check(Oe(i,n)),t.max=(i,n)=>t.check(Oe(i,n)),t.int=i=>t.check(go(i)),t.safe=i=>t.check(go(i)),t.positive=i=>t.check(Ye(0,i)),t.nonnegative=i=>t.check(Ee(0,i)),t.negative=i=>t.check(Ke(0,i)),t.nonpositive=i=>t.check(Oe(0,i)),t.multipleOf=(i,n)=>t.check(kt(i,n)),t.step=(i,n)=>t.check(kt(i,n)),t.finite=()=>t;let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function Ku(t){return vl(Nn,t)}var Kt=v("ZodNumberFormat",(t,e)=>{Ec.init(t,e),Nn.init(t,e)});function go(t){return bl(Kt,t)}function jf(t){return xl(Kt,t)}function Mf(t){return $l(Kt,t)}function Uf(t){return Sl(Kt,t)}function Ff(t){return kl(Kt,t)}var zn=v("ZodBoolean",(t,e)=>{hr.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Xl(t,r,i,n)});function Yu(t){return El(zn,t)}var Dn=v("ZodBigInt",(t,e)=>{Ei.init(t,e),K.init(t,e),t._zod.processJSONSchema=(i,n,o)=>Ql(t,i,n,o),t.gte=(i,n)=>t.check(Ee(i,n)),t.min=(i,n)=>t.check(Ee(i,n)),t.gt=(i,n)=>t.check(Ye(i,n)),t.gte=(i,n)=>t.check(Ee(i,n)),t.min=(i,n)=>t.check(Ee(i,n)),t.lt=(i,n)=>t.check(Ke(i,n)),t.lte=(i,n)=>t.check(Oe(i,n)),t.max=(i,n)=>t.check(Oe(i,n)),t.positive=i=>t.check(Ye(BigInt(0),i)),t.negative=i=>t.check(Ke(BigInt(0),i)),t.nonpositive=i=>t.check(Oe(BigInt(0),i)),t.nonnegative=i=>t.check(Ee(BigInt(0),i)),t.multipleOf=(i,n)=>t.check(kt(i,n));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});function Zf(t){return Il(Dn,t)}var Oo=v("ZodBigIntFormat",(t,e)=>{wc.init(t,e),Dn.init(t,e)});function Hf(t){return Rl(Oo,t)}function Wf(t){return Pl(Oo,t)}var Xu=v("ZodSymbol",(t,e)=>{Ic.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>eu(t,r,i,n)});function Bf(t){return Nl(Xu,t)}var Qu=v("ZodUndefined",(t,e)=>{Tc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>nu(t,r,i,n)});function Jf(t){return zl(Qu,t)}var ep=v("ZodNull",(t,e)=>{Rc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>tu(t,r,i,n)});function tp(t){return Dl(ep,t)}var np=v("ZodAny",(t,e)=>{Pc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>ou(t,r,i,n)});function Gf(){return Ol(np)}var rp=v("ZodUnknown",(t,e)=>{Nc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>su(t,r,i,n)});function qt(){return Al(rp)}var ip=v("ZodNever",(t,e)=>{zc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>iu(t,r,i,n)});function Ao(t){return Ll(ip,t)}var op=v("ZodVoid",(t,e)=>{Dc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>ru(t,r,i,n)});function Vf(t){return Cl(op,t)}var Tr=v("ZodDate",(t,e)=>{Oc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(i,n,o)=>au(t,i,n,o),t.min=(i,n)=>t.check(Ee(i,n)),t.max=(i,n)=>t.check(Oe(i,n));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});function qf(t){return jl(Tr,t)}var sp=v("ZodArray",(t,e)=>{Ac.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>_u(t,r,i,n),t.element=e.element,t.min=(r,i)=>t.check(lt(r,i)),t.nonempty=r=>t.check(lt(1,r)),t.max=(r,i)=>t.check(Gt(r,i)),t.length=(r,i)=>t.check(Vt(r,i)),t.unwrap=()=>t.element});function Rr(t,e){return Fl(sp,t,e)}function Kf(t){let e=t._zod.def.shape;return Co(Object.keys(e))}var Pr=v("ZodObject",(t,e)=>{Lc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>bu(t,r,i,n),z.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>Co(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:qt()}),t.loose=()=>t.clone({...t._zod.def,catchall:qt()}),t.strict=()=>t.clone({...t._zod.def,catchall:Ao()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>z.extend(t,r),t.safeExtend=r=>z.safeExtend(t,r),t.merge=r=>z.merge(t,r),t.pick=r=>z.pick(t,r),t.omit=r=>z.omit(t,r),t.partial=(...r)=>z.partial(Mo,t,r[0]),t.required=(...r)=>z.required(Uo,t,r[0])});function Yf(t,e){let r={type:"object",shape:t??{},...z.normalizeParams(e)};return new Pr(r)}function Xf(t,e){return new Pr({type:"object",shape:t,catchall:Ao(),...z.normalizeParams(e)})}function Qf(t,e){return new Pr({type:"object",shape:t,catchall:qt(),...z.normalizeParams(e)})}var Nr=v("ZodUnion",(t,e)=>{gr.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>oo(t,r,i,n),t.options=e.options});function Lo(t,e){return new Nr({type:"union",options:t,...z.normalizeParams(e)})}var ap=v("ZodXor",(t,e)=>{Nr.init(t,e),Cc.init(t,e),t._zod.processJSONSchema=(r,i,n)=>oo(t,r,i,n),t.options=e.options});function eh(t,e){return new ap({type:"union",options:t,inclusive:!1,...z.normalizeParams(e)})}var cp=v("ZodDiscriminatedUnion",(t,e)=>{Nr.init(t,e),jc.init(t,e)});function th(t,e,r){return new cp({type:"union",options:e,discriminator:t,...z.normalizeParams(r)})}var lp=v("ZodIntersection",(t,e)=>{Mc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>xu(t,r,i,n)});function up(t,e){return new lp({type:"intersection",left:t,right:e})}var pp=v("ZodTuple",(t,e)=>{wi.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>$u(t,r,i,n),t.rest=r=>t.clone({...t._zod.def,rest:r})});function dp(t,e,r){let i=e instanceof V,n=i?r:e,o=i?e:null;return new pp({type:"tuple",items:t,rest:o,...z.normalizeParams(n)})}var zr=v("ZodRecord",(t,e)=>{Uc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Su(t,r,i,n),t.keyType=e.keyType,t.valueType=e.valueType});function mp(t,e,r){return new zr({type:"record",keyType:t,valueType:e,...z.normalizeParams(r)})}function nh(t,e,r){let i=ke(t);return i._zod.values=void 0,new zr({type:"record",keyType:i,valueType:e,...z.normalizeParams(r)})}function rh(t,e,r){return new zr({type:"record",keyType:t,valueType:e,mode:"loose",...z.normalizeParams(r)})}var fp=v("ZodMap",(t,e)=>{Fc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>yu(t,r,i,n),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...r)=>t.check(Xe(...r)),t.nonempty=r=>t.check(Xe(1,r)),t.max=(...r)=>t.check(Et(...r)),t.size=(...r)=>t.check(Jt(...r))});function ih(t,e,r){return new fp({type:"map",keyType:t,valueType:e,...z.normalizeParams(r)})}var hp=v("ZodSet",(t,e)=>{Zc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>vu(t,r,i,n),t.min=(...r)=>t.check(Xe(...r)),t.nonempty=r=>t.check(Xe(1,r)),t.max=(...r)=>t.check(Et(...r)),t.size=(...r)=>t.check(Jt(...r))});function oh(t,e){return new hp({type:"set",valueType:t,...z.normalizeParams(e)})}var Tn=v("ZodEnum",(t,e)=>{Hc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(i,n,o)=>cu(t,i,n,o),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(i,n)=>{let o={};for(let s of i)if(r.has(s))o[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Tn({...e,checks:[],...z.normalizeParams(n),entries:o})},t.exclude=(i,n)=>{let o={...e.entries};for(let s of i)if(r.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new Tn({...e,checks:[],...z.normalizeParams(n),entries:o})}});function Co(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new Tn({type:"enum",entries:r,...z.normalizeParams(e)})}function sh(t,e){return new Tn({type:"enum",entries:t,...z.normalizeParams(e)})}var gp=v("ZodLiteral",(t,e)=>{Wc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>lu(t,r,i,n),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function ah(t,e){return new gp({type:"literal",values:Array.isArray(t)?t:[t],...z.normalizeParams(e)})}var yp=v("ZodFile",(t,e)=>{Bc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>du(t,r,i,n),t.min=(r,i)=>t.check(Xe(r,i)),t.max=(r,i)=>t.check(Et(r,i)),t.mime=(r,i)=>t.check(_n(Array.isArray(r)?r:[r],i))});function ch(t){return Zl(yp,t)}var vp=v("ZodTransform",(t,e)=>{Jc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>gu(t,r,i,n),t._zod.parse=(r,i)=>{if(i.direction==="backward")throw new _t(t.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(z.issue(o,r.value,e));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=t),r.issues.push(z.issue(s))}};let n=e.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function jo(t){return new vp({type:"transform",transform:t})}var Mo=v("ZodOptional",(t,e)=>{Ii.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>so(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function kr(t){return new Mo({type:"optional",innerType:t})}var _p=v("ZodExactOptional",(t,e)=>{Gc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>so(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function bp(t){return new _p({type:"optional",innerType:t})}var xp=v("ZodNullable",(t,e)=>{Vc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>ku(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function Er(t){return new xp({type:"nullable",innerType:t})}function lh(t){return kr(Er(t))}var $p=v("ZodDefault",(t,e)=>{qc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>wu(t,r,i,n),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function Sp(t,e){return new $p({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():z.shallowClone(e)}})}var kp=v("ZodPrefault",(t,e)=>{Kc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Iu(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function Ep(t,e){return new kp({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():z.shallowClone(e)}})}var Uo=v("ZodNonOptional",(t,e)=>{Yc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Eu(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function wp(t,e){return new Uo({type:"nonoptional",innerType:t,...z.normalizeParams(e)})}var Ip=v("ZodSuccess",(t,e)=>{Xc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>mu(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function uh(t){return new Ip({type:"success",innerType:t})}var Tp=v("ZodCatch",(t,e)=>{Qc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Tu(t,r,i,n),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function Rp(t,e){return new Tp({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var Pp=v("ZodNaN",(t,e)=>{el.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>uu(t,r,i,n)});function ph(t){return Ul(Pp,t)}var Fo=v("ZodPipe",(t,e)=>{tl.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Ru(t,r,i,n),t.in=e.in,t.out=e.out});function wr(t,e){return new Fo({type:"pipe",in:t,out:e})}var Zo=v("ZodCodec",(t,e)=>{Fo.init(t,e),yr.init(t,e)});function dh(t,e,r){return new Zo({type:"pipe",in:t,out:e,transform:r.decode,reverseTransform:r.encode})}var Np=v("ZodReadonly",(t,e)=>{nl.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Pu(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function zp(t){return new Np({type:"readonly",innerType:t})}var Dp=v("ZodTemplateLiteral",(t,e)=>{rl.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>pu(t,r,i,n)});function mh(t,e){return new Dp({type:"template_literal",parts:t,...z.normalizeParams(e)})}var Op=v("ZodLazy",(t,e)=>{sl.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>zu(t,r,i,n),t.unwrap=()=>t._zod.def.getter()});function Ap(t){return new Op({type:"lazy",getter:t})}var Lp=v("ZodPromise",(t,e)=>{ol.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Nu(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function fh(t){return new Lp({type:"promise",innerType:t})}var Cp=v("ZodFunction",(t,e)=>{il.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>hu(t,r,i,n)});function hh(t){return new Cp({type:"function",input:Array.isArray(t?.input)?dp(t?.input):t?.input??Rr(qt()),output:t?.output??qt()})}var Dr=v("ZodCustom",(t,e)=>{al.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>fu(t,r,i,n)});function gh(t){let e=new ie({check:"custom"});return e._zod.check=t,e}function yh(t,e){return Hl(Dr,t??(()=>!0),e)}function jp(t,e={}){return Wl(Dr,t,e)}function Mp(t){return Bl(t)}var vh=Jl,_h=Gl;function bh(t,e={}){let r=new Dr({type:"custom",check:"custom",fn:i=>i instanceof t,abort:!0,...z.normalizeParams(e)});return r._zod.bag.Class=t,r._zod.check=i=>{i.value instanceof t||i.issues.push({code:"invalid_type",expected:t.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}var xh=(...t)=>Vl({Codec:Zo,Boolean:zn,String:Rn},...t);function $h(t){let e=Ap(()=>Lo([ho(t),Ku(),Yu(),tp(),Rr(e),mp(ho(),e)]));return e}function Sh(t,e){return wr(jo(t),e)}var Nx={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 zx(t){pe({customError:t})}function Dx(){return pe().customError}var Up;Up||(Up={});var C={...$r,...lo,iso:In},Ox=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 Ax(t,e){let r=t.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":e??"draft-2020-12"}function Lx(t,e){if(!t.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=t.slice(1).split("/").filter(Boolean);if(r.length===0)return e.rootSchema;let i=e.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){let n=r[1];if(!n||!e.defs[n])throw new Error(`Reference not found: ${t}`);return e.defs[n]}throw new Error(`Reference not found: ${t}`)}function kh(t,e){if(t.not!==void 0){if(typeof t.not=="object"&&Object.keys(t.not).length===0)return C.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(t.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(t.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(t.if!==void 0||t.then!==void 0||t.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(t.dependentSchemas!==void 0||t.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(t.$ref){let n=t.$ref;if(e.refs.has(n))return e.refs.get(n);if(e.processing.has(n))return C.lazy(()=>{if(!e.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return e.refs.get(n)});e.processing.add(n);let o=Lx(n,e),s=Se(o,e);return e.refs.set(n,s),e.processing.delete(n),s}if(t.enum!==void 0){let n=t.enum;if(e.version==="openapi-3.0"&&t.nullable===!0&&n.length===1&&n[0]===null)return C.null();if(n.length===0)return C.never();if(n.length===1)return C.literal(n[0]);if(n.every(s=>typeof s=="string"))return C.enum(n);let o=n.map(s=>C.literal(s));return o.length<2?o[0]:C.union([o[0],o[1],...o.slice(2)])}if(t.const!==void 0)return C.literal(t.const);let r=t.type;if(Array.isArray(r)){let n=r.map(o=>{let s={...t,type:o};return kh(s,e)});return n.length===0?C.never():n.length===1?n[0]:C.union(n)}if(!r)return C.any();let i;switch(r){case"string":{let n=C.string();if(t.format){let o=t.format;o==="email"?n=n.check(C.email()):o==="uri"||o==="uri-reference"?n=n.check(C.url()):o==="uuid"||o==="guid"?n=n.check(C.uuid()):o==="date-time"?n=n.check(C.iso.datetime()):o==="date"?n=n.check(C.iso.date()):o==="time"?n=n.check(C.iso.time()):o==="duration"?n=n.check(C.iso.duration()):o==="ipv4"?n=n.check(C.ipv4()):o==="ipv6"?n=n.check(C.ipv6()):o==="mac"?n=n.check(C.mac()):o==="cidr"?n=n.check(C.cidrv4()):o==="cidr-v6"?n=n.check(C.cidrv6()):o==="base64"?n=n.check(C.base64()):o==="base64url"?n=n.check(C.base64url()):o==="e164"?n=n.check(C.e164()):o==="jwt"?n=n.check(C.jwt()):o==="emoji"?n=n.check(C.emoji()):o==="nanoid"?n=n.check(C.nanoid()):o==="cuid"?n=n.check(C.cuid()):o==="cuid2"?n=n.check(C.cuid2()):o==="ulid"?n=n.check(C.ulid()):o==="xid"?n=n.check(C.xid()):o==="ksuid"&&(n=n.check(C.ksuid()))}typeof t.minLength=="number"&&(n=n.min(t.minLength)),typeof t.maxLength=="number"&&(n=n.max(t.maxLength)),t.pattern&&(n=n.regex(new RegExp(t.pattern))),i=n;break}case"number":case"integer":{let n=r==="integer"?C.number().int():C.number();typeof t.minimum=="number"&&(n=n.min(t.minimum)),typeof t.maximum=="number"&&(n=n.max(t.maximum)),typeof t.exclusiveMinimum=="number"?n=n.gt(t.exclusiveMinimum):t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(n=n.gt(t.minimum)),typeof t.exclusiveMaximum=="number"?n=n.lt(t.exclusiveMaximum):t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(n=n.lt(t.maximum)),typeof t.multipleOf=="number"&&(n=n.multipleOf(t.multipleOf)),i=n;break}case"boolean":{i=C.boolean();break}case"null":{i=C.null();break}case"object":{let n={},o=t.properties||{},s=new Set(t.required||[]);for(let[l,c]of Object.entries(o)){let u=Se(c,e);n[l]=s.has(l)?u:u.optional()}if(t.propertyNames){let l=Se(t.propertyNames,e),c=t.additionalProperties&&typeof t.additionalProperties=="object"?Se(t.additionalProperties,e):C.any();if(Object.keys(n).length===0){i=C.record(l,c);break}let u=C.object(n).passthrough(),d=C.looseRecord(l,c);i=C.intersection(u,d);break}if(t.patternProperties){let l=t.patternProperties,c=Object.keys(l),u=[];for(let p of c){let m=Se(l[p],e),f=C.string().regex(new RegExp(p));u.push(C.looseRecord(f,m))}let d=[];if(Object.keys(n).length>0&&d.push(C.object(n).passthrough()),d.push(...u),d.length===0)i=C.object({}).passthrough();else if(d.length===1)i=d[0];else{let p=C.intersection(d[0],d[1]);for(let m=2;m<d.length;m++)p=C.intersection(p,d[m]);i=p}break}let a=C.object(n);t.additionalProperties===!1?i=a.strict():typeof t.additionalProperties=="object"?i=a.catchall(Se(t.additionalProperties,e)):i=a.passthrough();break}case"array":{let n=t.prefixItems,o=t.items;if(n&&Array.isArray(n)){let s=n.map(l=>Se(l,e)),a=o&&typeof o=="object"&&!Array.isArray(o)?Se(o,e):void 0;a?i=C.tuple(s).rest(a):i=C.tuple(s),typeof t.minItems=="number"&&(i=i.check(C.minLength(t.minItems))),typeof t.maxItems=="number"&&(i=i.check(C.maxLength(t.maxItems)))}else if(Array.isArray(o)){let s=o.map(l=>Se(l,e)),a=t.additionalItems&&typeof t.additionalItems=="object"?Se(t.additionalItems,e):void 0;a?i=C.tuple(s).rest(a):i=C.tuple(s),typeof t.minItems=="number"&&(i=i.check(C.minLength(t.minItems))),typeof t.maxItems=="number"&&(i=i.check(C.maxLength(t.maxItems)))}else if(o!==void 0){let s=Se(o,e),a=C.array(s);typeof t.minItems=="number"&&(a=a.min(t.minItems)),typeof t.maxItems=="number"&&(a=a.max(t.maxItems)),i=a}else i=C.array(C.any());break}default:throw new Error(`Unsupported type: ${r}`)}return t.description&&(i=i.describe(t.description)),t.default!==void 0&&(i=i.default(t.default)),i}function Se(t,e){if(typeof t=="boolean")return t?C.any():C.never();let r=kh(t,e),i=t.type||t.enum!==void 0||t.const!==void 0;if(t.anyOf&&Array.isArray(t.anyOf)){let a=t.anyOf.map(c=>Se(c,e)),l=C.union(a);r=i?C.intersection(r,l):l}if(t.oneOf&&Array.isArray(t.oneOf)){let a=t.oneOf.map(c=>Se(c,e)),l=C.xor(a);r=i?C.intersection(r,l):l}if(t.allOf&&Array.isArray(t.allOf))if(t.allOf.length===0)r=i?r:C.any();else{let a=i?r:Se(t.allOf[0],e),l=i?0:1;for(let c=l;c<t.allOf.length;c++)a=C.intersection(a,Se(t.allOf[c],e));r=a}t.nullable===!0&&e.version==="openapi-3.0"&&(r=C.nullable(r)),t.readOnly===!0&&(r=C.readonly(r));let n={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of o)a in t&&(n[a]=t[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in t&&(n[a]=t[a]);for(let a of Object.keys(t))Ox.has(a)||(n[a]=t[a]);return Object.keys(n).length>0&&e.registry.add(r,n),r}function Eh(t,e){if(typeof t=="boolean")return t?C.any():C.never();let r=Ax(t,e?.defaultTarget),i=t.$defs||t.definitions||{},n={version:r,defs:i,refs:new Map,processing:new Set,rootSchema:t,registry:e?.registry??xe};return Se(t,n)}var Fp={};Ze(Fp,{bigint:()=>Ux,boolean:()=>Mx,date:()=>Fx,number:()=>jx,string:()=>Cx});function Cx(t){return pl(Rn,t)}function jx(t){return _l(Nn,t)}function Mx(t){return wl(zn,t)}function Ux(t){return Tl(Dn,t)}function Fx(t){return Ml(Tr,t)}pe(Ti());var Ho=["**/node_modules/**","**/.git/**","**/dist/**","**/build/**","**/vendor/**","**/.next/**","**/.cache/**","**/coverage/**","**/*.min.js"],wh=["**/*.{ts,tsx,yaml,yml,php,py,go}","**/*.prisma","**/*.{graphql,gql}","**/Dockerfile*","**/.env*","**/package.json","**/lerna.json","**/turbo.json","**/pnpm-workspace.yaml"],_e={MAX_DEPTH:10,MIN_DEPTH:1,MAX_LIMIT:500,MIN_LIMIT:1,MAX_QUERY_LENGTH:500,DEFAULT_DEPTH:3,DEFAULT_LIMIT:10},Pe={FILTERED_QUERY_LIMIT_MULTIPLIER:3,SCORE_BASE:1e3,EXACT_MATCH_BONUS:500,RECENT_FILE_BOOST:80,OLDER_FILE_BOOST:30,RECENT_FILE_THRESHOLD_DAYS:7,OLDER_FILE_THRESHOLD_DAYS:30,FUZZY_MATCH_LIMIT:30,ENABLE_LEXICAL_SCORING:process.env.ENABLE_LEXICAL_SCORING!=="false",LEXICAL_WEIGHT:parseFloat(process.env.LEXICAL_WEIGHT??String(.4)),GRAVITY_STRUCTURAL_WEIGHT:.5},Zp={SECONDS_PER_DAY:86400,SECONDS_PER_YEAR:31536e3},Wo={DEFAULT_CONCURRENCY:parseInt(process.env.INDEX_CONCURRENCY??String(5),10)};var Qw=h.object({repoPath:h.string(),mode:h.enum(["init","tree","topography","scout","hologram","tools"]),subPath:h.string().optional(),maxDepth:h.number().int().min(_e.MIN_DEPTH).max(_e.MAX_DEPTH).optional()}),eI=h.object({repoPath:h.string(),mode:h.enum(["symbol","concept","symbol-fuzzy","config","path"]).default("symbol"),query:h.string().max(_e.MAX_QUERY_LENGTH).optional(),key:h.string().optional(),kind:h.enum(["Service","Image","Port","Env"]).optional(),limit:h.number().int().min(_e.MIN_LIMIT).max(_e.MAX_LIMIT).optional(),offset:h.number().int().min(0).optional(),skipSync:h.boolean().optional(),compact:h.boolean().optional()}).refine(t=>!(t.mode==="concept"&&(!t.query||t.query.trim().length===0)),{message:"Concept search requires a non-empty query",path:["query"]}),tI=h.object({repoPath:h.string(),mode:h.enum(["symbol","file"]),filePath:h.string().optional(),detailLevel:h.enum(["structure","signatures","summaries","detailed"]).optional(),symbolName:h.string().optional(),context:h.enum(["definition","full"]).optional()}),nI=h.object({repoPath:h.string(),mode:h.enum(["impact","deps","flow","dead-code","circular-deps"]),filePath:h.string().optional(),symbolName:h.string().optional(),direction:h.enum(["imports","imported_by"]).optional(),depth:h.number().int().min(_e.MIN_DEPTH).max(_e.MAX_DEPTH).optional(),limit:h.number().int().min(_e.MIN_LIMIT).max(_e.MAX_LIMIT).optional(),includeTests:h.boolean().optional()}),rI=h.object({repoPath:h.string(),action:h.enum(["index","repair","trace"]),deep:h.boolean().optional(),sinceCommit:h.string().optional()}),iI=h.object({repoPath:h.string(),action:h.enum(["install","remove","status"]),enableAutoRefresh:h.boolean().optional(),enableSymbolHealing:h.boolean().optional()}),oI=h.object({action:h.enum(["list","link","fuse"]),repoPaths:h.array(h.string()).optional(),name:h.string().optional(),status:h.string().optional(),parentRepoPath:h.string().optional(),parentMissionId:h.number().optional(),childRepoPath:h.string().optional(),childMissionId:h.number().optional(),relationship:h.string().optional()});var Ih=[{uri:"repo://current/dependency-graph",name:"Project Dependency Graph",mimeType:"application/json",description:"Full dependency graph of the current repository"},{uri:"repo://current/statistics",name:"Repository Statistics",mimeType:"application/json",description:"Statistics about files, exports, and imports"},{uri:"repo://current/metrics",name:"MCP Server Metrics",mimeType:"application/json",description:"Comprehensive monitoring metrics: repository stats (indexed, files, exports, imports, last indexed commit, Git hooks) and performance metrics (index runs, cache hits, query latency, uptime). Use for observability and performance monitoring."},{uri:"repo://current/hologram",name:"Liquid Holo (Project Hologram)",mimeType:"application/json",description:"Persistent architectural snapshot (~1300 tokens) solving Agent Amnesia. Read this at session start for instant context. Contains: (1) Topography - 8-layer classification with file distribution and insights, (2) Gravity Zones - top 10 high-impact symbols ranked by import graph centrality (inDegree + outDegree), (3) Ghost Bridges - external change patterns (populated after git operations). Auto-populated on shadow_recon_onboard and updated by shadow_sync_trace. Use when: starting new sessions, after context loss, or to quickly orient in unfamiliar codebases. Skip when: already familiar with architecture or working on isolated tasks."},{uri:"repo://current/tools",name:"Available Tools",mimeType:"application/json",description:"List of all available tools and their schemas"}];var Bo=[...Od,...Ad];X();import Vr from"path";import n$ from"fast-glob";import Gp from"fs";import r$ from"ignore";import Gh from"path";async function Vp(t,e=[]){let r=r$(),i=Gh.join(t,".gitignore");return Gp.existsSync(i)&&r.add(Gp.readFileSync(i,"utf8")),e.length>0&&r.add(e),(await n$(wh,{cwd:t,absolute:!0,ignore:Ho})).filter(s=>{let a=Gh.relative(t,s);return!r.ignores(a)}).map(s=>({path:s,mtime:Gp.statSync(s).mtimeMs}))}import m$ from"@swc/core";import Xp from"fs";function Vh(t){let e=t.split(`
457
- `),r=[],i=0;for(let n of e)r.push(i),i+=n.length+1;return r}function ce(t,e){for(let r=0;r<e.length;r++)if(e[r+1]>t||r===e.length-1)return r+1;return 1}function le(t,e){return e.slice(0,t).toString("utf8").length}function qh(t,e,r){let i=t.start-e,n=t.end-e;return i<0||n>r.length?"":r.slice(i,n).toString("utf8")}function Kh(t){let e=[],r=/\/\*\*[\s\S]*?\*\//g,i;for(;(i=r.exec(t))!==null;)e.push({start:i.index,end:i.index+i[0].length,text:i[0]});return e}function tt(t,e,r){for(let i of e){if(i.start===t)return i.text;if(i.start>t&&i.start<t+50){let n=r.substring(t,i.start);if(/^\s*$/.test(n))return i.text}if(i.end<=t&&i.end>t-50){let n=r.substring(i.end,t);if(/^\s*$/.test(n))return i.text}}return""}function Yh(t){if(!t)return"";let r=t.replace(/\/\*\*|\*\/|\*/g,"").trim().split(`
458
- `)[0].trim();return r.length>200?r.substring(0,197)+"...":r}function os(t,e,r){let i=t.toLowerCase(),n=e.toLowerCase();return i.includes("components/")||i.endsWith(".tsx")?"Component":i.startsWith("use")||n.startsWith("use")?"Hook":i.includes("models/")||n.endsWith("model")?"Model":i.includes("services/")||i.includes("controllers/")||i.includes("handlers/")||i.includes("mcp/")||i.endsWith("service.ts")||i.endsWith("controller.ts")||i.endsWith("handler.ts")||n.endsWith("service")||n.endsWith("controller")||n.endsWith("handler")?"Service":i.includes("repositories/")||i.includes("repos/")||i.endsWith("repository.ts")||i.endsWith("repo.ts")||n.endsWith("repository")||n.endsWith("repo")?"Repository":r==="TsInterfaceDeclaration"||r==="TsTypeAliasDeclaration"?"Type Definition":"Other"}function Lr(t){let e=[];return/\b(fetch|axios|superagent|got)\s*\(|import\s+.*\b(http|https|node-fetch)\b/i.test(t)&&e.push("Network"),(/\b(knex|prisma|typeorm|mongoose|sequelize|pg|mysql|sqlite3)\b/i.test(t)||/\b(SELECT\s+.*FROM|INSERT\s+INTO|UPDATE\s+.*SET|DELETE\s+FROM)\b/i.test(t)||/\.query\s*\(|\.execute\s*\(/i.test(t)&&/db|database|client|pool/i.test(t))&&e.push("Database"),(/\bfs\./i.test(t)||/\b(readFileSync|writeFileSync|readFile|writeFile|readdir)\b/.test(t)||/import\s+.*\bfs\b/.test(t))&&e.push("File System"),(/\b(localStorage|sessionStorage|indexedDB)\./.test(t)||/\bdocument\.cookie\b/.test(t))&&e.push("Browser Storage"),e}function dt(t,e){if(!t)return"";let r=t.replace(/^([\s\S]*?\*\/)?\s*/,"").replace(/^.*\} from ['"].*['"];?\s*/,"").replace(/^import .*['"];?\s*/,"").trim();if(e==="TsInterfaceDeclaration"||e==="TsTypeAliasDeclaration")return r;let i=0,n=0,o=r.length;for(let s=0;s<r.length;s++){let a=r[s];if(a==="(")i++;else if(a===")")i--;else if(a==="<")n++;else if(a===">")n--;else if(a==="{"){if(i===0&&n===0){o=s;break}}else if(a==="; "&&i===0&&n===0){o=s;break}else if(a==="="&&r[s+1]===">"&&i===0&&n===0){o=s+2;break}}return r.substring(0,o).trim()}function Xh(t){let e=[];for(let r of t)r.type==="ImportDeclaration"&&e.push({module:r.source.value,name:r.specifiers.map(i=>i.type==="ImportDefaultSpecifier"?"default":i.type==="ImportNamespaceSpecifier"?"*":i.local?.value||i.imported?.value||"*").join("","")}),r.type==="ExportAllDeclaration"&&e.push({module:r.source.value,name:"*"}),r.type==="ExportNamedDeclaration"&&r.source&&e.push({module:r.source.value,name:r.specifiers.map(i=>i.type==="ExportSpecifier"?i.orig.value:"*").join(", ")});return e}function Qh(t,e,r,i,n,o,s,a){let l=[];for(let c of t){if(c.type==="ExportDeclaration"){let u=c.declaration,d=u.type,p="";d==="VariableDeclaration"?p=u.declarations.map(g=>g.id.value).join("",""):p=u.id?.value||u.identifier?.value||"anonymous";let m=le(c.span.start-e,r),f=le(c.span.end-e,r),y=tt(m,o,i),b=a(c.span),_=[];if(c.type==="ExportDeclaration"&&(d==="ClassDeclaration"||d==="ClassExpression")){let g=u.body||[];for(let x of g)if(x.type==="ClassMethod"||x.type==="ClassProperty"){let E=x.key.value;if(!E)continue;let A=le(x.span.start-e,r),I=le(x.span.end-e,r),R=a(x.span),k=tt(A,o,i);_.push({name:E,kind:x.type,signature:dt(R,x.type),line:ce(A,n),endLine:ce(I,n),doc:k,classification:x.type==="ClassMethod"?"Method":"Property",capabilities:"[]"})}}else if(d==="FunctionDeclaration"&&u.body?.type==="BlockStatement")_=qp(u.body.stmts,e,r,i,n,o,a);else if(d==="VariableDeclaration"){for(let g of u.declarations)if(g.init&&(g.init.type==="ArrowFunctionExpression"||g.init.type==="FunctionExpression")&&g.init.body?.type==="BlockStatement"){_=qp(g.init.body.stmts,e,r,i,n,o,a);break}}l.push({name:p,kind:d,signature:dt(b,d),line:ce(m,n),endLine:ce(f,n),doc:y,classification:os(s,p,d),capabilities:JSON.stringify(Lr(b)),members:_})}if(c.type==="ExportNamedDeclaration"){for(let u of c.specifiers)if(u.type==="ExportSpecifier"){let d=le(c.span.start-e,r),p=le(c.span.end-e,r),m=tt(d,o,i);l.push({name:u.exported?.value||u.orig.value,kind:"ExportSpecifier",signature:`export { ${u.orig.value} }`,line:ce(d,n),endLine:ce(p,n),doc:m,classification:"Export mapping",capabilities:"[]"})}}if(c.type==="ExportDefaultDeclaration"){let u=le(c.span.start-e,r),d=le(c.span.end-e,r),p=tt(u,o,i),m=a(c.span),f=[];if(c.decl.type==="ClassExpression"||c.decl.type==="ClassDeclaration"){let y=c.decl.body||[];for(let b of y)if(b.type==="ClassMethod"||b.type==="ClassProperty"){let _=b.key.value;if(!_)continue;let g=le(b.span.start-e,r),x=le(b.span.end-e,r),E=a(b.span),A=tt(g,o,i);f.push({name:_,kind:b.type,signature:dt(E,b.type),line:ce(g,n),endLine:ce(x,n),doc:A,classification:b.type==="ClassMethod"?"Method":"Property",capabilities:"[]"})}}else(c.decl.type==="FunctionExpression"||c.decl.type==="FunctionDeclaration"||c.decl.type==="ArrowFunctionExpression")&&c.decl.body?.type==="BlockStatement"&&(f=qp(c.decl.body.stmts,e,r,i,n,o,a));l.push({name:"default",kind:"DefaultExport",signature:dt(m,"DefaultExport"),line:ce(u,n),endLine:ce(d,n),doc:p,classification:"Default Export",capabilities:JSON.stringify(Lr(m)),members:f})}if(c.type==="ExportAllDeclaration"){let u=le(c.span.start-e,r),d=le(c.span.end-e,r),p=c.source.value,m=tt(u,o,i);l.push({name:"*",kind:"ExportAllDeclaration",signature:`export * from "${p}"`,line:ce(u,n),endLine:ce(d,n),doc:m,classification:"Re-export",capabilities:"[]"})}}return l}function qp(t,e,r,i,n,o,s){let a=[];for(let l of t){if(l.type==="VariableDeclaration")for(let c of l.declarations){let u=[],d=p=>{if(p.type==="Identifier")u.push({name:p.value,span:p.span});else if(p.type==="ArrayPattern")for(let m of p.elements)m&&d(m);else if(p.type==="ObjectPattern")for(let m of p.properties)m.type==="AssignmentPatternProperty"?u.push({name:m.key.value,span:m.span}):m.type==="KeyValuePatternProperty"&&d(m.value)};d(c.id);for(let p of u){let m=le(p.span.start-e,r),f=le(p.span.end-e,r),y=s(p.span),b=tt(m,o,i);a.push({name:p.name,kind:"VariableDeclaration",signature:dt(y,"VariableDeclaration"),line:ce(m,n),endLine:ce(f,n),doc:b,classification:"Internal Variable",capabilities:"[]"})}}if(l.type==="FunctionDeclaration"){let c=l.identifier?.value||l.ident?.value||"anonymous",u=le(l.span.start-e,r),d=le(l.span.end-e,r),p=s(l.span),m=tt(u,o,i);a.push({name:c,kind:"FunctionDeclaration",signature:dt(p,"FunctionDeclaration"),line:ce(u,n),endLine:ce(d,n),doc:m,classification:"Internal Function",capabilities:"[]"})}if(l.type==="ReturnStatement"&&l.argument?.type==="ObjectExpression")for(let c of l.argument.properties){let u="",d=c.span||c.key?.span||c.ident?.span;if(c.type==="KeyValueProperty"){let p=c.key;u=p?.value||p?.raw||(p?.type==="Identifier"?p.value:"")}else c.type==="MethodProperty"?u=c.key?.value||c.key?.raw||"":c.type==="ShorthandProperty"?u=c.ident?.value||"":c.type==="Identifier"&&(u=c.value||"");if(u&&d){let p=le(d.start-e,r),m=le(d.end-e,r),f=s(d),y=tt(p,o,i);a.push({name:u,kind:"ReturnProperty",signature:dt(f,"ReturnProperty"),line:ce(p,n),endLine:ce(m,n),doc:y,classification:"Return Member",capabilities:"[]"})}}if(l.type==="ExpressionStatement"&&l.expression.type==="CallExpression"){let c=l.expression;if(c.callee.type==="MemberExpression"&&(c.callee.property?.value==="on"||c.callee.property?.value==="once")){let u=c.arguments[0]?.expression?.value,d=c.arguments[1]?.expression;if(u&&d&&(d.type==="ArrowFunctionExpression"||d.type==="FunctionExpression")){let p=le(d.span.start-e,r),m=le(d.span.end-e,r),f=s(d.span);a.push({name:`on:${u}`,kind:d.type,signature:dt(f,d.type),line:ce(p,n),endLine:ce(m,n),doc:"",classification:"Event Handler",capabilities:"[]"})}}}}return a}function eg(t,e,r,i,n){let o=[];function s(a){if(!(!a||typeof a!="object")){if(a.type==="CallExpression"){let l=i$(a);if(l){let c=le(a.span.start-e,r);o.push({...l,line:ce(c,i),snippet:n(a.span)})}}for(let l of Object.keys(a)){if(l==="span")continue;let c=a[l];Array.isArray(c)?c.forEach(s):typeof c=="object"&&s(c)}}}return t.forEach(s),o}function i$(t){let{callee:e,arguments:r}=t;if(!r||r.length===0)return null;if(e.type==="MemberExpression"&&e.property?.type==="Identifier"){let i=e.property.value;if(i==="emit"&&r[0].expression.type==="StringLiteral")return{type:"socket_event",name:r[0].expression.value,direction:"produce"};if(i==="on"&&r[0].expression.type==="StringLiteral")return{type:"socket_event",name:r[0].expression.value,direction:"consume"};let n=["get","post","put","delete","patch"];if(n.includes(i)&&r[0].expression.type==="StringLiteral"){let o=r[0].expression.value;if(o.startsWith("/"))return{type:"api_route",name:o,direction:"consume"}}if(n.includes(i)&&r[0].expression.type==="StringLiteral"&&e.object.type==="Identifier"&&["axios","http","request"].includes(e.object.value))return{type:"api_route",name:r[0].expression.value,direction:"produce"}}return e.type==="Identifier"&&e.value==="fetch"&&r[0].expression.type==="StringLiteral"?{type:"api_route",name:r[0].expression.value,direction:"produce"}:null}function Cr(t){let{classification:e,capabilities:r,exports:i,fileName:n}=t,o={Network:"API integration",Database:"data persistence","File System":"file I/O operations","Browser Storage":"client-side storage"},s=r.map(f=>o[f]).filter(Boolean).join(" and "),l={Component:(f,y)=>{let b=y.find(g=>g.kind==="FunctionDeclaration"||g.kind==="ClassDeclaration")?.name,_=b?`React component: ${b}`:"React UI component";return f?`${_} with ${f}`:_},Hook:(f,y)=>{let b=y.find(g=>g.name.startsWith("use"))?.name,_=b?`Custom React hook: ${b}`:"Custom React hook";return f?`${_} for ${f}`:_},Service:(f,y)=>{let _=`Service layer: ${y[0]?.name||"Service"}`;return f?`${_} handling ${f}`:_},Repository:(f,y)=>`Data repository: ${y[0]?.name||"Repository"} for ${f||"data access"}`,"Type Definition":(f,y)=>`Type definitions: ${y.slice(0,3).map(_=>_.name).join("")}${y.length>3?"...":""}`,Model:(f,y)=>`Data model: ${y[0]?.name||"Model"}`,"HTTP Route":(f,y)=>{let b=y.filter(_=>_.classification==="Service Boundary");return b.length>0?`API endpoints: ${b.slice(0,3).map(_=>_.name).join("")}`:"API route handler"},"Micro IR (PHP)":(f,y)=>{let b=y.some(g=>g.classification==="Service Boundary"),_=y.find(g=>g.kind==="ClassDeclaration")?.name;return b?"PHP controller with API routes":_?`PHP class: ${_}`:"PHP module"},"Micro IR (Python)":(f,y)=>{let b=y.some(g=>g.classification==="Service Boundary"),_=y.find(g=>g.kind==="ClassDeclaration")?.name;return b?"Python API handler with routes":_?`Python class: ${_}`:"Python module"},"Micro IR (Go/TS) ":(f,y)=>{let b=y.some(g=>g.kind==="TypeDeclaration"),_=y.filter(g=>g.kind==="FunctionDeclaration");return b&&_.length>0?`Go package: types and ${_.length} function(s)`:b?"Go package: type definitions":_.length>0?`Go package: ${_[0].name} and ${_.length} function(s)`:"Go module"},"Micro IR (Rust/TS) ":(f,y)=>{let b=y.find(x=>x.kind==="TraitDeclaration")?.name,_=y.find(x=>x.kind==="StructDeclaration")?.name,g=y.filter(x=>x.kind==="FunctionDeclaration");return b?f.includes("Rust trait")?`Rust module: trait ${b}`:`Rust module: ${b}`:_?`Rust module: struct ${_}`:g.length>0?`Rust module: ${g.length} function(s)`:"Rust module"}}[e];if(l)return l(s,i);if(i.length===0)return n?`Module: ${n}`:"Module with no exports";let c=i.filter(f=>f.kind==="FunctionDeclaration"),u=i.filter(f=>f.kind==="ClassDeclaration"),d=i.filter(f=>f.kind==="TsInterfaceDeclaration"||f.kind==="TsTypeAliasDeclaration"),p=[];if(u.length>0&&p.push(`Class: ${u[0].name}`),c.length>0){let f=c.slice(0,2).map(y=>y.name).join("");p.push(`Functions: ${f}`)}d.length>0&&p.push(`Types: ${d.length}`);let m=p.length>0?p.join(" | "):`Module with ${i.length} export(s)`;return s?`${m} \u2014 ${s}`:m}function tg(t){let e=new Set;function r(i){if(!(!i||typeof i!="object")){i.typeAnnotation&&me(i.typeAnnotation,e),(i.type==="TsTypeReference"||i.type==="TsTypeAnnotation")&&me(i,e);for(let n in i){if(n==="span"||n==="comments"||n==="interpreter")continue;let o=i[n];o&&typeof o=="object"&&(Array.isArray(o)?o.forEach(r):r(o))}}}return t.forEach(i=>r(i)),Array.from(e)}function me(t,e){if(t){if(t.type==="TsTypeAnnotation"){me(t.typeAnnotation,e);return}t.type==="TsTypeReference"&&(t.typeName?.type==="Identifier"&&e.add(t.typeName.value),t.typeName?.type==="TsQualifiedName"&&ng(t.typeName,e),t.typeParams&&me(t.typeParams,e)),t.type==="TsArrayType"&&me(t.elementType,e),t.type==="TsUnionType"&&t.types?.forEach(r=>me(r,e)),t.type==="TsIntersectionType"&&t.types?.forEach(r=>me(r,e)),t.type==="TsTupleType"&&t.elemTypes?.forEach(r=>me(r.ty,e)),(t.type==="TsFunctionType"||t.type==="TsConstructorType")&&(t.params?.forEach(r=>me(r.typeAnnotation,e)),t.typeAnnotation&&me(t.typeAnnotation,e)),t.type==="TsTypeParameterDeclaration"&&t.params?.forEach(r=>{r.constraint&&me(r.constraint,e),r.default&&me(r.default,e)}),t.type==="TsTypeParameterInstantiation"&&t.params?.forEach(r=>me(r,e)),t.type==="TsMappedType"&&t.typeAnnotation&&me(t.typeAnnotation,e),t.type==="TsIndexedAccessType"&&(me(t.objectType,e),me(t.indexType,e)),t.type==="TsConditionalType"&&(me(t.checkType,e),me(t.extendsType,e),me(t.trueType,e),me(t.falseType,e)),t.type==="TsTypeLiteral"&&t.members?.forEach(r=>{r.typeAnnotation&&me(r.typeAnnotation,e)})}}function ng(t,e){t.type==="TsQualifiedName"?(t.left&&ng(t.left,e),t.right?.value&&e.add(t.right.value)):t.type==="Identifier"&&e.add(t.value)}import cg from"path";import Yp from"path";F();import sg from"path";import u$ from"fs";import{fileURLToPath as p$}from"url";import*as Yt from"web-tree-sitter";import{fileURLToPath as o$}from"node:url";import{dirname as Kp,join as ig,resolve as s$}from"node:path";import{existsSync as a$}from"node:fs";var c$=o$(import.meta.url),rg=Kp(c$);function l$(){let t=rg;for(;t!==Kp(t);){if(a$(ig(t,"package.json")))return t;t=Kp(t)}return s$(rg,"..","..")}function On(...t){return ig(l$(),...t)}var LT=sg.dirname(p$(import.meta.url)),og=$.child({module:"parser:tree-sitter"}),ss=class{parser=null;languages=new Map;async ensureInitialized(){if(this.parser)return;let e=Yt.Parser||Yt;await e.init(),this.parser=new e}async getLanguage(e){if(this.languages.has(e))return this.languages.get(e);let r=On("resources","grammars",`tree-sitter-${this.getLangName(e)}.wasm`);if(!u$.existsSync(r))return og.warn({grammarPath:r},"Grammar WASM not found"),null;try{let i=await Yt.Language.load(r);return this.languages.set(e,i),i}catch(i){return og.error({err:i,ext:e},"Failed to load language grammar"),null}}getLangName(e){switch(e.toLowerCase()){case".php":return"php";case".py":return"python";case".go":return"go";case".rs":return"rust";default:return""}}getQueries(e){switch(e.toLowerCase()){case".php":return`
459
- (function_definition name: (name) @name) @func
460
- (class_declaration name: (name) @name) @class
461
- (interface_declaration name: (name) @name) @interface
462
- (trait_declaration name: (name) @name) @trait
463
- (method_declaration name: (name) @name) @method
464
- (namespace_use_declaration (namespace_use_clause (qualified_name) @name)) @import
465
- `;case".py":return`
466
- (function_definition name: (identifier) @name) @func
467
- (class_definition name: (identifier) @name) @class
468
- (import_statement name: (dotted_name) @name) @import
469
- (import_from_statement module_name: (dotted_name) @name) @import
470
- `;case".go":return`
471
- (function_declaration name: (identifier) @name) @func
472
- (method_declaration name: (identifier) @name) @func
473
- (type_declaration (type_spec name: (identifier) @name)) @type
474
- (import_spec path: (interpreted_string_literal) @name) @import
475
- `;case".rs":return`
476
- (function_item name: (identifier) @name) @func
477
- (struct_item name: (_type_identifier) @name) @struct
478
- (enum_item name: (_type_identifier) @name) @enum
479
- (trait_item name: (_type_identifier) @name) @trait
480
- (type_item name: (_type_identifier) @name) @type
481
- (use_declaration argument: (_) @name) @import
482
- `;default:return""}}mapKind(e,r){if(e==="import")return"ImportDeclaration";if(r===".php"){if(e==="func")return"FunctionDeclaration";if(e==="class")return"ClassDeclaration";if(e==="interface")return"InterfaceDeclaration";if(e==="trait")return"TraitDeclaration";if(e==="method")return"MethodDeclaration"}if(r===".py"){if(e==="func")return"FunctionDeclaration";if(e==="class")return"ClassDeclaration"}if(r===".go"){if(e==="func")return"FunctionDeclaration";if(e==="type")return"TypeDeclaration"}if(r===".rs"){if(e==="func")return"FunctionDeclaration";if(e==="struct")return"StructDeclaration";if(e==="enum")return"EnumDeclaration";if(e==="trait")return"TraitDeclaration";if(e==="type")return"TypeDeclaration"}return"Unknown"}mapClassification(e){return e==="import"?"Dependency":e==="func"||e==="method"?"Function":e==="class"||e==="interface"||e==="trait"||e==="struct"||e==="enum"||e==="type"?"Class":"Other"}async parse(e,r){await this.ensureInitialized();let i=sg.extname(e).toLowerCase(),n=await this.getLanguage(i);if(!n||!this.parser)return[];this.parser.setLanguage(n);let o=this.parser.parse(r),s=r.split(`
483
- `),a=this.getQueries(i);if(!a)return[];let c=new Yt.Query(n,a).matches(o.rootNode),u=[];for(let d of c){let p=d.captures.find(y=>y.name==="name")?.node,m=d.captures[0].node,f=d.captures[0].name;if(p){let y=m.startPosition.row+1,b=m.endPosition.row+1,_=s[m.startPosition.row].trim();u.push({name:p.text,kind:this.mapKind(f,i),classification:this.mapClassification(f),signature:_,line:y,endLine:b,doc:"",capabilities:"{}"})}}return u}};var as=class{parse(e,r=!1){let i=[],n=[],o=e.split(`
484
- `),s="",a="",l=0,c=0,u=-1,d=-1,p=[],m=[],f=!1,y=r?"api":"",b="",_=/^namespace\s+([a-zA-Z0-9_\\]+);/,g=/^(?:abstract\s+)?(?:readonly\s+)?class\s+([a-zA-Z0-9_]+)/,x=/^interface\s+([a-zA-Z0-9_]+)/,E=/^trait\s+([a-zA-Z0-9_]+)/,A=/^(?:public|protected|private|static|\s)*function\s+([a-zA-Z0-9_]+)\s*\(/,I=/^use\s+([a-zA-Z0-9_\\]+)(?:\s+as\s+([a-zA-Z0-9_]+))?;/,R=/^#\[([a-zA-Z0-9_\\]+)(?:\((.*)\))?\]/,k=/(?:Route::|router->|\$router->|->)(get|post|put|delete|patch|match)\s*\(\s*(?:uri\s*:\s*)?['"]([^'"]+)['"]/,j=/->prefix\s*\(\s*(?:prefix\s*:\s*)?['"]([^'"]+)['"]/;for(let w=0;w<o.length;w++){let P=o[w].trim();if(!P)continue;let J=(P.match(/{/g)||[]).length,O=(P.match(/}/g)||[]).length,M=c;if(c+=J-O,a&&c<=d){let H=i.find(W=>W.name===a&&W.line===l);H&&(H.endLine=w+1),a="",d=-1}if(s&&c<=u){let H=i.find(W=>W.name===s&&(W.kind==="ClassDeclaration"||W.kind==="TraitDeclaration"||W.kind==="InterfaceDeclaration"));H&&(H.endLine=w+1),s="",u=-1}let q=P.match(j);if(q&&(y=q[1]),P.includes("});")&&(y=""),P.startsWith("/**")){f=!0,m=[];continue}if(f){P.endsWith("*/")?f=!1:m.push(P.replace(/^\*\s?/,""));continue}let oe=P.match(R);if(oe){p.push(oe[1]);continue}let B=P.match(_);if(B){b=B[1]||"",p=[],m=[];continue}let Z=P.match(g);if(Z){s=Z[1],u=c-J;let H={attributes:p};b&&(H.namespace=b),i.push({name:s,kind:"ClassDeclaration",classification:"Class",signature:`class ${s}`,line:w+1,endLine:w+1,doc:m.join(`
485
- `).trim(),capabilities:JSON.stringify(H),members:[]}),p=[],m=[];continue}let G=P.match(x);if(G){let H=G[1];s=H,u=c-J,i.push({name:H,kind:"InterfaceDeclaration",classification:"Interface",signature:`interface ${H}`,line:w+1,endLine:w+1,doc:m.join(`
486
- `).trim(),capabilities:JSON.stringify({attributes:p}),members:[]}),p=[],m=[];continue}let U=P.match(E);if(U){let H=U[1];s=H,u=c-J,i.push({name:H,kind:"TraitDeclaration",classification:"Trait",signature:`trait ${H}`,line:w+1,endLine:w+1,doc:m.join(`
487
- `).trim(),capabilities:JSON.stringify({attributes:p}),members:[]}),p=[],m=[];continue}let ee=P.match(A);if(ee){let H=ee[1],W=!!s;a=H,l=w+1,d=c-J;let Zt=!1,st={};for(let $e of p)$e.toLowerCase().includes("route")&&(Zt=!0,st={type:"route",method:"GET",path:"/"});let at=m.join(`
488
- `).trim();if(Zt){let $e=st.path||"/";i.push({name:$e,kind:"HTTP Route",classification:"Service Boundary",signature:`Function: ${H}`,line:w+1,endLine:w+1,doc:at,capabilities:JSON.stringify({type:"route",handler:s?`${s}@${H}`:H,...st})}),n.push({type:"api_route",name:$e,direction:"consume",line:w+1,snippet:P})}i.push({name:H,kind:W?"MethodDeclaration":"FunctionDeclaration",classification:W?"Method":"Function",signature:`${W?s+":: ":""}${H}`,line:w+1,endLine:w+1,doc:at,capabilities:JSON.stringify({attributes:p})}),p=[],m=[];continue}let fe=P.match(I);if(fe){let H=fe[1]||"",W=fe[2]||H.split("\\").pop()||"";i.push({name:W,kind:"ImportSpecifier",classification:"Dependency",signature:`use ${H}`,line:w+1,endLine:w+1,doc:"",capabilities:JSON.stringify({type:"use",namespace:H})}),p=[],m=[];continue}let se=P.match(k);if(se){let H=se[1].toUpperCase(),W=se[2];if(P.includes("Route::")||P.includes("router->")||P.includes("action")||P.includes(",")&&!P.includes("view(")){if(y){let vt=y.startsWith("/")?y:`/${y}`,Hs=W.startsWith("/")?W:`/${W}`;W=(vt+Hs).replace(/\/+/g,"/")}let st=null,at=P.match(/\[\s*([a-zA-Z0-9_]+)::class\s*,\s*['"]([^'"]+)['"]\s*\]/);if(at)st=`${at[1]}@${at[2]}`;else if(P.includes("::class")){let vt=P.match(/([a-zA-Z0-9_]+)::class/);vt&&(st=vt[1])}let $e=P;!P.endsWith(");")&&w+1<o.length&&($e+=" "+o[w+1].trim(),!$e.endsWith(");")&&w+2<o.length&&($e+=" "+o[w+2].trim())),i.push({name:W,kind:"HTTP Route",classification:"Service Boundary",signature:$e,line:w+1,endLine:w+1,doc:"",capabilities:JSON.stringify({type:"route",method:H,path:W,handler:st})}),n.push({type:"api_route",name:W,direction:"consume",line:w+1,snippet:$e,method:H,url:W}),m=[];continue}}let he=/(?:\$client|client|Http)::(get|post|put|delete|patch|request)\s*\(\s*(?:url\s*:\s*)?([^,)]+)|(?:\$client|client)->(request|get|post|put|delete|patch)\s*\(\s*([^,)]+)/,ue=P.match(he);if(ue){let H=(ue[1]||ue[3]).toUpperCase(),W=(ue[2]||ue[4]).trim();(W.startsWith("'")&&W.endsWith("'")||W.startsWith('"')&&W.endsWith('"'))&&(W=W.substring(1,W.length-1)),n.push({type:"api_route",name:W,direction:"produce",line:w+1,snippet:P,method:H,url:W})}!P.startsWith("#[")&&!P.startsWith("//")&&!P.startsWith("*")&&!f&&(p=[],m=[])}return{nodes:i,events:n}}};var cs=class{currentRoutePrefix="";parse(e){this.currentRoutePrefix="";let r=[],i=[],n=e.split(`
489
- `),o=[{indent:-1,name:"root",type:"root"}],s=[],a=/^class\s+([a-zA-Z0-9_]+)/,l=/^async\s+def\s+([a-zA-Z0-9_]+)|^def\s+([a-zA-Z0-9_]+)/,c=/^(?:from\s+([a-zA-Z0-9_\.]+)\s+import|import\s+([a-zA-Z0-9_\.]+))/,u=/^@(.*)/;function d(_){return _.trim().split(/[.(]/)[0]?.trim()||_}function p(_){let g=_.decorators.map(E=>d(E.raw)),x={decorators:_.decorators,decoratorNames:g};return _.async===!0&&(x.async=!0),JSON.stringify(x)}let m=!1,f="",y=[],b=[];for(let _=0;_<n.length;_++){let g=n[_],x=g.trim();if(!x||x.startsWith("#"))continue;let E=/^([a-zA-Z0-9_]+)\s*=\s*(?:APIRouter|Blueprint)\s*\(\s*(?:prefix\s*=\s*)?['"]([^'"]+)['"]/,A=x.match(E);if(A&&(this.currentRoutePrefix=A[2]),m){if(x.endsWith(f)||x.includes(f)){m=!1;let Z=x.replace(f,"").trim();Z&&y.push(Z);let G=o[o.length-1];G.node&&(G.node.doc=y.join(`
490
- `).trim()),y=[]}else y.push(x);continue}let I=g.search(/\S/),R=g.trim(),k=R.match(/^(['"]{3})/);if(k){let Z=k[1],G=o[o.length-1];if(G.node&&!G.node.doc){if(R.substring(3).includes(Z)){let U=R.replace(new RegExp(Z,"g"),"").trim();G.node.doc=U}else{m=!0,f=Z;let U=R.substring(3).trim();U&&y.push(U)}continue}}for(;o.length>1&&o[o.length-1].indent>=I;)o.pop();let j=o[o.length-1],w=R.match(u);if(w){s.push({raw:w[1].trim(),line:_+1});continue}let P=R.match(a);if(P){let Z=P[1],G={name:Z,kind:"ClassDeclaration",classification:"Class",signature:`class ${Z}`,line:_+1,endLine:_+1,doc:"",capabilities:p({decorators:s}),members:[]};b.push(G),j.node?(j.node.members||(j.node.members=[]),j.node.members.push(G)):r.push(G),o.push({indent:I,name:Z,type:"class",node:G}),s=[];continue}let J=R.match(l);if(J){let Z=!!J[1],G=J[1]||J[2],U=j.type==="class",ee=!1,fe={};for(let W of s)if(W.raw.match(/(?:app|router)\.(get|post|put|delete|patch)/)){ee=!0;let st=["get","post","put","delete","patch"].find(vt=>W.raw.toLowerCase().includes(`.${vt}`))?.toUpperCase()||"GET",at=W.raw.match(/['"]([^'"]+)['"]/),$e=at?at[1]:"/";if(this.currentRoutePrefix){let vt=this.currentRoutePrefix.endsWith("/")?this.currentRoutePrefix.slice(0,-1):this.currentRoutePrefix,Hs=$e.startsWith("/")?$e:`/${$e}`;$e=vt+Hs}fe={type:"route",method:st,path:$e}}if(ee){let W=fe.path||"",Zt={name:W||G,kind:"HTTP Route",classification:"Service Boundary",signature:`Function: ${G}`,line:_+1,endLine:_+1,doc:"",capabilities:JSON.stringify({handler:U?`${j.name}.${G}`:G,async:Z,...fe})};b.push(Zt),r.push(Zt),i.push({type:"api_route",name:W,direction:"consume",line:_+1,snippet:R})}let se=s.some(W=>W.raw==="staticmethod"),he=s.some(W=>W.raw==="classmethod"),ue=`${Z?"async ":""}${U?(se?"@staticmethod ":he?"@classmethod ":"")+j.name+".":""}${G}`,H={name:G,kind:Z&&U?"AsyncMethodDeclaration":Z?"AsyncFunctionDeclaration":U?"MethodDeclaration":"FunctionDeclaration",classification:U?se||he?"Static Method":"Method":"Function",signature:ue,line:_+1,endLine:_+1,doc:"",capabilities:p({decorators:s,async:Z}),members:[]};b.push(H),j.node?(j.node.members||(j.node.members=[]),j.node.members.push(H)):r.push(H),o.push({indent:I,name:G,type:"function",node:H}),s=[];continue}let O=/^(?:path|re_path|url)\s*\(\s*['"]([^'"]+)['"]/,M=R.match(O);if(M){let Z=M[1].replace(/^\^/,""),G={name:Z,kind:"HTTP Route",classification:"Service Boundary",signature:R.trim(),line:_+1,endLine:_+1,doc:"",capabilities:JSON.stringify({type:"route",method:"GET",path:Z})};b.push(G),r.push(G),i.push({type:"api_route",name:Z,direction:"consume",line:_+1,snippet:R});continue}let q=/(?:requests|httpx|client|http)\.(get|post|put|delete|patch|request)\s*\(\s*(?:url\s*:\s*)?([^,)]+)/,oe=R.match(q);if(oe){let Z=oe[1].toUpperCase(),G=oe[2].trim();(G.startsWith("'")&&G.endsWith("'")||G.startsWith('"')&&G.endsWith('"'))&&(G=G.substring(1,G.length-1)),i.push({type:"api_route",name:G,direction:"produce",line:_+1,snippet:R,method:Z,url:G})}let B=R.match(c);if(B){let Z=B[1]||B[2],G={name:Z,kind:"ImportSpecifier",classification:"Dependency",signature:`import ${Z}`,line:_+1,endLine:_+1,doc:"",capabilities:JSON.stringify({type:"import",module:Z})};b.push(G),r.push(G),s=[];continue}s=[],j.node&&(j.node.endLine=_+1)}return{nodes:b,events:i}}};var ag=[{extension:[".php"],rules:[]},{extension:[".py"],rules:[]},{extension:[".go"],rules:[{regex:/func\s+([a-zA-Z0-9_]+)\(/g,onMatch:t=>({name:t[1],kind:"FunctionDeclaration",classification:"Function",signature:t[0]})},{regex:/func\s+\([^\)]+\)\s+([a-zA-Z0-9_]+)\(/g,onMatch:t=>({name:t[1],kind:"MethodDeclaration",classification:"Method",signature:t[0]})},{regex:/import\s+['"]([^'"]+)['"]/g,onMatch:t=>({name:t[1],kind:"ImportSpecifier",classification:"Dependency",signature:t[0],meta:{type:"import",path:t[1]}})}]},{extension:[".rs"],rules:[{regex:/fn\s+([a-zA-Z0-9_]+)\s*\(/g,onMatch:t=>({name:t[1],kind:"FunctionDeclaration",classification:"Function",signature:t[0]})},{regex:/struct\s+([a-zA-Z0-9_]+)/g,onMatch:t=>({name:t[1],kind:"StructDeclaration",classification:"Class",signature:t[0]})},{regex:/enum\s+([a-zA-Z0-9_]+)/g,onMatch:t=>({name:t[1],kind:"EnumDeclaration",classification:"Class",signature:t[0]})},{regex:/trait\s+([a-zA-Z0-9_]+)/g,onMatch:t=>({name:t[1],kind:"TraitDeclaration",classification:"Class",signature:t[0]})},{regex:/use\s+([a-zA-Z0-9_:]+(?:\s+as\s+[a-zA-Z0-9_]+)?);/g,onMatch:t=>({name:t[1].trim(),kind:"ImportDeclaration",classification:"Dependency",signature:t[0],meta:{type:"import",path:t[1].trim()}})}]},{extension:[".ts",".tsx",".js",".jsx",".mjs",".cjs"],rules:[{regex:/(?:export\s+)?(?:async\s+)?function\s+([a-zA-Z0-9_]+)\s*\(/g,onMatch:t=>({name:t[1],kind:"FunctionDeclaration",classification:"Function"})},{regex:/(?:export\s+)?class\s+([a-zA-Z0-9_]+)/g,onMatch:t=>({name:t[1],kind:"ClassDeclaration",classification:"Class"})},{regex:/(?:export\s+)?interface\s+([a-zA-Z0-9_]+)/g,onMatch:t=>({name:t[1],kind:"InterfaceDeclaration",classification:"Interface"})},{regex:/(?:export\s+)?const\s+([a-zA-Z0-9_]+)\s*=/g,onMatch:t=>({name:t[1],kind:"VariableDeclaration",classification:"Constant"})},{regex:/import\s+.*\s+from\s+['"]([^'"]+)['"]/g,onMatch:t=>({name:t[1],kind:"ImportDeclaration",classification:"Dependency",meta:{path:t[1]}})}]}];function d$(t,e){let r=[];if(t===".go"&&e.some(i=>i.kind==="TypeDeclaration")&&r.push("Go type"),t===".rs"&&(e.some(i=>i.kind==="TraitDeclaration")&&r.push("Rust trait"),e.some(i=>i.kind==="StructDeclaration")&&r.push("Rust struct"),e.some(i=>i.kind==="EnumDeclaration")&&r.push("Rust enum")),t===".py"){for(let i of e)if(i.capabilities)try{if(JSON.parse(i.capabilities).decoratorNames?.length){r.push("Python decorators");break}}catch{}e.some(i=>i.kind==="AsyncFunctionDeclaration"||i.kind==="AsyncMethodDeclaration")&&r.push("Async")}return r}var ls=class{phpParser=new as;pythonParser=new cs;treeSitterParser=new ss;supports(e){return ag.some(r=>r.extension.includes(e.toLowerCase()))}async parse(e,r){let i=Yp.extname(e).toLowerCase(),n=[],o=[];if(i===".php"||i===".py"||i===".go"||i===".rs"){if(i===".py"){let l=this.pythonParser.parse(r);n=l.nodes,o=l.events}else if(i===".php"){let l=e.toLowerCase().endsWith("api.php"),c=this.phpParser.parse(r,l);n=c.nodes,o=c.events}else try{n=await this.treeSitterParser.parse(e,r)}catch{}if(n.length>0){let l=i===".php"?"Micro IR (PHP/TS) ":i===".py"?"Micro IR (Python/TS) ":i===".go"?"Micro IR (Go/TS) ":"Micro IR (Rust/TS) ",c=n.filter(m=>m.classification!=="Dependency"),u=n.filter(m=>m.classification==="Dependency"),d=d$(i,n),p=Cr({classification:l,capabilities:d,exports:c.map(m=>({name:m.name,kind:m.kind,classification:m.classification})),fileName:Yp.basename(e)});return{exports:c,imports:u.map(m=>({module:m.name,name:m.name,kind:m.kind,classification:m.classification})),events:o,classification:l,summary:p||`${i.substring(1).toUpperCase()} module`,parseStatus:"success"}}}let s=ag.find(l=>l.extension.includes(i));if(!s)return{exports:[],imports:[],classification:"Unknown",summary:"",parseStatus:"failed",parseError:`Unsupported file extension: ${i}`};for(let l of s.rules){l.regex.lastIndex=0;let c;for(;(c=l.regex.exec(r))!==null;){let u=l.onMatch(c),d=r.substring(0,c.index).split(`
491
- `).length;n.push({name:u.name||"anonymous",kind:u.kind||"Unknown",classification:u.classification||"Other",signature:u.signature||c[0],line:d,endLine:d,doc:"",capabilities:JSON.stringify(u.meta||{})})}}let a=Cr({classification:`Micro IR (${i.substring(1).toUpperCase()})`,capabilities:[],exports:n.map(l=>({name:l.name,kind:l.kind,classification:l.classification})),fileName:Yp.basename(e)});return{exports:n,imports:[],classification:`Micro IR (${i.substring(1).toUpperCase()})`,summary:a||"Module",parseStatus:n.length>0?"success":"partial"}}};F();var Qp=new ls;async function jr(t){let e=cg.extname(t);if(Qp.supports(e)&&e!==".ts"&&e!==".tsx")try{let o=Xp.readFileSync(t,"utf-8");return await Qp.parse(t,o)}catch(o){return $.error({filePath:t,error:o.message},"HeuristicParser failed"),{exports:[],imports:[],classification:"Unknown",summary:"",parseStatus:"failed",parseError:o.message}}let r;try{r=Xp.readFileSync(t)}catch(o){return{exports:[],imports:[],classification:"Error",summary:"",parseStatus:"failed",parseError:`File read error: ${o.message}`}}let i=r.toString("utf8"),n=Vh(i);try{let o=t.endsWith(".tsx"),s=m$.parseSync(i,{syntax:"typescript",tsx:o,decorators:!0,comments:!0}),a=s.span.start,l=Kh(i),c=_=>qh(_,a,r),u=Xh(s.body),d=tg(s.body);d.length>0&&$.debug({filePath:t,count:d.length},"Extracted type references"),d.forEach(_=>{u.push({module:"__type_reference__",name:_})});let p=Qh(s.body,a,r,i,n,l,t,c),m=eg(s.body,a,r,n,c),f=os(t,"","Module"),y=l.length>0&&l[0].start===0?l[0].text:p.find(_=>_.doc)?.doc||"",b=Yh(y);if(!b&&p.length>0){let _=Lr(i);b=Cr({classification:f,capabilities:_,exports:p.map(g=>({name:g.name,kind:g.kind,classification:g.classification})),fileName:cg.basename(t)})}return{exports:p,imports:u,events:m,classification:f,summary:b,parseStatus:"success"}}catch(o){$.warn({filePath:t,error:o.message},"SWC parsing failed, using heuristic fallback");try{let s=Xp.readFileSync(t,"utf-8"),a=await Qp.parse(t,s);return{...a,classification:a.classification+" (Degraded)",parseStatus:"partial",parseError:`SWC failed, used heuristic fallback: ${o.message}`}}catch(s){return $.error({filePath:t,error:s.message},"All parsing strategies failed"),{exports:[],imports:[],classification:"Error",summary:"",parseStatus:"failed",parseError:`All parsing strategies failed: ${s.message}`}}}}import us from"path";var f$=50;function Mr(t,e,r,i){let n={name:us.basename(e)||e,type:"directory",path:e,children:[]};return t.forEach(o=>{let a=us.relative(e,o.path).split(us.sep),l=n;for(let c=0;c<a.length;c++){let u=a[c];if(i!==void 0&&c>=i)return;let d=c===a.length-1;if(i===1&&c===0&&d)return;let p=i!==void 0&&c===i-1&&!d,m=us.join(e,...a.slice(0,c+1)),f=l.children?.find(y=>y.name===u);if(!f){if(l.children&&l.children.length>=f$){l.children.find(_=>_.type==="truncated")||l.children.push({name:"... (truncated) ",type:"truncated",path:"",children:void 0});return}f={name:u,type:d?"file":"directory",path:m,children:d||p?void 0:[],summary:d?{classification:o.classification,summaryText:o.summary,exports:o.exports,imports:o.imports,chunks:o.chunks}:void 0},f.summary&&(r==="structure"||r==="signatures")&&(delete f.summary.chunks,delete f.summary.imports),l.children?.push(f)}l=f}}),n}F();import zg from"p-limit";var ed=class{startTime=Date.now();indexRuns=0;indexCacheHits=0;lastIndexDurationMs=null;lastIndexCompletedAt=null;lastRunPhases=[];queryCount=0;lastQueryLatencyMs=null;recentLatencySumMs=0;recentLatencyCount=0;recentLatencies=[];searchHistoryFailureCount=0;recordIndexStart(){this.indexRuns+=1}recordIndexCacheHit(){this.indexCacheHits+=1}recordIndexEnd(e){this.lastIndexDurationMs=e,this.lastIndexCompletedAt=Date.now()}recordIndexPhase(e,r){this.lastRunPhases.push({phase:e,durationMs:r})}clearIndexPhases(){this.lastRunPhases=[]}recordQueryStart(){let e=performance.now();return()=>{this.queryCount+=1;let r=performance.now()-e;if(this.lastQueryLatencyMs=r,this.recentLatencies.push(r),this.recentLatencies.length>100){let i=this.recentLatencies.shift();this.recentLatencySumMs=this.recentLatencySumMs-i+r}else this.recentLatencySumMs+=r,this.recentLatencyCount=this.recentLatencies.length}}recordSearchHistoryFailure(){this.searchHistoryFailureCount+=1}getSnapshot(){let e=this.recentLatencies.length,r=e>0?this.recentLatencies.reduce((i,n)=>i+n,0)/e:null;return{index:{runs:this.indexRuns,cacheHits:this.indexCacheHits,lastDurationMs:this.lastIndexDurationMs,lastCompletedAt:this.lastIndexCompletedAt,lastRunPhases:[...this.lastRunPhases]},query:{count:this.queryCount,lastLatencyMs:this.lastQueryLatencyMs,recentLatencySumMs:this.recentLatencySumMs,recentLatencyCount:e,avgLatencyMs:r,searchHistoryFailures:this.searchHistoryFailureCount},uptimeMs:Date.now()-this.startTime}}reset(){this.indexRuns=0,this.indexCacheHits=0,this.lastIndexDurationMs=null,this.lastIndexCompletedAt=null,this.lastRunPhases=[],this.queryCount=0,this.lastQueryLatencyMs=null,this.recentLatencySumMs=0,this.recentLatencyCount=0,this.recentLatencies=[],this.searchHistoryFailureCount=0}},Nt=new ed;function lg(){Nt.recordIndexStart()}function td(){Nt.recordIndexCacheHit()}function ug(t){Nt.recordIndexEnd(t)}function ps(t,e){Nt.recordIndexPhase(t,e)}function pg(){Nt.clearIndexPhases()}function An(){return Nt.recordQueryStart()}function mt(){Nt.recordSearchHistoryFailure()}function ds(){return Nt.getSnapshot()}Pt();import U$ from"path";import ud from"fs";import F$ from"os";import Je from"path";import jn from"fs";import{loadConfig as y$,createMatchPath as v$}from"tsconfig-paths";import zt from"path";import Ur from"fs";var Dt=class extends Error{constructor(r,i,n){super(i);this.code=r;this.cause=n;this.name="FileSystemError"}};function dg(t){let e;try{e=Ur.statSync(t).isDirectory()?t:zt.dirname(t)}catch(r){throw r.code==="ENOENT"?new Dt("FILE_NOT_FOUND",`Start path does not exist: ${t}`,r):r.code==="EACCES"||r.code==="EPERM"?new Dt("PERMISSION_DENIED",`Permission denied accessing: ${t}`,r):new Dt("UNKNOWN",`Failed to access path: ${t}`,r)}for(;e!==zt.dirname(e);){let r=zt.join(e,"tsconfig.json");if(Ur.existsSync(r))return e;e=zt.dirname(e)}return null}function mg(t){let e;try{e=Ur.statSync(t).isDirectory()?t:zt.dirname(t)}catch(r){throw r.code==="ENOENT"?new Dt("FILE_NOT_FOUND",`Start path does not exist: ${t}`,r):r.code==="EACCES"||r.code==="EPERM"?new Dt("PERMISSION_DENIED",`Permission denied accessing: ${t}`,r):new Dt("UNKNOWN",`Failed to access path: ${t}`,r)}for(;e!==zt.dirname(e);){let r=zt.join(e,"package.json");if(Ur.existsSync(r))try{if(JSON.parse(Ur.readFileSync(r,"utf8")).workspaces)return e}catch{}e=zt.dirname(e)}return null}import Ln from"path";import Xt from"fs";function fg(t,e){let r=new Map,i=e.workspaces||[];for(let n of i){let o=n.replace("/*",""),s=Ln.join(t,o);if(!Xt.existsSync(s))continue;let a=Xt.readdirSync(s);for(let l of a){let c=Ln.join(s,l,"package.json");if(Xt.existsSync(c))try{let u=JSON.parse(Xt.readFileSync(c,"utf8"));u.name&&r.set(u.name,{name:u.name,path:Ln.dirname(c),main:u.main||"dist/index.js"})}catch{}}}return r}function hg(t){let e=new Map;try{let r=JSON.parse(Xt.readFileSync(t,"utf8")),i={...r.dependencies,...r.devDependencies};for(let[n,o]of Object.entries(i))if(typeof o=="string"&&o.startsWith("file:")){let s=o.substring(5),a=Ln.dirname(t),l=Ln.resolve(a,s),c=Ln.join(l,"package.json");if(Xt.existsSync(c))try{let u=JSON.parse(Xt.readFileSync(c,"utf8"));e.set(n,{name:n,path:l,main:u.main||"dist/index.js"})}catch{}}}catch{}return e}import gg from"path";import Be from"fs";var h$=[".ts",".tsx",".d.ts",".js",".jsx"];function Me(t){let e=gg.extname(t);if(e===".js"||e===".jsx"){let r=t.slice(0,-e.length),i=e===".jsx"?[".tsx",".ts"]:[".ts",".tsx"];for(let n of i){let o=r+n;if(Be.existsSync(o)&&Be.statSync(o).isFile())return o}if(Be.existsSync(t)&&Be.statSync(t).isFile())return t}if(Be.existsSync(t)&&Be.statSync(t).isFile())return t;for(let r of h$){let i=t+r;if(Be.existsSync(i)&&Be.statSync(i).isFile())return i}if(Be.existsSync(t)&&Be.statSync(t).isDirectory())for(let r of[".ts",".tsx",".js",".jsx"]){let i=gg.join(t,"index"+r);if(Be.existsSync(i))return i}return""}import Cn from"path";import g$ from"fs";function nd(t,e,r){if(t.startsWith(".")){let n=Cn.dirname(e),o=Cn.resolve(n,t),s=Me(o);return s?{resolved:!0,resolvedPath:s}:{resolved:!1,error:`File not found at relative path: ${o}`,suggestion:"Check if the file exists and has a supported extension (.ts, .tsx, .js, .jsx)"}}let i=Fr(e);if(i){if(i.matchPath){let o=i.matchPath(t);if(o){let s=Me(o);return s?{resolved:!0,resolvedPath:s}:{resolved:!1,error:`Path alias matched to '${o}' but file does not exist`,suggestion:"Check if the target file exists or if the alias mapping in tsconfig.json is correct"}}}if(!t.startsWith("@")){let o=Cn.resolve(i.baseUrl,t),s=Me(o);if(s)return{resolved:!0,resolvedPath:s}}let n=i.workspacePackages.get(t);if(n){let o=Cn.join(n.path,"src/index.ts");if(g$.existsSync(o))return{resolved:!0,resolvedPath:o};let s=Cn.join(n.path,n.main),a=Me(s);return a?{resolved:!0,resolvedPath:a}:{resolved:!1,error:`Workspace package '${t}' found at ${n.path} but entry point not found`,suggestion:`Check main field in ${Cn.join(n.path,"package.json")}`}}}else return{resolved:!1,error:"No tsconfig.json found",suggestion:"Ensure a tsconfig.json exists in the project root or parent directories"};return t.startsWith("@")?{resolved:!1,error:`Path alias '${t}' not found in tsconfig.json paths`,suggestion:'Check tsconfig.json "paths" configuration'}:{resolved:!1,error:"Module not found (treated as external) ",suggestion:"Install dependency or check import path"}}var ms=new Map;function Fr(t){let e=dg(t);if(!e)return null;if(ms.has(e))return ms.get(e)||null;let r=y$(e);if(r.resultType==="failed")return ms.set(e,null),null;let i=r,n=i.absoluteBaseUrl;!n&&i.paths&&Object.keys(i.paths).length>0&&(n=i.configFileAbsolutePath?Je.dirname(i.configFileAbsolutePath):e);let o=v$(n,i.paths,i.mainFields,i.addMatchAll),s=mg(e),a=new Map;if(s){let d=Je.join(s,"package.json");if(jn.existsSync(d))try{let p=JSON.parse(jn.readFileSync(d,"utf8"));a=fg(s,p)}catch{}}let l=Je.join(e,"package.json");jn.existsSync(l)&&hg(l).forEach((p,m)=>a.set(m,p));let c={baseUrl:n||"",paths:i.paths,matchPath:o,workspacePackages:a,imports:new Map},u=Je.join(e,"package.json");if(jn.existsSync(u))try{let d=JSON.parse(jn.readFileSync(u,"utf8"));if(d.imports){for(let[p,m]of Object.entries(d.imports))if(typeof m=="string"||typeof m=="object"&&m!==null){let f=m;Array.isArray(m)&&(f=m[0]),typeof f=="object"&&(f=f.default||f.node),typeof f=="string"&&c.imports.set(p,f)}}}catch{}return ms.set(e,c),c}function Zr(t,e,r){if(!t)return"";if(t.includes(".")&&!t.startsWith(".")&&!t.startsWith("/")&&!t.endsWith(".js")&&!t.endsWith(".ts")&&!t.endsWith(".json")){let n=t.split(".")[0];if(n&&n!==t){let o=Zr(n,e,r);if(o)return o}}if(t.startsWith(".")){let n=Je.dirname(e),o=Je.resolve(n,t);return Me(o)}let i=Fr(e);if(i){let n=i.matchPath(t);if(n)return Me(n);if(!t.startsWith("@")||t.startsWith("@/")){let s=Je.resolve(i.baseUrl,t),a=Me(s);if(a)return a}for(let[s,a]of i.imports.entries())if(s.includes("*")){let l="^"+s.replace(/[\\^$+.()|[\]{}]/g,"\\$&").replace(/\*/g,"(.*)")+"$",c=new RegExp(l),u=t.match(c);if(u){let d=u[1],p=a.replace("*",d),m=Je.resolve(i.baseUrl,p);return Me(m)}}else if(s===t){let l=Je.resolve(i.baseUrl,a);return Me(l)}let o=i.workspacePackages.get(t);if(o){let s=Je.join(o.path,"src/index.ts");if(jn.existsSync(s))return s;let a=Je.join(o.path,o.main),l=Me(a);if(l)return l}}return""}import _$ from"fs";import b$ from"path";import vg from"js-yaml";function yg(t){let e=b$.basename(t),r=_$.readFileSync(t,"utf8"),i=[];if(e.endsWith(".prisma"))return k$(r,t);if(e.endsWith(".graphql")||e.endsWith(".gql"))return E$(r,t);let n="Configuration";return e==="lerna.json"?I$(r,t):e==="turbo.json"?T$(r,t):e==="pnpm-workspace.yaml"?R$(r,t):(e.includes("Dockerfile")?(n="Infrastructure (Docker) ",x$(r,i)):e.endsWith(".yaml")||e.endsWith(".yml")?(n="Infrastructure (YAML) ",$$(r,i)):e.startsWith(".env")?(n="Configuration (Env) ",S$(r,i)):e==="package.json"&&(n="Project Manifest",w$(r,i)),{configs:i,classification:n})}function x$(t,e){let r=t.split(`
492
- `);for(let i of r){let n=i.trim();if(n.startsWith("FROM "))e.push({key:"base_image",value:n.substring(5).trim(),kind:"Image"});else if(n.startsWith("EXPOSE "))e.push({key:"port",value:n.substring(7).trim(),kind:"Port"});else if(n.startsWith("ENV ")){let o=n.substring(4).trim().split(/\s+|=/);if(o[0]){let s=o[0],a=o.slice(1).join("= ").trim()||"undefined",l="Env";(s.endsWith("_URI")||s.endsWith("_URL")||s.endsWith("_HOST"))&&(l="Service"),e.push({key:s,value:a,kind:l})}}}}function $$(t,e){try{let r=vg.load(t);if(!r||typeof r!="object")return;if(r.services&&typeof r.services=="object")for(let[n,o]of Object.entries(r.services)){if(!o||typeof o!="object")continue;let s=o;if(e.push({key:`service:${n}`,value:n,kind:"Service"}),s.image&&e.push({key:`service:${n}:image`,value:String(s.image),kind:"Image"}),Array.isArray(s.ports)&&s.ports.forEach(a=>{e.push({key:`service:${n}:port`,value:String(a),kind:"Port"})}),s.environment){if(Array.isArray(s.environment))s.environment.forEach(a=>{let[l,...c]=a.split("= ");l&&c.length>0&&e.push({key:`service:${n}:env:${l}`,value:c.join("= "),kind:"Env"})});else if(typeof s.environment=="object")for(let[a,l]of Object.entries(s.environment))e.push({key:`service:${n}:env:${a}`,value:String(l),kind:"Env"})}if(Array.isArray(s.depends_on))s.depends_on.forEach(a=>{e.push({key:`service:${n}:depends_on`,value:a,kind:"Dependency"})});else if(s.depends_on&&typeof s.depends_on=="object")for(let a of Object.keys(s.depends_on))e.push({key:`service:${n}:depends_on`,value:a,kind:"Dependency"})}let i=(n,o="")=>{if(!(!n||typeof n!="object"||Array.isArray(n)))for(let[s,a]of Object.entries(n)){let l=o?`${o}.${s}`:s;if(r.services&&(l.startsWith("services.")||l==="services")){a&&typeof a=="object"&&!Array.isArray(a)&&i(a,l);continue}if(a&&typeof a=="object"&&!Array.isArray(a))i(a,l);else{let c=String(a),u="Env";s.toLowerCase().includes("image")&&(u="Image"),s.toLowerCase().includes("port")&&(u="Port"),s.toLowerCase().includes("service")&&(u="Service"),(s.endsWith("_URI")||s.endsWith("_URL")||s.endsWith("_HOST"))&&(u="Service"),e.push({key:l,value:c.length>100?c.substring(0,97)+"...":c,kind:u})}}};i(r)}catch{let i=t.match(/^\s{2}([a-z0-9_-]+):/gm);i&&i.forEach(n=>{let o=n.trim().replace(" : ","");o!=="services"&&o!=="version"&&o!=="volumes"&&o!=="networks"&&e.push({key:"service",value:o,kind:"Service"})})}}function S$(t,e){let r=t.split(`
493
- `);for(let i of r){let n=i.trim();if(n&&!n.startsWith("#")){let o=n.split("=");if(o[0]){let s=o[0].trim(),a=o.slice(1).join("=");a=a.trim().replace(/^['"](.*)['"]$/,"$1");let l="Env";(s.endsWith("_URI")||s.endsWith("_URL")||s.endsWith("_HOST"))&&(l="Service"),e.push({key:s,value:a,kind:l})}}}}function k$(t,e){let r=[],i="Contract (Prisma) ",n=/^model\s+(\w+)/gm,o;for(;(o=n.exec(t))!==null;)r.push({key:"model",value:o[1],kind:"Database Model"});let s=/^enum\s+(\w+)/gm;for(;(o=s.exec(t))!==null;)r.push({key:"enum",value:o[1],kind:"Database Enum"});let a=/provider\s*=\s*"([^"]+)"/,l=t.match(a);return l&&r.push({key:"datasource_provider",value:l[1],kind:"Database Config"}),{classification:i,configs:r}}function E$(t,e){let r=[],i="Contract (GraphQL) ",n=/^(?:type|input|interface|enum)\s+(\w+)/gm,o;for(;(o=n.exec(t))!==null;){let s=o[0],a="GraphQL Type";s.startsWith("input")&&(a="GraphQL Input"),s.startsWith("interface")&&(a="GraphQL Interface"),s.startsWith("enum")&&(a="GraphQL Enum"),r.push({key:"type_definition",value:o[1],kind:a})}return{classification:i,configs:r}}function w$(t,e){try{let r=JSON.parse(t);if(r.name&&e.push({key:"name",value:r.name,kind:"Service"}),r.description&&e.push({key:"description",value:r.description,kind:"Service"}),r.workspaces){let o=Array.isArray(r.workspaces)?r.workspaces.join("",""):JSON.stringify(r.workspaces);e.push({key:"workspaces",value:o,kind:"Env"})}if(r.scripts){let o=["start","dev","build","test","docker"];for(let s of Object.keys(r.scripts))o.some(a=>s.includes(a))&&e.push({key:`script:${s}`,value:r.scripts[s],kind:"Env"})}let i={...r.dependencies,...r.devDependencies},n=["react","vue","svelte","angular","next","nuxt","express","fastify","nestjs","remix","vite","webpack","tailwindcss","database"];for(let o of Object.keys(i))if(n.some(s=>o.includes(s))){let s=i[o].replace(/[\^~]/,"");e.push({key:`dep:${o}`,value:s,kind:"Service"})}}catch{}}function I$(t,e){let r=[],i="Monorepo (Lerna) ";try{let n=JSON.parse(t);r.push({key:"monorepo_type",value:"lerna",kind:"Monorepo"}),n.version&&r.push({key:"lerna_version",value:n.version,kind:"Monorepo"}),n.packages&&(Array.isArray(n.packages)?n.packages:[n.packages]).forEach(s=>{r.push({key:"package_glob",value:s,kind:"Monorepo"})}),n.npmClient&&r.push({key:"npm_client",value:n.npmClient,kind:"Monorepo"})}catch{}return{configs:r,classification:i}}function T$(t,e){let r=[],i="Monorepo (Turborepo) ";try{let n=JSON.parse(t);if(r.push({key:"monorepo_type",value:"turborepo",kind:"Monorepo"}),n.pipeline)for(let o of Object.keys(n.pipeline)){r.push({key:`pipeline:${o}`,value:o,kind:"Monorepo"});let s=n.pipeline[o];s.dependsOn&&r.push({key:`pipeline:${o}:depends_on`,value:s.dependsOn.join("",""),kind:"Dependency"})}if(n.tasks)for(let o of Object.keys(n.tasks))r.push({key:`task:${o}`,value:o,kind:"Monorepo"})}catch{}return{configs:r,classification:i}}function R$(t,e){let r=[],i="Monorepo (pnpm) ";try{let n=vg.load(t);r.push({key:"monorepo_type",value:"pnpm",kind:"Monorepo"}),n&&n.packages&&(Array.isArray(n.packages)?n.packages:[n.packages]).forEach(s=>{r.push({key:"package_glob",value:s,kind:"Monorepo"})})}catch{}return{configs:r,classification:i}}F();import _g from"fs";import P$ from"path";import bg from"js-yaml";var xg={ignore:[],include:[],maxDepth:10},N$=[{name:".liquid-shadow.yaml",parse:t=>bg.load(t)??{}},{name:".liquid-shadow.yml",parse:t=>bg.load(t)??{}},{name:".ls.json",parse:t=>JSON.parse(t)},{name:".liquid-shadow.json",parse:t=>JSON.parse(t)},{name:".ls.rc",parse:t=>JSON.parse(t)},{name:".liquid-shadow.rc",parse:t=>JSON.parse(t)}];function fs(t){for(let{name:e,parse:r}of N$){let i=P$.join(t,e);if(_g.existsSync(i))try{let n=_g.readFileSync(i,"utf8"),o=r(n);return $.info({repoPath:t,configFile:e},"Loaded repository configuration"),{...xg,...o}}catch(n){$.error({repoPath:t,file:e,err:n},"Failed to parse configuration file")}}return xg}X();F();F();import{Worker as z$}from"node:worker_threads";import{cpus as D$}from"node:os";import{fileURLToPath as O$}from"node:url";import{dirname as A$,join as $g}from"node:path";import{existsSync as Sg}from"node:fs";var Eg=O$(import.meta.url),kg=A$(Eg);function L$(){if(Eg.endsWith(".ts")){let e=$g(kg,"worker.ts");if(Sg(e))return e}let t=$g(kg,"worker.js");return Sg(t)?t:On("dist/logic/domain/embeddings/worker.js")}var Hr=class{workers=[];taskQueue=[];pendingTasks=new Map;taskIdCounter=0;initialized=!1;initPromise;shutdownRequested=!1;numWorkers;cacheDir;initTimeout;constructor(e={}){this.numWorkers=e.numWorkers??Math.max(1,D$().length-1),this.cacheDir=e.cacheDir??"./.cache",this.initTimeout=e.initTimeout??6e4}async initialize(){if(!this.initialized)return this.initPromise?this.initPromise:(this.initPromise=this._doInitialize(),this.initPromise)}async _doInitialize(){let e;try{$.info({numWorkers:this.numWorkers},"Initializing embedding worker pool");let r=new Promise((i,n)=>{e=setTimeout(()=>n(new Error(`Worker pool initialization timed out after ${this.initTimeout}ms`)),this.initTimeout)});if(await Promise.race([this._initializeWorkers(),r]),e&&clearTimeout(e),this.shutdownRequested){this.initialized=!1,this.initPromise=void 0,$.debug("Initialization completed but shutdown was requested");return}this.initialized=!0,$.info({numWorkers:this.workers.length},"Embedding worker pool ready")}catch(r){throw e&&clearTimeout(e),this.initPromise=void 0,this.initialized=!1,await this.shutdown(),r}}async _initializeWorkers(){let e=L$();$.debug({workerPath:e},"Resolved worker path");for(let r=0;r<this.numWorkers;r++)await this.createWorker(e,r),await new Promise(i=>setTimeout(i,50))}async createWorker(e,r){return new Promise((i,n)=>{let o=setTimeout(()=>{n(new Error(`Worker ${r} initialization timed out`))},this.initTimeout),s=new z$(e,{workerData:{cacheDir:this.cacheDir},execArgv:process.execArgv}),a={worker:s,busy:!1,currentTaskId:null};s.on("message",l=>{if(l.type==="ready"){if(clearTimeout(o),this.shutdownRequested){$.debug({workerIndex:r},"Worker ready but shutdown requested, terminating"),s.terminate().catch(()=>{}),i();return}this.workers.push(a),$.debug({workerIndex:r},"Worker ready"),i()}else l.type==="result"&&l.id?this.handleTaskComplete(a,l.id,l.embeddings||[]):l.type==="error"&&l.id&&this.handleTaskError(a,l.id,new Error(l.error||"Unknown error"))}),s.on("error",l=>{if(clearTimeout(o),$.error({err:l,workerIndex:r},"Worker error"),a.currentTaskId&&this.handleTaskError(a,a.currentTaskId,l),!this.initialized){n(l);return}let c=this.workers.indexOf(a);c!==-1&&this.workers.splice(c,1),!this.shutdownRequested&&this.initialized&&this.createWorker(e,r).catch(u=>{$.error({err:u},"Failed to replace crashed worker")})}),s.on("exit",l=>{l!==0&&!this.shutdownRequested&&$.warn({workerIndex:r,code:l},"Worker exited unexpectedly")})})}handleTaskComplete(e,r,i){let n=this.pendingTasks.get(r);n&&(this.pendingTasks.delete(r),n.resolve(i)),e.busy=!1,e.currentTaskId=null,this.processQueue()}handleTaskError(e,r,i){let n=this.pendingTasks.get(r);n&&(this.pendingTasks.delete(r),n.reject(i)),e.busy=!1,e.currentTaskId=null,this.processQueue()}processQueue(){if(this.taskQueue.length===0)return;let e=this.workers.find(i=>!i.busy);if(!e)return;let r=this.taskQueue.shift();r&&(e.busy=!0,e.currentTaskId=r.id,this.pendingTasks.set(r.id,r),e.worker.postMessage({type:"embed",id:r.id,texts:r.texts}))}async generateEmbeddings(e,r=32,i){if(this.initialized||await this.initialize(),e.length===0)return[];let n=[];for(let c=0;c<e.length;c+=r)n.push(e.slice(c,c+r));let o=new Array(n.length),s=0,a=n.map((c,u)=>new Promise((d,p)=>{let f={id:`task_${++this.taskIdCounter}`,texts:c,resolve:y=>{if(o[u]=y,s++,i){let b=Math.min(s*r,e.length);i(b,e.length)}d()},reject:y=>{if(o[u]=new Array(c.length).fill(null),s++,$.warn({err:y,chunkIndex:u},"Chunk embedding failed"),i){let b=Math.min(s*r,e.length);i(b,e.length)}d()}};this.taskQueue.push(f),this.processQueue()}));await Promise.all(a);let l=[];for(let c of o)l.push(...c);return $.info({total:e.length,successful:l.filter(c=>c!==null).length,workers:this.workers.length},"Parallel embedding generation complete"),l}get workerCount(){return this.workers.length}get busyWorkers(){return this.workers.filter(e=>e.busy).length}get queueSize(){return this.taskQueue.length}get isInitialized(){return this.initialized}async shutdown(){if(this.shutdownRequested=!0,this.initPromise)try{await this.initPromise}catch{}if(!this.initialized&&this.workers.length===0){this.shutdownRequested=!1,this.initPromise=void 0;return}$.info({numWorkers:this.workers.length},"Shutting down embedding worker pool");let e=this.workers.map(r=>new Promise(i=>{r.worker.postMessage({type:"shutdown"}),r.worker.once("exit",()=>i()),setTimeout(()=>{r.worker.terminate().then(()=>i())},5e3)}));await Promise.all(e),this.workers=[],this.taskQueue=[],this.pendingTasks.clear(),this.initialized=!1,this.shutdownRequested=!1,$.info("Embedding worker pool shutdown complete")}},Mn=null;function rd(t){return Mn||(Mn=new Hr(t)),Mn}async function Un(){Mn&&(await Mn.shutdown(),Mn=null)}var Wr=null;async function C$(){return Wr||(Wr=await import("@xenova/transformers"),Wr.env.cacheDir="./.cache",Wr.env.allowLocalModels=!1),Wr}var j$=128,wg=!1;function Fn(t){wg=t,$.info({useWorkerThreads:t},"Worker thread mode updated")}var id=null;async function Ig(){return id||(id=(async()=>{$.info("Loading embedding model (all-MiniLM-L6-v2)...");let{pipeline:t}=await C$();return await t("feature-extraction","Xenova/all-MiniLM-L6-v2")})()),id}async function od(t){try{let r=await(await Ig())(t,{pooling:"mean",normalize:!0});return Array.from(r.data)}catch(e){return $.error({err:e},"Failed to generate embedding"),null}}async function sd(t,e=j$,r){return t.length===0?[]:wg?rd().generateEmbeddings(t,e,r):M$(t,e,r)}async function M$(t,e,r){let i=new Array(t.length).fill(null),n=await Ig();for(let o=0;o<t.length;o+=e){let s=Math.min(o+e,t.length),a=t.slice(o,s);try{let l=await n(a,{pooling:"mean",normalize:!0}),[c,u]=l.dims;for(let d=0;d<c;d++){let p=d*u,m=p+u;i[o+d]=Array.from(l.data.slice(p,m))}}catch(l){$.error({err:l,batchStart:o,batchEnd:s},"Single-threaded batch embedding failed, falling back to sequential for this chunk");for(let c=0;c<a.length;c++)try{let u=a[c];if(!u||u.trim().length===0)continue;let d=await n(u,{pooling:"mean",normalize:!0});i[o+c]=Array.from(d.data)}catch{i[o+c]=null}}r&&r(s,t.length)}return $.debug({total:t.length,successful:i.filter(o=>o!==null).length},"Batch embedding complete"),i}function ad(t,e){let r=0,i=0,n=0;for(let o=0;o<t.length;o++)r+=t[o]*e[o],i+=t[o]*t[o],n+=e[o]*e[o];return r/(Math.sqrt(i)*Math.sqrt(n))}import{execSync as Qt}from"child_process";import cd from"path";import ld from"fs";function be(t){try{if(!ld.existsSync(cd.join(t,".git")))return null;let e=Qt("git rev-parse --abbrev-ref HEAD",{cwd:t,stdio:["ignore","pipe","ignore"],encoding:"utf8"}).trim();return e==="HEAD"?Qt("git rev-parse --short HEAD",{cwd:t,stdio:["ignore","pipe","ignore"],encoding:"utf8"}).trim():e.replace(/[\/\\:*"<>|?]/g,"-")}catch{return null}}function Ge(t){try{return ld.existsSync(cd.join(t,".git"))?Qt("git rev-parse HEAD",{cwd:t,stdio:["ignore","pipe","ignore"],encoding:"utf8"}).trim():null}catch{return null}}function Tg(t,e=50){try{let r=Qt(`git rev-list --max-count=${e} HEAD`,{cwd:t,stdio:["ignore","pipe","ignore"],encoding:"utf8"}).trim();return r?r.split(`
494
- `):[]}catch{return[]}}function Rg(t,e,r){try{return Qt(`git merge-tree --write-tree ${e} ${r}`,{cwd:t,stdio:["ignore","ignore","ignore"]}),!1}catch{return!0}}function Pg(t,e){try{if(!ld.existsSync(cd.join(t,".git")))return!0;let r=Ge(t);return!r||e&&e!==r&&Qt(`git diff --name-only ${e} ${r}`,{cwd:t,stdio:["ignore","pipe","ignore"],encoding:"utf8"}).trim()?!0:Qt("git status --porcelain",{cwd:t,stdio:["ignore","pipe","ignore"],encoding:"utf8"}).trim().length>0}catch{return!0}}X();F();import{execSync as Ng}from"child_process";var en=$.child({module:"nano-repair"}),Ne=class{intentLogs;exports;missions;repoPath;constructor(e){let{intentLogs:r,exports:i,missions:n}=L.getInstance(e);this.intentLogs=r,this.exports=i,this.missions=n,this.repoPath=e}detectAndRepairShifts(){let e=this.intentLogs.findRepairableOrphans();if(e.length===0)return{repaired:0,failed:0};en.info({count:e.length},"Detected orphaned intent logs. Attempting recovery...");let r=0,i=0;for(let n of e){let o=this.exports.findByNameAndFile(n.symbol_name,n.file_path);if(o.length>0){let a=o.find(l=>l.signature===n.signature)||o[0];this.intentLogs.update(n.id,{symbol_id:a.id}),en.info({logId:n.id,symbol:n.symbol_name},"Relinked symbol in same file"),r++;continue}let s=this.exports.findByNameGlobal(n.symbol_name);if(s.length>0){let a=s.filter(l=>l.file_path!==n.file_path);if(a.length>0){let l=a.find(c=>c.signature===n.signature)||a[0];this.intentLogs.update(n.id,{symbol_id:l.id,file_path:l.file_path}),en.info({logId:n.id,symbol:n.symbol_name,oldPath:n.file_path,newPath:l.file_path},"Detected Nano-Repair Shift (file move)"),r++;continue}}i++}return r>0&&en.info({repaired:r,failed:i},"Nano-Repair recovery complete"),{repaired:r,failed:i}}syncLifecycle(){let e="HEAD";try{e=Ng("git rev-parse --abbrev-ref HEAD",{cwd:this.repoPath,encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).trim()}catch{return{suspended:0,resumed:0,completed:0}}if(!e)return{suspended:0,resumed:0,completed:0};let r=this.missions.findActive(),i=0;for(let s of r)s.git_branch&&s.git_branch!==e&&(this.missions.updateStatus(s.id,"suspended"),en.info({missionId:s.id,branch:s.git_branch,current:e},"Context Pivot: Suspended mission"),i++);this.missions.resumeByBranch(e);let n=[];try{n=Ng(`git branch --merged "${e}"`,{cwd:this.repoPath,encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).split(`
495
- `).map(a=>a.trim().replace(/^\* /,"")).filter(a=>a&&a!==e)}catch{}let o=0;if(n.length>0){let s=this.missions.findMergedMissions(e,n);for(let a of s)this.missions.updateStatus(a.id,"completed"),en.info({missionId:a.id,branch:a.git_branch},"Merge Sentinel: Auto-completed mission"),o++}return(i>0||o>0)&&en.info({suspended:i,completed:o},"Git-Native Lifecycle Sync complete"),{suspended:i,resumed:-1,completed:o}}};var EP=F$.cpus().length||4,Z$=Wo.DEFAULT_CONCURRENCY;async function Q(t,e=Z$,r=!1,i=!0,n){let o=L.getInstance(t),s=o.files.database,a=fs(t),l=a.concurrency??e;if(lg(),!r&&je(t)){let _=qo(t),g=Ge(t);if(_&&!Pg(t,_))return td(),$.debug({repoPath:t,commit:g},"Index is current, skipping re-index (fast-path)"),s}Fr(t);let c=o.files.findAll(),u=new Map(c.map(_=>[_.path,{mtime:_.mtime,hash:_.content_hash}])),d=Date.now();n?.({phase:"scan",current:0,total:0,message:"Scanning repository..."});let p=await Vp(t,a.ignore),m=new Map(p.map(_=>[_.path,_.mtime])),f=c.filter(_=>!m.has(_.path)).map(_=>_.path),y=c.length===0,b=[];if(r||y)b.push(...p);else{let _=p.filter(A=>{let I=u.get(A.path);return!I||I.mtime!==A.mtime}),g=zg(l*4),x=_.map(A=>g(async()=>{let I=u.get(A.path);if(!I||!I.hash)return A;try{let R=await ud.promises.readFile(A.path,"utf8");return Nh(R,I.hash)?A:(o.files.updateMtime(A.path,A.mtime),null)}catch{return null}})),E=await Promise.all(x);b.push(...E.filter(A=>A!==null))}if(f.length===0&&b.length===0){if(td(),y){let _=Ge(t);Jp(t,_||void 0)}return s}if(y?$.info({totalFiles:p.length},"Starting initial repository indexing..."):$.info({toDelete:f.length,toProcess:b.length},"Syncing repository updates..."),f.length>0&&o.files.deletePaths(f),b.length>0){pg(),i?Fn(!0):Fn(!1);let _=zg(l),g=0,x=b.length,E=b.map(j=>_(async()=>{try{let w=U$.basename(j.path);if(/\.(ts|tsx|php|py|go|js|jsx|mjs|cjs)$/.test(w)){let J=await jr(j.path),O=ud.readFileSync(j.path,"utf8");return g++,(g%50===0||g===x)&&$.info({completed:g,total:x},"Parsing files..."),n?.({phase:"parse",current:g,total:x,message:`Parsing ${w}`}),{meta:j,...J,content:O,embedding:null,kind:"code"}}else{let J=yg(j.path),O=ud.readFileSync(j.path,"utf8");return g++,(g%50===0||g===x)&&$.info({completed:g,total:x},"Parsing configs..."),n?.({phase:"parse",current:g,total:x,message:`Parsing config ${w}`}),{meta:j,...J,content:O,embedding:null,kind:"config"}}}catch(w){return g++,$.error({path:j.path,error:w},"Failed to parse file"),{meta:j,exports:[],imports:[],content:"",kind:"error"}}}));$.info({total:x},"Phase 1: Parsing all files...");let A=Date.now(),I=(await Promise.all(E)).filter(Boolean),R=Date.now()-A;if(ps("parse",R),$.info({count:I.length,time:`${(R/1e3).toFixed(1)}s`},"Phase 1 complete"),i){$.info("Phase 2: Generating file semantic embeddings..."),n?.({phase:"embed",current:0,total:I.length,message:"Generating embeddings..."});let j=Date.now(),w=[];if(I.forEach((J,O)=>{"summary"in J&&J.summary&&w.push({fileIdx:O,text:J.summary})}),w.length>0){$.info({count:w.length}," \u2192 Generating file summary embeddings...");let J=w.map(M=>M.text),O=await sd(J,128);w.forEach((M,q)=>{I[M.fileIdx].embedding=O[q]}),$.info({count:w.length}," \u2713 File summaries complete")}let P=Date.now()-j;ps("embed",P),$.info({time:`${(P/1e3).toFixed(1)}s`},"Phase 2 complete")}n?.({phase:"persist",current:0,total:I.length,message:"Saving to database..."});let k=Date.now();o.files.batchSaveIndexResults(I,t,Bp,Zr),ps("persist",Date.now()-k)}if(y||b.length>0){let _=Ge(t);Jp(t,_||void 0)}return(b.length>0||f.length>0)&&new Ne(t).detectAndRepairShifts(),ug(Date.now()-d),n?.({phase:"complete",current:b.length,total:b.length,message:"Indexing complete"}),s}F();import Dg from"path";import H$ from"ignore";import Og from"fs";X();async function pd(t,e=Wo.DEFAULT_CONCURRENCY,r="detailed",i,n){$.info({repo:t,level:r,subPath:i},"Ensuring cache is up-to-date..."),await Q(t,e);let{files:o,exports:s,imports:a}=L.getInstance(t),l=i?o.findInSubPath(t,i):o.findAll(),c=fs(t),u=H$(),d=Dg.join(t,".gitignore");if(Og.existsSync(d)&&u.add(Og.readFileSync(d,"utf8")),c.ignore&&c.ignore.length>0&&u.add(c.ignore),u.add(Ho),l=l.filter(g=>{let x=Dg.relative(t,g.path);return!u.ignores(x)}),$.info({count:l.length},"Fetching data from DB..."),r==="lite"){let g=l.map(x=>({path:x.path,mtime:x.mtime}));return Mr(g,t,r,n)}if(r==="summaries"){let g=l.map(x=>({path:x.path,mtime:x.mtime,classification:x.classification||void 0,summary:x.summary||void 0}));return Mr(g,t,r,n)}let p=l.map(g=>g.path),m=s.findByFiles(p),f=r==="detailed"?a.findByFiles(p):[],y=new Map;for(let g of m){let x=y.get(g.file_path)||[];x.push(g),y.set(g.file_path,x)}let b=new Map;for(let g of f){let x=b.get(g.file_path)||[];x.push(g),b.set(g.file_path,x)}let _=l.map(g=>{let E=(y.get(g.path)||[]).map(I=>({name:I.name,kind:I.kind,signature:I.signature,line:I.start_line}));r==="structure"?E=E.map(I=>({name:I.name,kind:I.kind,line:I.line})):r==="signatures"&&(E=E.map(I=>({name:I.name,kind:I.kind,signature:I.signature,line:I.line})));let A=[];return r==="detailed"&&(A=(b.get(g.path)||[]).map(R=>({module:R.module_specifier,resolved_path:R.resolved_path}))),{path:g.path,mtime:g.mtime,classification:g.classification||void 0,summary:g.summary||void 0,exports:E,imports:A.length>0?A:void 0,chunks:[]}});return $.info({count:_.length},"Building hierarchical project tree..."),Mr(_,t,r,n)}Pt();F();import ze from"fs";import tn from"path";var Zn=$.child({module:"git-hooks"}),hs={"post-merge":`#!/bin/sh
496
- # Liquid Shadow: Auto-refresh index after merge/pull
497
- # Generated by liquid-shadow
498
-
499
- REPO_PATH="$(git rev-parse --show-toplevel)"
500
-
501
- # Run liquid-shadow sync in background to avoid blocking git operations
502
- nohup npx @precisionutilityguild/liquid-shadow sync "$REPO_PATH" > /dev/null 2>&1 &
503
-
504
- exit 0
505
- `,"post-checkout":`#!/bin/sh
506
- # Liquid Shadow: Auto-refresh index after branch checkout
507
- # Generated by liquid-shadow
508
-
509
- # Only run on branch checkouts, not file checkouts
510
- # $3 is 1 for branch checkout, 0 for file checkout
511
- if [ "$3" = "1" ]; then
512
- REPO_PATH="$(git rev-parse --show-toplevel)"
513
-
514
- # Run liquid-shadow sync in background
515
- nohup npx @precisionutilityguild/liquid-shadow sync "$REPO_PATH" > /dev/null 2>&1 &
516
- fi
517
-
518
- exit 0
519
- `,"post-commit":`#!/bin/sh
520
- # Liquid Shadow: Trigger symbol shift detection after commit
521
- # Generated by liquid-shadow
522
-
523
- REPO_PATH="$(git rev-parse --show-toplevel)"
524
-
525
- # Run liquid-shadow sync in background
526
- nohup npx @precisionutilityguild/liquid-shadow sync "$REPO_PATH" > /dev/null 2>&1 &
527
-
528
- exit 0
529
- `};function Ag(t){let{repoPath:e,enableAutoRefresh:r=!0,enableSymbolHealing:i=!0}=t,n=tn.join(e,".git","hooks"),o=[],s=[],a=[];if(!ze.existsSync(tn.join(e,".git")))return a.push("Not a git repository"),{installed:o,skipped:s,errors:a};ze.existsSync(n)||ze.mkdirSync(n,{recursive:!0});let l=[];r&&l.push("post-merge","post-checkout"),i&&l.push("post-commit");for(let c of l){let u=tn.join(n,c),d=hs[c];if(!d){a.push(`No template found for hook: ${c}`);continue}try{if(ze.existsSync(u)){let p=ze.readFileSync(u,"utf-8");if(p.includes("liquid-shadow")||p.includes("mcp-liquid-shadow")){s.push(c),Zn.info({hookName:c},"Hook already installed, skipping");continue}let m=`${u}.backup-${Date.now()}`;ze.copyFileSync(u,m),Zn.info({hookName:c,backupPath:m},"Backed up existing hook")}ze.writeFileSync(u,d,{mode:493}),o.push(c),Zn.info({hookName:c},"Installed git hook")}catch(p){a.push(`Failed to install ${c}: ${p}`),Zn.error({hookName:c,err:p},"Failed to install hook")}}return{installed:o,skipped:s,errors:a}}function Lg(t){let e=tn.join(t,".git","hooks"),r=[],i=[];if(!ze.existsSync(e))return{removed:r,errors:i};let n=Object.keys(hs);for(let o of n){let s=tn.join(e,o);try{if(ze.existsSync(s)){let a=ze.readFileSync(s,"utf-8");(a.includes("liquid-shadow")||a.includes("mcp-liquid-shadow"))&&(ze.unlinkSync(s),r.push(o),Zn.info({hookName:o},"Removed git hook"))}}catch(a){i.push(`Failed to remove ${o}: ${a}`),Zn.error({hookName:o,err:a},"Failed to remove hook")}}return{removed:r,errors:i}}function Hn(t){let e=tn.join(t,".git","hooks"),r=[],i=[];if(!ze.existsSync(e))return{installed:r,notInstalled:Object.keys(hs)};let n=Object.keys(hs);for(let o of n){let s=tn.join(e,o);if(ze.existsSync(s)){let a=ze.readFileSync(s,"utf-8");a.includes("liquid-shadow")||a.includes("mcp-liquid-shadow")?r.push(o):i.push(o)}else i.push(o)}return{installed:r,notInstalled:i}}import ve from"path";import md from"fs";F();import ye from"path";import dd from"fs";var gs=$.child({module:"path-resolver"}),Wn=class{repoPath;constructor(e){this.repoPath=ye.isAbsolute(e)?ye.normalize(e):ye.resolve(process.cwd(),e)}resolve(e){if(!e)return this.repoPath;if(e.includes("\0"))throw gs.error({inputPath:e},"Path contains null bytes - possible attack"),new Error("Invalid path: contains null bytes");let r;if(ye.isAbsolute(e)?r=ye.normalize(e):r=ye.join(this.repoPath,e),r=ye.normalize(r),!this.isWithinRoot(r))throw gs.warn({inputPath:e,resolved:r},"Path traversal attempt blocked"),new Error(`Access denied: path '${e}' is outside the repository root`);return r}resolveAndValidate(e){try{let r=this.resolve(e);return dd.existsSync(r)?r:(gs.debug({inputPath:e,resolved:r},"Path does not exist"),null)}catch(r){return gs.error({inputPath:e,error:r},"Error validating path"),null}}isWithinRoot(e){try{let r=ye.resolve(e),i=ye.resolve(this.repoPath),n=ye.relative(i,r);if(n.startsWith("..")||ye.isAbsolute(n))return!1;if(dd.existsSync(r)){let s=dd.realpathSync(r),a=ye.relative(i,s);if(a.startsWith("..")||ye.isAbsolute(a))return!1}return!0}catch{return!1}}getRelative(e){let r=ye.normalize(e);return ye.relative(this.repoPath,r)}resolveBatch(e){return e.map(r=>this.resolve(r))}static normalize(e){return ye.normalize(e)}static isPathWithinRoot(e,r){let i=ye.resolve(e),n=ye.resolve(r),o=ye.relative(i,n);return o===""||!o.startsWith("..")&&!ye.isAbsolute(o)}};function Cg(t){return new Wn(t)}var W$=/[\x00-\x1f\x7f]/g,B$=/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g;function Bn(t){if(typeof t!="string")throw new Error("Invalid path: expected string");if(t.includes("\0"))throw new Error("Invalid path: null bytes are not allowed");if(t.replace(W$,"").length!==t.length)throw new Error("Invalid path: control characters are not allowed");return t.trim()}function Jn(t,e=4096){if(typeof t!="string")return"";let r=t.replace(B$,"").trim();return r.length>e?r.slice(0,e):r}Pt();var Br=`
456
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of t.seen.entries()){let a=s[1];if(e===s[0]){o(s);continue}if(t.external){let c=t.external.registry.get(s[0])?.id;if(e!==s[0]&&c){o(s);continue}}if(t.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1&&t.reused==="ref"){o(s);continue}}}function Tt(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let a=t.seen.get(s);if(a.ref===null)return;let l=a.def??a.schema,c={...l},u=a.ref;if(a.ref=null,u){i(u);let p=t.seen.get(u),m=p.schema;if(m.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(m)):Object.assign(l,m),Object.assign(l,c),s._zod.parent===u)for(let y in l)y==="$ref"||y==="allOf"||y in c||delete l[y];if(m.$ref)for(let y in l)y==="$ref"||y==="allOf"||y in p.def&&JSON.stringify(l[y])===JSON.stringify(p.def[y])&&delete l[y]}let d=s._zod.parent;if(d&&d!==u){i(d);let p=t.seen.get(d);if(p?.schema.$ref&&(l.$ref=p.schema.$ref,p.def))for(let m in l)m==="$ref"||m==="allOf"||m in p.def&&JSON.stringify(l[m])===JSON.stringify(p.def[m])&&delete l[m]}t.override({zodSchema:s,jsonSchema:l,path:a.path??[]})};for(let s of[...t.seen.entries()].reverse())i(s[0]);let n={};if(t.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let s=t.external.registry.get(e)?.id;if(!s)throw new Error("Schema is missing an `id` property");n.$id=t.external.uri(s)}Object.assign(n,r.def??r.schema);let o=t.external?.defs??{};for(let s of t.seen.entries()){let a=s[1];a.def&&a.defId&&(o[a.defId]=a.def)}t.external||Object.keys(o).length>0&&(t.target==="draft-2020-12"?n.$defs=o:n.definitions=o);try{let s=JSON.parse(JSON.stringify(n));return Object.defineProperty(s,"~standard",{value:{...e["~standard"],jsonSchema:{input:wn(e,"input",t.processors),output:wn(e,"output",t.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function Ee(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let i=t._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return Ee(i.element,r);if(i.type==="set")return Ee(i.valueType,r);if(i.type==="lazy")return Ee(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return Ee(i.innerType,r);if(i.type==="intersection")return Ee(i.left,r)||Ee(i.right,r);if(i.type==="record"||i.type==="map")return Ee(i.keyType,r)||Ee(i.valueType,r);if(i.type==="pipe")return Ee(i.in,r)||Ee(i.out,r);if(i.type==="object"){for(let n in i.shape)if(Ee(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(let n of i.options)if(Ee(n,r))return!0;return!1}if(i.type==="tuple"){for(let n of i.items)if(Ee(n,r))return!0;return!!(i.rest&&Ee(i.rest,r))}return!1}var Bl=(t,e={})=>r=>{let i=wt({...r,processors:e});return te(t,i),It(i,t),Tt(i,t)},wn=(t,e,r={})=>i=>{let{libraryOptions:n,target:o}=i??{},s=wt({...n??{},target:o,io:e,processors:r});return te(t,s),It(s,t),Tt(s,t)};var Ex={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Jl=(t,e,r,i)=>{let n=r;n.type="string";let{minimum:o,maximum:s,format:a,patterns:l,contentEncoding:c}=t._zod.bag;if(typeof o=="number"&&(n.minLength=o),typeof s=="number"&&(n.maxLength=s),a&&(n.format=Ex[a]??a,n.format===""&&delete n.format,a==="time"&&delete n.format),c&&(n.contentEncoding=c),l&&l.size>0){let u=[...l];u.length===1?n.pattern=u[0].source:u.length>1&&(n.allOf=[...u.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Vl=(t,e,r,i)=>{let n=r,{minimum:o,maximum:s,format:a,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=t._zod.bag;typeof a=="string"&&a.includes("int")?n.type="integer":n.type="number",typeof u=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(n.minimum=u,n.exclusiveMinimum=!0):n.exclusiveMinimum=u),typeof o=="number"&&(n.minimum=o,typeof u=="number"&&e.target!=="draft-04"&&(u>=o?delete n.minimum:delete n.exclusiveMinimum)),typeof c=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(n.maximum=c,n.exclusiveMaximum=!0):n.exclusiveMaximum=c),typeof s=="number"&&(n.maximum=s,typeof c=="number"&&e.target!=="draft-04"&&(c<=s?delete n.maximum:delete n.exclusiveMaximum)),typeof l=="number"&&(n.multipleOf=l)},Gl=(t,e,r,i)=>{r.type="boolean"},ql=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Kl=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Yl=(t,e,r,i)=>{e.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Xl=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Ql=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},eu=(t,e,r,i)=>{r.not={}},tu=(t,e,r,i)=>{},nu=(t,e,r,i)=>{},ru=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},iu=(t,e,r,i)=>{let n=t._zod.def,o=rr(n.entries);o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),r.enum=o},ou=(t,e,r,i)=>{let n=t._zod.def,o=[];for(let s of n.values)if(s===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){let s=o[0];r.type=s===null?"null":typeof s,e.target==="draft-04"||e.target==="openapi-3.0"?r.enum=[s]:r.const=s}else o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),o.every(s=>typeof s=="boolean")&&(r.type="boolean"),o.every(s=>s===null)&&(r.type="null"),r.enum=o},su=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},au=(t,e,r,i)=>{let n=r,o=t._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=o.source},cu=(t,e,r,i)=>{let n=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:l}=t._zod.bag;s!==void 0&&(o.minLength=s),a!==void 0&&(o.maxLength=a),l?l.length===1?(o.contentMediaType=l[0],Object.assign(n,o)):(Object.assign(n,o),n.anyOf=l.map(c=>({contentMediaType:c}))):Object.assign(n,o)},lu=(t,e,r,i)=>{r.type="boolean"},uu=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},pu=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},du=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},mu=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},fu=(t,e,r,i)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},hu=(t,e,r,i)=>{let n=r,o=t._zod.def,{minimum:s,maximum:a}=t._zod.bag;typeof s=="number"&&(n.minItems=s),typeof a=="number"&&(n.maxItems=a),n.type="array",n.items=te(o.element,e,{...i,path:[...i.path,"items"]})},gu=(t,e,r,i)=>{let n=r,o=t._zod.def;n.type="object",n.properties={};let s=o.shape;for(let c in s)n.properties[c]=te(s[c],e,{...i,path:[...i.path,"properties",c]});let a=new Set(Object.keys(s)),l=new Set([...a].filter(c=>{let u=o.shape[c]._zod;return e.io==="input"?u.optin===void 0:u.optout===void 0}));l.size>0&&(n.required=Array.from(l)),o.catchall?._zod.def.type==="never"?n.additionalProperties=!1:o.catchall?o.catchall&&(n.additionalProperties=te(o.catchall,e,{...i,path:[...i.path,"additionalProperties"]})):e.io==="output"&&(n.additionalProperties=!1)},ro=(t,e,r,i)=>{let n=t._zod.def,o=n.inclusive===!1,s=n.options.map((a,l)=>te(a,e,{...i,path:[...i.path,o?"oneOf":"anyOf",l]}));o?r.oneOf=s:r.anyOf=s},yu=(t,e,r,i)=>{let n=t._zod.def,o=te(n.left,e,{...i,path:[...i.path,"allOf",0]}),s=te(n.right,e,{...i,path:[...i.path,"allOf",1]}),a=c=>"allOf"in c&&Object.keys(c).length===1,l=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];r.allOf=l},vu=(t,e,r,i)=>{let n=r,o=t._zod.def;n.type="array";let s=e.target==="draft-2020-12"?"prefixItems":"items",a=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",l=o.items.map((p,m)=>te(p,e,{...i,path:[...i.path,s,m]})),c=o.rest?te(o.rest,e,{...i,path:[...i.path,a,...e.target==="openapi-3.0"?[o.items.length]:[]]}):null;e.target==="draft-2020-12"?(n.prefixItems=l,c&&(n.items=c)):e.target==="openapi-3.0"?(n.items={anyOf:l},c&&n.items.anyOf.push(c),n.minItems=l.length,c||(n.maxItems=l.length)):(n.items=l,c&&(n.additionalItems=c));let{minimum:u,maximum:d}=t._zod.bag;typeof u=="number"&&(n.minItems=u),typeof d=="number"&&(n.maxItems=d)},_u=(t,e,r,i)=>{let n=r,o=t._zod.def;n.type="object";let s=o.keyType,l=s._zod.bag?.patterns;if(o.mode==="loose"&&l&&l.size>0){let u=te(o.valueType,e,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(let d of l)n.patternProperties[d.source]=u}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(n.propertyNames=te(o.keyType,e,{...i,path:[...i.path,"propertyNames"]})),n.additionalProperties=te(o.valueType,e,{...i,path:[...i.path,"additionalProperties"]});let c=s._zod.values;if(c){let u=[...c].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(n.required=u)}},bu=(t,e,r,i)=>{let n=t._zod.def,o=te(n.innerType,e,i),s=e.seen.get(t);e.target==="openapi-3.0"?(s.ref=n.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},xu=(t,e,r,i)=>{let n=t._zod.def;te(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType},$u=(t,e,r,i)=>{let n=t._zod.def;te(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},Su=(t,e,r,i)=>{let n=t._zod.def;te(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},ku=(t,e,r,i)=>{let n=t._zod.def;te(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType;let s;try{s=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},Eu=(t,e,r,i)=>{let n=t._zod.def,o=e.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;te(o,e,i);let s=e.seen.get(t);s.ref=o},wu=(t,e,r,i)=>{let n=t._zod.def;te(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType,r.readOnly=!0},Iu=(t,e,r,i)=>{let n=t._zod.def;te(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType},io=(t,e,r,i)=>{let n=t._zod.def;te(n.innerType,e,i);let o=e.seen.get(t);o.ref=n.innerType},Tu=(t,e,r,i)=>{let n=t._zod.innerType;te(n,e,i);let o=e.seen.get(t);o.ref=n},no={string:Jl,number:Vl,boolean:Gl,bigint:ql,symbol:Kl,null:Yl,undefined:Xl,void:Ql,never:eu,any:tu,unknown:nu,date:ru,enum:iu,literal:ou,nan:su,template_literal:au,file:cu,success:lu,custom:uu,function:pu,transform:du,map:mu,set:fu,array:hu,object:gu,union:ro,intersection:yu,tuple:vu,record:_u,nullable:bu,nonoptional:xu,default:$u,prefault:Su,catch:ku,pipe:Eu,readonly:wu,promise:Iu,optional:io,lazy:Tu};function oo(t,e){if("_idmap"in t){let i=t,n=wt({...e,processors:no}),o={};for(let l of i._idmap.entries()){let[c,u]=l;te(u,n)}let s={},a={registry:i,uri:e?.uri,defs:o};n.external=a;for(let l of i._idmap.entries()){let[c,u]=l;It(n,u),s[c]=Tt(n,u)}if(Object.keys(o).length>0){let l=n.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[l]:o}}return{schemas:s}}let r=wt({...e,processors:no});return te(t,r),It(r,t),Tt(r,t)}var so=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let r=e?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=wt({processors:no,target:r,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,r={path:[],schemaPath:[]}){return te(e,this.ctx,r)}emit(e,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),It(this.ctx,e);let i=Tt(this.ctx,e),{"~standard":n,...o}=i;return o}};var rf={};var xr={};Ue(xr,{ZodAny:()=>Xu,ZodArray:()=>np,ZodBase64:()=>To,ZodBase64URL:()=>Ro,ZodBigInt:()=>Dn,ZodBigIntFormat:()=>zo,ZodBoolean:()=>zn,ZodCIDRv4:()=>wo,ZodCIDRv6:()=>Io,ZodCUID:()=>_o,ZodCUID2:()=>bo,ZodCatch:()=>kp,ZodCodec:()=>Uo,ZodCustom:()=>zr,ZodCustomStringFormat:()=>Pn,ZodDate:()=>Ir,ZodDefault:()=>vp,ZodDiscriminatedUnion:()=>ip,ZodE164:()=>Po,ZodEmail:()=>go,ZodEmoji:()=>yo,ZodEnum:()=>Tn,ZodExactOptional:()=>hp,ZodFile:()=>mp,ZodFunction:()=>Dp,ZodGUID:()=>$r,ZodIPv4:()=>ko,ZodIPv6:()=>Eo,ZodIntersection:()=>op,ZodJWT:()=>No,ZodKSUID:()=>So,ZodLazy:()=>Pp,ZodLiteral:()=>dp,ZodMAC:()=>Bu,ZodMap:()=>up,ZodNaN:()=>wp,ZodNanoID:()=>vo,ZodNever:()=>ep,ZodNonOptional:()=>jo,ZodNull:()=>Ku,ZodNullable:()=>yp,ZodNumber:()=>Nn,ZodNumberFormat:()=>qt,ZodObject:()=>Rr,ZodOptional:()=>Co,ZodPipe:()=>Mo,ZodPrefault:()=>bp,ZodPromise:()=>zp,ZodReadonly:()=>Ip,ZodRecord:()=>Nr,ZodSet:()=>pp,ZodString:()=>Rn,ZodStringFormat:()=>re,ZodSuccess:()=>Sp,ZodSymbol:()=>Gu,ZodTemplateLiteral:()=>Rp,ZodTransform:()=>fp,ZodTuple:()=>ap,ZodType:()=>K,ZodULID:()=>xo,ZodURL:()=>wr,ZodUUID:()=>Xe,ZodUndefined:()=>qu,ZodUnion:()=>Pr,ZodUnknown:()=>Qu,ZodVoid:()=>tp,ZodXID:()=>$o,ZodXor:()=>rp,_ZodString:()=>ho,_default:()=>_p,_function:()=>ph,any:()=>Hf,array:()=>Tr,base64:()=>wf,base64url:()=>If,bigint:()=>jf,boolean:()=>Vu,catch:()=>Ep,check:()=>dh,cidrv4:()=>kf,cidrv6:()=>Ef,codec:()=>ch,cuid:()=>gf,cuid2:()=>yf,custom:()=>mh,date:()=>Bf,describe:()=>fh,discriminatedUnion:()=>Yf,e164:()=>Tf,email:()=>sf,emoji:()=>ff,enum:()=>Ao,exactOptional:()=>gp,file:()=>ih,float32:()=>Of,float64:()=>Af,function:()=>ph,guid:()=>af,hash:()=>Df,hex:()=>zf,hostname:()=>Nf,httpUrl:()=>mf,instanceof:()=>gh,int:()=>fo,int32:()=>Lf,int64:()=>Mf,intersection:()=>sp,ipv4:()=>xf,ipv6:()=>Sf,json:()=>vh,jwt:()=>Rf,keyof:()=>Jf,ksuid:()=>bf,lazy:()=>Np,literal:()=>rh,looseObject:()=>qf,looseRecord:()=>Qf,mac:()=>$f,map:()=>eh,meta:()=>hh,nan:()=>ah,nanoid:()=>hf,nativeEnum:()=>nh,never:()=>Do,nonoptional:()=>$p,null:()=>Yu,nullable:()=>kr,nullish:()=>oh,number:()=>Ju,object:()=>Vf,optional:()=>Sr,partialRecord:()=>Xf,pipe:()=>Er,prefault:()=>xp,preprocess:()=>_h,promise:()=>uh,readonly:()=>Tp,record:()=>lp,refine:()=>Op,set:()=>th,strictObject:()=>Gf,string:()=>mo,stringFormat:()=>Pf,stringbool:()=>yh,success:()=>sh,superRefine:()=>Ap,symbol:()=>Ff,templateLiteral:()=>lh,transform:()=>Lo,tuple:()=>cp,uint32:()=>Cf,uint64:()=>Uf,ulid:()=>vf,undefined:()=>Zf,union:()=>Oo,unknown:()=>Gt,url:()=>df,uuid:()=>cf,uuidv4:()=>lf,uuidv6:()=>uf,uuidv7:()=>pf,void:()=>Wf,xid:()=>_f,xor:()=>Kf});var ao={};Ue(ao,{endsWith:()=>vn,gt:()=>Ke,gte:()=>ke,includes:()=>gn,length:()=>Vt,lowercase:()=>fn,lt:()=>qe,lte:()=>De,maxLength:()=>Jt,maxSize:()=>Et,mime:()=>_n,minLength:()=>lt,minSize:()=>Ye,multipleOf:()=>kt,negative:()=>Xi,nonnegative:()=>eo,nonpositive:()=>Qi,normalize:()=>bn,overwrite:()=>Ze,positive:()=>Yi,property:()=>to,regex:()=>mn,size:()=>Bt,slugify:()=>kn,startsWith:()=>yn,toLowerCase:()=>$n,toUpperCase:()=>Sn,trim:()=>xn,uppercase:()=>hn});var In={};Ue(In,{ZodISODate:()=>lo,ZodISODateTime:()=>co,ZodISODuration:()=>po,ZodISOTime:()=>uo,date:()=>Pu,datetime:()=>Ru,duration:()=>zu,time:()=>Nu});var co=v("ZodISODateTime",(t,e)=>{sc.init(t,e),re.init(t,e)});function Ru(t){return ul(co,t)}var lo=v("ZodISODate",(t,e)=>{ac.init(t,e),re.init(t,e)});function Pu(t){return pl(lo,t)}var uo=v("ZodISOTime",(t,e)=>{cc.init(t,e),re.init(t,e)});function Nu(t){return dl(uo,t)}var po=v("ZodISODuration",(t,e)=>{lc.init(t,e),re.init(t,e)});function zu(t){return ml(po,t)}var of=(t,e)=>{cr.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>ur(t,r)},flatten:{value:r=>lr(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,rn,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,rn,2)}},isEmpty:{get(){return t.issues.length===0}}})},Ix=v("ZodError",of),Te=v("ZodError",of,{Parent:Error});var Du=an(Te),Ou=cn(Te),Au=ln(Te),Lu=un(Te),Cu=oi(Te),ju=si(Te),Mu=ai(Te),Uu=ci(Te),Fu=li(Te),Zu=ui(Te),Hu=pi(Te),Wu=di(Te);var K=v("ZodType",(t,e)=>(G.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:wn(t,"input"),output:wn(t,"output")}}),t.toJSONSchema=Bl(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone(z.mergeDefs(e,{checks:[...e.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),t.with=t.check,t.clone=(r,i)=>Se(t,r,i),t.brand=()=>t,t.register=((r,i)=>(r.add(t,i),t)),t.parse=(r,i)=>Du(t,r,i,{callee:t.parse}),t.safeParse=(r,i)=>Au(t,r,i),t.parseAsync=async(r,i)=>Ou(t,r,i,{callee:t.parseAsync}),t.safeParseAsync=async(r,i)=>Lu(t,r,i),t.spa=t.safeParseAsync,t.encode=(r,i)=>Cu(t,r,i),t.decode=(r,i)=>ju(t,r,i),t.encodeAsync=async(r,i)=>Mu(t,r,i),t.decodeAsync=async(r,i)=>Uu(t,r,i),t.safeEncode=(r,i)=>Fu(t,r,i),t.safeDecode=(r,i)=>Zu(t,r,i),t.safeEncodeAsync=async(r,i)=>Hu(t,r,i),t.safeDecodeAsync=async(r,i)=>Wu(t,r,i),t.refine=(r,i)=>t.check(Op(r,i)),t.superRefine=r=>t.check(Ap(r)),t.overwrite=r=>t.check(Ze(r)),t.optional=()=>Sr(t),t.exactOptional=()=>gp(t),t.nullable=()=>kr(t),t.nullish=()=>Sr(kr(t)),t.nonoptional=r=>$p(t,r),t.array=()=>Tr(t),t.or=r=>Oo([t,r]),t.and=r=>sp(t,r),t.transform=r=>Er(t,Lo(r)),t.default=r=>_p(t,r),t.prefault=r=>xp(t,r),t.catch=r=>Ep(t,r),t.pipe=r=>Er(t,r),t.readonly=()=>Tp(t),t.describe=r=>{let i=t.clone();return be.add(i,{description:r}),i},Object.defineProperty(t,"description",{get(){return be.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return be.get(t);let i=t.clone();return be.add(i,r[0]),i},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=r=>r(t),t)),ho=v("_ZodString",(t,e)=>{Wt.init(t,e),K.init(t,e),t._zod.processJSONSchema=(i,n,o)=>Jl(t,i,n,o);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...i)=>t.check(mn(...i)),t.includes=(...i)=>t.check(gn(...i)),t.startsWith=(...i)=>t.check(yn(...i)),t.endsWith=(...i)=>t.check(vn(...i)),t.min=(...i)=>t.check(lt(...i)),t.max=(...i)=>t.check(Jt(...i)),t.length=(...i)=>t.check(Vt(...i)),t.nonempty=(...i)=>t.check(lt(1,...i)),t.lowercase=i=>t.check(fn(i)),t.uppercase=i=>t.check(hn(i)),t.trim=()=>t.check(xn()),t.normalize=(...i)=>t.check(bn(...i)),t.toLowerCase=()=>t.check($n()),t.toUpperCase=()=>t.check(Sn()),t.slugify=()=>t.check(kn())}),Rn=v("ZodString",(t,e)=>{Wt.init(t,e),ho.init(t,e),t.email=r=>t.check(Ni(go,r)),t.url=r=>t.check(br(wr,r)),t.jwt=r=>t.check(Ki(No,r)),t.emoji=r=>t.check(Li(yo,r)),t.guid=r=>t.check(_r($r,r)),t.uuid=r=>t.check(zi(Xe,r)),t.uuidv4=r=>t.check(Di(Xe,r)),t.uuidv6=r=>t.check(Oi(Xe,r)),t.uuidv7=r=>t.check(Ai(Xe,r)),t.nanoid=r=>t.check(Ci(vo,r)),t.guid=r=>t.check(_r($r,r)),t.cuid=r=>t.check(ji(_o,r)),t.cuid2=r=>t.check(Mi(bo,r)),t.ulid=r=>t.check(Ui(xo,r)),t.base64=r=>t.check(Vi(To,r)),t.base64url=r=>t.check(Gi(Ro,r)),t.xid=r=>t.check(Fi($o,r)),t.ksuid=r=>t.check(Zi(So,r)),t.ipv4=r=>t.check(Hi(ko,r)),t.ipv6=r=>t.check(Wi(Eo,r)),t.cidrv4=r=>t.check(Bi(wo,r)),t.cidrv6=r=>t.check(Ji(Io,r)),t.e164=r=>t.check(qi(Po,r)),t.datetime=r=>t.check(Ru(r)),t.date=r=>t.check(Pu(r)),t.time=r=>t.check(Nu(r)),t.duration=r=>t.check(zu(r))});function mo(t){return sl(Rn,t)}var re=v("ZodStringFormat",(t,e)=>{ne.init(t,e),ho.init(t,e)}),go=v("ZodEmail",(t,e)=>{Ya.init(t,e),re.init(t,e)});function sf(t){return Ni(go,t)}var $r=v("ZodGUID",(t,e)=>{qa.init(t,e),re.init(t,e)});function af(t){return _r($r,t)}var Xe=v("ZodUUID",(t,e)=>{Ka.init(t,e),re.init(t,e)});function cf(t){return zi(Xe,t)}function lf(t){return Di(Xe,t)}function uf(t){return Oi(Xe,t)}function pf(t){return Ai(Xe,t)}var wr=v("ZodURL",(t,e)=>{Xa.init(t,e),re.init(t,e)});function df(t){return br(wr,t)}function mf(t){return br(wr,{protocol:/^https?$/,hostname:Ce.domain,...z.normalizeParams(t)})}var yo=v("ZodEmoji",(t,e)=>{Qa.init(t,e),re.init(t,e)});function ff(t){return Li(yo,t)}var vo=v("ZodNanoID",(t,e)=>{ec.init(t,e),re.init(t,e)});function hf(t){return Ci(vo,t)}var _o=v("ZodCUID",(t,e)=>{tc.init(t,e),re.init(t,e)});function gf(t){return ji(_o,t)}var bo=v("ZodCUID2",(t,e)=>{nc.init(t,e),re.init(t,e)});function yf(t){return Mi(bo,t)}var xo=v("ZodULID",(t,e)=>{rc.init(t,e),re.init(t,e)});function vf(t){return Ui(xo,t)}var $o=v("ZodXID",(t,e)=>{ic.init(t,e),re.init(t,e)});function _f(t){return Fi($o,t)}var So=v("ZodKSUID",(t,e)=>{oc.init(t,e),re.init(t,e)});function bf(t){return Zi(So,t)}var ko=v("ZodIPv4",(t,e)=>{uc.init(t,e),re.init(t,e)});function xf(t){return Hi(ko,t)}var Bu=v("ZodMAC",(t,e)=>{dc.init(t,e),re.init(t,e)});function $f(t){return cl(Bu,t)}var Eo=v("ZodIPv6",(t,e)=>{pc.init(t,e),re.init(t,e)});function Sf(t){return Wi(Eo,t)}var wo=v("ZodCIDRv4",(t,e)=>{mc.init(t,e),re.init(t,e)});function kf(t){return Bi(wo,t)}var Io=v("ZodCIDRv6",(t,e)=>{fc.init(t,e),re.init(t,e)});function Ef(t){return Ji(Io,t)}var To=v("ZodBase64",(t,e)=>{gc.init(t,e),re.init(t,e)});function wf(t){return Vi(To,t)}var Ro=v("ZodBase64URL",(t,e)=>{yc.init(t,e),re.init(t,e)});function If(t){return Gi(Ro,t)}var Po=v("ZodE164",(t,e)=>{vc.init(t,e),re.init(t,e)});function Tf(t){return qi(Po,t)}var No=v("ZodJWT",(t,e)=>{_c.init(t,e),re.init(t,e)});function Rf(t){return Ki(No,t)}var Pn=v("ZodCustomStringFormat",(t,e)=>{bc.init(t,e),re.init(t,e)});function Pf(t,e,r={}){return En(Pn,t,e,r)}function Nf(t){return En(Pn,"hostname",Ce.hostname,t)}function zf(t){return En(Pn,"hex",Ce.hex,t)}function Df(t,e){let r=e?.enc??"hex",i=`${t}_${r}`,n=Ce[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return En(Pn,i,n,e)}var Nn=v("ZodNumber",(t,e)=>{$i.init(t,e),K.init(t,e),t._zod.processJSONSchema=(i,n,o)=>Vl(t,i,n,o),t.gt=(i,n)=>t.check(Ke(i,n)),t.gte=(i,n)=>t.check(ke(i,n)),t.min=(i,n)=>t.check(ke(i,n)),t.lt=(i,n)=>t.check(qe(i,n)),t.lte=(i,n)=>t.check(De(i,n)),t.max=(i,n)=>t.check(De(i,n)),t.int=i=>t.check(fo(i)),t.safe=i=>t.check(fo(i)),t.positive=i=>t.check(Ke(0,i)),t.nonnegative=i=>t.check(ke(0,i)),t.negative=i=>t.check(qe(0,i)),t.nonpositive=i=>t.check(De(0,i)),t.multipleOf=(i,n)=>t.check(kt(i,n)),t.step=(i,n)=>t.check(kt(i,n)),t.finite=()=>t;let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function Ju(t){return fl(Nn,t)}var qt=v("ZodNumberFormat",(t,e)=>{xc.init(t,e),Nn.init(t,e)});function fo(t){return gl(qt,t)}function Of(t){return yl(qt,t)}function Af(t){return vl(qt,t)}function Lf(t){return _l(qt,t)}function Cf(t){return bl(qt,t)}var zn=v("ZodBoolean",(t,e)=>{fr.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Gl(t,r,i,n)});function Vu(t){return xl(zn,t)}var Dn=v("ZodBigInt",(t,e)=>{Si.init(t,e),K.init(t,e),t._zod.processJSONSchema=(i,n,o)=>ql(t,i,n,o),t.gte=(i,n)=>t.check(ke(i,n)),t.min=(i,n)=>t.check(ke(i,n)),t.gt=(i,n)=>t.check(Ke(i,n)),t.gte=(i,n)=>t.check(ke(i,n)),t.min=(i,n)=>t.check(ke(i,n)),t.lt=(i,n)=>t.check(qe(i,n)),t.lte=(i,n)=>t.check(De(i,n)),t.max=(i,n)=>t.check(De(i,n)),t.positive=i=>t.check(Ke(BigInt(0),i)),t.negative=i=>t.check(qe(BigInt(0),i)),t.nonpositive=i=>t.check(De(BigInt(0),i)),t.nonnegative=i=>t.check(ke(BigInt(0),i)),t.multipleOf=(i,n)=>t.check(kt(i,n));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});function jf(t){return Sl(Dn,t)}var zo=v("ZodBigIntFormat",(t,e)=>{$c.init(t,e),Dn.init(t,e)});function Mf(t){return El(zo,t)}function Uf(t){return wl(zo,t)}var Gu=v("ZodSymbol",(t,e)=>{Sc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Kl(t,r,i,n)});function Ff(t){return Il(Gu,t)}var qu=v("ZodUndefined",(t,e)=>{kc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Xl(t,r,i,n)});function Zf(t){return Tl(qu,t)}var Ku=v("ZodNull",(t,e)=>{Ec.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Yl(t,r,i,n)});function Yu(t){return Rl(Ku,t)}var Xu=v("ZodAny",(t,e)=>{wc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>tu(t,r,i,n)});function Hf(){return Pl(Xu)}var Qu=v("ZodUnknown",(t,e)=>{Ic.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>nu(t,r,i,n)});function Gt(){return Nl(Qu)}var ep=v("ZodNever",(t,e)=>{Tc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>eu(t,r,i,n)});function Do(t){return zl(ep,t)}var tp=v("ZodVoid",(t,e)=>{Rc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Ql(t,r,i,n)});function Wf(t){return Dl(tp,t)}var Ir=v("ZodDate",(t,e)=>{Pc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(i,n,o)=>ru(t,i,n,o),t.min=(i,n)=>t.check(ke(i,n)),t.max=(i,n)=>t.check(De(i,n));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});function Bf(t){return Ol(Ir,t)}var np=v("ZodArray",(t,e)=>{Nc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>hu(t,r,i,n),t.element=e.element,t.min=(r,i)=>t.check(lt(r,i)),t.nonempty=r=>t.check(lt(1,r)),t.max=(r,i)=>t.check(Jt(r,i)),t.length=(r,i)=>t.check(Vt(r,i)),t.unwrap=()=>t.element});function Tr(t,e){return Cl(np,t,e)}function Jf(t){let e=t._zod.def.shape;return Ao(Object.keys(e))}var Rr=v("ZodObject",(t,e)=>{zc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>gu(t,r,i,n),z.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>Ao(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:Gt()}),t.loose=()=>t.clone({...t._zod.def,catchall:Gt()}),t.strict=()=>t.clone({...t._zod.def,catchall:Do()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>z.extend(t,r),t.safeExtend=r=>z.safeExtend(t,r),t.merge=r=>z.merge(t,r),t.pick=r=>z.pick(t,r),t.omit=r=>z.omit(t,r),t.partial=(...r)=>z.partial(Co,t,r[0]),t.required=(...r)=>z.required(jo,t,r[0])});function Vf(t,e){let r={type:"object",shape:t??{},...z.normalizeParams(e)};return new Rr(r)}function Gf(t,e){return new Rr({type:"object",shape:t,catchall:Do(),...z.normalizeParams(e)})}function qf(t,e){return new Rr({type:"object",shape:t,catchall:Gt(),...z.normalizeParams(e)})}var Pr=v("ZodUnion",(t,e)=>{hr.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>ro(t,r,i,n),t.options=e.options});function Oo(t,e){return new Pr({type:"union",options:t,...z.normalizeParams(e)})}var rp=v("ZodXor",(t,e)=>{Pr.init(t,e),Dc.init(t,e),t._zod.processJSONSchema=(r,i,n)=>ro(t,r,i,n),t.options=e.options});function Kf(t,e){return new rp({type:"union",options:t,inclusive:!1,...z.normalizeParams(e)})}var ip=v("ZodDiscriminatedUnion",(t,e)=>{Pr.init(t,e),Oc.init(t,e)});function Yf(t,e,r){return new ip({type:"union",options:e,discriminator:t,...z.normalizeParams(r)})}var op=v("ZodIntersection",(t,e)=>{Ac.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>yu(t,r,i,n)});function sp(t,e){return new op({type:"intersection",left:t,right:e})}var ap=v("ZodTuple",(t,e)=>{ki.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>vu(t,r,i,n),t.rest=r=>t.clone({...t._zod.def,rest:r})});function cp(t,e,r){let i=e instanceof G,n=i?r:e,o=i?e:null;return new ap({type:"tuple",items:t,rest:o,...z.normalizeParams(n)})}var Nr=v("ZodRecord",(t,e)=>{Lc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>_u(t,r,i,n),t.keyType=e.keyType,t.valueType=e.valueType});function lp(t,e,r){return new Nr({type:"record",keyType:t,valueType:e,...z.normalizeParams(r)})}function Xf(t,e,r){let i=Se(t);return i._zod.values=void 0,new Nr({type:"record",keyType:i,valueType:e,...z.normalizeParams(r)})}function Qf(t,e,r){return new Nr({type:"record",keyType:t,valueType:e,mode:"loose",...z.normalizeParams(r)})}var up=v("ZodMap",(t,e)=>{Cc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>mu(t,r,i,n),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...r)=>t.check(Ye(...r)),t.nonempty=r=>t.check(Ye(1,r)),t.max=(...r)=>t.check(Et(...r)),t.size=(...r)=>t.check(Bt(...r))});function eh(t,e,r){return new up({type:"map",keyType:t,valueType:e,...z.normalizeParams(r)})}var pp=v("ZodSet",(t,e)=>{jc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>fu(t,r,i,n),t.min=(...r)=>t.check(Ye(...r)),t.nonempty=r=>t.check(Ye(1,r)),t.max=(...r)=>t.check(Et(...r)),t.size=(...r)=>t.check(Bt(...r))});function th(t,e){return new pp({type:"set",valueType:t,...z.normalizeParams(e)})}var Tn=v("ZodEnum",(t,e)=>{Mc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(i,n,o)=>iu(t,i,n,o),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(i,n)=>{let o={};for(let s of i)if(r.has(s))o[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Tn({...e,checks:[],...z.normalizeParams(n),entries:o})},t.exclude=(i,n)=>{let o={...e.entries};for(let s of i)if(r.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new Tn({...e,checks:[],...z.normalizeParams(n),entries:o})}});function Ao(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new Tn({type:"enum",entries:r,...z.normalizeParams(e)})}function nh(t,e){return new Tn({type:"enum",entries:t,...z.normalizeParams(e)})}var dp=v("ZodLiteral",(t,e)=>{Uc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>ou(t,r,i,n),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function rh(t,e){return new dp({type:"literal",values:Array.isArray(t)?t:[t],...z.normalizeParams(e)})}var mp=v("ZodFile",(t,e)=>{Fc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>cu(t,r,i,n),t.min=(r,i)=>t.check(Ye(r,i)),t.max=(r,i)=>t.check(Et(r,i)),t.mime=(r,i)=>t.check(_n(Array.isArray(r)?r:[r],i))});function ih(t){return jl(mp,t)}var fp=v("ZodTransform",(t,e)=>{Zc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>du(t,r,i,n),t._zod.parse=(r,i)=>{if(i.direction==="backward")throw new _t(t.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(z.issue(o,r.value,e));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=t),r.issues.push(z.issue(s))}};let n=e.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function Lo(t){return new fp({type:"transform",transform:t})}var Co=v("ZodOptional",(t,e)=>{Ei.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>io(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function Sr(t){return new Co({type:"optional",innerType:t})}var hp=v("ZodExactOptional",(t,e)=>{Hc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>io(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function gp(t){return new hp({type:"optional",innerType:t})}var yp=v("ZodNullable",(t,e)=>{Wc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>bu(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function kr(t){return new yp({type:"nullable",innerType:t})}function oh(t){return Sr(kr(t))}var vp=v("ZodDefault",(t,e)=>{Bc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>$u(t,r,i,n),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function _p(t,e){return new vp({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():z.shallowClone(e)}})}var bp=v("ZodPrefault",(t,e)=>{Jc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Su(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function xp(t,e){return new bp({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():z.shallowClone(e)}})}var jo=v("ZodNonOptional",(t,e)=>{Vc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>xu(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function $p(t,e){return new jo({type:"nonoptional",innerType:t,...z.normalizeParams(e)})}var Sp=v("ZodSuccess",(t,e)=>{Gc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>lu(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function sh(t){return new Sp({type:"success",innerType:t})}var kp=v("ZodCatch",(t,e)=>{qc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>ku(t,r,i,n),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function Ep(t,e){return new kp({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var wp=v("ZodNaN",(t,e)=>{Kc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>su(t,r,i,n)});function ah(t){return Ll(wp,t)}var Mo=v("ZodPipe",(t,e)=>{Yc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Eu(t,r,i,n),t.in=e.in,t.out=e.out});function Er(t,e){return new Mo({type:"pipe",in:t,out:e})}var Uo=v("ZodCodec",(t,e)=>{Mo.init(t,e),gr.init(t,e)});function ch(t,e,r){return new Uo({type:"pipe",in:t,out:e,transform:r.decode,reverseTransform:r.encode})}var Ip=v("ZodReadonly",(t,e)=>{Xc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>wu(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function Tp(t){return new Ip({type:"readonly",innerType:t})}var Rp=v("ZodTemplateLiteral",(t,e)=>{Qc.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>au(t,r,i,n)});function lh(t,e){return new Rp({type:"template_literal",parts:t,...z.normalizeParams(e)})}var Pp=v("ZodLazy",(t,e)=>{nl.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Tu(t,r,i,n),t.unwrap=()=>t._zod.def.getter()});function Np(t){return new Pp({type:"lazy",getter:t})}var zp=v("ZodPromise",(t,e)=>{tl.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>Iu(t,r,i,n),t.unwrap=()=>t._zod.def.innerType});function uh(t){return new zp({type:"promise",innerType:t})}var Dp=v("ZodFunction",(t,e)=>{el.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>pu(t,r,i,n)});function ph(t){return new Dp({type:"function",input:Array.isArray(t?.input)?cp(t?.input):t?.input??Tr(Gt()),output:t?.output??Gt()})}var zr=v("ZodCustom",(t,e)=>{rl.init(t,e),K.init(t,e),t._zod.processJSONSchema=(r,i,n)=>uu(t,r,i,n)});function dh(t){let e=new ie({check:"custom"});return e._zod.check=t,e}function mh(t,e){return Ml(zr,t??(()=>!0),e)}function Op(t,e={}){return Ul(zr,t,e)}function Ap(t){return Fl(t)}var fh=Zl,hh=Hl;function gh(t,e={}){let r=new zr({type:"custom",check:"custom",fn:i=>i instanceof t,abort:!0,...z.normalizeParams(e)});return r._zod.bag.Class=t,r._zod.check=i=>{i.value instanceof t||i.issues.push({code:"invalid_type",expected:t.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}var yh=(...t)=>Wl({Codec:Uo,Boolean:zn,String:Rn},...t);function vh(t){let e=Np(()=>Oo([mo(t),Ju(),Vu(),Yu(),Tr(e),lp(mo(),e)]));return e}function _h(t,e){return Er(Lo(t),e)}var Rx={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 Px(t){ue({customError:t})}function Nx(){return ue().customError}var Lp;Lp||(Lp={});var C={...xr,...ao,iso:In},zx=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 Dx(t,e){let r=t.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":e??"draft-2020-12"}function Ox(t,e){if(!t.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=t.slice(1).split("/").filter(Boolean);if(r.length===0)return e.rootSchema;let i=e.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){let n=r[1];if(!n||!e.defs[n])throw new Error(`Reference not found: ${t}`);return e.defs[n]}throw new Error(`Reference not found: ${t}`)}function bh(t,e){if(t.not!==void 0){if(typeof t.not=="object"&&Object.keys(t.not).length===0)return C.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(t.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(t.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(t.if!==void 0||t.then!==void 0||t.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(t.dependentSchemas!==void 0||t.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(t.$ref){let n=t.$ref;if(e.refs.has(n))return e.refs.get(n);if(e.processing.has(n))return C.lazy(()=>{if(!e.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return e.refs.get(n)});e.processing.add(n);let o=Ox(n,e),s=$e(o,e);return e.refs.set(n,s),e.processing.delete(n),s}if(t.enum!==void 0){let n=t.enum;if(e.version==="openapi-3.0"&&t.nullable===!0&&n.length===1&&n[0]===null)return C.null();if(n.length===0)return C.never();if(n.length===1)return C.literal(n[0]);if(n.every(s=>typeof s=="string"))return C.enum(n);let o=n.map(s=>C.literal(s));return o.length<2?o[0]:C.union([o[0],o[1],...o.slice(2)])}if(t.const!==void 0)return C.literal(t.const);let r=t.type;if(Array.isArray(r)){let n=r.map(o=>{let s={...t,type:o};return bh(s,e)});return n.length===0?C.never():n.length===1?n[0]:C.union(n)}if(!r)return C.any();let i;switch(r){case"string":{let n=C.string();if(t.format){let o=t.format;o==="email"?n=n.check(C.email()):o==="uri"||o==="uri-reference"?n=n.check(C.url()):o==="uuid"||o==="guid"?n=n.check(C.uuid()):o==="date-time"?n=n.check(C.iso.datetime()):o==="date"?n=n.check(C.iso.date()):o==="time"?n=n.check(C.iso.time()):o==="duration"?n=n.check(C.iso.duration()):o==="ipv4"?n=n.check(C.ipv4()):o==="ipv6"?n=n.check(C.ipv6()):o==="mac"?n=n.check(C.mac()):o==="cidr"?n=n.check(C.cidrv4()):o==="cidr-v6"?n=n.check(C.cidrv6()):o==="base64"?n=n.check(C.base64()):o==="base64url"?n=n.check(C.base64url()):o==="e164"?n=n.check(C.e164()):o==="jwt"?n=n.check(C.jwt()):o==="emoji"?n=n.check(C.emoji()):o==="nanoid"?n=n.check(C.nanoid()):o==="cuid"?n=n.check(C.cuid()):o==="cuid2"?n=n.check(C.cuid2()):o==="ulid"?n=n.check(C.ulid()):o==="xid"?n=n.check(C.xid()):o==="ksuid"&&(n=n.check(C.ksuid()))}typeof t.minLength=="number"&&(n=n.min(t.minLength)),typeof t.maxLength=="number"&&(n=n.max(t.maxLength)),t.pattern&&(n=n.regex(new RegExp(t.pattern))),i=n;break}case"number":case"integer":{let n=r==="integer"?C.number().int():C.number();typeof t.minimum=="number"&&(n=n.min(t.minimum)),typeof t.maximum=="number"&&(n=n.max(t.maximum)),typeof t.exclusiveMinimum=="number"?n=n.gt(t.exclusiveMinimum):t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(n=n.gt(t.minimum)),typeof t.exclusiveMaximum=="number"?n=n.lt(t.exclusiveMaximum):t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(n=n.lt(t.maximum)),typeof t.multipleOf=="number"&&(n=n.multipleOf(t.multipleOf)),i=n;break}case"boolean":{i=C.boolean();break}case"null":{i=C.null();break}case"object":{let n={},o=t.properties||{},s=new Set(t.required||[]);for(let[l,c]of Object.entries(o)){let u=$e(c,e);n[l]=s.has(l)?u:u.optional()}if(t.propertyNames){let l=$e(t.propertyNames,e),c=t.additionalProperties&&typeof t.additionalProperties=="object"?$e(t.additionalProperties,e):C.any();if(Object.keys(n).length===0){i=C.record(l,c);break}let u=C.object(n).passthrough(),d=C.looseRecord(l,c);i=C.intersection(u,d);break}if(t.patternProperties){let l=t.patternProperties,c=Object.keys(l),u=[];for(let p of c){let m=$e(l[p],e),f=C.string().regex(new RegExp(p));u.push(C.looseRecord(f,m))}let d=[];if(Object.keys(n).length>0&&d.push(C.object(n).passthrough()),d.push(...u),d.length===0)i=C.object({}).passthrough();else if(d.length===1)i=d[0];else{let p=C.intersection(d[0],d[1]);for(let m=2;m<d.length;m++)p=C.intersection(p,d[m]);i=p}break}let a=C.object(n);t.additionalProperties===!1?i=a.strict():typeof t.additionalProperties=="object"?i=a.catchall($e(t.additionalProperties,e)):i=a.passthrough();break}case"array":{let n=t.prefixItems,o=t.items;if(n&&Array.isArray(n)){let s=n.map(l=>$e(l,e)),a=o&&typeof o=="object"&&!Array.isArray(o)?$e(o,e):void 0;a?i=C.tuple(s).rest(a):i=C.tuple(s),typeof t.minItems=="number"&&(i=i.check(C.minLength(t.minItems))),typeof t.maxItems=="number"&&(i=i.check(C.maxLength(t.maxItems)))}else if(Array.isArray(o)){let s=o.map(l=>$e(l,e)),a=t.additionalItems&&typeof t.additionalItems=="object"?$e(t.additionalItems,e):void 0;a?i=C.tuple(s).rest(a):i=C.tuple(s),typeof t.minItems=="number"&&(i=i.check(C.minLength(t.minItems))),typeof t.maxItems=="number"&&(i=i.check(C.maxLength(t.maxItems)))}else if(o!==void 0){let s=$e(o,e),a=C.array(s);typeof t.minItems=="number"&&(a=a.min(t.minItems)),typeof t.maxItems=="number"&&(a=a.max(t.maxItems)),i=a}else i=C.array(C.any());break}default:throw new Error(`Unsupported type: ${r}`)}return t.description&&(i=i.describe(t.description)),t.default!==void 0&&(i=i.default(t.default)),i}function $e(t,e){if(typeof t=="boolean")return t?C.any():C.never();let r=bh(t,e),i=t.type||t.enum!==void 0||t.const!==void 0;if(t.anyOf&&Array.isArray(t.anyOf)){let a=t.anyOf.map(c=>$e(c,e)),l=C.union(a);r=i?C.intersection(r,l):l}if(t.oneOf&&Array.isArray(t.oneOf)){let a=t.oneOf.map(c=>$e(c,e)),l=C.xor(a);r=i?C.intersection(r,l):l}if(t.allOf&&Array.isArray(t.allOf))if(t.allOf.length===0)r=i?r:C.any();else{let a=i?r:$e(t.allOf[0],e),l=i?0:1;for(let c=l;c<t.allOf.length;c++)a=C.intersection(a,$e(t.allOf[c],e));r=a}t.nullable===!0&&e.version==="openapi-3.0"&&(r=C.nullable(r)),t.readOnly===!0&&(r=C.readonly(r));let n={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of o)a in t&&(n[a]=t[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in t&&(n[a]=t[a]);for(let a of Object.keys(t))zx.has(a)||(n[a]=t[a]);return Object.keys(n).length>0&&e.registry.add(r,n),r}function xh(t,e){if(typeof t=="boolean")return t?C.any():C.never();let r=Dx(t,e?.defaultTarget),i=t.$defs||t.definitions||{},n={version:r,defs:i,refs:new Map,processing:new Set,rootSchema:t,registry:e?.registry??be};return $e(t,n)}var Cp={};Ue(Cp,{bigint:()=>jx,boolean:()=>Cx,date:()=>Mx,number:()=>Lx,string:()=>Ax});function Ax(t){return al(Rn,t)}function Lx(t){return hl(Nn,t)}function Cx(t){return $l(zn,t)}function jx(t){return kl(Dn,t)}function Mx(t){return Al(Ir,t)}ue(wi());var Fo=["**/node_modules/**","**/.git/**","**/dist/**","**/build/**","**/vendor/**","**/.next/**","**/.cache/**","**/coverage/**","**/*.min.js"],$h=["**/*.{ts,tsx,yaml,yml,php,py,go}","**/*.prisma","**/*.{graphql,gql}","**/Dockerfile*","**/.env*","**/package.json","**/lerna.json","**/turbo.json","**/pnpm-workspace.yaml"],ve={MAX_DEPTH:10,MIN_DEPTH:1,MAX_LIMIT:500,MIN_LIMIT:1,MAX_QUERY_LENGTH:500,DEFAULT_DEPTH:3,DEFAULT_LIMIT:10},Re={FILTERED_QUERY_LIMIT_MULTIPLIER:3,SCORE_BASE:1e3,EXACT_MATCH_BONUS:500,RECENT_FILE_BOOST:80,OLDER_FILE_BOOST:30,RECENT_FILE_THRESHOLD_DAYS:7,OLDER_FILE_THRESHOLD_DAYS:30,FUZZY_MATCH_LIMIT:30,ENABLE_LEXICAL_SCORING:process.env.ENABLE_LEXICAL_SCORING!=="false",LEXICAL_WEIGHT:parseFloat(process.env.LEXICAL_WEIGHT??String(.4)),GRAVITY_STRUCTURAL_WEIGHT:.5},jp={SECONDS_PER_DAY:86400,SECONDS_PER_YEAR:31536e3},Zo={DEFAULT_CONCURRENCY:parseInt(process.env.INDEX_CONCURRENCY??String(5),10)};var Kw=h.object({repoPath:h.string(),mode:h.enum(["init","tree","topography","scout","hologram","tools"]),subPath:h.string().optional(),maxDepth:h.number().int().min(ve.MIN_DEPTH).max(ve.MAX_DEPTH).optional()}),Yw=h.object({repoPath:h.string(),mode:h.enum(["symbol","concept","symbol-fuzzy","config","path"]).default("symbol"),query:h.string().max(ve.MAX_QUERY_LENGTH).optional(),key:h.string().optional(),kind:h.enum(["Service","Image","Port","Env"]).optional(),limit:h.number().int().min(ve.MIN_LIMIT).max(ve.MAX_LIMIT).optional(),offset:h.number().int().min(0).optional(),skipSync:h.boolean().optional(),compact:h.boolean().optional()}).refine(t=>!(t.mode==="concept"&&(!t.query||t.query.trim().length===0)),{message:"Concept search requires a non-empty query",path:["query"]}),Xw=h.object({repoPath:h.string(),mode:h.enum(["symbol","file"]),filePath:h.string().optional(),detailLevel:h.enum(["structure","signatures","summaries","detailed"]).optional(),symbolName:h.string().optional(),context:h.enum(["definition","full"]).optional()}),Qw=h.object({repoPath:h.string(),mode:h.enum(["impact","deps","flow","dead-code","circular-deps"]),filePath:h.string().optional(),symbolName:h.string().optional(),direction:h.enum(["imports","imported_by"]).optional(),depth:h.number().int().min(ve.MIN_DEPTH).max(ve.MAX_DEPTH).optional(),limit:h.number().int().min(ve.MIN_LIMIT).max(ve.MAX_LIMIT).optional(),includeTests:h.boolean().optional()}),eI=h.object({repoPath:h.string(),action:h.enum(["index","repair","trace"]),deep:h.boolean().optional(),sinceCommit:h.string().optional()}),tI=h.object({repoPath:h.string(),action:h.enum(["install","remove","status"]),enableAutoRefresh:h.boolean().optional(),enableSymbolHealing:h.boolean().optional()}),nI=h.object({action:h.enum(["list","link","fuse"]),repoPaths:h.array(h.string()).optional(),name:h.string().optional(),status:h.string().optional(),parentRepoPath:h.string().optional(),parentMissionId:h.number().optional(),childRepoPath:h.string().optional(),childMissionId:h.number().optional(),relationship:h.string().optional()});var Sh=[];var kh=[...Pd,...Nd];import Ae from"path";import Wp from"fs";F();import ge from"path";import Mp from"fs";var Ho=$.child({module:"path-resolver"}),On=class{repoPath;constructor(e){this.repoPath=ge.isAbsolute(e)?ge.normalize(e):ge.resolve(process.cwd(),e)}resolve(e){if(!e)return this.repoPath;if(e.includes("\0"))throw Ho.error({inputPath:e},"Path contains null bytes - possible attack"),new Error("Invalid path: contains null bytes");let r;if(ge.isAbsolute(e)?r=ge.normalize(e):r=ge.join(this.repoPath,e),r=ge.normalize(r),!this.isWithinRoot(r))throw Ho.warn({inputPath:e,resolved:r},"Path traversal attempt blocked"),new Error(`Access denied: path '${e}' is outside the repository root`);return r}resolveAndValidate(e){try{let r=this.resolve(e);return Mp.existsSync(r)?r:(Ho.debug({inputPath:e,resolved:r},"Path does not exist"),null)}catch(r){return Ho.error({inputPath:e,error:r},"Error validating path"),null}}isWithinRoot(e){try{let r=ge.resolve(e),i=ge.resolve(this.repoPath),n=ge.relative(i,r);if(n.startsWith("..")||ge.isAbsolute(n))return!1;if(Mp.existsSync(r)){let s=Mp.realpathSync(r),a=ge.relative(i,s);if(a.startsWith("..")||ge.isAbsolute(a))return!1}return!0}catch{return!1}}getRelative(e){let r=ge.normalize(e);return ge.relative(this.repoPath,r)}resolveBatch(e){return e.map(r=>this.resolve(r))}static normalize(e){return ge.normalize(e)}static isPathWithinRoot(e,r){let i=ge.resolve(e),n=ge.resolve(r),o=ge.relative(i,n);return o===""||!o.startsWith("..")&&!ge.isAbsolute(o)}};function Eh(t){return new On(t)}var Hx=/[\x00-\x1f\x7f]/g,Wx=/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g;function An(t){if(typeof t!="string")throw new Error("Invalid path: expected string");if(t.includes("\0"))throw new Error("Invalid path: null bytes are not allowed");if(t.replace(Hx,"").length!==t.length)throw new Error("Invalid path: control characters are not allowed");return t.trim()}function Ln(t,e=4096){if(typeof t!="string")return"";let r=t.replace(Wx,"").trim();return r.length>e?r.slice(0,e):r}Kt();var Ar=`
530
457
 
531
- To check repository and connection health: shadow_env_diagnose({ repoPath }).`;function Ot(t,e,r){return{content:[{type:"text",text:`[${t}] ${e}`}],isError:!0,errorCode:t,errorDetails:r}}function G$(t){let e=ve.isAbsolute(t)?ve.normalize(t):ve.resolve(process.cwd(),t),r=ve.parse(e).root;for(;e!==r;){if(md.existsSync(ve.join(e,".liquid-shadow.db"))||md.existsSync(ve.join(e,".git"))||md.existsSync(ve.join(e,"package.json")))return e;let i=ve.dirname(e);if(i===e)break;e=i}return null}function Ue(t){let e=t?.repoPath?String(t.repoPath):void 0,r=t?.filePath?String(t.filePath):void 0;e&&(e=Bn(e)),r&&(r=Bn(r));let i;if(e)ve.isAbsolute(e)||(e=ve.resolve(process.cwd(),e)),i=e;else if(r){let s=ve.resolve(process.cwd(),r);i=G$(ve.dirname(s))||process.cwd()}else i=process.cwd();i=ve.normalize(i);let n=Cg(i),o;return r&&(o=n.resolve(r)),{...t,repoPath:i,filePath:o,resolver:n}}function jg(){let t=process.cwd();if(t&&t!==ve.sep&&t!=="/")return ve.normalize(t);let e=["MCP_WORKSPACE_ROOT","CURSOR_WORKSPACE_ROOT","WORKSPACE_ROOT"];for(let r of e){let i=process.env[r]?.trim();if(i&&i!==ve.sep&&i!=="/")return ve.normalize(ve.isAbsolute(i)?i:ve.resolve(t,i))}throw new Error("repo://current could not resolve workspace path (cwd is /). Set MCP_WORKSPACE_ROOT (or CURSOR_WORKSPACE_ROOT) in your MCP server config to the repo root.")}function Mg(t){if(!t.startsWith("repo://"))return null;let e=r=>r==="current"?"":r;if(t.endsWith("/dependency-graph")){let r=t.replace("repo://","").replace("/dependency-graph","");return{repoPath:e(r),resource:"dependency-graph"}}if(t.endsWith("/statistics")){let r=t.replace("repo://","").replace("/statistics","");return{repoPath:e(r),resource:"statistics"}}if(t.endsWith("/metrics")){let r=t.replace("repo://","").replace("/metrics","");return{repoPath:e(r),resource:"metrics"}}if(t.endsWith("/hologram")){let r=t.replace("repo://","").replace("/hologram","");return{repoPath:e(r),resource:"hologram"}}if(t.endsWith("/tools")){let r=t.replace("repo://","").replace("/tools","");return{repoPath:e(r),resource:"tools"}}return null}function Ug(t,e){if(!je(t)){let r=`Repository not indexed yet. Run initial indexing first:
458
+ To check repository and connection health: shadow_env_diagnose({ repoPath }).`;function Pt(t,e,r){return{content:[{type:"text",text:`[${t}] ${e}`}],isError:!0,errorCode:t,errorDetails:r}}function n$(t){let e=Ae.isAbsolute(t)?Ae.normalize(t):Ae.resolve(process.cwd(),t),r=Ae.parse(e).root;for(;e!==r;){if(Wp.existsSync(Ae.join(e,".liquid-shadow.db"))||Wp.existsSync(Ae.join(e,".git"))||Wp.existsSync(Ae.join(e,"package.json")))return e;let i=Ae.dirname(e);if(i===e)break;e=i}return null}function je(t){let e=t?.repoPath?String(t.repoPath):void 0,r=t?.filePath?String(t.filePath):void 0;e&&(e=An(e)),r&&(r=An(r));let i;if(e)Ae.isAbsolute(e)||(e=Ae.resolve(process.cwd(),e)),i=e;else if(r){let s=Ae.resolve(process.cwd(),r);i=n$(Ae.dirname(s))||process.cwd()}else i=process.cwd();i=Ae.normalize(i);let n=Eh(i),o;return r&&(o=n.resolve(r)),{...t,repoPath:i,filePath:o,resolver:n}}function Oh(t){if(!t.startsWith("repo://"))return null;let e=r=>r==="current"?"":r;if(t.endsWith("/dependency-graph")){let r=t.replace("repo://","").replace("/dependency-graph","");return{repoPath:e(r),resource:"dependency-graph"}}if(t.endsWith("/statistics")){let r=t.replace("repo://","").replace("/statistics","");return{repoPath:e(r),resource:"statistics"}}if(t.endsWith("/metrics")){let r=t.replace("repo://","").replace("/metrics","");return{repoPath:e(r),resource:"metrics"}}if(t.endsWith("/hologram")){let r=t.replace("repo://","").replace("/hologram","");return{repoPath:e(r),resource:"hologram"}}if(t.endsWith("/tools")){let r=t.replace("repo://","").replace("/tools","");return{repoPath:e(r),resource:"tools"}}return null}function Ah(t,e){if(!Qe(t)){let r=`Repository not indexed yet. Run initial indexing first:
532
459
 
533
460
  1. shadow_recon_onboard({ repoPath: "${t}" }) // one-time
534
461
  2. shadow_sync_trace({ repoPath: "${t}" }) // then sync
535
462
 
536
- After that, ${e} and other tools will work.`+Br;return Ot("FILE_NOT_FOUND",r,{repoPath:t,toolName:e,requiresIndexing:!0})}return null}Fe();async function ly(t){return{resources:Ih}}async function uy(t){let e=t.params.uri,r=Mg(e);if(!r)throw new Error(`Invalid resource URI: ${e}`);let n=r.repoPath===""||r.repoPath==="current"?jg():Vr.resolve(process.cwd(),r.repoPath),o=r.resource;if(o==="tools")return{contents:[{uri:e,mimeType:"application/json",text:JSON.stringify(Bo,null,2)}]};if(o==="dependency-graph")return Y$({repoPath:n});let s=Vr.normalize(n);if(s===Vr.parse(s).root)throw new Error(`Critical Safety: Attempted to run read_resource on system root. request: ${e}`);await Q(n);let a=L.getInstance(n);if(o==="statistics"){let l={files:a.files.getCount(),exports:a.exports.getCount(),imports:a.imports.getCount()};return{contents:[{uri:e,mimeType:"application/json",text:JSON.stringify(l,null,2)}]}}if(o==="metrics"){let l=Hn(n),c=ds(),u={indexed:je(n),files:a.files.getCount(),exports:a.exports.getCount(),imports:a.imports.getCount(),lastIndexedCommit:qo(n)??null,hooksInstalled:l.installed,performance:{index:c.index,query:c.query,uptimeMs:c.uptimeMs}};return{contents:[{uri:e,mimeType:"application/json",text:JSON.stringify(u,null,2)}]}}if(o==="hologram"){let c=new ae(n).getSnapshot();return{contents:[{uri:e,mimeType:"application/json",text:JSON.stringify(c,null,2)}]}}throw new Error(`Resource not found: ${e}`)}async function Y$({repoPath:t}){let r=L.getInstance(t).imports.getAllResolved(),i=new Map,n=[];for(let o of r)i.has(o.file_path)||i.set(o.file_path,{id:o.file_path,name:Vr.basename(o.file_path)}),o.resolved_path&&!i.has(o.resolved_path)&&i.set(o.resolved_path,{id:o.resolved_path,name:Vr.basename(o.resolved_path)}),o.resolved_path&&n.push({from:o.file_path,to:o.resolved_path,symbols:o.imported_symbols});return{contents:[{uri:"repo://current/dependency-graph",mimeType:"application/json",text:JSON.stringify({nodes:Array.from(i.values()),links:n},null,2)}]}}F();F();var X$=$.child({module:"strategy-normalizer"}),ft=class{static normalize(e){if(!e)return{steps:[]};let r;if(typeof e=="string")try{r=JSON.parse(e)}catch(n){return X$.warn({strategyInput:e,err:n},"Failed to parse strategy JSON"),{steps:[]}}else r=e;return{steps:this.normalizeSteps(r)}}static normalizeSteps(e){return Array.isArray(e)?e.map((r,i)=>typeof r=="string"?{id:`step-${i}`,description:r,status:"pending"}:typeof r=="object"&&r!==null?{id:r.id||`step-${i}`,description:r.description||r.content||r.name||`Step ${i+1}`,status:r.status||"pending",dependencies:r.dependencies||r.deps,verification:r.verification,...r}:{id:`step-${i}`,description:String(r),status:"pending"}):e.steps&&Array.isArray(e.steps)?this.normalizeSteps(e.steps):typeof e=="object"?Object.entries(e).map(([r,i],n)=>typeof i=="string"?{id:r,description:i,status:"pending"}:typeof i=="object"&&i!==null?{id:r,description:i.description||i.content||i.name||r,status:i.status||"pending",dependencies:i.dependencies||i.deps,verification:i.verification,...i}:{id:r||`step-${n}`,description:String(i),status:"pending"}):[]}static stringify(e){return JSON.stringify(e,null,2)}static validate(e){let r=[];if(!e)return{valid:!0,errors:[]};try{let i=this.normalize(e),n=new Set;for(let o of i.steps)if(n.has(o.id)&&r.push(`Duplicate step ID: ${o.id}`),n.add(o.id),o.dependencies)for(let s of o.dependencies)n.has(s)||r.push(`Step "${o.id}" depends on non-existent step "${s}"`);return{valid:r.length===0,errors:r}}catch(i){return r.push(`Strategy validation failed: ${i instanceof Error?i.message:String(i)}`),{valid:!1,errors:r}}}};var Q$=[{id:"step-0",description:"Analyze impact: identify dependents and call sites",status:"pending"},{id:"step-1",description:"Implement refactor and update call sites",status:"pending"},{id:"step-2",description:"Run tests and verify behavior; update docs if needed",status:"pending"}],eS=[{id:"step-0",description:"Capture requirements and acceptance criteria",status:"pending"},{id:"step-1",description:"Implement feature with tests",status:"pending"},{id:"step-2",description:"Integrate and verify end-to-end",status:"pending"}],tS=[{id:"step-0",description:"Reproduce the bug and document steps",status:"pending"},{id:"step-1",description:"Diagnose root cause and plan fix",status:"pending"},{id:"step-2",description:"Apply fix and add/update regression test",status:"pending"},{id:"step-3",description:"Verify fix and run full test suite",status:"pending"}],nS=[{id:"refactoring",name:"Refactoring",description:"Impact analysis \u2192 implementation \u2192 verification",defaultGoal:"Refactor {{target}} safely with full impact analysis and verification.",steps:Q$},{id:"feature",name:"Feature",description:"Requirements \u2192 implementation \u2192 testing",defaultGoal:"Implement {{target}} with clear requirements and end-to-end verification.",steps:eS},{id:"bug-fix",name:"Bug fix",description:"Reproduction \u2192 diagnosis \u2192 fix \u2192 regression test",defaultGoal:"Fix {{target}}: reproduce, diagnose, fix, and add regression test.",steps:tS}],py=new Map(nS.map(t=>[t.id,t]));function rS(t){return py.get(t)}function iS(t,e){let r=t;for(let[i,n]of Object.entries(e))r=r.replace(new RegExp(`\\{\\{${i}\\}\\}`,"g"),n);return r}function dy(t,e,r={}){let i=rS(t);if(!i)throw new Error(`Unknown template: ${t}. Use one of: ${Array.from(py.keys()).join(", ")}`);let n=r.target||"scope",o=e||(t==="refactoring"?`Refactor ${n}`:t==="feature"?`Feature: ${n}`:`Fix: ${n}`),s=iS(i.defaultGoal,{...r,target:n}),a=ft.normalize({steps:i.steps}),l=ft.stringify(a);return{name:o,goal:s,strategy:l}}X();X();import{execSync as Gn}from"child_process";var Es=class{constructor(e,r="refs/notes/shadow"){this.repoPath=e;this.ref=r}addNote(e,r){try{Gn(`git notes --ref ${this.ref} add -f -m '${r.replace(/'/g,"'\\''")}' ${e}`,{cwd:this.repoPath,stdio:["ignore","pipe","ignore"],encoding:"utf8"})}catch(i){throw new Error(`Failed to add git note to ${e}: ${i.message}`)}}getNote(e){try{return Gn(`git notes --ref ${this.ref} show ${e}`,{cwd:this.repoPath,stdio:["ignore","pipe","ignore"],encoding:"utf8"}).trim()}catch{return null}}listNotes(){let e=new Map;try{let r=Gn(`git notes --ref ${this.ref} list`,{cwd:this.repoPath,stdio:["ignore","pipe","ignore"],encoding:"utf8"}).trim();if(!r)return e;let i=r.split(`
537
- `);for(let n of i){let[o,s]=n.split(" ");if(s){let a=this.getNote(s);a&&e.set(s,a)}}}catch{}return e}removeNote(e){try{Gn(`git notes --ref ${this.ref} remove ${e}`,{cwd:this.repoPath,stdio:["ignore","pipe","ignore"],encoding:"utf8"})}catch{}}push(e="origin"){try{Gn(`git push ${e} ${this.ref}`,{cwd:this.repoPath,stdio:["ignore","pipe","ignore"],encoding:"utf8"})}catch(r){throw new Error(`Failed to push git notes to ${e}: ${r.message}`)}}fetch(e="origin"){try{Gn(`git fetch ${e} ${this.ref}:${this.ref}`,{cwd:this.repoPath,stdio:["ignore","pipe","ignore"],encoding:"utf8"})}catch{}}};F();var Vn=$.child({module:"persistence-service"}),rt=class{gitNotes;repoPath;constructor(e){this.repoPath=e,this.gitNotes=new Es(e)}async syncMissionToGitNotes(e){let{missions:r,intentLogs:i}=L.getInstance(this.repoPath),n=r.findById(e);if(!n)throw new Error(`Mission ${e} not found`);if(!n.commit_sha){Vn.warn({missionId:e},"Cannot sync mission without commit_sha");return}Vn.info({missionId:e,commitSha:n.commit_sha},"Syncing mission to Git Notes");let o=r.getArtifacts(e),s=i.findByMission(e,1e3),a=s.find(u=>u.type==="adr"),l=s.filter(u=>u.type==="decision").map(u=>({content:u.content,symbol_name:u.symbol_name,created_at:u.created_at})),c={version:"1.0",mission:{name:n.name,goal:n.goal,status:n.status,strategy_graph:n.strategy_graph,git_branch:n.git_branch,commit_sha:n.commit_sha,parent_id:n.parent_id,verification_context:n.verification_context,outcome_contract:n.outcome_contract,created_at:n.created_at,updated_at:n.updated_at},artifacts:o,adr:a?a.content:null,decisions:l};this.gitNotes.addNote(n.commit_sha,JSON.stringify(c,null,2))}async syncAllToGitNotes(){let{missions:e}=L.getInstance(this.repoPath),r=e.findActive(),i=e.findRecentCompleted(10),n=[...r,...i];for(let o of n)try{await this.syncMissionToGitNotes(o.id)}catch(s){Vn.error({missionId:o.id,error:s},"Failed to sync mission")}}async recoverFromGitNotes(){let e=this.gitNotes.listNotes(),{missions:r,intentLogs:i}=L.getInstance(this.repoPath),n=0,o=0;for(let[s,a]of e.entries())try{let l=JSON.parse(a);if(l.version!=="1.0")continue;if(r.findByCommitShas([s]).some(p=>p.name===l.mission.name)){Vn.debug({commitSha:s,missionName:l.mission.name},"Mission already exists, skipping recovery");continue}let d=r.create({name:l.mission.name,goal:l.mission.goal,status:l.mission.status,strategy_graph:l.mission.strategy_graph,git_branch:l.mission.git_branch,commit_sha:s,parent_id:l.mission.parent_id,verification_context:l.mission.verification_context,outcome_contract:l.mission.outcome_contract});if(n++,l.adr&&(i.create({mission_id:Number(d),symbol_id:null,file_path:null,type:"adr",content:l.adr,confidence:1,symbol_name:null,signature:null,commit_sha:s}),o++),l.decisions&&l.decisions.length>0)for(let p of l.decisions)i.create({mission_id:Number(d),symbol_id:null,file_path:null,type:"decision",content:p.content,confidence:1,symbol_name:p.symbol_name,signature:null,commit_sha:s}),o++;Vn.info({commitSha:s,missionName:l.mission.name,logsRecovered:o},"Re-hydrated mission from Git Notes")}catch(l){Vn.error({commitSha:s,error:l},"Failed to parse Git Note for recovery")}return{missionsRecovered:n,logsRecovered:o}}};var ws=$.child({module:"mcp:tools:ops:plan"});async function my(t){let{repoPath:e,name:r,goal:i,strategy:n,missionId:o,parentId:s,outcomeContract:a,templateId:l,templateVars:c}=t,{missions:u}=L.getInstance(e),d=be(e),p=Ge(e);ws.info({repoPath:e,name:r,missionId:o,templateId:l},"Planning mission");try{let m=r,f=i,y=n;if(l){let x=dy(l,r,c||{});m=m??x.name,f=f??x.goal,y=y??x.strategy}if(!m||!f)throw new Error("Mission requires name and goal (or templateId with optional templateVars).");let b=null;if(y){let x=ft.normalize(y);b=ft.stringify(x);let E=ft.validate(b);E.valid||ws.warn({errors:E.errors,strategy:y},"Strategy validation warnings detected")}let _,g;o?(u.update(o,{name:m,goal:f,strategy_graph:b,commit_sha:p,parent_id:s!==void 0?s:void 0,outcome_contract:a}),_=o,g=`Mission "${m}" updated.`):(_=u.create({name:m,goal:f,strategy_graph:b,status:"planned",git_branch:d,commit_sha:p,parent_id:s||null,verification_context:null,outcome_contract:a||null}),g=`Mission "${m}" planned.`);try{await new rt(e).syncMissionToGitNotes(Number(_))}catch(x){ws.warn({syncError:x,missionId:_},"Git Notes sync deferred")}return{content:[{type:"text",text:JSON.stringify({missionId:_,status:"planned",message:g,strategy_saved:!!y,contract_saved:!!a,from_template:l??void 0,commit:p},null,2)}]}}catch(m){throw ws.error({error:m,repoPath:e},"Failed to plan mission"),new Error(`Failed to plan mission: ${m instanceof Error?m.message:String(m)}`)}}F();X();X();F();F();var oS=$.child({module:"reasoning-engine"}),Is=class{analyze(e){oS.debug({logCount:e.length},"Performing reasoning pass over intent logs");let r={context:[],decisions:[],consequences:[],recommendations:[],unclassified:[]};for(let i of e){let n=i.content.toLowerCase(),o=this.matchesContext(n,i.type),s=this.matchesDecision(n,i.type),a=this.matchesConsequence(n,i.type),l=this.matchesRecommendation(n,i.type);o?r.context.push(i.content):s?r.decisions.push(i.content):l?r.recommendations.push(i.content):a?r.consequences.push(i.content):i.type==="decision"?r.decisions.push(i.content):i.type==="discovery"||i.type==="fix"?r.consequences.push(i.content):r.unclassified.push(i.content)}return r}matchesContext(e,r){return["because","since","given","due to","context: ","problem: ","situation:"].some(n=>e.includes(n))||r==="blocker"}matchesDecision(e,r){return["decided","chose","implemented","integrated","using","selected","strategy:"].some(n=>e.includes(n))||r==="decision"}matchesConsequence(e,r){return["results in","enables","allows","impact: ","consequence: ","next steps: ","meaning"].some(n=>e.includes(n))||r==="fix"}matchesRecommendation(e,r){return["should","recommend","suggest","next work","future","consider","strategy advice"].some(n=>e.includes(n))}};var Ts=$.child({module:"briefing-engine"}),Ct=class{intentLogs;missions;reasoningEngine;persistencePivot;constructor(e){let{intentLogs:r,missions:i}=L.getInstance(e);this.intentLogs=r,this.missions=i,this.reasoningEngine=new Is,this.persistencePivot=new rt(e)}async distillMission(e,r=!0){Ts.info({missionId:e},"Synthesizing mission intelligence into Tactical Briefing...");let i=this.gatherConsolidatedLogs(e);if(i.length===0)return{missionId:e,adr:"No intent logs found for this mission.",metrics:{totalLogs:0,symbolCount:0}};let n=this.reasoningEngine.analyze(i),o=new Set(i.map(a=>a.symbol_name).filter(Boolean)),s=`# Architectural Decision Record: Mission #${e}
463
+ After that, ${e} and other tools will work.`+Ar;return Pt("FILE_NOT_FOUND",r,{repoPath:t,toolName:e,requiresIndexing:!0})}return null}async function Lh(t){return{resources:Sh}}async function Ch(t){let e=t.params.uri;throw Oh(e)?new Error(`Resource not found: ${e}`):new Error(`Invalid resource URI: ${e}`)}F();import{execSync as Yt}from"child_process";import Bp from"path";import Jp from"fs";function _e(t){try{if(!Jp.existsSync(Bp.join(t,".git")))return null;let e=Yt("git rev-parse --abbrev-ref HEAD",{cwd:t,stdio:["ignore","pipe","ignore"],encoding:"utf8"}).trim();return e==="HEAD"?Yt("git rev-parse --short HEAD",{cwd:t,stdio:["ignore","pipe","ignore"],encoding:"utf8"}).trim():e.replace(/[\/\\:*"<>|?]/g,"-")}catch{return null}}function He(t){try{return Jp.existsSync(Bp.join(t,".git"))?Yt("git rev-parse HEAD",{cwd:t,stdio:["ignore","pipe","ignore"],encoding:"utf8"}).trim():null}catch{return null}}function jh(t,e=50){try{let r=Yt(`git rev-list --max-count=${e} HEAD`,{cwd:t,stdio:["ignore","pipe","ignore"],encoding:"utf8"}).trim();return r?r.split(`
464
+ `):[]}catch{return[]}}function Mh(t,e,r){try{return Yt(`git merge-tree --write-tree ${e} ${r}`,{cwd:t,stdio:["ignore","ignore","ignore"]}),!1}catch{return!0}}function Uh(t,e){try{if(!Jp.existsSync(Bp.join(t,".git")))return!0;let r=He(t);return!r||e&&e!==r&&Yt(`git diff --name-only ${e} ${r}`,{cwd:t,stdio:["ignore","pipe","ignore"],encoding:"utf8"}).trim()?!0:Yt("git status --porcelain",{cwd:t,stdio:["ignore","pipe","ignore"],encoding:"utf8"}).trim().length>0}catch{return!0}}F();var r$=$.child({module:"strategy-normalizer"}),dt=class{static normalize(e){if(!e)return{steps:[]};let r;if(typeof e=="string")try{r=JSON.parse(e)}catch(n){return r$.warn({strategyInput:e,err:n},"Failed to parse strategy JSON"),{steps:[]}}else r=e;return{steps:this.normalizeSteps(r)}}static normalizeSteps(e){return Array.isArray(e)?e.map((r,i)=>typeof r=="string"?{id:`step-${i}`,description:r,status:"pending"}:typeof r=="object"&&r!==null?{id:r.id||`step-${i}`,description:r.description||r.content||r.name||`Step ${i+1}`,status:r.status||"pending",dependencies:r.dependencies||r.deps,verification:r.verification,...r}:{id:`step-${i}`,description:String(r),status:"pending"}):e.steps&&Array.isArray(e.steps)?this.normalizeSteps(e.steps):typeof e=="object"?Object.entries(e).map(([r,i],n)=>typeof i=="string"?{id:r,description:i,status:"pending"}:typeof i=="object"&&i!==null?{id:r,description:i.description||i.content||i.name||r,status:i.status||"pending",dependencies:i.dependencies||i.deps,verification:i.verification,...i}:{id:r||`step-${n}`,description:String(i),status:"pending"}):[]}static stringify(e){return JSON.stringify(e,null,2)}static validate(e){let r=[];if(!e)return{valid:!0,errors:[]};try{let i=this.normalize(e),n=new Set;for(let o of i.steps)if(n.has(o.id)&&r.push(`Duplicate step ID: ${o.id}`),n.add(o.id),o.dependencies)for(let s of o.dependencies)n.has(s)||r.push(`Step "${o.id}" depends on non-existent step "${s}"`);return{valid:r.length===0,errors:r}}catch(i){return r.push(`Strategy validation failed: ${i instanceof Error?i.message:String(i)}`),{valid:!1,errors:r}}}};var i$=[{id:"step-0",description:"Analyze impact: identify dependents and call sites",status:"pending"},{id:"step-1",description:"Implement refactor and update call sites",status:"pending"},{id:"step-2",description:"Run tests and verify behavior; update docs if needed",status:"pending"}],o$=[{id:"step-0",description:"Capture requirements and acceptance criteria",status:"pending"},{id:"step-1",description:"Implement feature with tests",status:"pending"},{id:"step-2",description:"Integrate and verify end-to-end",status:"pending"}],s$=[{id:"step-0",description:"Reproduce the bug and document steps",status:"pending"},{id:"step-1",description:"Diagnose root cause and plan fix",status:"pending"},{id:"step-2",description:"Apply fix and add/update regression test",status:"pending"},{id:"step-3",description:"Verify fix and run full test suite",status:"pending"}],a$=[{id:"refactoring",name:"Refactoring",description:"Impact analysis \u2192 implementation \u2192 verification",defaultGoal:"Refactor {{target}} safely with full impact analysis and verification.",steps:i$},{id:"feature",name:"Feature",description:"Requirements \u2192 implementation \u2192 testing",defaultGoal:"Implement {{target}} with clear requirements and end-to-end verification.",steps:o$},{id:"bug-fix",name:"Bug fix",description:"Reproduction \u2192 diagnosis \u2192 fix \u2192 regression test",defaultGoal:"Fix {{target}}: reproduce, diagnose, fix, and add regression test.",steps:s$}],Fh=new Map(a$.map(t=>[t.id,t]));function c$(t){return Fh.get(t)}function l$(t,e){let r=t;for(let[i,n]of Object.entries(e))r=r.replace(new RegExp(`\\{\\{${i}\\}\\}`,"g"),n);return r}function Zh(t,e,r={}){let i=c$(t);if(!i)throw new Error(`Unknown template: ${t}. Use one of: ${Array.from(Fh.keys()).join(", ")}`);let n=r.target||"scope",o=e||(t==="refactoring"?`Refactor ${n}`:t==="feature"?`Feature: ${n}`:`Fix: ${n}`),s=l$(i.defaultGoal,{...r,target:n}),a=dt.normalize({steps:i.steps}),l=dt.stringify(a);return{name:o,goal:s,strategy:l}}X();X();import{execSync as Cn}from"child_process";var ns=class{constructor(e,r="refs/notes/shadow"){this.repoPath=e;this.ref=r}addNote(e,r){try{Cn(`git notes --ref ${this.ref} add -f -m '${r.replace(/'/g,"'\\''")}' ${e}`,{cwd:this.repoPath,stdio:["ignore","pipe","ignore"],encoding:"utf8"})}catch(i){throw new Error(`Failed to add git note to ${e}: ${i.message}`)}}getNote(e){try{return Cn(`git notes --ref ${this.ref} show ${e}`,{cwd:this.repoPath,stdio:["ignore","pipe","ignore"],encoding:"utf8"}).trim()}catch{return null}}listNotes(){let e=new Map;try{let r=Cn(`git notes --ref ${this.ref} list`,{cwd:this.repoPath,stdio:["ignore","pipe","ignore"],encoding:"utf8"}).trim();if(!r)return e;let i=r.split(`
465
+ `);for(let n of i){let[o,s]=n.split(" ");if(s){let a=this.getNote(s);a&&e.set(s,a)}}}catch{}return e}removeNote(e){try{Cn(`git notes --ref ${this.ref} remove ${e}`,{cwd:this.repoPath,stdio:["ignore","pipe","ignore"],encoding:"utf8"})}catch{}}push(e="origin"){try{Cn(`git push ${e} ${this.ref}`,{cwd:this.repoPath,stdio:["ignore","pipe","ignore"],encoding:"utf8"})}catch(r){throw new Error(`Failed to push git notes to ${e}: ${r.message}`)}}fetch(e="origin"){try{Cn(`git fetch ${e} ${this.ref}:${this.ref}`,{cwd:this.repoPath,stdio:["ignore","pipe","ignore"],encoding:"utf8"})}catch{}}};F();var jn=$.child({module:"persistence-service"}),tt=class{gitNotes;repoPath;constructor(e){this.repoPath=e,this.gitNotes=new ns(e)}async syncMissionToGitNotes(e){let{missions:r,intentLogs:i}=L.getInstance(this.repoPath),n=r.findById(e);if(!n)throw new Error(`Mission ${e} not found`);if(!n.commit_sha){jn.warn({missionId:e},"Cannot sync mission without commit_sha");return}jn.info({missionId:e,commitSha:n.commit_sha},"Syncing mission to Git Notes");let o=r.getArtifacts(e),s=i.findByMission(e,1e3),a=s.find(u=>u.type==="adr"),l=s.filter(u=>u.type==="decision").map(u=>({content:u.content,symbol_name:u.symbol_name,created_at:u.created_at})),c={version:"1.0",mission:{name:n.name,goal:n.goal,status:n.status,strategy_graph:n.strategy_graph,git_branch:n.git_branch,commit_sha:n.commit_sha,parent_id:n.parent_id,verification_context:n.verification_context,outcome_contract:n.outcome_contract,created_at:n.created_at,updated_at:n.updated_at},artifacts:o,adr:a?a.content:null,decisions:l};this.gitNotes.addNote(n.commit_sha,JSON.stringify(c,null,2))}async syncAllToGitNotes(){let{missions:e}=L.getInstance(this.repoPath),r=e.findActive(),i=e.findRecentCompleted(10),n=[...r,...i];for(let o of n)try{await this.syncMissionToGitNotes(o.id)}catch(s){jn.error({missionId:o.id,error:s},"Failed to sync mission")}}async recoverFromGitNotes(){let e=this.gitNotes.listNotes(),{missions:r,intentLogs:i}=L.getInstance(this.repoPath),n=0,o=0;for(let[s,a]of e.entries())try{let l=JSON.parse(a);if(l.version!=="1.0")continue;if(r.findByCommitShas([s]).some(p=>p.name===l.mission.name)){jn.debug({commitSha:s,missionName:l.mission.name},"Mission already exists, skipping recovery");continue}let d=r.create({name:l.mission.name,goal:l.mission.goal,status:l.mission.status,strategy_graph:l.mission.strategy_graph,git_branch:l.mission.git_branch,commit_sha:s,parent_id:l.mission.parent_id,verification_context:l.mission.verification_context,outcome_contract:l.mission.outcome_contract});if(n++,l.adr&&(i.create({mission_id:Number(d),symbol_id:null,file_path:null,type:"adr",content:l.adr,confidence:1,symbol_name:null,signature:null,commit_sha:s}),o++),l.decisions&&l.decisions.length>0)for(let p of l.decisions)i.create({mission_id:Number(d),symbol_id:null,file_path:null,type:"decision",content:p.content,confidence:1,symbol_name:p.symbol_name,signature:null,commit_sha:s}),o++;jn.info({commitSha:s,missionName:l.mission.name,logsRecovered:o},"Re-hydrated mission from Git Notes")}catch(l){jn.error({commitSha:s,error:l},"Failed to parse Git Note for recovery")}return{missionsRecovered:n,logsRecovered:o}}};var rs=$.child({module:"mcp:tools:ops:plan"});async function tg(t){let{repoPath:e,name:r,goal:i,strategy:n,missionId:o,parentId:s,outcomeContract:a,templateId:l,templateVars:c}=t,{missions:u}=L.getInstance(e),d=_e(e),p=He(e);rs.info({repoPath:e,name:r,missionId:o,templateId:l},"Planning mission");try{let m=r,f=i,y=n;if(l){let x=Zh(l,r,c||{});m=m??x.name,f=f??x.goal,y=y??x.strategy}if(!m||!f)throw new Error("Mission requires name and goal (or templateId with optional templateVars).");let b=null;if(y){let x=dt.normalize(y);b=dt.stringify(x);let E=dt.validate(b);E.valid||rs.warn({errors:E.errors,strategy:y},"Strategy validation warnings detected")}let _,g;o?(u.update(o,{name:m,goal:f,strategy_graph:b,commit_sha:p,parent_id:s!==void 0?s:void 0,outcome_contract:a}),_=o,g=`Mission "${m}" updated.`):(_=u.create({name:m,goal:f,strategy_graph:b,status:"planned",git_branch:d,commit_sha:p,parent_id:s||null,verification_context:null,outcome_contract:a||null}),g=`Mission "${m}" planned.`);try{await new tt(e).syncMissionToGitNotes(Number(_))}catch(x){rs.warn({syncError:x,missionId:_},"Git Notes sync deferred")}return{content:[{type:"text",text:JSON.stringify({missionId:_,status:"planned",message:g,strategy_saved:!!y,contract_saved:!!a,from_template:l??void 0,commit:p},null,2)}]}}catch(m){throw rs.error({error:m,repoPath:e},"Failed to plan mission"),new Error(`Failed to plan mission: ${m instanceof Error?m.message:String(m)}`)}}F();X();X();F();F();var p$=$.child({module:"reasoning-engine"}),is=class{analyze(e){p$.debug({logCount:e.length},"Performing reasoning pass over intent logs");let r={context:[],decisions:[],consequences:[],recommendations:[],unclassified:[]};for(let i of e){let n=i.content.toLowerCase(),o=this.matchesContext(n,i.type),s=this.matchesDecision(n,i.type),a=this.matchesConsequence(n,i.type),l=this.matchesRecommendation(n,i.type);o?r.context.push(i.content):s?r.decisions.push(i.content):l?r.recommendations.push(i.content):a?r.consequences.push(i.content):i.type==="decision"?r.decisions.push(i.content):i.type==="discovery"||i.type==="fix"?r.consequences.push(i.content):r.unclassified.push(i.content)}return r}matchesContext(e,r){return["because","since","given","due to","context: ","problem: ","situation:"].some(n=>e.includes(n))||r==="blocker"}matchesDecision(e,r){return["decided","chose","implemented","integrated","using","selected","strategy:"].some(n=>e.includes(n))||r==="decision"}matchesConsequence(e,r){return["results in","enables","allows","impact: ","consequence: ","next steps: ","meaning"].some(n=>e.includes(n))||r==="fix"}matchesRecommendation(e,r){return["should","recommend","suggest","next work","future","consider","strategy advice"].some(n=>e.includes(n))}};var os=$.child({module:"briefing-engine"}),Nt=class{intentLogs;missions;reasoningEngine;persistencePivot;constructor(e){let{intentLogs:r,missions:i}=L.getInstance(e);this.intentLogs=r,this.missions=i,this.reasoningEngine=new is,this.persistencePivot=new tt(e)}async distillMission(e,r=!0){os.info({missionId:e},"Synthesizing mission intelligence into Tactical Briefing...");let i=this.gatherConsolidatedLogs(e);if(i.length===0)return{missionId:e,adr:"No intent logs found for this mission.",metrics:{totalLogs:0,symbolCount:0}};let n=this.reasoningEngine.analyze(i),o=new Set(i.map(a=>a.symbol_name).filter(Boolean)),s=`# Architectural Decision Record: Mission #${e}
538
466
 
539
467
  `;if(s+=`## Summary of Intent
540
468
  `,s+=`Collected ${i.length} intent events across ${o.size} symbols.
@@ -556,8 +484,9 @@ After that, ${e} and other tools will work.`+Br;return Ot("FILE_NOT_FOUND",r,{re
556
484
  `}),s+=`
557
485
  `),s+=`
558
486
  ---
559
- *Generated by Liquid Shadow Reasoning Engine v1*`,r){this.intentLogs.create({mission_id:e,type:"adr",content:s,confidence:1,symbol_id:null,file_path:null,symbol_name:null,signature:null,commit_sha:null});try{await this.persistencePivot.syncMissionToGitNotes(e),Ts.info({missionId:e},"Tactical Briefing synthesized, archived, and synced to Git Notes.")}catch(a){Ts.error({missionId:e,error:a},"Failed to sync ADR to Git Notes")}}else Ts.info({missionId:e},"Tactical Briefing synthesized (dry-run).");return{missionId:e,adr:s,metrics:{totalLogs:i.length,symbolCount:o.size}}}gatherConsolidatedLogs(e,r=0){let i=this.intentLogs.findByMission(e,500);if(r>2)return i;let n=this.missions.findByParentId(e);for(let o of n)i.push(...this.gatherConsolidatedLogs(o.id,r+1));return i.filter(o=>o.type!=="adr"&&o.type!=="system")}};F();import{Visitor as sS}from"@swc/core/Visitor.js";import*as fy from"@swc/core";var aS=$.child({module:"verification-engine"}),_d=class extends sS{foundUsage=!1;foundImport=!1;rule;currentFunctionName=null;constructor(e){super(),this.rule=e}visitImportDeclaration(e){return this.rule.type==="import"&&e.source.value===this.rule.target&&(this.foundImport=!0),super.visitImportDeclaration(e)}visitFunctionDeclaration(e){let r=this.currentFunctionName;this.currentFunctionName=e.identifier.value;let i=super.visitFunctionDeclaration(e);return this.currentFunctionName=r,i}visitCallExpression(e){return this.rule.type==="usage"&&e.callee.type==="Identifier"&&e.callee.value===this.rule.target&&(!this.rule.context||this.currentFunctionName===this.rule.context)&&(this.foundUsage=!0),super.visitCallExpression(e)}},Rs=class{async verify(e,r){try{let i=await fy.parse(e,{syntax:"typescript",tsx:!0,comments:!1}),n=new _d(r);n.visitProgram(i);let o=!1,s=[];if(r.type==="import")o=n.foundImport,o||s.push(`Required import "${r.target}" not found.`);else if(r.type==="usage"){if(o=n.foundUsage,!o){let a=r.context?` in function "${r.context}"`:"";s.push(`Required usage of "${r.target}"${a} not found.`)}}else r.type==="pattern"&&(o=new RegExp(r.target).test(e),o||s.push(`Required pattern "${r.target}" not found.`));return{passed:o,errors:s}}catch(i){return aS.error({error:i},"Verification failed due to parse error"),{passed:!1,errors:[`Parse error: ${i.message}`]}}}};import hy from"path";import Ps from"fs";var qn=$.child({module:"mcp:tools:ops:track"});async function gy(t){let{repoPath:e,missionId:r,stepId:i,status:n,contextPivot:o,updates:s,artifacts:a}=t,{missions:l,intentLogs:c}=L.getInstance(e),u=Ge(e);qn.info({repoPath:e,missionId:r,singleStep:i,batchCount:s?.length,artifactCount:a?.length},"Updating mission status");try{if(a&&Array.isArray(a))for(let m of a)l.addArtifact(r,m.type,m.identifier,m.metadata);let d=[];if(s&&Array.isArray(s)&&d.push(...s),i&&n&&d.push({stepId:i,status:n,contextPivot:o}),n&&!i){if(l.updateStatus(r,n,u||void 0),c.create({mission_id:r,type:"system",content:`Mission status changed to "${n}"`,confidence:1,symbol_id:null,file_path:null,symbol_name:null,signature:null,commit_sha:u}),n==="completed")try{await new Ct(e).distillMission(r),qn.info({missionId:r},"Auto-Synthesis completed successfully")}catch(m){qn.warn({synthesisError:m,missionId:r},"Auto-Synthesis deferred or failed")}if(!d.length)return{content:[{type:"text",text:JSON.stringify({missionId:r,status:n,message:"Mission status updated successfully.",artifacts_added:a?.length||0,commit:u},null,2)}]}}if(d.length===0&&(!a||a.length===0))throw new Error("No updates provided. Must specify either 'updates', 'stepId'/'status', 'status' (top-level), or 'artifacts'.");let p=[];for(let m of d){let{stepId:f,status:y,contextPivot:b}=m,_=l.findById(r);if(!_)throw new Error(`Mission ID ${r} not found`);let g=JSON.parse(_.strategy_graph||"{}"),x=null;if(Array.isArray(g)?x=g.find(E=>E.id===f):g.nodes&&Array.isArray(g.nodes)?x=g.nodes.find(E=>E.id===f):g.steps?Array.isArray(g.steps)?x=g.steps.find(E=>E.id===f):x=g.steps[f]:g[f]&&(x=g[f]),!x)throw new Error(`Step ID "${f}" not found`);if(y==="completed"&&x.verification){let E=new Rs,A=Array.isArray(x.verification)?x.verification:[x.verification];for(let I of A){let R=I.filePath;if(R&&!hy.isAbsolute(R)&&(R=hy.join(e,R)),R){if(!Ps.existsSync(R))throw new Error(`Verification failed: File not found at ${R}`);let k=await E.verify(Ps.readFileSync(R,"utf8"),I);if(!k.passed)throw new Error(`Verification failed: ${k.errors.join("")}`)}else{let k=l.getWorkingSet(r),j=!1;for(let w of k){if(!Ps.existsSync(w.file_path))continue;if((await E.verify(Ps.readFileSync(w.file_path,"utf8"),I)).passed){j=!0;break}}if(!j)throw new Error(`Verification failed for rule "${I.target}" in working set.`)}}}if(x.status=y,l.update(r,{strategy_graph:JSON.stringify(g),commit_sha:u}),c.create({mission_id:r,type:"system",content:`Step "${f}" updated to "${y}"`,confidence:1,symbol_id:null,file_path:null,symbol_name:null,signature:null,commit_sha:u}),b)try{let E=JSON.parse(b);if(l.clearWorkingSet(r),E.files&&Array.isArray(E.files))for(let A of E.files)l.addToWorkingSet(r,A)}catch(E){qn.warn({error:E},"Failed to apply context pivot")}p.push({stepId:f,status:y})}try{await new rt(e).syncMissionToGitNotes(r)}catch(m){qn.warn({syncError:m,missionId:r},"Git Notes sync deferred")}return{content:[{type:"text",text:JSON.stringify({missionId:r,updates:p,artifacts_added:a?.length||0,message:"Status updated",commit:u},null,2)}]}}catch(d){throw qn.error({error:d,repoPath:e},"Failed to update status"),new Error(`Failed to update status: ${d instanceof Error?d.message:String(d)}`)}}F();X();X();F();var yy=$.child({module:"lineage-service"}),nn=class{repoPath;constructor(e){this.repoPath=e}getAncestorMissionIds(e=50){try{let r=Tg(this.repoPath,e);if(r.length===0)return[];let{missions:i}=L.getInstance(this.repoPath),o=i.findByCommitShas(r).map(s=>s.id);return o.length>0&&yy.debug({count:o.length},"Identified ancestor missions for gravity bleed"),o}catch(r){return yy.warn({err:r.message},"Failed to identify ancestor missions"),[]}}};X();F();var cS=$.child({module:"collision-service"}),Ns=class{repoPath;constructor(e){this.repoPath=e}async analyzePotentialCollisions(){let e=be(this.repoPath);if(!e)return[];let{missions:r,intentLogs:i}=L.getInstance(this.repoPath),n=r.findActive().filter(a=>a.git_branch&&a.git_branch!==e),o=[],s=new Set;for(let a of n){let l=a.git_branch;if(s.has(l))continue;s.add(l),cS.info({branch:l,currentBranch:e},"Checking predictive collisions"),Rg(this.repoPath,e,l)&&o.push({branch:l,type:"file",description:`Background merge-tree detected a file-level conflict between '${e}' and '${l}'.`});let u=r.findActive(e),d=new Set;for(let f of u)r.getWorkingSet(f.id).forEach(y=>d.add(y.file_path));let m=r.getWorkingSet(a.id).filter(f=>d.has(f.file_path));m.length>0&&o.push({branch:l,type:"intent",description:`Logical conflict: Mission '${a.name}' on '${l}' is modifying files you are currently working on.`,conflictingFiles:m.map(f=>f.file_path)})}return o}};X();Fe();F();import{execSync as vy}from"child_process";import lS from"path";var zs=$.child({module:"shadow-trace"}),jt=class{intentLogs;exports;repoPath;hologramService;constructor(e){let{intentLogs:r,exports:i}=L.getInstance(e);this.intentLogs=r,this.exports=i,this.repoPath=e,this.hologramService=new ae(e)}analyzeGhostChanges(e){let r=e?`${e}..HEAD`:"HEAD~1..HEAD",i=[];try{let o=vy(`git diff --name-only ${r}`,{cwd:this.repoPath,encoding:"utf-8"}).split(`
560
- `).filter(s=>s.trim()!=="");if(o.length===0)return;zs.info({files:o.length,range:r},"Initiating Shadow Trace analysis...");for(let s of o){let a=lS.join(this.repoPath,s),c=vy(`git diff -U0 ${r} -- ${s}`,{cwd:this.repoPath,encoding:"utf-8"}).matchAll(/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/g);for(let u of c){let d=parseInt(u[2],10),p=this.exports.findAtLine(a,d);p&&(this.intentLogs.create({mission_id:0,file_path:a,symbol_id:p.id,type:"discovery",content:`Shadow Trace: Modified externally in ${r}`,confidence:.8,symbol_name:p.name,signature:p.signature,commit_sha:null}),zs.debug({symbol:p.name},"Logged ghost change"),i.push({from:"external",to:`${s}:${p.name}`,pattern:"git-delta",confidence:.8}))}}i.length>0&&this.hologramService.updateGhostBridges(i),zs.info("Shadow Trace complete.")}catch(n){zs.warn({err:n.message},"Shadow Trace failed: git diff error.")}}};var qr=$.child({module:"mcp:tools:ops:briefing"});async function Ds(t){let{repoPath:e,missionId:r,branch:i,scope:n="mission"}=t,{missions:o,intentLogs:s}=L.getInstance(e),a=Ge(e),l=be(e);qr.info({repoPath:e,missionId:r,branch:i,scope:n},"Generating briefing");try{if(n==="project"){let m=o.findActive(i),f=o.findParentOnlyIds(m),y=new Set(f),b=m.filter(w=>!y.has(w.id)),_={};for(let w of m)w.parent_id!=null&&(_[w.parent_id]||(_[w.parent_id]=[]),_[w.parent_id].push(w));let g={},x=new Map(m.map(w=>[w.id,w])),E=Object.keys(_).map(Number),A=E.filter(w=>!x.has(w)),I=A.length>0?o.findByIds(A):[],R=new Map(x);for(let w of I)R.set(w.id,w);for(let w of E){let P=R.get(w);P&&(g[w]={id:P.id,name:P.name??"",goal:P.goal??"",status:P.status??"unknown"})}let k={scope:"project",counts:o.getStats(),analytics:o.getAnalytics(),active_missions:m,parent_only_ids:f,missions_by_parent:_,parents_summary:Object.keys(g).length?g:void 0,close_parent_when_all_children_done:'When all children of a parent are completed, call shadow_ops_track({ missionId: <parent_id>, status: "completed" }) with no stepId.',next_work_candidates:b,recent_completed:o.findRecentCompleted(),recent_activity:s.findRecentDecisionActivity(),meta:{current_branch:l,current_commit:a}};if(t.includeGroupedByParent){let w=f.map(P=>{let J=m.find(M=>M.id===P),O=_[P]??[];return{parent:J,children:O}});k.missions_grouped_by_parent=w}let j=b.length===0?{tool:"shadow_ops_plan",reason:"No open work; create a mission"}:{tool:"shadow_ops_track",reason:"Pick one from next_work_candidates and run /continue"};return{content:[{type:"text",text:JSON.stringify(k,null,2)}],suggestedNext:j}}let c;if(r?c=o.findById(r):c=o.findActive(i||l||void 0)[0],!c)return{content:[{type:"text",text:"No active missions found. Ready for new assignment."}]};let u="No external shadow changes detected.";try{new jt(e).analyzeGhostChanges(c.commit_sha||void 0),u="Shadow Trace completed: Checked for external modifications."}catch(m){qr.warn({error:m},"Ghost analysis failed")}let d={repaired:0,failed:0};try{d=new Ne(e).detectAndRepairShifts()}catch(m){qr.warn({error:m},"Symbol shift repair failed")}let p={mission:{id:c.id,name:c.name,goal:c.goal,status:c.status,last_updated:new Date(c.updated_at*1e3).toISOString(),git_branch:c.git_branch,commit_sha:c.commit_sha,outcome_contract:c.outcome_contract},artifacts:o.getArtifacts(c.id),shadow_trace:{ghost_analysis:u,symbols_repaired:d.repaired,symbols_missing:d.failed},context:{current_commit:a,working_set:o.getWorkingSet(c.id).map(m=>m.file_path)},strategy_snapshot:c.strategy_graph?JSON.parse(c.strategy_graph):null,recent_activity:s.findByMission(c.id,15),ancestor_activity:[],predictive_collisions:[]};try{let m=new Ns(e);p.predictive_collisions=await m.analyzePotentialCollisions()}catch(m){qr.warn({error:m},"Predictive collision analysis failed")}if(t.includeLineage){let y=new nn(e).getAncestorMissionIds().filter(b=>b!==c?.id);if(y.length>0)for(let b of y){let _=s.findByMission(b,5);p.ancestor_activity.push(..._)}}return{content:[{type:"text",text:JSON.stringify(p,null,2)}]}}catch(c){throw qr.error({error:c,repoPath:e},"Failed to generate briefing"),new Error(`Failed to generate briefing: ${c instanceof Error?c.message:String(c)}`)}}X();F();var _y=$.child({module:"mcp:tools:ops:synthesize"});async function by(t){let{repoPath:e,missionId:r}=t;_y.info({repoPath:e,missionId:r},"Synthesizing mission");let{missions:i}=L.getInstance(e);try{if(!i.findById(r))throw new Error(`Mission ${r} not found`);let s=await new Ct(e).distillMission(r);return{content:[{type:"text",text:JSON.stringify({missionId:r,adr:s.adr,metrics:s.metrics},null,2)}]}}catch(n){throw _y.error({error:n,repoPath:e},"Failed to synthesize ADR"),new Error(`Failed to synthesize ADR: ${n instanceof Error?n.message:String(n)}`)}}F();X();F();var uS=$.child({module:"narrative-service"}),Kn=class{missions;briefingEngine;repoPath;constructor(e){this.repoPath=e;let{missions:r}=L.getInstance(e);this.missions=r,this.briefingEngine=new Ct(e)}async generateChronicle(e={}){uS.info(e,"Generating Repo Chronicle...");let i=this.missions.findAll().filter(c=>c.parent_id===null&&c.status!=="planned");e.since&&(i=i.filter(c=>c.updated_at>=e.since)),e.until&&(i=i.filter(c=>c.updated_at<=e.until)),i.sort((c,u)=>u.updated_at-c.updated_at);let n=e.offset||0,o=e.limit||10;i=i.slice(n,n+o);let s=[],a=[],l=[];for(let c of i){let u=this.missions.findByParentId(c.id),d=u.length>0,p=await this.briefingEngine.distillMission(c.id,!1);if(d){let m=[];for(let y of u)m.push(await this.mapMissionToEpisode(y));m.unshift(await this.mapMissionToEpisode(c));let f={kind:"initiative",root_mission_id:c.id,title:c.name,strategy_graph:c.strategy_graph?JSON.parse(c.strategy_graph):{},episodes:m,synthesized_narrative:p.adr};s.push(f),l.push(f)}else{let m=await this.mapMissionToEpisode(c,p.adr);a.push(m),l.push(m)}}return{repo_path:this.repoPath,generated_at:Date.now(),initiatives:s,unattached_episodes:a,timeline:l}}async mapMissionToEpisode(e,r){let i=r;return i||(i=(await this.briefingEngine.distillMission(e.id,!1)).adr),{kind:"episode",mission_id:e.id,title:e.name,goal:e.goal,outcome:e.outcome_contract,intents:[],adr_summary:i}}renderChronicleMarkdown(e){let r=`# Repository Chronicle
487
+ *Generated by Liquid Shadow Reasoning Engine v1*`,r){this.intentLogs.create({mission_id:e,type:"adr",content:s,confidence:1,symbol_id:null,file_path:null,symbol_name:null,signature:null,commit_sha:null});try{await this.persistencePivot.syncMissionToGitNotes(e),os.info({missionId:e},"Tactical Briefing synthesized, archived, and synced to Git Notes.")}catch(a){os.error({missionId:e,error:a},"Failed to sync ADR to Git Notes")}}else os.info({missionId:e},"Tactical Briefing synthesized (dry-run).");return{missionId:e,adr:s,metrics:{totalLogs:i.length,symbolCount:o.size}}}gatherConsolidatedLogs(e,r=0){let i=this.intentLogs.findByMission(e,500);if(r>2)return i;let n=this.missions.findByParentId(e);for(let o of n)i.push(...this.gatherConsolidatedLogs(o.id,r+1));return i.filter(o=>o.type!=="adr"&&o.type!=="system")}};F();import{Visitor as d$}from"@swc/core/Visitor.js";import*as ng from"@swc/core";var m$=$.child({module:"verification-engine"}),Vp=class extends d${foundUsage=!1;foundImport=!1;rule;currentFunctionName=null;constructor(e){super(),this.rule=e}visitImportDeclaration(e){return this.rule.type==="import"&&e.source.value===this.rule.target&&(this.foundImport=!0),super.visitImportDeclaration(e)}visitFunctionDeclaration(e){let r=this.currentFunctionName;this.currentFunctionName=e.identifier.value;let i=super.visitFunctionDeclaration(e);return this.currentFunctionName=r,i}visitCallExpression(e){return this.rule.type==="usage"&&e.callee.type==="Identifier"&&e.callee.value===this.rule.target&&(!this.rule.context||this.currentFunctionName===this.rule.context)&&(this.foundUsage=!0),super.visitCallExpression(e)}},ss=class{async verify(e,r){try{let i=await ng.parse(e,{syntax:"typescript",tsx:!0,comments:!1}),n=new Vp(r);n.visitProgram(i);let o=!1,s=[];if(r.type==="import")o=n.foundImport,o||s.push(`Required import "${r.target}" not found.`);else if(r.type==="usage"){if(o=n.foundUsage,!o){let a=r.context?` in function "${r.context}"`:"";s.push(`Required usage of "${r.target}"${a} not found.`)}}else r.type==="pattern"&&(o=new RegExp(r.target).test(e),o||s.push(`Required pattern "${r.target}" not found.`));return{passed:o,errors:s}}catch(i){return m$.error({error:i},"Verification failed due to parse error"),{passed:!1,errors:[`Parse error: ${i.message}`]}}}};import rg from"path";import as from"fs";var Mn=$.child({module:"mcp:tools:ops:track"});async function ig(t){let{repoPath:e,missionId:r,stepId:i,status:n,contextPivot:o,updates:s,artifacts:a}=t,{missions:l,intentLogs:c}=L.getInstance(e),u=He(e);Mn.info({repoPath:e,missionId:r,singleStep:i,batchCount:s?.length,artifactCount:a?.length},"Updating mission status");try{if(a&&Array.isArray(a))for(let m of a)l.addArtifact(r,m.type,m.identifier,m.metadata);let d=[];if(s&&Array.isArray(s)&&d.push(...s),i&&n&&d.push({stepId:i,status:n,contextPivot:o}),n&&!i){if(l.updateStatus(r,n,u||void 0),c.create({mission_id:r,type:"system",content:`Mission status changed to "${n}"`,confidence:1,symbol_id:null,file_path:null,symbol_name:null,signature:null,commit_sha:u}),n==="completed")try{await new Nt(e).distillMission(r),Mn.info({missionId:r},"Auto-Synthesis completed successfully")}catch(m){Mn.warn({synthesisError:m,missionId:r},"Auto-Synthesis deferred or failed")}if(!d.length)return{content:[{type:"text",text:JSON.stringify({missionId:r,status:n,message:"Mission status updated successfully.",artifacts_added:a?.length||0,commit:u},null,2)}]}}if(d.length===0&&(!a||a.length===0))throw new Error("No updates provided. Must specify either 'updates', 'stepId'/'status', 'status' (top-level), or 'artifacts'.");let p=[];for(let m of d){let{stepId:f,status:y,contextPivot:b}=m,_=l.findById(r);if(!_)throw new Error(`Mission ID ${r} not found`);let g=JSON.parse(_.strategy_graph||"{}"),x=null;if(Array.isArray(g)?x=g.find(E=>E.id===f):g.nodes&&Array.isArray(g.nodes)?x=g.nodes.find(E=>E.id===f):g.steps?Array.isArray(g.steps)?x=g.steps.find(E=>E.id===f):x=g.steps[f]:g[f]&&(x=g[f]),!x)throw new Error(`Step ID "${f}" not found`);if(y==="completed"&&x.verification){let E=new ss,A=Array.isArray(x.verification)?x.verification:[x.verification];for(let I of A){let R=I.filePath;if(R&&!rg.isAbsolute(R)&&(R=rg.join(e,R)),R){if(!as.existsSync(R))throw new Error(`Verification failed: File not found at ${R}`);let k=await E.verify(as.readFileSync(R,"utf8"),I);if(!k.passed)throw new Error(`Verification failed: ${k.errors.join("")}`)}else{let k=l.getWorkingSet(r),j=!1;for(let w of k){if(!as.existsSync(w.file_path))continue;if((await E.verify(as.readFileSync(w.file_path,"utf8"),I)).passed){j=!0;break}}if(!j)throw new Error(`Verification failed for rule "${I.target}" in working set.`)}}}if(x.status=y,l.update(r,{strategy_graph:JSON.stringify(g),commit_sha:u}),c.create({mission_id:r,type:"system",content:`Step "${f}" updated to "${y}"`,confidence:1,symbol_id:null,file_path:null,symbol_name:null,signature:null,commit_sha:u}),b)try{let E=JSON.parse(b);if(l.clearWorkingSet(r),E.files&&Array.isArray(E.files))for(let A of E.files)l.addToWorkingSet(r,A)}catch(E){Mn.warn({error:E},"Failed to apply context pivot")}p.push({stepId:f,status:y})}try{await new tt(e).syncMissionToGitNotes(r)}catch(m){Mn.warn({syncError:m,missionId:r},"Git Notes sync deferred")}return{content:[{type:"text",text:JSON.stringify({missionId:r,updates:p,artifacts_added:a?.length||0,message:"Status updated",commit:u},null,2)}]}}catch(d){throw Mn.error({error:d,repoPath:e},"Failed to update status"),new Error(`Failed to update status: ${d instanceof Error?d.message:String(d)}`)}}F();X();X();F();var og=$.child({module:"lineage-service"}),Xt=class{repoPath;constructor(e){this.repoPath=e}getAncestorMissionIds(e=50){try{let r=jh(this.repoPath,e);if(r.length===0)return[];let{missions:i}=L.getInstance(this.repoPath),o=i.findByCommitShas(r).map(s=>s.id);return o.length>0&&og.debug({count:o.length},"Identified ancestor missions for gravity bleed"),o}catch(r){return og.warn({err:r.message},"Failed to identify ancestor missions"),[]}}};X();F();var f$=$.child({module:"collision-service"}),cs=class{repoPath;constructor(e){this.repoPath=e}async analyzePotentialCollisions(){let e=_e(this.repoPath);if(!e)return[];let{missions:r,intentLogs:i}=L.getInstance(this.repoPath),n=r.findActive().filter(a=>a.git_branch&&a.git_branch!==e),o=[],s=new Set;for(let a of n){let l=a.git_branch;if(s.has(l))continue;s.add(l),f$.info({branch:l,currentBranch:e},"Checking predictive collisions"),Mh(this.repoPath,e,l)&&o.push({branch:l,type:"file",description:`Background merge-tree detected a file-level conflict between '${e}' and '${l}'.`});let u=r.findActive(e),d=new Set;for(let f of u)r.getWorkingSet(f.id).forEach(y=>d.add(y.file_path));let m=r.getWorkingSet(a.id).filter(f=>d.has(f.file_path));m.length>0&&o.push({branch:l,type:"intent",description:`Logical conflict: Mission '${a.name}' on '${l}' is modifying files you are currently working on.`,conflictingFiles:m.map(f=>f.file_path)})}return o}};X();Be();F();import{execSync as Tg}from"child_process";import v$ from"path";var ys=$.child({module:"shadow-trace"}),Ot=class{intentLogs;exports;repoPath;hologramService;constructor(e){let{intentLogs:r,exports:i}=L.getInstance(e);this.intentLogs=r,this.exports=i,this.repoPath=e,this.hologramService=new pe(e)}analyzeGhostChanges(e){let r=e?`${e}..HEAD`:"HEAD~1..HEAD",i=[];try{let o=Tg(`git diff --name-only ${r}`,{cwd:this.repoPath,encoding:"utf-8"}).split(`
488
+ `).filter(s=>s.trim()!=="");if(o.length===0)return;ys.info({files:o.length,range:r},"Initiating Shadow Trace analysis...");for(let s of o){let a=v$.join(this.repoPath,s),c=Tg(`git diff -U0 ${r} -- ${s}`,{cwd:this.repoPath,encoding:"utf-8"}).matchAll(/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/g);for(let u of c){let d=parseInt(u[2],10),p=this.exports.findAtLine(a,d);p&&(this.intentLogs.create({mission_id:0,file_path:a,symbol_id:p.id,type:"discovery",content:`Shadow Trace: Modified externally in ${r}`,confidence:.8,symbol_name:p.name,signature:p.signature,commit_sha:null}),ys.debug({symbol:p.name},"Logged ghost change"),i.push({from:"external",to:`${s}:${p.name}`,pattern:"git-delta",confidence:.8}))}}i.length>0&&this.hologramService.updateGhostBridges(i),ys.info("Shadow Trace complete.")}catch(n){ys.warn({err:n.message},"Shadow Trace failed: git diff error.")}}};X();F();import{execSync as Rg}from"child_process";var Qt=$.child({module:"nano-repair"}),Pe=class{intentLogs;exports;missions;repoPath;constructor(e){let{intentLogs:r,exports:i,missions:n}=L.getInstance(e);this.intentLogs=r,this.exports=i,this.missions=n,this.repoPath=e}detectAndRepairShifts(){let e=this.intentLogs.findRepairableOrphans();if(e.length===0)return{repaired:0,failed:0};Qt.info({count:e.length},"Detected orphaned intent logs. Attempting recovery...");let r=0,i=0;for(let n of e){let o=this.exports.findByNameAndFile(n.symbol_name,n.file_path);if(o.length>0){let a=o.find(l=>l.signature===n.signature)||o[0];this.intentLogs.update(n.id,{symbol_id:a.id}),Qt.info({logId:n.id,symbol:n.symbol_name},"Relinked symbol in same file"),r++;continue}let s=this.exports.findByNameGlobal(n.symbol_name);if(s.length>0){let a=s.filter(l=>l.file_path!==n.file_path);if(a.length>0){let l=a.find(c=>c.signature===n.signature)||a[0];this.intentLogs.update(n.id,{symbol_id:l.id,file_path:l.file_path}),Qt.info({logId:n.id,symbol:n.symbol_name,oldPath:n.file_path,newPath:l.file_path},"Detected Nano-Repair Shift (file move)"),r++;continue}}i++}return r>0&&Qt.info({repaired:r,failed:i},"Nano-Repair recovery complete"),{repaired:r,failed:i}}syncLifecycle(){let e="HEAD";try{e=Rg("git rev-parse --abbrev-ref HEAD",{cwd:this.repoPath,encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).trim()}catch{return{suspended:0,resumed:0,completed:0}}if(!e)return{suspended:0,resumed:0,completed:0};let r=this.missions.findActive(),i=0;for(let s of r)s.git_branch&&s.git_branch!==e&&(this.missions.updateStatus(s.id,"suspended"),Qt.info({missionId:s.id,branch:s.git_branch,current:e},"Context Pivot: Suspended mission"),i++);this.missions.resumeByBranch(e);let n=[];try{n=Rg(`git branch --merged "${e}"`,{cwd:this.repoPath,encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).split(`
489
+ `).map(a=>a.trim().replace(/^\* /,"")).filter(a=>a&&a!==e)}catch{}let o=0;if(n.length>0){let s=this.missions.findMergedMissions(e,n);for(let a of s)this.missions.updateStatus(a.id,"completed"),Qt.info({missionId:a.id,branch:a.git_branch},"Merge Sentinel: Auto-completed mission"),o++}return(i>0||o>0)&&Qt.info({suspended:i,completed:o},"Git-Native Lifecycle Sync complete"),{suspended:i,resumed:-1,completed:o}}};var jr=$.child({module:"mcp:tools:ops:briefing"});async function vs(t){let{repoPath:e,missionId:r,branch:i,scope:n="mission"}=t,{missions:o,intentLogs:s}=L.getInstance(e),a=He(e),l=_e(e);jr.info({repoPath:e,missionId:r,branch:i,scope:n},"Generating briefing");try{if(n==="project"){let m=o.findActive(i),f=o.findParentOnlyIds(m),y=new Set(f),b=m.filter(w=>!y.has(w.id)),_={};for(let w of m)w.parent_id!=null&&(_[w.parent_id]||(_[w.parent_id]=[]),_[w.parent_id].push(w));let g={},x=new Map(m.map(w=>[w.id,w])),E=Object.keys(_).map(Number),A=E.filter(w=>!x.has(w)),I=A.length>0?o.findByIds(A):[],R=new Map(x);for(let w of I)R.set(w.id,w);for(let w of E){let P=R.get(w);P&&(g[w]={id:P.id,name:P.name??"",goal:P.goal??"",status:P.status??"unknown"})}let k={scope:"project",counts:o.getStats(),analytics:o.getAnalytics(),active_missions:m,parent_only_ids:f,missions_by_parent:_,parents_summary:Object.keys(g).length?g:void 0,close_parent_when_all_children_done:'When all children of a parent are completed, call shadow_ops_track({ missionId: <parent_id>, status: "completed" }) with no stepId.',next_work_candidates:b,recent_completed:o.findRecentCompleted(),recent_activity:s.findRecentDecisionActivity(),meta:{current_branch:l,current_commit:a}};if(t.includeGroupedByParent){let w=f.map(P=>{let J=m.find(M=>M.id===P),O=_[P]??[];return{parent:J,children:O}});k.missions_grouped_by_parent=w}let j=b.length===0?{tool:"shadow_ops_plan",reason:"No open work; create a mission"}:{tool:"shadow_ops_track",reason:"Pick one from next_work_candidates and run /continue"};return{content:[{type:"text",text:JSON.stringify(k,null,2)}],suggestedNext:j}}let c;if(r?c=o.findById(r):c=o.findActive(i||l||void 0)[0],!c)return{content:[{type:"text",text:"No active missions found. Ready for new assignment."}]};let u="No external shadow changes detected.";try{new Ot(e).analyzeGhostChanges(c.commit_sha||void 0),u="Shadow Trace completed: Checked for external modifications."}catch(m){jr.warn({error:m},"Ghost analysis failed")}let d={repaired:0,failed:0};try{d=new Pe(e).detectAndRepairShifts()}catch(m){jr.warn({error:m},"Symbol shift repair failed")}let p={mission:{id:c.id,name:c.name,goal:c.goal,status:c.status,last_updated:new Date(c.updated_at*1e3).toISOString(),git_branch:c.git_branch,commit_sha:c.commit_sha,outcome_contract:c.outcome_contract},artifacts:o.getArtifacts(c.id),shadow_trace:{ghost_analysis:u,symbols_repaired:d.repaired,symbols_missing:d.failed},context:{current_commit:a,working_set:o.getWorkingSet(c.id).map(m=>m.file_path)},strategy_snapshot:c.strategy_graph?JSON.parse(c.strategy_graph):null,recent_activity:s.findByMission(c.id,15),ancestor_activity:[],predictive_collisions:[]};try{let m=new cs(e);p.predictive_collisions=await m.analyzePotentialCollisions()}catch(m){jr.warn({error:m},"Predictive collision analysis failed")}if(t.includeLineage){let y=new Xt(e).getAncestorMissionIds().filter(b=>b!==c?.id);if(y.length>0)for(let b of y){let _=s.findByMission(b,5);p.ancestor_activity.push(..._)}}return{content:[{type:"text",text:JSON.stringify(p,null,2)}]}}catch(c){throw jr.error({error:c,repoPath:e},"Failed to generate briefing"),new Error(`Failed to generate briefing: ${c instanceof Error?c.message:String(c)}`)}}X();F();var Pg=$.child({module:"mcp:tools:ops:synthesize"});async function Ng(t){let{repoPath:e,missionId:r}=t;Pg.info({repoPath:e,missionId:r},"Synthesizing mission");let{missions:i}=L.getInstance(e);try{if(!i.findById(r))throw new Error(`Mission ${r} not found`);let s=await new Nt(e).distillMission(r);return{content:[{type:"text",text:JSON.stringify({missionId:r,adr:s.adr,metrics:s.metrics},null,2)}]}}catch(n){throw Pg.error({error:n,repoPath:e},"Failed to synthesize ADR"),new Error(`Failed to synthesize ADR: ${n instanceof Error?n.message:String(n)}`)}}F();X();F();var _$=$.child({module:"narrative-service"}),Un=class{missions;briefingEngine;repoPath;constructor(e){this.repoPath=e;let{missions:r}=L.getInstance(e);this.missions=r,this.briefingEngine=new Nt(e)}async generateChronicle(e={}){_$.info(e,"Generating Repo Chronicle...");let i=this.missions.findAll().filter(c=>c.parent_id===null&&c.status!=="planned");e.since&&(i=i.filter(c=>c.updated_at>=e.since)),e.until&&(i=i.filter(c=>c.updated_at<=e.until)),i.sort((c,u)=>u.updated_at-c.updated_at);let n=e.offset||0,o=e.limit||10;i=i.slice(n,n+o);let s=[],a=[],l=[];for(let c of i){let u=this.missions.findByParentId(c.id),d=u.length>0,p=await this.briefingEngine.distillMission(c.id,!1);if(d){let m=[];for(let y of u)m.push(await this.mapMissionToEpisode(y));m.unshift(await this.mapMissionToEpisode(c));let f={kind:"initiative",root_mission_id:c.id,title:c.name,strategy_graph:c.strategy_graph?JSON.parse(c.strategy_graph):{},episodes:m,synthesized_narrative:p.adr};s.push(f),l.push(f)}else{let m=await this.mapMissionToEpisode(c,p.adr);a.push(m),l.push(m)}}return{repo_path:this.repoPath,generated_at:Date.now(),initiatives:s,unattached_episodes:a,timeline:l}}async mapMissionToEpisode(e,r){let i=r;return i||(i=(await this.briefingEngine.distillMission(e.id,!1)).adr),{kind:"episode",mission_id:e.id,title:e.name,goal:e.goal,outcome:e.outcome_contract,intents:[],adr_summary:i}}renderChronicleMarkdown(e){let r=`# Repository Chronicle
561
490
 
562
491
  `;if(r+=`*Generated at ${new Date(e.generated_at).toISOString()}*
563
492
 
@@ -568,27 +497,64 @@ After that, ${e} and other tools will work.`+Br;return Ot("FILE_NOT_FOUND",r,{re
568
497
  `,r+=`${i.adr_summary}
569
498
 
570
499
  `),r+=`---
571
- `;return r}};var xy=$.child({module:"mcp:tools:ops:chronicle"});async function $y(t){let{repoPath:e,format:r="markdown",...i}=t,n=new Kn(e);xy.info({repoPath:e,format:r,filters:i},"Generating Chronicle");try{let o=await n.generateChronicle(i),s={tool:"shadow_ops_briefing",reason:"Current backlog and next work"};return r==="json"?{content:[{type:"text",text:JSON.stringify(o,null,2)}],suggestedNext:s}:{content:[{type:"text",text:n.renderChronicleMarkdown(o)}],suggestedNext:s}}catch(o){throw xy.error({error:o,repoPath:e},"Failed to generate chronicle"),new Error(`Failed to generate chronicle: ${o instanceof Error?o.message:String(o)}`)}}Fe();async function Sy(t){let{repoPath:e}=t,i=new ae(e).getSnapshot(),o=await new Kn(e).generateChronicle({limit:5}),a=(await Ds({repoPath:e,scope:"project",includeGroupedByParent:!1})).content?.[0],l=a&&a.type==="text"?a.text:"{}",c={};try{c=JSON.parse(l)}catch{}let u={counts:c.counts,next_work_candidates:c.next_work_candidates??[],active_count:Array.isArray(c.active_missions)?c.active_missions.length:0};return{content:[{type:"text",text:JSON.stringify({hologram:i,chronicle:o,briefing:u},null,2)}],suggestedNext:{tool:u.next_work_candidates.length>0?"shadow_ops_track":"shadow_ops_plan",reason:u.next_work_candidates.length>0?"Pick one from next_work_candidates and run /continue":"No open work; create a mission"}}}F();Pt();import bd from"path";var ky=$.child({module:"mcp:tools:ops:health"});async function Ey(t){let e=t.repoPath,r=bd.isAbsolute(e)?bd.normalize(e):bd.resolve(process.cwd(),e);ky.info({repoPath:r},"Health check");let i=!1,n=!1;try{Ae(r),i=!0,n=je(r)}catch(l){ky.debug({repoPath:r,error:l},"Health: DB check failed")}let o=ds(),s={status:i?n?"ready":"index_pending":"db_unavailable",database:i,indexed:n,metrics:{index:o.index,query:o.query,uptimeMs:o.uptimeMs}},a=n?{tool:"shadow_recon_hologram",reason:"Architecture overview"}:{tool:"shadow_recon_onboard",reason:"Index the repo first"};return{content:[{type:"text",text:JSON.stringify(s,null,2)}],suggestedNext:a}}X();F();var Kr=$.child({module:"mcp:tools:ops:log"});async function wy(t){let{repoPath:e,missionId:r,type:i,content:n,filePath:o,symbolName:s}=t;Kr.info({repoPath:e,type:i,symbolName:s},"Logging intent");let{missions:a,exports:l,intentLogs:c}=L.getInstance(e);try{let u=r??null;if(u){if(!a.findById(u))throw new Error(`Mission ${u} not found. Use shadow_ops_briefing to see available missions.`)}else{let y=a.findActive();y.length>0?(u=y[0].id,Kr.debug({missionId:u},"Auto-resolved to active mission")):(u=null,Kr.debug("No active mission found, logging as system/unlinked intent"))}let d=null,p=null,m=s||null;if(s){let b=(o?l.findByNameAndFile(s,o):l.findByName(s))[0];b?(d=b.id,p=b.signature,m=b.name):Kr.warn({symbolName:s,filePath:o},"Symbol not found for intent linking")}let f=c.create({mission_id:u,symbol_id:d,file_path:o||null,type:i,content:n,confidence:1,symbol_name:m,signature:p,commit_sha:null});return{content:[{type:"text",text:JSON.stringify({logId:f,missionId:u,symbolId:d,status:"logged",message:d?`Intent linked to symbol "${s}"`:"Intent logged (unlinked)"},null,2)}]}}catch(u){throw Kr.error({error:u,repoPath:e},"Failed to log intent"),new Error(`Failed to log intent: ${u instanceof Error?u.message:String(u)}`)}}F();var Py=$.child({module:"mcp:tools:ops:graph"});async function Ny(t){let{repoPath:e,missionId:r,depth:i,limit:n,format:o="mermaid"}=t;Py.info({repoPath:e,missionId:r,format:o},"Generating mission graph");try{let{GraphExporterService:s}=await Promise.resolve().then(()=>(Ry(),Ty));return{content:[{type:"text",text:await new s(e).generateGraph({includeCompleted:!0,format:o,focusMissionId:r,depth:i,limit:n})}]}}catch(s){throw Py.error({error:s,repoPath:e},"Failed to generate mission graph"),new Error(`Failed to generate mission graph: ${s.message}`)}}X();var Yr=class{static extractSnippet(e,r,i=300){if(!e||!r)return"";let n=r.toLowerCase().split(/\s+/).filter(p=>p.length>2&&!["the","and","for","with","from"].includes(p));if(n.length===0)return e.slice(0,i)+"...";let o=e.split(`
500
+ `;return r}};var zg=$.child({module:"mcp:tools:ops:chronicle"});async function Dg(t){let{repoPath:e,format:r="markdown",...i}=t,n=new Un(e);zg.info({repoPath:e,format:r,filters:i},"Generating Chronicle");try{let o=await n.generateChronicle(i),s={tool:"shadow_ops_briefing",reason:"Current backlog and next work"};return r==="json"?{content:[{type:"text",text:JSON.stringify(o,null,2)}],suggestedNext:s}:{content:[{type:"text",text:n.renderChronicleMarkdown(o)}],suggestedNext:s}}catch(o){throw zg.error({error:o,repoPath:e},"Failed to generate chronicle"),new Error(`Failed to generate chronicle: ${o instanceof Error?o.message:String(o)}`)}}Be();async function Og(t){let{repoPath:e}=t,i=new pe(e).getSnapshot(),o=await new Un(e).generateChronicle({limit:5}),a=(await vs({repoPath:e,scope:"project",includeGroupedByParent:!1})).content?.[0],l=a&&a.type==="text"?a.text:"{}",c={};try{c=JSON.parse(l)}catch{}let u={counts:c.counts,next_work_candidates:c.next_work_candidates??[],active_count:Array.isArray(c.active_missions)?c.active_missions.length:0};return{content:[{type:"text",text:JSON.stringify({hologram:i,chronicle:o,briefing:u},null,2)}],suggestedNext:{tool:u.next_work_candidates.length>0?"shadow_ops_track":"shadow_ops_plan",reason:u.next_work_candidates.length>0?"Pick one from next_work_candidates and run /continue":"No open work; create a mission"}}}F();Kt();var Qp=class{startTime=Date.now();indexRuns=0;indexCacheHits=0;lastIndexDurationMs=null;lastIndexCompletedAt=null;lastRunPhases=[];queryCount=0;lastQueryLatencyMs=null;recentLatencySumMs=0;recentLatencyCount=0;recentLatencies=[];searchHistoryFailureCount=0;recordIndexStart(){this.indexRuns+=1}recordIndexCacheHit(){this.indexCacheHits+=1}recordIndexEnd(e){this.lastIndexDurationMs=e,this.lastIndexCompletedAt=Date.now()}recordIndexPhase(e,r){this.lastRunPhases.push({phase:e,durationMs:r})}clearIndexPhases(){this.lastRunPhases=[]}recordQueryStart(){let e=performance.now();return()=>{this.queryCount+=1;let r=performance.now()-e;if(this.lastQueryLatencyMs=r,this.recentLatencies.push(r),this.recentLatencies.length>100){let i=this.recentLatencies.shift();this.recentLatencySumMs=this.recentLatencySumMs-i+r}else this.recentLatencySumMs+=r,this.recentLatencyCount=this.recentLatencies.length}}recordSearchHistoryFailure(){this.searchHistoryFailureCount+=1}getSnapshot(){let e=this.recentLatencies.length,r=e>0?this.recentLatencies.reduce((i,n)=>i+n,0)/e:null;return{index:{runs:this.indexRuns,cacheHits:this.indexCacheHits,lastDurationMs:this.lastIndexDurationMs,lastCompletedAt:this.lastIndexCompletedAt,lastRunPhases:[...this.lastRunPhases]},query:{count:this.queryCount,lastLatencyMs:this.lastQueryLatencyMs,recentLatencySumMs:this.recentLatencySumMs,recentLatencyCount:e,avgLatencyMs:r,searchHistoryFailures:this.searchHistoryFailureCount},uptimeMs:Date.now()-this.startTime}}reset(){this.indexRuns=0,this.indexCacheHits=0,this.lastIndexDurationMs=null,this.lastIndexCompletedAt=null,this.lastRunPhases=[],this.queryCount=0,this.lastQueryLatencyMs=null,this.recentLatencySumMs=0,this.recentLatencyCount=0,this.recentLatencies=[],this.searchHistoryFailureCount=0}},At=new Qp;function Ag(){At.recordIndexStart()}function ed(){At.recordIndexCacheHit()}function Lg(t){At.recordIndexEnd(t)}function _s(t,e){At.recordIndexPhase(t,e)}function Cg(){At.clearIndexPhases()}function Fn(){return At.recordQueryStart()}function mt(){At.recordSearchHistoryFailure()}function jg(){return At.getSnapshot()}import td from"path";var Mg=$.child({module:"mcp:tools:ops:health"});async function Ug(t){let e=t.repoPath,r=td.isAbsolute(e)?td.normalize(e):td.resolve(process.cwd(),e);Mg.info({repoPath:r},"Health check");let i=!1,n=!1;try{Oe(r),i=!0,n=Qe(r)}catch(l){Mg.debug({repoPath:r,error:l},"Health: DB check failed")}let o=jg(),s={status:i?n?"ready":"index_pending":"db_unavailable",database:i,indexed:n,metrics:{index:o.index,query:o.query,uptimeMs:o.uptimeMs}},a=n?{tool:"shadow_recon_hologram",reason:"Architecture overview"}:{tool:"shadow_recon_onboard",reason:"Index the repo first"};return{content:[{type:"text",text:JSON.stringify(s,null,2)}],suggestedNext:a}}X();F();var Mr=$.child({module:"mcp:tools:ops:log"});async function Fg(t){let{repoPath:e,missionId:r,type:i,content:n,filePath:o,symbolName:s}=t;Mr.info({repoPath:e,type:i,symbolName:s},"Logging intent");let{missions:a,exports:l,intentLogs:c}=L.getInstance(e);try{let u=r??null;if(u){if(!a.findById(u))throw new Error(`Mission ${u} not found. Use shadow_ops_briefing to see available missions.`)}else{let y=a.findActive();y.length>0?(u=y[0].id,Mr.debug({missionId:u},"Auto-resolved to active mission")):(u=null,Mr.debug("No active mission found, logging as system/unlinked intent"))}let d=null,p=null,m=s||null;if(s){let b=(o?l.findByNameAndFile(s,o):l.findByName(s))[0];b?(d=b.id,p=b.signature,m=b.name):Mr.warn({symbolName:s,filePath:o},"Symbol not found for intent linking")}let f=c.create({mission_id:u,symbol_id:d,file_path:o||null,type:i,content:n,confidence:1,symbol_name:m,signature:p,commit_sha:null});return{content:[{type:"text",text:JSON.stringify({logId:f,missionId:u,symbolId:d,status:"logged",message:d?`Intent linked to symbol "${s}"`:"Intent logged (unlinked)"},null,2)}]}}catch(u){throw Mr.error({error:u,repoPath:e},"Failed to log intent"),new Error(`Failed to log intent: ${u instanceof Error?u.message:String(u)}`)}}F();var Bg=$.child({module:"mcp:tools:ops:graph"});async function Jg(t){let{repoPath:e,missionId:r,depth:i,limit:n,format:o="mermaid"}=t;Bg.info({repoPath:e,missionId:r,format:o},"Generating mission graph");try{let{GraphExporterService:s}=await Promise.resolve().then(()=>(Wg(),Hg));return{content:[{type:"text",text:await new s(e).generateGraph({includeCompleted:!0,format:o,focusMissionId:r,depth:i,limit:n})}]}}catch(s){throw Bg.error({error:s,repoPath:e},"Failed to generate mission graph"),new Error(`Failed to generate mission graph: ${s.message}`)}}import b$ from"fast-glob";import rd from"fs";import x$ from"ignore";import Vg from"path";async function id(t,e=[]){let r=x$(),i=Vg.join(t,".gitignore");return rd.existsSync(i)&&r.add(rd.readFileSync(i,"utf8")),e.length>0&&r.add(e),(await b$($h,{cwd:t,absolute:!0,ignore:Fo})).filter(s=>{let a=Vg.relative(t,s);return!r.ignores(a)}).map(s=>({path:s,mtime:rd.statSync(s).mtimeMs}))}import N$ from"@swc/core";import cd from"fs";function Gg(t){let e=t.split(`
501
+ `),r=[],i=0;for(let n of e)r.push(i),i+=n.length+1;return r}function ae(t,e){for(let r=0;r<e.length;r++)if(e[r+1]>t||r===e.length-1)return r+1;return 1}function ce(t,e){return e.slice(0,t).toString("utf8").length}function qg(t,e,r){let i=t.start-e,n=t.end-e;return i<0||n>r.length?"":r.slice(i,n).toString("utf8")}function Kg(t){let e=[],r=/\/\*\*[\s\S]*?\*\//g,i;for(;(i=r.exec(t))!==null;)e.push({start:i.index,end:i.index+i[0].length,text:i[0]});return e}function rt(t,e,r){for(let i of e){if(i.start===t)return i.text;if(i.start>t&&i.start<t+50){let n=r.substring(t,i.start);if(/^\s*$/.test(n))return i.text}if(i.end<=t&&i.end>t-50){let n=r.substring(i.end,t);if(/^\s*$/.test(n))return i.text}}return""}function Yg(t){if(!t)return"";let r=t.replace(/\/\*\*|\*\/|\*/g,"").trim().split(`
502
+ `)[0].trim();return r.length>200?r.substring(0,197)+"...":r}function bs(t,e,r){let i=t.toLowerCase(),n=e.toLowerCase();return i.includes("components/")||i.endsWith(".tsx")?"Component":i.startsWith("use")||n.startsWith("use")?"Hook":i.includes("models/")||n.endsWith("model")?"Model":i.includes("services/")||i.includes("controllers/")||i.includes("handlers/")||i.includes("mcp/")||i.endsWith("service.ts")||i.endsWith("controller.ts")||i.endsWith("handler.ts")||n.endsWith("service")||n.endsWith("controller")||n.endsWith("handler")?"Service":i.includes("repositories/")||i.includes("repos/")||i.endsWith("repository.ts")||i.endsWith("repo.ts")||n.endsWith("repository")||n.endsWith("repo")?"Repository":r==="TsInterfaceDeclaration"||r==="TsTypeAliasDeclaration"?"Type Definition":"Other"}function Ur(t){let e=[];return/\b(fetch|axios|superagent|got)\s*\(|import\s+.*\b(http|https|node-fetch)\b/i.test(t)&&e.push("Network"),(/\b(knex|prisma|typeorm|mongoose|sequelize|pg|mysql|sqlite3)\b/i.test(t)||/\b(SELECT\s+.*FROM|INSERT\s+INTO|UPDATE\s+.*SET|DELETE\s+FROM)\b/i.test(t)||/\.query\s*\(|\.execute\s*\(/i.test(t)&&/db|database|client|pool/i.test(t))&&e.push("Database"),(/\bfs\./i.test(t)||/\b(readFileSync|writeFileSync|readFile|writeFile|readdir)\b/.test(t)||/import\s+.*\bfs\b/.test(t))&&e.push("File System"),(/\b(localStorage|sessionStorage|indexedDB)\./.test(t)||/\bdocument\.cookie\b/.test(t))&&e.push("Browser Storage"),e}function ft(t,e){if(!t)return"";let r=t.replace(/^([\s\S]*?\*\/)?\s*/,"").replace(/^.*\} from ['"].*['"];?\s*/,"").replace(/^import .*['"];?\s*/,"").trim();if(e==="TsInterfaceDeclaration"||e==="TsTypeAliasDeclaration")return r;let i=0,n=0,o=r.length;for(let s=0;s<r.length;s++){let a=r[s];if(a==="(")i++;else if(a===")")i--;else if(a==="<")n++;else if(a===">")n--;else if(a==="{"){if(i===0&&n===0){o=s;break}}else if(a==="; "&&i===0&&n===0){o=s;break}else if(a==="="&&r[s+1]===">"&&i===0&&n===0){o=s+2;break}}return r.substring(0,o).trim()}function Xg(t){let e=[];for(let r of t)r.type==="ImportDeclaration"&&e.push({module:r.source.value,name:r.specifiers.map(i=>i.type==="ImportDefaultSpecifier"?"default":i.type==="ImportNamespaceSpecifier"?"*":i.local?.value||i.imported?.value||"*").join("","")}),r.type==="ExportAllDeclaration"&&e.push({module:r.source.value,name:"*"}),r.type==="ExportNamedDeclaration"&&r.source&&e.push({module:r.source.value,name:r.specifiers.map(i=>i.type==="ExportSpecifier"?i.orig.value:"*").join(", ")});return e}function Qg(t,e,r,i,n,o,s,a){let l=[];for(let c of t){if(c.type==="ExportDeclaration"){let u=c.declaration,d=u.type,p="";d==="VariableDeclaration"?p=u.declarations.map(g=>g.id.value).join("",""):p=u.id?.value||u.identifier?.value||"anonymous";let m=ce(c.span.start-e,r),f=ce(c.span.end-e,r),y=rt(m,o,i),b=a(c.span),_=[];if(c.type==="ExportDeclaration"&&(d==="ClassDeclaration"||d==="ClassExpression")){let g=u.body||[];for(let x of g)if(x.type==="ClassMethod"||x.type==="ClassProperty"){let E=x.key.value;if(!E)continue;let A=ce(x.span.start-e,r),I=ce(x.span.end-e,r),R=a(x.span),k=rt(A,o,i);_.push({name:E,kind:x.type,signature:ft(R,x.type),line:ae(A,n),endLine:ae(I,n),doc:k,classification:x.type==="ClassMethod"?"Method":"Property",capabilities:"[]"})}}else if(d==="FunctionDeclaration"&&u.body?.type==="BlockStatement")_=od(u.body.stmts,e,r,i,n,o,a);else if(d==="VariableDeclaration"){for(let g of u.declarations)if(g.init&&(g.init.type==="ArrowFunctionExpression"||g.init.type==="FunctionExpression")&&g.init.body?.type==="BlockStatement"){_=od(g.init.body.stmts,e,r,i,n,o,a);break}}l.push({name:p,kind:d,signature:ft(b,d),line:ae(m,n),endLine:ae(f,n),doc:y,classification:bs(s,p,d),capabilities:JSON.stringify(Ur(b)),members:_})}if(c.type==="ExportNamedDeclaration"){for(let u of c.specifiers)if(u.type==="ExportSpecifier"){let d=ce(c.span.start-e,r),p=ce(c.span.end-e,r),m=rt(d,o,i);l.push({name:u.exported?.value||u.orig.value,kind:"ExportSpecifier",signature:`export { ${u.orig.value} }`,line:ae(d,n),endLine:ae(p,n),doc:m,classification:"Export mapping",capabilities:"[]"})}}if(c.type==="ExportDefaultDeclaration"){let u=ce(c.span.start-e,r),d=ce(c.span.end-e,r),p=rt(u,o,i),m=a(c.span),f=[];if(c.decl.type==="ClassExpression"||c.decl.type==="ClassDeclaration"){let y=c.decl.body||[];for(let b of y)if(b.type==="ClassMethod"||b.type==="ClassProperty"){let _=b.key.value;if(!_)continue;let g=ce(b.span.start-e,r),x=ce(b.span.end-e,r),E=a(b.span),A=rt(g,o,i);f.push({name:_,kind:b.type,signature:ft(E,b.type),line:ae(g,n),endLine:ae(x,n),doc:A,classification:b.type==="ClassMethod"?"Method":"Property",capabilities:"[]"})}}else(c.decl.type==="FunctionExpression"||c.decl.type==="FunctionDeclaration"||c.decl.type==="ArrowFunctionExpression")&&c.decl.body?.type==="BlockStatement"&&(f=od(c.decl.body.stmts,e,r,i,n,o,a));l.push({name:"default",kind:"DefaultExport",signature:ft(m,"DefaultExport"),line:ae(u,n),endLine:ae(d,n),doc:p,classification:"Default Export",capabilities:JSON.stringify(Ur(m)),members:f})}if(c.type==="ExportAllDeclaration"){let u=ce(c.span.start-e,r),d=ce(c.span.end-e,r),p=c.source.value,m=rt(u,o,i);l.push({name:"*",kind:"ExportAllDeclaration",signature:`export * from "${p}"`,line:ae(u,n),endLine:ae(d,n),doc:m,classification:"Re-export",capabilities:"[]"})}}return l}function od(t,e,r,i,n,o,s){let a=[];for(let l of t){if(l.type==="VariableDeclaration")for(let c of l.declarations){let u=[],d=p=>{if(p.type==="Identifier")u.push({name:p.value,span:p.span});else if(p.type==="ArrayPattern")for(let m of p.elements)m&&d(m);else if(p.type==="ObjectPattern")for(let m of p.properties)m.type==="AssignmentPatternProperty"?u.push({name:m.key.value,span:m.span}):m.type==="KeyValuePatternProperty"&&d(m.value)};d(c.id);for(let p of u){let m=ce(p.span.start-e,r),f=ce(p.span.end-e,r),y=s(p.span),b=rt(m,o,i);a.push({name:p.name,kind:"VariableDeclaration",signature:ft(y,"VariableDeclaration"),line:ae(m,n),endLine:ae(f,n),doc:b,classification:"Internal Variable",capabilities:"[]"})}}if(l.type==="FunctionDeclaration"){let c=l.identifier?.value||l.ident?.value||"anonymous",u=ce(l.span.start-e,r),d=ce(l.span.end-e,r),p=s(l.span),m=rt(u,o,i);a.push({name:c,kind:"FunctionDeclaration",signature:ft(p,"FunctionDeclaration"),line:ae(u,n),endLine:ae(d,n),doc:m,classification:"Internal Function",capabilities:"[]"})}if(l.type==="ReturnStatement"&&l.argument?.type==="ObjectExpression")for(let c of l.argument.properties){let u="",d=c.span||c.key?.span||c.ident?.span;if(c.type==="KeyValueProperty"){let p=c.key;u=p?.value||p?.raw||(p?.type==="Identifier"?p.value:"")}else c.type==="MethodProperty"?u=c.key?.value||c.key?.raw||"":c.type==="ShorthandProperty"?u=c.ident?.value||"":c.type==="Identifier"&&(u=c.value||"");if(u&&d){let p=ce(d.start-e,r),m=ce(d.end-e,r),f=s(d),y=rt(p,o,i);a.push({name:u,kind:"ReturnProperty",signature:ft(f,"ReturnProperty"),line:ae(p,n),endLine:ae(m,n),doc:y,classification:"Return Member",capabilities:"[]"})}}if(l.type==="ExpressionStatement"&&l.expression.type==="CallExpression"){let c=l.expression;if(c.callee.type==="MemberExpression"&&(c.callee.property?.value==="on"||c.callee.property?.value==="once")){let u=c.arguments[0]?.expression?.value,d=c.arguments[1]?.expression;if(u&&d&&(d.type==="ArrowFunctionExpression"||d.type==="FunctionExpression")){let p=ce(d.span.start-e,r),m=ce(d.span.end-e,r),f=s(d.span);a.push({name:`on:${u}`,kind:d.type,signature:ft(f,d.type),line:ae(p,n),endLine:ae(m,n),doc:"",classification:"Event Handler",capabilities:"[]"})}}}}return a}function ey(t,e,r,i,n){let o=[];function s(a){if(!(!a||typeof a!="object")){if(a.type==="CallExpression"){let l=$$(a);if(l){let c=ce(a.span.start-e,r);o.push({...l,line:ae(c,i),snippet:n(a.span)})}}for(let l of Object.keys(a)){if(l==="span")continue;let c=a[l];Array.isArray(c)?c.forEach(s):typeof c=="object"&&s(c)}}}return t.forEach(s),o}function $$(t){let{callee:e,arguments:r}=t;if(!r||r.length===0)return null;if(e.type==="MemberExpression"&&e.property?.type==="Identifier"){let i=e.property.value;if(i==="emit"&&r[0].expression.type==="StringLiteral")return{type:"socket_event",name:r[0].expression.value,direction:"produce"};if(i==="on"&&r[0].expression.type==="StringLiteral")return{type:"socket_event",name:r[0].expression.value,direction:"consume"};let n=["get","post","put","delete","patch"];if(n.includes(i)&&r[0].expression.type==="StringLiteral"){let o=r[0].expression.value;if(o.startsWith("/"))return{type:"api_route",name:o,direction:"consume"}}if(n.includes(i)&&r[0].expression.type==="StringLiteral"&&e.object.type==="Identifier"&&["axios","http","request"].includes(e.object.value))return{type:"api_route",name:r[0].expression.value,direction:"produce"}}return e.type==="Identifier"&&e.value==="fetch"&&r[0].expression.type==="StringLiteral"?{type:"api_route",name:r[0].expression.value,direction:"produce"}:null}function Fr(t){let{classification:e,capabilities:r,exports:i,fileName:n}=t,o={Network:"API integration",Database:"data persistence","File System":"file I/O operations","Browser Storage":"client-side storage"},s=r.map(f=>o[f]).filter(Boolean).join(" and "),l={Component:(f,y)=>{let b=y.find(g=>g.kind==="FunctionDeclaration"||g.kind==="ClassDeclaration")?.name,_=b?`React component: ${b}`:"React UI component";return f?`${_} with ${f}`:_},Hook:(f,y)=>{let b=y.find(g=>g.name.startsWith("use"))?.name,_=b?`Custom React hook: ${b}`:"Custom React hook";return f?`${_} for ${f}`:_},Service:(f,y)=>{let _=`Service layer: ${y[0]?.name||"Service"}`;return f?`${_} handling ${f}`:_},Repository:(f,y)=>`Data repository: ${y[0]?.name||"Repository"} for ${f||"data access"}`,"Type Definition":(f,y)=>`Type definitions: ${y.slice(0,3).map(_=>_.name).join("")}${y.length>3?"...":""}`,Model:(f,y)=>`Data model: ${y[0]?.name||"Model"}`,"HTTP Route":(f,y)=>{let b=y.filter(_=>_.classification==="Service Boundary");return b.length>0?`API endpoints: ${b.slice(0,3).map(_=>_.name).join("")}`:"API route handler"},"Micro IR (PHP)":(f,y)=>{let b=y.some(g=>g.classification==="Service Boundary"),_=y.find(g=>g.kind==="ClassDeclaration")?.name;return b?"PHP controller with API routes":_?`PHP class: ${_}`:"PHP module"},"Micro IR (Python)":(f,y)=>{let b=y.some(g=>g.classification==="Service Boundary"),_=y.find(g=>g.kind==="ClassDeclaration")?.name;return b?"Python API handler with routes":_?`Python class: ${_}`:"Python module"},"Micro IR (Go/TS) ":(f,y)=>{let b=y.some(g=>g.kind==="TypeDeclaration"),_=y.filter(g=>g.kind==="FunctionDeclaration");return b&&_.length>0?`Go package: types and ${_.length} function(s)`:b?"Go package: type definitions":_.length>0?`Go package: ${_[0].name} and ${_.length} function(s)`:"Go module"},"Micro IR (Rust/TS) ":(f,y)=>{let b=y.find(x=>x.kind==="TraitDeclaration")?.name,_=y.find(x=>x.kind==="StructDeclaration")?.name,g=y.filter(x=>x.kind==="FunctionDeclaration");return b?f.includes("Rust trait")?`Rust module: trait ${b}`:`Rust module: ${b}`:_?`Rust module: struct ${_}`:g.length>0?`Rust module: ${g.length} function(s)`:"Rust module"}}[e];if(l)return l(s,i);if(i.length===0)return n?`Module: ${n}`:"Module with no exports";let c=i.filter(f=>f.kind==="FunctionDeclaration"),u=i.filter(f=>f.kind==="ClassDeclaration"),d=i.filter(f=>f.kind==="TsInterfaceDeclaration"||f.kind==="TsTypeAliasDeclaration"),p=[];if(u.length>0&&p.push(`Class: ${u[0].name}`),c.length>0){let f=c.slice(0,2).map(y=>y.name).join("");p.push(`Functions: ${f}`)}d.length>0&&p.push(`Types: ${d.length}`);let m=p.length>0?p.join(" | "):`Module with ${i.length} export(s)`;return s?`${m} \u2014 ${s}`:m}function ty(t){let e=new Set;function r(i){if(!(!i||typeof i!="object")){i.typeAnnotation&&me(i.typeAnnotation,e),(i.type==="TsTypeReference"||i.type==="TsTypeAnnotation")&&me(i,e);for(let n in i){if(n==="span"||n==="comments"||n==="interpreter")continue;let o=i[n];o&&typeof o=="object"&&(Array.isArray(o)?o.forEach(r):r(o))}}}return t.forEach(i=>r(i)),Array.from(e)}function me(t,e){if(t){if(t.type==="TsTypeAnnotation"){me(t.typeAnnotation,e);return}t.type==="TsTypeReference"&&(t.typeName?.type==="Identifier"&&e.add(t.typeName.value),t.typeName?.type==="TsQualifiedName"&&ny(t.typeName,e),t.typeParams&&me(t.typeParams,e)),t.type==="TsArrayType"&&me(t.elementType,e),t.type==="TsUnionType"&&t.types?.forEach(r=>me(r,e)),t.type==="TsIntersectionType"&&t.types?.forEach(r=>me(r,e)),t.type==="TsTupleType"&&t.elemTypes?.forEach(r=>me(r.ty,e)),(t.type==="TsFunctionType"||t.type==="TsConstructorType")&&(t.params?.forEach(r=>me(r.typeAnnotation,e)),t.typeAnnotation&&me(t.typeAnnotation,e)),t.type==="TsTypeParameterDeclaration"&&t.params?.forEach(r=>{r.constraint&&me(r.constraint,e),r.default&&me(r.default,e)}),t.type==="TsTypeParameterInstantiation"&&t.params?.forEach(r=>me(r,e)),t.type==="TsMappedType"&&t.typeAnnotation&&me(t.typeAnnotation,e),t.type==="TsIndexedAccessType"&&(me(t.objectType,e),me(t.indexType,e)),t.type==="TsConditionalType"&&(me(t.checkType,e),me(t.extendsType,e),me(t.trueType,e),me(t.falseType,e)),t.type==="TsTypeLiteral"&&t.members?.forEach(r=>{r.typeAnnotation&&me(r.typeAnnotation,e)})}}function ny(t,e){t.type==="TsQualifiedName"?(t.left&&ny(t.left,e),t.right?.value&&e.add(t.right.value)):t.type==="Identifier"&&e.add(t.value)}import cy from"path";import ad from"path";F();import sy from"path";import T$ from"fs";import{fileURLToPath as R$}from"url";import*as en from"web-tree-sitter";import{fileURLToPath as S$}from"node:url";import{dirname as sd,join as iy,resolve as k$}from"node:path";import{existsSync as E$}from"node:fs";var w$=S$(import.meta.url),ry=sd(w$);function I$(){let t=ry;for(;t!==sd(t);){if(E$(iy(t,"package.json")))return t;t=sd(t)}return k$(ry,"..","..")}function Zn(...t){return iy(I$(),...t)}var HP=sy.dirname(R$(import.meta.url)),oy=$.child({module:"parser:tree-sitter"}),xs=class{parser=null;languages=new Map;async ensureInitialized(){if(this.parser)return;let e=en.Parser||en;await e.init(),this.parser=new e}async getLanguage(e){if(this.languages.has(e))return this.languages.get(e);let r=Zn("resources","grammars",`tree-sitter-${this.getLangName(e)}.wasm`);if(!T$.existsSync(r))return oy.warn({grammarPath:r},"Grammar WASM not found"),null;try{let i=await en.Language.load(r);return this.languages.set(e,i),i}catch(i){return oy.error({err:i,ext:e},"Failed to load language grammar"),null}}getLangName(e){switch(e.toLowerCase()){case".php":return"php";case".py":return"python";case".go":return"go";case".rs":return"rust";default:return""}}getQueries(e){switch(e.toLowerCase()){case".php":return`
503
+ (function_definition name: (name) @name) @func
504
+ (class_declaration name: (name) @name) @class
505
+ (interface_declaration name: (name) @name) @interface
506
+ (trait_declaration name: (name) @name) @trait
507
+ (method_declaration name: (name) @name) @method
508
+ (namespace_use_declaration (namespace_use_clause (qualified_name) @name)) @import
509
+ `;case".py":return`
510
+ (function_definition name: (identifier) @name) @func
511
+ (class_definition name: (identifier) @name) @class
512
+ (import_statement name: (dotted_name) @name) @import
513
+ (import_from_statement module_name: (dotted_name) @name) @import
514
+ `;case".go":return`
515
+ (function_declaration name: (identifier) @name) @func
516
+ (method_declaration name: (identifier) @name) @func
517
+ (type_declaration (type_spec name: (identifier) @name)) @type
518
+ (import_spec path: (interpreted_string_literal) @name) @import
519
+ `;case".rs":return`
520
+ (function_item name: (identifier) @name) @func
521
+ (struct_item name: (_type_identifier) @name) @struct
522
+ (enum_item name: (_type_identifier) @name) @enum
523
+ (trait_item name: (_type_identifier) @name) @trait
524
+ (type_item name: (_type_identifier) @name) @type
525
+ (use_declaration argument: (_) @name) @import
526
+ `;default:return""}}mapKind(e,r){if(e==="import")return"ImportDeclaration";if(r===".php"){if(e==="func")return"FunctionDeclaration";if(e==="class")return"ClassDeclaration";if(e==="interface")return"InterfaceDeclaration";if(e==="trait")return"TraitDeclaration";if(e==="method")return"MethodDeclaration"}if(r===".py"){if(e==="func")return"FunctionDeclaration";if(e==="class")return"ClassDeclaration"}if(r===".go"){if(e==="func")return"FunctionDeclaration";if(e==="type")return"TypeDeclaration"}if(r===".rs"){if(e==="func")return"FunctionDeclaration";if(e==="struct")return"StructDeclaration";if(e==="enum")return"EnumDeclaration";if(e==="trait")return"TraitDeclaration";if(e==="type")return"TypeDeclaration"}return"Unknown"}mapClassification(e){return e==="import"?"Dependency":e==="func"||e==="method"?"Function":e==="class"||e==="interface"||e==="trait"||e==="struct"||e==="enum"||e==="type"?"Class":"Other"}async parse(e,r){await this.ensureInitialized();let i=sy.extname(e).toLowerCase(),n=await this.getLanguage(i);if(!n||!this.parser)return[];this.parser.setLanguage(n);let o=this.parser.parse(r),s=r.split(`
527
+ `),a=this.getQueries(i);if(!a)return[];let c=new en.Query(n,a).matches(o.rootNode),u=[];for(let d of c){let p=d.captures.find(y=>y.name==="name")?.node,m=d.captures[0].node,f=d.captures[0].name;if(p){let y=m.startPosition.row+1,b=m.endPosition.row+1,_=s[m.startPosition.row].trim();u.push({name:p.text,kind:this.mapKind(f,i),classification:this.mapClassification(f),signature:_,line:y,endLine:b,doc:"",capabilities:"{}"})}}return u}};var $s=class{parse(e,r=!1){let i=[],n=[],o=e.split(`
528
+ `),s="",a="",l=0,c=0,u=-1,d=-1,p=[],m=[],f=!1,y=r?"api":"",b="",_=/^namespace\s+([a-zA-Z0-9_\\]+);/,g=/^(?:abstract\s+)?(?:readonly\s+)?class\s+([a-zA-Z0-9_]+)/,x=/^interface\s+([a-zA-Z0-9_]+)/,E=/^trait\s+([a-zA-Z0-9_]+)/,A=/^(?:public|protected|private|static|\s)*function\s+([a-zA-Z0-9_]+)\s*\(/,I=/^use\s+([a-zA-Z0-9_\\]+)(?:\s+as\s+([a-zA-Z0-9_]+))?;/,R=/^#\[([a-zA-Z0-9_\\]+)(?:\((.*)\))?\]/,k=/(?:Route::|router->|\$router->|->)(get|post|put|delete|patch|match)\s*\(\s*(?:uri\s*:\s*)?['"]([^'"]+)['"]/,j=/->prefix\s*\(\s*(?:prefix\s*:\s*)?['"]([^'"]+)['"]/;for(let w=0;w<o.length;w++){let P=o[w].trim();if(!P)continue;let J=(P.match(/{/g)||[]).length,O=(P.match(/}/g)||[]).length,M=c;if(c+=J-O,a&&c<=d){let H=i.find(W=>W.name===a&&W.line===l);H&&(H.endLine=w+1),a="",d=-1}if(s&&c<=u){let H=i.find(W=>W.name===s&&(W.kind==="ClassDeclaration"||W.kind==="TraitDeclaration"||W.kind==="InterfaceDeclaration"));H&&(H.endLine=w+1),s="",u=-1}let q=P.match(j);if(q&&(y=q[1]),P.includes("});")&&(y=""),P.startsWith("/**")){f=!0,m=[];continue}if(f){P.endsWith("*/")?f=!1:m.push(P.replace(/^\*\s?/,""));continue}let oe=P.match(R);if(oe){p.push(oe[1]);continue}let B=P.match(_);if(B){b=B[1]||"",p=[],m=[];continue}let Z=P.match(g);if(Z){s=Z[1],u=c-J;let H={attributes:p};b&&(H.namespace=b),i.push({name:s,kind:"ClassDeclaration",classification:"Class",signature:`class ${s}`,line:w+1,endLine:w+1,doc:m.join(`
529
+ `).trim(),capabilities:JSON.stringify(H),members:[]}),p=[],m=[];continue}let V=P.match(x);if(V){let H=V[1];s=H,u=c-J,i.push({name:H,kind:"InterfaceDeclaration",classification:"Interface",signature:`interface ${H}`,line:w+1,endLine:w+1,doc:m.join(`
530
+ `).trim(),capabilities:JSON.stringify({attributes:p}),members:[]}),p=[],m=[];continue}let U=P.match(E);if(U){let H=U[1];s=H,u=c-J,i.push({name:H,kind:"TraitDeclaration",classification:"Trait",signature:`trait ${H}`,line:w+1,endLine:w+1,doc:m.join(`
531
+ `).trim(),capabilities:JSON.stringify({attributes:p}),members:[]}),p=[],m=[];continue}let ee=P.match(A);if(ee){let H=ee[1],W=!!s;a=H,l=w+1,d=c-J;let Ft=!1,st={};for(let xe of p)xe.toLowerCase().includes("route")&&(Ft=!0,st={type:"route",method:"GET",path:"/"});let at=m.join(`
532
+ `).trim();if(Ft){let xe=st.path||"/";i.push({name:xe,kind:"HTTP Route",classification:"Service Boundary",signature:`Function: ${H}`,line:w+1,endLine:w+1,doc:at,capabilities:JSON.stringify({type:"route",handler:s?`${s}@${H}`:H,...st})}),n.push({type:"api_route",name:xe,direction:"consume",line:w+1,snippet:P})}i.push({name:H,kind:W?"MethodDeclaration":"FunctionDeclaration",classification:W?"Method":"Function",signature:`${W?s+":: ":""}${H}`,line:w+1,endLine:w+1,doc:at,capabilities:JSON.stringify({attributes:p})}),p=[],m=[];continue}let fe=P.match(I);if(fe){let H=fe[1]||"",W=fe[2]||H.split("\\").pop()||"";i.push({name:W,kind:"ImportSpecifier",classification:"Dependency",signature:`use ${H}`,line:w+1,endLine:w+1,doc:"",capabilities:JSON.stringify({type:"use",namespace:H})}),p=[],m=[];continue}let se=P.match(k);if(se){let H=se[1].toUpperCase(),W=se[2];if(P.includes("Route::")||P.includes("router->")||P.includes("action")||P.includes(",")&&!P.includes("view(")){if(y){let vt=y.startsWith("/")?y:`/${y}`,Ms=W.startsWith("/")?W:`/${W}`;W=(vt+Ms).replace(/\/+/g,"/")}let st=null,at=P.match(/\[\s*([a-zA-Z0-9_]+)::class\s*,\s*['"]([^'"]+)['"]\s*\]/);if(at)st=`${at[1]}@${at[2]}`;else if(P.includes("::class")){let vt=P.match(/([a-zA-Z0-9_]+)::class/);vt&&(st=vt[1])}let xe=P;!P.endsWith(");")&&w+1<o.length&&(xe+=" "+o[w+1].trim(),!xe.endsWith(");")&&w+2<o.length&&(xe+=" "+o[w+2].trim())),i.push({name:W,kind:"HTTP Route",classification:"Service Boundary",signature:xe,line:w+1,endLine:w+1,doc:"",capabilities:JSON.stringify({type:"route",method:H,path:W,handler:st})}),n.push({type:"api_route",name:W,direction:"consume",line:w+1,snippet:xe,method:H,url:W}),m=[];continue}}let he=/(?:\$client|client|Http)::(get|post|put|delete|patch|request)\s*\(\s*(?:url\s*:\s*)?([^,)]+)|(?:\$client|client)->(request|get|post|put|delete|patch)\s*\(\s*([^,)]+)/,le=P.match(he);if(le){let H=(le[1]||le[3]).toUpperCase(),W=(le[2]||le[4]).trim();(W.startsWith("'")&&W.endsWith("'")||W.startsWith('"')&&W.endsWith('"'))&&(W=W.substring(1,W.length-1)),n.push({type:"api_route",name:W,direction:"produce",line:w+1,snippet:P,method:H,url:W})}!P.startsWith("#[")&&!P.startsWith("//")&&!P.startsWith("*")&&!f&&(p=[],m=[])}return{nodes:i,events:n}}};var Ss=class{currentRoutePrefix="";parse(e){this.currentRoutePrefix="";let r=[],i=[],n=e.split(`
533
+ `),o=[{indent:-1,name:"root",type:"root"}],s=[],a=/^class\s+([a-zA-Z0-9_]+)/,l=/^async\s+def\s+([a-zA-Z0-9_]+)|^def\s+([a-zA-Z0-9_]+)/,c=/^(?:from\s+([a-zA-Z0-9_\.]+)\s+import|import\s+([a-zA-Z0-9_\.]+))/,u=/^@(.*)/;function d(_){return _.trim().split(/[.(]/)[0]?.trim()||_}function p(_){let g=_.decorators.map(E=>d(E.raw)),x={decorators:_.decorators,decoratorNames:g};return _.async===!0&&(x.async=!0),JSON.stringify(x)}let m=!1,f="",y=[],b=[];for(let _=0;_<n.length;_++){let g=n[_],x=g.trim();if(!x||x.startsWith("#"))continue;let E=/^([a-zA-Z0-9_]+)\s*=\s*(?:APIRouter|Blueprint)\s*\(\s*(?:prefix\s*=\s*)?['"]([^'"]+)['"]/,A=x.match(E);if(A&&(this.currentRoutePrefix=A[2]),m){if(x.endsWith(f)||x.includes(f)){m=!1;let Z=x.replace(f,"").trim();Z&&y.push(Z);let V=o[o.length-1];V.node&&(V.node.doc=y.join(`
534
+ `).trim()),y=[]}else y.push(x);continue}let I=g.search(/\S/),R=g.trim(),k=R.match(/^(['"]{3})/);if(k){let Z=k[1],V=o[o.length-1];if(V.node&&!V.node.doc){if(R.substring(3).includes(Z)){let U=R.replace(new RegExp(Z,"g"),"").trim();V.node.doc=U}else{m=!0,f=Z;let U=R.substring(3).trim();U&&y.push(U)}continue}}for(;o.length>1&&o[o.length-1].indent>=I;)o.pop();let j=o[o.length-1],w=R.match(u);if(w){s.push({raw:w[1].trim(),line:_+1});continue}let P=R.match(a);if(P){let Z=P[1],V={name:Z,kind:"ClassDeclaration",classification:"Class",signature:`class ${Z}`,line:_+1,endLine:_+1,doc:"",capabilities:p({decorators:s}),members:[]};b.push(V),j.node?(j.node.members||(j.node.members=[]),j.node.members.push(V)):r.push(V),o.push({indent:I,name:Z,type:"class",node:V}),s=[];continue}let J=R.match(l);if(J){let Z=!!J[1],V=J[1]||J[2],U=j.type==="class",ee=!1,fe={};for(let W of s)if(W.raw.match(/(?:app|router)\.(get|post|put|delete|patch)/)){ee=!0;let st=["get","post","put","delete","patch"].find(vt=>W.raw.toLowerCase().includes(`.${vt}`))?.toUpperCase()||"GET",at=W.raw.match(/['"]([^'"]+)['"]/),xe=at?at[1]:"/";if(this.currentRoutePrefix){let vt=this.currentRoutePrefix.endsWith("/")?this.currentRoutePrefix.slice(0,-1):this.currentRoutePrefix,Ms=xe.startsWith("/")?xe:`/${xe}`;xe=vt+Ms}fe={type:"route",method:st,path:xe}}if(ee){let W=fe.path||"",Ft={name:W||V,kind:"HTTP Route",classification:"Service Boundary",signature:`Function: ${V}`,line:_+1,endLine:_+1,doc:"",capabilities:JSON.stringify({handler:U?`${j.name}.${V}`:V,async:Z,...fe})};b.push(Ft),r.push(Ft),i.push({type:"api_route",name:W,direction:"consume",line:_+1,snippet:R})}let se=s.some(W=>W.raw==="staticmethod"),he=s.some(W=>W.raw==="classmethod"),le=`${Z?"async ":""}${U?(se?"@staticmethod ":he?"@classmethod ":"")+j.name+".":""}${V}`,H={name:V,kind:Z&&U?"AsyncMethodDeclaration":Z?"AsyncFunctionDeclaration":U?"MethodDeclaration":"FunctionDeclaration",classification:U?se||he?"Static Method":"Method":"Function",signature:le,line:_+1,endLine:_+1,doc:"",capabilities:p({decorators:s,async:Z}),members:[]};b.push(H),j.node?(j.node.members||(j.node.members=[]),j.node.members.push(H)):r.push(H),o.push({indent:I,name:V,type:"function",node:H}),s=[];continue}let O=/^(?:path|re_path|url)\s*\(\s*['"]([^'"]+)['"]/,M=R.match(O);if(M){let Z=M[1].replace(/^\^/,""),V={name:Z,kind:"HTTP Route",classification:"Service Boundary",signature:R.trim(),line:_+1,endLine:_+1,doc:"",capabilities:JSON.stringify({type:"route",method:"GET",path:Z})};b.push(V),r.push(V),i.push({type:"api_route",name:Z,direction:"consume",line:_+1,snippet:R});continue}let q=/(?:requests|httpx|client|http)\.(get|post|put|delete|patch|request)\s*\(\s*(?:url\s*:\s*)?([^,)]+)/,oe=R.match(q);if(oe){let Z=oe[1].toUpperCase(),V=oe[2].trim();(V.startsWith("'")&&V.endsWith("'")||V.startsWith('"')&&V.endsWith('"'))&&(V=V.substring(1,V.length-1)),i.push({type:"api_route",name:V,direction:"produce",line:_+1,snippet:R,method:Z,url:V})}let B=R.match(c);if(B){let Z=B[1]||B[2],V={name:Z,kind:"ImportSpecifier",classification:"Dependency",signature:`import ${Z}`,line:_+1,endLine:_+1,doc:"",capabilities:JSON.stringify({type:"import",module:Z})};b.push(V),r.push(V),s=[];continue}s=[],j.node&&(j.node.endLine=_+1)}return{nodes:b,events:i}}};var ay=[{extension:[".php"],rules:[]},{extension:[".py"],rules:[]},{extension:[".go"],rules:[{regex:/func\s+([a-zA-Z0-9_]+)\(/g,onMatch:t=>({name:t[1],kind:"FunctionDeclaration",classification:"Function",signature:t[0]})},{regex:/func\s+\([^\)]+\)\s+([a-zA-Z0-9_]+)\(/g,onMatch:t=>({name:t[1],kind:"MethodDeclaration",classification:"Method",signature:t[0]})},{regex:/import\s+['"]([^'"]+)['"]/g,onMatch:t=>({name:t[1],kind:"ImportSpecifier",classification:"Dependency",signature:t[0],meta:{type:"import",path:t[1]}})}]},{extension:[".rs"],rules:[{regex:/fn\s+([a-zA-Z0-9_]+)\s*\(/g,onMatch:t=>({name:t[1],kind:"FunctionDeclaration",classification:"Function",signature:t[0]})},{regex:/struct\s+([a-zA-Z0-9_]+)/g,onMatch:t=>({name:t[1],kind:"StructDeclaration",classification:"Class",signature:t[0]})},{regex:/enum\s+([a-zA-Z0-9_]+)/g,onMatch:t=>({name:t[1],kind:"EnumDeclaration",classification:"Class",signature:t[0]})},{regex:/trait\s+([a-zA-Z0-9_]+)/g,onMatch:t=>({name:t[1],kind:"TraitDeclaration",classification:"Class",signature:t[0]})},{regex:/use\s+([a-zA-Z0-9_:]+(?:\s+as\s+[a-zA-Z0-9_]+)?);/g,onMatch:t=>({name:t[1].trim(),kind:"ImportDeclaration",classification:"Dependency",signature:t[0],meta:{type:"import",path:t[1].trim()}})}]},{extension:[".ts",".tsx",".js",".jsx",".mjs",".cjs"],rules:[{regex:/(?:export\s+)?(?:async\s+)?function\s+([a-zA-Z0-9_]+)\s*\(/g,onMatch:t=>({name:t[1],kind:"FunctionDeclaration",classification:"Function"})},{regex:/(?:export\s+)?class\s+([a-zA-Z0-9_]+)/g,onMatch:t=>({name:t[1],kind:"ClassDeclaration",classification:"Class"})},{regex:/(?:export\s+)?interface\s+([a-zA-Z0-9_]+)/g,onMatch:t=>({name:t[1],kind:"InterfaceDeclaration",classification:"Interface"})},{regex:/(?:export\s+)?const\s+([a-zA-Z0-9_]+)\s*=/g,onMatch:t=>({name:t[1],kind:"VariableDeclaration",classification:"Constant"})},{regex:/import\s+.*\s+from\s+['"]([^'"]+)['"]/g,onMatch:t=>({name:t[1],kind:"ImportDeclaration",classification:"Dependency",meta:{path:t[1]}})}]}];function P$(t,e){let r=[];if(t===".go"&&e.some(i=>i.kind==="TypeDeclaration")&&r.push("Go type"),t===".rs"&&(e.some(i=>i.kind==="TraitDeclaration")&&r.push("Rust trait"),e.some(i=>i.kind==="StructDeclaration")&&r.push("Rust struct"),e.some(i=>i.kind==="EnumDeclaration")&&r.push("Rust enum")),t===".py"){for(let i of e)if(i.capabilities)try{if(JSON.parse(i.capabilities).decoratorNames?.length){r.push("Python decorators");break}}catch{}e.some(i=>i.kind==="AsyncFunctionDeclaration"||i.kind==="AsyncMethodDeclaration")&&r.push("Async")}return r}var ks=class{phpParser=new $s;pythonParser=new Ss;treeSitterParser=new xs;supports(e){return ay.some(r=>r.extension.includes(e.toLowerCase()))}async parse(e,r){let i=ad.extname(e).toLowerCase(),n=[],o=[];if(i===".php"||i===".py"||i===".go"||i===".rs"){if(i===".py"){let l=this.pythonParser.parse(r);n=l.nodes,o=l.events}else if(i===".php"){let l=e.toLowerCase().endsWith("api.php"),c=this.phpParser.parse(r,l);n=c.nodes,o=c.events}else try{n=await this.treeSitterParser.parse(e,r)}catch{}if(n.length>0){let l=i===".php"?"Micro IR (PHP/TS) ":i===".py"?"Micro IR (Python/TS) ":i===".go"?"Micro IR (Go/TS) ":"Micro IR (Rust/TS) ",c=n.filter(m=>m.classification!=="Dependency"),u=n.filter(m=>m.classification==="Dependency"),d=P$(i,n),p=Fr({classification:l,capabilities:d,exports:c.map(m=>({name:m.name,kind:m.kind,classification:m.classification})),fileName:ad.basename(e)});return{exports:c,imports:u.map(m=>({module:m.name,name:m.name,kind:m.kind,classification:m.classification})),events:o,classification:l,summary:p||`${i.substring(1).toUpperCase()} module`,parseStatus:"success"}}}let s=ay.find(l=>l.extension.includes(i));if(!s)return{exports:[],imports:[],classification:"Unknown",summary:"",parseStatus:"failed",parseError:`Unsupported file extension: ${i}`};for(let l of s.rules){l.regex.lastIndex=0;let c;for(;(c=l.regex.exec(r))!==null;){let u=l.onMatch(c),d=r.substring(0,c.index).split(`
535
+ `).length;n.push({name:u.name||"anonymous",kind:u.kind||"Unknown",classification:u.classification||"Other",signature:u.signature||c[0],line:d,endLine:d,doc:"",capabilities:JSON.stringify(u.meta||{})})}}let a=Fr({classification:`Micro IR (${i.substring(1).toUpperCase()})`,capabilities:[],exports:n.map(l=>({name:l.name,kind:l.kind,classification:l.classification})),fileName:ad.basename(e)});return{exports:n,imports:[],classification:`Micro IR (${i.substring(1).toUpperCase()})`,summary:a||"Module",parseStatus:n.length>0?"success":"partial"}}};F();var ld=new ks;async function Zr(t){let e=cy.extname(t);if(ld.supports(e)&&e!==".ts"&&e!==".tsx")try{let o=cd.readFileSync(t,"utf-8");return await ld.parse(t,o)}catch(o){return $.error({filePath:t,error:o.message},"HeuristicParser failed"),{exports:[],imports:[],classification:"Unknown",summary:"",parseStatus:"failed",parseError:o.message}}let r;try{r=cd.readFileSync(t)}catch(o){return{exports:[],imports:[],classification:"Error",summary:"",parseStatus:"failed",parseError:`File read error: ${o.message}`}}let i=r.toString("utf8"),n=Gg(i);try{let o=t.endsWith(".tsx"),s=N$.parseSync(i,{syntax:"typescript",tsx:o,decorators:!0,comments:!0}),a=s.span.start,l=Kg(i),c=_=>qg(_,a,r),u=Xg(s.body),d=ty(s.body);d.length>0&&$.debug({filePath:t,count:d.length},"Extracted type references"),d.forEach(_=>{u.push({module:"__type_reference__",name:_})});let p=Qg(s.body,a,r,i,n,l,t,c),m=ey(s.body,a,r,n,c),f=bs(t,"","Module"),y=l.length>0&&l[0].start===0?l[0].text:p.find(_=>_.doc)?.doc||"",b=Yg(y);if(!b&&p.length>0){let _=Ur(i);b=Fr({classification:f,capabilities:_,exports:p.map(g=>({name:g.name,kind:g.kind,classification:g.classification})),fileName:cy.basename(t)})}return{exports:p,imports:u,events:m,classification:f,summary:b,parseStatus:"success"}}catch(o){$.warn({filePath:t,error:o.message},"SWC parsing failed, using heuristic fallback");try{let s=cd.readFileSync(t,"utf-8"),a=await ld.parse(t,s);return{...a,classification:a.classification+" (Degraded)",parseStatus:"partial",parseError:`SWC failed, used heuristic fallback: ${o.message}`}}catch(s){return $.error({filePath:t,error:s.message},"All parsing strategies failed"),{exports:[],imports:[],classification:"Error",summary:"",parseStatus:"failed",parseError:`All parsing strategies failed: ${s.message}`}}}}import Es from"path";var z$=50;function Hr(t,e,r,i){let n={name:Es.basename(e)||e,type:"directory",path:e,children:[]};return t.forEach(o=>{let a=Es.relative(e,o.path).split(Es.sep),l=n;for(let c=0;c<a.length;c++){let u=a[c];if(i!==void 0&&c>=i)return;let d=c===a.length-1;if(i===1&&c===0&&d)return;let p=i!==void 0&&c===i-1&&!d,m=Es.join(e,...a.slice(0,c+1)),f=l.children?.find(y=>y.name===u);if(!f){if(l.children&&l.children.length>=z$){l.children.find(_=>_.type==="truncated")||l.children.push({name:"... (truncated) ",type:"truncated",path:"",children:void 0});return}f={name:u,type:d?"file":"directory",path:m,children:d||p?void 0:[],summary:d?{classification:o.classification,summaryText:o.summary,exports:o.exports,imports:o.imports,chunks:o.chunks}:void 0},f.summary&&(r==="structure"||r==="signatures")&&(delete f.summary.chunks,delete f.summary.imports),l.children?.push(f)}l=f}}),n}F();import Ey from"p-limit";Kt();import iS from"path";import gd from"fs";import oS from"os";import Ve from"path";import Bn from"fs";import{loadConfig as A$,createMatchPath as L$}from"tsconfig-paths";import Lt from"path";import Wr from"fs";var Ct=class extends Error{constructor(r,i,n){super(i);this.code=r;this.cause=n;this.name="FileSystemError"}};function ly(t){let e;try{e=Wr.statSync(t).isDirectory()?t:Lt.dirname(t)}catch(r){throw r.code==="ENOENT"?new Ct("FILE_NOT_FOUND",`Start path does not exist: ${t}`,r):r.code==="EACCES"||r.code==="EPERM"?new Ct("PERMISSION_DENIED",`Permission denied accessing: ${t}`,r):new Ct("UNKNOWN",`Failed to access path: ${t}`,r)}for(;e!==Lt.dirname(e);){let r=Lt.join(e,"tsconfig.json");if(Wr.existsSync(r))return e;e=Lt.dirname(e)}return null}function uy(t){let e;try{e=Wr.statSync(t).isDirectory()?t:Lt.dirname(t)}catch(r){throw r.code==="ENOENT"?new Ct("FILE_NOT_FOUND",`Start path does not exist: ${t}`,r):r.code==="EACCES"||r.code==="EPERM"?new Ct("PERMISSION_DENIED",`Permission denied accessing: ${t}`,r):new Ct("UNKNOWN",`Failed to access path: ${t}`,r)}for(;e!==Lt.dirname(e);){let r=Lt.join(e,"package.json");if(Wr.existsSync(r))try{if(JSON.parse(Wr.readFileSync(r,"utf8")).workspaces)return e}catch{}e=Lt.dirname(e)}return null}import Hn from"path";import tn from"fs";function py(t,e){let r=new Map,i=e.workspaces||[];for(let n of i){let o=n.replace("/*",""),s=Hn.join(t,o);if(!tn.existsSync(s))continue;let a=tn.readdirSync(s);for(let l of a){let c=Hn.join(s,l,"package.json");if(tn.existsSync(c))try{let u=JSON.parse(tn.readFileSync(c,"utf8"));u.name&&r.set(u.name,{name:u.name,path:Hn.dirname(c),main:u.main||"dist/index.js"})}catch{}}}return r}function dy(t){let e=new Map;try{let r=JSON.parse(tn.readFileSync(t,"utf8")),i={...r.dependencies,...r.devDependencies};for(let[n,o]of Object.entries(i))if(typeof o=="string"&&o.startsWith("file:")){let s=o.substring(5),a=Hn.dirname(t),l=Hn.resolve(a,s),c=Hn.join(l,"package.json");if(tn.existsSync(c))try{let u=JSON.parse(tn.readFileSync(c,"utf8"));e.set(n,{name:n,path:l,main:u.main||"dist/index.js"})}catch{}}}catch{}return e}import my from"path";import Je from"fs";var D$=[".ts",".tsx",".d.ts",".js",".jsx"];function Me(t){let e=my.extname(t);if(e===".js"||e===".jsx"){let r=t.slice(0,-e.length),i=e===".jsx"?[".tsx",".ts"]:[".ts",".tsx"];for(let n of i){let o=r+n;if(Je.existsSync(o)&&Je.statSync(o).isFile())return o}if(Je.existsSync(t)&&Je.statSync(t).isFile())return t}if(Je.existsSync(t)&&Je.statSync(t).isFile())return t;for(let r of D$){let i=t+r;if(Je.existsSync(i)&&Je.statSync(i).isFile())return i}if(Je.existsSync(t)&&Je.statSync(t).isDirectory())for(let r of[".ts",".tsx",".js",".jsx"]){let i=my.join(t,"index"+r);if(Je.existsSync(i))return i}return""}import Wn from"path";import O$ from"fs";function ud(t,e,r){if(t.startsWith(".")){let n=Wn.dirname(e),o=Wn.resolve(n,t),s=Me(o);return s?{resolved:!0,resolvedPath:s}:{resolved:!1,error:`File not found at relative path: ${o}`,suggestion:"Check if the file exists and has a supported extension (.ts, .tsx, .js, .jsx)"}}let i=Br(e);if(i){if(i.matchPath){let o=i.matchPath(t);if(o){let s=Me(o);return s?{resolved:!0,resolvedPath:s}:{resolved:!1,error:`Path alias matched to '${o}' but file does not exist`,suggestion:"Check if the target file exists or if the alias mapping in tsconfig.json is correct"}}}if(!t.startsWith("@")){let o=Wn.resolve(i.baseUrl,t),s=Me(o);if(s)return{resolved:!0,resolvedPath:s}}let n=i.workspacePackages.get(t);if(n){let o=Wn.join(n.path,"src/index.ts");if(O$.existsSync(o))return{resolved:!0,resolvedPath:o};let s=Wn.join(n.path,n.main),a=Me(s);return a?{resolved:!0,resolvedPath:a}:{resolved:!1,error:`Workspace package '${t}' found at ${n.path} but entry point not found`,suggestion:`Check main field in ${Wn.join(n.path,"package.json")}`}}}else return{resolved:!1,error:"No tsconfig.json found",suggestion:"Ensure a tsconfig.json exists in the project root or parent directories"};return t.startsWith("@")?{resolved:!1,error:`Path alias '${t}' not found in tsconfig.json paths`,suggestion:'Check tsconfig.json "paths" configuration'}:{resolved:!1,error:"Module not found (treated as external) ",suggestion:"Install dependency or check import path"}}var ws=new Map;function Br(t){let e=ly(t);if(!e)return null;if(ws.has(e))return ws.get(e)||null;let r=A$(e);if(r.resultType==="failed")return ws.set(e,null),null;let i=r,n=i.absoluteBaseUrl;!n&&i.paths&&Object.keys(i.paths).length>0&&(n=i.configFileAbsolutePath?Ve.dirname(i.configFileAbsolutePath):e);let o=L$(n,i.paths,i.mainFields,i.addMatchAll),s=uy(e),a=new Map;if(s){let d=Ve.join(s,"package.json");if(Bn.existsSync(d))try{let p=JSON.parse(Bn.readFileSync(d,"utf8"));a=py(s,p)}catch{}}let l=Ve.join(e,"package.json");Bn.existsSync(l)&&dy(l).forEach((p,m)=>a.set(m,p));let c={baseUrl:n||"",paths:i.paths,matchPath:o,workspacePackages:a,imports:new Map},u=Ve.join(e,"package.json");if(Bn.existsSync(u))try{let d=JSON.parse(Bn.readFileSync(u,"utf8"));if(d.imports){for(let[p,m]of Object.entries(d.imports))if(typeof m=="string"||typeof m=="object"&&m!==null){let f=m;Array.isArray(m)&&(f=m[0]),typeof f=="object"&&(f=f.default||f.node),typeof f=="string"&&c.imports.set(p,f)}}}catch{}return ws.set(e,c),c}function Jr(t,e,r){if(!t)return"";if(t.includes(".")&&!t.startsWith(".")&&!t.startsWith("/")&&!t.endsWith(".js")&&!t.endsWith(".ts")&&!t.endsWith(".json")){let n=t.split(".")[0];if(n&&n!==t){let o=Jr(n,e,r);if(o)return o}}if(t.startsWith(".")){let n=Ve.dirname(e),o=Ve.resolve(n,t);return Me(o)}let i=Br(e);if(i){let n=i.matchPath(t);if(n)return Me(n);if(!t.startsWith("@")||t.startsWith("@/")){let s=Ve.resolve(i.baseUrl,t),a=Me(s);if(a)return a}for(let[s,a]of i.imports.entries())if(s.includes("*")){let l="^"+s.replace(/[\\^$+.()|[\]{}]/g,"\\$&").replace(/\*/g,"(.*)")+"$",c=new RegExp(l),u=t.match(c);if(u){let d=u[1],p=a.replace("*",d),m=Ve.resolve(i.baseUrl,p);return Me(m)}}else if(s===t){let l=Ve.resolve(i.baseUrl,a);return Me(l)}let o=i.workspacePackages.get(t);if(o){let s=Ve.join(o.path,"src/index.ts");if(Bn.existsSync(s))return s;let a=Ve.join(o.path,o.main),l=Me(a);if(l)return l}}return""}import C$ from"fs";import j$ from"path";import hy from"js-yaml";function fy(t){let e=j$.basename(t),r=C$.readFileSync(t,"utf8"),i=[];if(e.endsWith(".prisma"))return Z$(r,t);if(e.endsWith(".graphql")||e.endsWith(".gql"))return H$(r,t);let n="Configuration";return e==="lerna.json"?B$(r,t):e==="turbo.json"?J$(r,t):e==="pnpm-workspace.yaml"?V$(r,t):(e.includes("Dockerfile")?(n="Infrastructure (Docker) ",M$(r,i)):e.endsWith(".yaml")||e.endsWith(".yml")?(n="Infrastructure (YAML) ",U$(r,i)):e.startsWith(".env")?(n="Configuration (Env) ",F$(r,i)):e==="package.json"&&(n="Project Manifest",W$(r,i)),{configs:i,classification:n})}function M$(t,e){let r=t.split(`
536
+ `);for(let i of r){let n=i.trim();if(n.startsWith("FROM "))e.push({key:"base_image",value:n.substring(5).trim(),kind:"Image"});else if(n.startsWith("EXPOSE "))e.push({key:"port",value:n.substring(7).trim(),kind:"Port"});else if(n.startsWith("ENV ")){let o=n.substring(4).trim().split(/\s+|=/);if(o[0]){let s=o[0],a=o.slice(1).join("= ").trim()||"undefined",l="Env";(s.endsWith("_URI")||s.endsWith("_URL")||s.endsWith("_HOST"))&&(l="Service"),e.push({key:s,value:a,kind:l})}}}}function U$(t,e){try{let r=hy.load(t);if(!r||typeof r!="object")return;if(r.services&&typeof r.services=="object")for(let[n,o]of Object.entries(r.services)){if(!o||typeof o!="object")continue;let s=o;if(e.push({key:`service:${n}`,value:n,kind:"Service"}),s.image&&e.push({key:`service:${n}:image`,value:String(s.image),kind:"Image"}),Array.isArray(s.ports)&&s.ports.forEach(a=>{e.push({key:`service:${n}:port`,value:String(a),kind:"Port"})}),s.environment){if(Array.isArray(s.environment))s.environment.forEach(a=>{let[l,...c]=a.split("= ");l&&c.length>0&&e.push({key:`service:${n}:env:${l}`,value:c.join("= "),kind:"Env"})});else if(typeof s.environment=="object")for(let[a,l]of Object.entries(s.environment))e.push({key:`service:${n}:env:${a}`,value:String(l),kind:"Env"})}if(Array.isArray(s.depends_on))s.depends_on.forEach(a=>{e.push({key:`service:${n}:depends_on`,value:a,kind:"Dependency"})});else if(s.depends_on&&typeof s.depends_on=="object")for(let a of Object.keys(s.depends_on))e.push({key:`service:${n}:depends_on`,value:a,kind:"Dependency"})}let i=(n,o="")=>{if(!(!n||typeof n!="object"||Array.isArray(n)))for(let[s,a]of Object.entries(n)){let l=o?`${o}.${s}`:s;if(r.services&&(l.startsWith("services.")||l==="services")){a&&typeof a=="object"&&!Array.isArray(a)&&i(a,l);continue}if(a&&typeof a=="object"&&!Array.isArray(a))i(a,l);else{let c=String(a),u="Env";s.toLowerCase().includes("image")&&(u="Image"),s.toLowerCase().includes("port")&&(u="Port"),s.toLowerCase().includes("service")&&(u="Service"),(s.endsWith("_URI")||s.endsWith("_URL")||s.endsWith("_HOST"))&&(u="Service"),e.push({key:l,value:c.length>100?c.substring(0,97)+"...":c,kind:u})}}};i(r)}catch{let i=t.match(/^\s{2}([a-z0-9_-]+):/gm);i&&i.forEach(n=>{let o=n.trim().replace(" : ","");o!=="services"&&o!=="version"&&o!=="volumes"&&o!=="networks"&&e.push({key:"service",value:o,kind:"Service"})})}}function F$(t,e){let r=t.split(`
537
+ `);for(let i of r){let n=i.trim();if(n&&!n.startsWith("#")){let o=n.split("=");if(o[0]){let s=o[0].trim(),a=o.slice(1).join("=");a=a.trim().replace(/^['"](.*)['"]$/,"$1");let l="Env";(s.endsWith("_URI")||s.endsWith("_URL")||s.endsWith("_HOST"))&&(l="Service"),e.push({key:s,value:a,kind:l})}}}}function Z$(t,e){let r=[],i="Contract (Prisma) ",n=/^model\s+(\w+)/gm,o;for(;(o=n.exec(t))!==null;)r.push({key:"model",value:o[1],kind:"Database Model"});let s=/^enum\s+(\w+)/gm;for(;(o=s.exec(t))!==null;)r.push({key:"enum",value:o[1],kind:"Database Enum"});let a=/provider\s*=\s*"([^"]+)"/,l=t.match(a);return l&&r.push({key:"datasource_provider",value:l[1],kind:"Database Config"}),{classification:i,configs:r}}function H$(t,e){let r=[],i="Contract (GraphQL) ",n=/^(?:type|input|interface|enum)\s+(\w+)/gm,o;for(;(o=n.exec(t))!==null;){let s=o[0],a="GraphQL Type";s.startsWith("input")&&(a="GraphQL Input"),s.startsWith("interface")&&(a="GraphQL Interface"),s.startsWith("enum")&&(a="GraphQL Enum"),r.push({key:"type_definition",value:o[1],kind:a})}return{classification:i,configs:r}}function W$(t,e){try{let r=JSON.parse(t);if(r.name&&e.push({key:"name",value:r.name,kind:"Service"}),r.description&&e.push({key:"description",value:r.description,kind:"Service"}),r.workspaces){let o=Array.isArray(r.workspaces)?r.workspaces.join("",""):JSON.stringify(r.workspaces);e.push({key:"workspaces",value:o,kind:"Env"})}if(r.scripts){let o=["start","dev","build","test","docker"];for(let s of Object.keys(r.scripts))o.some(a=>s.includes(a))&&e.push({key:`script:${s}`,value:r.scripts[s],kind:"Env"})}let i={...r.dependencies,...r.devDependencies},n=["react","vue","svelte","angular","next","nuxt","express","fastify","nestjs","remix","vite","webpack","tailwindcss","database"];for(let o of Object.keys(i))if(n.some(s=>o.includes(s))){let s=i[o].replace(/[\^~]/,"");e.push({key:`dep:${o}`,value:s,kind:"Service"})}}catch{}}function B$(t,e){let r=[],i="Monorepo (Lerna) ";try{let n=JSON.parse(t);r.push({key:"monorepo_type",value:"lerna",kind:"Monorepo"}),n.version&&r.push({key:"lerna_version",value:n.version,kind:"Monorepo"}),n.packages&&(Array.isArray(n.packages)?n.packages:[n.packages]).forEach(s=>{r.push({key:"package_glob",value:s,kind:"Monorepo"})}),n.npmClient&&r.push({key:"npm_client",value:n.npmClient,kind:"Monorepo"})}catch{}return{configs:r,classification:i}}function J$(t,e){let r=[],i="Monorepo (Turborepo) ";try{let n=JSON.parse(t);if(r.push({key:"monorepo_type",value:"turborepo",kind:"Monorepo"}),n.pipeline)for(let o of Object.keys(n.pipeline)){r.push({key:`pipeline:${o}`,value:o,kind:"Monorepo"});let s=n.pipeline[o];s.dependsOn&&r.push({key:`pipeline:${o}:depends_on`,value:s.dependsOn.join("",""),kind:"Dependency"})}if(n.tasks)for(let o of Object.keys(n.tasks))r.push({key:`task:${o}`,value:o,kind:"Monorepo"})}catch{}return{configs:r,classification:i}}function V$(t,e){let r=[],i="Monorepo (pnpm) ";try{let n=hy.load(t);r.push({key:"monorepo_type",value:"pnpm",kind:"Monorepo"}),n&&n.packages&&(Array.isArray(n.packages)?n.packages:[n.packages]).forEach(s=>{r.push({key:"package_glob",value:s,kind:"Monorepo"})})}catch{}return{configs:r,classification:i}}F();import gy from"fs";import G$ from"path";import yy from"js-yaml";var vy={ignore:[],include:[],maxDepth:10},q$=[{name:".liquid-shadow.yaml",parse:t=>yy.load(t)??{}},{name:".liquid-shadow.yml",parse:t=>yy.load(t)??{}},{name:".ls.json",parse:t=>JSON.parse(t)},{name:".liquid-shadow.json",parse:t=>JSON.parse(t)},{name:".ls.rc",parse:t=>JSON.parse(t)},{name:".liquid-shadow.rc",parse:t=>JSON.parse(t)}];function Is(t){for(let{name:e,parse:r}of q$){let i=G$.join(t,e);if(gy.existsSync(i))try{let n=gy.readFileSync(i,"utf8"),o=r(n);return $.info({repoPath:t,configFile:e},"Loaded repository configuration"),{...vy,...o}}catch(n){$.error({repoPath:t,file:e,err:n},"Failed to parse configuration file")}}return vy}X();F();F();import{Worker as K$}from"node:worker_threads";import{cpus as Y$}from"node:os";import{fileURLToPath as X$}from"node:url";import{dirname as Q$,join as _y}from"node:path";import{existsSync as by}from"node:fs";var $y=X$(import.meta.url),xy=Q$($y);function eS(){if($y.endsWith(".ts")){let e=_y(xy,"worker.ts");if(by(e))return e}let t=_y(xy,"worker.js");return by(t)?t:Zn("dist/logic/domain/embeddings/worker.js")}var Vr=class{workers=[];taskQueue=[];pendingTasks=new Map;taskIdCounter=0;initialized=!1;initPromise;shutdownRequested=!1;numWorkers;cacheDir;initTimeout;constructor(e={}){this.numWorkers=e.numWorkers??Math.max(1,Y$().length-1),this.cacheDir=e.cacheDir??"./.cache",this.initTimeout=e.initTimeout??6e4}async initialize(){if(!this.initialized)return this.initPromise?this.initPromise:(this.initPromise=this._doInitialize(),this.initPromise)}async _doInitialize(){let e;try{$.info({numWorkers:this.numWorkers},"Initializing embedding worker pool");let r=new Promise((i,n)=>{e=setTimeout(()=>n(new Error(`Worker pool initialization timed out after ${this.initTimeout}ms`)),this.initTimeout)});if(await Promise.race([this._initializeWorkers(),r]),e&&clearTimeout(e),this.shutdownRequested){this.initialized=!1,this.initPromise=void 0,$.debug("Initialization completed but shutdown was requested");return}this.initialized=!0,$.info({numWorkers:this.workers.length},"Embedding worker pool ready")}catch(r){throw e&&clearTimeout(e),this.initPromise=void 0,this.initialized=!1,await this.shutdown(),r}}async _initializeWorkers(){let e=eS();$.debug({workerPath:e},"Resolved worker path");for(let r=0;r<this.numWorkers;r++)await this.createWorker(e,r),await new Promise(i=>setTimeout(i,50))}async createWorker(e,r){return new Promise((i,n)=>{let o=setTimeout(()=>{n(new Error(`Worker ${r} initialization timed out`))},this.initTimeout),s=new K$(e,{workerData:{cacheDir:this.cacheDir},execArgv:process.execArgv}),a={worker:s,busy:!1,currentTaskId:null};s.on("message",l=>{if(l.type==="ready"){if(clearTimeout(o),this.shutdownRequested){$.debug({workerIndex:r},"Worker ready but shutdown requested, terminating"),s.terminate().catch(()=>{}),i();return}this.workers.push(a),$.debug({workerIndex:r},"Worker ready"),i()}else l.type==="result"&&l.id?this.handleTaskComplete(a,l.id,l.embeddings||[]):l.type==="error"&&l.id&&this.handleTaskError(a,l.id,new Error(l.error||"Unknown error"))}),s.on("error",l=>{if(clearTimeout(o),$.error({err:l,workerIndex:r},"Worker error"),a.currentTaskId&&this.handleTaskError(a,a.currentTaskId,l),!this.initialized){n(l);return}let c=this.workers.indexOf(a);c!==-1&&this.workers.splice(c,1),!this.shutdownRequested&&this.initialized&&this.createWorker(e,r).catch(u=>{$.error({err:u},"Failed to replace crashed worker")})}),s.on("exit",l=>{l!==0&&!this.shutdownRequested&&$.warn({workerIndex:r,code:l},"Worker exited unexpectedly")})})}handleTaskComplete(e,r,i){let n=this.pendingTasks.get(r);n&&(this.pendingTasks.delete(r),n.resolve(i)),e.busy=!1,e.currentTaskId=null,this.processQueue()}handleTaskError(e,r,i){let n=this.pendingTasks.get(r);n&&(this.pendingTasks.delete(r),n.reject(i)),e.busy=!1,e.currentTaskId=null,this.processQueue()}processQueue(){if(this.taskQueue.length===0)return;let e=this.workers.find(i=>!i.busy);if(!e)return;let r=this.taskQueue.shift();r&&(e.busy=!0,e.currentTaskId=r.id,this.pendingTasks.set(r.id,r),e.worker.postMessage({type:"embed",id:r.id,texts:r.texts}))}async generateEmbeddings(e,r=32,i){if(this.initialized||await this.initialize(),e.length===0)return[];let n=[];for(let c=0;c<e.length;c+=r)n.push(e.slice(c,c+r));let o=new Array(n.length),s=0,a=n.map((c,u)=>new Promise((d,p)=>{let f={id:`task_${++this.taskIdCounter}`,texts:c,resolve:y=>{if(o[u]=y,s++,i){let b=Math.min(s*r,e.length);i(b,e.length)}d()},reject:y=>{if(o[u]=new Array(c.length).fill(null),s++,$.warn({err:y,chunkIndex:u},"Chunk embedding failed"),i){let b=Math.min(s*r,e.length);i(b,e.length)}d()}};this.taskQueue.push(f),this.processQueue()}));await Promise.all(a);let l=[];for(let c of o)l.push(...c);return $.info({total:e.length,successful:l.filter(c=>c!==null).length,workers:this.workers.length},"Parallel embedding generation complete"),l}get workerCount(){return this.workers.length}get busyWorkers(){return this.workers.filter(e=>e.busy).length}get queueSize(){return this.taskQueue.length}get isInitialized(){return this.initialized}async shutdown(){if(this.shutdownRequested=!0,this.initPromise)try{await this.initPromise}catch{}if(!this.initialized&&this.workers.length===0){this.shutdownRequested=!1,this.initPromise=void 0;return}$.info({numWorkers:this.workers.length},"Shutting down embedding worker pool");let e=this.workers.map(r=>new Promise(i=>{r.worker.postMessage({type:"shutdown"}),r.worker.once("exit",()=>i()),setTimeout(()=>{r.worker.terminate().then(()=>i())},5e3)}));await Promise.all(e),this.workers=[],this.taskQueue=[],this.pendingTasks.clear(),this.initialized=!1,this.shutdownRequested=!1,$.info("Embedding worker pool shutdown complete")}},Jn=null;function pd(t){return Jn||(Jn=new Vr(t)),Jn}async function Vn(){Jn&&(await Jn.shutdown(),Jn=null)}var Gr=null;async function tS(){return Gr||(Gr=await import("@xenova/transformers"),Gr.env.cacheDir="./.cache",Gr.env.allowLocalModels=!1),Gr}var nS=128,Sy=!1;function Gn(t){Sy=t,$.info({useWorkerThreads:t},"Worker thread mode updated")}var dd=null;async function ky(){return dd||(dd=(async()=>{$.info("Loading embedding model (all-MiniLM-L6-v2)...");let{pipeline:t}=await tS();return await t("feature-extraction","Xenova/all-MiniLM-L6-v2")})()),dd}async function md(t){try{let r=await(await ky())(t,{pooling:"mean",normalize:!0});return Array.from(r.data)}catch(e){return $.error({err:e},"Failed to generate embedding"),null}}async function fd(t,e=nS,r){return t.length===0?[]:Sy?pd().generateEmbeddings(t,e,r):rS(t,e,r)}async function rS(t,e,r){let i=new Array(t.length).fill(null),n=await ky();for(let o=0;o<t.length;o+=e){let s=Math.min(o+e,t.length),a=t.slice(o,s);try{let l=await n(a,{pooling:"mean",normalize:!0}),[c,u]=l.dims;for(let d=0;d<c;d++){let p=d*u,m=p+u;i[o+d]=Array.from(l.data.slice(p,m))}}catch(l){$.error({err:l,batchStart:o,batchEnd:s},"Single-threaded batch embedding failed, falling back to sequential for this chunk");for(let c=0;c<a.length;c++)try{let u=a[c];if(!u||u.trim().length===0)continue;let d=await n(u,{pooling:"mean",normalize:!0});i[o+c]=Array.from(d.data)}catch{i[o+c]=null}}r&&r(s,t.length)}return $.debug({total:t.length,successful:i.filter(o=>o!==null).length},"Batch embedding complete"),i}function hd(t,e){let r=0,i=0,n=0;for(let o=0;o<t.length;o++)r+=t[o]*e[o],i+=t[o]*t[o],n+=e[o]*e[o];return r/(Math.sqrt(i)*Math.sqrt(n))}var Sz=oS.cpus().length||4,sS=Zo.DEFAULT_CONCURRENCY;async function Q(t,e=sS,r=!1,i=!0,n){let o=L.getInstance(t),s=o.files.database,a=Is(t),l=a.concurrency??e;if(Ag(),!r&&Qe(t)){let _=Ph(t),g=He(t);if(_&&!Uh(t,_))return ed(),$.debug({repoPath:t,commit:g},"Index is current, skipping re-index (fast-path)"),s}Br(t);let c=o.files.findAll(),u=new Map(c.map(_=>[_.path,{mtime:_.mtime,hash:_.content_hash}])),d=Date.now();n?.({phase:"scan",current:0,total:0,message:"Scanning repository..."});let p=await id(t,a.ignore),m=new Map(p.map(_=>[_.path,_.mtime])),f=c.filter(_=>!m.has(_.path)).map(_=>_.path),y=c.length===0,b=[];if(r||y)b.push(...p);else{let _=p.filter(A=>{let I=u.get(A.path);return!I||I.mtime!==A.mtime}),g=Ey(l*4),x=_.map(A=>g(async()=>{let I=u.get(A.path);if(!I||!I.hash)return A;try{let R=await gd.promises.readFile(A.path,"utf8");return Rh(R,I.hash)?A:(o.files.updateMtime(A.path,A.mtime),null)}catch{return null}})),E=await Promise.all(x);b.push(...E.filter(A=>A!==null))}if(f.length===0&&b.length===0){if(ed(),y){let _=He(t);Hp(t,_||void 0)}return s}if(y?$.info({totalFiles:p.length},"Starting initial repository indexing..."):$.info({toDelete:f.length,toProcess:b.length},"Syncing repository updates..."),f.length>0&&o.files.deletePaths(f),b.length>0){Cg(),i?Gn(!0):Gn(!1);let _=Ey(l),g=0,x=b.length,E=b.map(j=>_(async()=>{try{let w=iS.basename(j.path);if(/\.(ts|tsx|php|py|go|js|jsx|mjs|cjs)$/.test(w)){let J=await Zr(j.path),O=gd.readFileSync(j.path,"utf8");return g++,(g%50===0||g===x)&&$.info({completed:g,total:x},"Parsing files..."),n?.({phase:"parse",current:g,total:x,message:`Parsing ${w}`}),{meta:j,...J,content:O,embedding:null,kind:"code"}}else{let J=fy(j.path),O=gd.readFileSync(j.path,"utf8");return g++,(g%50===0||g===x)&&$.info({completed:g,total:x},"Parsing configs..."),n?.({phase:"parse",current:g,total:x,message:`Parsing config ${w}`}),{meta:j,...J,content:O,embedding:null,kind:"config"}}}catch(w){return g++,$.error({path:j.path,error:w},"Failed to parse file"),{meta:j,exports:[],imports:[],content:"",kind:"error"}}}));$.info({total:x},"Phase 1: Parsing all files...");let A=Date.now(),I=(await Promise.all(E)).filter(Boolean),R=Date.now()-A;if(_s("parse",R),$.info({count:I.length,time:`${(R/1e3).toFixed(1)}s`},"Phase 1 complete"),i){$.info("Phase 2: Generating file semantic embeddings..."),n?.({phase:"embed",current:0,total:I.length,message:"Generating embeddings..."});let j=Date.now(),w=[];if(I.forEach((J,O)=>{"summary"in J&&J.summary&&w.push({fileIdx:O,text:J.summary})}),w.length>0){$.info({count:w.length}," \u2192 Generating file summary embeddings...");let J=w.map(M=>M.text),O=await fd(J,128);w.forEach((M,q)=>{I[M.fileIdx].embedding=O[q]}),$.info({count:w.length}," \u2713 File summaries complete")}let P=Date.now()-j;_s("embed",P),$.info({time:`${(P/1e3).toFixed(1)}s`},"Phase 2 complete")}n?.({phase:"persist",current:0,total:I.length,message:"Saving to database..."});let k=Date.now();o.files.batchSaveIndexResults(I,t,Zp,Jr),_s("persist",Date.now()-k)}if(y||b.length>0){let _=He(t);Hp(t,_||void 0)}return(b.length>0||f.length>0)&&new Pe(t).detectAndRepairShifts(),Lg(Date.now()-d),n?.({phase:"complete",current:b.length,total:b.length,message:"Indexing complete"}),s}F();import wy from"path";import aS from"ignore";import Iy from"fs";X();async function yd(t,e=Zo.DEFAULT_CONCURRENCY,r="detailed",i,n){$.info({repo:t,level:r,subPath:i},"Ensuring cache is up-to-date..."),await Q(t,e);let{files:o,exports:s,imports:a}=L.getInstance(t),l=i?o.findInSubPath(t,i):o.findAll(),c=Is(t),u=aS(),d=wy.join(t,".gitignore");if(Iy.existsSync(d)&&u.add(Iy.readFileSync(d,"utf8")),c.ignore&&c.ignore.length>0&&u.add(c.ignore),u.add(Fo),l=l.filter(g=>{let x=wy.relative(t,g.path);return!u.ignores(x)}),$.info({count:l.length},"Fetching data from DB..."),r==="lite"){let g=l.map(x=>({path:x.path,mtime:x.mtime}));return Hr(g,t,r,n)}if(r==="summaries"){let g=l.map(x=>({path:x.path,mtime:x.mtime,classification:x.classification||void 0,summary:x.summary||void 0}));return Hr(g,t,r,n)}let p=l.map(g=>g.path),m=s.findByFiles(p),f=r==="detailed"?a.findByFiles(p):[],y=new Map;for(let g of m){let x=y.get(g.file_path)||[];x.push(g),y.set(g.file_path,x)}let b=new Map;for(let g of f){let x=b.get(g.file_path)||[];x.push(g),b.set(g.file_path,x)}let _=l.map(g=>{let E=(y.get(g.path)||[]).map(I=>({name:I.name,kind:I.kind,signature:I.signature,line:I.start_line}));r==="structure"?E=E.map(I=>({name:I.name,kind:I.kind,line:I.line})):r==="signatures"&&(E=E.map(I=>({name:I.name,kind:I.kind,signature:I.signature,line:I.line})));let A=[];return r==="detailed"&&(A=(b.get(g.path)||[]).map(R=>({module:R.module_specifier,resolved_path:R.resolved_path}))),{path:g.path,mtime:g.mtime,classification:g.classification||void 0,summary:g.summary||void 0,exports:E,imports:A.length>0?A:void 0,chunks:[]}});return $.info({count:_.length},"Building hierarchical project tree..."),Hr(_,t,r,n)}X();var qr=class{static extractSnippet(e,r,i=300){if(!e||!r)return"";let n=r.toLowerCase().split(/\s+/).filter(p=>p.length>2&&!["the","and","for","with","from"].includes(p));if(n.length===0)return e.slice(0,i)+"...";let o=e.split(`
572
538
  `),s=new Array(o.length).fill(0);for(let p=0;p<o.length;p++){let m=o[p].toLowerCase(),f=0,y=0;for(let b of n)m.includes(b)&&(f++,y++);(m.includes("export ")||m.includes("class ")||m.includes("function ")||m.includes("interface "))&&(f+=1),s[p]=y*10+f}let a=0,l=-1,c=5;for(let p=0;p<=o.length-c;p++){let m=0;for(let f=0;f<c;f++)m+=s[p+f];m>l&&(l=m,a=p)}if(l<=0)return e.slice(0,i).trim()+"...";let d=o.slice(a,a+c).join(`
573
539
  `).trim();return a>0&&(d=`...
574
540
  `+d),a+c<o.length&&(d=d+`
575
- ...`),d.length>i?d.slice(0,i)+"...":d}static calculateLexicalScore(e,r){if(!e||!r)return 0;let i=r.toLowerCase().split(/\s+/).filter(s=>s.length>2&&!["the","and","for","with","from"].includes(s));if(i.length===0)return 0;let n=0,o=e.toLowerCase();for(let s of i)if(o.includes(s)){n+=1;let a=new RegExp(`\\b${s}`,"gi"),l=o.match(a);l&&(n+=Math.min(l.length*.2,2)),new RegExp(`(class|function|export|interface|enum|type)\\s+${s}`,"i").test(e)&&(n+=1.5)}return n/i.length}};X();F();var Mt=$.child({module:"clean-sweep"}),$d=class{files;intentLogs;constructor(e){let{files:r,intentLogs:i}=L.getInstance(e);this.files=r,this.intentLogs=i}pruneOrphans(){Mt.info("Starting orphan pruning...");let e=0,r=0,i=this.intentLogs.findOrphans();Mt.info({orphanCount:i.length},"Found orphaned logs");for(let s of i)s.file_path&&this.files.exists(s.file_path)?(this.intentLogs.markAsLapsed(s.id),r++,Mt.debug({logId:s.id,symbolName:s.symbol_name},"Converted to lapsed intent")):(this.intentLogs.delete(s.id),e++,Mt.debug({logId:s.id},"Deleted orphaned log"));let n=this.intentLogs.findLogsForMissingFiles();for(let s of n)this.intentLogs.delete(s.id),e++;let o=this.intentLogs.findRecentDecisionActivity(1e3).length;return Mt.info({deleted:e,converted:r},"Orphan pruning complete"),{deleted:e,converted:r,retained:o}}},Sd=class{lambda;constructor(e=.01){this.lambda=e}calculateScore(e,r){let n=(Math.floor(Date.now()/1e3)-r)/(3600*24),o=Math.exp(-this.lambda*n);return e*o}scoreResults(e){return e.map(r=>({...r,decayed_score:this.calculateScore(r.score,r.created_at)}))}},kd=class{missions;constructor(e){let{missions:r}=L.getInstance(e);this.missions=r}findColdMissions(){let e=Math.floor(Date.now()/1e3)-604800,r=this.missions.findColdMissions(e,10);return Mt.info({count:r.length},"Found cold missions for compaction"),r}markDistilled(e){this.missions.update(e,{status:"distilled"})}},Yn=class{pruner;scorer;compactor;constructor(e){this.pruner=new $d(e),this.scorer=new Sd,this.compactor=new kd(e)}runMaintenance(){Mt.info("Initiating Clean Sweep maintenance protocol...");let e=this.pruner.pruneOrphans(),r=this.compactor.findColdMissions();return Mt.info("Clean Sweep maintenance complete"),{pruning:e,compaction:{eligible:r.length}}}getScorer(){return this.scorer}getCompactor(){return this.compactor}};var pS={Solid:1,Liquid:.8,Virtual:.4,Intel:.2,Phantom:.05},ht=class{static classify(e,r){let i=e.toLowerCase();if(r?.content){let n=r.content;if(n.includes("describe(")||n.includes("test(")||n.includes("it(")||n.includes("expect(")||n.includes('from "@jest/globals"')||n.includes('from "vitest"'))return"Virtual"}return r?.exports&&(r.exports.some(o=>o.kind==="ClassDeclaration"||o.kind==="Class")||r.exports.length>5),i.includes("/dist/")||i.includes("/build/")||i.includes("/.generated/")||i.includes("/node_modules/")||i.endsWith(".map")||i.endsWith(".log")?"Phantom":i.includes("/test/")||i.includes("/tests/")||i.includes("/__tests__/")||i.includes("/__mocks__/")||i.includes(".spec.")||i.includes(".test.")||i.includes("/e2e/")||i.includes("/test-utils/")?"Virtual":i.includes("/examples/")||i.includes("/fixtures/")||i.includes("/mocks/")||i.includes("/stories/")||i.includes("/samples/")||i.includes("/docs/")?"Intel":i.includes("/src/")||i.includes("/lib/")||i.includes("/app/")||i.includes("/core/")||i.includes("/logic/")||i.includes("/domain/")||i.includes("/services/")||i.includes("/controllers/")||i.includes("/handlers/")||i.includes("/repositories/")||i.includes("/models/")||i.includes("/packages/")&&!i.includes("/packages/config/")||i.includes("/backends/")||r?.exports&&(r.exports.some(n=>n.kind==="ClassDeclaration"||n.kind==="Class")||r.exports.length>5)?"Solid":"Liquid"}static mapClassificationToTier(e){let r=e.toLowerCase();return r==="service"||r==="repository"||r==="model"||r==="controller"||r==="handler"||r==="component"||r==="hook"||r==="titanium"||r==="solid"?"Solid":r==="test"||r==="iron"||r==="virtual"?"Virtual":r==="lead"||r==="intel"?"Intel":r==="ghost"||r==="error"||r==="phantom"?"Phantom":"Liquid"}static getMultiplier(e,r){let i=r?this.mapClassificationToTier(r):this.classify(e);return pS[i]}};F();function dS(t,e){let r=[];for(let i=0;i<=e.length;i++)r[i]=[i];for(let i=0;i<=t.length;i++)r[0][i]=i;for(let i=1;i<=e.length;i++)for(let n=1;n<=t.length;n++)e.charAt(i-1)===t.charAt(n-1)?r[i][n]=r[i-1][n-1]:r[i][n]=Math.min(r[i-1][n-1]+1,r[i][n-1]+1,r[i-1][n]+1);return r[e.length][t.length]}function mS(t,e){let r=dS(t.toLowerCase(),e.toLowerCase()),i=Math.max(t.length,e.length);return Math.round((i-r)/i*100)}function zy(t){let e=[],r="";for(let i=0;i<t.length;i++){let n=t[i],o=n>="A"&&n<="Z",s=n>="a"&&n<="z";o&&r.length>0?(e.push(r),r=n):s||o?r+=n:r.length>0&&(e.push(r),r="")}return r.length>0&&e.push(r),e}function fS(t,e){let r=zy(e),i=t.toLowerCase();if(r.map(s=>s[0].toLowerCase()).join("")===i)return!0;let o=0;for(let s of r){if(o>=t.length)break;let a=s.toLowerCase();if(a.startsWith(i.slice(o))){o=t.length;break}a[0]===i[o]&&o++}return o===t.length}function hS(t,e){return zy(e).map(n=>n[0].toLowerCase()).join("")===t.toLowerCase()}function gS(t,e){let r=t.toLowerCase(),i=e.toLowerCase();if(t===e)return{matchType:"exact",score:100};if(r===i)return{matchType:"exact-case-insensitive",score:98};if(i.startsWith(r))return{matchType:"prefix",score:90+t.length/e.length*8};if(i.endsWith(r))return{matchType:"suffix",score:80+t.length/e.length*8};if(i.includes(r)){let o=t.length/e.length,s=i.indexOf(r)/e.length;return{matchType:"substring",score:70+o*10-s*5}}return hS(t,e)?{matchType:"acronym",score:75}:fS(t,e)?{matchType:"camel-case",score:65}:{matchType:"levenshtein",score:mS(t,e)*.6}}function Os(t,e,r=50,i=5){let n=[];for(let o of e){let{matchType:s,score:a}=gS(t,o);if(a>=r){let c={exact:1e3,"exact-case-insensitive":900,prefix:800,suffix:700,substring:600,acronym:550,"camel-case":500,levenshtein:100}[s]+a;n.push({match:o,score:a,matchType:s,rank:c})}}return n.sort((o,s)=>s.rank!==o.rank?s.rank-o.rank:s.score!==o.score?s.score-o.score:o.match.length-s.match.length),n.slice(0,i)}Fe();var it=class t{constructor(e){this.repoPath=e}get filesRepo(){return L.getInstance(this.repoPath).files}get exportsRepo(){return L.getInstance(this.repoPath).exports}static normalizeFileType(e){if(e==null)return;let r=Array.isArray(e)?e:e.split(",").map(i=>i.trim().replace(/^\./,""));return r.filter(Boolean).length?r:void 0}static matchesFilters(e,r,i,n){if(r.fileType?.length){let o=e.replace(/^.*\./,"").toLowerCase();if(!r.fileType.some(s=>s.toLowerCase()===o))return!1}if(r.layer!=null||r.excludeLayers&&r.excludeLayers.length>0){let o=n!=null?ht.mapClassificationToTier(n):ht.classify(e);if(r.layer!=null&&o!==r.layer||r.excludeLayers?.includes(o))return!1}if(r.dateModifiedAfter!=null||r.dateModifiedBefore!=null){if(i==null)return!1;let o=i>1e10?i/1e3:i;if(r.dateModifiedAfter!=null&&o<r.dateModifiedAfter||r.dateModifiedBefore!=null&&o>r.dateModifiedBefore)return!1}return!0}async searchByPath(e,r,i,n,o){let s=e.toLowerCase().split(/\s+/).filter(Boolean),a=this.filesRepo.findByPathKeywords(s,Math.min((r??50)*(o?Pe.FILTERED_QUERY_LIMIT_MULTIPLIER:1),_e.MAX_LIMIT));o&&(a=a.filter(u=>t.matchesFilters(u.path,n,u.mtime,u.classification)),a=a.slice(0,r??50));let l=u=>u.replace(this.repoPath,"").replace(/^\//,"");return{content:[{type:"text",text:a.length===0?`No indexed files match path/filename: "${e}".
541
+ ...`),d.length>i?d.slice(0,i)+"...":d}static calculateLexicalScore(e,r){if(!e||!r)return 0;let i=r.toLowerCase().split(/\s+/).filter(s=>s.length>2&&!["the","and","for","with","from"].includes(s));if(i.length===0)return 0;let n=0,o=e.toLowerCase();for(let s of i)if(o.includes(s)){n+=1;let a=new RegExp(`\\b${s}`,"gi"),l=o.match(a);l&&(n+=Math.min(l.length*.2,2)),new RegExp(`(class|function|export|interface|enum|type)\\s+${s}`,"i").test(e)&&(n+=1.5)}return n/i.length}};X();F();var jt=$.child({module:"clean-sweep"}),vd=class{files;intentLogs;constructor(e){let{files:r,intentLogs:i}=L.getInstance(e);this.files=r,this.intentLogs=i}pruneOrphans(){jt.info("Starting orphan pruning...");let e=0,r=0,i=this.intentLogs.findOrphans();jt.info({orphanCount:i.length},"Found orphaned logs");for(let s of i)s.file_path&&this.files.exists(s.file_path)?(this.intentLogs.markAsLapsed(s.id),r++,jt.debug({logId:s.id,symbolName:s.symbol_name},"Converted to lapsed intent")):(this.intentLogs.delete(s.id),e++,jt.debug({logId:s.id},"Deleted orphaned log"));let n=this.intentLogs.findLogsForMissingFiles();for(let s of n)this.intentLogs.delete(s.id),e++;let o=this.intentLogs.findRecentDecisionActivity(1e3).length;return jt.info({deleted:e,converted:r},"Orphan pruning complete"),{deleted:e,converted:r,retained:o}}},_d=class{lambda;constructor(e=.01){this.lambda=e}calculateScore(e,r){let n=(Math.floor(Date.now()/1e3)-r)/(3600*24),o=Math.exp(-this.lambda*n);return e*o}scoreResults(e){return e.map(r=>({...r,decayed_score:this.calculateScore(r.score,r.created_at)}))}},bd=class{missions;constructor(e){let{missions:r}=L.getInstance(e);this.missions=r}findColdMissions(){let e=Math.floor(Date.now()/1e3)-604800,r=this.missions.findColdMissions(e,10);return jt.info({count:r.length},"Found cold missions for compaction"),r}markDistilled(e){this.missions.update(e,{status:"distilled"})}},qn=class{pruner;scorer;compactor;constructor(e){this.pruner=new vd(e),this.scorer=new _d,this.compactor=new bd(e)}runMaintenance(){jt.info("Initiating Clean Sweep maintenance protocol...");let e=this.pruner.pruneOrphans(),r=this.compactor.findColdMissions();return jt.info("Clean Sweep maintenance complete"),{pruning:e,compaction:{eligible:r.length}}}getScorer(){return this.scorer}getCompactor(){return this.compactor}};var cS={Solid:1,Liquid:.8,Virtual:.4,Intel:.2,Phantom:.05},ht=class{static classify(e,r){let i=e.toLowerCase();if(r?.content){let n=r.content;if(n.includes("describe(")||n.includes("test(")||n.includes("it(")||n.includes("expect(")||n.includes('from "@jest/globals"')||n.includes('from "vitest"'))return"Virtual"}return r?.exports&&(r.exports.some(o=>o.kind==="ClassDeclaration"||o.kind==="Class")||r.exports.length>5),i.includes("/dist/")||i.includes("/build/")||i.includes("/.generated/")||i.includes("/node_modules/")||i.endsWith(".map")||i.endsWith(".log")?"Phantom":i.includes("/test/")||i.includes("/tests/")||i.includes("/__tests__/")||i.includes("/__mocks__/")||i.includes(".spec.")||i.includes(".test.")||i.includes("/e2e/")||i.includes("/test-utils/")?"Virtual":i.includes("/examples/")||i.includes("/fixtures/")||i.includes("/mocks/")||i.includes("/stories/")||i.includes("/samples/")||i.includes("/docs/")?"Intel":i.includes("/src/")||i.includes("/lib/")||i.includes("/app/")||i.includes("/core/")||i.includes("/logic/")||i.includes("/domain/")||i.includes("/services/")||i.includes("/controllers/")||i.includes("/handlers/")||i.includes("/repositories/")||i.includes("/models/")||i.includes("/packages/")&&!i.includes("/packages/config/")||i.includes("/backends/")||r?.exports&&(r.exports.some(n=>n.kind==="ClassDeclaration"||n.kind==="Class")||r.exports.length>5)?"Solid":"Liquid"}static mapClassificationToTier(e){let r=e.toLowerCase();return r==="service"||r==="repository"||r==="model"||r==="controller"||r==="handler"||r==="component"||r==="hook"||r==="titanium"||r==="solid"?"Solid":r==="test"||r==="iron"||r==="virtual"?"Virtual":r==="lead"||r==="intel"?"Intel":r==="ghost"||r==="error"||r==="phantom"?"Phantom":"Liquid"}static getMultiplier(e,r){let i=r?this.mapClassificationToTier(r):this.classify(e);return cS[i]}};F();function lS(t,e){let r=[];for(let i=0;i<=e.length;i++)r[i]=[i];for(let i=0;i<=t.length;i++)r[0][i]=i;for(let i=1;i<=e.length;i++)for(let n=1;n<=t.length;n++)e.charAt(i-1)===t.charAt(n-1)?r[i][n]=r[i-1][n-1]:r[i][n]=Math.min(r[i-1][n-1]+1,r[i][n-1]+1,r[i-1][n]+1);return r[e.length][t.length]}function uS(t,e){let r=lS(t.toLowerCase(),e.toLowerCase()),i=Math.max(t.length,e.length);return Math.round((i-r)/i*100)}function Ty(t){let e=[],r="";for(let i=0;i<t.length;i++){let n=t[i],o=n>="A"&&n<="Z",s=n>="a"&&n<="z";o&&r.length>0?(e.push(r),r=n):s||o?r+=n:r.length>0&&(e.push(r),r="")}return r.length>0&&e.push(r),e}function pS(t,e){let r=Ty(e),i=t.toLowerCase();if(r.map(s=>s[0].toLowerCase()).join("")===i)return!0;let o=0;for(let s of r){if(o>=t.length)break;let a=s.toLowerCase();if(a.startsWith(i.slice(o))){o=t.length;break}a[0]===i[o]&&o++}return o===t.length}function dS(t,e){return Ty(e).map(n=>n[0].toLowerCase()).join("")===t.toLowerCase()}function mS(t,e){let r=t.toLowerCase(),i=e.toLowerCase();if(t===e)return{matchType:"exact",score:100};if(r===i)return{matchType:"exact-case-insensitive",score:98};if(i.startsWith(r))return{matchType:"prefix",score:90+t.length/e.length*8};if(i.endsWith(r))return{matchType:"suffix",score:80+t.length/e.length*8};if(i.includes(r)){let o=t.length/e.length,s=i.indexOf(r)/e.length;return{matchType:"substring",score:70+o*10-s*5}}return dS(t,e)?{matchType:"acronym",score:75}:pS(t,e)?{matchType:"camel-case",score:65}:{matchType:"levenshtein",score:uS(t,e)*.6}}function Ts(t,e,r=50,i=5){let n=[];for(let o of e){let{matchType:s,score:a}=mS(t,o);if(a>=r){let c={exact:1e3,"exact-case-insensitive":900,prefix:800,suffix:700,substring:600,acronym:550,"camel-case":500,levenshtein:100}[s]+a;n.push({match:o,score:a,matchType:s,rank:c})}}return n.sort((o,s)=>s.rank!==o.rank?s.rank-o.rank:s.score!==o.score?s.score-o.score:o.match.length-s.match.length),n.slice(0,i)}Be();var it=class t{constructor(e){this.repoPath=e}get filesRepo(){return L.getInstance(this.repoPath).files}get exportsRepo(){return L.getInstance(this.repoPath).exports}static normalizeFileType(e){if(e==null)return;let r=Array.isArray(e)?e:e.split(",").map(i=>i.trim().replace(/^\./,""));return r.filter(Boolean).length?r:void 0}static matchesFilters(e,r,i,n){if(r.fileType?.length){let o=e.replace(/^.*\./,"").toLowerCase();if(!r.fileType.some(s=>s.toLowerCase()===o))return!1}if(r.layer!=null||r.excludeLayers&&r.excludeLayers.length>0){let o=n!=null?ht.mapClassificationToTier(n):ht.classify(e);if(r.layer!=null&&o!==r.layer||r.excludeLayers?.includes(o))return!1}if(r.dateModifiedAfter!=null||r.dateModifiedBefore!=null){if(i==null)return!1;let o=i>1e10?i/1e3:i;if(r.dateModifiedAfter!=null&&o<r.dateModifiedAfter||r.dateModifiedBefore!=null&&o>r.dateModifiedBefore)return!1}return!0}async searchByPath(e,r,i,n,o){let s=e.toLowerCase().split(/\s+/).filter(Boolean),a=this.filesRepo.findByPathKeywords(s,Math.min((r??50)*(o?Re.FILTERED_QUERY_LIMIT_MULTIPLIER:1),ve.MAX_LIMIT));o&&(a=a.filter(u=>t.matchesFilters(u.path,n,u.mtime,u.classification)),a=a.slice(0,r??50));let l=u=>u.replace(this.repoPath,"").replace(/^\//,"");return{content:[{type:"text",text:a.length===0?`No indexed files match path/filename: "${e}".
576
542
 
577
543
  If the repo is not indexed, run shadow_recon_onboard then shadow_sync_trace. Otherwise try broader keywords.`:`# Resolved paths: "${e}"
578
544
 
579
545
  ${a.length} file(s):
580
546
 
581
547
  `+a.map((u,d)=>`${d+1}. \`${l(u.path)}\`${u.classification?` (${u.classification})`:""}`).join(`
582
- `)}]}}async searchByConcept(e,r,i,n,o,s=!1){$.info({repoPath:this.repoPath,query:e},"Searching by concept (Semantic Analysis)...");let a=await od(e),l=g=>g.replace(this.repoPath,"").replace(/^\//,"");if(a){let g=await this.findConceptMatches(e,a,n,o,r*2);if(g.length>0){let x=g.length,E=g.slice(i,i+r),I=i+r<x?`
548
+ `)}]}}async searchByConcept(e,r,i,n,o,s=!1){$.info({repoPath:this.repoPath,query:e},"Searching by concept (Semantic Analysis)...");let a=await md(e),l=g=>g.replace(this.repoPath,"").replace(/^\//,"");if(a){let g=await this.findConceptMatches(e,a,n,o,r*2);if(g.length>0){let x=g.length,E=g.slice(i,i+r),I=i+r<x?`
583
549
  > **Note**: More results available. Use \`offset: ${i+r}\` to see the next page.`:"",R=s?`
584
550
  > _Compact mode: snippets omitted_`:x>20&&!s?"\n> \u{1F4A1} **Tip**: Use `compact: true` to reduce output size (omits snippets).":"",k=`# Semantic Concept Search: "${e}"
585
551
 
586
552
  Showing ${E.length} of ${x} relevant file(s) (offset: ${i}, limit: ${r})${I}${R}
587
553
 
588
- `,w=new ae(this.repoPath).getSection("gravity"),P=new Map;if(w?.hotspots)for(let O of w.hotspots)P.set(O.filePath,O.gravity);return{content:[{type:"text",text:s?k+E.map((O,M)=>{let q=l(O.path),oe=Math.round((O.decayedScore||0)*100),Z=P.get(O.path)?" \u269B\uFE0F":"";return`${i+M+1}. \`${q}\`${Z} (${oe}%) - ${O.summary||"No summary"}`}).join(`
589
- `):k+E.map((O,M)=>{let q=l(O.path),oe=Math.round((O.decayedScore||0)*100),B=P.get(O.path),Z=B?" \u269B\uFE0F **CORE**":"",G=B&&B>50?`
554
+ `,w=new pe(this.repoPath).getSection("gravity"),P=new Map;if(w?.hotspots)for(let O of w.hotspots)P.set(O.filePath,O.gravity);return{content:[{type:"text",text:s?k+E.map((O,M)=>{let q=l(O.path),oe=Math.round((O.decayedScore||0)*100),Z=P.get(O.path)?" \u269B\uFE0F":"";return`${i+M+1}. \`${q}\`${Z} (${oe}%) - ${O.summary||"No summary"}`}).join(`
555
+ `):k+E.map((O,M)=>{let q=l(O.path),oe=Math.round((O.decayedScore||0)*100),B=P.get(O.path),Z=B?" \u269B\uFE0F **CORE**":"",V=B&&B>50?`
590
556
  > \u26A0\uFE0F **STRATEGIC RISK**: High-gravity hotspot (${B.toFixed(0)}). Modifications may have significant architectural impact.`:"";return`## ${i+M+1}. ${q}${Z} (${oe}% Match)
591
- > **Rationale**: ${O.rationale}${G}
557
+ > **Rationale**: ${O.rationale}${V}
592
558
 
593
559
  `+(O.snippet?`**Matched Snippet**:
594
560
  \`\`\`typescript
@@ -597,7 +563,7 @@ ${O.snippet}
597
563
 
598
564
  `:"")+`**Summary**: ${O.summary||"No summary available"}
599
565
  `}).join(`
600
- `)}]}}}let c=e.replace(/[^\w\s]/g," ").trim(),u=this.filesRepo.findFts(c,(r+i)*(o?Pe.FILTERED_QUERY_LIMIT_MULTIPLIER:1));o&&(u=u.filter(g=>t.matchesFilters(g.path,n,g.mtime,g.classification)));let d=u.slice(i,i+r);if(d.length===0&&i===0){let g=this.filesRepo.getStats(),x=e.toLowerCase().split(/\s+/),E=this.filesRepo.findByPathKeywords(x,r);return o&&(E=E.filter(A=>t.matchesFilters(A.path,n,A.mtime,A.classification))),E.length>0?{content:[{type:"text",text:`# Concept Search: "${e}"
566
+ `)}]}}}let c=e.replace(/[^\w\s]/g," ").trim(),u=this.filesRepo.findFts(c,(r+i)*(o?Re.FILTERED_QUERY_LIMIT_MULTIPLIER:1));o&&(u=u.filter(g=>t.matchesFilters(g.path,n,g.mtime,g.classification)));let d=u.slice(i,i+r);if(d.length===0&&i===0){let g=this.filesRepo.getStats(),x=e.toLowerCase().split(/\s+/),E=this.filesRepo.findByPathKeywords(x,r);return o&&(E=E.filter(A=>t.matchesFilters(A.path,n,A.mtime,A.classification))),E.length>0?{content:[{type:"text",text:`# Concept Search: "${e}"
601
567
 
602
568
  \u26A0\uFE0F No semantic matches in file summaries (${g.withSummary}/${g.total} indexed).
603
569
 
@@ -619,7 +585,7 @@ Showing ${d.length} of ${p} relevant file(s)${f}${y}
619
585
 
620
586
  **Summary**: ${g.summary||"No summary available"}
621
587
  `).join(`
622
- `)}]}}async searchBySymbol(e,r,i,n,o){let s=e.toLowerCase(),a=k=>k.replace(this.repoPath,"").replace(/^\//,""),l;try{l=this.exportsRepo.findFts(`"${e}" OR ${e}*`,r+50)}catch{l=this.exportsRepo.findByPartialName(e,r+50)}if(l.length===0){let k=this.exportsRepo.getAllNames(5e3),j=Os(e,k,50,5);if(j.length>0){let w=j.map(P=>` \u2022 \`${P.match}\` (${Math.round(P.score)}% ${P.matchType} match)`).join(`
588
+ `)}]}}async searchBySymbol(e,r,i,n,o){let s=e.toLowerCase(),a=k=>k.replace(this.repoPath,"").replace(/^\//,""),l;try{l=this.exportsRepo.findFts(`"${e}" OR ${e}*`,r+50)}catch{l=this.exportsRepo.findByPartialName(e,r+50)}if(l.length===0){let k=this.exportsRepo.getAllNames(5e3),j=Ts(e,k,50,5);if(j.length>0){let w=j.map(P=>` \u2022 \`${P.match}\` (${Math.round(P.score)}% ${P.matchType} match)`).join(`
623
589
  `);return{content:[{type:"text",text:`No symbols found matching: "${e}"
624
590
 
625
591
  **Did you mean?**
@@ -627,7 +593,7 @@ ${w}
627
593
 
628
594
  \u{1F4A1} Try shadow_search_symbol with fuzzy, or shadow_search_concept for semantic search.`}]}}return{content:[{type:"text",text:`No symbols found matching: "${e}"
629
595
 
630
- \u{1F4A1} Try shadow_search_symbol (fuzzy) or shadow_search_concept for semantic search.`}]}}o&&(l=l.filter(k=>{let j=this.filesRepo.findByPath(k.file_path);return t.matchesFilters(k.file_path,n,j?.mtime,j?.classification)}));let c=new nn(this.repoPath),u=new ae(this.repoPath),d=c.getAncestorMissionIds(),p=be(this.repoPath)||void 0,m=this.exportsRepo.getGravityMap(d,p),f=u.getSection("gravity"),y=new Map;if(f?.hotspots)for(let k of f.hotspots)y.set(`${k.filePath}::${k.symbol}`,k.gravity);let b="\u{1F525}",_="\u26A1",g="\u269B\uFE0F",x=l.map((k,j)=>{let w=m[k.id],P=y.get(`${k.file_path}::${k.name}`),J=this.filesRepo.findByPath(k.file_path),O=ht.getMultiplier(k.file_path,J?.classification),M=(Pe.SCORE_BASE-j)*O;w&&(M+=w.score*Pe.SCORE_BASE),P&&(M+=P*Pe.SCORE_BASE*Pe.GRAVITY_STRUCTURAL_WEIGHT),k.name.toLowerCase()===s&&(M+=Pe.EXACT_MATCH_BONUS*O);let q=J?.mtime;if(q!=null){let B=q>1e10?q/1e3:q,Z=(Date.now()/1e3-B)/Zp.SECONDS_PER_DAY;Z<Pe.RECENT_FILE_THRESHOLD_DAYS?M+=Pe.RECENT_FILE_BOOST:Z<Pe.OLDER_FILE_THRESHOLD_DAYS&&(M+=Pe.OLDER_FILE_BOOST)}let oe=[];return w&&oe.push(...w.reasons),P&&oe.push(`Structural Hotspot (Gravity: ${P.toFixed(1)})`),{...k,activeGravity:w,structuralGravity:P,sortScore:M,reasons:oe}}).sort((k,j)=>j.sortScore-k.sortScore).slice(i,i+r),E=l.length,A=i+r<E,I=x.map((k,j)=>{let w=a(k.file_path),P=this.filesRepo.getContent(k.file_path),J="";if(P){let q=P.split(`
596
+ \u{1F4A1} Try shadow_search_symbol (fuzzy) or shadow_search_concept for semantic search.`}]}}o&&(l=l.filter(k=>{let j=this.filesRepo.findByPath(k.file_path);return t.matchesFilters(k.file_path,n,j?.mtime,j?.classification)}));let c=new Xt(this.repoPath),u=new pe(this.repoPath),d=c.getAncestorMissionIds(),p=_e(this.repoPath)||void 0,m=this.exportsRepo.getGravityMap(d,p),f=u.getSection("gravity"),y=new Map;if(f?.hotspots)for(let k of f.hotspots)y.set(`${k.filePath}::${k.symbol}`,k.gravity);let b="\u{1F525}",_="\u26A1",g="\u269B\uFE0F",x=l.map((k,j)=>{let w=m[k.id],P=y.get(`${k.file_path}::${k.name}`),J=this.filesRepo.findByPath(k.file_path),O=ht.getMultiplier(k.file_path,J?.classification),M=(Re.SCORE_BASE-j)*O;w&&(M+=w.score*Re.SCORE_BASE),P&&(M+=P*Re.SCORE_BASE*Re.GRAVITY_STRUCTURAL_WEIGHT),k.name.toLowerCase()===s&&(M+=Re.EXACT_MATCH_BONUS*O);let q=J?.mtime;if(q!=null){let B=q>1e10?q/1e3:q,Z=(Date.now()/1e3-B)/jp.SECONDS_PER_DAY;Z<Re.RECENT_FILE_THRESHOLD_DAYS?M+=Re.RECENT_FILE_BOOST:Z<Re.OLDER_FILE_THRESHOLD_DAYS&&(M+=Re.OLDER_FILE_BOOST)}let oe=[];return w&&oe.push(...w.reasons),P&&oe.push(`Structural Hotspot (Gravity: ${P.toFixed(1)})`),{...k,activeGravity:w,structuralGravity:P,sortScore:M,reasons:oe}}).sort((k,j)=>j.sortScore-k.sortScore).slice(i,i+r),E=l.length,A=i+r<E,I=x.map((k,j)=>{let w=a(k.file_path),P=this.filesRepo.getContent(k.file_path),J="";if(P){let q=P.split(`
631
597
  `);J=q.slice(Math.max(0,k.start_line-2),Math.min(q.length,k.start_line+3)).join(`
632
598
  `).trim()}let O=[];k.activeGravity&&(k.activeGravity.reasons.some(q=>q.includes("Working Set"))?O.push(b):k.activeGravity.reasons.some(q=>q.includes("Recent Intent"))&&O.push(_)),k.structuralGravity&&O.push(g);let M=O.length>0?` ${O.join("")}`:"";return{relPath:w,name:k.name,kind:k.kind,signature:k.signature,line:k.start_line,snippet:J,badgeStr:M,gravityReasons:k.reasons}});return{content:[{type:"text",text:`# Symbol Search Results: "${e}"
633
599
 
@@ -642,16 +608,16 @@ Showing ${I.length} matching symbol(s)${A?` (use offset=${i+r} for more)`:""}:
642
608
  ${k.snippet}
643
609
  \`\`\`
644
610
  `),w}).join(`
645
- `)}]}}async findConceptMatches(e,r,i,n,o,s=0){let a=be(this.repoPath)||void 0;if(!r)return[];let l=this.filesRepo.findWithEmbeddings(),u=new Yn(this.repoPath).getScorer(),p=new nn(this.repoPath).getAncestorMissionIds(),m=[];for(let f of l)try{let y=JSON.parse(f.embedding),b=ad(r,y),_=this.filesRepo.getContent(f.path),g=Pe.ENABLE_LEXICAL_SCORING&&_?Yr.calculateLexicalScore(_,e):0,x=g>0?.1:.18;if(b>x){if(n&&!t.matchesFilters(f.path,i,f.mtime,f.classification))continue;let E=f.mtime>2e9?Math.floor(f.mtime/1e3):f.mtime,A=Math.floor(Date.now()/1e3)-Zp.SECONDS_PER_YEAR,I=ht.getMultiplier(f.path,f.classification),R=u.calculateScore(b,E||A);R*=I;let j=this.filesRepo.getGravityMap(p,a)[f.path],w=f.classification?ht.mapClassificationToTier(f.classification):ht.classify(f.path,{content:_??void 0}),P=`Similarity: ${(b*100).toFixed(0)}%, Tier: ${w}${I!==1?` (${I}x)`:""}`;g>0&&(R+=g*Pe.LEXICAL_WEIGHT,P+=` | Lexical: +${g.toFixed(1)}`),j&&(R+=j.score,P+=` | \u{1F525} Gravity: +${j.score.toFixed(1)} (${j.reasons.join(", ")})`);let J=_?Yr.extractSnippet(_,e):void 0;m.push({path:f.path,summary:f.summary||"",score:b,decayedScore:R,rationale:P,snippet:J})}}catch{}return m.sort((f,y)=>(y.decayedScore||0)-(f.decayedScore||0)),m}};F();X();function Xn(t){let{fileType:e,layer:r,dateModifiedAfter:i,dateModifiedBefore:n,includeTests:o}=t,s={fileType:it.normalizeFileType(e),layer:r,excludeLayers:o===!1?["Virtual"]:void 0,dateModifiedAfter:i,dateModifiedBefore:n},a=!!(s.fileType?.length||s.layer!=null||s.excludeLayers&&s.excludeLayers.length>0||s.dateModifiedAfter!=null||s.dateModifiedBefore!=null);return{filters:s,hasFilters:a}}async function Dy(t){let e=Jn(t.query??""),r={...t,query:e},i=An();try{let{repoPath:n}=Ue(r),{query:o,limit:s=_e.DEFAULT_LIMIT,offset:a=0,skipSync:l=!1,compact:c=!1}=r;l||await Q(n);let{filters:u,hasFilters:d}=Xn(r),m=await new it(n).searchByConcept(o,s,a,u,d,c);return yS(n,o,"concept"),i(),m}catch(n){return $.error({error:n,args:t},"Concept Search failed"),i(),await mt(),{content:[{type:"text",text:`Concept Search failed: ${n instanceof Error?n.message:String(n)}`}],isError:!0}}}function yS(t,e,r){try{let i=L.getInstance(t),n=be(t);i.searchHistory.record(e,r,n)}catch(i){let n=be(t);$.error({module:"search",repoPath:t,query:e,mode:r,error:i instanceof Error?i.message:String(i),branch:n},"Failed to record search history"),mt()}}F();X();async function Oy(t){let e=Jn(t.query??""),r={...t,query:e},i=An();try{let{repoPath:n}=Ue(r),{query:o,limit:s=_e.DEFAULT_LIMIT,offset:a=0,skipSync:l=!1}=r;l||await Q(n);let{filters:c,hasFilters:u}=Xn(r),p=await new it(n).searchBySymbol(o,s,a,c,u);return vS(n,o,"symbol"),i(),p}catch(n){return $.error({error:n,args:t},"Symbol Search failed"),i(),await mt(),{content:[{type:"text",text:`Symbol Search failed: ${n instanceof Error?n.message:String(n)}`}],isError:!0}}}function vS(t,e,r){try{let i=L.getInstance(t),n=be(t);i.searchHistory.record(e,r,n)}catch(i){let n=be(t);$.error({module:"search",repoPath:t,query:e,mode:r,error:i instanceof Error?i.message:String(i),branch:n},"Failed to record search history"),mt()}}X();F();import Ay from"path";async function Ly(t){let{repoPath:e,query:r,key:i="",kind:n,limit:o=50}=t,s=i||r;if(!s&&!n)return{content:[{type:"text",text:'Error: Either "key" or "kind" parameter is required.'}]};await Q(e);let{configs:a}=L.getInstance(e);if(s){$.info({repoPath:e,key:s},"Searching for config key in DB...");let d=a.findByKey(s,o);if(d.length===0)return{content:[{type:"text",text:`No configuration found for key: ${s}`}]};let p=d.map(f=>({file:Ay.relative(e,f.file_path),key:f.key,value:f.value,kind:f.kind}));return{content:[{type:"text",text:`# Configuration Search: "${s}"
611
+ `)}]}}async findConceptMatches(e,r,i,n,o,s=0){let a=_e(this.repoPath)||void 0;if(!r)return[];let l=this.filesRepo.findWithEmbeddings(),u=new qn(this.repoPath).getScorer(),p=new Xt(this.repoPath).getAncestorMissionIds(),m=[];for(let f of l)try{let y=JSON.parse(f.embedding),b=hd(r,y),_=this.filesRepo.getContent(f.path),g=Re.ENABLE_LEXICAL_SCORING&&_?qr.calculateLexicalScore(_,e):0,x=g>0?.1:.18;if(b>x){if(n&&!t.matchesFilters(f.path,i,f.mtime,f.classification))continue;let E=f.mtime>2e9?Math.floor(f.mtime/1e3):f.mtime,A=Math.floor(Date.now()/1e3)-jp.SECONDS_PER_YEAR,I=ht.getMultiplier(f.path,f.classification),R=u.calculateScore(b,E||A);R*=I;let j=this.filesRepo.getGravityMap(p,a)[f.path],w=f.classification?ht.mapClassificationToTier(f.classification):ht.classify(f.path,{content:_??void 0}),P=`Similarity: ${(b*100).toFixed(0)}%, Tier: ${w}${I!==1?` (${I}x)`:""}`;g>0&&(R+=g*Re.LEXICAL_WEIGHT,P+=` | Lexical: +${g.toFixed(1)}`),j&&(R+=j.score,P+=` | \u{1F525} Gravity: +${j.score.toFixed(1)} (${j.reasons.join(", ")})`);let J=_?qr.extractSnippet(_,e):void 0;m.push({path:f.path,summary:f.summary||"",score:b,decayedScore:R,rationale:P,snippet:J})}}catch{}return m.sort((f,y)=>(y.decayedScore||0)-(f.decayedScore||0)),m}};F();X();function Kn(t){let{fileType:e,layer:r,dateModifiedAfter:i,dateModifiedBefore:n,includeTests:o}=t,s={fileType:it.normalizeFileType(e),layer:r,excludeLayers:o===!1?["Virtual"]:void 0,dateModifiedAfter:i,dateModifiedBefore:n},a=!!(s.fileType?.length||s.layer!=null||s.excludeLayers&&s.excludeLayers.length>0||s.dateModifiedAfter!=null||s.dateModifiedBefore!=null);return{filters:s,hasFilters:a}}async function Ry(t){let e=Ln(t.query??""),r={...t,query:e},i=Fn();try{let{repoPath:n}=je(r),{query:o,limit:s=ve.DEFAULT_LIMIT,offset:a=0,skipSync:l=!1,compact:c=!1}=r;l||await Q(n);let{filters:u,hasFilters:d}=Kn(r),m=await new it(n).searchByConcept(o,s,a,u,d,c);return fS(n,o,"concept"),i(),m}catch(n){return $.error({error:n,args:t},"Concept Search failed"),i(),await mt(),{content:[{type:"text",text:`Concept Search failed: ${n instanceof Error?n.message:String(n)}`}],isError:!0}}}function fS(t,e,r){try{let i=L.getInstance(t),n=_e(t);i.searchHistory.record(e,r,n)}catch(i){let n=_e(t);$.error({module:"search",repoPath:t,query:e,mode:r,error:i instanceof Error?i.message:String(i),branch:n},"Failed to record search history"),mt()}}F();X();async function Py(t){let e=Ln(t.query??""),r={...t,query:e},i=Fn();try{let{repoPath:n}=je(r),{query:o,limit:s=ve.DEFAULT_LIMIT,offset:a=0,skipSync:l=!1}=r;l||await Q(n);let{filters:c,hasFilters:u}=Kn(r),p=await new it(n).searchBySymbol(o,s,a,c,u);return hS(n,o,"symbol"),i(),p}catch(n){return $.error({error:n,args:t},"Symbol Search failed"),i(),await mt(),{content:[{type:"text",text:`Symbol Search failed: ${n instanceof Error?n.message:String(n)}`}],isError:!0}}}function hS(t,e,r){try{let i=L.getInstance(t),n=_e(t);i.searchHistory.record(e,r,n)}catch(i){let n=_e(t);$.error({module:"search",repoPath:t,query:e,mode:r,error:i instanceof Error?i.message:String(i),branch:n},"Failed to record search history"),mt()}}X();F();import Ny from"path";async function zy(t){let{repoPath:e,query:r,key:i="",kind:n,limit:o=50}=t,s=i||r;if(!s&&!n)return{content:[{type:"text",text:'Error: Either "key" or "kind" parameter is required.'}]};await Q(e);let{configs:a}=L.getInstance(e);if(s){$.info({repoPath:e,key:s},"Searching for config key in DB...");let d=a.findByKey(s,o);if(d.length===0)return{content:[{type:"text",text:`No configuration found for key: ${s}`}]};let p=d.map(f=>({file:Ny.relative(e,f.file_path),key:f.key,value:f.value,kind:f.kind}));return{content:[{type:"text",text:`# Configuration Search: "${s}"
646
612
 
647
613
  Found ${d.length} match(es):
648
614
 
649
615
  `+p.map(f=>`## ${f.file} (${f.kind})
650
616
  **${f.key}**: \`${f.value}\``).join(`
651
617
 
652
- `)}]}}let l=a.findByKind(n||null,o),c=l.map(d=>({...d,file:Ay.relative(e,d.file_path)})),u=JSON.stringify(c,null,2);return l.length===o&&(u=`Results limited to ${o} entries. Use the 'limit' parameter to see more.
618
+ `)}]}}let l=a.findByKind(n||null,o),c=l.map(d=>({...d,file:Ny.relative(e,d.file_path)})),u=JSON.stringify(c,null,2);return l.length===o&&(u=`Results limited to ${o} entries. Use the 'limit' parameter to see more.
653
619
 
654
- `+u),{content:[{type:"text",text:u}]}}F();X();async function Cy(t){let e=Jn(t.query??""),r={...t,query:e},i=An();try{let{repoPath:n}=Ue(r),{query:o,limit:s=_e.DEFAULT_LIMIT,offset:a=0,skipSync:l=!1}=r;l||await Q(n);let{filters:c,hasFilters:u}=Xn(r),p=await new it(n).searchByPath(o,s,a,c,u);return _S(n,o,"path"),i(),p}catch(n){return $.error({error:n,args:t},"Path Search failed"),i(),await mt(),{content:[{type:"text",text:`Path Search failed: ${n instanceof Error?n.message:String(n)}`}],isError:!0}}}function _S(t,e,r){try{let i=L.getInstance(t),n=be(t);i.searchHistory.record(e,r,n)}catch(i){let n=be(t);$.error({module:"search",repoPath:t,query:e,mode:r,error:i instanceof Error?i.message:String(i),branch:n},"Failed to record search history"),mt()}}X();import gt from"path";import Id from"fs";F();import RS from"path";F();Pt();import bS from"better-sqlite3";import Qn from"path";import jy from"fs";import xS from"os";import $S from"crypto";var SS=$.child({module:"fusion-connection"}),As=5,kS=1,My=["files","exports","imports","configs","schema_migrations"],Ls=class{fusionDb;attachedRepos=new Map;fusionDbPath;name;constructor(e){this.name=e.name,this.fusionDbPath=this.getFusionDbPath(e.name),SS.info({name:e.name,path:this.fusionDbPath},"Initializing fused index connection");let r=Qn.dirname(this.fusionDbPath);jy.existsSync(r)||jy.mkdirSync(r,{recursive:!0}),this.fusionDb=new bS(this.fusionDbPath),this.fusionDb.pragma("journal_mode = WAL"),this.fusionDb.pragma("busy_timeout = 5000"),this.initFusionSchema();for(let i of e.repoPaths)this.attachRepo(i)}getFusionDbPath(e){let r=xS.homedir(),i=Qn.join(r,".mcp-liquid-shadow","fused"),n=e.replace(/[^a-zA-Z0-9-_]/g,"_");return Qn.join(i,`${n}.db`)}initFusionSchema(){this.fusionDb.exec(`
620
+ `+u),{content:[{type:"text",text:u}]}}F();X();async function Dy(t){let e=Ln(t.query??""),r={...t,query:e},i=Fn();try{let{repoPath:n}=je(r),{query:o,limit:s=ve.DEFAULT_LIMIT,offset:a=0,skipSync:l=!1}=r;l||await Q(n);let{filters:c,hasFilters:u}=Kn(r),p=await new it(n).searchByPath(o,s,a,c,u);return gS(n,o,"path"),i(),p}catch(n){return $.error({error:n,args:t},"Path Search failed"),i(),await mt(),{content:[{type:"text",text:`Path Search failed: ${n instanceof Error?n.message:String(n)}`}],isError:!0}}}function gS(t,e,r){try{let i=L.getInstance(t),n=_e(t);i.searchHistory.record(e,r,n)}catch(i){let n=_e(t);$.error({module:"search",repoPath:t,query:e,mode:r,error:i instanceof Error?i.message:String(i),branch:n},"Failed to record search history"),mt()}}X();import gt from"path";import Sd from"fs";F();import wS from"path";F();Kt();import yS from"better-sqlite3";import Yn from"path";import Oy from"fs";import vS from"os";import _S from"crypto";var bS=$.child({module:"fusion-connection"}),Rs=5,xS=1,Ay=["files","exports","imports","configs","schema_migrations"],Ps=class{fusionDb;attachedRepos=new Map;fusionDbPath;name;constructor(e){this.name=e.name,this.fusionDbPath=this.getFusionDbPath(e.name),bS.info({name:e.name,path:this.fusionDbPath},"Initializing fused index connection");let r=Yn.dirname(this.fusionDbPath);Oy.existsSync(r)||Oy.mkdirSync(r,{recursive:!0}),this.fusionDb=new yS(this.fusionDbPath),this.fusionDb.pragma("journal_mode = WAL"),this.fusionDb.pragma("busy_timeout = 5000"),this.initFusionSchema();for(let i of e.repoPaths)this.attachRepo(i)}getFusionDbPath(e){let r=vS.homedir(),i=Yn.join(r,".mcp-liquid-shadow","fused"),n=e.replace(/[^a-zA-Z0-9-_]/g,"_");return Yn.join(i,`${n}.db`)}initFusionSchema(){this.fusionDb.exec(`
655
621
  CREATE TABLE IF NOT EXISTS fused_repos (
656
622
  alias TEXT PRIMARY KEY,
657
623
  repo_path TEXT NOT NULL UNIQUE,
@@ -685,16 +651,16 @@ Found ${d.length} match(es):
685
651
 
686
652
  CREATE INDEX IF NOT EXISTS idx_virtual_edges_source ON virtual_edges(source_repo, source_file_path);
687
653
  CREATE INDEX IF NOT EXISTS idx_virtual_edges_target ON virtual_edges(target_repo, target_file_path);
688
- `),this.fusionDb.prepare("INSERT OR REPLACE INTO fused_metadata (key, value, updated_at) VALUES ('schema_version', ?, unixepoch())").run(kS.toString())}attachRepo(e){let r=Qn.resolve(e);if(this.attachedRepos.has(r))return;if(!je(r))throw new Error(`Repository "${r}" is not indexed. Run shadow_recon_onboard({ repoPath: "${r}" }) then shadow_sync_trace({ repoPath: "${r}" }).`);let i=Ae(r),n=i.name;this.validateSchemaCompatibility(i,r);let o=this.getSchemaVersion(i),s=this.generateAlias(r),a=3,l=100;for(let c=1;c<=a;c++)try{this.fusionDb.exec(`ATTACH DATABASE '${n}' AS ${s}`);let u={alias:s,repoPath:r,dbPath:n,schemaVersion:o,attached:!0};this.attachedRepos.set(r,u),this.fusionDb.prepare(`INSERT OR REPLACE INTO fused_repos (alias, repo_path, db_path, schema_version, attached_at, last_validated_at)
689
- VALUES (?, ?, ?, ?, unixepoch(), unixepoch())`).run(s,r,n,o);return}catch(u){let d=u instanceof Error?u.message.toLowerCase():String(u).toLowerCase();if((d.includes("locked")||d.includes("busy"))&&c<a){this.sleep(l*c);continue}throw u}}checkHealth(){let e=[];for(let r of this.attachedRepos.values())try{this.fusionDb.prepare(`SELECT 1 FROM ${r.alias}.files LIMIT 1`).get(),e.push({alias:r.alias,repoPath:r.repoPath,accessible:!0})}catch(i){e.push({alias:r.alias,repoPath:r.repoPath,accessible:!1,error:i instanceof Error?i.message:String(i)})}return{healthy:e.every(r=>r.accessible),repos:e}}detachRepo(e){let r=Qn.resolve(e),i=this.attachedRepos.get(r);i&&(this.fusionDb.exec(`DETACH DATABASE ${i.alias}`),this.attachedRepos.delete(r),this.fusionDb.prepare("DELETE FROM fused_repos WHERE repo_path = ?").run(r))}refreshRepo(e){this.detachRepo(e),this.attachRepo(e)}refreshAll(){let e=Array.from(this.attachedRepos.keys());for(let r of e)this.refreshRepo(r)}validateSchemas(){let e=Array.from(this.attachedRepos.values()).map(r=>{let i=Ae(r.repoPath),n=My.filter(s=>!this.checkTableExists(i,s)),o=this.getSchemaVersion(i);return{alias:r.alias,repoPath:r.repoPath,schemaVersion:o,compatible:o>=As&&n.length===0,missingTables:n}});return{valid:e.every(r=>r.compatible),minVersion:As,repos:e}}getAttachedRepos(){return Array.from(this.attachedRepos.values())}prepare(e){return this.fusionDb.prepare(e)}exec(e){this.fusionDb.exec(e)}close(){for(let e of this.attachedRepos.values())try{this.fusionDb.exec(`DETACH DATABASE ${e.alias}`)}catch{}this.attachedRepos.clear(),this.fusionDb.open&&this.fusionDb.close()}generateAlias(e){let r=Qn.basename(e).replace(/[^a-zA-Z0-9]/g,"_").toLowerCase(),i=$S.createHash("sha256").update(e).digest("hex").substring(0,6);return`repo_${r}_${i}`}getSchemaVersion(e){try{return e.prepare("SELECT MAX(version) as version FROM schema_migrations").get()?.version||0}catch{return 0}}validateSchemaCompatibility(e,r){let i=this.getSchemaVersion(e);if(i<As)throw new Error(`Schema version mismatch for ${r}. Expected >= ${As}, got ${i}.`);let n=My.filter(o=>!this.checkTableExists(e,o));if(n.length>0)throw new Error(`Missing tables in ${r}: ${n.join(", ")}`)}checkTableExists(e,r){try{return!!e.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name=?").get(r)}catch{return!1}}sleep(e){let r=Date.now()+e;for(;Date.now()<r;);}get nameValue(){return this.name}get dbPath(){return this.fusionDbPath}};F();var Ut=$.child({module:"edge-scanner"});function Ed(t){let e=t.split("?")[0].split("#")[0];return e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e}function ES(t){if(!t)return null;try{let e=JSON.parse(t);return e.path||e.name||null}catch{return null}}function wS(t,e){let r=Ed(t),i=Ed(e);if(r===i)return!0;let n=i.replace(/:[^/]+/g,"[^/]+").replace(/\{[^}]+\}/g,"[^/]+").replace(/\$[^/]+/g,"[^/]+");return new RegExp(`^${n}$`).test(r)}function IS(t){Ut.info("Starting HTTP gap detection scan");let e=t.getAttachedRepos();if(e.length<2)return Ut.warn("Need at least 2 repos for cross-repo dependency detection"),0;let r=[];for(let o of e)try{let s=`
654
+ `),this.fusionDb.prepare("INSERT OR REPLACE INTO fused_metadata (key, value, updated_at) VALUES ('schema_version', ?, unixepoch())").run(xS.toString())}attachRepo(e){let r=Yn.resolve(e);if(this.attachedRepos.has(r))return;if(!Qe(r))throw new Error(`Repository "${r}" is not indexed. Run shadow_recon_onboard({ repoPath: "${r}" }) then shadow_sync_trace({ repoPath: "${r}" }).`);let i=Oe(r),n=i.name;this.validateSchemaCompatibility(i,r);let o=this.getSchemaVersion(i),s=this.generateAlias(r),a=3,l=100;for(let c=1;c<=a;c++)try{this.fusionDb.exec(`ATTACH DATABASE '${n}' AS ${s}`);let u={alias:s,repoPath:r,dbPath:n,schemaVersion:o,attached:!0};this.attachedRepos.set(r,u),this.fusionDb.prepare(`INSERT OR REPLACE INTO fused_repos (alias, repo_path, db_path, schema_version, attached_at, last_validated_at)
655
+ VALUES (?, ?, ?, ?, unixepoch(), unixepoch())`).run(s,r,n,o);return}catch(u){let d=u instanceof Error?u.message.toLowerCase():String(u).toLowerCase();if((d.includes("locked")||d.includes("busy"))&&c<a){this.sleep(l*c);continue}throw u}}checkHealth(){let e=[];for(let r of this.attachedRepos.values())try{this.fusionDb.prepare(`SELECT 1 FROM ${r.alias}.files LIMIT 1`).get(),e.push({alias:r.alias,repoPath:r.repoPath,accessible:!0})}catch(i){e.push({alias:r.alias,repoPath:r.repoPath,accessible:!1,error:i instanceof Error?i.message:String(i)})}return{healthy:e.every(r=>r.accessible),repos:e}}detachRepo(e){let r=Yn.resolve(e),i=this.attachedRepos.get(r);i&&(this.fusionDb.exec(`DETACH DATABASE ${i.alias}`),this.attachedRepos.delete(r),this.fusionDb.prepare("DELETE FROM fused_repos WHERE repo_path = ?").run(r))}refreshRepo(e){this.detachRepo(e),this.attachRepo(e)}refreshAll(){let e=Array.from(this.attachedRepos.keys());for(let r of e)this.refreshRepo(r)}validateSchemas(){let e=Array.from(this.attachedRepos.values()).map(r=>{let i=Oe(r.repoPath),n=Ay.filter(s=>!this.checkTableExists(i,s)),o=this.getSchemaVersion(i);return{alias:r.alias,repoPath:r.repoPath,schemaVersion:o,compatible:o>=Rs&&n.length===0,missingTables:n}});return{valid:e.every(r=>r.compatible),minVersion:Rs,repos:e}}getAttachedRepos(){return Array.from(this.attachedRepos.values())}prepare(e){return this.fusionDb.prepare(e)}exec(e){this.fusionDb.exec(e)}close(){for(let e of this.attachedRepos.values())try{this.fusionDb.exec(`DETACH DATABASE ${e.alias}`)}catch{}this.attachedRepos.clear(),this.fusionDb.open&&this.fusionDb.close()}generateAlias(e){let r=Yn.basename(e).replace(/[^a-zA-Z0-9]/g,"_").toLowerCase(),i=_S.createHash("sha256").update(e).digest("hex").substring(0,6);return`repo_${r}_${i}`}getSchemaVersion(e){try{return e.prepare("SELECT MAX(version) as version FROM schema_migrations").get()?.version||0}catch{return 0}}validateSchemaCompatibility(e,r){let i=this.getSchemaVersion(e);if(i<Rs)throw new Error(`Schema version mismatch for ${r}. Expected >= ${Rs}, got ${i}.`);let n=Ay.filter(o=>!this.checkTableExists(e,o));if(n.length>0)throw new Error(`Missing tables in ${r}: ${n.join(", ")}`)}checkTableExists(e,r){try{return!!e.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name=?").get(r)}catch{return!1}}sleep(e){let r=Date.now()+e;for(;Date.now()<r;);}get nameValue(){return this.name}get dbPath(){return this.fusionDbPath}};F();var Mt=$.child({module:"edge-scanner"});function xd(t){let e=t.split("?")[0].split("#")[0];return e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e}function $S(t){if(!t)return null;try{let e=JSON.parse(t);return e.path||e.name||null}catch{return null}}function SS(t,e){let r=xd(t),i=xd(e);if(r===i)return!0;let n=i.replace(/:[^/]+/g,"[^/]+").replace(/\{[^}]+\}/g,"[^/]+").replace(/\$[^/]+/g,"[^/]+");return new RegExp(`^${n}$`).test(r)}function kS(t){Mt.info("Starting HTTP gap detection scan");let e=t.getAttachedRepos();if(e.length<2)return Mt.warn("Need at least 2 repos for cross-repo dependency detection"),0;let r=[];for(let o of e)try{let s=`
690
656
  SELECT id, name, file_path, capabilities
691
657
  FROM ${o.alias}.exports
692
658
  WHERE kind = 'HTTP Route'
693
- `,a=t.executeRawQuery(s);for(let l of a){let c=ES(l.capabilities)||l.name;c&&c.startsWith("/")&&r.push({repo:o.alias,repoPath:o.repoPath,filePath:l.file_path,symbolId:l.id,routePath:c})}}catch(s){Ut.warn({repo:o.alias,error:s},"Failed to query backend routes")}Ut.debug({count:r.length},"Found backend routes");let i=[];for(let o of e)try{let s=`
659
+ `,a=t.executeRawQuery(s);for(let l of a){let c=$S(l.capabilities)||l.name;c&&c.startsWith("/")&&r.push({repo:o.alias,repoPath:o.repoPath,filePath:l.file_path,symbolId:l.id,routePath:c})}}catch(s){Mt.warn({repo:o.alias,error:s},"Failed to query backend routes")}Mt.debug({count:r.length},"Found backend routes");let i=[];for(let o of e)try{let s=`
694
660
  SELECT file_path, name
695
661
  FROM ${o.alias}.event_synapses
696
662
  WHERE type = 'api_route' AND direction = 'produce'
697
- `,a=t.executeRawQuery(s);for(let l of a){let c=Ed(l.name);c&&c.startsWith("/")&&i.push({repo:o.alias,repoPath:o.repoPath,filePath:l.file_path,routePath:c})}}catch(s){Ut.warn({repo:o.alias,error:s},"Failed to query frontend API calls")}Ut.debug({count:i.length},"Found frontend API calls");let n=0;for(let o of i)for(let s of r)if(o.repoPath!==s.repoPath&&wS(o.routePath,s.routePath))try{t.addVirtualEdge({sourceRepo:o.repoPath,sourceFilePath:o.filePath,targetRepo:s.repoPath,targetFilePath:s.filePath,targetSymbolId:s.symbolId,relationship:"api_call",metadata:{frontendPath:o.routePath,backendPath:s.routePath,method:s.method},confidence:1}),n++}catch(a){Ut.debug({source:o.filePath,target:s.filePath,error:a},"Skipped duplicate edge")}return Ut.info({edgesCreated:n,backendRoutes:r.length,frontendCalls:i.length},"HTTP gap detection scan completed"),n}function Uy(t){let e=IS(t);return{httpGaps:e,totalEdges:e}}F();var TS=$.child({module:"fusion-index-service"}),Cs=class{constructor(e){this.connection=e}executeFederatedQuery(e,...r){return this.connection.prepare(e).all(...r).map(o=>{let{_repo_alias:s,_repo_path:a,...l}=o;return{repo:s,repoPath:a,data:l}})}executeRawQuery(e,...r){return this.connection.prepare(e).all(...r)}buildAdvancedQuery(e){let r=this.connection.getAttachedRepos();if(r.length===0)throw new Error("No repositories attached");let{table:i,tableAlias:n,columns:o,joins:s,where:a,groupBy:l,having:c,orderBy:u,limit:d,offset:p}=e,m=n||i.charAt(0),f=o.join(", "),b=r.map(_=>{let g=`${_.alias}.${i} ${m}`,x="";s&&s.length>0&&(x=s.map(R=>{let k=R.alias||R.table.charAt(0);return`${R.type} JOIN ${_.alias}.${R.table} ${k} ON ${R.on}`}).join(`
663
+ `,a=t.executeRawQuery(s);for(let l of a){let c=xd(l.name);c&&c.startsWith("/")&&i.push({repo:o.alias,repoPath:o.repoPath,filePath:l.file_path,routePath:c})}}catch(s){Mt.warn({repo:o.alias,error:s},"Failed to query frontend API calls")}Mt.debug({count:i.length},"Found frontend API calls");let n=0;for(let o of i)for(let s of r)if(o.repoPath!==s.repoPath&&SS(o.routePath,s.routePath))try{t.addVirtualEdge({sourceRepo:o.repoPath,sourceFilePath:o.filePath,targetRepo:s.repoPath,targetFilePath:s.filePath,targetSymbolId:s.symbolId,relationship:"api_call",metadata:{frontendPath:o.routePath,backendPath:s.routePath,method:s.method},confidence:1}),n++}catch(a){Mt.debug({source:o.filePath,target:s.filePath,error:a},"Skipped duplicate edge")}return Mt.info({edgesCreated:n,backendRoutes:r.length,frontendCalls:i.length},"HTTP gap detection scan completed"),n}function Ly(t){let e=kS(t);return{httpGaps:e,totalEdges:e}}F();var ES=$.child({module:"fusion-index-service"}),Ns=class{constructor(e){this.connection=e}executeFederatedQuery(e,...r){return this.connection.prepare(e).all(...r).map(o=>{let{_repo_alias:s,_repo_path:a,...l}=o;return{repo:s,repoPath:a,data:l}})}executeRawQuery(e,...r){return this.connection.prepare(e).all(...r)}buildAdvancedQuery(e){let r=this.connection.getAttachedRepos();if(r.length===0)throw new Error("No repositories attached");let{table:i,tableAlias:n,columns:o,joins:s,where:a,groupBy:l,having:c,orderBy:u,limit:d,offset:p}=e,m=n||i.charAt(0),f=o.join(", "),b=r.map(_=>{let g=`${_.alias}.${i} ${m}`,x="";s&&s.length>0&&(x=s.map(R=>{let k=R.alias||R.table.charAt(0);return`${R.type} JOIN ${_.alias}.${R.table} ${k} ON ${R.on}`}).join(`
698
664
  `));let E=a?`WHERE ${a}`:"",A=l&&l.length>0?`GROUP BY ${l.join(", ")}`:"",I=c?`HAVING ${c}`:"";return`SELECT '${_.alias}' as _repo_alias, '${_.repoPath}' as _repo_path, ${f} FROM ${g} ${x} ${E} ${A} ${I}`.trim()}).join(`
699
665
  UNION ALL
700
666
  `);return u&&(b=`SELECT * FROM (${b}) AS federated_results ORDER BY ${u}`),d!==void 0&&(b+=` LIMIT ${d}`),p!==void 0&&(b+=` OFFSET ${p}`),b}buildFtsQuery(e,r,i,n,o=50){let s=this.connection.getAttachedRepos();if(s.length===0)throw new Error("No repositories attached");let a=i.replace(/"/g,'""'),l=n.map(u=>`c.${u}`).join(", ");return`${s.map(u=>`
@@ -719,23 +685,23 @@ WHERE i.resolved_path IS NOT NULL`);return r.join(`
719
685
  INSERT INTO virtual_edges
720
686
  (source_repo, source_file_path, source_symbol_id, target_repo, target_file_path, target_symbol_id, relationship, metadata, confidence, updated_at)
721
687
  VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, unixepoch())
722
- `).run(e.sourceRepo,e.sourceFilePath,e.sourceSymbolId||null,e.targetRepo,e.targetFilePath,e.targetSymbolId||null,e.relationship,e.metadata?JSON.stringify(e.metadata):null,e.confidence??1).lastInsertRowid}scanEdges(){return TS.info({name:this.connection.nameValue},"Starting edge scan"),Uy(this)}getAttachedRepos(){return this.connection.getAttachedRepos()}get name(){return this.connection.nameValue}};var Fy=$.child({module:"fused-index"}),wd=class{connection;service;configName;constructor(e){this.configName=e.name,this.connection=new Ls(e),this.service=new Cs(this.connection)}attachRepo(e){this.connection.attachRepo(e)}detachRepo(e){this.connection.detachRepo(e)}refreshRepo(e){this.connection.refreshRepo(e)}getAttachedRepos(){return this.connection.getAttachedRepos()}checkHealth(){return this.connection.checkHealth()}close(){this.connection.close(),Fy.info({name:this.configName},"Fused index closed")}getStatus(){let e=this.service.executeRawQuery("SELECT COUNT(*) as count FROM virtual_edges");return{name:this.connection.nameValue,path:this.connection.dbPath,attachedRepos:this.connection.getAttachedRepos().length,repos:this.connection.getAttachedRepos(),virtualEdgesCount:e[0]?.count||0}}searchExports(e,r=50){return this.service.searchExports(e,r)}searchFiles(e,r=50){return this.service.searchFiles(e,r)}getVirtualEdges(e,r){return this.service.getVirtualEdges(e,r)}addVirtualEdge(e){return this.service.addVirtualEdge(e)}scanEdges(){return this.service.scanEdges()}buildUnionQuery(e,r,i){return this.service.buildUnionQuery(e,r,i)}executeFederatedQuery(e,...r){return this.service.executeFederatedQuery(e,...r)}executeRawQuery(e,...r){return this.service.executeRawQuery(e,...r)}buildAdvancedQuery(e){return this.service.buildAdvancedQuery(e)}buildFtsQuery(e,r,i,n,o){return this.service.buildFtsQuery(e,r,i,n,o)}buildCrossRepoImportsQuery(){return this.service.buildCrossRepoImportsQuery()}refreshAll(){this.connection.refreshAll()}validateSchemas(){return Fy.debug({name:this.configName},"Delegating validateSchemas"),this.connection.validateSchemas()}},js=new Map;function Zy(t){let e=js.get(t.name);if(e){let i=new Set(e.getAttachedRepos().map(s=>s.repoPath)),n=new Set(t.repoPaths.map(s=>RS.resolve(s)));if(i.size===n.size&&[...i].every(s=>n.has(s)))return e;e.close(),js.delete(t.name)}let r=new wd(t);return js.set(t.name,r),r}function Hy(){return Array.from(js.keys())}import{Visitor as PS}from"@swc/core/Visitor.js";var er=class extends PS{calls=new Set;apiCalls=[];imports=new Map;axiosInstances=new Map;visitImportDeclaration(e){let r=e.source.value;for(let i of e.specifiers)(i.type==="ImportDefaultSpecifier"||i.type==="ImportSpecifier")&&this.imports.set(i.local.value,r);return super.visitImportDeclaration(e)}visitCallExpression(e){if(e.callee.type==="Identifier"){let r=e.callee.value;this.calls.add(r),(r==="axios"||r==="http")&&e.arguments.length>0&&this.extractApiCallFromConfig(e.arguments[0].expression)}else if(e.callee.type==="MemberExpression"){let r=e.callee.property.value,i=o=>{if(!o)return"?";if(o.type==="Identifier")return o.value;if(o.type==="ThisExpression")return"this";if(o.type==="MemberExpression"){let s=i(o.object),a=o.property.value||"?";return`${s}.${a}`}return o.type==="TsNonNullExpression"||o.type==="TsAsExpression"||o.type==="ParenthesisExpression"?i(o.expression):"?"},n=i(e.callee.object);if(n!=="?"&&r){if(this.calls.add(`${n}.${r}`),n==="axios"||n==="http"||this.axiosInstances.has(n)){let o=this.axiosInstances.get(n)||"";this.extractApiCall(r,e.arguments,o)}if((n.toLowerCase().includes("pubsub")||n==="pubSubClient"||n.endsWith(".pubSubClient"))&&r!=="subscribe"){let o=r;if((r==="publish"||r==="publishMessage"||r==="publishTaskByNameAndPayload")&&e.arguments.length>0)for(let s of e.arguments){let a=s.expression;if(a.type==="ObjectExpression"){let l=a.properties.find(c=>c.key?.type==="Identifier"&&(c.key.value==="action"||c.key.value==="type")||c.key?.type==="StringLiteral"&&(c.key.value==="action"||c.key.value==="type"));if(l&&l.value?.type==="StringLiteral"){o=l.value.value;break}}if(a.type==="CallExpression"&&a.callee.type==="MemberExpression"&&a.callee.object.value==="JSON"&&a.callee.property.value==="stringify"&&a.arguments.length>0){let l=a.arguments[0].expression;if(l.type==="ObjectExpression"){let c=l.properties.find(u=>u.key?.type==="Identifier"&&(u.key.value==="action"||u.key.value==="type")||u.key?.type==="StringLiteral"&&(u.key.value==="action"||u.key.value==="type"));if(c&&c.value?.type==="StringLiteral"){o=c.value.value;break}}}}this.apiCalls.push({method:"PUBSUB",url:o})}}}return e.callee.type==="Identifier"&&e.callee.value==="fetch"&&this.extractApiCall("GET",e.arguments),super.visitCallExpression(e)}visitNewExpression(e){return e.callee.type==="Identifier"&&this.calls.add(e.callee.value),super.visitNewExpression(e)}visitVariableDeclarator(e){if(e.init&&e.init.type==="CallExpression"){let r=e.init.callee;if(r.type==="MemberExpression"&&r.property.value==="create"&&r.object.value==="axios"){let n=e.init.arguments[0]?.expression;if(n&&n.type==="ObjectExpression"){let o=n.properties.find(s=>s.key.value==="baseURL");if(o){let s="?";o.value.type==="StringLiteral"?s=o.value.value:o.value.type==="Identifier"&&(s=`\${${o.value.value}}`),e.id.type==="Identifier"&&this.axiosInstances.set(e.id.value,s)}}}}return super.visitVariableDeclarator(e)}extractApiCallFromConfig(e){if(e&&e.type==="ObjectExpression"){let r=e.properties.find(n=>n.key.type==="Identifier"&&n.key.value==="url"||n.key.type==="StringLiteral"&&n.key.value==="url"),i=e.properties.find(n=>n.key.type==="Identifier"&&n.key.value==="method"||n.key.type==="StringLiteral"&&n.key.value==="method");if(r&&r.value){let n=i?.value?.value||"GET",o=this.resolveUrlValue(r.value);o!=="?"&&this.apiCalls.push({method:n.toUpperCase(),url:o})}}}resolveUrlValue(e){return e.type==="StringLiteral"?e.value:e.type==="TemplateLiteral"?e.quasis.map(r=>r.cooked).join("*"):"?"}visitTsType(e){return e}extractApiCall(e,r,i=""){if(r.length>0){let n=r[0].expression,o=this.resolveUrlValue(n);if(o!=="?"){if(i&&i!=="?"){let s=i.endsWith("/")||o.startsWith("/")?"":"/";o=`${i}${s}${o}`}this.apiCalls.push({method:e.toUpperCase(),url:o})}}}},Ft=class{calls=new Set;apiCalls=[];imports=new Map;visit(e,r){if(r===".php"){let i=/(?:([a-zA-Z0-9_$->:\(\)]*)?(?:->|::))?([a-zA-Z0-9_]+)\s*\(([\s\S]*?)\)/g,n;for(;(n=i.exec(e))!==null;){let o=n[1]||"",s=n[2],a=n[3];if(this.calls.add(s),o&&!["$this","self","parent"].includes(o)&&this.calls.add(`${o}${o.includes("::")?"::":"->"}${s}`),["save","delete","update","create","first","all","where","get","find"].includes(s)&&o&&!["Log","Route","Cache","Config","Http"].includes(o)&&this.apiCalls.push({method:"DB",url:`${o}->${s}()`}),s==="publish"&&o&&(o.includes("topic")||o.includes("pubSub"))&&this.apiCalls.push({method:"PUBSUB",url:"publish"}),["get","post","put","delete","patch","request"].includes(s)&&(o==="Http"||o==="client"||o.endsWith("request")||o.includes("Client")||!o)){let u=a.match(/(?:url\s*:\s*)?['"]([^'"]+)['"]/),d=u?u[1]:a.split(",")[0].trim()||"unknown";this.apiCalls.push({method:s.toUpperCase(),url:d})}}}else if(r===".py"){let i=/(?:([a-zA-Z0-9_\.]+)\.)?([a-zA-Z0-9_]+)\s*\(([\s\S]*?)\)/g,n;for(;(n=i.exec(e))!==null;){let o=n[1]||"",s=n[2],a=n[3];if(this.calls.add(s),o&&o!=="self"&&o!=="cls"&&this.calls.add(`${o}.${s}`),["save","delete","update","create","first","all","filter","get"].includes(s)&&o&&!["logger","os","sys"].includes(o)&&this.apiCalls.push({method:"DB",url:`${o}.${s}()`}),s==="publish"&&o&&(o.includes("publisher")||o.includes("client"))&&this.apiCalls.push({method:"PUBSUB",url:"publish"}),["get","post","put","delete","patch","request"].includes(s)&&(o==="requests"||o==="httpx"||o==="client"||o==="http"||!o)){let u=a.match(/(?:url\s*:\s*)?['"]([^'"]+)['"]/),d=u?u[1]:a.split(",")[0].trim()||"unknown";this.apiCalls.push({method:s.toUpperCase(),url:d})}}}else if([".ts",".tsx",".js",".jsx"].includes(r)){let i=/import\s+[\s\S]*?from\s+['"](.*?)['"];?/g,n;for(;(n=i.exec(e))!==null;)this.imports.set("*",n[1]);let o=/(?:([a-zA-Z0-9_$]+)\.)?([a-zA-Z0-9_$]+)\s*\(/g,s;for(;(s=o.exec(e))!==null;){let a=s[1],l=s[2];a?(this.calls.add(`${a}.${l}`),(a.toLowerCase().includes("pubsub")||a==="pubSubClient")&&l!=="subscribe"&&this.apiCalls.push({method:"PUBSUB",url:l})):this.calls.add(l)}}else{let i=/\.([a-zA-Z0-9_]+)\s*\(/g,n;for(;(n=i.exec(e))!==null;)this.calls.add(n[1])}if(r===".php"){let i=/use\s+([a-zA-Z0-9_\\]+)(?:\s+as\s+([a-zA-Z0-9_]+))?;/g,n;for(;(n=i.exec(e))!==null;){let o=n[1],s=o.split("\\"),a=n[2]||s[s.length-1];this.imports.set(a,o)}}else if(r===".py"){let i=/from\s+([a-zA-Z0-9_\.]+)\s+import\s+([a-zA-Z0-9_,\s]+)/g,n;for(;(n=i.exec(e))!==null;){let a=n[1];n[2].split(",").map(c=>c.trim()).forEach(c=>{this.imports.set(c,a)})}let o=/^import\s+([a-zA-Z0-9_\.]+)/gm,s;for(;(s=o.exec(e))!==null;){let a=s[1],l=a.split("."),c=l[l.length-1];this.imports.set(c,a)}}}};Fe();import NS from"@swc/core";async function zS(t,e){try{if(!Id.existsSync(t))return!1;let r=Id.readFileSync(t,"utf8"),i=gt.extname(t).toLowerCase(),n=new Set;if(i===".ts"||i===".tsx"||i===".js"||i===".jsx"){let o=new er;try{let s=await NS.parse(r,{syntax:"typescript",tsx:t.endsWith(".tsx"),target:"es2020"});o.visitModule(s),n=o.calls}catch{return r.includes(e)}}else{let o=new Ft;o.visit(r,i),n=o.calls}if(n.has(e))return!0;for(let o of n){if(o===e)return!0;let s=o.split(/(?:\.|->|::)+/),a=s[s.length-1],l=e.split(/(?:\.|->|::)+/),c=l[l.length-1];if(a===c)return!0}return!1}catch{return!1}}async function Wy(t){let{repoPath:e,filePath:r,symbolName:i,depth:n=3}=t;await Q(e);let{exports:o,files:s,imports:a}=L.getInstance(e),l=r?o.findByNameAndFile(i,r):o.findByNameGlobal(i);if(l.length===0)return{content:[{type:"text",text:`Symbol "${i}" not found.`}],isError:!0};let c=[];for(let u of l){let d=a.findImpactDependents(u.file_path,`%${i}%`,n),p=[],m=new Set;for(let O of d){let M=gt.relative(e,O.consumer_path);if(m.has(M))continue;let q=`Imports ${O.imported_symbols}`,oe=await zS(O.consumer_path,u.name);oe?q+=" (\u2705 Verified Call)":q+=" (\u26A0\uFE0F Potential Import - Usage not statically detected)",m.add(M),p.push({type:"IMPORT",file:M,depth:O.depth,details:q,verified:oe})}let f=o.findRoutesByCapability(i);u.kind==="HTTP Route"&&f.push({name:u.name,file_path:u.file_path,signature:u.signature});for(let O of f){let q=O.name.split("/").filter(B=>B.length>3&&!B.includes("{")&&!B.includes("$")&&!B.includes("<")).sort((B,Z)=>Z.length-B.length)[0];if(!q||["admin","api","user","users","update","create","delete","list","index","show","store"].includes(q.toLowerCase()))continue;let oe=s.findContentByToken(q,10);for(let B of oe){let Z=gt.relative(e,B);!m.has(Z)&&B!==u.file_path&&(m.add(Z),p.push({type:"API_USAGE",file:Z,depth:2,details:`Likely calls route ${O.name} (matched token '${q}')`,verified:!1}))}}let y=s.findContentByToken(i,20);for(let O of y){let M=gt.relative(e,O);!m.has(M)&&O!==u.file_path&&(m.add(M),p.push({type:"POTENTIAL_USAGE",file:M,depth:2,details:`Contains keyword '${i}' (Dynamic/Implicit usage)`,verified:!0}))}if(u.kind==="HTTP Route")try{let O=Hy();for(let M of O)try{let oe=(await import("os")).homedir(),B=gt.join(oe,".mcp-liquid-shadow","fused"),Z=M.replace(/[^a-zA-Z0-9-_]/g,"_"),G=gt.join(B,`${Z}.db`);if(!Id.existsSync(G))continue;let U=(await import("better-sqlite3")).default,ee=new U(G),fe=ee.prepare("SELECT source_repo, source_file_path, relationship, metadata FROM virtual_edges WHERE target_repo = ? AND target_file_path = ? AND relationship = 'api_call'").all(e,u.file_path);ee.close();for(let se of fe){let he=gt.relative(se.source_repo,se.source_file_path),ue=`${se.source_repo}:${he}`;m.has(ue)||(m.add(ue),p.push({type:"CROSS_REPO_API_CALL",file:ue,depth:1,details:`Cross-repo API call from ${gt.basename(se.source_repo)}`,verified:!0}))}}catch{continue}}catch{}p.sort((O,M)=>O.verified&&!M.verified?-1:!O.verified&&M.verified?1:O.depth!==M.depth?O.depth-M.depth:O.file.localeCompare(M.file));let b=50,_=!1,g=0;p.length>b&&(_=!0,g=p.length-b,p.length=b);let I=(new ae(e).getSnapshot().gravity?.hotspots||[]).find(O=>O.filePath===u.file_path&&O.symbol===u.name)?.gravity||0,R=p.length,k=p.filter(O=>O.type==="CROSS_REPO_API_CALL").length,j=I/50+R/15+k*2,w="LOW",P="Peripheral symbol with limited usage.";j>=8?(w="CRITICAL",P=`Core architectural pillar (Gravity: ${I}). Modification will destabilize ${R} dependents across boundaries.`):j>=4?(w="HIGH",P=`High-gravity symbol with significant blast radius (${R} files).`):j>=1.5&&(w="MEDIUM",P="Standard library symbol with moderate dependency chain.");let J={symbol:i,definedIn:gt.relative(e,u.file_path),riskScore:{score:Math.min(10,Math.round(j*10)/10),level:w,rationale:P},impact:p,meta:_?{warning:`Output capped. ${g} more files impacted.`}:void 0};c.push(J)}return{content:[{type:"text",text:JSON.stringify(c,null,2)}]}}X();F();import Jy from"@swc/core";import Xr from"fs";import qe from"path";var DS=new Set(["api","v1","v2","v3","http","https","localhost","admin","internal","public","private","app","src","get","post","put","delete","patch","user","users","id","search","list","create","update","data"]);function By(t,e){let r=e,i=e.match(/\$\{([^}]+)\}/g);if(i)for(let u of i){let d=u.substring(2,u.length-1),p=t.configs.findEnvValue(d);p&&(r=r.replace(u,p))}let n=r.split("?")[0];try{n.includes("://")&&(n=new URL(n).pathname)}catch{}let o=[],s=n.split("?")[0],a=t.files.findSynapses({type:"api_route",name:s,direction:"consume"});for(let u of a)o.push({file_path:u.file_path,start_line:u.line_number||0,signature:`[Synapse] ${u.name}`,score:1e3});let l=n.split(/[^a-zA-Z0-9-_]/).filter(u=>u.length>=3&&!DS.has(u.toLowerCase())&&!/^\d+$/.test(u));if(l.length>0){let d=[...l].sort((m,f)=>f.length-m.length)[0],p=t.exports.findRoutesByToken(d);for(let m of p){let f=50,y=(m.signature||m.name||"").toLowerCase();for(let b of l)y.includes(b.toLowerCase())&&(f+=20);o.push({file_path:m.file_path,start_line:m.start_line,signature:`[Boundary] ${m.signature||m.name}`,capabilities:m.capabilities||void 0,score:f})}}if(o.length<3){let u=l.map(p=>p.replace(/[^a-zA-Z0-9_]/g,"")).filter(p=>p.length>0).join(" AND ");if(u.length===0)return o;let d=t.content.search(u);for(let p of d){let m=0,f=p.file_path.toLowerCase(),y=p.snippet.toLowerCase();(f.includes("route")||f.includes("controller")||f.includes("handler"))&&(m+=10),(f.includes("src/api")||f.includes("services/api"))&&(m+=5),(y.includes("addroute")||y.includes("@get")||y.includes("router."))&&(m+=15),(y.includes("axios.")||y.includes("fetch("))&&(m-=10),(f.includes(".spec.")||f.includes(".test."))&&(m-=20),m>0&&o.push({file_path:p.file_path,start_line:0,signature:`[FTS Match] ${p.snippet.replace(/\n/g," ")}`,score:m})}}let c=new Map;return o.sort((u,d)=>d.score-u.score).forEach(u=>{c.has(u.file_path)||c.set(u.file_path,u)}),Array.from(c.values()).slice(0,3)}var OS=4,Qr=50,AS=2;async function Gy(t){let{repoPath:e,filePath:r,symbolName:i}=Ue(t);if(!r)return{isError:!0,content:[{type:"text",text:"Error: 'filePath' is required."}]};let n=r;await Q(e);let o=L.getInstance(e);if(!Xr.existsSync(n))return{isError:!0,content:[{type:"text",text:`File not found: ${n}`}]};let s,a=qe.basename(n),l;if(i){let p=o.exports.findByNameAndFile(i,n);if(p.length>0){let m=p[0];s={start:m.start_line,end:m.end_line},a=m.name,l=m.start_line}}let c={type:s?"function":"file",name:a,path:qe.relative(e,n),line:l,children:[]},u=new Set;u.add(n+(i?`:${i}`:""));let d={count:0,truncated:!1};return await tr(n,c,e,o,u,1,d,s),d.truncated&&c.children.push({type:"function",name:"\u26A0\uFE0F Output Truncated",details:`Trace limited to ${Qr} nodes. Use summarize_file on specific files for deeper analysis.`,children:[]}),{content:[{type:"text",text:JSON.stringify(c,null,2)}]}}async function tr(t,e,r,i,n,o,s,a){if(!(o>OS)){if(s.count>=Qr){s.truncated=!0;return}try{let l=Xr.readFileSync(t,"utf8"),c=qe.extname(t).toLowerCase(),d=(l.match(/import\s+[\s\S]*?from\s+['"].*?['"];?/gm)||[]).join(`
688
+ `).run(e.sourceRepo,e.sourceFilePath,e.sourceSymbolId||null,e.targetRepo,e.targetFilePath,e.targetSymbolId||null,e.relationship,e.metadata?JSON.stringify(e.metadata):null,e.confidence??1).lastInsertRowid}scanEdges(){return ES.info({name:this.connection.nameValue},"Starting edge scan"),Ly(this)}getAttachedRepos(){return this.connection.getAttachedRepos()}get name(){return this.connection.nameValue}};var Cy=$.child({module:"fused-index"}),$d=class{connection;service;configName;constructor(e){this.configName=e.name,this.connection=new Ps(e),this.service=new Ns(this.connection)}attachRepo(e){this.connection.attachRepo(e)}detachRepo(e){this.connection.detachRepo(e)}refreshRepo(e){this.connection.refreshRepo(e)}getAttachedRepos(){return this.connection.getAttachedRepos()}checkHealth(){return this.connection.checkHealth()}close(){this.connection.close(),Cy.info({name:this.configName},"Fused index closed")}getStatus(){let e=this.service.executeRawQuery("SELECT COUNT(*) as count FROM virtual_edges");return{name:this.connection.nameValue,path:this.connection.dbPath,attachedRepos:this.connection.getAttachedRepos().length,repos:this.connection.getAttachedRepos(),virtualEdgesCount:e[0]?.count||0}}searchExports(e,r=50){return this.service.searchExports(e,r)}searchFiles(e,r=50){return this.service.searchFiles(e,r)}getVirtualEdges(e,r){return this.service.getVirtualEdges(e,r)}addVirtualEdge(e){return this.service.addVirtualEdge(e)}scanEdges(){return this.service.scanEdges()}buildUnionQuery(e,r,i){return this.service.buildUnionQuery(e,r,i)}executeFederatedQuery(e,...r){return this.service.executeFederatedQuery(e,...r)}executeRawQuery(e,...r){return this.service.executeRawQuery(e,...r)}buildAdvancedQuery(e){return this.service.buildAdvancedQuery(e)}buildFtsQuery(e,r,i,n,o){return this.service.buildFtsQuery(e,r,i,n,o)}buildCrossRepoImportsQuery(){return this.service.buildCrossRepoImportsQuery()}refreshAll(){this.connection.refreshAll()}validateSchemas(){return Cy.debug({name:this.configName},"Delegating validateSchemas"),this.connection.validateSchemas()}},zs=new Map;function jy(t){let e=zs.get(t.name);if(e){let i=new Set(e.getAttachedRepos().map(s=>s.repoPath)),n=new Set(t.repoPaths.map(s=>wS.resolve(s)));if(i.size===n.size&&[...i].every(s=>n.has(s)))return e;e.close(),zs.delete(t.name)}let r=new $d(t);return zs.set(t.name,r),r}function My(){return Array.from(zs.keys())}import{Visitor as IS}from"@swc/core/Visitor.js";var Xn=class extends IS{calls=new Set;apiCalls=[];imports=new Map;axiosInstances=new Map;visitImportDeclaration(e){let r=e.source.value;for(let i of e.specifiers)(i.type==="ImportDefaultSpecifier"||i.type==="ImportSpecifier")&&this.imports.set(i.local.value,r);return super.visitImportDeclaration(e)}visitCallExpression(e){if(e.callee.type==="Identifier"){let r=e.callee.value;this.calls.add(r),(r==="axios"||r==="http")&&e.arguments.length>0&&this.extractApiCallFromConfig(e.arguments[0].expression)}else if(e.callee.type==="MemberExpression"){let r=e.callee.property.value,i=o=>{if(!o)return"?";if(o.type==="Identifier")return o.value;if(o.type==="ThisExpression")return"this";if(o.type==="MemberExpression"){let s=i(o.object),a=o.property.value||"?";return`${s}.${a}`}return o.type==="TsNonNullExpression"||o.type==="TsAsExpression"||o.type==="ParenthesisExpression"?i(o.expression):"?"},n=i(e.callee.object);if(n!=="?"&&r){if(this.calls.add(`${n}.${r}`),n==="axios"||n==="http"||this.axiosInstances.has(n)){let o=this.axiosInstances.get(n)||"";this.extractApiCall(r,e.arguments,o)}if((n.toLowerCase().includes("pubsub")||n==="pubSubClient"||n.endsWith(".pubSubClient"))&&r!=="subscribe"){let o=r;if((r==="publish"||r==="publishMessage"||r==="publishTaskByNameAndPayload")&&e.arguments.length>0)for(let s of e.arguments){let a=s.expression;if(a.type==="ObjectExpression"){let l=a.properties.find(c=>c.key?.type==="Identifier"&&(c.key.value==="action"||c.key.value==="type")||c.key?.type==="StringLiteral"&&(c.key.value==="action"||c.key.value==="type"));if(l&&l.value?.type==="StringLiteral"){o=l.value.value;break}}if(a.type==="CallExpression"&&a.callee.type==="MemberExpression"&&a.callee.object.value==="JSON"&&a.callee.property.value==="stringify"&&a.arguments.length>0){let l=a.arguments[0].expression;if(l.type==="ObjectExpression"){let c=l.properties.find(u=>u.key?.type==="Identifier"&&(u.key.value==="action"||u.key.value==="type")||u.key?.type==="StringLiteral"&&(u.key.value==="action"||u.key.value==="type"));if(c&&c.value?.type==="StringLiteral"){o=c.value.value;break}}}}this.apiCalls.push({method:"PUBSUB",url:o})}}}return e.callee.type==="Identifier"&&e.callee.value==="fetch"&&this.extractApiCall("GET",e.arguments),super.visitCallExpression(e)}visitNewExpression(e){return e.callee.type==="Identifier"&&this.calls.add(e.callee.value),super.visitNewExpression(e)}visitVariableDeclarator(e){if(e.init&&e.init.type==="CallExpression"){let r=e.init.callee;if(r.type==="MemberExpression"&&r.property.value==="create"&&r.object.value==="axios"){let n=e.init.arguments[0]?.expression;if(n&&n.type==="ObjectExpression"){let o=n.properties.find(s=>s.key.value==="baseURL");if(o){let s="?";o.value.type==="StringLiteral"?s=o.value.value:o.value.type==="Identifier"&&(s=`\${${o.value.value}}`),e.id.type==="Identifier"&&this.axiosInstances.set(e.id.value,s)}}}}return super.visitVariableDeclarator(e)}extractApiCallFromConfig(e){if(e&&e.type==="ObjectExpression"){let r=e.properties.find(n=>n.key.type==="Identifier"&&n.key.value==="url"||n.key.type==="StringLiteral"&&n.key.value==="url"),i=e.properties.find(n=>n.key.type==="Identifier"&&n.key.value==="method"||n.key.type==="StringLiteral"&&n.key.value==="method");if(r&&r.value){let n=i?.value?.value||"GET",o=this.resolveUrlValue(r.value);o!=="?"&&this.apiCalls.push({method:n.toUpperCase(),url:o})}}}resolveUrlValue(e){return e.type==="StringLiteral"?e.value:e.type==="TemplateLiteral"?e.quasis.map(r=>r.cooked).join("*"):"?"}visitTsType(e){return e}extractApiCall(e,r,i=""){if(r.length>0){let n=r[0].expression,o=this.resolveUrlValue(n);if(o!=="?"){if(i&&i!=="?"){let s=i.endsWith("/")||o.startsWith("/")?"":"/";o=`${i}${s}${o}`}this.apiCalls.push({method:e.toUpperCase(),url:o})}}}},Ut=class{calls=new Set;apiCalls=[];imports=new Map;visit(e,r){if(r===".php"){let i=/(?:([a-zA-Z0-9_$->:\(\)]*)?(?:->|::))?([a-zA-Z0-9_]+)\s*\(([\s\S]*?)\)/g,n;for(;(n=i.exec(e))!==null;){let o=n[1]||"",s=n[2],a=n[3];if(this.calls.add(s),o&&!["$this","self","parent"].includes(o)&&this.calls.add(`${o}${o.includes("::")?"::":"->"}${s}`),["save","delete","update","create","first","all","where","get","find"].includes(s)&&o&&!["Log","Route","Cache","Config","Http"].includes(o)&&this.apiCalls.push({method:"DB",url:`${o}->${s}()`}),s==="publish"&&o&&(o.includes("topic")||o.includes("pubSub"))&&this.apiCalls.push({method:"PUBSUB",url:"publish"}),["get","post","put","delete","patch","request"].includes(s)&&(o==="Http"||o==="client"||o.endsWith("request")||o.includes("Client")||!o)){let u=a.match(/(?:url\s*:\s*)?['"]([^'"]+)['"]/),d=u?u[1]:a.split(",")[0].trim()||"unknown";this.apiCalls.push({method:s.toUpperCase(),url:d})}}}else if(r===".py"){let i=/(?:([a-zA-Z0-9_\.]+)\.)?([a-zA-Z0-9_]+)\s*\(([\s\S]*?)\)/g,n;for(;(n=i.exec(e))!==null;){let o=n[1]||"",s=n[2],a=n[3];if(this.calls.add(s),o&&o!=="self"&&o!=="cls"&&this.calls.add(`${o}.${s}`),["save","delete","update","create","first","all","filter","get"].includes(s)&&o&&!["logger","os","sys"].includes(o)&&this.apiCalls.push({method:"DB",url:`${o}.${s}()`}),s==="publish"&&o&&(o.includes("publisher")||o.includes("client"))&&this.apiCalls.push({method:"PUBSUB",url:"publish"}),["get","post","put","delete","patch","request"].includes(s)&&(o==="requests"||o==="httpx"||o==="client"||o==="http"||!o)){let u=a.match(/(?:url\s*:\s*)?['"]([^'"]+)['"]/),d=u?u[1]:a.split(",")[0].trim()||"unknown";this.apiCalls.push({method:s.toUpperCase(),url:d})}}}else if([".ts",".tsx",".js",".jsx"].includes(r)){let i=/import\s+[\s\S]*?from\s+['"](.*?)['"];?/g,n;for(;(n=i.exec(e))!==null;)this.imports.set("*",n[1]);let o=/(?:([a-zA-Z0-9_$]+)\.)?([a-zA-Z0-9_$]+)\s*\(/g,s;for(;(s=o.exec(e))!==null;){let a=s[1],l=s[2];a?(this.calls.add(`${a}.${l}`),(a.toLowerCase().includes("pubsub")||a==="pubSubClient")&&l!=="subscribe"&&this.apiCalls.push({method:"PUBSUB",url:l})):this.calls.add(l)}}else{let i=/\.([a-zA-Z0-9_]+)\s*\(/g,n;for(;(n=i.exec(e))!==null;)this.calls.add(n[1])}if(r===".php"){let i=/use\s+([a-zA-Z0-9_\\]+)(?:\s+as\s+([a-zA-Z0-9_]+))?;/g,n;for(;(n=i.exec(e))!==null;){let o=n[1],s=o.split("\\"),a=n[2]||s[s.length-1];this.imports.set(a,o)}}else if(r===".py"){let i=/from\s+([a-zA-Z0-9_\.]+)\s+import\s+([a-zA-Z0-9_,\s]+)/g,n;for(;(n=i.exec(e))!==null;){let a=n[1];n[2].split(",").map(c=>c.trim()).forEach(c=>{this.imports.set(c,a)})}let o=/^import\s+([a-zA-Z0-9_\.]+)/gm,s;for(;(s=o.exec(e))!==null;){let a=s[1],l=a.split("."),c=l[l.length-1];this.imports.set(c,a)}}}};Be();import TS from"@swc/core";async function RS(t,e){try{if(!Sd.existsSync(t))return!1;let r=Sd.readFileSync(t,"utf8"),i=gt.extname(t).toLowerCase(),n=new Set;if(i===".ts"||i===".tsx"||i===".js"||i===".jsx"){let o=new Xn;try{let s=await TS.parse(r,{syntax:"typescript",tsx:t.endsWith(".tsx"),target:"es2020"});o.visitModule(s),n=o.calls}catch{return r.includes(e)}}else{let o=new Ut;o.visit(r,i),n=o.calls}if(n.has(e))return!0;for(let o of n){if(o===e)return!0;let s=o.split(/(?:\.|->|::)+/),a=s[s.length-1],l=e.split(/(?:\.|->|::)+/),c=l[l.length-1];if(a===c)return!0}return!1}catch{return!1}}async function Uy(t){let{repoPath:e,filePath:r,symbolName:i,depth:n=3}=t;await Q(e);let{exports:o,files:s,imports:a}=L.getInstance(e),l=r?o.findByNameAndFile(i,r):o.findByNameGlobal(i);if(l.length===0)return{content:[{type:"text",text:`Symbol "${i}" not found.`}],isError:!0};let c=[];for(let u of l){let d=a.findImpactDependents(u.file_path,`%${i}%`,n),p=[],m=new Set;for(let O of d){let M=gt.relative(e,O.consumer_path);if(m.has(M))continue;let q=`Imports ${O.imported_symbols}`,oe=await RS(O.consumer_path,u.name);oe?q+=" (\u2705 Verified Call)":q+=" (\u26A0\uFE0F Potential Import - Usage not statically detected)",m.add(M),p.push({type:"IMPORT",file:M,depth:O.depth,details:q,verified:oe})}let f=o.findRoutesByCapability(i);u.kind==="HTTP Route"&&f.push({name:u.name,file_path:u.file_path,signature:u.signature});for(let O of f){let q=O.name.split("/").filter(B=>B.length>3&&!B.includes("{")&&!B.includes("$")&&!B.includes("<")).sort((B,Z)=>Z.length-B.length)[0];if(!q||["admin","api","user","users","update","create","delete","list","index","show","store"].includes(q.toLowerCase()))continue;let oe=s.findContentByToken(q,10);for(let B of oe){let Z=gt.relative(e,B);!m.has(Z)&&B!==u.file_path&&(m.add(Z),p.push({type:"API_USAGE",file:Z,depth:2,details:`Likely calls route ${O.name} (matched token '${q}')`,verified:!1}))}}let y=s.findContentByToken(i,20);for(let O of y){let M=gt.relative(e,O);!m.has(M)&&O!==u.file_path&&(m.add(M),p.push({type:"POTENTIAL_USAGE",file:M,depth:2,details:`Contains keyword '${i}' (Dynamic/Implicit usage)`,verified:!0}))}if(u.kind==="HTTP Route")try{let O=My();for(let M of O)try{let oe=(await import("os")).homedir(),B=gt.join(oe,".mcp-liquid-shadow","fused"),Z=M.replace(/[^a-zA-Z0-9-_]/g,"_"),V=gt.join(B,`${Z}.db`);if(!Sd.existsSync(V))continue;let U=(await import("better-sqlite3")).default,ee=new U(V),fe=ee.prepare("SELECT source_repo, source_file_path, relationship, metadata FROM virtual_edges WHERE target_repo = ? AND target_file_path = ? AND relationship = 'api_call'").all(e,u.file_path);ee.close();for(let se of fe){let he=gt.relative(se.source_repo,se.source_file_path),le=`${se.source_repo}:${he}`;m.has(le)||(m.add(le),p.push({type:"CROSS_REPO_API_CALL",file:le,depth:1,details:`Cross-repo API call from ${gt.basename(se.source_repo)}`,verified:!0}))}}catch{continue}}catch{}p.sort((O,M)=>O.verified&&!M.verified?-1:!O.verified&&M.verified?1:O.depth!==M.depth?O.depth-M.depth:O.file.localeCompare(M.file));let b=50,_=!1,g=0;p.length>b&&(_=!0,g=p.length-b,p.length=b);let I=(new pe(e).getSnapshot().gravity?.hotspots||[]).find(O=>O.filePath===u.file_path&&O.symbol===u.name)?.gravity||0,R=p.length,k=p.filter(O=>O.type==="CROSS_REPO_API_CALL").length,j=I/50+R/15+k*2,w="LOW",P="Peripheral symbol with limited usage.";j>=8?(w="CRITICAL",P=`Core architectural pillar (Gravity: ${I}). Modification will destabilize ${R} dependents across boundaries.`):j>=4?(w="HIGH",P=`High-gravity symbol with significant blast radius (${R} files).`):j>=1.5&&(w="MEDIUM",P="Standard library symbol with moderate dependency chain.");let J={symbol:i,definedIn:gt.relative(e,u.file_path),riskScore:{score:Math.min(10,Math.round(j*10)/10),level:w,rationale:P},impact:p,meta:_?{warning:`Output capped. ${g} more files impacted.`}:void 0};c.push(J)}return{content:[{type:"text",text:JSON.stringify(c,null,2)}]}}X();F();import Zy from"@swc/core";import Kr from"fs";import Ge from"path";var PS=new Set(["api","v1","v2","v3","http","https","localhost","admin","internal","public","private","app","src","get","post","put","delete","patch","user","users","id","search","list","create","update","data"]);function Fy(t,e){let r=e,i=e.match(/\$\{([^}]+)\}/g);if(i)for(let u of i){let d=u.substring(2,u.length-1),p=t.configs.findEnvValue(d);p&&(r=r.replace(u,p))}let n=r.split("?")[0];try{n.includes("://")&&(n=new URL(n).pathname)}catch{}let o=[],s=n.split("?")[0],a=t.files.findSynapses({type:"api_route",name:s,direction:"consume"});for(let u of a)o.push({file_path:u.file_path,start_line:u.line_number||0,signature:`[Synapse] ${u.name}`,score:1e3});let l=n.split(/[^a-zA-Z0-9-_]/).filter(u=>u.length>=3&&!PS.has(u.toLowerCase())&&!/^\d+$/.test(u));if(l.length>0){let d=[...l].sort((m,f)=>f.length-m.length)[0],p=t.exports.findRoutesByToken(d);for(let m of p){let f=50,y=(m.signature||m.name||"").toLowerCase();for(let b of l)y.includes(b.toLowerCase())&&(f+=20);o.push({file_path:m.file_path,start_line:m.start_line,signature:`[Boundary] ${m.signature||m.name}`,capabilities:m.capabilities||void 0,score:f})}}if(o.length<3){let u=l.map(p=>p.replace(/[^a-zA-Z0-9_]/g,"")).filter(p=>p.length>0).join(" AND ");if(u.length===0)return o;let d=t.content.search(u);for(let p of d){let m=0,f=p.file_path.toLowerCase(),y=p.snippet.toLowerCase();(f.includes("route")||f.includes("controller")||f.includes("handler"))&&(m+=10),(f.includes("src/api")||f.includes("services/api"))&&(m+=5),(y.includes("addroute")||y.includes("@get")||y.includes("router."))&&(m+=15),(y.includes("axios.")||y.includes("fetch("))&&(m-=10),(f.includes(".spec.")||f.includes(".test."))&&(m-=20),m>0&&o.push({file_path:p.file_path,start_line:0,signature:`[FTS Match] ${p.snippet.replace(/\n/g," ")}`,score:m})}}let c=new Map;return o.sort((u,d)=>d.score-u.score).forEach(u=>{c.has(u.file_path)||c.set(u.file_path,u)}),Array.from(c.values()).slice(0,3)}var NS=4,Yr=50,zS=2;async function Hy(t){let{repoPath:e,filePath:r,symbolName:i}=je(t);if(!r)return{isError:!0,content:[{type:"text",text:"Error: 'filePath' is required."}]};let n=r;await Q(e);let o=L.getInstance(e);if(!Kr.existsSync(n))return{isError:!0,content:[{type:"text",text:`File not found: ${n}`}]};let s,a=Ge.basename(n),l;if(i){let p=o.exports.findByNameAndFile(i,n);if(p.length>0){let m=p[0];s={start:m.start_line,end:m.end_line},a=m.name,l=m.start_line}}let c={type:s?"function":"file",name:a,path:Ge.relative(e,n),line:l,children:[]},u=new Set;u.add(n+(i?`:${i}`:""));let d={count:0,truncated:!1};return await Qn(n,c,e,o,u,1,d,s),d.truncated&&c.children.push({type:"function",name:"\u26A0\uFE0F Output Truncated",details:`Trace limited to ${Yr} nodes. Use summarize_file on specific files for deeper analysis.`,children:[]}),{content:[{type:"text",text:JSON.stringify(c,null,2)}]}}async function Qn(t,e,r,i,n,o,s,a){if(!(o>NS)){if(s.count>=Yr){s.truncated=!0;return}try{let l=Kr.readFileSync(t,"utf8"),c=Ge.extname(t).toLowerCase(),d=(l.match(/import\s+[\s\S]*?from\s+['"].*?['"];?/gm)||[]).join(`
723
689
  `);a&&(l=l.split(`
724
690
  `).slice(a.start-1,a.end).join(`
725
- `));let p;if(c===".ts"||c===".tsx"||c===".js"||c===".jsx"){p=new er;let b={syntax:"typescript",tsx:t.endsWith(".tsx"),target:"es2020"};try{let _=a?`${d}
726
- ${l}`:l,g=await Jy.parse(_,b);p.visitModule(g)}catch{if(a)try{let g=`${d}
691
+ `));let p;if(c===".ts"||c===".tsx"||c===".js"||c===".jsx"){p=new Xn;let b={syntax:"typescript",tsx:t.endsWith(".tsx"),target:"es2020"};try{let _=a?`${d}
692
+ ${l}`:l,g=await Zy.parse(_,b);p.visitModule(g)}catch{if(a)try{let g=`${d}
727
693
  class TraceContext {
728
694
  ${l}
729
- }`,x=await Jy.parse(g,b);p.visitModule(x)}catch{let x=new Ft,E=c;x.visit(l,E),p.calls=x.calls,p.apiCalls=x.apiCalls,p.imports=x.imports}else{let g=new Ft;g.visit(l,c),p.calls=g.calls,p.apiCalls=g.apiCalls,p.imports=g.imports}}}else p=new Ft,p.visit(l,c);$.info({file:qe.basename(t),calls:p.calls.size,apiCalls:p.apiCalls.length,depth:o},"Analyzed file");let m=p.apiCalls.slice(0,10);for(let b of m){if(s.count>=Qr)break;if(s.count++,b.method==="PUBSUB"){let E={type:"event_trigger",name:`PubSub Event: ${b.url}`,details:"Detected via PubSub client usage",children:[]};e.children.push(E);let A=i.exports.findByNameGlobal(b.url).concat(i.exports.findByMethodName(b.url));if(b.url.length>10){let R=b.url.replace(/To[A-Z][a-zA-Z]+$/,"");if(R!==b.url){let k=i.exports.findByNameGlobal(R).concat(i.exports.findByMethodName(R));A.push(...k)}}let I=new Set;for(let R of A){if(I.has(R.file_path)||R.file_path===t)continue;if(I.add(R.file_path),s.count>=Qr)break;s.count++;let k={type:"subscriber",name:`${R.name} (${qe.basename(R.file_path)})`,path:qe.relative(r,R.file_path),line:R.start_line,details:"Potential Subscriber / Handler",children:[]};E.children.push(k),Xr.existsSync(R.file_path)&&!n.has(R.file_path)&&(n.add(R.file_path),await tr(R.file_path,k,r,i,n,o+1,s))}continue}let _={type:"api_call",name:`${b.method} ${b.url}`,details:"Detected via string literal analysis",children:[]};e.children.push(_);let x=By(i,b.url).slice(0,AS);for(let E of x){if(s.count>=Qr)break;s.count++;let A={type:"route",name:E.signature||"Route Handler",path:E.file_path,line:E.start_line,children:[]};if(_.children.push(A),Xr.existsSync(E.file_path)&&!n.has(E.file_path)&&(n.add(E.file_path),await tr(E.file_path,A,r,i,n,o+1,s)),E.capabilities)try{let I=JSON.parse(E.capabilities);if(I.handler){let[R,k]=I.handler.split("@");if(R){let w=R.split("\\").pop();if(w){let P=i.exports.findClassByName(w);if(P){let J=i.exports.findByNameAndFile(k||"",P.file_path),O,M=P.start_line;J.length>0&&(O={start:J[0].start_line,end:J[0].end_line},M=J[0].start_line);let q={type:"component",name:`${w}${k?" :: "+k:""}`,path:qe.relative(r,P.file_path),line:M,details:"Controller Logic (Macro IR)",children:[]};A.children.push(q),n.has(P.file_path+(k?`:${k}`:""))||(n.add(P.file_path+(k?`:${k}`:"")),await tr(P.file_path,q,r,i,n,o+1,s,O))}}}}}catch{}}}let f=p.calls,y=Array.from(f).sort();for(let b of y)if(p.imports.has(b)){let _=p.imports.get(b);if(!_.startsWith(".")){if(["react","react-dom"].includes(_))continue;e.children.push({type:"function",name:b,details:`External: ${_}`,children:[]});continue}let g=Zr(_,t,r);if(g&&Xr.existsSync(g))if(n.has(g))e.children.push({type:"function",name:b,details:"Circular / Already Visited",path:qe.relative(r,g),children:[]});else{n.add(g);let x={type:"file",name:b,details:`Imported from ${qe.basename(g)}`,path:qe.relative(r,g),children:[]};e.children.push(x),await tr(g,x,r,i,n,o+1,s)}}else if(!["log","info","error","warn","print"].includes(b)){let _=i.exports.findByNameGlobal(b);if(_.length===0){let g=b.split(/(?:\.|->|::)+/);if(g.length>1){let x=g[g.length-1];_=i.exports.findByMethodName(x)}}if(_.length>0){let g=_.find(E=>E.file_path===t),x=g||(_.length===1?_[0]:null);if(x){let E=`${x.file_path}:${x.name}`;if(!n.has(E)){n.add(E);let A={type:"component",name:b,details:`Resolved via global index${g?" (local)":""}`,path:qe.relative(r,x.file_path),line:x.start_line,children:[]};e.children.push(A),await tr(x.file_path,A,r,i,n,o+1,s,{start:x.start_line,end:x.end_line})}}}}}catch(l){$.error({filePath:t,error:l.message},"Trace analysis failed"),e.children.push({type:"function",name:"Error",details:l.message,children:[]})}}}X();import Vy from"path";async function qy(t){let{repoPath:e,filePath:r,direction:i}=t;await Q(e);let{imports:n}=L.getInstance(e);if(i==="imports"){let s=n.findByFile(r).map(a=>{let l={module:a.module_specifier,symbols:a.imported_symbols,resolvedPath:a.resolved_path,relativePath:a.resolved_path?Vy.relative(e,a.resolved_path):null,isExternal:!a.resolved_path};if(!a.resolved_path){let c=nd(a.module_specifier,r,e);if(!c.resolved)return{...l,resolutionError:c.error,suggestion:c.suggestion}}return l});return{content:[{type:"text",text:JSON.stringify(s,null,2)}]}}else{let s=n.findDependents(r).map(a=>({file:a.file_path,relativePath:Vy.relative(e,a.file_path),importStatement:a.module_specifier,importedSymbols:a.imported_symbols}));return{content:[{type:"text",text:JSON.stringify(s,null,2)}]}}}X();import Ky from"path";import LS from"fs";async function Yy(t){let{repoPath:e,mode:r,limit:i=50,includeTests:n=!1}=t;await Q(e);let{exports:o,imports:s}=L.getInstance(e);if(r==="dead-code"){let c=o.findDeadExports(i,n).map(d=>({name:d.name,kind:d.kind,file:Ky.relative(e,d.file_path),line:d.start_line})),u={};for(let d of c)u[d.file]||(u[d.file]=[]),u[d.file].push({name:d.name,kind:d.kind,line:d.line});return{content:[{type:"text",text:`# Dead Export Analysis
695
+ }`,x=await Zy.parse(g,b);p.visitModule(x)}catch{let x=new Ut,E=c;x.visit(l,E),p.calls=x.calls,p.apiCalls=x.apiCalls,p.imports=x.imports}else{let g=new Ut;g.visit(l,c),p.calls=g.calls,p.apiCalls=g.apiCalls,p.imports=g.imports}}}else p=new Ut,p.visit(l,c);$.info({file:Ge.basename(t),calls:p.calls.size,apiCalls:p.apiCalls.length,depth:o},"Analyzed file");let m=p.apiCalls.slice(0,10);for(let b of m){if(s.count>=Yr)break;if(s.count++,b.method==="PUBSUB"){let E={type:"event_trigger",name:`PubSub Event: ${b.url}`,details:"Detected via PubSub client usage",children:[]};e.children.push(E);let A=i.exports.findByNameGlobal(b.url).concat(i.exports.findByMethodName(b.url));if(b.url.length>10){let R=b.url.replace(/To[A-Z][a-zA-Z]+$/,"");if(R!==b.url){let k=i.exports.findByNameGlobal(R).concat(i.exports.findByMethodName(R));A.push(...k)}}let I=new Set;for(let R of A){if(I.has(R.file_path)||R.file_path===t)continue;if(I.add(R.file_path),s.count>=Yr)break;s.count++;let k={type:"subscriber",name:`${R.name} (${Ge.basename(R.file_path)})`,path:Ge.relative(r,R.file_path),line:R.start_line,details:"Potential Subscriber / Handler",children:[]};E.children.push(k),Kr.existsSync(R.file_path)&&!n.has(R.file_path)&&(n.add(R.file_path),await Qn(R.file_path,k,r,i,n,o+1,s))}continue}let _={type:"api_call",name:`${b.method} ${b.url}`,details:"Detected via string literal analysis",children:[]};e.children.push(_);let x=Fy(i,b.url).slice(0,zS);for(let E of x){if(s.count>=Yr)break;s.count++;let A={type:"route",name:E.signature||"Route Handler",path:E.file_path,line:E.start_line,children:[]};if(_.children.push(A),Kr.existsSync(E.file_path)&&!n.has(E.file_path)&&(n.add(E.file_path),await Qn(E.file_path,A,r,i,n,o+1,s)),E.capabilities)try{let I=JSON.parse(E.capabilities);if(I.handler){let[R,k]=I.handler.split("@");if(R){let w=R.split("\\").pop();if(w){let P=i.exports.findClassByName(w);if(P){let J=i.exports.findByNameAndFile(k||"",P.file_path),O,M=P.start_line;J.length>0&&(O={start:J[0].start_line,end:J[0].end_line},M=J[0].start_line);let q={type:"component",name:`${w}${k?" :: "+k:""}`,path:Ge.relative(r,P.file_path),line:M,details:"Controller Logic (Macro IR)",children:[]};A.children.push(q),n.has(P.file_path+(k?`:${k}`:""))||(n.add(P.file_path+(k?`:${k}`:"")),await Qn(P.file_path,q,r,i,n,o+1,s,O))}}}}}catch{}}}let f=p.calls,y=Array.from(f).sort();for(let b of y)if(p.imports.has(b)){let _=p.imports.get(b);if(!_.startsWith(".")){if(["react","react-dom"].includes(_))continue;e.children.push({type:"function",name:b,details:`External: ${_}`,children:[]});continue}let g=Jr(_,t,r);if(g&&Kr.existsSync(g))if(n.has(g))e.children.push({type:"function",name:b,details:"Circular / Already Visited",path:Ge.relative(r,g),children:[]});else{n.add(g);let x={type:"file",name:b,details:`Imported from ${Ge.basename(g)}`,path:Ge.relative(r,g),children:[]};e.children.push(x),await Qn(g,x,r,i,n,o+1,s)}}else if(!["log","info","error","warn","print"].includes(b)){let _=i.exports.findByNameGlobal(b);if(_.length===0){let g=b.split(/(?:\.|->|::)+/);if(g.length>1){let x=g[g.length-1];_=i.exports.findByMethodName(x)}}if(_.length>0){let g=_.find(E=>E.file_path===t),x=g||(_.length===1?_[0]:null);if(x){let E=`${x.file_path}:${x.name}`;if(!n.has(E)){n.add(E);let A={type:"component",name:b,details:`Resolved via global index${g?" (local)":""}`,path:Ge.relative(r,x.file_path),line:x.start_line,children:[]};e.children.push(A),await Qn(x.file_path,A,r,i,n,o+1,s,{start:x.start_line,end:x.end_line})}}}}}catch(l){$.error({filePath:t,error:l.message},"Trace analysis failed"),e.children.push({type:"function",name:"Error",details:l.message,children:[]})}}}X();import Wy from"path";async function By(t){let{repoPath:e,filePath:r,direction:i}=t;await Q(e);let{imports:n}=L.getInstance(e);if(i==="imports"){let s=n.findByFile(r).map(a=>{let l={module:a.module_specifier,symbols:a.imported_symbols,resolvedPath:a.resolved_path,relativePath:a.resolved_path?Wy.relative(e,a.resolved_path):null,isExternal:!a.resolved_path};if(!a.resolved_path){let c=ud(a.module_specifier,r,e);if(!c.resolved)return{...l,resolutionError:c.error,suggestion:c.suggestion}}return l});return{content:[{type:"text",text:JSON.stringify(s,null,2)}]}}else{let s=n.findDependents(r).map(a=>({file:a.file_path,relativePath:Wy.relative(e,a.file_path),importStatement:a.module_specifier,importedSymbols:a.imported_symbols}));return{content:[{type:"text",text:JSON.stringify(s,null,2)}]}}}X();import Jy from"path";import DS from"fs";async function Vy(t){let{repoPath:e,mode:r,limit:i=50,includeTests:n=!1}=t;await Q(e);let{exports:o,imports:s}=L.getInstance(e);if(r==="dead-code"){let c=o.findDeadExports(i,n).map(d=>({name:d.name,kind:d.kind,file:Jy.relative(e,d.file_path),line:d.start_line})),u={};for(let d of c)u[d.file]||(u[d.file]=[]),u[d.file].push({name:d.name,kind:d.kind,line:d.line});return{content:[{type:"text",text:`# Dead Export Analysis
730
696
 
731
697
  Found ${c.length} potentially unused exports.
732
698
 
733
- ${JSON.stringify(u,null,2)}`}]}}else if(r==="circular-deps"){let f=function(g,x){if(d.length>=l)return!1;p.add(g),m.add(g),x.push(g);let E=u.get(g)||new Set;for(let A of E)if(p.has(A)){if(m.has(A)){let I=x.indexOf(A);if(I>=0){let R=x.slice(I);R.push(A),d.push(R)}}}else if(f(A,[...x]))return!0;return m.delete(g),!1};var a=f;let l=typeof i=="number"?i:20,c=s.getAllResolved(),u=new Map;for(let g of c)u.has(g.file_path)||u.set(g.file_path,new Set),u.get(g.file_path).add(g.resolved_path);let d=[],p=new Set,m=new Set;for(let g of u.keys())!p.has(g)&&d.length<l&&f(g,[]);let y=[],b=new Map;for(let g of c){let x=`${g.file_path}|${g.resolved_path}`;b.has(x)||b.set(x,[]),b.get(x).push(g)}for(let g of d){let x=!1;for(let E=0;E<g.length-1;E++){let A=g[E],I=g[E+1],R=b.get(`${A}|${I}`);if(R){for(let k of R)try{let j=LS.readFileSync(A,"utf8"),w=k.module_specifier.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),P=new RegExp(`import\\s+type\\s+.*from\\s+['"]${w}['"]`,"i"),J=new RegExp(`import\\s+\\{.*type\\s+.*\\}.*from\\s+['"]${w}['"]`,"s");if(P.test(j)||J.test(j)){x=!0;break}let O=k.imported_symbols.split(",").map(M=>M.trim());for(let M of O){if(!M||M==="*")continue;let q=M.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(new RegExp(`\\(\\s*\\)\\s*=>\\s*${q}`).test(j)){x=!0;break}}}catch{}if(x)break}}x||y.push(g)}let _=y.map((g,x)=>({id:x+1,length:g.length-1,chain:g.map(E=>Ky.relative(e,E))}));return{content:[{type:"text",text:`# Circular Dependency Analysis
699
+ ${JSON.stringify(u,null,2)}`}]}}else if(r==="circular-deps"){let f=function(g,x){if(d.length>=l)return!1;p.add(g),m.add(g),x.push(g);let E=u.get(g)||new Set;for(let A of E)if(p.has(A)){if(m.has(A)){let I=x.indexOf(A);if(I>=0){let R=x.slice(I);R.push(A),d.push(R)}}}else if(f(A,[...x]))return!0;return m.delete(g),!1};var a=f;let l=typeof i=="number"?i:20,c=s.getAllResolved(),u=new Map;for(let g of c)u.has(g.file_path)||u.set(g.file_path,new Set),u.get(g.file_path).add(g.resolved_path);let d=[],p=new Set,m=new Set;for(let g of u.keys())!p.has(g)&&d.length<l&&f(g,[]);let y=[],b=new Map;for(let g of c){let x=`${g.file_path}|${g.resolved_path}`;b.has(x)||b.set(x,[]),b.get(x).push(g)}for(let g of d){let x=!1;for(let E=0;E<g.length-1;E++){let A=g[E],I=g[E+1],R=b.get(`${A}|${I}`);if(R){for(let k of R)try{let j=DS.readFileSync(A,"utf8"),w=k.module_specifier.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),P=new RegExp(`import\\s+type\\s+.*from\\s+['"]${w}['"]`,"i"),J=new RegExp(`import\\s+\\{.*type\\s+.*\\}.*from\\s+['"]${w}['"]`,"s");if(P.test(j)||J.test(j)){x=!0;break}let O=k.imported_symbols.split(",").map(M=>M.trim());for(let M of O){if(!M||M==="*")continue;let q=M.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(new RegExp(`\\(\\s*\\)\\s*=>\\s*${q}`).test(j)){x=!0;break}}}catch{}if(x)break}}x||y.push(g)}let _=y.map((g,x)=>({id:x+1,length:g.length-1,chain:g.map(E=>Jy.relative(e,E))}));return{content:[{type:"text",text:`# Circular Dependency Analysis
734
700
 
735
701
  Found ${y.length} circular dependency chain(s).
736
702
 
737
- ${JSON.stringify(_,null,2)}`}]}}return{isError:!0,content:[{type:"text",text:"Invalid mode"}]}}async function Xy(t){let{repoPath:e,subPath:r,maxDepth:i=5}=t,n=5e4,o=[{level:"signatures",depth:i},{level:"summaries",depth:i,meta:{warning:"Export lists omitted for token efficiency.",action:"Use 'shadow_inspect_file' on specific files to see exports."}},{level:"structure",depth:i,meta:{warning:"Detailed signatures omitted due to repo size.",action:"Use 'shadow_inspect_file' on specific files to see details."}},{level:"summaries",depth:2,meta:{warning:"Repository is large. Showing top 2 levels with summaries only.",action:"Use 'shadow_recon_tree' with a 'subPath' to explore deeper."}},{level:"structure",depth:2,meta:{warning:"Repository is large. Showing top 2 levels structure only.",action:"Use 'shadow_recon_tree' with a 'subPath' to explore."}},{level:"lite",depth:1,meta:{warning:"Repository is massive. Showing root files only.",action:"Use 'shadow_recon_tree' with a 'subPath' to explore."}}];for(let s of o){let a=await pd(e,5,s.level,r,s.depth);s.meta&&(a._meta=s.meta);let l=JSON.stringify(a,null,2);if(l.length<=n)return{content:[{type:"text",text:l}]}}return{content:[{type:"text",text:`Warning: The repository at ${r||"root"} is massive (exceeds ${n} chars even at minimal depth).
738
- Please use 'shadow_recon_tree' with a more specific 'subPath' or use 'shadow_search_symbol' to find what you need.`}]}}Fe();async function Qy(t){let{repoPath:e}=t,i=new ae(e).getSnapshot();return{content:[{type:"text",text:JSON.stringify(i,null,2)}],suggestedNext:{tool:"shadow_ops_chronicle",reason:"Recent decisions and ADRs"}}}X();Lt();Fe();function ev(t){switch(t){case"Entry":return"\u{1F6AA}";case"Logic":return"\u2699\uFE0F";case"Data":return"\u{1F4BE}";case"Utility":return"\u{1F527}";case"Infrastructure":return"\u{1F3D7}\uFE0F";case"Test":return"\u{1F9EA}";case"Types":return"\u{1F4DD}";case"Unknown":return"\u2753"}}async function tv(t){let{repoPath:e}=t;await Q(e);let r=L.getInstance(e),i=nt(r,e);new ae(e).updateTopography(i);let o=["Entry","Logic","Data","Utility","Infrastructure","Test","Types","Unknown"],s=`# \u{1F3D7}\uFE0F Architecture Summary
703
+ ${JSON.stringify(_,null,2)}`}]}}return{isError:!0,content:[{type:"text",text:"Invalid mode"}]}}async function Gy(t){let{repoPath:e,subPath:r,maxDepth:i=5}=t,n=5e4,o=[{level:"signatures",depth:i},{level:"summaries",depth:i,meta:{warning:"Export lists omitted for token efficiency.",action:"Use 'shadow_inspect_file' on specific files to see exports."}},{level:"structure",depth:i,meta:{warning:"Detailed signatures omitted due to repo size.",action:"Use 'shadow_inspect_file' on specific files to see details."}},{level:"summaries",depth:2,meta:{warning:"Repository is large. Showing top 2 levels with summaries only.",action:"Use 'shadow_recon_tree' with a 'subPath' to explore deeper."}},{level:"structure",depth:2,meta:{warning:"Repository is large. Showing top 2 levels structure only.",action:"Use 'shadow_recon_tree' with a 'subPath' to explore."}},{level:"lite",depth:1,meta:{warning:"Repository is massive. Showing root files only.",action:"Use 'shadow_recon_tree' with a 'subPath' to explore."}}];for(let s of o){let a=await yd(e,5,s.level,r,s.depth);s.meta&&(a._meta=s.meta);let l=JSON.stringify(a,null,2);if(l.length<=n)return{content:[{type:"text",text:l}]}}return{content:[{type:"text",text:`Warning: The repository at ${r||"root"} is massive (exceeds ${n} chars even at minimal depth).
704
+ Please use 'shadow_recon_tree' with a more specific 'subPath' or use 'shadow_search_symbol' to find what you need.`}]}}Be();async function qy(t){let{repoPath:e}=t,i=new pe(e).getSnapshot();return{content:[{type:"text",text:JSON.stringify(i,null,2)}],suggestedNext:{tool:"shadow_ops_chronicle",reason:"Recent decisions and ADRs"}}}X();Dt();Be();function Ky(t){switch(t){case"Entry":return"\u{1F6AA}";case"Logic":return"\u2699\uFE0F";case"Data":return"\u{1F4BE}";case"Utility":return"\u{1F527}";case"Infrastructure":return"\u{1F3D7}\uFE0F";case"Test":return"\u{1F9EA}";case"Types":return"\u{1F4DD}";case"Unknown":return"\u2753"}}async function Yy(t){let{repoPath:e}=t;await Q(e);let r=L.getInstance(e),i=nt(r,e);new pe(e).updateTopography(i);let o=["Entry","Logic","Data","Utility","Infrastructure","Test","Types","Unknown"],s=`# \u{1F3D7}\uFE0F Architecture Summary
739
705
 
740
706
  `;if(s+=`## Detected Pattern: **${i.pattern}**
741
707
  `,s+=`Confidence: ${i.patternConfidence.toFixed(0)}%
@@ -747,18 +713,18 @@ Please use 'shadow_recon_tree' with a more specific 'subPath' or use 'shadow_sea
747
713
 
748
714
  `,s+=`| Layer | Files | % of Total |
749
715
  `,s+=`|-------|------:|:----------:|
750
- `;let a=o.reduce((l,c)=>l+i.layers[c].count,0);for(let l of o){let c=i.layers[l],u=a>0?(c.count/a*100).toFixed(1):"0.0",d=ev(l);s+=`| ${d} ${l} | ${c.count} | ${u}% |
716
+ `;let a=o.reduce((l,c)=>l+i.layers[c].count,0);for(let l of o){let c=i.layers[l],u=a>0?(c.count/a*100).toFixed(1):"0.0",d=Ky(l);s+=`| ${d} ${l} | ${c.count} | ${u}% |
751
717
  `}s+=`
752
718
  ## Top Files by Layer
753
719
 
754
- `;for(let l of o){let c=i.layers[l];if(c.count===0)continue;let u=ev(l);if(s+=`### ${u} ${l} (${c.count} files)
720
+ `;for(let l of o){let c=i.layers[l];if(c.count===0)continue;let u=Ky(l);if(s+=`### ${u} ${l} (${c.count} files)
755
721
  `,c.topFiles.length>0)for(let d of c.topFiles)s+=`- \`${d.path}\` (${d.confidence}% conf)
756
722
  `,d.signals.length>0&&(s+=` - ${d.signals.join("; ")}
757
723
  `);else s+=`- _No files classified with high confidence_
758
724
  `;s+=`
759
725
  `}return s+=`---
760
726
  `,s+=`**Next Steps:**
761
- `,s+="- Use `shadow_inspect_file` to explore files in each layer\n",s+="- Use `shadow_analyze_flow` to trace execution from Entry \u2192 Logic \u2192 Data\n",s+="- Use `shadow_analyze_deps` to understand layer boundaries\n",{content:[{type:"text",text:s}],suggestedNext:{tool:"shadow_recon_tree",reason:"Explore a subPath or use shadow_inspect_file"}}}X();Lt();Fe();import yt from"path";async function nv(t){let{repoPath:e}=t;await Q(e);let r=L.getInstance(e),i=nt(r,e),o=new ae(e).getSnapshot(),s=[],a=[],l=Object.values(i.layers.Entry.topFiles).map(p=>p.path),c=new Set(Object.values(i.layers.Data.topFiles).map(p=>p.path));for(let p of l){let m=yt.isAbsolute(p)?p:yt.join(e,p),f=r.imports.findByFile(m);for(let y of f)y.resolved_path&&c.has(yt.relative(e,y.resolved_path))&&s.push(`\u2694\uFE0F LAYER BYPASS: \`${yt.relative(e,p)}\` directly imports Data layer \`${yt.relative(e,y.resolved_path)}\`. Should go through Logic.`)}let u=o.gravity?.hotspots||[];for(let p of u){let m=Gr(p.filePath,r);(m.layer==="Utility"||m.layer==="Unknown")&&p.gravity>50&&a.push(`\u{1F6A8} GRAVITY ANOMALY: \`${yt.relative(e,p.filePath)}\` has high gravity (${p.gravity.toFixed(0)}) but is classified as ${m.layer}. Consider promoting to Core Logic.`)}for(let p of l){let m=yt.isAbsolute(p)?p:yt.join(e,p),f=r.exports.findByFile(m);f.length>10&&a.push(`\u{1F388} ENTRY BLOAT: \`${yt.relative(e,p)}\` exports ${f.length} symbols. Entry handlers should be thin interfaces.`)}let d=`# \u{1F575}\uFE0F Architectural Scout Report
727
+ `,s+="- Use `shadow_inspect_file` to explore files in each layer\n",s+="- Use `shadow_analyze_flow` to trace execution from Entry \u2192 Logic \u2192 Data\n",s+="- Use `shadow_analyze_deps` to understand layer boundaries\n",{content:[{type:"text",text:s}],suggestedNext:{tool:"shadow_recon_tree",reason:"Explore a subPath or use shadow_inspect_file"}}}X();Dt();Be();import yt from"path";async function Xy(t){let{repoPath:e}=t;await Q(e);let r=L.getInstance(e),i=nt(r,e),o=new pe(e).getSnapshot(),s=[],a=[],l=Object.values(i.layers.Entry.topFiles).map(p=>p.path),c=new Set(Object.values(i.layers.Data.topFiles).map(p=>p.path));for(let p of l){let m=yt.isAbsolute(p)?p:yt.join(e,p),f=r.imports.findByFile(m);for(let y of f)y.resolved_path&&c.has(yt.relative(e,y.resolved_path))&&s.push(`\u2694\uFE0F LAYER BYPASS: \`${yt.relative(e,p)}\` directly imports Data layer \`${yt.relative(e,y.resolved_path)}\`. Should go through Logic.`)}let u=o.gravity?.hotspots||[];for(let p of u){let m=Cr(p.filePath,r);(m.layer==="Utility"||m.layer==="Unknown")&&p.gravity>50&&a.push(`\u{1F6A8} GRAVITY ANOMALY: \`${yt.relative(e,p.filePath)}\` has high gravity (${p.gravity.toFixed(0)}) but is classified as ${m.layer}. Consider promoting to Core Logic.`)}for(let p of l){let m=yt.isAbsolute(p)?p:yt.join(e,p),f=r.exports.findByFile(m);f.length>10&&a.push(`\u{1F388} ENTRY BLOAT: \`${yt.relative(e,p)}\` exports ${f.length} symbols. Entry handlers should be thin interfaces.`)}let d=`# \u{1F575}\uFE0F Architectural Scout Report
762
728
 
763
729
  `;return s.length===0&&a.length===0?d+=`\u2705 No significant architectural drift detected. The structure remains "Legit".
764
730
  `:(s.length>0&&(d+=`## \u274C Structural Violations
@@ -767,11 +733,11 @@ Please use 'shadow_recon_tree' with a more specific 'subPath' or use 'shadow_sea
767
733
  `),a.length>0&&(d+=`## \u26A0\uFE0F Architectural Warnings
768
734
  `,a.forEach(p=>d+=`- ${p}
769
735
  `),d+=`
770
- `)),{content:[{type:"text",text:d}]}}X();F();import ot from"path";X();F();Lt();fd();hd();gd();import{execSync as rv}from"child_process";var Ms=$.child({module:"heritage-analyzer"}),Us=class{repos;repoPath;constructor(e){this.repos=L.getInstance(e),this.repoPath=e}analyzeHeritage(e=20){try{Ms.info({limit:e},"Analyzing repository heritage...");let r=rv(`git log -n ${e} --pretty=format:"%H|%at|%an|%s"`,{cwd:this.repoPath,encoding:"utf-8"});if(!r)return;let i=r.split(`
771
- `).filter(Boolean);for(let n of i){let[o,s,a,l]=n.split("|"),c=this.analyzeCommitImpact(o);if(c.significant){let u=Array.from(c.layers).join(", "),d=`Heritage: ${l} (by ${a}). Touched ${c.fileCount} files across [${u}].`;this.repos.intentLogs.importHeritage(d,o,parseInt(s,10),.7),Ms.debug({sha:o,subject:l},"Logged heritage move")}}Ms.info("Heritage analysis complete.")}catch(r){Ms.warn({err:r.message},"Failed to run heritage analysis")}}analyzeCommitImpact(e){let r=new Set,i=0;try{let o=rv(`git diff-tree --no-commit-id --name-only -r ${e}`,{cwd:this.repoPath,encoding:"utf-8"}).split(`
772
- `).filter(Boolean);i=o.length;for(let l of o){let c=this.classifyPathOnly(l);c!=="Unknown"&&r.add(c)}let s=r.has("Entry")||r.has("Data")||r.has("Infrastructure"),a=r.size>=2||i>5;return{significant:s||a,layers:r,fileCount:i}}catch{return{significant:!1,layers:r,fileCount:0}}}classifyPathOnly(e){let r=e.startsWith("/")?e:"/"+e;return yd.some(i=>i.test(r))?"Test":vs.some(i=>i.test(r))||ys.some(i=>i.test(r))?"Entry":Jr.some(i=>i.test(r))?"Data":bs.some(i=>i.test(r))?"Utility":xs.some(i=>i.test(r))?"Entry":$s.some(i=>i.test(r))?"Data":Ss.some(i=>i.test(r))?"Entry":ks.some(i=>i.test(r))?"Data":vd.some(i=>i.test(r))?"Infrastructure":/\.(service|logic|usecase|interactor|manager)\.(ts|js|php|py)$/i.test(r)||_s.some(i=>i.test(r))?"Logic":"Unknown"}};Fe();Lt();async function iv(t){let{repoPath:e}=t;$.info({repoPath:e},"Setting up repository..."),$.info({repoPath:e}," Ensuring index is up-to-date...");let r=Date.now();await Q(e,void 0,!1,!0,U=>{let ee=U.total>0?Math.round(U.current/U.total*100):0;$.info({phase:U.phase,progress:`${U.current}/${U.total}`,percentage:`${ee}%`},U.message||`Indexing progress: ${U.phase}`)});let n=((Date.now()-r)/1e3).toFixed(1);$.info({repoPath:e,indexTime:`${n}s`}," Index check complete"),await Un();let o=L.getInstance(e);$.info({repoPath:e},"Populating Project Hologram...");let s=new ae(e),a=nt(o,e);s.updateTopography(a);let l=s.computeGravityZones();s.updateGravityZones(l),$.info({repoPath:e,sections:2},"Project Hologram populated (topography + gravity)");let c=o.files.getCount(),u=o.exports.getCount(),d=o.configs.getAll(),p=o.files.getTopDirectories(e),m=[],f=[],y="Standalone",b=U=>o.files.findPackageJsonChildren(U),_=U=>{let ee=ot.join(U,"package.json"),fe=d.filter(H=>H.file_path===ee),se=[],he=H=>fe.some(W=>W.key.startsWith("dep: ")&&W.key.includes(H));he("react")&&se.push("React"),he("vue")&&se.push("Vue"),he("next")&&se.push("Next.js"),he("fastify")&&se.push("Fastify"),he("express")&&se.push("Express"),he("nestjs")&&se.push("NestJS"),(he("prisma")||he("typeorm"))&&se.push("DB");let ue=fe.find(H=>H.key==="description")?.value||"";return{stack:se.join(", "),description:ue.length>80?ue.substring(0,77)+"...":ue}},g=ot.join(e,"apps"),x=ot.join(e,"packages"),E=ot.join(e,"services"),A=o.files.hasFilesPattern(g+"/%"),I=o.files.hasFilesPattern(x+"/%"),R=o.files.hasFilesPattern(E+"/%"),k=(U,ee)=>{let fe=b(U);fe.length>0&&(m.push(`| **${ee}/ (Directory)** | \uFE0F **DO NOT SUMMARIZE FULL DIR** | |`),fe.forEach(se=>{let he=ot.dirname(se.path),ue=ot.basename(he);if(ue.startsWith("_")||ue.includes("template"))return;let H=ot.relative(e,he),W=_(he);m.push(`| \u2514\u2500 \`${H}\` | ${W.stack||"Module"} | ${W.description} |`),f.push(H)}))};A||I||R?(y="Monorepo",k(g,"apps"),k(E,"services"),k(x,"packages")):p.forEach(U=>{let ee=U.root;if(!ee||ee.startsWith("."))return;let fe=_(ot.join(e,ee));m.push(`| \`${ee}/\` | ${fe.stack||"Module"} | ${fe.description} |`)});let j=ot.join(e,"package.json"),P=d.find(U=>U.key==="name"&&U.kind==="Service"&&U.file_path===j)?.value||ot.basename(e),J=d.filter(U=>U.kind==="Service"&&!U.file_path.endsWith("package.json")),O=J.map(U=>U.value).filter(U=>!["postgres","redis","db","worker"].includes(U.toLowerCase())).slice(0,5),M=O.length>0?`Service Cluster: ${O.join(", ")}${J.length>5?` (+${J.length-5} others)`:""}`:"",q=c<100?"small":"large",oe=q==="small"?"You can safely use `shadow_recon_tree` to view the full tree.":' **AVOID summarizing large directories like `apps/` or `services/` as a whole.**\n Instead, look for a specific component in the map below and use `shadow_recon_tree({ subPath: "apps/my-app" })` on it.\n\uFE0F **Prefer Search:** Use `shadow_search_symbol` for directly finding symbols.',B="";try{let ee=new Ne(e).detectAndRepairShifts(),fe=new jt(e),se=o.missions.findLastMission();fe.analyzeGhostChanges(se?.commit_sha||void 0),o.intentLogs.countByType("heritage")===0&&new Us(e).analyzeHeritage(20);let ue=o.intentLogs.countByType("heritage"),H=o.intentLogs.countByType("discovery");ue>0||H>0||ee.repaired>0?B=`
736
+ `)),{content:[{type:"text",text:d}]}}X();F();import ot from"path";X();F();Dt();Gp();qp();Kp();import{execSync as Qy}from"child_process";var Ds=$.child({module:"heritage-analyzer"}),Os=class{repos;repoPath;constructor(e){this.repos=L.getInstance(e),this.repoPath=e}analyzeHeritage(e=20){try{Ds.info({limit:e},"Analyzing repository heritage...");let r=Qy(`git log -n ${e} --pretty=format:"%H|%at|%an|%s"`,{cwd:this.repoPath,encoding:"utf-8"});if(!r)return;let i=r.split(`
737
+ `).filter(Boolean);for(let n of i){let[o,s,a,l]=n.split("|"),c=this.analyzeCommitImpact(o);if(c.significant){let u=Array.from(c.layers).join(", "),d=`Heritage: ${l} (by ${a}). Touched ${c.fileCount} files across [${u}].`;this.repos.intentLogs.importHeritage(d,o,parseInt(s,10),.7),Ds.debug({sha:o,subject:l},"Logged heritage move")}}Ds.info("Heritage analysis complete.")}catch(r){Ds.warn({err:r.message},"Failed to run heritage analysis")}}analyzeCommitImpact(e){let r=new Set,i=0;try{let o=Qy(`git diff-tree --no-commit-id --name-only -r ${e}`,{cwd:this.repoPath,encoding:"utf-8"}).split(`
738
+ `).filter(Boolean);i=o.length;for(let l of o){let c=this.classifyPathOnly(l);c!=="Unknown"&&r.add(c)}let s=r.has("Entry")||r.has("Data")||r.has("Infrastructure"),a=r.size>=2||i>5;return{significant:s||a,layers:r,fileCount:i}}catch{return{significant:!1,layers:r,fileCount:0}}}classifyPathOnly(e){let r=e.startsWith("/")?e:"/"+e;return Yp.some(i=>i.test(r))?"Test":us.some(i=>i.test(r))||ls.some(i=>i.test(r))?"Entry":Lr.some(i=>i.test(r))?"Data":ds.some(i=>i.test(r))?"Utility":ms.some(i=>i.test(r))?"Entry":fs.some(i=>i.test(r))?"Data":hs.some(i=>i.test(r))?"Entry":gs.some(i=>i.test(r))?"Data":Xp.some(i=>i.test(r))?"Infrastructure":/\.(service|logic|usecase|interactor|manager)\.(ts|js|php|py)$/i.test(r)||ps.some(i=>i.test(r))?"Logic":"Unknown"}};Be();Dt();async function ev(t){let{repoPath:e}=t;$.info({repoPath:e},"Setting up repository..."),$.info({repoPath:e}," Ensuring index is up-to-date...");let r=Date.now();await Q(e,void 0,!1,!0,U=>{let ee=U.total>0?Math.round(U.current/U.total*100):0;$.info({phase:U.phase,progress:`${U.current}/${U.total}`,percentage:`${ee}%`},U.message||`Indexing progress: ${U.phase}`)});let n=((Date.now()-r)/1e3).toFixed(1);$.info({repoPath:e,indexTime:`${n}s`}," Index check complete"),await Vn();let o=L.getInstance(e);$.info({repoPath:e},"Populating Project Hologram...");let s=new pe(e),a=nt(o,e);s.updateTopography(a);let l=s.computeGravityZones();s.updateGravityZones(l),$.info({repoPath:e,sections:2},"Project Hologram populated (topography + gravity)");let c=o.files.getCount(),u=o.exports.getCount(),d=o.configs.getAll(),p=o.files.getTopDirectories(e),m=[],f=[],y="Standalone",b=U=>o.files.findPackageJsonChildren(U),_=U=>{let ee=ot.join(U,"package.json"),fe=d.filter(H=>H.file_path===ee),se=[],he=H=>fe.some(W=>W.key.startsWith("dep: ")&&W.key.includes(H));he("react")&&se.push("React"),he("vue")&&se.push("Vue"),he("next")&&se.push("Next.js"),he("fastify")&&se.push("Fastify"),he("express")&&se.push("Express"),he("nestjs")&&se.push("NestJS"),(he("prisma")||he("typeorm"))&&se.push("DB");let le=fe.find(H=>H.key==="description")?.value||"";return{stack:se.join(", "),description:le.length>80?le.substring(0,77)+"...":le}},g=ot.join(e,"apps"),x=ot.join(e,"packages"),E=ot.join(e,"services"),A=o.files.hasFilesPattern(g+"/%"),I=o.files.hasFilesPattern(x+"/%"),R=o.files.hasFilesPattern(E+"/%"),k=(U,ee)=>{let fe=b(U);fe.length>0&&(m.push(`| **${ee}/ (Directory)** | \uFE0F **DO NOT SUMMARIZE FULL DIR** | |`),fe.forEach(se=>{let he=ot.dirname(se.path),le=ot.basename(he);if(le.startsWith("_")||le.includes("template"))return;let H=ot.relative(e,he),W=_(he);m.push(`| \u2514\u2500 \`${H}\` | ${W.stack||"Module"} | ${W.description} |`),f.push(H)}))};A||I||R?(y="Monorepo",k(g,"apps"),k(E,"services"),k(x,"packages")):p.forEach(U=>{let ee=U.root;if(!ee||ee.startsWith("."))return;let fe=_(ot.join(e,ee));m.push(`| \`${ee}/\` | ${fe.stack||"Module"} | ${fe.description} |`)});let j=ot.join(e,"package.json"),P=d.find(U=>U.key==="name"&&U.kind==="Service"&&U.file_path===j)?.value||ot.basename(e),J=d.filter(U=>U.kind==="Service"&&!U.file_path.endsWith("package.json")),O=J.map(U=>U.value).filter(U=>!["postgres","redis","db","worker"].includes(U.toLowerCase())).slice(0,5),M=O.length>0?`Service Cluster: ${O.join(", ")}${J.length>5?` (+${J.length-5} others)`:""}`:"",q=c<100?"small":"large",oe=q==="small"?"You can safely use `shadow_recon_tree` to view the full tree.":' **AVOID summarizing large directories like `apps/` or `services/` as a whole.**\n Instead, look for a specific component in the map below and use `shadow_recon_tree({ subPath: "apps/my-app" })` on it.\n\uFE0F **Prefer Search:** Use `shadow_search_symbol` for directly finding symbols.',B="";try{let ee=new Pe(e).detectAndRepairShifts(),fe=new Ot(e),se=o.missions.findLastMission();fe.analyzeGhostChanges(se?.commit_sha||void 0),o.intentLogs.countByType("heritage")===0&&new Os(e).analyzeHeritage(20);let le=o.intentLogs.countByType("heritage"),H=o.intentLogs.countByType("discovery");le>0||H>0||ee.repaired>0?B=`
773
739
  ## Shadow Engine Insights
774
- `+(ue>0?`* **Architectural Heritage**: Bootstrapped ${ue} significant historical moves.
740
+ `+(le>0?`* **Architectural Heritage**: Bootstrapped ${le} significant historical moves.
775
741
  `:"")+(H>0?`* **Recent Changes**: Detected ${H} external modifications.
776
742
  `:"")+(ee.repaired>0?`* **Symbol Healing**: Automatically repaired ${ee.repaired} orphaned intent links.
777
743
  `:""):B=`
@@ -781,7 +747,7 @@ Please use 'shadow_recon_tree' with a more specific 'subPath' or use 'shadow_sea
781
747
  `}catch(U){B=`
782
748
  ## Shadow Engine Status: **Offline**
783
749
  * Error: ${U instanceof Error?U.message:"Unknown"}
784
- `}try{let ee=new Yn(e).runMaintenance();(ee.pruning.deleted>0||ee.pruning.converted>0)&&(B+=`
750
+ `}try{let ee=new qn(e).runMaintenance();(ee.pruning.deleted>0||ee.pruning.converted>0)&&(B+=`
785
751
  ### Clean Sweep Cycle
786
752
  * **Pruned**: ${ee.pruning.deleted} orphaned logs deleted, ${ee.pruning.converted} converted to lapsed.
787
753
  `+(ee.compaction.eligible>0?`* **Compaction**: ${ee.compaction.eligible} cold missions eligible for briefing synthesis.
@@ -833,11 +799,11 @@ ${oe}
833
799
 
834
800
  ---
835
801
  **Ready.** What would you like to investigate first?
836
- `}]}}X();import ov from"path";import CS from"fs";function jS(t,e,r){let i=t.split(`
837
- `),n=[],o=0;for(let d=0;d<Math.min(i.length,50);d++){let p=i[d].trim();if(p.startsWith("import ")||p.startsWith("from ")||p.startsWith("export ")&&p.includes(" from "))o=d+1;else if(p&&!p.startsWith("//")&&!p.startsWith("/*")&&!p.startsWith("*")&&p!==""&&o>0)break}o>0&&(n.push(...i.slice(0,o)),n.push(""));let s=[...r].sort((d,p)=>d.startLine-p.startLine),a=0,l=0;for(let d of s)if(d.isTarget){n.push(`// \u2501\u2501\u2501 REQUESTED: ${d.name} \u2501\u2501\u2501`);let p=i.slice(d.startLine-1,d.endLine);n.push(...p),n.push("// \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),n.push(""),l++}else{let p=d.signature||MS(i,d.startLine-1,d.kind);p&&(n.push(`${p}`),n.push(` /* implementation: ${d.lineCount} lines */`),n.push(""),a++)}let c=s[s.length-1];if(c)for(let d=c.endLine;d<i.length;d++){let p=i[d].trim();if(p==="}"||p==="};"){n.push(i[d]);break}else if(p&&!p.startsWith("//"))break}return{foldedSource:n.join(`
838
- `),totalOriginalLines:i.length,foldedToLines:n.length,siblingsShown:l,siblingsFolded:a}}function MS(t,e,r){let i=t[e];if(r.includes("Function")||r.includes("Method")||r.includes("Arrow")){let n="";for(let o=e;o<Math.min(e+5,t.length);o++)if(n+=t[o],n.includes("{")||n.includes("=>")){let s=n.indexOf("{");s>0&&(n=n.substring(0,s).trim());break}return n.trim()}return i}async function Td(t){let{repoPath:e,filePath:r,resolver:i}=Ue(t),n=String(t.symbolName),o=t.context||"definition";if(r&&!i.isWithinRoot(r))return{content:[{type:"text",text:`Error: Access denied. Path ${r} is outside the repository root.`}],isError:!0};await Q(e);let s=L.getInstance(e),a=[];if(n.includes(".")){let[I,R]=n.split(".");a=s.exports.findMemberCandidates(I,R,r)}else a=s.exports.findDefinitionCandidates(n,r);if(a.length===0){let I=s.exports.findPotentialParents(n);if(I.length>0){let w=I.map(P=>`\`${P.name}\` (in ${i.getRelative(P.file_path)})`).join(", ");return{content:[{type:"text",text:`Symbol "${n}" not found as a top-level export.
802
+ `}]}}X();import tv from"path";import OS from"fs";function AS(t,e,r){let i=t.split(`
803
+ `),n=[],o=0;for(let d=0;d<Math.min(i.length,50);d++){let p=i[d].trim();if(p.startsWith("import ")||p.startsWith("from ")||p.startsWith("export ")&&p.includes(" from "))o=d+1;else if(p&&!p.startsWith("//")&&!p.startsWith("/*")&&!p.startsWith("*")&&p!==""&&o>0)break}o>0&&(n.push(...i.slice(0,o)),n.push(""));let s=[...r].sort((d,p)=>d.startLine-p.startLine),a=0,l=0;for(let d of s)if(d.isTarget){n.push(`// \u2501\u2501\u2501 REQUESTED: ${d.name} \u2501\u2501\u2501`);let p=i.slice(d.startLine-1,d.endLine);n.push(...p),n.push("// \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),n.push(""),l++}else{let p=d.signature||LS(i,d.startLine-1,d.kind);p&&(n.push(`${p}`),n.push(` /* implementation: ${d.lineCount} lines */`),n.push(""),a++)}let c=s[s.length-1];if(c)for(let d=c.endLine;d<i.length;d++){let p=i[d].trim();if(p==="}"||p==="};"){n.push(i[d]);break}else if(p&&!p.startsWith("//"))break}return{foldedSource:n.join(`
804
+ `),totalOriginalLines:i.length,foldedToLines:n.length,siblingsShown:l,siblingsFolded:a}}function LS(t,e,r){let i=t[e];if(r.includes("Function")||r.includes("Method")||r.includes("Arrow")){let n="";for(let o=e;o<Math.min(e+5,t.length);o++)if(n+=t[o],n.includes("{")||n.includes("=>")){let s=n.indexOf("{");s>0&&(n=n.substring(0,s).trim());break}return n.trim()}return i}async function kd(t){let{repoPath:e,filePath:r,resolver:i}=je(t),n=String(t.symbolName),o=t.context||"definition";if(r&&!i.isWithinRoot(r))return{content:[{type:"text",text:`Error: Access denied. Path ${r} is outside the repository root.`}],isError:!0};await Q(e);let s=L.getInstance(e),a=[];if(n.includes(".")){let[I,R]=n.split(".");a=s.exports.findMemberCandidates(I,R,r)}else a=s.exports.findDefinitionCandidates(n,r);if(a.length===0){let I=s.exports.findPotentialParents(n);if(I.length>0){let w=I.map(P=>`\`${P.name}\` (in ${i.getRelative(P.file_path)})`).join(", ");return{content:[{type:"text",text:`Symbol "${n}" not found as a top-level export.
839
805
  However, it likely exists inside: ${w}.
840
- Try: shadow_inspect_symbol({ symbolName: "${I[0].name}", context: "full" }) to see the class body.`}]}}let k=s.exports.findFuzzyCandidates(n).map(w=>w.name),j=Os(n,k,50,3);if(j.length>0){let w=j.map(P=>` \u2022 \`${P.match}\` (${P.score}% match)`).join(`
806
+ Try: shadow_inspect_symbol({ symbolName: "${I[0].name}", context: "full" }) to see the class body.`}]}}let k=s.exports.findFuzzyCandidates(n).map(w=>w.name),j=Ts(n,k,50,3);if(j.length>0){let w=j.map(P=>` \u2022 \`${P.match}\` (${P.score}% match)`).join(`
841
807
  `);return{content:[{type:"text",text:`Error: Symbol "${n}" not found in the index.
842
808
 
843
809
  Suggestions:
@@ -850,8 +816,8 @@ Next steps:
850
816
  Next steps:
851
817
  \u2022 Search for it: shadow_search_concept({ query: "${n}" })
852
818
  \u2022 Try with file path: shadow_inspect_symbol({ symbolName: "${n}", filePath: "..." })
853
- `}]}}let l=a[0];if(l.kind==="ExportSpecifier"||l.kind==="ExportAllDeclaration"){let I=s.imports.findImportSource(l.file_path,n);if(I&&I.resolved_path)return Td({...t,filePath:I.resolved_path})}let c=CS.readFileSync(l.file_path,"utf8"),u=c.split(`
854
- `),d=l.end_line-l.start_line+1,p=150,m,f=!1,y=null;if(o==="definition"&&d>p){let R=s.exports.findSiblings(l.file_path).map(k=>({name:k.name,kind:k.kind,signature:k.signature||"",startLine:k.start_line,endLine:k.end_line,lineCount:k.end_line-k.start_line+1,isTarget:k.name===l.name&&k.start_line===l.start_line,parentName:k.parent_name}));if(R.length>1){y=jS(c,{name:l.name,startLine:l.start_line,endLine:l.end_line},R);let k=i.getRelative(l.file_path);m=y.foldedSource+`
819
+ `}]}}let l=a[0];if(l.kind==="ExportSpecifier"||l.kind==="ExportAllDeclaration"){let I=s.imports.findImportSource(l.file_path,n);if(I&&I.resolved_path)return kd({...t,filePath:I.resolved_path})}let c=OS.readFileSync(l.file_path,"utf8"),u=c.split(`
820
+ `),d=l.end_line-l.start_line+1,p=150,m,f=!1,y=null;if(o==="definition"&&d>p){let R=s.exports.findSiblings(l.file_path).map(k=>({name:k.name,kind:k.kind,signature:k.signature||"",startLine:k.start_line,endLine:k.end_line,lineCount:k.end_line-k.start_line+1,isTarget:k.name===l.name&&k.start_line===l.start_line,parentName:k.parent_name}));if(R.length>1){y=AS(c,{name:l.name,startLine:l.start_line,endLine:l.end_line},R);let k=i.getRelative(l.file_path);m=y.foldedSource+`
855
821
 
856
822
  \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
857
823
  \u{1F4CA} Semantic Fold Applied (context: "definition")
@@ -866,29 +832,63 @@ Target Symbol: ${l.name}
866
832
  `)+`
867
833
 
868
834
  ... (truncated ${d-p} lines)`,f=!0}else m=u.slice(l.start_line-1,l.end_line).join(`
869
- `);let b=l.parent_name?`${l.parent_name}.${l.name}`:l.name,_=s.exports.findHydratedById(l.id),g={name:b,kind:l.kind,file:i.getRelative(l.file_path),startLine:l.start_line,endLine:l.end_line,totalLines:d,...f&&{truncated:!0,previewLines:p},classification:l.classification,intelligence:_?{working_set_of:_.active_missions.map(I=>`Mission #${I.id}: ${I.name}`),total_intents:_.intent_log_count,latest_intent:_.recent_intents[0]?`${_.recent_intents[0].type}: ${_.recent_intents[0].content}`:null}:void 0,source:m};if(o==="definition")return{content:[{type:"text",text:JSON.stringify(g,null,2)}]};let x={definition:g,dependencies:s.imports.getImportsForFile(l.file_path).map(I=>({module:I.module_specifier,symbols:I.imported_symbols,relativePath:I.resolved_path?ov.relative(e,I.resolved_path):null}))},E=[l.file_path],A=s.imports.findVerifiedDependents(E,n);return x.verifiedUsages=A.slice(0,10).map(I=>({file:ov.relative(e,I.file_path),classification:I.classification,importedSymbols:I.imported_symbols})),{content:[{type:"text",text:JSON.stringify(x,null,2)}]}}X();import sv from"path";async function av(t){let{repoPath:e,filePath:r}=Ue(t);if(!r)return{content:[{type:"text",text:"Error: filePath is required"}],isError:!0};let i=t.detailLevel||"signatures";await Q(e);let{files:n,exports:o}=L.getInstance(e),s=n.findByPath(r),a=sv.basename(r),l=/\.(ts|tsx|php|py|go)$/.test(a),c;l?c=await jr(r):c={exports:o.findByFile(r),imports:[]},i==="structure"?(c.exports=c.exports.map(m=>({name:m.name,kind:m.kind,line:m.start_line,classification:m.classification})),delete c.imports):i==="signatures"&&(c.exports=c.exports.map(m=>({name:m.name,kind:m.kind,signature:m.signature,line:m.start_line,classification:m.classification,capabilities:JSON.parse(m.capabilities||"[]")})),delete c.imports);let u=sv.relative(e,r),d=c.exports?.length||0,p="";return i==="structure"&&d>0?p=`
835
+ `);let b=l.parent_name?`${l.parent_name}.${l.name}`:l.name,_=s.exports.findHydratedById(l.id),g={name:b,kind:l.kind,file:i.getRelative(l.file_path),startLine:l.start_line,endLine:l.end_line,totalLines:d,...f&&{truncated:!0,previewLines:p},classification:l.classification,intelligence:_?{working_set_of:_.active_missions.map(I=>`Mission #${I.id}: ${I.name}`),total_intents:_.intent_log_count,latest_intent:_.recent_intents[0]?`${_.recent_intents[0].type}: ${_.recent_intents[0].content}`:null}:void 0,source:m};if(o==="definition")return{content:[{type:"text",text:JSON.stringify(g,null,2)}]};let x={definition:g,dependencies:s.imports.getImportsForFile(l.file_path).map(I=>({module:I.module_specifier,symbols:I.imported_symbols,relativePath:I.resolved_path?tv.relative(e,I.resolved_path):null}))},E=[l.file_path],A=s.imports.findVerifiedDependents(E,n);return x.verifiedUsages=A.slice(0,10).map(I=>({file:tv.relative(e,I.file_path),classification:I.classification,importedSymbols:I.imported_symbols})),{content:[{type:"text",text:JSON.stringify(x,null,2)}]}}X();import nv from"path";async function rv(t){let{repoPath:e,filePath:r}=je(t);if(!r)return{content:[{type:"text",text:"Error: filePath is required"}],isError:!0};let i=t.detailLevel||"signatures";await Q(e);let{files:n,exports:o}=L.getInstance(e),s=n.findByPath(r),a=nv.basename(r),l=/\.(ts|tsx|php|py|go)$/.test(a),c;l?c=await Zr(r):c={exports:o.findByFile(r),imports:[]},i==="structure"?(c.exports=c.exports.map(m=>({name:m.name,kind:m.kind,line:m.start_line,classification:m.classification})),delete c.imports):i==="signatures"&&(c.exports=c.exports.map(m=>({name:m.name,kind:m.kind,signature:m.signature,line:m.start_line,classification:m.classification,capabilities:JSON.parse(m.capabilities||"[]")})),delete c.imports);let u=nv.relative(e,r),d=c.exports?.length||0,p="";return i==="structure"&&d>0?p=`
870
836
 
871
837
  \u{1F4A1} Showing ${d} symbol names. For full signatures: shadow_inspect_file({ filePath: "${u}", detailLevel: "signatures" })`:i==="signatures"&&d>0&&(p=`
872
838
 
873
- \u{1F4A1} Showing ${d} complete signatures. To inspect a specific symbol: shadow_inspect_symbol({ symbolName: "...", context: "full" })`),{content:[{type:"text",text:JSON.stringify({...c,fileDescription:s?.summary||"",classification:s?.classification||"Unknown"},null,2)+p}]}}X();Lt();async function cv(t){let{repoPath:e,sinceCommit:r}=t;try{await Q(e),new jt(e).analyzeGhostChanges(r);let n=new Ne(e),o=n.detectAndRepairShifts(),s=n.syncLifecycle(),l=await new rt(e).recoverFromGitNotes(),{HologramService:c}=await Promise.resolve().then(()=>(Fe(),cy)),u=new c(e),d=nt(L.getInstance(e),e);u.updateTopography(d);let p=u.computeGravityZones();u.updateGravityZones(p);let m="Shadow Sync complete. Code changes indexed and intent logs updated.";return m+=`
839
+ \u{1F4A1} Showing ${d} complete signatures. To inspect a specific symbol: shadow_inspect_symbol({ symbolName: "...", context: "full" })`),{content:[{type:"text",text:JSON.stringify({...c,fileDescription:s?.summary||"",classification:s?.classification||"Unknown"},null,2)+p}]}}X();Dt();async function iv(t){let{repoPath:e,sinceCommit:r}=t;try{await Q(e),new Ot(e).analyzeGhostChanges(r);let n=new Pe(e),o=n.detectAndRepairShifts(),s=n.syncLifecycle(),l=await new tt(e).recoverFromGitNotes(),{HologramService:c}=await Promise.resolve().then(()=>(Be(),Ig)),u=new c(e),d=nt(L.getInstance(e),e);u.updateTopography(d);let p=u.computeGravityZones();u.updateGravityZones(p);let m="Shadow Sync complete. Code changes indexed and intent logs updated.";return m+=`
874
840
  \u269B\uFE0F Hologram: Refreshed architectural map (${p.length} hotspots).`,o.repaired>0&&(m+=`
875
841
  \u2728 Nano-Repair: Fixed ${o.repaired} links.`),l.missionsRecovered>0&&(m+=`
876
- \u{1F9EC} Re-hydration: Recovered ${l.missionsRecovered} missions.`),{content:[{type:"text",text:m}]}}catch(i){return{content:[{type:"text",text:`Error: ${i.message}`}],isError:!0}}}X();Lt();Fe();async function lv(t){let{repoPath:e,deep:r}=t;try{await Q(e,5,r);let i=new Ne(e),n=i.detectAndRepairShifts(),o=i.syncLifecycle(),s=new ae(e),a=nt(L.getInstance(e),e);s.updateTopography(a);let l=s.computeGravityZones();s.updateGravityZones(l);let c=`Repository at ${e} has been ${r?"deeply ":""}re-indexed.`;return n.repaired>0&&(c+=`
842
+ \u{1F9EC} Re-hydration: Recovered ${l.missionsRecovered} missions.`),{content:[{type:"text",text:m}]}}catch(i){return{content:[{type:"text",text:`Error: ${i.message}`}],isError:!0}}}X();Dt();Be();async function ov(t){let{repoPath:e,deep:r}=t;try{await Q(e,5,r);let i=new Pe(e),n=i.detectAndRepairShifts(),o=i.syncLifecycle(),s=new pe(e),a=nt(L.getInstance(e),e);s.updateTopography(a);let l=s.computeGravityZones();s.updateGravityZones(l);let c=`Repository at ${e} has been ${r?"deeply ":""}re-indexed.`;return n.repaired>0&&(c+=`
877
843
  \u2728 Nano-Repair: Fixed ${n.repaired} links.`),c+=`
878
- \u269B\uFE0F Hologram: Refreshed architectural map (${l.length} hotspots).`,{content:[{type:"text",text:c}]}}catch(i){return{content:[{type:"text",text:`Error: ${i.message}`}],isError:!0}}}async function uv(t){let{repoPath:e}=t;try{let i=new Ne(e).detectAndRepairShifts();return{content:[{type:"text",text:JSON.stringify(i,null,2)}]}}catch(r){return{content:[{type:"text",text:`Error tracing shifts: ${r.message}`}],isError:!0}}}F();var Rd=$.child({module:"mcp:tools:env:hooks"});async function pv(t){let{repoPath:e,action:r,enableAutoRefresh:i,enableSymbolHealing:n}=t;if(r==="install"){Rd.info({repoPath:e,enableAutoRefresh:i,enableSymbolHealing:n},"Installing git hooks");let o=Ag({repoPath:e,enableAutoRefresh:i??!0,enableSymbolHealing:n??!0}),s=["# Git Hooks Installation","",`## Installed (${o.installed.length})`,o.installed.length>0?o.installed.map(a=>`- \`${a}\``).join(`
844
+ \u269B\uFE0F Hologram: Refreshed architectural map (${l.length} hotspots).`,{content:[{type:"text",text:c}]}}catch(i){return{content:[{type:"text",text:`Error: ${i.message}`}],isError:!0}}}async function sv(t){let{repoPath:e}=t;try{let i=new Pe(e).detectAndRepairShifts();return{content:[{type:"text",text:JSON.stringify(i,null,2)}]}}catch(r){return{content:[{type:"text",text:`Error tracing shifts: ${r.message}`}],isError:!0}}}F();import Ne from"fs";import nn from"path";var er=$.child({module:"git-hooks"}),As={"post-merge":`#!/bin/sh
845
+ # Liquid Shadow: Auto-refresh index after merge/pull
846
+ # Generated by liquid-shadow
847
+
848
+ REPO_PATH="$(git rev-parse --show-toplevel)"
849
+
850
+ # Run liquid-shadow sync in background to avoid blocking git operations
851
+ nohup npx @precisionutilityguild/liquid-shadow sync "$REPO_PATH" > /dev/null 2>&1 &
852
+
853
+ exit 0
854
+ `,"post-checkout":`#!/bin/sh
855
+ # Liquid Shadow: Auto-refresh index after branch checkout
856
+ # Generated by liquid-shadow
857
+
858
+ # Only run on branch checkouts, not file checkouts
859
+ # $3 is 1 for branch checkout, 0 for file checkout
860
+ if [ "$3" = "1" ]; then
861
+ REPO_PATH="$(git rev-parse --show-toplevel)"
862
+
863
+ # Run liquid-shadow sync in background
864
+ nohup npx @precisionutilityguild/liquid-shadow sync "$REPO_PATH" > /dev/null 2>&1 &
865
+ fi
866
+
867
+ exit 0
868
+ `,"post-commit":`#!/bin/sh
869
+ # Liquid Shadow: Trigger symbol shift detection after commit
870
+ # Generated by liquid-shadow
871
+
872
+ REPO_PATH="$(git rev-parse --show-toplevel)"
873
+
874
+ # Run liquid-shadow sync in background
875
+ nohup npx @precisionutilityguild/liquid-shadow sync "$REPO_PATH" > /dev/null 2>&1 &
876
+
877
+ exit 0
878
+ `};function av(t){let{repoPath:e,enableAutoRefresh:r=!0,enableSymbolHealing:i=!0}=t,n=nn.join(e,".git","hooks"),o=[],s=[],a=[];if(!Ne.existsSync(nn.join(e,".git")))return a.push("Not a git repository"),{installed:o,skipped:s,errors:a};Ne.existsSync(n)||Ne.mkdirSync(n,{recursive:!0});let l=[];r&&l.push("post-merge","post-checkout"),i&&l.push("post-commit");for(let c of l){let u=nn.join(n,c),d=As[c];if(!d){a.push(`No template found for hook: ${c}`);continue}try{if(Ne.existsSync(u)){let p=Ne.readFileSync(u,"utf-8");if(p.includes("liquid-shadow")||p.includes("mcp-liquid-shadow")){s.push(c),er.info({hookName:c},"Hook already installed, skipping");continue}let m=`${u}.backup-${Date.now()}`;Ne.copyFileSync(u,m),er.info({hookName:c,backupPath:m},"Backed up existing hook")}Ne.writeFileSync(u,d,{mode:493}),o.push(c),er.info({hookName:c},"Installed git hook")}catch(p){a.push(`Failed to install ${c}: ${p}`),er.error({hookName:c,err:p},"Failed to install hook")}}return{installed:o,skipped:s,errors:a}}function cv(t){let e=nn.join(t,".git","hooks"),r=[],i=[];if(!Ne.existsSync(e))return{removed:r,errors:i};let n=Object.keys(As);for(let o of n){let s=nn.join(e,o);try{if(Ne.existsSync(s)){let a=Ne.readFileSync(s,"utf-8");(a.includes("liquid-shadow")||a.includes("mcp-liquid-shadow"))&&(Ne.unlinkSync(s),r.push(o),er.info({hookName:o},"Removed git hook"))}}catch(a){i.push(`Failed to remove ${o}: ${a}`),er.error({hookName:o,err:a},"Failed to remove hook")}}return{removed:r,errors:i}}function Ls(t){let e=nn.join(t,".git","hooks"),r=[],i=[];if(!Ne.existsSync(e))return{installed:r,notInstalled:Object.keys(As)};let n=Object.keys(As);for(let o of n){let s=nn.join(e,o);if(Ne.existsSync(s)){let a=Ne.readFileSync(s,"utf-8");a.includes("liquid-shadow")||a.includes("mcp-liquid-shadow")?r.push(o):i.push(o)}else i.push(o)}return{installed:r,notInstalled:i}}F();var Ed=$.child({module:"mcp:tools:env:hooks"});async function lv(t){let{repoPath:e,action:r,enableAutoRefresh:i,enableSymbolHealing:n}=t;if(r==="install"){Ed.info({repoPath:e,enableAutoRefresh:i,enableSymbolHealing:n},"Installing git hooks");let o=av({repoPath:e,enableAutoRefresh:i??!0,enableSymbolHealing:n??!0}),s=["# Git Hooks Installation","",`## Installed (${o.installed.length})`,o.installed.length>0?o.installed.map(a=>`- \`${a}\``).join(`
879
879
  `):"- None","",`## \u23ED\uFE0F Skipped (${o.skipped.length})`,o.skipped.length>0?o.skipped.map(a=>`- \`${a}\` (already installed)`).join(`
880
880
  `):"- None",""];return o.errors.length>0&&(s.push(`## Errors (${o.errors.length})`),s.push(o.errors.map(a=>`- ${a}`).join(`
881
881
  `)),s.push("")),s.push("---"),s.push("**What happens now?**"),(i??!0)&&s.push("- After `git pull` or `git checkout`: Index auto-refreshes in background"),(n??!0)&&s.push("- After `git commit`: Symbol shift detection runs automatically"),{content:[{type:"text",text:s.join(`
882
- `)}]}}if(r==="remove"){Rd.info({repoPath:e},"Uninstalling git hooks");let o=Lg(e),s=["# Git Hooks Uninstallation","",`## Removed (${o.removed.length})`,o.removed.length>0?o.removed.map(a=>`- \`${a}\``).join(`
882
+ `)}]}}if(r==="remove"){Ed.info({repoPath:e},"Uninstalling git hooks");let o=cv(e),s=["# Git Hooks Uninstallation","",`## Removed (${o.removed.length})`,o.removed.length>0?o.removed.map(a=>`- \`${a}\``).join(`
883
883
  `):"- None",""];return o.errors.length>0&&(s.push(`## Errors (${o.errors.length})`),s.push(o.errors.map(a=>`- ${a}`).join(`
884
884
  `))),{content:[{type:"text",text:s.join(`
885
- `)}]}}if(r==="status"){Rd.info({repoPath:e},"Checking git hooks status");let o=Hn(e);return{content:[{type:"text",text:["# Git Hooks Status","",`## Installed (${o.installed.length})`,o.installed.length>0?o.installed.map(a=>`- \`${a}\``).join(`
885
+ `)}]}}if(r==="status"){Ed.info({repoPath:e},"Checking git hooks status");let o=Ls(e);return{content:[{type:"text",text:["# Git Hooks Status","",`## Installed (${o.installed.length})`,o.installed.length>0?o.installed.map(a=>`- \`${a}\``).join(`
886
886
  `):"- None","",`## Not Installed (${o.notInstalled.length})`,o.notInstalled.length>0?o.notInstalled.map(a=>`- \`${a}\``).join(`
887
887
  `):"- None","","---",'**To install hooks**: Use `shadow_env_hooks({ action: "install" })`'].join(`
888
- `)}]}}return{content:[{type:"text",text:`Unknown action: ${r}`}],isError:!0}}Pt();import Fs from"path";import dv from"fs";F();var US=$.child({module:"mcp:tools:env:diagnose"});async function mv(t){let{repoPath:e}=t,r=Fs.isAbsolute(e)?Fs.normalize(e):Fs.resolve(process.cwd(),e);US.info({repoPath:r},"Running MCP diagnose");let i=["# MCP Server Health Check","",`**Repository path**: \`${r}\``,""],n=!1;try{n=dv.statSync(r).isDirectory()}catch{}i.push("## 1. Path"),i.push(n?"\u2705 Directory exists":"\u274C Path missing or not a directory"),i.push("");let o=Fs.join(r,".git"),s=n&&dv.existsSync(o);i.push("## 2. Git repository"),i.push(s?"\u2705 `.git` found":"\u274C Not a Git repository (or path invalid)"),i.push("");let a=!1,l=!1;if(n)try{Ae(r),a=!0,l=je(r)}catch{}i.push("## 3. Database & index"),i.push(a?"\u2705 Database connected":"\u274C Database not available"),i.push(l?"\u2705 Repository indexed":"\u26A0\uFE0F Not indexed yet"),i.push("");let c=n?Hn(r):{installed:[],notInstalled:[]};return i.push("## 4. Git hooks"),i.push(c.installed.length>0?`\u2705 Installed: ${c.installed.join(", ")}`:"\u26A0\uFE0F No Shadow hooks installed"),i.push(""),i.push("## 5. Next steps"),n?l?i.push("- Index is ready. Use shadow_search_*, shadow_inspect_*, shadow_analyze_*."):i.push("- Run **shadow_recon_onboard** to populate the index."):i.push("- Use a valid repository path."),{content:[{type:"text",text:i.join(`
889
- `)}]}}X();F();import FS from"path";import ZS from"fs";var fv=$.child({module:"mcp:tools:workspace:list"});async function hv(t){let{repoPaths:e,status:r}=t;fv.info({repoCount:e.length,status:r},"Getting workspace missions");let i=[];for(let n of e)if(ZS.existsSync(n))try{let{missions:o}=L.getInstance(n),s=o.findAll(r);for(let a of s){let l=o.getLinks(a.id);i.push({...a,repo_path:n,repo_name:FS.basename(n),cross_repo_links:l})}}catch(o){fv.error({error:o,repoPath:n},"Failed to query repo missions")}return i.sort((n,o)=>{let s=c=>c==="in-progress"?0:c==="verifying"?1:2,a=s(n.status),l=s(o.status);return a!==l?a-l:(n.created_at||0)-(o.created_at||0)}),{content:[{type:"text",text:JSON.stringify({total_missions:i.length,missions:i},null,2)}]}}X();F();var HS=$.child({module:"mcp:tools:workspace:link"});async function gv(t){let{parentRepoPath:e,parentMissionId:r,childRepoPath:i,childMissionId:n,relationship:o="related"}=t;HS.info({parentRepoPath:e,childRepoPath:i},"Linking cross-repo missions");let{missions:s}=L.getInstance(e),{missions:a}=L.getInstance(i);try{let l=s.findById(r),c=a.findById(n);if(!l)throw new Error(`Parent mission ${r} not found`);if(!c)throw new Error(`Child mission ${n} not found`);return s.createLink(r,i,n,o,"parent"),a.createLink(n,e,r,o,"child"),{content:[{type:"text",text:JSON.stringify({status:"linked",relationship:o},null,2)}]}}catch(l){throw new Error(`Failed to link: ${l.message}`)}}F();var WS=$.child({module:"mcp:tools:workspace:fuse"});async function yv(t){let{repoPaths:e,name:r}=t;WS.info({repoCount:e.length,name:r},"Creating fused workspace index");try{let i=Zy({repoPaths:e,name:r||`workspace-${Date.now()}`});return{content:[{type:"text",text:JSON.stringify({message:"Fused index created",status:i.getStatus()},null,2)}]}}catch(i){throw new Error(`Failed to fuse: ${i.message}`)}}var vv=h.object({repoPath:h.string(),name:h.string().optional(),goal:h.string().optional(),strategy:h.string().optional(),missionId:h.number().optional(),parentId:h.number().optional(),outcomeContract:h.string().optional(),templateId:h.enum(["refactoring","feature","bug-fix"]).optional(),templateVars:h.record(h.string(),h.string()).optional()}),_v=h.object({repoPath:h.string(),missionId:h.number(),stepId:h.string().optional(),status:h.enum(["pending","in-progress","completed","failed","skipped"]).optional(),contextPivot:h.string().optional(),updates:h.array(h.object({stepId:h.string(),status:h.enum(["pending","in-progress","completed","failed","skipped"]),contextPivot:h.string().optional()})).optional(),artifacts:h.array(h.object({type:h.string(),identifier:h.string(),metadata:h.record(h.string(),h.any()).optional()})).optional()}),bv=h.object({repoPath:h.string(),missionId:h.number().optional(),branch:h.string().optional(),scope:h.enum(["mission","project"]).optional(),includeLineage:h.boolean().optional(),includeGroupedByParent:h.boolean().optional()}),xv=h.object({repoPath:h.string(),missionId:h.number(),type:h.enum(["decision","blocker","discovery","fix"]),content:h.string(),filePath:h.string().optional(),symbolName:h.string().optional()}),$v=h.object({repoPath:h.string(),missionId:h.number()}),Sv=h.object({repoPath:h.string(),format:h.enum(["markdown","json"]).optional(),limit:h.number().optional(),offset:h.number().optional(),since:h.number().optional(),until:h.number().optional()}),kv=h.object({repoPath:h.string()}),Ev=h.object({repoPath:h.string()}),wv=h.object({repoPath:h.string(),missionId:h.number().optional(),depth:h.number().optional(),limit:h.number().optional(),format:h.enum(["mermaid","json"]).optional()}),Iv=h.object({repoPath:h.string(),subPath:h.string().optional(),maxDepth:h.number().int().optional()}),Tv=h.object({repoPath:h.string()}),Rv=h.object({repoPath:h.string()}),Pv=h.object({repoPath:h.string()}),Nv=h.object({repoPath:h.string()}),zv=h.object({repoPath:h.string(),query:h.string(),limit:h.number().int().optional(),offset:h.number().int().optional(),skipSync:h.boolean().optional(),compact:h.boolean().optional(),fileType:h.string().optional(),layer:h.enum(["Solid","Liquid","Virtual","Intel","Phantom"]).optional(),dateModifiedAfter:h.number().optional(),dateModifiedBefore:h.number().optional(),includeTests:h.boolean().optional()}),Dv=h.object({repoPath:h.string(),query:h.string(),limit:h.number().int().optional(),offset:h.number().int().optional(),skipSync:h.boolean().optional(),fileType:h.string().optional(),layer:h.enum(["Solid","Liquid","Virtual","Intel","Phantom"]).optional(),dateModifiedAfter:h.number().optional(),dateModifiedBefore:h.number().optional(),includeTests:h.boolean().optional()}),Ov=h.object({repoPath:h.string(),query:h.string().optional(),key:h.string().optional(),kind:h.enum(["Service","Image","Port","Env"]).optional(),limit:h.number().int().optional()}),Av=h.object({repoPath:h.string(),query:h.string(),limit:h.number().int().optional(),offset:h.number().int().optional(),skipSync:h.boolean().optional(),fileType:h.string().optional(),layer:h.enum(["Solid","Liquid","Virtual","Intel","Phantom"]).optional(),dateModifiedAfter:h.number().optional(),dateModifiedBefore:h.number().optional(),includeTests:h.boolean().optional()}),Lv=h.object({repoPath:h.string(),filePath:h.string().optional(),symbolName:h.string(),depth:h.number().int().optional()}),Cv=h.object({repoPath:h.string(),filePath:h.string(),symbolName:h.string().optional()}),jv=h.object({repoPath:h.string(),filePath:h.string(),direction:h.enum(["imports","imported_by"])}),Mv=h.object({repoPath:h.string(),mode:h.enum(["dead-code","circular-deps"]),limit:h.number().int().optional(),includeTests:h.boolean().optional()}),Uv=h.object({repoPath:h.string(),symbolName:h.string(),filePath:h.string().optional(),context:h.enum(["definition","full"]).optional()}),Fv=h.object({repoPath:h.string(),filePath:h.string(),detailLevel:h.enum(["structure","signatures","summaries","detailed"]).optional()}),Zv=h.object({repoPath:h.string(),sinceCommit:h.string().optional()}),Hv=h.object({repoPath:h.string(),deep:h.boolean().optional()}),Wv=h.object({repoPath:h.string()}),Bv=h.object({repoPath:h.string(),action:h.enum(["install","remove","status"]),enableAutoRefresh:h.boolean().optional(),enableSymbolHealing:h.boolean().optional()}),Jv=h.object({repoPath:h.string()}),Gv=h.object({repoPaths:h.array(h.string()),status:h.string().optional()}),Vv=h.object({parentRepoPath:h.string(),parentMissionId:h.number(),childRepoPath:h.string(),childMissionId:h.number(),relationship:h.string()}),qv=h.object({repoPaths:h.array(h.string()),name:h.string().optional()});F();var BS=["repoPath","filePath","subPath","path","parentRepoPath","childRepoPath"];function Zs(t,e){if(!(!t||typeof t!="object"))for(let r in t)typeof t[r]=="string"?["filePath","subPath","path","repoPath","parentRepoPath","childRepoPath"].includes(r)&&(t[r]=e.resolve(t[r])):Array.isArray(t[r])?t[r].forEach(i=>Zs(i,e)):typeof t[r]=="object"&&Zs(t[r],e)}function Kv(t){if(!(!t||typeof t!="object")){for(let e of BS)if(typeof t[e]=="string")try{t[e]=Bn(t[e])}catch(r){throw r}Array.isArray(t.repoPaths)&&(t.repoPaths=t.repoPaths.map(e=>typeof e=="string"?Bn(e):e))}}function Yv(t,e){return async r=>{let i=$.child({handler:t});try{Kv(r)}catch(n){return i.warn({err:n},"Path sanitization failed"),Ot("VALIDATION_ERROR",n.message,{})}try{if(r?.repoPath&&typeof r.repoPath=="string"){let o=new Wn(r.repoPath);Zs(r,o)}i.info({args:r},"Handling tool call");let n=await e(r);return i.debug("Tool call successful"),n}catch(n){i.error({err:n},"Error in tool handler");let o=n.message?.includes("Access denied"),s=`Handler '${t}' failed: ${n.message}`;return!o&&r?.repoPath&&(s+=Br),Ot(o?"FORBIDDEN":"INTERNAL_ERROR",s,{stack:n.stack})}}}function Xv(t,e,r){return async i=>{let n=$.child({handler:t});try{Kv(i)}catch(s){return n.warn({err:s},"Path sanitization failed"),Ot("VALIDATION_ERROR",s.message,{})}if(i?.repoPath&&typeof i.repoPath=="string"){let s=new Wn(i.repoPath);Zs(i,s)}n.info({args:i},"Handling tool call with validation");let o=e.safeParse(i);if(!o.success){let s=o.error.issues.map(a=>`${a.path.length>0?`${a.path.join(".")}: `:""}${a.message}`).join(", ");return n.warn({validationIssues:o.error.issues},"Validation failed"),Ot("VALIDATION_ERROR",`Validation error: ${s}`,{issues:o.error.issues})}try{let s=await r(o.data);return n.debug("Tool call successful"),s}catch(s){n.error({err:s},"Error in tool handler");let a=s.message?.includes("Access denied"),l=`Handler '${t}' failed: ${s.message}`,c=o.data;return!a&&c?.repoPath&&(l+=Br),Ot(a?"FORBIDDEN":"INTERNAL_ERROR",l,{stack:s.stack})}}}function ei(t,e){return async r=>{let i=r.repoPath;if(!i)return t(r);let n=Ug(i,e);return n||t(r)}}var JS={shadow_ops_plan:{default:my},shadow_ops_track:{default:gy},shadow_ops_briefing:{default:Ds},shadow_ops_log:{default:wy},shadow_ops_synthesize:{default:by},shadow_ops_chronicle:{default:$y},shadow_ops_context:{default:ei(Sy,"shadow_ops_context")},shadow_ops_health:{default:Ey},shadow_ops_graph:{default:Ny},shadow_recon_tree:{default:Xy},shadow_recon_hologram:{default:Qy},shadow_recon_topography:{default:tv},shadow_recon_scout:{default:nv},shadow_recon_onboard:{default:iv},shadow_search_concept:{default:Dy},shadow_search_symbol:{default:Oy},shadow_search_config:{default:Ly},shadow_search_path:{default:Cy},shadow_analyze_impact:{default:Wy},shadow_analyze_flow:{default:Gy},shadow_analyze_deps:{default:qy},shadow_analyze_debt:{default:Yy},shadow_inspect_symbol:{default:ei(Td,"shadow_inspect_symbol")},shadow_inspect_file:{default:ei(av,"shadow_inspect_file")},shadow_sync_trace:{default:ei(cv,"shadow_sync_trace")},shadow_sync_index:{default:lv},shadow_sync_repair:{default:ei(uv,"shadow_sync_repair")},shadow_env_hooks:{default:pv},shadow_env_diagnose:{default:mv},shadow_workspace_list:{default:hv},shadow_workspace_link:{default:gv},shadow_workspace_fuse:{default:yv}},GS={shadow_ops_plan:vv,shadow_ops_track:_v,shadow_ops_briefing:bv,shadow_ops_log:xv,shadow_ops_synthesize:$v,shadow_ops_chronicle:Sv,shadow_ops_context:Ev,shadow_ops_health:kv,shadow_ops_graph:wv,shadow_recon_tree:Iv,shadow_recon_hologram:Tv,shadow_recon_topography:Rv,shadow_recon_scout:Pv,shadow_recon_onboard:Nv,shadow_search_concept:zv,shadow_search_symbol:Dv,shadow_search_config:Ov,shadow_search_path:Av,shadow_analyze_impact:Lv,shadow_analyze_flow:Cv,shadow_analyze_deps:jv,shadow_analyze_debt:Mv,shadow_inspect_symbol:Uv,shadow_inspect_file:Fv,shadow_sync_trace:Zv,shadow_sync_index:Hv,shadow_sync_repair:Wv,shadow_env_hooks:Bv,shadow_env_diagnose:Jv,shadow_workspace_list:Gv,shadow_workspace_link:Vv,shadow_workspace_fuse:qv},Pd=new Map;for(let[t,e]of Object.entries(JS)){let r=GS[t];r?Pd.set(t,Xv(t,r,async i=>{if(e.default)return e.default(i);let n=i.mode||i.action;if(!n){let s=Object.keys(e);return{content:[{type:"text",text:`Missing required parameter "mode" or "action" for tool ${t}.
888
+ `)}]}}return{content:[{type:"text",text:`Unknown action: ${r}`}],isError:!0}}Kt();import Cs from"path";import uv from"fs";F();var CS=$.child({module:"mcp:tools:env:diagnose"});async function pv(t){let{repoPath:e}=t,r=Cs.isAbsolute(e)?Cs.normalize(e):Cs.resolve(process.cwd(),e);CS.info({repoPath:r},"Running MCP diagnose");let i=["# MCP Server Health Check","",`**Repository path**: \`${r}\``,""],n=!1;try{n=uv.statSync(r).isDirectory()}catch{}i.push("## 1. Path"),i.push(n?"\u2705 Directory exists":"\u274C Path missing or not a directory"),i.push("");let o=Cs.join(r,".git"),s=n&&uv.existsSync(o);i.push("## 2. Git repository"),i.push(s?"\u2705 `.git` found":"\u274C Not a Git repository (or path invalid)"),i.push("");let a=!1,l=!1;if(n)try{Oe(r),a=!0,l=Qe(r)}catch{}i.push("## 3. Database & index"),i.push(a?"\u2705 Database connected":"\u274C Database not available"),i.push(l?"\u2705 Repository indexed":"\u26A0\uFE0F Not indexed yet"),i.push("");let c=n?Ls(r):{installed:[],notInstalled:[]};return i.push("## 4. Git hooks"),i.push(c.installed.length>0?`\u2705 Installed: ${c.installed.join(", ")}`:"\u26A0\uFE0F No Shadow hooks installed"),i.push(""),i.push("## 5. Next steps"),n?l?i.push("- Index is ready. Use shadow_search_*, shadow_inspect_*, shadow_analyze_*."):i.push("- Run **shadow_recon_onboard** to populate the index."):i.push("- Use a valid repository path."),{content:[{type:"text",text:i.join(`
889
+ `)}]}}X();F();import jS from"path";import MS from"fs";var dv=$.child({module:"mcp:tools:workspace:list"});async function mv(t){let{repoPaths:e,status:r}=t;dv.info({repoCount:e.length,status:r},"Getting workspace missions");let i=[];for(let n of e)if(MS.existsSync(n))try{let{missions:o}=L.getInstance(n),s=o.findAll(r);for(let a of s){let l=o.getLinks(a.id);i.push({...a,repo_path:n,repo_name:jS.basename(n),cross_repo_links:l})}}catch(o){dv.error({error:o,repoPath:n},"Failed to query repo missions")}return i.sort((n,o)=>{let s=c=>c==="in-progress"?0:c==="verifying"?1:2,a=s(n.status),l=s(o.status);return a!==l?a-l:(n.created_at||0)-(o.created_at||0)}),{content:[{type:"text",text:JSON.stringify({total_missions:i.length,missions:i},null,2)}]}}X();F();var US=$.child({module:"mcp:tools:workspace:link"});async function fv(t){let{parentRepoPath:e,parentMissionId:r,childRepoPath:i,childMissionId:n,relationship:o="related"}=t;US.info({parentRepoPath:e,childRepoPath:i},"Linking cross-repo missions");let{missions:s}=L.getInstance(e),{missions:a}=L.getInstance(i);try{let l=s.findById(r),c=a.findById(n);if(!l)throw new Error(`Parent mission ${r} not found`);if(!c)throw new Error(`Child mission ${n} not found`);return s.createLink(r,i,n,o,"parent"),a.createLink(n,e,r,o,"child"),{content:[{type:"text",text:JSON.stringify({status:"linked",relationship:o},null,2)}]}}catch(l){throw new Error(`Failed to link: ${l.message}`)}}F();var FS=$.child({module:"mcp:tools:workspace:fuse"});async function hv(t){let{repoPaths:e,name:r}=t;FS.info({repoCount:e.length,name:r},"Creating fused workspace index");try{let i=jy({repoPaths:e,name:r||`workspace-${Date.now()}`});return{content:[{type:"text",text:JSON.stringify({message:"Fused index created",status:i.getStatus()},null,2)}]}}catch(i){throw new Error(`Failed to fuse: ${i.message}`)}}var gv=h.object({repoPath:h.string(),name:h.string().optional(),goal:h.string().optional(),strategy:h.string().optional(),missionId:h.number().optional(),parentId:h.number().optional(),outcomeContract:h.string().optional(),templateId:h.enum(["refactoring","feature","bug-fix"]).optional(),templateVars:h.record(h.string(),h.string()).optional()}),yv=h.object({repoPath:h.string(),missionId:h.number(),stepId:h.string().optional(),status:h.enum(["pending","in-progress","completed","failed","skipped"]).optional(),contextPivot:h.string().optional(),updates:h.array(h.object({stepId:h.string(),status:h.enum(["pending","in-progress","completed","failed","skipped"]),contextPivot:h.string().optional()})).optional(),artifacts:h.array(h.object({type:h.string(),identifier:h.string(),metadata:h.record(h.string(),h.any()).optional()})).optional()}),vv=h.object({repoPath:h.string(),missionId:h.number().optional(),branch:h.string().optional(),scope:h.enum(["mission","project"]).optional(),includeLineage:h.boolean().optional(),includeGroupedByParent:h.boolean().optional()}),_v=h.object({repoPath:h.string(),missionId:h.number(),type:h.enum(["decision","blocker","discovery","fix"]),content:h.string(),filePath:h.string().optional(),symbolName:h.string().optional()}),bv=h.object({repoPath:h.string(),missionId:h.number()}),xv=h.object({repoPath:h.string(),format:h.enum(["markdown","json"]).optional(),limit:h.number().optional(),offset:h.number().optional(),since:h.number().optional(),until:h.number().optional()}),$v=h.object({repoPath:h.string()}),Sv=h.object({repoPath:h.string()}),kv=h.object({repoPath:h.string(),missionId:h.number().optional(),depth:h.number().optional(),limit:h.number().optional(),format:h.enum(["mermaid","json"]).optional()}),Ev=h.object({repoPath:h.string(),subPath:h.string().optional(),maxDepth:h.number().int().optional()}),wv=h.object({repoPath:h.string()}),Iv=h.object({repoPath:h.string()}),Tv=h.object({repoPath:h.string()}),Rv=h.object({repoPath:h.string()}),Pv=h.object({repoPath:h.string(),query:h.string(),limit:h.number().int().optional(),offset:h.number().int().optional(),skipSync:h.boolean().optional(),compact:h.boolean().optional(),fileType:h.string().optional(),layer:h.enum(["Solid","Liquid","Virtual","Intel","Phantom"]).optional(),dateModifiedAfter:h.number().optional(),dateModifiedBefore:h.number().optional(),includeTests:h.boolean().optional()}),Nv=h.object({repoPath:h.string(),query:h.string(),limit:h.number().int().optional(),offset:h.number().int().optional(),skipSync:h.boolean().optional(),fileType:h.string().optional(),layer:h.enum(["Solid","Liquid","Virtual","Intel","Phantom"]).optional(),dateModifiedAfter:h.number().optional(),dateModifiedBefore:h.number().optional(),includeTests:h.boolean().optional()}),zv=h.object({repoPath:h.string(),query:h.string().optional(),key:h.string().optional(),kind:h.enum(["Service","Image","Port","Env"]).optional(),limit:h.number().int().optional()}),Dv=h.object({repoPath:h.string(),query:h.string(),limit:h.number().int().optional(),offset:h.number().int().optional(),skipSync:h.boolean().optional(),fileType:h.string().optional(),layer:h.enum(["Solid","Liquid","Virtual","Intel","Phantom"]).optional(),dateModifiedAfter:h.number().optional(),dateModifiedBefore:h.number().optional(),includeTests:h.boolean().optional()}),Ov=h.object({repoPath:h.string(),filePath:h.string().optional(),symbolName:h.string(),depth:h.number().int().optional()}),Av=h.object({repoPath:h.string(),filePath:h.string(),symbolName:h.string().optional()}),Lv=h.object({repoPath:h.string(),filePath:h.string(),direction:h.enum(["imports","imported_by"])}),Cv=h.object({repoPath:h.string(),mode:h.enum(["dead-code","circular-deps"]),limit:h.number().int().optional(),includeTests:h.boolean().optional()}),jv=h.object({repoPath:h.string(),symbolName:h.string(),filePath:h.string().optional(),context:h.enum(["definition","full"]).optional()}),Mv=h.object({repoPath:h.string(),filePath:h.string(),detailLevel:h.enum(["structure","signatures","summaries","detailed"]).optional()}),Uv=h.object({repoPath:h.string(),sinceCommit:h.string().optional()}),Fv=h.object({repoPath:h.string(),deep:h.boolean().optional()}),Zv=h.object({repoPath:h.string()}),Hv=h.object({repoPath:h.string(),action:h.enum(["install","remove","status"]),enableAutoRefresh:h.boolean().optional(),enableSymbolHealing:h.boolean().optional()}),Wv=h.object({repoPath:h.string()}),Bv=h.object({repoPaths:h.array(h.string()),status:h.string().optional()}),Jv=h.object({parentRepoPath:h.string(),parentMissionId:h.number(),childRepoPath:h.string(),childMissionId:h.number(),relationship:h.string()}),Vv=h.object({repoPaths:h.array(h.string()),name:h.string().optional()});F();var ZS=["repoPath","filePath","subPath","path","parentRepoPath","childRepoPath"];function js(t,e){if(!(!t||typeof t!="object"))for(let r in t)typeof t[r]=="string"?["filePath","subPath","path","repoPath","parentRepoPath","childRepoPath"].includes(r)&&(t[r]=e.resolve(t[r])):Array.isArray(t[r])?t[r].forEach(i=>js(i,e)):typeof t[r]=="object"&&js(t[r],e)}function Gv(t){if(!(!t||typeof t!="object")){for(let e of ZS)if(typeof t[e]=="string")try{t[e]=An(t[e])}catch(r){throw r}Array.isArray(t.repoPaths)&&(t.repoPaths=t.repoPaths.map(e=>typeof e=="string"?An(e):e))}}function qv(t,e){return async r=>{let i=$.child({handler:t});try{Gv(r)}catch(n){return i.warn({err:n},"Path sanitization failed"),Pt("VALIDATION_ERROR",n.message,{})}try{if(r?.repoPath&&typeof r.repoPath=="string"){let o=new On(r.repoPath);js(r,o)}i.info({args:r},"Handling tool call");let n=await e(r);return i.debug("Tool call successful"),n}catch(n){i.error({err:n},"Error in tool handler");let o=n.message?.includes("Access denied"),s=`Handler '${t}' failed: ${n.message}`;return!o&&r?.repoPath&&(s+=Ar),Pt(o?"FORBIDDEN":"INTERNAL_ERROR",s,{stack:n.stack})}}}function Kv(t,e,r){return async i=>{let n=$.child({handler:t});try{Gv(i)}catch(s){return n.warn({err:s},"Path sanitization failed"),Pt("VALIDATION_ERROR",s.message,{})}if(i?.repoPath&&typeof i.repoPath=="string"){let s=new On(i.repoPath);js(i,s)}n.info({args:i},"Handling tool call with validation");let o=e.safeParse(i);if(!o.success){let s=o.error.issues.map(a=>`${a.path.length>0?`${a.path.join(".")}: `:""}${a.message}`).join(", ");return n.warn({validationIssues:o.error.issues},"Validation failed"),Pt("VALIDATION_ERROR",`Validation error: ${s}`,{issues:o.error.issues})}try{let s=await r(o.data);return n.debug("Tool call successful"),s}catch(s){n.error({err:s},"Error in tool handler");let a=s.message?.includes("Access denied"),l=`Handler '${t}' failed: ${s.message}`,c=o.data;return!a&&c?.repoPath&&(l+=Ar),Pt(a?"FORBIDDEN":"INTERNAL_ERROR",l,{stack:s.stack})}}}function Xr(t,e){return async r=>{let i=r.repoPath;if(!i)return t(r);let n=Ah(i,e);return n||t(r)}}var HS={shadow_ops_plan:{default:tg},shadow_ops_track:{default:ig},shadow_ops_briefing:{default:vs},shadow_ops_log:{default:Fg},shadow_ops_synthesize:{default:Ng},shadow_ops_chronicle:{default:Dg},shadow_ops_context:{default:Xr(Og,"shadow_ops_context")},shadow_ops_health:{default:Ug},shadow_ops_graph:{default:Jg},shadow_recon_tree:{default:Gy},shadow_recon_hologram:{default:qy},shadow_recon_topography:{default:Yy},shadow_recon_scout:{default:Xy},shadow_recon_onboard:{default:ev},shadow_search_concept:{default:Ry},shadow_search_symbol:{default:Py},shadow_search_config:{default:zy},shadow_search_path:{default:Dy},shadow_analyze_impact:{default:Uy},shadow_analyze_flow:{default:Hy},shadow_analyze_deps:{default:By},shadow_analyze_debt:{default:Vy},shadow_inspect_symbol:{default:Xr(kd,"shadow_inspect_symbol")},shadow_inspect_file:{default:Xr(rv,"shadow_inspect_file")},shadow_sync_trace:{default:Xr(iv,"shadow_sync_trace")},shadow_sync_index:{default:ov},shadow_sync_repair:{default:Xr(sv,"shadow_sync_repair")},shadow_env_hooks:{default:lv},shadow_env_diagnose:{default:pv},shadow_workspace_list:{default:mv},shadow_workspace_link:{default:fv},shadow_workspace_fuse:{default:hv}},WS={shadow_ops_plan:gv,shadow_ops_track:yv,shadow_ops_briefing:vv,shadow_ops_log:_v,shadow_ops_synthesize:bv,shadow_ops_chronicle:xv,shadow_ops_context:Sv,shadow_ops_health:$v,shadow_ops_graph:kv,shadow_recon_tree:Ev,shadow_recon_hologram:wv,shadow_recon_topography:Iv,shadow_recon_scout:Tv,shadow_recon_onboard:Rv,shadow_search_concept:Pv,shadow_search_symbol:Nv,shadow_search_config:zv,shadow_search_path:Dv,shadow_analyze_impact:Ov,shadow_analyze_flow:Av,shadow_analyze_deps:Lv,shadow_analyze_debt:Cv,shadow_inspect_symbol:jv,shadow_inspect_file:Mv,shadow_sync_trace:Uv,shadow_sync_index:Fv,shadow_sync_repair:Zv,shadow_env_hooks:Hv,shadow_env_diagnose:Wv,shadow_workspace_list:Bv,shadow_workspace_link:Jv,shadow_workspace_fuse:Vv},wd=new Map;for(let[t,e]of Object.entries(HS)){let r=WS[t];r?wd.set(t,Kv(t,r,async i=>{if(e.default)return e.default(i);let n=i.mode||i.action;if(!n){let s=Object.keys(e);return{content:[{type:"text",text:`Missing required parameter "mode" or "action" for tool ${t}.
890
890
 
891
891
  \u{1F4A1} Solution: Specify one of: ${s.join(", ")}`}],isError:!0}}let o=e[n];if(!o){let s=Object.keys(e);return{content:[{type:"text",text:`Invalid mode/action "${n}" for tool ${t}.
892
892
 
893
- \u{1F4A1} Solution: Use one of these modes: ${s.join(", ")}`}],isError:!0}}return o(i)})):Pd.set(t,Yv(t,async i=>{if(e.default)return e.default(i);let n=i.mode||i.action;if(!n)throw new Error(`Missing mode/action for tool ${t}`);let o=e[n];if(!o)throw new Error(`Unknown mode/action '${n}' for tool ${t}`);return o(i)}))}async function Qv(t,e){let r=Pd.get(t);if(!r)throw new Error(`Tool not found: ${t}`);return r(e)}var Nd=class{maxRequests;windowMs;timestamps=[];constructor(e={}){this.maxRequests=e.maxRequests??120,this.windowMs=e.windowMs??6e4}prune(e){let r=e-this.windowMs;this.timestamps=this.timestamps.filter(i=>i>r)}allow(){let e=Date.now();return this.prune(e),this.timestamps.length>=this.maxRequests?!1:(this.timestamps.push(e),!0)}reset(){this.timestamps=[]}get count(){return this.prune(Date.now()),this.timestamps.length}},VS=new Nd({maxRequests:parseInt(process.env.MCP_RATE_LIMIT_MAX??String(120),10),windowMs:parseInt(process.env.MCP_RATE_LIMIT_WINDOW_MS??String(6e4),10)});function e_(){return VS}F();import{readFileSync as tk}from"fs";var zd;try{zd=JSON.parse(tk(On("package.json"),"utf-8"))}catch(t){$.error({err:t},"Failed to parse package.json, using defaults"),zd={name:"liquid-shadow-mcp",version:"0.0.0"}}var ti=new qS({name:"liquid-shadow-mcp",version:zd.version},{capabilities:{tools:{},resources:{}}});ti.setRequestHandler(XS,async()=>({tools:Bo}));ti.setRequestHandler(QS,ly);ti.setRequestHandler(ek,uy);var nk=e_();ti.setRequestHandler(YS,async t=>{let{name:e,arguments:r}=t.params;if(!nk.allow())return $.warn({name:e},"Rate limit exceeded"),{content:[{type:"text",text:"Rate limit exceeded. Too many requests. Please retry later. Configure with MCP_RATE_LIMIT_MAX and MCP_RATE_LIMIT_WINDOW_MS."}],isError:!0};try{return await Qv(e,r)}catch(i){return{content:[{type:"text",text:`Error: ${i.message}`}],isError:!0}}});async function Dd(){$.info("Shutting down gracefully...");try{await Un(),$.info("Worker pool shutdown complete")}catch(t){$.error({error:t},"Error during cleanup")}}process.on("SIGTERM",async()=>{await Dd(),process.exit(0)});process.on("SIGINT",async()=>{await Dd(),process.exit(0)});async function rk(){Fn(!0);let t=new KS;await ti.connect(t)}rk().catch(async t=>{process.stderr.write(`Server error: ${t.message}
894
- `),await Dd(),process.exit(1)});
893
+ \u{1F4A1} Solution: Use one of these modes: ${s.join(", ")}`}],isError:!0}}return o(i)})):wd.set(t,qv(t,async i=>{if(e.default)return e.default(i);let n=i.mode||i.action;if(!n)throw new Error(`Missing mode/action for tool ${t}`);let o=e[n];if(!o)throw new Error(`Unknown mode/action '${n}' for tool ${t}`);return o(i)}))}async function Yv(t,e){let r=wd.get(t);if(!r)throw new Error(`Tool not found: ${t}`);return r(e)}var Id=class{maxRequests;windowMs;timestamps=[];constructor(e={}){this.maxRequests=e.maxRequests??120,this.windowMs=e.windowMs??6e4}prune(e){let r=e-this.windowMs;this.timestamps=this.timestamps.filter(i=>i>r)}allow(){let e=Date.now();return this.prune(e),this.timestamps.length>=this.maxRequests?!1:(this.timestamps.push(e),!0)}reset(){this.timestamps=[]}get count(){return this.prune(Date.now()),this.timestamps.length}},BS=new Id({maxRequests:parseInt(process.env.MCP_RATE_LIMIT_MAX??String(120),10),windowMs:parseInt(process.env.MCP_RATE_LIMIT_WINDOW_MS??String(6e4),10)});function Xv(){return BS}F();import{readFileSync as XS}from"fs";var Td;try{Td=JSON.parse(XS(Zn("package.json"),"utf-8"))}catch(t){$.error({err:t},"Failed to parse package.json, using defaults"),Td={name:"liquid-shadow-mcp",version:"0.0.0"}}var Qr=new JS({name:"liquid-shadow-mcp",version:Td.version},{capabilities:{tools:{},resources:{}}});Qr.setRequestHandler(qS,async()=>({tools:kh}));Qr.setRequestHandler(KS,Lh);Qr.setRequestHandler(YS,Ch);var QS=Xv();Qr.setRequestHandler(GS,async t=>{let{name:e,arguments:r}=t.params;if(!QS.allow())return $.warn({name:e},"Rate limit exceeded"),{content:[{type:"text",text:"Rate limit exceeded. Too many requests. Please retry later. Configure with MCP_RATE_LIMIT_MAX and MCP_RATE_LIMIT_WINDOW_MS."}],isError:!0};try{return await Yv(e,r)}catch(i){return{content:[{type:"text",text:`Error: ${i.message}`}],isError:!0}}});async function Rd(){$.info("Shutting down gracefully...");try{await Vn(),$.info("Worker pool shutdown complete")}catch(t){$.error({error:t},"Error during cleanup")}}process.on("SIGTERM",async()=>{await Rd(),process.exit(0)});process.on("SIGINT",async()=>{await Rd(),process.exit(0)});async function ek(){Gn(!0);let t=new VS;await Qr.connect(t)}ek().catch(async t=>{process.stderr.write(`Server error: ${t.message}
894
+ `),await Rd(),process.exit(1)});