@cerebriline/agents 4.100.241 → 4.100.243

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 +1 @@
1
- {"version":3,"file":"agent-runtime.d.ts","sourceRoot":"","sources":["../src/agent-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,KAAK,uBAAuB,EAC5B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAKX,YAAY,EAEZ,UAAU,EAKV,cAAc,EACd,iBAAiB,EAEjB,yBAAyB,EAOzB,kBAAkB,IAAI,sBAAsB,EAO5C,iBAAiB,EAEjB,MAAM,eAAe,CAAC;AA0EvB,kEAAkE;AAClE,eAAO,MAAM,wBAAwB,QAAS,CAAC;AAE/C;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACpC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,OAAO,GAClB,MAAM,CAmBR;AAKD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,+BAA+B,IAAI,CAAC;AA0MjD;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CACzC,SAAS,CAAC,EAAE,iBAAiB,GAC3B,MAAM,CAcR;AAYD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,+BAA+B,IAAI,CAAC;AAEjD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,sCAAsC,IAAI,CAAC;AAExD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,mCAAmC,OAAO,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,kDAAkD,sPACgL,CAAC;AAEhP;;;GAGG;AACH,eAAO,MAAM,+CAA+C,0JAC4F,CAAC;AAEzJ;;;GAGG;AACH,eAAO,MAAM,2CAA2C,2JACiG,CAAC;AAuB1J,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,YAAY,GAAG,SAAS,YAAY,EAAE,CAAC;AAC5E,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;AAEpE;;;;GAIG;AACH,MAAM,WAAW,2BAA4B,SAAQ,sBAAsB;IAC1E,KAAK,EAAE,UAAU,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,8BAChB,SAAQ,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC;IAC7C,gDAAgD;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,wCAAwC;IACxC,OAAO,CAAC,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC7C;AAED;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAC3B,2BAA2B,GAC3B,8BAA8B,CAAC;AAiKlC,qBAAa,sBAAuB,SAAQ,KAAK;IAChD,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;gBAEd,MAAM,CAAC,EAAE,OAAO;CAa5B;AAkND;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,+BAA+B,IAAI,CAAC;AAEjD;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE;IACpD,aAAa,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IAC1C,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC9B,GAAG,MAAM,CAST;AAED,qBAAa,YAAY;IACxB,OAAO,CAAC,MAAM,CAGU;IACxB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiC;IAE3D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA0C;IAChE,OAAO,CAAC,KAAK,CAQX;IACF;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB,CAAgB;IAC3C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAyBpB;IACF;;;OAGG;IACH,OAAO,CAAC,qBAAqB,CAAgC;IAC7D,uDAAuD;IACvD,OAAO,CAAC,yBAAyB,CAAS;IAC1C;;;OAGG;IACH,OAAO,CAAC,iBAAiB,CAAqB;IAC9C;;;;;;;;OAQG;IACH,OAAO,CAAC,qBAAqB,CAAS;IACtC;;;OAGG;IACH,OAAO,CAAC,sBAAsB,CAAS;IACvC,yFAAyF;IACzF,OAAO,CAAC,2BAA2B,CAAK;IACxC;;;;;;OAMG;IACH,OAAO,CAAC,gBAAgB,CAAS;IACjC;;;;;;;OAOG;IACH,OAAO,CAAC,0BAA0B,CAAK;IACvC,uEAAuE;IACvE,OAAO,CAAC,8BAA8B,CAAK;IAC3C,+DAA+D;IAC/D,OAAO,CAAC,wBAAwB,CAAS;IACzC;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB,CAAS;IACvC;;;;;;OAMG;IACH,OAAO,CAAC,gBAAgB,CAAS;IACjC;;;;OAIG;IACH,OAAO,CAAC,gBAAgB,CAA+B;IACvD,OAAO,CAAC,qBAAqB,CAAS;IACtC;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB,CAAS;IACpC,qFAAqF;IACrF,OAAO,CAAC,2BAA2B,CAAK;IACxC;;;OAGG;IACH,OAAO,CAAC,oBAAoB,CAAK;IACjC,+EAA+E;IAC/E,OAAO,CAAC,mBAAmB,CAAK;IAChC;;;;;;OAMG;IACH,OAAO,CAAC,wBAAwB,CAAqB;IACrD,OAAO,CAAC,cAAc,CAAC,CAAgB;IACvC,OAAO,CAAC,eAAe,CAAC,CAAkB;IAC1C;;;;OAIG;IACH,OAAO,CAAC,mBAAmB,CAAK;IAChC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAS;IAC9C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAS;gBAE/B,MAAM,EAAE,kBAAkB;IAsBhC,GAAG,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IAIlD,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IAI9D,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI;IAkB7B,SAAS,CAAC,QAAQ,EAAE,kBAAkB,GAAG,MAAM,IAAI;IAOnD;;;;;;;OAOG;IACH,OAAO,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,GAAG,IAAI;IAoBhD;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,IAAI,yBAAyB;YAsBvB,iBAAiB;YAKjB,UAAU;IAkBxB,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,8BAA8B;IAUtC,OAAO,CAAC,gCAAgC;IAUxC;;;;;;;OAOG;YACW,qBAAqB;IAYnC,OAAO,CAAC,6BAA6B;IAOrC;;;OAGG;YACW,yBAAyB;IAgEvC;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,kBAAkB;IAqB1B,+DAA+D;IAC/D,OAAO,CAAC,aAAa;IAIrB;;;;;;;OAOG;IACH,OAAO,CAAC,yBAAyB;IAUjC;;;;;;;OAOG;IACH;;;;;;OAMG;IACH,OAAO,CAAC,wBAAwB;IAIhC;;;;;;OAMG;YACW,sBAAsB;IAyGpC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,uBAAuB;YAOjB,sBAAsB;YA4CtB,OAAO;YAmqBP,kBAAkB;YASlB,iBAAiB;IAM/B;;;;;;;;;;;;;;;;;OAiBG;YACW,wCAAwC;IAiItD;;;;;OAKG;YACW,4CAA4C;IAyD1D;;;;;;;;;;;;;;;;;OAiBG;YACW,yBAAyB;IA8BvC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,OAAO,CAAC,sBAAsB;IAY9B,OAAO,CAAC,eAAe;IAMvB;;;;;;;;;;;OAWG;YACW,kBAAkB;IAyChC;;;;;;;;;;;;;OAaG;YACW,0BAA0B;IAwFxC,OAAO,CAAC,yBAAyB;YAiBnB,wBAAwB;YAodvB,uBAAuB;IA2DtC,OAAO,CAAC,2BAA2B;IAanC,OAAO,CAAC,oBAAoB;IAmB5B,OAAO,CAAC,sBAAsB;IAO9B,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,gCAAgC;YA2B1B,0BAA0B;YAmF1B,yBAAyB;YAwBzB,WAAW;YAwCX,gBAAgB;IA0E9B,OAAO,CAAC,yBAAyB;YAsBnB,oBAAoB;YAmGpB,mBAAmB;YAwCnB,mBAAmB;IAqIjC,OAAO,CAAC,SAAS;IAoBjB,OAAO,CAAC,wBAAwB;IAMhC;;;;;;OAMG;YACW,kBAAkB;IAwDhC,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,mBAAmB;IAW3B;;;;;;;;;;OAUG;IACH,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAgD;IAE5E,OAAO,CAAC,eAAe;IAevB,uEAAuE;IACvE,OAAO,CAAC,aAAa;IAQrB;;;;;;;;;OASG;IACH,OAAO,CAAC,KAAK;YAKC,IAAI;IAgHlB,OAAO,CAAC,gBAAgB;CAWxB;AAgLD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,GAAG,YAAY,CAE3E;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,KAAK,qBAAe,CAAC;AAClC,MAAM,MAAM,KAAK,GAAG,YAAY,CAAC;AAEjC,wBAAgB,WAAW,CAAC,MAAM,EAAE,kBAAkB,GAAG,YAAY,CAEpE"}
1
+ {"version":3,"file":"agent-runtime.d.ts","sourceRoot":"","sources":["../src/agent-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,KAAK,uBAAuB,EAC5B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAKX,YAAY,EAEZ,UAAU,EAKV,cAAc,EACd,iBAAiB,EAEjB,yBAAyB,EAOzB,kBAAkB,IAAI,sBAAsB,EAO5C,iBAAiB,EAEjB,MAAM,eAAe,CAAC;AA0EvB,kEAAkE;AAClE,eAAO,MAAM,wBAAwB,QAAS,CAAC;AAE/C;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACpC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,OAAO,GAClB,MAAM,CAmBR;AAKD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,+BAA+B,IAAI,CAAC;AA0MjD;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CACzC,SAAS,CAAC,EAAE,iBAAiB,GAC3B,MAAM,CAcR;AAYD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,+BAA+B,IAAI,CAAC;AAEjD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,sCAAsC,IAAI,CAAC;AAExD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,mCAAmC,OAAO,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,kDAAkD,sPACgL,CAAC;AAEhP;;;GAGG;AACH,eAAO,MAAM,+CAA+C,0JAC4F,CAAC;AAEzJ;;;GAGG;AACH,eAAO,MAAM,2CAA2C,2JACiG,CAAC;AAuB1J,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,YAAY,GAAG,SAAS,YAAY,EAAE,CAAC;AAC5E,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;AAEpE;;;;GAIG;AACH,MAAM,WAAW,2BAA4B,SAAQ,sBAAsB;IAC1E,KAAK,EAAE,UAAU,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,8BAChB,SAAQ,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC;IAC7C,gDAAgD;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,wCAAwC;IACxC,OAAO,CAAC,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC7C;AAED;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAC3B,2BAA2B,GAC3B,8BAA8B,CAAC;AAiKlC,qBAAa,sBAAuB,SAAQ,KAAK;IAChD,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;gBAEd,MAAM,CAAC,EAAE,OAAO;CAa5B;AAkND;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,+BAA+B,IAAI,CAAC;AAEjD;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE;IACpD,aAAa,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IAC1C,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC9B,GAAG,MAAM,CAST;AAED,qBAAa,YAAY;IACxB,OAAO,CAAC,MAAM,CAGU;IACxB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiC;IAE3D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA0C;IAChE,OAAO,CAAC,KAAK,CAQX;IACF;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB,CAAgB;IAC3C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAyBpB;IACF;;;OAGG;IACH,OAAO,CAAC,qBAAqB,CAAgC;IAC7D,uDAAuD;IACvD,OAAO,CAAC,yBAAyB,CAAS;IAC1C;;;OAGG;IACH,OAAO,CAAC,iBAAiB,CAAqB;IAC9C;;;;;;;;OAQG;IACH,OAAO,CAAC,qBAAqB,CAAS;IACtC;;;OAGG;IACH,OAAO,CAAC,sBAAsB,CAAS;IACvC,yFAAyF;IACzF,OAAO,CAAC,2BAA2B,CAAK;IACxC;;;;;;OAMG;IACH,OAAO,CAAC,gBAAgB,CAAS;IACjC;;;;;;;OAOG;IACH,OAAO,CAAC,0BAA0B,CAAK;IACvC,uEAAuE;IACvE,OAAO,CAAC,8BAA8B,CAAK;IAC3C,+DAA+D;IAC/D,OAAO,CAAC,wBAAwB,CAAS;IACzC;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB,CAAS;IACvC;;;;;;OAMG;IACH,OAAO,CAAC,gBAAgB,CAAS;IACjC;;;;OAIG;IACH,OAAO,CAAC,gBAAgB,CAA+B;IACvD,OAAO,CAAC,qBAAqB,CAAS;IACtC;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB,CAAS;IACpC,qFAAqF;IACrF,OAAO,CAAC,2BAA2B,CAAK;IACxC;;;OAGG;IACH,OAAO,CAAC,oBAAoB,CAAK;IACjC,+EAA+E;IAC/E,OAAO,CAAC,mBAAmB,CAAK;IAChC;;;;;;OAMG;IACH,OAAO,CAAC,wBAAwB,CAAqB;IACrD,OAAO,CAAC,cAAc,CAAC,CAAgB;IACvC,OAAO,CAAC,eAAe,CAAC,CAAkB;IAC1C;;;;OAIG;IACH,OAAO,CAAC,mBAAmB,CAAK;IAChC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAS;IAC9C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAS;gBAE/B,MAAM,EAAE,kBAAkB;IAsBhC,GAAG,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IAIlD,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IAI9D,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI;IAkB7B,SAAS,CAAC,QAAQ,EAAE,kBAAkB,GAAG,MAAM,IAAI;IAOnD;;;;;;;OAOG;IACH,OAAO,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,GAAG,IAAI;IAoBhD;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,IAAI,yBAAyB;YAsBvB,iBAAiB;YAKjB,UAAU;IAkBxB,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,8BAA8B;IAUtC,OAAO,CAAC,gCAAgC;IAUxC;;;;;;;OAOG;YACW,qBAAqB;IAYnC,OAAO,CAAC,6BAA6B;IAOrC;;;OAGG;YACW,yBAAyB;IAgEvC;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,kBAAkB;IAqB1B,+DAA+D;IAC/D,OAAO,CAAC,aAAa;IAIrB;;;;;;;OAOG;IACH,OAAO,CAAC,yBAAyB;IAUjC;;;;;;;OAOG;IACH;;;;;;OAMG;IACH,OAAO,CAAC,wBAAwB;IAIhC;;;;;;OAMG;YACW,sBAAsB;IAyGpC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,uBAAuB;YAOjB,sBAAsB;YA4CtB,OAAO;YAmqBP,kBAAkB;YASlB,iBAAiB;IAM/B;;;;;;;;;;;;;;;;;OAiBG;YACW,wCAAwC;IAiItD;;;;;OAKG;YACW,4CAA4C;IAyD1D;;;;;;;;;;;;;;;;;OAiBG;YACW,yBAAyB;IA8BvC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,OAAO,CAAC,sBAAsB;IAY9B,OAAO,CAAC,eAAe;IAMvB;;;;;;;;;;;OAWG;YACW,kBAAkB;IAyChC;;;;;;;;;;;;;OAaG;YACW,0BAA0B;IAwFxC,OAAO,CAAC,yBAAyB;YAiBnB,wBAAwB;YAodvB,uBAAuB;IA2DtC,OAAO,CAAC,2BAA2B;IAanC,OAAO,CAAC,oBAAoB;IAmB5B,OAAO,CAAC,sBAAsB;IAO9B,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,gCAAgC;YA2B1B,0BAA0B;YAmF1B,yBAAyB;YAwBzB,WAAW;YAwCX,gBAAgB;IA0E9B,OAAO,CAAC,yBAAyB;YAsBnB,oBAAoB;YA8GpB,mBAAmB;YAwCnB,mBAAmB;IAqIjC,OAAO,CAAC,SAAS;IAoBjB,OAAO,CAAC,wBAAwB;IAMhC;;;;;;OAMG;YACW,kBAAkB;IAwDhC,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,mBAAmB;IAW3B;;;;;;;;;;OAUG;IACH,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAgD;IAE5E,OAAO,CAAC,eAAe;IAevB,uEAAuE;IACvE,OAAO,CAAC,aAAa;IAQrB;;;;;;;;;OASG;IACH,OAAO,CAAC,KAAK;YAKC,IAAI;IAgHlB,OAAO,CAAC,gBAAgB;CAWxB;AAgLD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,GAAG,YAAY,CAE3E;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,KAAK,qBAAe,CAAC;AAClC,MAAM,MAAM,KAAK,GAAG,YAAY,CAAC;AAEjC,wBAAgB,WAAW,CAAC,MAAM,EAAE,kBAAkB,GAAG,YAAY,CAEpE"}
package/dist/index.js CHANGED
@@ -62,7 +62,7 @@ var cm=Object.defineProperty,dm=(e)=>e;function mm(e,i){this[e]=dm.bind(null,i)}
62
62
 
63
63
  `)}p.write("payload.value = newResult;"),p.write("return payload;");let X=p.compile();return(C,N)=>X(f,C,N)},r,o=Ne,u=!We.jitless,l=u&&Ca.value,c=i.catchall,d;e._zod.parse=(f,p)=>{d??(d=a.value);let y=f.value;if(!o(y))return f.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),f;if(u&&l&&p?.async===!1&&p.jitless!==!0){if(!r)r=t(i.shape);if(f=r(f,p),!c)return f;return Cs([],y,f,p,d,e)}return n(f,p)}});function la(e,i,n,a){for(let r of e)if(r.issues.length===0)return i.value=r.value,i;let t=e.filter((r)=>!he(r));if(t.length===1)return i.value=t[0].value,t[0];return i.issues.push({code:"invalid_union",input:i.value,inst:n,errors:e.map((r)=>r.issues.map((o)=>G(o,a,R())))}),i}var Ft=m("$ZodUnion",(e,i)=>{S.init(e,i),$(e._zod,"optin",()=>i.options.some((a)=>a._zod.optin==="optional")?"optional":void 0),$(e._zod,"optout",()=>i.options.some((a)=>a._zod.optout==="optional")?"optional":void 0),$(e._zod,"values",()=>{if(i.options.every((a)=>a._zod.values))return new Set(i.options.flatMap((a)=>Array.from(a._zod.values)));return}),$(e._zod,"pattern",()=>{if(i.options.every((a)=>a._zod.pattern)){let a=i.options.map((t)=>t._zod.pattern);return new RegExp(`^(${a.map((t)=>Zt(t.source)).join("|")})$`)}return});let n=i.options.length===1?i.options[0]._zod.run:null;e._zod.parse=(a,t)=>{if(n)return n(a,t);let r=!1,o=[];for(let u of i.options){let l=u._zod.run({value:a.value,issues:[]},t);if(l instanceof Promise)o.push(l),r=!0;else{if(l.issues.length===0)return l;o.push(l)}}if(!r)return la(o,a,e,t);return Promise.all(o).then((u)=>{return la(u,a,e,t)})}});function ca(e,i,n,a){let t=e.filter((r)=>r.issues.length===0);if(t.length===1)return i.value=t[0].value,i;if(t.length===0)i.issues.push({code:"invalid_union",input:i.value,inst:n,errors:e.map((r)=>r.issues.map((o)=>G(o,a,R())))});else i.issues.push({code:"invalid_union",input:i.value,inst:n,errors:[],inclusive:!1});return i}var Ms=m("$ZodXor",(e,i)=>{Ft.init(e,i),i.inclusive=!1;let n=i.options.length===1?i.options[0]._zod.run:null;e._zod.parse=(a,t)=>{if(n)return n(a,t);let r=!1,o=[];for(let u of i.options){let l=u._zod.run({value:a.value,issues:[]},t);if(l instanceof Promise)o.push(l),r=!0;else o.push(l)}if(!r)return ca(o,a,e,t);return Promise.all(o).then((u)=>{return ca(u,a,e,t)})}}),Bs=m("$ZodDiscriminatedUnion",(e,i)=>{i.inclusive=!1,Ft.init(e,i);let n=e._zod.parse;$(e._zod,"propValues",()=>{let t={};for(let r of i.options){let o=r._zod.propValues;if(!o||Object.keys(o).length===0)throw Error(`Invalid discriminated union option at index "${i.options.indexOf(r)}"`);for(let[u,l]of Object.entries(o)){if(!t[u])t[u]=new Set;for(let c of l)t[u].add(c)}}return t});let a=et(()=>{let t=i.options,r=new Map;for(let o of t){let u=o._zod.propValues?.[i.discriminator];if(!u||u.size===0)throw Error(`Invalid discriminated union option at index "${i.options.indexOf(o)}"`);for(let l of u){if(r.has(l))throw Error(`Duplicate discriminator value "${String(l)}"`);r.set(l,o)}}return r});e._zod.parse=(t,r)=>{let o=t.value;if(!Ne(o))return t.issues.push({code:"invalid_type",expected:"object",input:o,inst:e}),t;let u=a.value.get(o?.[i.discriminator]);if(u)return u._zod.run(t,r);if(i.unionFallback||r.direction==="backward")return n(t,r);return t.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:i.discriminator,options:Array.from(a.value.keys()),input:o,path:[i.discriminator],inst:e}),t}}),Fs=m("$ZodIntersection",(e,i)=>{S.init(e,i),e._zod.parse=(n,a)=>{let t=n.value,r=i.left._zod.run({value:t,issues:[]},a),o=i.right._zod.run({value:t,issues:[]},a);if(r instanceof Promise||o instanceof Promise)return Promise.all([r,o]).then(([u,l])=>{return da(n,u,l)});return da(n,r,o)}});function Li(e,i){if(e===i)return{valid:!0,data:e};if(e instanceof Date&&i instanceof Date&&+e===+i)return{valid:!0,data:e};if(ve(e)&&ve(i)){let n=Object.keys(i),a=Object.keys(e).filter((r)=>n.indexOf(r)!==-1),t={...e,...i};for(let r of a){let o=Li(e[r],i[r]);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};t[r]=o.data}return{valid:!0,data:t}}if(Array.isArray(e)&&Array.isArray(i)){if(e.length!==i.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let a=0;a<e.length;a++){let t=e[a],r=i[a],o=Li(t,r);if(!o.valid)return{valid:!1,mergeErrorPath:[a,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function da(e,i,n){let a=new Map,t;for(let u of i.issues)if(u.code==="unrecognized_keys"){t??(t=u);for(let l of u.keys){if(!a.has(l))a.set(l,{});a.get(l).l=!0}}else e.issues.push(u);for(let u of n.issues)if(u.code==="unrecognized_keys")for(let l of u.keys){if(!a.has(l))a.set(l,{});a.get(l).r=!0}else e.issues.push(u);let r=[...a].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(r.length&&t)e.issues.push({...t,keys:r});if(he(e))return e;let o=Li(i.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var fn=m("$ZodTuple",(e,i)=>{S.init(e,i);let n=i.items;e._zod.parse=(a,t)=>{let r=a.value;if(!Array.isArray(r))return a.issues.push({input:r,inst:e,expected:"tuple",code:"invalid_type"}),a;a.value=[];let o=[],u=ma(n,"optin"),l=ma(n,"optout");if(!i.rest){if(r.length<u)return a.issues.push({code:"too_small",minimum:u,inclusive:!0,input:r,inst:e,origin:"array"}),a;if(r.length>n.length)a.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:r,inst:e,origin:"array"})}let c=Array(n.length);for(let d=0;d<n.length;d++){let f=n[d]._zod.run({value:r[d],issues:[]},t);if(f instanceof Promise)o.push(f.then((p)=>{c[d]=p}));else c[d]=f}if(i.rest){let d=n.length-1,f=r.slice(n.length);for(let p of f){d++;let y=i.rest._zod.run({value:p,issues:[]},t);if(y instanceof Promise)o.push(y.then((w)=>fa(w,a,d)));else fa(y,a,d)}}if(o.length)return Promise.all(o).then(()=>pa(c,a,n,r,l));return pa(c,a,n,r,l)}});function ma(e,i){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[i]!=="optional")return n+1;return 0}function fa(e,i,n){if(e.issues.length)i.issues.push(...H(n,e.issues));i.value[n]=e.value}function pa(e,i,n,a,t){for(let r=0;r<n.length;r++){let o=e[r],u=r<a.length;if(o.issues.length){if(!u&&r>=t){i.value.length=r;break}i.issues.push(...H(r,o.issues))}i.value[r]=o.value}for(let r=i.value.length-1;r>=a.length;r--)if(n[r]._zod.optout==="optional"&&i.value[r]===void 0)i.value.length=r;else break;return i}var Js=m("$ZodRecord",(e,i)=>{S.init(e,i),e._zod.parse=(n,a)=>{let t=n.value;if(!ve(t))return n.issues.push({expected:"record",code:"invalid_type",input:t,inst:e}),n;let r=[],o=i.keyType._zod.values;if(o){n.value={};let u=new Set;for(let c of o)if(typeof c==="string"||typeof c==="number"||typeof c==="symbol"){u.add(typeof c==="number"?c.toString():c);let d=i.keyType._zod.run({value:c,issues:[]},a);if(d instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(d.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map((y)=>G(y,a,R())),input:c,path:[c],inst:e});continue}let f=d.value,p=i.valueType._zod.run({value:t[c],issues:[]},a);if(p instanceof Promise)r.push(p.then((y)=>{if(y.issues.length)n.issues.push(...H(c,y.issues));n.value[f]=y.value}));else{if(p.issues.length)n.issues.push(...H(c,p.issues));n.value[f]=p.value}}let l;for(let c in t)if(!u.has(c))l=l??[],l.push(c);if(l&&l.length>0)n.issues.push({code:"unrecognized_keys",input:t,inst:e,keys:l})}else{n.value={};for(let u of Reflect.ownKeys(t)){if(u==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(t,u))continue;let l=i.keyType._zod.run({value:u,issues:[]},a);if(l instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof u==="string"&&an.test(u)&&l.issues.length){let d=i.keyType._zod.run({value:Number(u),issues:[]},a);if(d instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(d.issues.length===0)l=d}if(l.issues.length){if(i.mode==="loose")n.value[u]=t[u];else n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map((d)=>G(d,a,R())),input:u,path:[u],inst:e});continue}let c=i.valueType._zod.run({value:t[u],issues:[]},a);if(c instanceof Promise)r.push(c.then((d)=>{if(d.issues.length)n.issues.push(...H(u,d.issues));n.value[l.value]=d.value}));else{if(c.issues.length)n.issues.push(...H(u,c.issues));n.value[l.value]=c.value}}}if(r.length)return Promise.all(r).then(()=>n);return n}}),Gs=m("$ZodMap",(e,i)=>{S.init(e,i),e._zod.parse=(n,a)=>{let t=n.value;if(!(t instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:t,inst:e}),n;let r=[];n.value=new Map;for(let[o,u]of t){let l=i.keyType._zod.run({value:o,issues:[]},a),c=i.valueType._zod.run({value:u,issues:[]},a);if(l instanceof Promise||c instanceof Promise)r.push(Promise.all([l,c]).then(([d,f])=>{ga(d,f,n,o,t,e,a)}));else ga(l,c,n,o,t,e,a)}if(r.length)return Promise.all(r).then(()=>n);return n}});function ga(e,i,n,a,t,r,o){if(e.issues.length)if(zt.has(typeof a))n.issues.push(...H(a,e.issues));else n.issues.push({code:"invalid_key",origin:"map",input:t,inst:r,issues:e.issues.map((u)=>G(u,o,R()))});if(i.issues.length)if(zt.has(typeof a))n.issues.push(...H(a,i.issues));else n.issues.push({origin:"map",code:"invalid_element",input:t,inst:r,key:a,issues:i.issues.map((u)=>G(u,o,R()))});n.value.set(e.value,i.value)}var Ws=m("$ZodSet",(e,i)=>{S.init(e,i),e._zod.parse=(n,a)=>{let t=n.value;if(!(t instanceof Set))return n.issues.push({input:t,inst:e,expected:"set",code:"invalid_type"}),n;let r=[];n.value=new Set;for(let o of t){let u=i.valueType._zod.run({value:o,issues:[]},a);if(u instanceof Promise)r.push(u.then((l)=>ha(l,n)));else ha(u,n)}if(r.length)return Promise.all(r).then(()=>n);return n}});function ha(e,i){if(e.issues.length)i.issues.push(...e.issues);i.value.add(e.value)}var Vs=m("$ZodEnum",(e,i)=>{S.init(e,i);let n=Ji(i.entries),a=new Set(n);e._zod.values=a,e._zod.pattern=new RegExp(`^(${n.filter((t)=>zt.has(typeof t)).map((t)=>typeof t==="string"?re(t):t.toString()).join("|")})$`),e._zod.parse=(t,r)=>{let o=t.value;if(a.has(o))return t;return t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),qs=m("$ZodLiteral",(e,i)=>{if(S.init(e,i),i.values.length===0)throw Error("Cannot create literal schema with no valid values");let n=new Set(i.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${i.values.map((a)=>typeof a==="string"?re(a):a?re(a.toString()):String(a)).join("|")})$`),e._zod.parse=(a,t)=>{let r=a.value;if(n.has(r))return a;return a.issues.push({code:"invalid_value",values:i.values,input:r,inst:e}),a}}),Xs=m("$ZodFile",(e,i)=>{S.init(e,i),e._zod.parse=(n,a)=>{let t=n.value;if(t instanceof File)return n;return n.issues.push({expected:"file",code:"invalid_type",input:t,inst:e}),n}}),Hs=m("$ZodTransform",(e,i)=>{S.init(e,i),e._zod.optin="optional",e._zod.parse=(n,a)=>{if(a.direction==="backward")throw new Qe(e.constructor.name);let t=i.transform(n.value,n);if(a.async)return(t instanceof Promise?t:Promise.resolve(t)).then((r)=>{return n.value=r,n.fallback=!0,n});if(t instanceof Promise)throw new le;return n.value=t,n.fallback=!0,n}});function va(e,i){if(i===void 0&&(e.issues.length||e.fallback))return{issues:[],value:void 0};return e}var pn=m("$ZodOptional",(e,i)=>{S.init(e,i),e._zod.optin="optional",e._zod.optout="optional",$(e._zod,"values",()=>{return i.innerType._zod.values?new Set([...i.innerType._zod.values,void 0]):void 0}),$(e._zod,"pattern",()=>{let n=i.innerType._zod.pattern;return n?new RegExp(`^(${Zt(n.source)})?$`):void 0}),e._zod.parse=(n,a)=>{if(i.innerType._zod.optin==="optional"){let t=n.value,r=i.innerType._zod.run(n,a);if(r instanceof Promise)return r.then((o)=>va(o,t));return va(r,t)}if(n.value===void 0)return n;return i.innerType._zod.run(n,a)}}),Ks=m("$ZodExactOptional",(e,i)=>{pn.init(e,i),$(e._zod,"values",()=>i.innerType._zod.values),$(e._zod,"pattern",()=>i.innerType._zod.pattern),e._zod.parse=(n,a)=>{return i.innerType._zod.run(n,a)}}),Ys=m("$ZodNullable",(e,i)=>{S.init(e,i),$(e._zod,"optin",()=>i.innerType._zod.optin),$(e._zod,"optout",()=>i.innerType._zod.optout),$(e._zod,"pattern",()=>{let n=i.innerType._zod.pattern;return n?new RegExp(`^(${Zt(n.source)}|null)$`):void 0}),$(e._zod,"values",()=>{return i.innerType._zod.values?new Set([...i.innerType._zod.values,null]):void 0}),e._zod.parse=(n,a)=>{if(n.value===null)return n;return i.innerType._zod.run(n,a)}}),Qs=m("$ZodDefault",(e,i)=>{S.init(e,i),e._zod.optin="optional",$(e._zod,"values",()=>i.innerType._zod.values),e._zod.parse=(n,a)=>{if(a.direction==="backward")return i.innerType._zod.run(n,a);if(n.value===void 0)return n.value=i.defaultValue,n;let t=i.innerType._zod.run(n,a);if(t instanceof Promise)return t.then((r)=>ya(r,i));return ya(t,i)}});function ya(e,i){if(e.value===void 0)e.value=i.defaultValue;return e}var eu=m("$ZodPrefault",(e,i)=>{S.init(e,i),e._zod.optin="optional",$(e._zod,"values",()=>i.innerType._zod.values),e._zod.parse=(n,a)=>{if(a.direction==="backward")return i.innerType._zod.run(n,a);if(n.value===void 0)n.value=i.defaultValue;return i.innerType._zod.run(n,a)}}),tu=m("$ZodNonOptional",(e,i)=>{S.init(e,i),$(e._zod,"values",()=>{let n=i.innerType._zod.values;return n?new Set([...n].filter((a)=>a!==void 0)):void 0}),e._zod.parse=(n,a)=>{let t=i.innerType._zod.run(n,a);if(t instanceof Promise)return t.then((r)=>ba(r,e));return ba(t,e)}});function ba(e,i){if(!e.issues.length&&e.value===void 0)e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:i});return e}var iu=m("$ZodSuccess",(e,i)=>{S.init(e,i),e._zod.parse=(n,a)=>{if(a.direction==="backward")throw new Qe("ZodSuccess");let t=i.innerType._zod.run(n,a);if(t instanceof Promise)return t.then((r)=>{return n.value=r.issues.length===0,n});return n.value=t.issues.length===0,n}}),nu=m("$ZodCatch",(e,i)=>{S.init(e,i),e._zod.optin="optional",$(e._zod,"optout",()=>i.innerType._zod.optout),$(e._zod,"values",()=>i.innerType._zod.values),e._zod.parse=(n,a)=>{if(a.direction==="backward")return i.innerType._zod.run(n,a);let t=i.innerType._zod.run(n,a);if(t instanceof Promise)return t.then((r)=>{if(n.value=r.value,r.issues.length)n.value=i.catchValue({...n,error:{issues:r.issues.map((o)=>G(o,a,R()))},input:n.value}),n.issues=[],n.fallback=!0;return n});if(n.value=t.value,t.issues.length)n.value=i.catchValue({...n,error:{issues:t.issues.map((r)=>G(r,a,R()))},input:n.value}),n.issues=[],n.fallback=!0;return n}}),ru=m("$ZodNaN",(e,i)=>{S.init(e,i),e._zod.parse=(n,a)=>{if(typeof n.value!=="number"||!Number.isNaN(n.value))return n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n;return n}}),gn=m("$ZodPipe",(e,i)=>{S.init(e,i),$(e._zod,"values",()=>i.in._zod.values),$(e._zod,"optin",()=>i.in._zod.optin),$(e._zod,"optout",()=>i.out._zod.optout),$(e._zod,"propValues",()=>i.in._zod.propValues),e._zod.parse=(n,a)=>{if(a.direction==="backward"){let r=i.out._zod.run(n,a);if(r instanceof Promise)return r.then((o)=>Tt(o,i.in,a));return Tt(r,i.in,a)}let t=i.in._zod.run(n,a);if(t instanceof Promise)return t.then((r)=>Tt(r,i.out,a));return Tt(t,i.out,a)}});function Tt(e,i,n){if(e.issues.length)return e.aborted=!0,e;return i._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var hn=m("$ZodCodec",(e,i)=>{S.init(e,i),$(e._zod,"values",()=>i.in._zod.values),$(e._zod,"optin",()=>i.in._zod.optin),$(e._zod,"optout",()=>i.out._zod.optout),$(e._zod,"propValues",()=>i.in._zod.propValues),e._zod.parse=(n,a)=>{if((a.direction||"forward")==="forward"){let t=i.in._zod.run(n,a);if(t instanceof Promise)return t.then((r)=>Ot(r,i,a));return Ot(t,i,a)}else{let t=i.out._zod.run(n,a);if(t instanceof Promise)return t.then((r)=>Ot(r,i,a));return Ot(t,i,a)}}});function Ot(e,i,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let a=i.transform(e.value,e);if(a instanceof Promise)return a.then((t)=>Nt(e,t,i.out,n));return Nt(e,a,i.out,n)}else{let a=i.reverseTransform(e.value,e);if(a instanceof Promise)return a.then((t)=>Nt(e,t,i.in,n));return Nt(e,a,i.in,n)}}function Nt(e,i,n,a){if(e.issues.length)return e.aborted=!0,e;return n._zod.run({value:i,issues:e.issues},a)}var au=m("$ZodPreprocess",(e,i)=>{gn.init(e,i)}),ou=m("$ZodReadonly",(e,i)=>{S.init(e,i),$(e._zod,"propValues",()=>i.innerType._zod.propValues),$(e._zod,"values",()=>i.innerType._zod.values),$(e._zod,"optin",()=>i.innerType?._zod?.optin),$(e._zod,"optout",()=>i.innerType?._zod?.optout),e._zod.parse=(n,a)=>{if(a.direction==="backward")return i.innerType._zod.run(n,a);let t=i.innerType._zod.run(n,a);if(t instanceof Promise)return t.then(_a);return _a(t)}});function _a(e){return e.value=Object.freeze(e.value),e}var su=m("$ZodTemplateLiteral",(e,i)=>{S.init(e,i);let n=[];for(let a of i.parts)if(typeof a==="object"&&a!==null){if(!a._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...a._zod.traits].shift()}`);let t=a._zod.pattern instanceof RegExp?a._zod.pattern.source:a._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${a._zod.traits}`);let r=t.startsWith("^")?1:0,o=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(r,o))}else if(a===null||Za.has(typeof a))n.push(re(`${a}`));else throw Error(`Invalid template literal part: ${a}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(a,t)=>{if(typeof a.value!=="string")return a.issues.push({input:a.value,inst:e,expected:"string",code:"invalid_type"}),a;if(e._zod.pattern.lastIndex=0,!e._zod.pattern.test(a.value))return a.issues.push({input:a.value,inst:e,code:"invalid_format",format:i.format??"template_literal",pattern:e._zod.pattern.source}),a;return a}}),uu=m("$ZodFunction",(e,i)=>{return S.init(e,i),e._def=i,e._zod.def=i,e.implement=(n)=>{if(typeof n!=="function")throw Error("implement() must be called with a function");return function(...a){let t=e._def.input?Ri(e._def.input,a):a,r=Reflect.apply(n,this,t);if(e._def.output)return Ri(e._def.output,r);return r}},e.implementAsync=(n)=>{if(typeof n!=="function")throw Error("implementAsync() must be called with a function");return async function(...a){let t=e._def.input?await Ci(e._def.input,a):a,r=await Reflect.apply(n,this,t);if(e._def.output)return await Ci(e._def.output,r);return r}},e._zod.parse=(n,a)=>{if(typeof n.value!=="function")return n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n;if(e._def.output&&e._def.output._zod.def.type==="promise")n.value=e.implementAsync(n.value);else n.value=e.implement(n.value);return n},e.input=(...n)=>{let a=e.constructor;if(Array.isArray(n[0]))return new a({type:"function",input:new fn({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output});return new a({type:"function",input:n[0],output:e._def.output})},e.output=(n)=>{return new e.constructor({type:"function",input:e._def.input,output:n})},e}),lu=m("$ZodPromise",(e,i)=>{S.init(e,i),e._zod.parse=(n,a)=>{return Promise.resolve(n.value).then((t)=>i.innerType._zod.run({value:t,issues:[]},a))}}),cu=m("$ZodLazy",(e,i)=>{S.init(e,i),$(e._zod,"innerType",()=>{let n=i;if(!n._cachedInner)n._cachedInner=i.getter();return n._cachedInner}),$(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),$(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),$(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),$(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,a)=>{return e._zod.innerType._zod.run(n,a)}}),du=m("$ZodCustom",(e,i)=>{D.init(e,i),S.init(e,i),e._zod.parse=(n,a)=>{return n},e._zod.check=(n)=>{let a=n.value,t=i.fn(a);if(t instanceof Promise)return t.then((r)=>ka(r,n,a,e));ka(t,n,a,e);return}});function ka(e,i,n,a){if(!e){let t={code:"custom",input:n,inst:a,path:[...a._zod.def.path??[]],continue:!a._zod.def.abort};if(a._zod.def.params)t.params=a._zod.def.params;i.issues.push(At(t))}}var vn={};ae(vn,{zhTW:()=>ug,zhCN:()=>og,yo:()=>cg,vi:()=>rg,uz:()=>ig,ur:()=>eg,uk:()=>pu,ua:()=>Yp,tr:()=>Hp,th:()=>qp,ta:()=>Wp,sv:()=>Jp,sl:()=>Bp,ru:()=>Zp,ro:()=>Cp,pt:()=>jp,ps:()=>zp,pl:()=>Pp,ota:()=>Np,no:()=>Tp,nl:()=>Ep,ms:()=>Sp,mk:()=>Ip,lt:()=>_p,ko:()=>yp,km:()=>fu,kh:()=>hp,ka:()=>pp,ja:()=>mp,it:()=>cp,is:()=>up,id:()=>op,hy:()=>rp,hu:()=>ip,hr:()=>ep,he:()=>Yf,frCA:()=>Hf,fr:()=>qf,fi:()=>Wf,fa:()=>Jf,es:()=>Bf,eo:()=>Zf,en:()=>mu,el:()=>Rf,de:()=>Df,da:()=>Af,cs:()=>Uf,ca:()=>Of,bg:()=>$f,be:()=>xf,az:()=>wf,ar:()=>kf});var _f=()=>{let e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function i(t){return e[t]??null}let n={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},a={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${t.expected}، ولكن تم إدخال ${u}`;return`مدخلات غير مقبولة: يفترض إدخال ${r}، ولكن تم إدخال ${u}`}case"invalid_value":if(t.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${_(t.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return` أكبر من اللازم: يفترض أن تكون ${t.origin??"القيمة"} ${r} ${t.maximum.toString()} ${o.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${t.origin??"القيمة"} ${r} ${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`أصغر من اللازم: يفترض لـ ${t.origin} أن يكون ${r} ${t.minimum.toString()} ${o.unit}`;return`أصغر من اللازم: يفترض لـ ${t.origin} أن يكون ${r} ${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${t.prefix}"`;if(r.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${r.suffix}"`;if(r.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${r.includes}"`;if(r.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${r.pattern}`;return`${n[r.format]??t.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${t.divisor}`;case"unrecognized_keys":return`معرف${t.keys.length>1?"ات":""} غريب${t.keys.length>1?"ة":""}: ${g(t.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${t.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${t.origin}`;default:return"مدخل غير مقبول"}}};function kf(){return{localeError:_f()}}var If=()=>{let e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function i(t){return e[t]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},a={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Yanlış dəyər: gözlənilən instanceof ${t.expected}, daxil olan ${u}`;return`Yanlış dəyər: gözlənilən ${r}, daxil olan ${u}`}case"invalid_value":if(t.values.length===1)return`Yanlış dəyər: gözlənilən ${_(t.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Çox böyük: gözlənilən ${t.origin??"dəyər"} ${r}${t.maximum.toString()} ${o.unit??"element"}`;return`Çox böyük: gözlənilən ${t.origin??"dəyər"} ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Çox kiçik: gözlənilən ${t.origin} ${r}${t.minimum.toString()} ${o.unit}`;return`Çox kiçik: gözlənilən ${t.origin} ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Yanlış mətn: "${r.prefix}" ilə başlamalıdır`;if(r.format==="ends_with")return`Yanlış mətn: "${r.suffix}" ilə bitməlidir`;if(r.format==="includes")return`Yanlış mətn: "${r.includes}" daxil olmalıdır`;if(r.format==="regex")return`Yanlış mətn: ${r.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${n[r.format]??t.format}`}case"not_multiple_of":return`Yanlış ədəd: ${t.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${t.keys.length>1?"lar":""}: ${g(t.keys,", ")}`;case"invalid_key":return`${t.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${t.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function wf(){return{localeError:If()}}function Ia(e,i,n,a){let t=Math.abs(e),r=t%10,o=t%100;if(o>=11&&o<=19)return a;if(r===1)return i;if(r>=2&&r<=4)return n;return a}var Sf=()=>{let e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function i(t){return e[t]??null}let n={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},a={nan:"NaN",number:"лік",array:"масіў"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Няправільны ўвод: чакаўся instanceof ${t.expected}, атрымана ${u}`;return`Няправільны ўвод: чакаўся ${r}, атрымана ${u}`}case"invalid_value":if(t.values.length===1)return`Няправільны ўвод: чакалася ${_(t.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o){let u=Number(t.maximum),l=Ia(u,o.unit.one,o.unit.few,o.unit.many);return`Занадта вялікі: чакалася, што ${t.origin??"значэнне"} павінна ${o.verb} ${r}${t.maximum.toString()} ${l}`}return`Занадта вялікі: чакалася, што ${t.origin??"значэнне"} павінна быць ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o){let u=Number(t.minimum),l=Ia(u,o.unit.one,o.unit.few,o.unit.many);return`Занадта малы: чакалася, што ${t.origin} павінна ${o.verb} ${r}${t.minimum.toString()} ${l}`}return`Занадта малы: чакалася, што ${t.origin} павінна быць ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${r.prefix}"`;if(r.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${r.suffix}"`;if(r.format==="includes")return`Няправільны радок: павінен змяшчаць "${r.includes}"`;if(r.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${r.pattern}`;return`Няправільны ${n[r.format]??t.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${t.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${t.keys.length>1?"ключы":"ключ"}: ${g(t.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${t.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${t.origin}`;default:return"Няправільны ўвод"}}};function xf(){return{localeError:Sf()}}var Ef=()=>{let e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function i(t){return e[t]??null}let n={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},a={nan:"NaN",number:"число",array:"масив"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Невалиден вход: очакван instanceof ${t.expected}, получен ${u}`;return`Невалиден вход: очакван ${r}, получен ${u}`}case"invalid_value":if(t.values.length===1)return`Невалиден вход: очакван ${_(t.values[0])}`;return`Невалидна опция: очаквано едно от ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Твърде голямо: очаква се ${t.origin??"стойност"} да съдържа ${r}${t.maximum.toString()} ${o.unit??"елемента"}`;return`Твърде голямо: очаква се ${t.origin??"стойност"} да бъде ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Твърде малко: очаква се ${t.origin} да съдържа ${r}${t.minimum.toString()} ${o.unit}`;return`Твърде малко: очаква се ${t.origin} да бъде ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Невалиден низ: трябва да започва с "${r.prefix}"`;if(r.format==="ends_with")return`Невалиден низ: трябва да завършва с "${r.suffix}"`;if(r.format==="includes")return`Невалиден низ: трябва да включва "${r.includes}"`;if(r.format==="regex")return`Невалиден низ: трябва да съвпада с ${r.pattern}`;let o="Невалиден";if(r.format==="emoji")o="Невалидно";if(r.format==="datetime")o="Невалидно";if(r.format==="date")o="Невалидна";if(r.format==="time")o="Невалидно";if(r.format==="duration")o="Невалидна";return`${o} ${n[r.format]??t.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${t.divisor}`;case"unrecognized_keys":return`Неразпознат${t.keys.length>1?"и":""} ключ${t.keys.length>1?"ове":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${t.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${t.origin}`;default:return"Невалиден вход"}}};function $f(){return{localeError:Ef()}}var Tf=()=>{let e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function i(t){return e[t]??null}let n={regex:"entrada",email:"adreça electrònica",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ça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},a={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Tipus invàlid: s'esperava instanceof ${t.expected}, s'ha rebut ${u}`;return`Tipus invàlid: s'esperava ${r}, s'ha rebut ${u}`}case"invalid_value":if(t.values.length===1)return`Valor invàlid: s'esperava ${_(t.values[0])}`;return`Opció invàlida: s'esperava una de ${g(t.values," o ")}`;case"too_big":{let r=t.inclusive?"com a màxim":"menys de",o=i(t.origin);if(o)return`Massa gran: s'esperava que ${t.origin??"el valor"} contingués ${r} ${t.maximum.toString()} ${o.unit??"elements"}`;return`Massa gran: s'esperava que ${t.origin??"el valor"} fos ${r} ${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?"com a mínim":"més de",o=i(t.origin);if(o)return`Massa petit: s'esperava que ${t.origin} contingués ${r} ${t.minimum.toString()} ${o.unit}`;return`Massa petit: s'esperava que ${t.origin} fos ${r} ${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Format invàlid: ha de començar amb "${r.prefix}"`;if(r.format==="ends_with")return`Format invàlid: ha d'acabar amb "${r.suffix}"`;if(r.format==="includes")return`Format invàlid: ha d'incloure "${r.includes}"`;if(r.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${r.pattern}`;return`Format invàlid per a ${n[r.format]??t.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${t.divisor}`;case"unrecognized_keys":return`Clau${t.keys.length>1?"s":""} no reconeguda${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${t.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${t.origin}`;default:return"Entrada invàlida"}}};function Of(){return{localeError:Tf()}}var Nf=()=>{let e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function i(t){return e[t]??null}let n={regex:"regulární výraz",email:"e-mailová 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 čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},a={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Neplatný vstup: očekáváno instanceof ${t.expected}, obdrženo ${u}`;return`Neplatný vstup: očekáváno ${r}, obdrženo ${u}`}case"invalid_value":if(t.values.length===1)return`Neplatný vstup: očekáváno ${_(t.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Hodnota je příliš velká: ${t.origin??"hodnota"} musí mít ${r}${t.maximum.toString()} ${o.unit??"prvků"}`;return`Hodnota je příliš velká: ${t.origin??"hodnota"} musí být ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Hodnota je příliš malá: ${t.origin??"hodnota"} musí mít ${r}${t.minimum.toString()} ${o.unit??"prvků"}`;return`Hodnota je příliš malá: ${t.origin??"hodnota"} musí být ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Neplatný řetězec: musí začínat na "${r.prefix}"`;if(r.format==="ends_with")return`Neplatný řetězec: musí končit na "${r.suffix}"`;if(r.format==="includes")return`Neplatný řetězec: musí obsahovat "${r.includes}"`;if(r.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${r.pattern}`;return`Neplatný formát ${n[r.format]??t.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${t.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${g(t.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${t.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${t.origin}`;default:return"Neplatný vstup"}}};function Uf(){return{localeError:Nf()}}var zf=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function i(t){return e[t]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",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"},a={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Ugyldigt input: forventede instanceof ${t.expected}, fik ${u}`;return`Ugyldigt input: forventede ${r}, fik ${u}`}case"invalid_value":if(t.values.length===1)return`Ugyldig værdi: forventede ${_(t.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin),u=a[t.origin]??t.origin;if(o)return`For stor: forventede ${u??"value"} ${o.verb} ${r} ${t.maximum.toString()} ${o.unit??"elementer"}`;return`For stor: forventede ${u??"value"} havde ${r} ${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin),u=a[t.origin]??t.origin;if(o)return`For lille: forventede ${u} ${o.verb} ${r} ${t.minimum.toString()} ${o.unit}`;return`For lille: forventede ${u} havde ${r} ${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Ugyldig streng: skal starte med "${r.prefix}"`;if(r.format==="ends_with")return`Ugyldig streng: skal ende med "${r.suffix}"`;if(r.format==="includes")return`Ugyldig streng: skal indeholde "${r.includes}"`;if(r.format==="regex")return`Ugyldig streng: skal matche mønsteret ${r.pattern}`;return`Ugyldig ${n[r.format]??t.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${g(t.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${t.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${t.origin}`;default:return"Ugyldigt input"}}};function Af(){return{localeError:zf()}}var Pf=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function i(t){return e[t]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},a={nan:"NaN",number:"Zahl",array:"Array"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Ungültige Eingabe: erwartet instanceof ${t.expected}, erhalten ${u}`;return`Ungültige Eingabe: erwartet ${r}, erhalten ${u}`}case"invalid_value":if(t.values.length===1)return`Ungültige Eingabe: erwartet ${_(t.values[0])}`;return`Ungültige Option: erwartet eine von ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Zu groß: erwartet, dass ${t.origin??"Wert"} ${r}${t.maximum.toString()} ${o.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${t.origin??"Wert"} ${r}${t.maximum.toString()} ist`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Zu klein: erwartet, dass ${t.origin} ${r}${t.minimum.toString()} ${o.unit} hat`;return`Zu klein: erwartet, dass ${t.origin} ${r}${t.minimum.toString()} ist`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Ungültiger String: muss mit "${r.prefix}" beginnen`;if(r.format==="ends_with")return`Ungültiger String: muss mit "${r.suffix}" enden`;if(r.format==="includes")return`Ungültiger String: muss "${r.includes}" enthalten`;if(r.format==="regex")return`Ungültiger String: muss dem Muster ${r.pattern} entsprechen`;return`Ungültig: ${n[r.format]??t.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${t.divisor} sein`;case"unrecognized_keys":return`${t.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${g(t.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${t.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${t.origin}`;default:return"Ungültige Eingabe"}}};function Df(){return{localeError:Pf()}}var jf=()=>{let e={string:{unit:"χαρακτήρες",verb:"να έχει"},file:{unit:"bytes",verb:"να έχει"},array:{unit:"στοιχεία",verb:"να έχει"},set:{unit:"στοιχεία",verb:"να έχει"},map:{unit:"καταχωρήσεις",verb:"να έχει"}};function i(t){return e[t]??null}let n={regex:"είσοδος",email:"διεύθυνση email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ημερομηνία και ώρα",date:"ISO ημερομηνία",time:"ISO ώρα",duration:"ISO διάρκεια",ipv4:"διεύθυνση IPv4",ipv6:"διεύθυνση IPv6",mac:"διεύθυνση MAC",cidrv4:"εύρος IPv4",cidrv6:"εύρος IPv6",base64:"συμβολοσειρά κωδικοποιημένη σε base64",base64url:"συμβολοσειρά κωδικοποιημένη σε base64url",json_string:"συμβολοσειρά JSON",e164:"αριθμός E.164",jwt:"JWT",template_literal:"είσοδος"},a={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(typeof t.expected==="string"&&/^[A-Z]/.test(t.expected))return`Μη έγκυρη είσοδος: αναμενόταν instanceof ${t.expected}, λήφθηκε ${u}`;return`Μη έγκυρη είσοδος: αναμενόταν ${r}, λήφθηκε ${u}`}case"invalid_value":if(t.values.length===1)return`Μη έγκυρη είσοδος: αναμενόταν ${_(t.values[0])}`;return`Μη έγκυρη επιλογή: αναμενόταν ένα από ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Πολύ μεγάλο: αναμενόταν ${t.origin??"τιμή"} να έχει ${r}${t.maximum.toString()} ${o.unit??"στοιχεία"}`;return`Πολύ μεγάλο: αναμενόταν ${t.origin??"τιμή"} να είναι ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Πολύ μικρό: αναμενόταν ${t.origin} να έχει ${r}${t.minimum.toString()} ${o.unit}`;return`Πολύ μικρό: αναμενόταν ${t.origin} να είναι ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${r.prefix}"`;if(r.format==="ends_with")return`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${r.suffix}"`;if(r.format==="includes")return`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${r.includes}"`;if(r.format==="regex")return`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${r.pattern}`;return`Μη έγκυρο: ${n[r.format]??t.format}`}case"not_multiple_of":return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${t.divisor}`;case"unrecognized_keys":return`Άγνωστ${t.keys.length>1?"α":"ο"} κλειδ${t.keys.length>1?"ιά":"ί"}: ${g(t.keys,", ")}`;case"invalid_key":return`Μη έγκυρο κλειδί στο ${t.origin}`;case"invalid_union":return"Μη έγκυρη είσοδος";case"invalid_element":return`Μη έγκυρη τιμή στο ${t.origin}`;default:return"Μη έγκυρη είσοδος"}}};function Rf(){return{localeError:jf()}}var Cf=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function i(t){return e[t]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},a={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;return`Invalid input: expected ${r}, received ${u}`}case"invalid_value":if(t.values.length===1)return`Invalid input: expected ${_(t.values[0])}`;return`Invalid option: expected one of ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Too big: expected ${t.origin??"value"} to have ${r}${t.maximum.toString()} ${o.unit??"elements"}`;return`Too big: expected ${t.origin??"value"} to be ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Too small: expected ${t.origin} to have ${r}${t.minimum.toString()} ${o.unit}`;return`Too small: expected ${t.origin} to be ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Invalid string: must start with "${r.prefix}"`;if(r.format==="ends_with")return`Invalid string: must end with "${r.suffix}"`;if(r.format==="includes")return`Invalid string: must include "${r.includes}"`;if(r.format==="regex")return`Invalid string: must match pattern ${r.pattern}`;return`Invalid ${n[r.format]??t.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${t.divisor}`;case"unrecognized_keys":return`Unrecognized key${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Invalid key in ${t.origin}`;case"invalid_union":if(t.options&&Array.isArray(t.options)&&t.options.length>0)return`Invalid discriminator value. Expected ${t.options.map((r)=>`'${r}'`).join(" | ")}`;return"Invalid input";case"invalid_element":return`Invalid value in ${t.origin}`;default:return"Invalid input"}}};function mu(){return{localeError:Cf()}}var Lf=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function i(t){return e[t]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",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ŭro",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"},a={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Nevalida enigo: atendiĝis instanceof ${t.expected}, riceviĝis ${u}`;return`Nevalida enigo: atendiĝis ${r}, riceviĝis ${u}`}case"invalid_value":if(t.values.length===1)return`Nevalida enigo: atendiĝis ${_(t.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Tro granda: atendiĝis ke ${t.origin??"valoro"} havu ${r}${t.maximum.toString()} ${o.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${t.origin??"valoro"} havu ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Tro malgranda: atendiĝis ke ${t.origin} havu ${r}${t.minimum.toString()} ${o.unit}`;return`Tro malgranda: atendiĝis ke ${t.origin} estu ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${r.prefix}"`;if(r.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${r.suffix}"`;if(r.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${r.includes}"`;if(r.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${r.pattern}`;return`Nevalida ${n[r.format]??t.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${t.divisor}`;case"unrecognized_keys":return`Nekonata${t.keys.length>1?"j":""} ŝlosilo${t.keys.length>1?"j":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${t.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${t.origin}`;default:return"Nevalida enigo"}}};function Zf(){return{localeError:Lf()}}var Mf=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function i(t){return e[t]??null}let n={regex:"entrada",email:"dirección de correo electrónico",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ón ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},a={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Entrada inválida: se esperaba instanceof ${t.expected}, recibido ${u}`;return`Entrada inválida: se esperaba ${r}, recibido ${u}`}case"invalid_value":if(t.values.length===1)return`Entrada inválida: se esperaba ${_(t.values[0])}`;return`Opción inválida: se esperaba una de ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin),u=a[t.origin]??t.origin;if(o)return`Demasiado grande: se esperaba que ${u??"valor"} tuviera ${r}${t.maximum.toString()} ${o.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${u??"valor"} fuera ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin),u=a[t.origin]??t.origin;if(o)return`Demasiado pequeño: se esperaba que ${u} tuviera ${r}${t.minimum.toString()} ${o.unit}`;return`Demasiado pequeño: se esperaba que ${u} fuera ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Cadena inválida: debe comenzar con "${r.prefix}"`;if(r.format==="ends_with")return`Cadena inválida: debe terminar en "${r.suffix}"`;if(r.format==="includes")return`Cadena inválida: debe incluir "${r.includes}"`;if(r.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${r.pattern}`;return`Inválido ${n[r.format]??t.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${t.divisor}`;case"unrecognized_keys":return`Llave${t.keys.length>1?"s":""} desconocida${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Llave inválida en ${a[t.origin]??t.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${a[t.origin]??t.origin}`;default:return"Entrada inválida"}}};function Bf(){return{localeError:Mf()}}var Ff=()=>{let e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function i(t){return e[t]??null}let n={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},a={nan:"NaN",number:"عدد",array:"آرایه"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`ورودی نامعتبر: می‌بایست instanceof ${t.expected} می‌بود، ${u} دریافت شد`;return`ورودی نامعتبر: می‌بایست ${r} می‌بود، ${u} دریافت شد`}case"invalid_value":if(t.values.length===1)return`ورودی نامعتبر: می‌بایست ${_(t.values[0])} می‌بود`;return`گزینه نامعتبر: می‌بایست یکی از ${g(t.values,"|")} می‌بود`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`خیلی بزرگ: ${t.origin??"مقدار"} باید ${r}${t.maximum.toString()} ${o.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${t.origin??"مقدار"} باید ${r}${t.maximum.toString()} باشد`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`خیلی کوچک: ${t.origin} باید ${r}${t.minimum.toString()} ${o.unit} باشد`;return`خیلی کوچک: ${t.origin} باید ${r}${t.minimum.toString()} باشد`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`رشته نامعتبر: باید با "${r.prefix}" شروع شود`;if(r.format==="ends_with")return`رشته نامعتبر: باید با "${r.suffix}" تمام شود`;if(r.format==="includes")return`رشته نامعتبر: باید شامل "${r.includes}" باشد`;if(r.format==="regex")return`رشته نامعتبر: باید با الگوی ${r.pattern} مطابقت داشته باشد`;return`${n[r.format]??t.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${t.divisor} باشد`;case"unrecognized_keys":return`کلید${t.keys.length>1?"های":""} ناشناس: ${g(t.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${t.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${t.origin}`;default:return"ورودی نامعتبر"}}};function Jf(){return{localeError:Ff()}}var Gf=()=>{let e={string:{unit:"merkkiä",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äivämäärän"}};function i(t){return e[t]??null}let n={regex:"säännöllinen lauseke",email:"sähköpostiosoite",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äivämäärä",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"},a={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Virheellinen tyyppi: odotettiin instanceof ${t.expected}, oli ${u}`;return`Virheellinen tyyppi: odotettiin ${r}, oli ${u}`}case"invalid_value":if(t.values.length===1)return`Virheellinen syöte: täytyy olla ${_(t.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Liian suuri: ${o.subject} täytyy olla ${r}${t.maximum.toString()} ${o.unit}`.trim();return`Liian suuri: arvon täytyy olla ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Liian pieni: ${o.subject} täytyy olla ${r}${t.minimum.toString()} ${o.unit}`.trim();return`Liian pieni: arvon täytyy olla ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${r.prefix}"`;if(r.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${r.suffix}"`;if(r.format==="includes")return`Virheellinen syöte: täytyy sisältää "${r.includes}"`;if(r.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${r.pattern}`;return`Virheellinen ${n[r.format]??t.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${t.divisor} monikerta`;case"unrecognized_keys":return`${t.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${g(t.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function Wf(){return{localeError:Gf()}}var Vf=()=>{let e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function i(t){return e[t]??null}let n={regex:"entrée",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ée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},a={string:"chaîne",number:"nombre",int:"entier",boolean:"booléen",bigint:"grand entier",symbol:"symbole",undefined:"indéfini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Entrée invalide : instanceof ${t.expected} attendu, ${u} reçu`;return`Entrée invalide : ${r} attendu, ${u} reçu`}case"invalid_value":if(t.values.length===1)return`Entrée invalide : ${_(t.values[0])} attendu`;return`Option invalide : une valeur parmi ${g(t.values,"|")} attendue`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Trop grand : ${a[t.origin]??"valeur"} doit ${o.verb} ${r}${t.maximum.toString()} ${o.unit??"élément(s)"}`;return`Trop grand : ${a[t.origin]??"valeur"} doit être ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Trop petit : ${a[t.origin]??"valeur"} doit ${o.verb} ${r}${t.minimum.toString()} ${o.unit}`;return`Trop petit : ${a[t.origin]??"valeur"} doit être ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Chaîne invalide : doit commencer par "${r.prefix}"`;if(r.format==="ends_with")return`Chaîne invalide : doit se terminer par "${r.suffix}"`;if(r.format==="includes")return`Chaîne invalide : doit inclure "${r.includes}"`;if(r.format==="regex")return`Chaîne invalide : doit correspondre au modèle ${r.pattern}`;return`${n[r.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${t.divisor}`;case"unrecognized_keys":return`Clé${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${g(t.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${t.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entrée invalide"}}};function qf(){return{localeError:Vf()}}var Xf=()=>{let e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function i(t){return e[t]??null}let n={regex:"entrée",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ée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},a={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Entrée invalide : attendu instanceof ${t.expected}, reçu ${u}`;return`Entrée invalide : attendu ${r}, reçu ${u}`}case"invalid_value":if(t.values.length===1)return`Entrée invalide : attendu ${_(t.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"≤":"<",o=i(t.origin);if(o)return`Trop grand : attendu que ${t.origin??"la valeur"} ait ${r}${t.maximum.toString()} ${o.unit}`;return`Trop grand : attendu que ${t.origin??"la valeur"} soit ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?"≥":">",o=i(t.origin);if(o)return`Trop petit : attendu que ${t.origin} ait ${r}${t.minimum.toString()} ${o.unit}`;return`Trop petit : attendu que ${t.origin} soit ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Chaîne invalide : doit commencer par "${r.prefix}"`;if(r.format==="ends_with")return`Chaîne invalide : doit se terminer par "${r.suffix}"`;if(r.format==="includes")return`Chaîne invalide : doit inclure "${r.includes}"`;if(r.format==="regex")return`Chaîne invalide : doit correspondre au motif ${r.pattern}`;return`${n[r.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${t.divisor}`;case"unrecognized_keys":return`Clé${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${g(t.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${t.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entrée invalide"}}};function Hf(){return{localeError:Xf()}}var Kf=()=>{let e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},i={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},n=(c)=>c?e[c]:void 0,a=(c)=>{let d=n(c);if(d)return d.label;return c??e.unknown.label},t=(c)=>`ה${a(c)}`,r=(c)=>{return(n(c)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות"},o=(c)=>{if(!c)return null;return i[c]??null},u={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",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:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},l={nan:"NaN"};return(c)=>{switch(c.code){case"invalid_type":{let d=c.expected,f=l[d??""]??a(d),p=k(c.input),y=l[p]??e[p]?.label??p;if(/^[A-Z]/.test(c.expected))return`קלט לא תקין: צריך להיות instanceof ${c.expected}, התקבל ${y}`;return`קלט לא תקין: צריך להיות ${f}, התקבל ${y}`}case"invalid_value":{if(c.values.length===1)return`ערך לא תקין: הערך חייב להיות ${_(c.values[0])}`;let d=c.values.map((p)=>_(p));if(c.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${d[0]} או ${d[1]}`;let f=d[d.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${d.slice(0,-1).join(", ")} או ${f}`}case"too_big":{let d=o(c.origin),f=t(c.origin??"value");if(c.origin==="string")return`${d?.longLabel??"ארוך"} מדי: ${f} צריכה להכיל ${c.maximum.toString()} ${d?.unit??""} ${c.inclusive?"או פחות":"לכל היותר"}`.trim();if(c.origin==="number"){let w=c.inclusive?`קטן או שווה ל-${c.maximum}`:`קטן מ-${c.maximum}`;return`גדול מדי: ${f} צריך להיות ${w}`}if(c.origin==="array"||c.origin==="set"){let w=c.origin==="set"?"צריכה":"צריך",O=c.inclusive?`${c.maximum} ${d?.unit??""} או פחות`:`פחות מ-${c.maximum} ${d?.unit??""}`;return`גדול מדי: ${f} ${w} להכיל ${O}`.trim()}let p=c.inclusive?"<=":"<",y=r(c.origin??"value");if(d?.unit)return`${d.longLabel} מדי: ${f} ${y} ${p}${c.maximum.toString()} ${d.unit}`;return`${d?.longLabel??"גדול"} מדי: ${f} ${y} ${p}${c.maximum.toString()}`}case"too_small":{let d=o(c.origin),f=t(c.origin??"value");if(c.origin==="string")return`${d?.shortLabel??"קצר"} מדי: ${f} צריכה להכיל ${c.minimum.toString()} ${d?.unit??""} ${c.inclusive?"או יותר":"לפחות"}`.trim();if(c.origin==="number"){let w=c.inclusive?`גדול או שווה ל-${c.minimum}`:`גדול מ-${c.minimum}`;return`קטן מדי: ${f} צריך להיות ${w}`}if(c.origin==="array"||c.origin==="set"){let w=c.origin==="set"?"צריכה":"צריך";if(c.minimum===1&&c.inclusive){let ee=c.origin==="set"?"לפחות פריט אחד":"לפחות פריט אחד";return`קטן מדי: ${f} ${w} להכיל ${ee}`}let O=c.inclusive?`${c.minimum} ${d?.unit??""} או יותר`:`יותר מ-${c.minimum} ${d?.unit??""}`;return`קטן מדי: ${f} ${w} להכיל ${O}`.trim()}let p=c.inclusive?">=":">",y=r(c.origin??"value");if(d?.unit)return`${d.shortLabel} מדי: ${f} ${y} ${p}${c.minimum.toString()} ${d.unit}`;return`${d?.shortLabel??"קטן"} מדי: ${f} ${y} ${p}${c.minimum.toString()}`}case"invalid_format":{let d=c;if(d.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${d.prefix}"`;if(d.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${d.suffix}"`;if(d.format==="includes")return`המחרוזת חייבת לכלול "${d.includes}"`;if(d.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${d.pattern}`;let f=u[d.format],p=f?.label??d.format,y=(f?.gender??"m")==="f"?"תקינה":"תקין";return`${p} לא ${y}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${c.divisor}`;case"unrecognized_keys":return`מפתח${c.keys.length>1?"ות":""} לא מזוה${c.keys.length>1?"ים":"ה"}: ${g(c.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${t(c.origin??"array")}`;default:return"קלט לא תקין"}}};function Yf(){return{localeError:Kf()}}var Qf=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function i(t){return e[t]??null}let n={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},a={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Neispravan unos: očekuje se instanceof ${t.expected}, a primljeno je ${u}`;return`Neispravan unos: očekuje se ${r}, a primljeno je ${u}`}case"invalid_value":if(t.values.length===1)return`Neispravna vrijednost: očekivano ${_(t.values[0])}`;return`Neispravna opcija: očekivano jedno od ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin),u=a[t.origin]??t.origin;if(o)return`Preveliko: očekivano da ${u??"vrijednost"} ima ${r}${t.maximum.toString()} ${o.unit??"elemenata"}`;return`Preveliko: očekivano da ${u??"vrijednost"} bude ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin),u=a[t.origin]??t.origin;if(o)return`Premalo: očekivano da ${u} ima ${r}${t.minimum.toString()} ${o.unit}`;return`Premalo: očekivano da ${u} bude ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Neispravan tekst: mora započinjati s "${r.prefix}"`;if(r.format==="ends_with")return`Neispravan tekst: mora završavati s "${r.suffix}"`;if(r.format==="includes")return`Neispravan tekst: mora sadržavati "${r.includes}"`;if(r.format==="regex")return`Neispravan tekst: mora odgovarati uzorku ${r.pattern}`;return`Neispravna ${n[r.format]??t.format}`}case"not_multiple_of":return`Neispravan broj: mora biti višekratnik od ${t.divisor}`;case"unrecognized_keys":return`Neprepoznat${t.keys.length>1?"i ključevi":" ključ"}: ${g(t.keys,", ")}`;case"invalid_key":return`Neispravan ključ u ${a[t.origin]??t.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${a[t.origin]??t.origin}`;default:return"Neispravan unos"}}};function ep(){return{localeError:Qf()}}var tp=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function i(t){return e[t]??null}let n={regex:"bemenet",email:"email cím",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őbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},a={nan:"NaN",number:"szám",array:"tömb"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Érvénytelen bemenet: a várt érték instanceof ${t.expected}, a kapott érték ${u}`;return`Érvénytelen bemenet: a várt érték ${r}, a kapott érték ${u}`}case"invalid_value":if(t.values.length===1)return`Érvénytelen bemenet: a várt érték ${_(t.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Túl nagy: ${t.origin??"érték"} mérete túl nagy ${r}${t.maximum.toString()} ${o.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${t.origin??"érték"} túl nagy: ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Túl kicsi: a bemeneti érték ${t.origin} mérete túl kicsi ${r}${t.minimum.toString()} ${o.unit}`;return`Túl kicsi: a bemeneti érték ${t.origin} túl kicsi ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Érvénytelen string: "${r.prefix}" értékkel kell kezdődnie`;if(r.format==="ends_with")return`Érvénytelen string: "${r.suffix}" értékkel kell végződnie`;if(r.format==="includes")return`Érvénytelen string: "${r.includes}" értéket kell tartalmaznia`;if(r.format==="regex")return`Érvénytelen string: ${r.pattern} mintának kell megfelelnie`;return`Érvénytelen ${n[r.format]??t.format}`}case"not_multiple_of":return`Érvénytelen szám: ${t.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${t.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${t.origin}`;default:return"Érvénytelen bemenet"}}};function ip(){return{localeError:tp()}}function wa(e,i,n){return Math.abs(e)===1?i:n}function Ee(e){if(!e)return"";let i=["ա","ե","ը","ի","ո","ու","օ"],n=e[e.length-1];return e+(i.includes(n)?"ն":"ը")}var np=()=>{let e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function i(t){return e[t]??null}let n={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},a={nan:"NaN",number:"թիվ",array:"զանգված"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${t.expected}, ստացվել է ${u}`;return`Սխալ մուտքագրում․ սպասվում էր ${r}, ստացվել է ${u}`}case"invalid_value":if(t.values.length===1)return`Սխալ մուտքագրում․ սպասվում էր ${_(t.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o){let u=Number(t.maximum),l=wa(u,o.unit.one,o.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${Ee(t.origin??"արժեք")} կունենա ${r}${t.maximum.toString()} ${l}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${Ee(t.origin??"արժեք")} լինի ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o){let u=Number(t.minimum),l=wa(u,o.unit.one,o.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${Ee(t.origin)} կունենա ${r}${t.minimum.toString()} ${l}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${Ee(t.origin)} լինի ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Սխալ տող․ պետք է սկսվի "${r.prefix}"-ով`;if(r.format==="ends_with")return`Սխալ տող․ պետք է ավարտվի "${r.suffix}"-ով`;if(r.format==="includes")return`Սխալ տող․ պետք է պարունակի "${r.includes}"`;if(r.format==="regex")return`Սխալ տող․ պետք է համապատասխանի ${r.pattern} ձևաչափին`;return`Սխալ ${n[r.format]??t.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${t.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${t.keys.length>1?"ներ":""}. ${g(t.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${Ee(t.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${Ee(t.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function rp(){return{localeError:np()}}var ap=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function i(t){return e[t]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},a={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Input tidak valid: diharapkan instanceof ${t.expected}, diterima ${u}`;return`Input tidak valid: diharapkan ${r}, diterima ${u}`}case"invalid_value":if(t.values.length===1)return`Input tidak valid: diharapkan ${_(t.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Terlalu besar: diharapkan ${t.origin??"value"} memiliki ${r}${t.maximum.toString()} ${o.unit??"elemen"}`;return`Terlalu besar: diharapkan ${t.origin??"value"} menjadi ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Terlalu kecil: diharapkan ${t.origin} memiliki ${r}${t.minimum.toString()} ${o.unit}`;return`Terlalu kecil: diharapkan ${t.origin} menjadi ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`String tidak valid: harus dimulai dengan "${r.prefix}"`;if(r.format==="ends_with")return`String tidak valid: harus berakhir dengan "${r.suffix}"`;if(r.format==="includes")return`String tidak valid: harus menyertakan "${r.includes}"`;if(r.format==="regex")return`String tidak valid: harus sesuai pola ${r.pattern}`;return`${n[r.format]??t.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${t.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${t.origin}`;default:return"Input tidak valid"}}};function op(){return{localeError:ap()}}var sp=()=>{let e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function i(t){return e[t]??null}let n={regex:"gildi",email:"netfang",url:"vefslóð",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ími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",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ölugildi",jwt:"JWT",template_literal:"gildi"},a={nan:"NaN",number:"númer",array:"fylki"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Rangt gildi: Þú slóst inn ${u} þar sem á að vera instanceof ${t.expected}`;return`Rangt gildi: Þú slóst inn ${u} þar sem á að vera ${r}`}case"invalid_value":if(t.values.length===1)return`Rangt gildi: gert ráð fyrir ${_(t.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Of stórt: gert er ráð fyrir að ${t.origin??"gildi"} hafi ${r}${t.maximum.toString()} ${o.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${t.origin??"gildi"} sé ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Of lítið: gert er ráð fyrir að ${t.origin} hafi ${r}${t.minimum.toString()} ${o.unit}`;return`Of lítið: gert er ráð fyrir að ${t.origin} sé ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Ógildur strengur: verður að byrja á "${r.prefix}"`;if(r.format==="ends_with")return`Ógildur strengur: verður að enda á "${r.suffix}"`;if(r.format==="includes")return`Ógildur strengur: verður að innihalda "${r.includes}"`;if(r.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${r.pattern}`;return`Rangt ${n[r.format]??t.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${t.divisor}`;case"unrecognized_keys":return`Óþekkt ${t.keys.length>1?"ir lyklar":"ur lykill"}: ${g(t.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${t.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${t.origin}`;default:return"Rangt gildi"}}};function up(){return{localeError:sp()}}var lp=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function i(t){return e[t]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},a={nan:"NaN",number:"numero",array:"vettore"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Input non valido: atteso instanceof ${t.expected}, ricevuto ${u}`;return`Input non valido: atteso ${r}, ricevuto ${u}`}case"invalid_value":if(t.values.length===1)return`Input non valido: atteso ${_(t.values[0])}`;return`Opzione non valida: atteso uno tra ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Troppo grande: ${t.origin??"valore"} deve avere ${r}${t.maximum.toString()} ${o.unit??"elementi"}`;return`Troppo grande: ${t.origin??"valore"} deve essere ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Troppo piccolo: ${t.origin} deve avere ${r}${t.minimum.toString()} ${o.unit}`;return`Troppo piccolo: ${t.origin} deve essere ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Stringa non valida: deve iniziare con "${r.prefix}"`;if(r.format==="ends_with")return`Stringa non valida: deve terminare con "${r.suffix}"`;if(r.format==="includes")return`Stringa non valida: deve includere "${r.includes}"`;if(r.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${r.pattern}`;return`Input non valido: ${n[r.format]??t.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${t.divisor}`;case"unrecognized_keys":return`Chiav${t.keys.length>1?"i":"e"} non riconosciut${t.keys.length>1?"e":"a"}: ${g(t.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${t.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${t.origin}`;default:return"Input non valido"}}};function cp(){return{localeError:lp()}}var dp=()=>{let e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function i(t){return e[t]??null}let n={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},a={nan:"NaN",number:"数値",array:"配列"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`無効な入力: instanceof ${t.expected}が期待されましたが、${u}が入力されました`;return`無効な入力: ${r}が期待されましたが、${u}が入力されました`}case"invalid_value":if(t.values.length===1)return`無効な入力: ${_(t.values[0])}が期待されました`;return`無効な選択: ${g(t.values,"、")}のいずれかである必要があります`;case"too_big":{let r=t.inclusive?"以下である":"より小さい",o=i(t.origin);if(o)return`大きすぎる値: ${t.origin??"値"}は${t.maximum.toString()}${o.unit??"要素"}${r}必要があります`;return`大きすぎる値: ${t.origin??"値"}は${t.maximum.toString()}${r}必要があります`}case"too_small":{let r=t.inclusive?"以上である":"より大きい",o=i(t.origin);if(o)return`小さすぎる値: ${t.origin}は${t.minimum.toString()}${o.unit}${r}必要があります`;return`小さすぎる値: ${t.origin}は${t.minimum.toString()}${r}必要があります`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`無効な文字列: "${r.prefix}"で始まる必要があります`;if(r.format==="ends_with")return`無効な文字列: "${r.suffix}"で終わる必要があります`;if(r.format==="includes")return`無効な文字列: "${r.includes}"を含む必要があります`;if(r.format==="regex")return`無効な文字列: パターン${r.pattern}に一致する必要があります`;return`無効な${n[r.format]??t.format}`}case"not_multiple_of":return`無効な数値: ${t.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${t.keys.length>1?"群":""}: ${g(t.keys,"、")}`;case"invalid_key":return`${t.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${t.origin}内の無効な値`;default:return"無効な入力"}}};function mp(){return{localeError:dp()}}var fp=()=>{let e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function i(t){return e[t]??null}let n={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული ველი",base64url:"base64url-კოდირებული ველი",json_string:"JSON ველი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},a={nan:"NaN",number:"რიცხვი",string:"ველი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${t.expected}, მიღებული ${u}`;return`არასწორი შეყვანა: მოსალოდნელი ${r}, მიღებული ${u}`}case"invalid_value":if(t.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${_(t.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${g(t.values,"|")}-დან`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`ზედმეტად დიდი: მოსალოდნელი ${t.origin??"მნიშვნელობა"} ${o.verb} ${r}${t.maximum.toString()} ${o.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${t.origin??"მნიშვნელობა"} იყოს ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`ზედმეტად პატარა: მოსალოდნელი ${t.origin} ${o.verb} ${r}${t.minimum.toString()} ${o.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${t.origin} იყოს ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`არასწორი ველი: უნდა იწყებოდეს "${r.prefix}"-ით`;if(r.format==="ends_with")return`არასწორი ველი: უნდა მთავრდებოდეს "${r.suffix}"-ით`;if(r.format==="includes")return`არასწორი ველი: უნდა შეიცავდეს "${r.includes}"-ს`;if(r.format==="regex")return`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${r.pattern}`;return`არასწორი ${n[r.format]??t.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${t.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${t.keys.length>1?"ები":"ი"}: ${g(t.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${t.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${t.origin}-ში`;default:return"არასწორი შეყვანა"}}};function pp(){return{localeError:fp()}}var gp=()=>{let e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function i(t){return e[t]??null}let n={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},a={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${t.expected} ប៉ុន្តែទទួលបាន ${u}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${r} ប៉ុន្តែទទួលបាន ${u}`}case"invalid_value":if(t.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${_(t.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`ធំពេក៖ ត្រូវការ ${t.origin??"តម្លៃ"} ${r} ${t.maximum.toString()} ${o.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${t.origin??"តម្លៃ"} ${r} ${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`តូចពេក៖ ត្រូវការ ${t.origin} ${r} ${t.minimum.toString()} ${o.unit}`;return`តូចពេក៖ ត្រូវការ ${t.origin} ${r} ${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${r.prefix}"`;if(r.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${r.suffix}"`;if(r.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${r.includes}"`;if(r.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${r.pattern}`;return`មិនត្រឹមត្រូវ៖ ${n[r.format]??t.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${t.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${g(t.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${t.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${t.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function fu(){return{localeError:gp()}}function hp(){return fu()}var vp=()=>{let e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function i(t){return e[t]??null}let n={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},a={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`잘못된 입력: 예상 타입은 instanceof ${t.expected}, 받은 타입은 ${u}입니다`;return`잘못된 입력: 예상 타입은 ${r}, 받은 타입은 ${u}입니다`}case"invalid_value":if(t.values.length===1)return`잘못된 입력: 값은 ${_(t.values[0])} 이어야 합니다`;return`잘못된 옵션: ${g(t.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let r=t.inclusive?"이하":"미만",o=r==="미만"?"이어야 합니다":"여야 합니다",u=i(t.origin),l=u?.unit??"요소";if(u)return`${t.origin??"값"}이 너무 큽니다: ${t.maximum.toString()}${l} ${r}${o}`;return`${t.origin??"값"}이 너무 큽니다: ${t.maximum.toString()} ${r}${o}`}case"too_small":{let r=t.inclusive?"이상":"초과",o=r==="이상"?"이어야 합니다":"여야 합니다",u=i(t.origin),l=u?.unit??"요소";if(u)return`${t.origin??"값"}이 너무 작습니다: ${t.minimum.toString()}${l} ${r}${o}`;return`${t.origin??"값"}이 너무 작습니다: ${t.minimum.toString()} ${r}${o}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`잘못된 문자열: "${r.prefix}"(으)로 시작해야 합니다`;if(r.format==="ends_with")return`잘못된 문자열: "${r.suffix}"(으)로 끝나야 합니다`;if(r.format==="includes")return`잘못된 문자열: "${r.includes}"을(를) 포함해야 합니다`;if(r.format==="regex")return`잘못된 문자열: 정규식 ${r.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${n[r.format]??t.format}`}case"not_multiple_of":return`잘못된 숫자: ${t.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${g(t.keys,", ")}`;case"invalid_key":return`잘못된 키: ${t.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${t.origin}`;default:return"잘못된 입력"}}};function yp(){return{localeError:vp()}}var Be=(e)=>{return e.charAt(0).toUpperCase()+e.slice(1)};function Sa(e){let i=Math.abs(e),n=i%10,a=i%100;if(a>=11&&a<=19||n===0)return"many";if(n===1)return"one";return"few"}var bp=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function i(t,r,o,u){let l=e[t]??null;if(l===null)return l;return{unit:l.unit[r],verb:l.verb[u][o?"inclusive":"notInclusive"]}}let n={regex:"įvestis",email:"el. pašto 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ė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},a={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Gautas tipas ${u}, o tikėtasi - instanceof ${t.expected}`;return`Gautas tipas ${u}, o tikėtasi - ${r}`}case"invalid_value":if(t.values.length===1)return`Privalo būti ${_(t.values[0])}`;return`Privalo būti vienas iš ${g(t.values,"|")} pasirinkimų`;case"too_big":{let r=a[t.origin]??t.origin,o=i(t.origin,Sa(Number(t.maximum)),t.inclusive??!1,"smaller");if(o?.verb)return`${Be(r??t.origin??"reikšmė")} ${o.verb} ${t.maximum.toString()} ${o.unit??"elementų"}`;let u=t.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Be(r??t.origin??"reikšmė")} turi būti ${u} ${t.maximum.toString()} ${o?.unit}`}case"too_small":{let r=a[t.origin]??t.origin,o=i(t.origin,Sa(Number(t.minimum)),t.inclusive??!1,"bigger");if(o?.verb)return`${Be(r??t.origin??"reikšmė")} ${o.verb} ${t.minimum.toString()} ${o.unit??"elementų"}`;let u=t.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Be(r??t.origin??"reikšmė")} turi būti ${u} ${t.minimum.toString()} ${o?.unit}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Eilutė privalo prasidėti "${r.prefix}"`;if(r.format==="ends_with")return`Eilutė privalo pasibaigti "${r.suffix}"`;if(r.format==="includes")return`Eilutė privalo įtraukti "${r.includes}"`;if(r.format==="regex")return`Eilutė privalo atitikti ${r.pattern}`;return`Neteisingas ${n[r.format]??t.format}`}case"not_multiple_of":return`Skaičius privalo būti ${t.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${t.keys.length>1?"i":"as"} rakt${t.keys.length>1?"ai":"as"}: ${g(t.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let r=a[t.origin]??t.origin;return`${Be(r??t.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function _p(){return{localeError:bp()}}var kp=()=>{let e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function i(t){return e[t]??null}let n={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},a={nan:"NaN",number:"број",array:"низа"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Грешен внес: се очекува instanceof ${t.expected}, примено ${u}`;return`Грешен внес: се очекува ${r}, примено ${u}`}case"invalid_value":if(t.values.length===1)return`Invalid input: expected ${_(t.values[0])}`;return`Грешана опција: се очекува една ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Премногу голем: се очекува ${t.origin??"вредноста"} да има ${r}${t.maximum.toString()} ${o.unit??"елементи"}`;return`Премногу голем: се очекува ${t.origin??"вредноста"} да биде ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Премногу мал: се очекува ${t.origin} да има ${r}${t.minimum.toString()} ${o.unit}`;return`Премногу мал: се очекува ${t.origin} да биде ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Неважечка низа: мора да започнува со "${r.prefix}"`;if(r.format==="ends_with")return`Неважечка низа: мора да завршува со "${r.suffix}"`;if(r.format==="includes")return`Неважечка низа: мора да вклучува "${r.includes}"`;if(r.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${r.pattern}`;return`Invalid ${n[r.format]??t.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${g(t.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${t.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${t.origin}`;default:return"Грешен внес"}}};function Ip(){return{localeError:kp()}}var wp=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function i(t){return e[t]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},a={nan:"NaN",number:"nombor"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Input tidak sah: dijangka instanceof ${t.expected}, diterima ${u}`;return`Input tidak sah: dijangka ${r}, diterima ${u}`}case"invalid_value":if(t.values.length===1)return`Input tidak sah: dijangka ${_(t.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Terlalu besar: dijangka ${t.origin??"nilai"} ${o.verb} ${r}${t.maximum.toString()} ${o.unit??"elemen"}`;return`Terlalu besar: dijangka ${t.origin??"nilai"} adalah ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Terlalu kecil: dijangka ${t.origin} ${o.verb} ${r}${t.minimum.toString()} ${o.unit}`;return`Terlalu kecil: dijangka ${t.origin} adalah ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`String tidak sah: mesti bermula dengan "${r.prefix}"`;if(r.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${r.suffix}"`;if(r.format==="includes")return`String tidak sah: mesti mengandungi "${r.includes}"`;if(r.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${r.pattern}`;return`${n[r.format]??t.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${g(t.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${t.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${t.origin}`;default:return"Input tidak sah"}}};function Sp(){return{localeError:wp()}}var xp=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function i(t){return e[t]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},a={nan:"NaN",number:"getal"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Ongeldige invoer: verwacht instanceof ${t.expected}, ontving ${u}`;return`Ongeldige invoer: verwacht ${r}, ontving ${u}`}case"invalid_value":if(t.values.length===1)return`Ongeldige invoer: verwacht ${_(t.values[0])}`;return`Ongeldige optie: verwacht één van ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin),u=t.origin==="date"?"laat":t.origin==="string"?"lang":"groot";if(o)return`Te ${u}: verwacht dat ${t.origin??"waarde"} ${r}${t.maximum.toString()} ${o.unit??"elementen"} ${o.verb}`;return`Te ${u}: verwacht dat ${t.origin??"waarde"} ${r}${t.maximum.toString()} is`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin),u=t.origin==="date"?"vroeg":t.origin==="string"?"kort":"klein";if(o)return`Te ${u}: verwacht dat ${t.origin} ${r}${t.minimum.toString()} ${o.unit} ${o.verb}`;return`Te ${u}: verwacht dat ${t.origin} ${r}${t.minimum.toString()} is`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Ongeldige tekst: moet met "${r.prefix}" beginnen`;if(r.format==="ends_with")return`Ongeldige tekst: moet op "${r.suffix}" eindigen`;if(r.format==="includes")return`Ongeldige tekst: moet "${r.includes}" bevatten`;if(r.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${r.pattern}`;return`Ongeldig: ${n[r.format]??t.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${t.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${t.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${t.origin}`;default:return"Ongeldige invoer"}}};function Ep(){return{localeError:xp()}}var $p=()=>{let e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function i(t){return e[t]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",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"},a={nan:"NaN",number:"tall",array:"liste"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Ugyldig input: forventet instanceof ${t.expected}, fikk ${u}`;return`Ugyldig input: forventet ${r}, fikk ${u}`}case"invalid_value":if(t.values.length===1)return`Ugyldig verdi: forventet ${_(t.values[0])}`;return`Ugyldig valg: forventet en av ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`For stor(t): forventet ${t.origin??"value"} til å ha ${r}${t.maximum.toString()} ${o.unit??"elementer"}`;return`For stor(t): forventet ${t.origin??"value"} til å ha ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`For lite(n): forventet ${t.origin} til å ha ${r}${t.minimum.toString()} ${o.unit}`;return`For lite(n): forventet ${t.origin} til å ha ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Ugyldig streng: må starte med "${r.prefix}"`;if(r.format==="ends_with")return`Ugyldig streng: må ende med "${r.suffix}"`;if(r.format==="includes")return`Ugyldig streng: må inneholde "${r.includes}"`;if(r.format==="regex")return`Ugyldig streng: må matche mønsteret ${r.pattern}`;return`Ugyldig ${n[r.format]??t.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${g(t.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${t.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${t.origin}`;default:return"Ugyldig input"}}};function Tp(){return{localeError:$p()}}var Op=()=>{let e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function i(t){return e[t]??null}let n={regex:"giren",email:"epostagâh",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âmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},a={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Fâsit giren: umulan instanceof ${t.expected}, alınan ${u}`;return`Fâsit giren: umulan ${r}, alınan ${u}`}case"invalid_value":if(t.values.length===1)return`Fâsit giren: umulan ${_(t.values[0])}`;return`Fâsit tercih: mûteberler ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Fazla büyük: ${t.origin??"value"}, ${r}${t.maximum.toString()} ${o.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${t.origin??"value"}, ${r}${t.maximum.toString()} olmalıydı.`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Fazla küçük: ${t.origin}, ${r}${t.minimum.toString()} ${o.unit} sahip olmalıydı.`;return`Fazla küçük: ${t.origin}, ${r}${t.minimum.toString()} olmalıydı.`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Fâsit metin: "${r.prefix}" ile başlamalı.`;if(r.format==="ends_with")return`Fâsit metin: "${r.suffix}" ile bitmeli.`;if(r.format==="includes")return`Fâsit metin: "${r.includes}" ihtivâ etmeli.`;if(r.format==="regex")return`Fâsit metin: ${r.pattern} nakşına uymalı.`;return`Fâsit ${n[r.format]??t.format}`}case"not_multiple_of":return`Fâsit sayı: ${t.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`${t.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${t.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function Np(){return{localeError:Op()}}var Up=()=>{let e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function i(t){return e[t]??null}let n={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},a={nan:"NaN",number:"عدد",array:"ارې"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`ناسم ورودي: باید instanceof ${t.expected} وای, مګر ${u} ترلاسه شو`;return`ناسم ورودي: باید ${r} وای, مګر ${u} ترلاسه شو`}case"invalid_value":if(t.values.length===1)return`ناسم ورودي: باید ${_(t.values[0])} وای`;return`ناسم انتخاب: باید یو له ${g(t.values,"|")} څخه وای`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`ډیر لوی: ${t.origin??"ارزښت"} باید ${r}${t.maximum.toString()} ${o.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${t.origin??"ارزښت"} باید ${r}${t.maximum.toString()} وي`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`ډیر کوچنی: ${t.origin} باید ${r}${t.minimum.toString()} ${o.unit} ولري`;return`ډیر کوچنی: ${t.origin} باید ${r}${t.minimum.toString()} وي`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`ناسم متن: باید د "${r.prefix}" سره پیل شي`;if(r.format==="ends_with")return`ناسم متن: باید د "${r.suffix}" سره پای ته ورسيږي`;if(r.format==="includes")return`ناسم متن: باید "${r.includes}" ولري`;if(r.format==="regex")return`ناسم متن: باید د ${r.pattern} سره مطابقت ولري`;return`${n[r.format]??t.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${t.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${t.keys.length>1?"کلیډونه":"کلیډ"}: ${g(t.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${t.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${t.origin} کې`;default:return"ناسمه ورودي"}}};function zp(){return{localeError:Up()}}var Ap=()=>{let e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function i(t){return e[t]??null}let n={regex:"wyrażenie",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ąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},a={nan:"NaN",number:"liczba",array:"tablica"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${t.expected}, otrzymano ${u}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${r}, otrzymano ${u}`}case"invalid_value":if(t.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${_(t.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Za duża wartość: oczekiwano, że ${t.origin??"wartość"} będzie mieć ${r}${t.maximum.toString()} ${o.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${t.origin??"wartość"} będzie wynosić ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Za mała wartość: oczekiwano, że ${t.origin??"wartość"} będzie mieć ${r}${t.minimum.toString()} ${o.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${t.origin??"wartość"} będzie wynosić ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${r.prefix}"`;if(r.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${r.suffix}"`;if(r.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${r.includes}"`;if(r.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${r.pattern}`;return`Nieprawidłow(y/a/e) ${n[r.format]??t.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${t.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${t.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${t.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function Pp(){return{localeError:Ap()}}var Dp=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function i(t){return e[t]??null}let n={regex:"padrão",email:"endereço 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ção ISO",ipv4:"endereço IPv4",ipv6:"endereço 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úmero E.164",jwt:"JWT",template_literal:"entrada"},a={nan:"NaN",number:"número",null:"nulo"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Tipo inválido: esperado instanceof ${t.expected}, recebido ${u}`;return`Tipo inválido: esperado ${r}, recebido ${u}`}case"invalid_value":if(t.values.length===1)return`Entrada inválida: esperado ${_(t.values[0])}`;return`Opção inválida: esperada uma das ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Muito grande: esperado que ${t.origin??"valor"} tivesse ${r}${t.maximum.toString()} ${o.unit??"elementos"}`;return`Muito grande: esperado que ${t.origin??"valor"} fosse ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Muito pequeno: esperado que ${t.origin} tivesse ${r}${t.minimum.toString()} ${o.unit}`;return`Muito pequeno: esperado que ${t.origin} fosse ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Texto inválido: deve começar com "${r.prefix}"`;if(r.format==="ends_with")return`Texto inválido: deve terminar com "${r.suffix}"`;if(r.format==="includes")return`Texto inválido: deve incluir "${r.includes}"`;if(r.format==="regex")return`Texto inválido: deve corresponder ao padrão ${r.pattern}`;return`${n[r.format]??t.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${t.divisor}`;case"unrecognized_keys":return`Chave${t.keys.length>1?"s":""} desconhecida${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Chave inválida em ${t.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${t.origin}`;default:return"Campo inválido"}}};function jp(){return{localeError:Dp()}}var Rp=()=>{let e={string:{unit:"caractere",verb:"să aibă"},file:{unit:"octeți",verb:"să aibă"},array:{unit:"elemente",verb:"să aibă"},set:{unit:"elemente",verb:"să aibă"},map:{unit:"intrări",verb:"să aibă"}};function i(t){return e[t]??null}let n={regex:"intrare",email:"adresă de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dată și oră ISO",date:"dată ISO",time:"oră ISO",duration:"durată ISO",ipv4:"adresă IPv4",ipv6:"adresă IPv6",mac:"adresă MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"șir codat base64",base64url:"șir codat base64url",json_string:"șir JSON",e164:"număr E.164",jwt:"JWT",template_literal:"intrare"},a={nan:"NaN",string:"șir",number:"număr",boolean:"boolean",function:"funcție",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"număr mare",void:"void",never:"never",map:"hartă",set:"set"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;return`Intrare invalidă: așteptat ${r}, primit ${u}`}case"invalid_value":if(t.values.length===1)return`Intrare invalidă: așteptat ${_(t.values[0])}`;return`Opțiune invalidă: așteptat una dintre ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Prea mare: așteptat ca ${t.origin??"valoarea"} ${o.verb} ${r}${t.maximum.toString()} ${o.unit??"elemente"}`;return`Prea mare: așteptat ca ${t.origin??"valoarea"} să fie ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Prea mic: așteptat ca ${t.origin} ${o.verb} ${r}${t.minimum.toString()} ${o.unit}`;return`Prea mic: așteptat ca ${t.origin} să fie ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Șir invalid: trebuie să înceapă cu "${r.prefix}"`;if(r.format==="ends_with")return`Șir invalid: trebuie să se termine cu "${r.suffix}"`;if(r.format==="includes")return`Șir invalid: trebuie să includă "${r.includes}"`;if(r.format==="regex")return`Șir invalid: trebuie să se potrivească cu modelul ${r.pattern}`;return`Format invalid: ${n[r.format]??t.format}`}case"not_multiple_of":return`Număr invalid: trebuie să fie multiplu de ${t.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${g(t.keys,", ")}`;case"invalid_key":return`Cheie invalidă în ${t.origin}`;case"invalid_union":return"Intrare invalidă";case"invalid_element":return`Valoare invalidă în ${t.origin}`;default:return"Intrare invalidă"}}};function Cp(){return{localeError:Rp()}}function xa(e,i,n,a){let t=Math.abs(e),r=t%10,o=t%100;if(o>=11&&o<=19)return a;if(r===1)return i;if(r>=2&&r<=4)return n;return a}var Lp=()=>{let e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function i(t){return e[t]??null}let n={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},a={nan:"NaN",number:"число",array:"массив"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Неверный ввод: ожидалось instanceof ${t.expected}, получено ${u}`;return`Неверный ввод: ожидалось ${r}, получено ${u}`}case"invalid_value":if(t.values.length===1)return`Неверный ввод: ожидалось ${_(t.values[0])}`;return`Неверный вариант: ожидалось одно из ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o){let u=Number(t.maximum),l=xa(u,o.unit.one,o.unit.few,o.unit.many);return`Слишком большое значение: ожидалось, что ${t.origin??"значение"} будет иметь ${r}${t.maximum.toString()} ${l}`}return`Слишком большое значение: ожидалось, что ${t.origin??"значение"} будет ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o){let u=Number(t.minimum),l=xa(u,o.unit.one,o.unit.few,o.unit.many);return`Слишком маленькое значение: ожидалось, что ${t.origin} будет иметь ${r}${t.minimum.toString()} ${l}`}return`Слишком маленькое значение: ожидалось, что ${t.origin} будет ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Неверная строка: должна начинаться с "${r.prefix}"`;if(r.format==="ends_with")return`Неверная строка: должна заканчиваться на "${r.suffix}"`;if(r.format==="includes")return`Неверная строка: должна содержать "${r.includes}"`;if(r.format==="regex")return`Неверная строка: должна соответствовать шаблону ${r.pattern}`;return`Неверный ${n[r.format]??t.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${t.divisor}`;case"unrecognized_keys":return`Нераспознанн${t.keys.length>1?"ые":"ый"} ключ${t.keys.length>1?"и":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${t.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${t.origin}`;default:return"Неверные входные данные"}}};function Zp(){return{localeError:Lp()}}var Mp=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function i(t){return e[t]??null}let n={regex:"vnos",email:"e-poštni 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 čas",date:"ISO datum",time:"ISO čas",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 številka",jwt:"JWT",template_literal:"vnos"},a={nan:"NaN",number:"število",array:"tabela"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Neveljaven vnos: pričakovano instanceof ${t.expected}, prejeto ${u}`;return`Neveljaven vnos: pričakovano ${r}, prejeto ${u}`}case"invalid_value":if(t.values.length===1)return`Neveljaven vnos: pričakovano ${_(t.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Preveliko: pričakovano, da bo ${t.origin??"vrednost"} imelo ${r}${t.maximum.toString()} ${o.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${t.origin??"vrednost"} ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Premajhno: pričakovano, da bo ${t.origin} imelo ${r}${t.minimum.toString()} ${o.unit}`;return`Premajhno: pričakovano, da bo ${t.origin} ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Neveljaven niz: mora se začeti z "${r.prefix}"`;if(r.format==="ends_with")return`Neveljaven niz: mora se končati z "${r.suffix}"`;if(r.format==="includes")return`Neveljaven niz: mora vsebovati "${r.includes}"`;if(r.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${r.pattern}`;return`Neveljaven ${n[r.format]??t.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${t.divisor}`;case"unrecognized_keys":return`Neprepoznan${t.keys.length>1?"i ključi":" ključ"}: ${g(t.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${t.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${t.origin}`;default:return"Neveljaven vnos"}}};function Bp(){return{localeError:Mp()}}var Fp=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function i(t){return e[t]??null}let n={regex:"reguljärt 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äng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},a={nan:"NaN",number:"antal",array:"lista"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Ogiltig inmatning: förväntat instanceof ${t.expected}, fick ${u}`;return`Ogiltig inmatning: förväntat ${r}, fick ${u}`}case"invalid_value":if(t.values.length===1)return`Ogiltig inmatning: förväntat ${_(t.values[0])}`;return`Ogiltigt val: förväntade en av ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`För stor(t): förväntade ${t.origin??"värdet"} att ha ${r}${t.maximum.toString()} ${o.unit??"element"}`;return`För stor(t): förväntat ${t.origin??"värdet"} att ha ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`För lite(t): förväntade ${t.origin??"värdet"} att ha ${r}${t.minimum.toString()} ${o.unit}`;return`För lite(t): förväntade ${t.origin??"värdet"} att ha ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Ogiltig sträng: måste börja med "${r.prefix}"`;if(r.format==="ends_with")return`Ogiltig sträng: måste sluta med "${r.suffix}"`;if(r.format==="includes")return`Ogiltig sträng: måste innehålla "${r.includes}"`;if(r.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${r.pattern}"`;return`Ogiltig(t) ${n[r.format]??t.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${g(t.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${t.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${t.origin??"värdet"}`;default:return"Ogiltig input"}}};function Jp(){return{localeError:Fp()}}var Gp=()=>{let e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function i(t){return e[t]??null}let n={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},a={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${t.expected}, பெறப்பட்டது ${u}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${r}, பெறப்பட்டது ${u}`}case"invalid_value":if(t.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${_(t.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${g(t.values,"|")} இல் ஒன்று`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${t.origin??"மதிப்பு"} ${r}${t.maximum.toString()} ${o.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${t.origin??"மதிப்பு"} ${r}${t.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${t.origin} ${r}${t.minimum.toString()} ${o.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${t.origin} ${r}${t.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`தவறான சரம்: "${r.prefix}" இல் தொடங்க வேண்டும்`;if(r.format==="ends_with")return`தவறான சரம்: "${r.suffix}" இல் முடிவடைய வேண்டும்`;if(r.format==="includes")return`தவறான சரம்: "${r.includes}" ஐ உள்ளடக்க வேண்டும்`;if(r.format==="regex")return`தவறான சரம்: ${r.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${n[r.format]??t.format}`}case"not_multiple_of":return`தவறான எண்: ${t.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${t.keys.length>1?"கள்":""}: ${g(t.keys,", ")}`;case"invalid_key":return`${t.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${t.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function Wp(){return{localeError:Gp()}}var Vp=()=>{let e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function i(t){return e[t]??null}let n={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},a={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${t.expected} แต่ได้รับ ${u}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${r} แต่ได้รับ ${u}`}case"invalid_value":if(t.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${_(t.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"ไม่เกิน":"น้อยกว่า",o=i(t.origin);if(o)return`เกินกำหนด: ${t.origin??"ค่า"} ควรมี${r} ${t.maximum.toString()} ${o.unit??"รายการ"}`;return`เกินกำหนด: ${t.origin??"ค่า"} ควรมี${r} ${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?"อย่างน้อย":"มากกว่า",o=i(t.origin);if(o)return`น้อยกว่ากำหนด: ${t.origin} ควรมี${r} ${t.minimum.toString()} ${o.unit}`;return`น้อยกว่ากำหนด: ${t.origin} ควรมี${r} ${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${r.prefix}"`;if(r.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${r.suffix}"`;if(r.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${r.includes}" อยู่ในข้อความ`;if(r.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${r.pattern}`;return`รูปแบบไม่ถูกต้อง: ${n[r.format]??t.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${t.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${g(t.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${t.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${t.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function qp(){return{localeError:Vp()}}var Xp=()=>{let e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function i(t){return e[t]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},a={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Geçersiz değer: beklenen instanceof ${t.expected}, alınan ${u}`;return`Geçersiz değer: beklenen ${r}, alınan ${u}`}case"invalid_value":if(t.values.length===1)return`Geçersiz değer: beklenen ${_(t.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Çok büyük: beklenen ${t.origin??"değer"} ${r}${t.maximum.toString()} ${o.unit??"öğe"}`;return`Çok büyük: beklenen ${t.origin??"değer"} ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Çok küçük: beklenen ${t.origin} ${r}${t.minimum.toString()} ${o.unit}`;return`Çok küçük: beklenen ${t.origin} ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Geçersiz metin: "${r.prefix}" ile başlamalı`;if(r.format==="ends_with")return`Geçersiz metin: "${r.suffix}" ile bitmeli`;if(r.format==="includes")return`Geçersiz metin: "${r.includes}" içermeli`;if(r.format==="regex")return`Geçersiz metin: ${r.pattern} desenine uymalı`;return`Geçersiz ${n[r.format]??t.format}`}case"not_multiple_of":return`Geçersiz sayı: ${t.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${t.keys.length>1?"lar":""}: ${g(t.keys,", ")}`;case"invalid_key":return`${t.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${t.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function Hp(){return{localeError:Xp()}}var Kp=()=>{let e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function i(t){return e[t]??null}let n={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},a={nan:"NaN",number:"число",array:"масив"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Неправильні вхідні дані: очікується instanceof ${t.expected}, отримано ${u}`;return`Неправильні вхідні дані: очікується ${r}, отримано ${u}`}case"invalid_value":if(t.values.length===1)return`Неправильні вхідні дані: очікується ${_(t.values[0])}`;return`Неправильна опція: очікується одне з ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Занадто велике: очікується, що ${t.origin??"значення"} ${o.verb} ${r}${t.maximum.toString()} ${o.unit??"елементів"}`;return`Занадто велике: очікується, що ${t.origin??"значення"} буде ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Занадто мале: очікується, що ${t.origin} ${o.verb} ${r}${t.minimum.toString()} ${o.unit}`;return`Занадто мале: очікується, що ${t.origin} буде ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Неправильний рядок: повинен починатися з "${r.prefix}"`;if(r.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${r.suffix}"`;if(r.format==="includes")return`Неправильний рядок: повинен містити "${r.includes}"`;if(r.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${r.pattern}`;return`Неправильний ${n[r.format]??t.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${t.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${t.keys.length>1?"і":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${t.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${t.origin}`;default:return"Неправильні вхідні дані"}}};function pu(){return{localeError:Kp()}}function Yp(){return pu()}var Qp=()=>{let e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function i(t){return e[t]??null}let n={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},a={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`غلط ان پٹ: instanceof ${t.expected} متوقع تھا، ${u} موصول ہوا`;return`غلط ان پٹ: ${r} متوقع تھا، ${u} موصول ہوا`}case"invalid_value":if(t.values.length===1)return`غلط ان پٹ: ${_(t.values[0])} متوقع تھا`;return`غلط آپشن: ${g(t.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`بہت بڑا: ${t.origin??"ویلیو"} کے ${r}${t.maximum.toString()} ${o.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${t.origin??"ویلیو"} کا ${r}${t.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`بہت چھوٹا: ${t.origin} کے ${r}${t.minimum.toString()} ${o.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${t.origin} کا ${r}${t.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`غلط سٹرنگ: "${r.prefix}" سے شروع ہونا چاہیے`;if(r.format==="ends_with")return`غلط سٹرنگ: "${r.suffix}" پر ختم ہونا چاہیے`;if(r.format==="includes")return`غلط سٹرنگ: "${r.includes}" شامل ہونا چاہیے`;if(r.format==="regex")return`غلط سٹرنگ: پیٹرن ${r.pattern} سے میچ ہونا چاہیے`;return`غلط ${n[r.format]??t.format}`}case"not_multiple_of":return`غلط نمبر: ${t.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${t.keys.length>1?"ز":""}: ${g(t.keys,"، ")}`;case"invalid_key":return`${t.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${t.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function eg(){return{localeError:Qp()}}var tg=()=>{let e={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"},map:{unit:"yozuv",verb:"bo‘lishi kerak"}};function i(t){return e[t]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},a={nan:"NaN",number:"raqam",array:"massiv"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${t.expected}, qabul qilingan ${u}`;return`Noto‘g‘ri kirish: kutilgan ${r}, qabul qilingan ${u}`}case"invalid_value":if(t.values.length===1)return`Noto‘g‘ri kirish: kutilgan ${_(t.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Juda katta: kutilgan ${t.origin??"qiymat"} ${r}${t.maximum.toString()} ${o.unit} ${o.verb}`;return`Juda katta: kutilgan ${t.origin??"qiymat"} ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Juda kichik: kutilgan ${t.origin} ${r}${t.minimum.toString()} ${o.unit} ${o.verb}`;return`Juda kichik: kutilgan ${t.origin} ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Noto‘g‘ri satr: "${r.prefix}" bilan boshlanishi kerak`;if(r.format==="ends_with")return`Noto‘g‘ri satr: "${r.suffix}" bilan tugashi kerak`;if(r.format==="includes")return`Noto‘g‘ri satr: "${r.includes}" ni o‘z ichiga olishi kerak`;if(r.format==="regex")return`Noto‘g‘ri satr: ${r.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${n[r.format]??t.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${t.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${t.keys.length>1?"lar":""}: ${g(t.keys,", ")}`;case"invalid_key":return`${t.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${t.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function ig(){return{localeError:tg()}}var ng=()=>{let e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function i(t){return e[t]??null}let n={regex:"đầu vào",email:"địa chỉ 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ày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},a={nan:"NaN",number:"số",array:"mảng"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Đầu vào không hợp lệ: mong đợi instanceof ${t.expected}, nhận được ${u}`;return`Đầu vào không hợp lệ: mong đợi ${r}, nhận được ${u}`}case"invalid_value":if(t.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${_(t.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Quá lớn: mong đợi ${t.origin??"giá trị"} ${o.verb} ${r}${t.maximum.toString()} ${o.unit??"phần tử"}`;return`Quá lớn: mong đợi ${t.origin??"giá trị"} ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Quá nhỏ: mong đợi ${t.origin} ${o.verb} ${r}${t.minimum.toString()} ${o.unit}`;return`Quá nhỏ: mong đợi ${t.origin} ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${r.prefix}"`;if(r.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${r.suffix}"`;if(r.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${r.includes}"`;if(r.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${r.pattern}`;return`${n[r.format]??t.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${t.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${g(t.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${t.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${t.origin}`;default:return"Đầu vào không hợp lệ"}}};function rg(){return{localeError:ng()}}var ag=()=>{let e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function i(t){return e[t]??null}let n={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},a={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`无效输入:期望 instanceof ${t.expected},实际接收 ${u}`;return`无效输入:期望 ${r},实际接收 ${u}`}case"invalid_value":if(t.values.length===1)return`无效输入:期望 ${_(t.values[0])}`;return`无效选项:期望以下之一 ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`数值过大:期望 ${t.origin??"值"} ${r}${t.maximum.toString()} ${o.unit??"个元素"}`;return`数值过大:期望 ${t.origin??"值"} ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`数值过小:期望 ${t.origin} ${r}${t.minimum.toString()} ${o.unit}`;return`数值过小:期望 ${t.origin} ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`无效字符串:必须以 "${r.prefix}" 开头`;if(r.format==="ends_with")return`无效字符串:必须以 "${r.suffix}" 结尾`;if(r.format==="includes")return`无效字符串:必须包含 "${r.includes}"`;if(r.format==="regex")return`无效字符串:必须满足正则表达式 ${r.pattern}`;return`无效${n[r.format]??t.format}`}case"not_multiple_of":return`无效数字:必须是 ${t.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${g(t.keys,", ")}`;case"invalid_key":return`${t.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${t.origin} 中包含无效值(value)`;default:return"无效输入"}}};function og(){return{localeError:ag()}}var sg=()=>{let e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function i(t){return e[t]??null}let n={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},a={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`無效的輸入值:預期為 instanceof ${t.expected},但收到 ${u}`;return`無效的輸入值:預期為 ${r},但收到 ${u}`}case"invalid_value":if(t.values.length===1)return`無效的輸入值:預期為 ${_(t.values[0])}`;return`無效的選項:預期為以下其中之一 ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`數值過大:預期 ${t.origin??"值"} 應為 ${r}${t.maximum.toString()} ${o.unit??"個元素"}`;return`數值過大:預期 ${t.origin??"值"} 應為 ${r}${t.maximum.toString()}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`數值過小:預期 ${t.origin} 應為 ${r}${t.minimum.toString()} ${o.unit}`;return`數值過小:預期 ${t.origin} 應為 ${r}${t.minimum.toString()}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`無效的字串:必須以 "${r.prefix}" 開頭`;if(r.format==="ends_with")return`無效的字串:必須以 "${r.suffix}" 結尾`;if(r.format==="includes")return`無效的字串:必須包含 "${r.includes}"`;if(r.format==="regex")return`無效的字串:必須符合格式 ${r.pattern}`;return`無效的 ${n[r.format]??t.format}`}case"not_multiple_of":return`無效的數字:必須為 ${t.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${t.keys.length>1?"們":""}:${g(t.keys,"、")}`;case"invalid_key":return`${t.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${t.origin} 中有無效的值`;default:return"無效的輸入值"}}};function ug(){return{localeError:sg()}}var lg=()=>{let e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function i(t){return e[t]??null}let n={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",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:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},a={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return(t)=>{switch(t.code){case"invalid_type":{let r=a[t.expected]??t.expected,o=k(t.input),u=a[o]??o;if(/^[A-Z]/.test(t.expected))return`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${t.expected}, àmọ̀ a rí ${u}`;return`Ìbáwọlé aṣìṣe: a ní láti fi ${r}, àmọ̀ a rí ${u}`}case"invalid_value":if(t.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${_(t.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${g(t.values,"|")}`;case"too_big":{let r=t.inclusive?"<=":"<",o=i(t.origin);if(o)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${t.origin??"iye"} ${o.verb} ${r}${t.maximum} ${o.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${r}${t.maximum}`}case"too_small":{let r=t.inclusive?">=":">",o=i(t.origin);if(o)return`Kéré ju: a ní láti jẹ́ pé ${t.origin} ${o.verb} ${r}${t.minimum} ${o.unit}`;return`Kéré ju: a ní láti jẹ́ ${r}${t.minimum}`}case"invalid_format":{let r=t;if(r.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${r.prefix}"`;if(r.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${r.suffix}"`;if(r.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${r.includes}"`;if(r.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${r.pattern}`;return`Aṣìṣe: ${n[r.format]??t.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${t.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${g(t.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${t.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${t.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function cg(){return{localeError:lg()}}var Ea,gu=Symbol("ZodOutput"),hu=Symbol("ZodInput");class yn{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...i){let n=i[0];if(this._map.set(e,n),n&&typeof n==="object"&&"id"in n)this._idmap.set(n.id,e);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let i=this._map.get(e);if(i&&typeof i==="object"&&"id"in i)this._idmap.delete(i.id);return this._map.delete(e),this}get(e){let i=e._zod.parent;if(i){let n={...this.get(i)??{}};delete n.id;let a={...n,...this._map.get(e)};return Object.keys(a).length?a:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function bn(){return new yn}(Ea=globalThis).__zod_globalRegistry??(Ea.__zod_globalRegistry=bn());var K=globalThis.__zod_globalRegistry;function vu(e,i){return new e({type:"string",...v(i)})}function yu(e,i){return new e({type:"string",coerce:!0,...v(i)})}function _n(e,i){return new e({type:"string",format:"email",check:"string_format",abort:!1,...v(i)})}function Dt(e,i){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...v(i)})}function kn(e,i){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...v(i)})}function In(e,i){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...v(i)})}function wn(e,i){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...v(i)})}function Sn(e,i){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...v(i)})}function Jt(e,i){return new e({type:"string",format:"url",check:"string_format",abort:!1,...v(i)})}function xn(e,i){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...v(i)})}function En(e,i){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...v(i)})}function $n(e,i){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...v(i)})}function Tn(e,i){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...v(i)})}function On(e,i){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...v(i)})}function Nn(e,i){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...v(i)})}function Un(e,i){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...v(i)})}function zn(e,i){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...v(i)})}function An(e,i){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...v(i)})}function bu(e,i){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...v(i)})}function Pn(e,i){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...v(i)})}function Dn(e,i){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...v(i)})}function jn(e,i){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...v(i)})}function Rn(e,i){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...v(i)})}function Cn(e,i){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...v(i)})}function Ln(e,i){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...v(i)})}var _u={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function ku(e,i){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...v(i)})}function Iu(e,i){return new e({type:"string",format:"date",check:"string_format",...v(i)})}function wu(e,i){return new e({type:"string",format:"time",check:"string_format",precision:null,...v(i)})}function Su(e,i){return new e({type:"string",format:"duration",check:"string_format",...v(i)})}function xu(e,i){return new e({type:"number",checks:[],...v(i)})}function Eu(e,i){return new e({type:"number",coerce:!0,checks:[],...v(i)})}function $u(e,i){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...v(i)})}function Tu(e,i){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...v(i)})}function Ou(e,i){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...v(i)})}function Nu(e,i){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...v(i)})}function Uu(e,i){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...v(i)})}function zu(e,i){return new e({type:"boolean",...v(i)})}function Au(e,i){return new e({type:"boolean",coerce:!0,...v(i)})}function Pu(e,i){return new e({type:"bigint",...v(i)})}function Du(e,i){return new e({type:"bigint",coerce:!0,...v(i)})}function ju(e,i){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...v(i)})}function Ru(e,i){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...v(i)})}function Cu(e,i){return new e({type:"symbol",...v(i)})}function Lu(e,i){return new e({type:"undefined",...v(i)})}function Zu(e,i){return new e({type:"null",...v(i)})}function Mu(e){return new e({type:"any"})}function Bu(e){return new e({type:"unknown"})}function Fu(e,i){return new e({type:"never",...v(i)})}function Ju(e,i){return new e({type:"void",...v(i)})}function Gu(e,i){return new e({type:"date",...v(i)})}function Wu(e,i){return new e({type:"date",coerce:!0,...v(i)})}function Vu(e,i){return new e({type:"nan",...v(i)})}function de(e,i){return new on({check:"less_than",...v(i),value:e,inclusive:!1})}function Y(e,i){return new on({check:"less_than",...v(i),value:e,inclusive:!0})}function me(e,i){return new sn({check:"greater_than",...v(i),value:e,inclusive:!1})}function F(e,i){return new sn({check:"greater_than",...v(i),value:e,inclusive:!0})}function Zn(e){return me(0,e)}function Mn(e){return de(0,e)}function Bn(e){return Y(0,e)}function Fn(e){return F(0,e)}function ze(e,i){return new Po({check:"multiple_of",...v(i),value:e})}function Ce(e,i){return new Ro({check:"max_size",...v(i),maximum:e})}function fe(e,i){return new Co({check:"min_size",...v(i),minimum:e})}function lt(e,i){return new Lo({check:"size_equals",...v(i),size:e})}function ct(e,i){return new Zo({check:"max_length",...v(i),maximum:e})}function ye(e,i){return new Mo({check:"min_length",...v(i),minimum:e})}function dt(e,i){return new Bo({check:"length_equals",...v(i),length:e})}function Gt(e,i){return new Fo({check:"string_format",format:"regex",...v(i),pattern:e})}function Wt(e){return new Jo({check:"string_format",format:"lowercase",...v(e)})}function Vt(e){return new Go({check:"string_format",format:"uppercase",...v(e)})}function qt(e,i){return new Wo({check:"string_format",format:"includes",...v(i),includes:e})}function Xt(e,i){return new Vo({check:"string_format",format:"starts_with",...v(i),prefix:e})}function Ht(e,i){return new qo({check:"string_format",format:"ends_with",...v(i),suffix:e})}function Jn(e,i,n){return new Xo({check:"property",property:e,schema:i,...v(n)})}function Kt(e,i){return new Ho({check:"mime_type",mime:e,...v(i)})}function se(e){return new Ko({check:"overwrite",tx:e})}function Yt(e){return se((i)=>i.normalize(e))}function Qt(){return se((e)=>e.trim())}function ei(){return se((e)=>e.toLowerCase())}function ti(){return se((e)=>e.toUpperCase())}function ii(){return se((e)=>Ra(e))}function qu(e,i,n){return new e({type:"array",element:i,...v(n)})}function dg(e,i,n){return new e({type:"union",options:i,...v(n)})}function mg(e,i,n){return new e({type:"union",options:i,inclusive:!1,...v(n)})}function fg(e,i,n,a){return new e({type:"union",options:n,discriminator:i,...v(a)})}function pg(e,i,n){return new e({type:"intersection",left:i,right:n})}function gg(e,i,n,a){let t=n instanceof S;return new e({type:"tuple",items:i,rest:t?n:null,...v(t?a:n)})}function hg(e,i,n,a){return new e({type:"record",keyType:i,valueType:n,...v(a)})}function vg(e,i,n,a){return new e({type:"map",keyType:i,valueType:n,...v(a)})}function yg(e,i,n){return new e({type:"set",valueType:i,...v(n)})}function bg(e,i,n){let a=Array.isArray(i)?Object.fromEntries(i.map((t)=>[t,t])):i;return new e({type:"enum",entries:a,...v(n)})}function _g(e,i,n){return new e({type:"enum",entries:i,...v(n)})}function kg(e,i,n){return new e({type:"literal",values:Array.isArray(i)?i:[i],...v(n)})}function Xu(e,i){return new e({type:"file",...v(i)})}function Ig(e,i){return new e({type:"transform",transform:i})}function wg(e,i){return new e({type:"optional",innerType:i})}function Sg(e,i){return new e({type:"nullable",innerType:i})}function xg(e,i,n){return new e({type:"default",innerType:i,get defaultValue(){return typeof n==="function"?n():La(n)}})}function Eg(e,i,n){return new e({type:"nonoptional",innerType:i,...v(n)})}function $g(e,i){return new e({type:"success",innerType:i})}function Tg(e,i,n){return new e({type:"catch",innerType:i,catchValue:typeof n==="function"?n:()=>n})}function Og(e,i,n){return new e({type:"pipe",in:i,out:n})}function Ng(e,i){return new e({type:"readonly",innerType:i})}function Ug(e,i,n){return new e({type:"template_literal",parts:i,...v(n)})}function zg(e,i){return new e({type:"lazy",getter:i})}function Ag(e,i){return new e({type:"promise",innerType:i})}function Hu(e,i,n){let a=v(n);return a.abort??(a.abort=!0),new e({type:"custom",check:"custom",fn:i,...a})}function Ku(e,i,n){return new e({type:"custom",check:"custom",fn:i,...v(n)})}function Yu(e,i){let n=Qu((a)=>{return a.addIssue=(t)=>{if(typeof t==="string")a.issues.push(At(t,a.value,n._zod.def));else{let r=t;if(r.fatal)r.continue=!1;r.code??(r.code="custom"),r.input??(r.input=a.value),r.inst??(r.inst=n),r.continue??(r.continue=!n._zod.def.abort),a.issues.push(At(r))}},e(a.value,a)},i);return n}function Qu(e,i){let n=new D({check:"custom",...v(i)});return n._zod.check=e,n}function el(e){let i=new D({check:"describe"});return i._zod.onattach=[(n)=>{let a=K.get(n)??{};K.add(n,{...a,description:e})}],i._zod.check=()=>{},i}function tl(e){let i=new D({check:"meta"});return i._zod.onattach=[(n)=>{let a=K.get(n)??{};K.add(n,{...a,...e})}],i._zod.check=()=>{},i}function il(e,i){let n=v(i),a=n.truthy??["true","1","yes","on","y","enabled"],t=n.falsy??["false","0","no","off","n","disabled"];if(n.case!=="sensitive")a=a.map((p)=>typeof p==="string"?p.toLowerCase():p),t=t.map((p)=>typeof p==="string"?p.toLowerCase():p);let r=new Set(a),o=new Set(t),u=e.Codec??hn,l=e.Boolean??dn,c=new(e.String??ut)({type:"string",error:n.error}),d=new l({type:"boolean",error:n.error}),f=new u({type:"pipe",in:c,out:d,transform:(p,y)=>{let w=p;if(n.case!=="sensitive")w=w.toLowerCase();if(r.has(w))return!0;else if(o.has(w))return!1;else return y.issues.push({code:"invalid_value",expected:"stringbool",values:[...r,...o],input:y.value,inst:f,continue:!1}),{}},reverseTransform:(p,y)=>{if(p===!0)return a[0]||"true";else return t[0]||"false"},error:n.error});return f}function mt(e,i,n,a={}){let t=v(a),r={...v(a),check:"string_format",type:"string",format:i,fn:typeof n==="function"?n:(o)=>n.test(o),...t};if(n instanceof RegExp)r.pattern=n;return new e(r)}function Ae(e){let i=e?.target??"draft-2020-12";if(i==="draft-4")i="draft-04";if(i==="draft-7")i="draft-07";return{processors:e.processors??{},metadataRegistry:e?.metadata??K,target:i,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function U(e,i,n={path:[],schemaPath:[]}){var a;let t=e._zod.def,r=i.seen.get(e);if(r){if(r.count++,n.schemaPath.includes(e))r.cycle=n.path;return r.schema}let o={schema:{},count:1,cycle:void 0,path:n.path};i.seen.set(e,o);let u=e._zod.toJSONSchema?.();if(u)o.schema=u;else{let c={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(i,o.schema,c);else{let f=o.schema,p=i.processors[t.type];if(!p)throw Error(`[toJSONSchema]: Non-representable type encountered: ${t.type}`);p(e,i,f,c)}let d=e._zod.parent;if(d){if(!o.ref)o.ref=d;U(d,i,c),i.seen.get(d).isParent=!0}}let l=i.metadataRegistry.get(e);if(l)Object.assign(o.schema,l);if(i.io==="input"&&M(e))delete o.schema.examples,delete o.schema.default;if(i.io==="input"&&"_prefault"in o.schema)(a=o.schema).default??(a.default=o.schema._prefault);return delete o.schema._prefault,i.seen.get(e).schema}function Pe(e,i){let n=e.seen.get(i);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let a=new Map;for(let o of e.seen.entries()){let u=e.metadataRegistry.get(o[0])?.id;if(u){let l=a.get(u);if(l&&l!==o[0])throw Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);a.set(u,o[0])}}let t=(o)=>{let u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(o[0])?.id,f=e.external.uri??((y)=>y);if(d)return{ref:f(d)};let p=o[1].defId??o[1].schema.id??`schema${e.counter++}`;return o[1].defId=p,{defId:p,ref:`${f("__shared")}#/${u}/${p}`}}if(o[1]===n)return{ref:"#"};let l=`#/${u}/`,c=o[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:l+c}},r=(o)=>{if(o[1].schema.$ref)return;let u=o[1],{ref:l,defId:c}=t(o);if(u.def={...u.schema},c)u.defId=c;let d=u.schema;for(let f in d)delete d[f];d.$ref=l};if(e.cycles==="throw")for(let o of e.seen.entries()){let u=o[1];if(u.cycle)throw Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
64
64
 
65
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let o of e.seen.entries()){let u=o[1];if(i===o[0]){r(o);continue}if(e.external){let l=e.external.registry.get(o[0])?.id;if(i!==o[0]&&l){r(o);continue}}if(e.metadataRegistry.get(o[0])?.id){r(o);continue}if(u.cycle){r(o);continue}if(u.count>1){if(e.reused==="ref"){r(o);continue}}}}function De(e,i){let n=e.seen.get(i);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let a=(u)=>{let l=e.seen.get(u);if(l.ref===null)return;let c=l.def??l.schema,d={...c},f=l.ref;if(l.ref=null,f){a(f);let y=e.seen.get(f),w=y.schema;if(w.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"))c.allOf=c.allOf??[],c.allOf.push(w);else Object.assign(c,w);if(Object.assign(c,d),u._zod.parent===f)for(let O in c){if(O==="$ref"||O==="allOf")continue;if(!(O in d))delete c[O]}if(w.$ref&&y.def)for(let O in c){if(O==="$ref"||O==="allOf")continue;if(O in y.def&&JSON.stringify(c[O])===JSON.stringify(y.def[O]))delete c[O]}}let p=u._zod.parent;if(p&&p!==f){a(p);let y=e.seen.get(p);if(y?.schema.$ref){if(c.$ref=y.schema.$ref,y.def)for(let w in c){if(w==="$ref"||w==="allOf")continue;if(w in y.def&&JSON.stringify(c[w])===JSON.stringify(y.def[w]))delete c[w]}}}e.override({zodSchema:u,jsonSchema:c,path:l.path??[]})};for(let u of[...e.seen.entries()].reverse())a(u[0]);let t={};if(e.target==="draft-2020-12")t.$schema="https://json-schema.org/draft/2020-12/schema";else if(e.target==="draft-07")t.$schema="http://json-schema.org/draft-07/schema#";else if(e.target==="draft-04")t.$schema="http://json-schema.org/draft-04/schema#";else if(e.target==="openapi-3.0");if(e.external?.uri){let u=e.external.registry.get(i)?.id;if(!u)throw Error("Schema is missing an `id` property");t.$id=e.external.uri(u)}Object.assign(t,n.def??n.schema);let r=e.metadataRegistry.get(i)?.id;if(r!==void 0&&t.id===r)delete t.id;let o=e.external?.defs??{};for(let u of e.seen.entries()){let l=u[1];if(l.def&&l.defId){if(l.def.id===l.defId)delete l.def.id;o[l.defId]=l.def}}if(e.external);else if(Object.keys(o).length>0)if(e.target==="draft-2020-12")t.$defs=o;else t.definitions=o;try{let u=JSON.parse(JSON.stringify(t));return Object.defineProperty(u,"~standard",{value:{...i["~standard"],jsonSchema:{input:Ve(i,"input",e.processors),output:Ve(i,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch(u){throw Error("Error converting schema to JSON.")}}function M(e,i){let n=i??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let a=e._zod.def;if(a.type==="transform")return!0;if(a.type==="array")return M(a.element,n);if(a.type==="set")return M(a.valueType,n);if(a.type==="lazy")return M(a.getter(),n);if(a.type==="promise"||a.type==="optional"||a.type==="nonoptional"||a.type==="nullable"||a.type==="readonly"||a.type==="default"||a.type==="prefault")return M(a.innerType,n);if(a.type==="intersection")return M(a.left,n)||M(a.right,n);if(a.type==="record"||a.type==="map")return M(a.keyType,n)||M(a.valueType,n);if(a.type==="pipe"){if(e._zod.traits.has("$ZodCodec"))return!0;return M(a.in,n)||M(a.out,n)}if(a.type==="object"){for(let t in a.shape)if(M(a.shape[t],n))return!0;return!1}if(a.type==="union"){for(let t of a.options)if(M(t,n))return!0;return!1}if(a.type==="tuple"){for(let t of a.items)if(M(t,n))return!0;if(a.rest&&M(a.rest,n))return!0;return!1}return!1}var nl=(e,i={})=>(n)=>{let a=Ae({...n,processors:i});return U(e,a),Pe(a,e),De(a,e)},Ve=(e,i,n={})=>(a)=>{let{libraryOptions:t,target:r}=a??{},o=Ae({...t??{},target:r,io:i,processors:n});return U(e,o),Pe(o,e),De(o,e)},Pg={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},rl=(e,i,n,a)=>{let t=n;t.type="string";let{minimum:r,maximum:o,format:u,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof r==="number")t.minLength=r;if(typeof o==="number")t.maxLength=o;if(u){if(t.format=Pg[u]??u,t.format==="")delete t.format;if(u==="time")delete t.format}if(c)t.contentEncoding=c;if(l&&l.size>0){let d=[...l];if(d.length===1)t.pattern=d[0].source;else if(d.length>1)t.allOf=[...d.map((f)=>({...i.target==="draft-07"||i.target==="draft-04"||i.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))]}},al=(e,i,n,a)=>{let t=n,{minimum:r,maximum:o,format:u,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:d}=e._zod.bag;if(typeof u==="string"&&u.includes("int"))t.type="integer";else t.type="number";let f=typeof d==="number"&&d>=(r??Number.NEGATIVE_INFINITY),p=typeof c==="number"&&c<=(o??Number.POSITIVE_INFINITY),y=i.target==="draft-04"||i.target==="openapi-3.0";if(f)if(y)t.minimum=d,t.exclusiveMinimum=!0;else t.exclusiveMinimum=d;else if(typeof r==="number")t.minimum=r;if(p)if(y)t.maximum=c,t.exclusiveMaximum=!0;else t.exclusiveMaximum=c;else if(typeof o==="number")t.maximum=o;if(typeof l==="number")t.multipleOf=l},ol=(e,i,n,a)=>{n.type="boolean"},sl=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},ul=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},ll=(e,i,n,a)=>{if(i.target==="openapi-3.0")n.type="string",n.nullable=!0,n.enum=[null];else n.type="null"},cl=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},dl=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},ml=(e,i,n,a)=>{n.not={}},fl=(e,i,n,a)=>{},pl=(e,i,n,a)=>{},gl=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},hl=(e,i,n,a)=>{let t=e._zod.def,r=Ji(t.entries);if(r.every((o)=>typeof o==="number"))n.type="number";if(r.every((o)=>typeof o==="string"))n.type="string";n.enum=r},vl=(e,i,n,a)=>{let t=e._zod.def,r=[];for(let o of t.values)if(o===void 0){if(i.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof o==="bigint")if(i.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else r.push(Number(o));else r.push(o);if(r.length===0);else if(r.length===1){let o=r[0];if(n.type=o===null?"null":typeof o,i.target==="draft-04"||i.target==="openapi-3.0")n.enum=[o];else n.const=o}else{if(r.every((o)=>typeof o==="number"))n.type="number";if(r.every((o)=>typeof o==="string"))n.type="string";if(r.every((o)=>typeof o==="boolean"))n.type="boolean";if(r.every((o)=>o===null))n.type="null";n.enum=r}},yl=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},bl=(e,i,n,a)=>{let t=n,r=e._zod.pattern;if(!r)throw Error("Pattern not found in template literal");t.type="string",t.pattern=r.source},_l=(e,i,n,a)=>{let t=n,r={type:"string",format:"binary",contentEncoding:"binary"},{minimum:o,maximum:u,mime:l}=e._zod.bag;if(o!==void 0)r.minLength=o;if(u!==void 0)r.maxLength=u;if(l)if(l.length===1)r.contentMediaType=l[0],Object.assign(t,r);else Object.assign(t,r),t.anyOf=l.map((c)=>({contentMediaType:c}));else Object.assign(t,r)},kl=(e,i,n,a)=>{n.type="boolean"},Il=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},wl=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},Sl=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},xl=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},El=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},$l=(e,i,n,a)=>{let t=n,r=e._zod.def,{minimum:o,maximum:u}=e._zod.bag;if(typeof o==="number")t.minItems=o;if(typeof u==="number")t.maxItems=u;t.type="array",t.items=U(r.element,i,{...a,path:[...a.path,"items"]})},Tl=(e,i,n,a)=>{let t=n,r=e._zod.def;t.type="object",t.properties={};let o=r.shape;for(let c in o)t.properties[c]=U(o[c],i,{...a,path:[...a.path,"properties",c]});let u=new Set(Object.keys(o)),l=new Set([...u].filter((c)=>{let d=r.shape[c]._zod;if(i.io==="input")return d.optin===void 0;else return d.optout===void 0}));if(l.size>0)t.required=Array.from(l);if(r.catchall?._zod.def.type==="never")t.additionalProperties=!1;else if(!r.catchall){if(i.io==="output")t.additionalProperties=!1}else if(r.catchall)t.additionalProperties=U(r.catchall,i,{...a,path:[...a.path,"additionalProperties"]})},Gn=(e,i,n,a)=>{let t=e._zod.def,r=t.inclusive===!1,o=t.options.map((u,l)=>U(u,i,{...a,path:[...a.path,r?"oneOf":"anyOf",l]}));if(r)n.oneOf=o;else n.anyOf=o},Ol=(e,i,n,a)=>{let t=e._zod.def,r=U(t.left,i,{...a,path:[...a.path,"allOf",0]}),o=U(t.right,i,{...a,path:[...a.path,"allOf",1]}),u=(c)=>("allOf"in c)&&Object.keys(c).length===1,l=[...u(r)?r.allOf:[r],...u(o)?o.allOf:[o]];n.allOf=l},Nl=(e,i,n,a)=>{let t=n,r=e._zod.def;t.type="array";let o=i.target==="draft-2020-12"?"prefixItems":"items",u=i.target==="draft-2020-12"?"items":i.target==="openapi-3.0"?"items":"additionalItems",l=r.items.map((p,y)=>U(p,i,{...a,path:[...a.path,o,y]})),c=r.rest?U(r.rest,i,{...a,path:[...a.path,u,...i.target==="openapi-3.0"?[r.items.length]:[]]}):null;if(i.target==="draft-2020-12"){if(t.prefixItems=l,c)t.items=c}else if(i.target==="openapi-3.0"){if(t.items={anyOf:l},c)t.items.anyOf.push(c);if(t.minItems=l.length,!c)t.maxItems=l.length}else if(t.items=l,c)t.additionalItems=c;let{minimum:d,maximum:f}=e._zod.bag;if(typeof d==="number")t.minItems=d;if(typeof f==="number")t.maxItems=f},Ul=(e,i,n,a)=>{let t=n,r=e._zod.def;t.type="object";let o=r.keyType,u=o._zod.bag?.patterns;if(r.mode==="loose"&&u&&u.size>0){let c=U(r.valueType,i,{...a,path:[...a.path,"patternProperties","*"]});t.patternProperties={};for(let d of u)t.patternProperties[d.source]=c}else{if(i.target==="draft-07"||i.target==="draft-2020-12")t.propertyNames=U(r.keyType,i,{...a,path:[...a.path,"propertyNames"]});t.additionalProperties=U(r.valueType,i,{...a,path:[...a.path,"additionalProperties"]})}let l=o._zod.values;if(l){let c=[...l].filter((d)=>typeof d==="string"||typeof d==="number");if(c.length>0)t.required=c}},zl=(e,i,n,a)=>{let t=e._zod.def,r=U(t.innerType,i,a),o=i.seen.get(e);if(i.target==="openapi-3.0")o.ref=t.innerType,n.nullable=!0;else n.anyOf=[r,{type:"null"}]},Al=(e,i,n,a)=>{let t=e._zod.def;U(t.innerType,i,a);let r=i.seen.get(e);r.ref=t.innerType},Pl=(e,i,n,a)=>{let t=e._zod.def;U(t.innerType,i,a);let r=i.seen.get(e);r.ref=t.innerType,n.default=JSON.parse(JSON.stringify(t.defaultValue))},Dl=(e,i,n,a)=>{let t=e._zod.def;U(t.innerType,i,a);let r=i.seen.get(e);if(r.ref=t.innerType,i.io==="input")n._prefault=JSON.parse(JSON.stringify(t.defaultValue))},jl=(e,i,n,a)=>{let t=e._zod.def;U(t.innerType,i,a);let r=i.seen.get(e);r.ref=t.innerType;let o;try{o=t.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=o},Rl=(e,i,n,a)=>{let t=e._zod.def,r=t.in._zod.traits.has("$ZodTransform"),o=i.io==="input"?r?t.out:t.in:t.out;U(o,i,a);let u=i.seen.get(e);u.ref=o},Cl=(e,i,n,a)=>{let t=e._zod.def;U(t.innerType,i,a);let r=i.seen.get(e);r.ref=t.innerType,n.readOnly=!0},Ll=(e,i,n,a)=>{let t=e._zod.def;U(t.innerType,i,a);let r=i.seen.get(e);r.ref=t.innerType},Wn=(e,i,n,a)=>{let t=e._zod.def;U(t.innerType,i,a);let r=i.seen.get(e);r.ref=t.innerType},Zl=(e,i,n,a)=>{let t=e._zod.innerType;U(t,i,a);let r=i.seen.get(e);r.ref=t},Zi={string:rl,number:al,boolean:ol,bigint:sl,symbol:ul,null:ll,undefined:cl,void:dl,never:ml,any:fl,unknown:pl,date:gl,enum:hl,literal:vl,nan:yl,template_literal:bl,file:_l,success:kl,custom:Il,function:wl,transform:Sl,map:xl,set:El,array:$l,object:Tl,union:Gn,intersection:Ol,tuple:Nl,record:Ul,nullable:zl,nonoptional:Al,default:Pl,prefault:Dl,catch:jl,pipe:Rl,readonly:Cl,promise:Ll,optional:Wn,lazy:Zl};function Ml(e,i){if("_idmap"in e){let a=e,t=Ae({...i,processors:Zi}),r={};for(let l of a._idmap.entries()){let[c,d]=l;U(d,t)}let o={},u={registry:a,uri:i?.uri,defs:r};t.external=u;for(let l of a._idmap.entries()){let[c,d]=l;Pe(t,d),o[c]=De(t,d)}if(Object.keys(r).length>0){let l=t.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[l]:r}}return{schemas:o}}let n=Ae({...i,processors:Zi});return U(e,n),Pe(n,e),De(n,e)}class Bl{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 i=e?.target??"draft-2020-12";if(i==="draft-4")i="draft-04";if(i==="draft-7")i="draft-07";this.ctx=Ae({processors:Zi,target:i,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,i={path:[],schemaPath:[]}){return U(e,this.ctx,i)}emit(e,i){if(i){if(i.cycles)this.ctx.cycles=i.cycles;if(i.reused)this.ctx.reused=i.reused;if(i.external)this.ctx.external=i.external}Pe(this.ctx,e);let n=De(this.ctx,e),{"~standard":a,...t}=n;return t}}var Dg={},Fl={};ae(Fl,{xor:()=>Yc,xid:()=>kc,void:()=>Wc,uuidv7:()=>fc,uuidv6:()=>mc,uuidv4:()=>dc,uuid:()=>cc,url:()=>pc,unknown:()=>be,union:()=>wi,undefined:()=>Jc,ulid:()=>_c,uint64:()=>Bc,uint32:()=>Lc,tuple:()=>gr,transform:()=>xi,templateLiteral:()=>md,symbol:()=>Fc,superRefine:()=>Fr,success:()=>ud,stringbool:()=>bd,stringFormat:()=>zc,string:()=>qe,strictObject:()=>Hc,set:()=>nd,refine:()=>Br,record:()=>hr,readonly:()=>jr,promise:()=>fd,preprocess:()=>kd,prefault:()=>Tr,pipe:()=>Rt,partialRecord:()=>ed,optional:()=>He,object:()=>Xc,number:()=>Qn,nullish:()=>sd,nullable:()=>Ke,null:()=>rr,nonoptional:()=>Or,never:()=>ki,nativeEnum:()=>rd,nanoid:()=>vc,nan:()=>ld,meta:()=>vd,map:()=>id,mac:()=>Sc,looseRecord:()=>td,looseObject:()=>Kc,literal:()=>ad,lazy:()=>Lr,ksuid:()=>Ic,keyof:()=>qc,jwt:()=>Uc,json:()=>_d,ipv6:()=>xc,ipv4:()=>wc,invertCodec:()=>dd,intersection:()=>fr,int64:()=>Mc,int32:()=>Cc,int:()=>jt,instanceof:()=>yd,httpUrl:()=>gc,hostname:()=>Ac,hex:()=>Pc,hash:()=>Dc,guid:()=>lc,function:()=>Ct,float64:()=>Rc,float32:()=>jc,file:()=>od,exactOptional:()=>wr,enum:()=>Si,emoji:()=>hc,email:()=>uc,e164:()=>Nc,discriminatedUnion:()=>Qc,describe:()=>hd,date:()=>Vc,custom:()=>gd,cuid2:()=>bc,cuid:()=>yc,codec:()=>cd,cidrv6:()=>$c,cidrv4:()=>Ec,check:()=>pd,catch:()=>zr,boolean:()=>er,bigint:()=>Zc,base64url:()=>Oc,base64:()=>Tc,array:()=>bt,any:()=>Gc,_function:()=>Ct,_default:()=>Er,_ZodString:()=>ni,ZodXor:()=>cr,ZodXID:()=>ci,ZodVoid:()=>ur,ZodUnknown:()=>or,ZodUnion:()=>kt,ZodUndefined:()=>ir,ZodUUID:()=>ie,ZodURL:()=>gt,ZodULID:()=>li,ZodType:()=>x,ZodTuple:()=>pr,ZodTransform:()=>kr,ZodTemplateLiteral:()=>Rr,ZodSymbol:()=>tr,ZodSuccess:()=>Nr,ZodStringFormat:()=>A,ZodString:()=>pt,ZodSet:()=>yr,ZodRecord:()=>je,ZodReadonly:()=>Dr,ZodPromise:()=>Zr,ZodPreprocess:()=>Pr,ZodPrefault:()=>$r,ZodPipe:()=>It,ZodOptional:()=>Ei,ZodObject:()=>_t,ZodNumberFormat:()=>Ie,ZodNumber:()=>ht,ZodNullable:()=>Sr,ZodNull:()=>nr,ZodNonOptional:()=>$i,ZodNever:()=>sr,ZodNanoID:()=>oi,ZodNaN:()=>Ar,ZodMap:()=>vr,ZodMAC:()=>Yn,ZodLiteral:()=>br,ZodLazy:()=>Cr,ZodKSUID:()=>di,ZodJWT:()=>bi,ZodIntersection:()=>mr,ZodIPv6:()=>fi,ZodIPv4:()=>mi,ZodGUID:()=>Xe,ZodFunction:()=>Mr,ZodFile:()=>_r,ZodExactOptional:()=>Ir,ZodEnum:()=>Re,ZodEmoji:()=>ai,ZodEmail:()=>ri,ZodE164:()=>yi,ZodDiscriminatedUnion:()=>dr,ZodDefault:()=>xr,ZodDate:()=>Ii,ZodCustomStringFormat:()=>Le,ZodCustom:()=>St,ZodCodec:()=>wt,ZodCatch:()=>Ur,ZodCUID2:()=>ui,ZodCUID:()=>si,ZodCIDRv6:()=>gi,ZodCIDRv4:()=>pi,ZodBoolean:()=>vt,ZodBigIntFormat:()=>_i,ZodBigInt:()=>yt,ZodBase64URL:()=>vi,ZodBase64:()=>hi,ZodArray:()=>lr,ZodAny:()=>ar});var Jl={};ae(Jl,{uppercase:()=>Vt,trim:()=>Qt,toUpperCase:()=>ti,toLowerCase:()=>ei,startsWith:()=>Xt,slugify:()=>ii,size:()=>lt,regex:()=>Gt,property:()=>Jn,positive:()=>Zn,overwrite:()=>se,normalize:()=>Yt,nonpositive:()=>Bn,nonnegative:()=>Fn,negative:()=>Mn,multipleOf:()=>ze,minSize:()=>fe,minLength:()=>ye,mime:()=>Kt,maxSize:()=>Ce,maxLength:()=>ct,lte:()=>Y,lt:()=>de,lowercase:()=>Wt,length:()=>dt,includes:()=>qt,gte:()=>F,gt:()=>me,endsWith:()=>Ht});var Vn={};ae(Vn,{time:()=>Vl,duration:()=>ql,datetime:()=>Gl,date:()=>Wl,ZodISOTime:()=>Hn,ZodISODuration:()=>Kn,ZodISODateTime:()=>qn,ZodISODate:()=>Xn});var qn=m("ZodISODateTime",(e,i)=>{cs.init(e,i),A.init(e,i)});function Gl(e){return ku(qn,e)}var Xn=m("ZodISODate",(e,i)=>{ds.init(e,i),A.init(e,i)});function Wl(e){return Iu(Xn,e)}var Hn=m("ZodISOTime",(e,i)=>{ms.init(e,i),A.init(e,i)});function Vl(e){return wu(Hn,e)}var Kn=m("ZodISODuration",(e,i)=>{fs.init(e,i),A.init(e,i)});function ql(e){return Su(Kn,e)}var Xl=(e,i)=>{Wi.init(e,i),e.name="ZodError",Object.defineProperties(e,{format:{value:(n)=>qi(e,n)},flatten:{value:(n)=>Vi(e,n)},addIssue:{value:(n)=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Ut,2)}},addIssues:{value:(n)=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Ut,2)}},isEmpty:{get(){return e.issues.length===0}}})},jg=m("ZodError",Xl),V=m("ZodError",Xl,{Parent:Error}),Hl=tt(V),Kl=it(V),Yl=nt(V),Ql=rt(V),ec=Xi(V),tc=Hi(V),ic=Ki(V),nc=Yi(V),rc=Qi(V),ac=en(V),oc=tn(V),sc=nn(V),$a=new WeakMap;function ft(e,i,n){let a=Object.getPrototypeOf(e),t=$a.get(a);if(!t)t=new Set,$a.set(a,t);if(t.has(i))return;t.add(i);for(let r in n){let o=n[r];Object.defineProperty(a,r,{configurable:!0,enumerable:!1,get(){let u=o.bind(this);return Object.defineProperty(this,r,{configurable:!0,writable:!0,enumerable:!0,value:u}),u},set(u){Object.defineProperty(this,r,{configurable:!0,writable:!0,enumerable:!0,value:u})}})}}var x=m("ZodType",(e,i)=>{return S.init(e,i),Object.assign(e["~standard"],{jsonSchema:{input:Ve(e,"input"),output:Ve(e,"output")}}),e.toJSONSchema=nl(e,{}),e.def=i,e.type=i.type,Object.defineProperty(e,"_def",{value:i}),e.parse=(n,a)=>Hl(e,n,a,{callee:e.parse}),e.safeParse=(n,a)=>Yl(e,n,a),e.parseAsync=async(n,a)=>Kl(e,n,a,{callee:e.parseAsync}),e.safeParseAsync=async(n,a)=>Ql(e,n,a),e.spa=e.safeParseAsync,e.encode=(n,a)=>ec(e,n,a),e.decode=(n,a)=>tc(e,n,a),e.encodeAsync=async(n,a)=>ic(e,n,a),e.decodeAsync=async(n,a)=>nc(e,n,a),e.safeEncode=(n,a)=>rc(e,n,a),e.safeDecode=(n,a)=>ac(e,n,a),e.safeEncodeAsync=async(n,a)=>oc(e,n,a),e.safeDecodeAsync=async(n,a)=>sc(e,n,a),ft(e,"ZodType",{check(...n){let a=this.def;return this.clone(E.mergeDefs(a,{checks:[...a.checks??[],...n.map((t)=>typeof t==="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,a){return Q(this,n,a)},brand(){return this},register(n,a){return n.add(this,a),this},refine(n,a){return this.check(Br(n,a))},superRefine(n,a){return this.check(Fr(n,a))},overwrite(n){return this.check(se(n))},optional(){return He(this)},exactOptional(){return wr(this)},nullable(){return Ke(this)},nullish(){return He(Ke(this))},nonoptional(n){return Or(this,n)},array(){return bt(this)},or(n){return wi([this,n])},and(n){return fr(this,n)},transform(n){return Rt(this,xi(n))},default(n){return Er(this,n)},prefault(n){return Tr(this,n)},catch(n){return zr(this,n)},pipe(n){return Rt(this,n)},readonly(){return jr(this)},describe(n){let a=this.clone();return K.add(a,{description:n}),a},meta(...n){if(n.length===0)return K.get(this);let a=this.clone();return K.add(a,n[0]),a},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return K.get(e)?.description},configurable:!0}),e}),ni=m("_ZodString",(e,i)=>{ut.init(e,i),x.init(e,i),e._zod.processJSONSchema=(a,t,r)=>rl(e,a,t,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,ft(e,"_ZodString",{regex(...a){return this.check(Gt(...a))},includes(...a){return this.check(qt(...a))},startsWith(...a){return this.check(Xt(...a))},endsWith(...a){return this.check(Ht(...a))},min(...a){return this.check(ye(...a))},max(...a){return this.check(ct(...a))},length(...a){return this.check(dt(...a))},nonempty(...a){return this.check(ye(1,...a))},lowercase(a){return this.check(Wt(a))},uppercase(a){return this.check(Vt(a))},trim(){return this.check(Qt())},normalize(...a){return this.check(Yt(...a))},toLowerCase(){return this.check(ei())},toUpperCase(){return this.check(ti())},slugify(){return this.check(ii())}})}),pt=m("ZodString",(e,i)=>{ut.init(e,i),ni.init(e,i),e.email=(n)=>e.check(_n(ri,n)),e.url=(n)=>e.check(Jt(gt,n)),e.jwt=(n)=>e.check(Ln(bi,n)),e.emoji=(n)=>e.check(xn(ai,n)),e.guid=(n)=>e.check(Dt(Xe,n)),e.uuid=(n)=>e.check(kn(ie,n)),e.uuidv4=(n)=>e.check(In(ie,n)),e.uuidv6=(n)=>e.check(wn(ie,n)),e.uuidv7=(n)=>e.check(Sn(ie,n)),e.nanoid=(n)=>e.check(En(oi,n)),e.guid=(n)=>e.check(Dt(Xe,n)),e.cuid=(n)=>e.check($n(si,n)),e.cuid2=(n)=>e.check(Tn(ui,n)),e.ulid=(n)=>e.check(On(li,n)),e.base64=(n)=>e.check(jn(hi,n)),e.base64url=(n)=>e.check(Rn(vi,n)),e.xid=(n)=>e.check(Nn(ci,n)),e.ksuid=(n)=>e.check(Un(di,n)),e.ipv4=(n)=>e.check(zn(mi,n)),e.ipv6=(n)=>e.check(An(fi,n)),e.cidrv4=(n)=>e.check(Pn(pi,n)),e.cidrv6=(n)=>e.check(Dn(gi,n)),e.e164=(n)=>e.check(Cn(yi,n)),e.datetime=(n)=>e.check(Gl(n)),e.date=(n)=>e.check(Wl(n)),e.time=(n)=>e.check(Vl(n)),e.duration=(n)=>e.check(ql(n))});function qe(e){return vu(pt,e)}var A=m("ZodStringFormat",(e,i)=>{z.init(e,i),ni.init(e,i)}),ri=m("ZodEmail",(e,i)=>{ts.init(e,i),A.init(e,i)});function uc(e){return _n(ri,e)}var Xe=m("ZodGUID",(e,i)=>{Qo.init(e,i),A.init(e,i)});function lc(e){return Dt(Xe,e)}var ie=m("ZodUUID",(e,i)=>{es.init(e,i),A.init(e,i)});function cc(e){return kn(ie,e)}function dc(e){return In(ie,e)}function mc(e){return wn(ie,e)}function fc(e){return Sn(ie,e)}var gt=m("ZodURL",(e,i)=>{is.init(e,i),A.init(e,i)});function pc(e){return Jt(gt,e)}function gc(e){return Jt(gt,{protocol:ce.httpProtocol,hostname:ce.domain,...E.normalizeParams(e)})}var ai=m("ZodEmoji",(e,i)=>{ns.init(e,i),A.init(e,i)});function hc(e){return xn(ai,e)}var oi=m("ZodNanoID",(e,i)=>{rs.init(e,i),A.init(e,i)});function vc(e){return En(oi,e)}var si=m("ZodCUID",(e,i)=>{as.init(e,i),A.init(e,i)});function yc(e){return $n(si,e)}var ui=m("ZodCUID2",(e,i)=>{os.init(e,i),A.init(e,i)});function bc(e){return Tn(ui,e)}var li=m("ZodULID",(e,i)=>{ss.init(e,i),A.init(e,i)});function _c(e){return On(li,e)}var ci=m("ZodXID",(e,i)=>{us.init(e,i),A.init(e,i)});function kc(e){return Nn(ci,e)}var di=m("ZodKSUID",(e,i)=>{ls.init(e,i),A.init(e,i)});function Ic(e){return Un(di,e)}var mi=m("ZodIPv4",(e,i)=>{ps.init(e,i),A.init(e,i)});function wc(e){return zn(mi,e)}var Yn=m("ZodMAC",(e,i)=>{hs.init(e,i),A.init(e,i)});function Sc(e){return bu(Yn,e)}var fi=m("ZodIPv6",(e,i)=>{gs.init(e,i),A.init(e,i)});function xc(e){return An(fi,e)}var pi=m("ZodCIDRv4",(e,i)=>{vs.init(e,i),A.init(e,i)});function Ec(e){return Pn(pi,e)}var gi=m("ZodCIDRv6",(e,i)=>{ys.init(e,i),A.init(e,i)});function $c(e){return Dn(gi,e)}var hi=m("ZodBase64",(e,i)=>{bs.init(e,i),A.init(e,i)});function Tc(e){return jn(hi,e)}var vi=m("ZodBase64URL",(e,i)=>{ks.init(e,i),A.init(e,i)});function Oc(e){return Rn(vi,e)}var yi=m("ZodE164",(e,i)=>{Is.init(e,i),A.init(e,i)});function Nc(e){return Cn(yi,e)}var bi=m("ZodJWT",(e,i)=>{Ss.init(e,i),A.init(e,i)});function Uc(e){return Ln(bi,e)}var Le=m("ZodCustomStringFormat",(e,i)=>{xs.init(e,i),A.init(e,i)});function zc(e,i,n={}){return mt(Le,e,i,n)}function Ac(e){return mt(Le,"hostname",ce.hostname,e)}function Pc(e){return mt(Le,"hex",ce.hex,e)}function Dc(e,i){let n=i?.enc??"hex",a=`${e}_${n}`,t=ce[a];if(!t)throw Error(`Unrecognized hash format: ${a}`);return mt(Le,a,t,i)}var ht=m("ZodNumber",(e,i)=>{cn.init(e,i),x.init(e,i),e._zod.processJSONSchema=(a,t,r)=>al(e,a,t,r),ft(e,"ZodNumber",{gt(a,t){return this.check(me(a,t))},gte(a,t){return this.check(F(a,t))},min(a,t){return this.check(F(a,t))},lt(a,t){return this.check(de(a,t))},lte(a,t){return this.check(Y(a,t))},max(a,t){return this.check(Y(a,t))},int(a){return this.check(jt(a))},safe(a){return this.check(jt(a))},positive(a){return this.check(me(0,a))},nonnegative(a){return this.check(F(0,a))},negative(a){return this.check(de(0,a))},nonpositive(a){return this.check(Y(0,a))},multipleOf(a,t){return this.check(ze(a,t))},step(a,t){return this.check(ze(a,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??0.5),e.isFinite=!0,e.format=n.format??null});function Qn(e){return xu(ht,e)}var Ie=m("ZodNumberFormat",(e,i)=>{Es.init(e,i),ht.init(e,i)});function jt(e){return $u(Ie,e)}function jc(e){return Tu(Ie,e)}function Rc(e){return Ou(Ie,e)}function Cc(e){return Nu(Ie,e)}function Lc(e){return Uu(Ie,e)}var vt=m("ZodBoolean",(e,i)=>{dn.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>ol(e,n,a,t)});function er(e){return zu(vt,e)}var yt=m("ZodBigInt",(e,i)=>{mn.init(e,i),x.init(e,i),e._zod.processJSONSchema=(a,t,r)=>sl(e,a,t,r),e.gte=(a,t)=>e.check(F(a,t)),e.min=(a,t)=>e.check(F(a,t)),e.gt=(a,t)=>e.check(me(a,t)),e.gte=(a,t)=>e.check(F(a,t)),e.min=(a,t)=>e.check(F(a,t)),e.lt=(a,t)=>e.check(de(a,t)),e.lte=(a,t)=>e.check(Y(a,t)),e.max=(a,t)=>e.check(Y(a,t)),e.positive=(a)=>e.check(me(BigInt(0),a)),e.negative=(a)=>e.check(de(BigInt(0),a)),e.nonpositive=(a)=>e.check(Y(BigInt(0),a)),e.nonnegative=(a)=>e.check(F(BigInt(0),a)),e.multipleOf=(a,t)=>e.check(ze(a,t));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function Zc(e){return Pu(yt,e)}var _i=m("ZodBigIntFormat",(e,i)=>{$s.init(e,i),yt.init(e,i)});function Mc(e){return ju(_i,e)}function Bc(e){return Ru(_i,e)}var tr=m("ZodSymbol",(e,i)=>{Ts.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>ul(e,n,a,t)});function Fc(e){return Cu(tr,e)}var ir=m("ZodUndefined",(e,i)=>{Os.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>cl(e,n,a,t)});function Jc(e){return Lu(ir,e)}var nr=m("ZodNull",(e,i)=>{Ns.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>ll(e,n,a,t)});function rr(e){return Zu(nr,e)}var ar=m("ZodAny",(e,i)=>{Us.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>fl(e,n,a,t)});function Gc(){return Mu(ar)}var or=m("ZodUnknown",(e,i)=>{zs.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>pl(e,n,a,t)});function be(){return Bu(or)}var sr=m("ZodNever",(e,i)=>{As.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>ml(e,n,a,t)});function ki(e){return Fu(sr,e)}var ur=m("ZodVoid",(e,i)=>{Ps.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>dl(e,n,a,t)});function Wc(e){return Ju(ur,e)}var Ii=m("ZodDate",(e,i)=>{Ds.init(e,i),x.init(e,i),e._zod.processJSONSchema=(a,t,r)=>gl(e,a,t,r),e.min=(a,t)=>e.check(F(a,t)),e.max=(a,t)=>e.check(Y(a,t));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Vc(e){return Gu(Ii,e)}var lr=m("ZodArray",(e,i)=>{js.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>$l(e,n,a,t),e.element=i.element,ft(e,"ZodArray",{min(n,a){return this.check(ye(n,a))},nonempty(n){return this.check(ye(1,n))},max(n,a){return this.check(ct(n,a))},length(n,a){return this.check(dt(n,a))},unwrap(){return this.element}})});function bt(e,i){return qu(lr,e,i)}function qc(e){let i=e._zod.def.shape;return Si(Object.keys(i))}var _t=m("ZodObject",(e,i)=>{Zs.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Tl(e,n,a,t),E.defineLazy(e,"shape",()=>{return i.shape}),ft(e,"ZodObject",{keyof(){return Si(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:be()})},loose(){return this.clone({...this._zod.def,catchall:be()})},strict(){return this.clone({...this._zod.def,catchall:ki()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return E.extend(this,n)},safeExtend(n){return E.safeExtend(this,n)},merge(n){return E.merge(this,n)},pick(n){return E.pick(this,n)},omit(n){return E.omit(this,n)},partial(...n){return E.partial(Ei,this,n[0])},required(...n){return E.required($i,this,n[0])}})});function Xc(e,i){let n={type:"object",shape:e??{},...E.normalizeParams(i)};return new _t(n)}function Hc(e,i){return new _t({type:"object",shape:e,catchall:ki(),...E.normalizeParams(i)})}function Kc(e,i){return new _t({type:"object",shape:e,catchall:be(),...E.normalizeParams(i)})}var kt=m("ZodUnion",(e,i)=>{Ft.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Gn(e,n,a,t),e.options=i.options});function wi(e,i){return new kt({type:"union",options:e,...E.normalizeParams(i)})}var cr=m("ZodXor",(e,i)=>{kt.init(e,i),Ms.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Gn(e,n,a,t),e.options=i.options});function Yc(e,i){return new cr({type:"union",options:e,inclusive:!1,...E.normalizeParams(i)})}var dr=m("ZodDiscriminatedUnion",(e,i)=>{kt.init(e,i),Bs.init(e,i)});function Qc(e,i,n){return new dr({type:"union",options:i,discriminator:e,...E.normalizeParams(n)})}var mr=m("ZodIntersection",(e,i)=>{Fs.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Ol(e,n,a,t)});function fr(e,i){return new mr({type:"intersection",left:e,right:i})}var pr=m("ZodTuple",(e,i)=>{fn.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Nl(e,n,a,t),e.rest=(n)=>e.clone({...e._zod.def,rest:n})});function gr(e,i,n){let a=i instanceof S,t=a?n:i;return new pr({type:"tuple",items:e,rest:a?i:null,...E.normalizeParams(t)})}var je=m("ZodRecord",(e,i)=>{Js.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Ul(e,n,a,t),e.keyType=i.keyType,e.valueType=i.valueType});function hr(e,i,n){if(!i||!i._zod)return new je({type:"record",keyType:qe(),valueType:e,...E.normalizeParams(i)});return new je({type:"record",keyType:e,valueType:i,...E.normalizeParams(n)})}function ed(e,i,n){let a=Q(e);return a._zod.values=void 0,new je({type:"record",keyType:a,valueType:i,...E.normalizeParams(n)})}function td(e,i,n){return new je({type:"record",keyType:e,valueType:i,mode:"loose",...E.normalizeParams(n)})}var vr=m("ZodMap",(e,i)=>{Gs.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>xl(e,n,a,t),e.keyType=i.keyType,e.valueType=i.valueType,e.min=(...n)=>e.check(fe(...n)),e.nonempty=(n)=>e.check(fe(1,n)),e.max=(...n)=>e.check(Ce(...n)),e.size=(...n)=>e.check(lt(...n))});function id(e,i,n){return new vr({type:"map",keyType:e,valueType:i,...E.normalizeParams(n)})}var yr=m("ZodSet",(e,i)=>{Ws.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>El(e,n,a,t),e.min=(...n)=>e.check(fe(...n)),e.nonempty=(n)=>e.check(fe(1,n)),e.max=(...n)=>e.check(Ce(...n)),e.size=(...n)=>e.check(lt(...n))});function nd(e,i){return new yr({type:"set",valueType:e,...E.normalizeParams(i)})}var Re=m("ZodEnum",(e,i)=>{Vs.init(e,i),x.init(e,i),e._zod.processJSONSchema=(a,t,r)=>hl(e,a,t,r),e.enum=i.entries,e.options=Object.values(i.entries);let n=new Set(Object.keys(i.entries));e.extract=(a,t)=>{let r={};for(let o of a)if(n.has(o))r[o]=i.entries[o];else throw Error(`Key ${o} not found in enum`);return new Re({...i,checks:[],...E.normalizeParams(t),entries:r})},e.exclude=(a,t)=>{let r={...i.entries};for(let o of a)if(n.has(o))delete r[o];else throw Error(`Key ${o} not found in enum`);return new Re({...i,checks:[],...E.normalizeParams(t),entries:r})}});function Si(e,i){let n=Array.isArray(e)?Object.fromEntries(e.map((a)=>[a,a])):e;return new Re({type:"enum",entries:n,...E.normalizeParams(i)})}function rd(e,i){return new Re({type:"enum",entries:e,...E.normalizeParams(i)})}var br=m("ZodLiteral",(e,i)=>{qs.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>vl(e,n,a,t),e.values=new Set(i.values),Object.defineProperty(e,"value",{get(){if(i.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return i.values[0]}})});function ad(e,i){return new br({type:"literal",values:Array.isArray(e)?e:[e],...E.normalizeParams(i)})}var _r=m("ZodFile",(e,i)=>{Xs.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>_l(e,n,a,t),e.min=(n,a)=>e.check(fe(n,a)),e.max=(n,a)=>e.check(Ce(n,a)),e.mime=(n,a)=>e.check(Kt(Array.isArray(n)?n:[n],a))});function od(e){return Xu(_r,e)}var kr=m("ZodTransform",(e,i)=>{Hs.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Sl(e,n,a,t),e._zod.parse=(n,a)=>{if(a.direction==="backward")throw new Qe(e.constructor.name);n.addIssue=(r)=>{if(typeof r==="string")n.issues.push(E.issue(r,n.value,i));else{let o=r;if(o.fatal)o.continue=!1;o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=e),n.issues.push(E.issue(o))}};let t=i.transform(n.value,n);if(t instanceof Promise)return t.then((r)=>{return n.value=r,n.fallback=!0,n});return n.value=t,n.fallback=!0,n}});function xi(e){return new kr({type:"transform",transform:e})}var Ei=m("ZodOptional",(e,i)=>{pn.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Wn(e,n,a,t),e.unwrap=()=>e._zod.def.innerType});function He(e){return new Ei({type:"optional",innerType:e})}var Ir=m("ZodExactOptional",(e,i)=>{Ks.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Wn(e,n,a,t),e.unwrap=()=>e._zod.def.innerType});function wr(e){return new Ir({type:"optional",innerType:e})}var Sr=m("ZodNullable",(e,i)=>{Ys.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>zl(e,n,a,t),e.unwrap=()=>e._zod.def.innerType});function Ke(e){return new Sr({type:"nullable",innerType:e})}function sd(e){return He(Ke(e))}var xr=m("ZodDefault",(e,i)=>{Qs.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Pl(e,n,a,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Er(e,i){return new xr({type:"default",innerType:e,get defaultValue(){return typeof i==="function"?i():E.shallowClone(i)}})}var $r=m("ZodPrefault",(e,i)=>{eu.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Dl(e,n,a,t),e.unwrap=()=>e._zod.def.innerType});function Tr(e,i){return new $r({type:"prefault",innerType:e,get defaultValue(){return typeof i==="function"?i():E.shallowClone(i)}})}var $i=m("ZodNonOptional",(e,i)=>{tu.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Al(e,n,a,t),e.unwrap=()=>e._zod.def.innerType});function Or(e,i){return new $i({type:"nonoptional",innerType:e,...E.normalizeParams(i)})}var Nr=m("ZodSuccess",(e,i)=>{iu.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>kl(e,n,a,t),e.unwrap=()=>e._zod.def.innerType});function ud(e){return new Nr({type:"success",innerType:e})}var Ur=m("ZodCatch",(e,i)=>{nu.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>jl(e,n,a,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function zr(e,i){return new Ur({type:"catch",innerType:e,catchValue:typeof i==="function"?i:()=>i})}var Ar=m("ZodNaN",(e,i)=>{ru.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>yl(e,n,a,t)});function ld(e){return Vu(Ar,e)}var It=m("ZodPipe",(e,i)=>{gn.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Rl(e,n,a,t),e.in=i.in,e.out=i.out});function Rt(e,i){return new It({type:"pipe",in:e,out:i})}var wt=m("ZodCodec",(e,i)=>{It.init(e,i),hn.init(e,i)});function cd(e,i,n){return new wt({type:"pipe",in:e,out:i,transform:n.decode,reverseTransform:n.encode})}function dd(e){let i=e._zod.def;return new wt({type:"pipe",in:i.out,out:i.in,transform:i.reverseTransform,reverseTransform:i.transform})}var Pr=m("ZodPreprocess",(e,i)=>{It.init(e,i),au.init(e,i)}),Dr=m("ZodReadonly",(e,i)=>{ou.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Cl(e,n,a,t),e.unwrap=()=>e._zod.def.innerType});function jr(e){return new Dr({type:"readonly",innerType:e})}var Rr=m("ZodTemplateLiteral",(e,i)=>{su.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>bl(e,n,a,t)});function md(e,i){return new Rr({type:"template_literal",parts:e,...E.normalizeParams(i)})}var Cr=m("ZodLazy",(e,i)=>{cu.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Zl(e,n,a,t),e.unwrap=()=>e._zod.def.getter()});function Lr(e){return new Cr({type:"lazy",getter:e})}var Zr=m("ZodPromise",(e,i)=>{lu.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Ll(e,n,a,t),e.unwrap=()=>e._zod.def.innerType});function fd(e){return new Zr({type:"promise",innerType:e})}var Mr=m("ZodFunction",(e,i)=>{uu.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>wl(e,n,a,t)});function Ct(e){return new Mr({type:"function",input:Array.isArray(e?.input)?gr(e?.input):e?.input??bt(be()),output:e?.output??be()})}var St=m("ZodCustom",(e,i)=>{du.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Il(e,n,a,t)});function pd(e){let i=new D({check:"custom"});return i._zod.check=e,i}function gd(e,i){return Hu(St,e??(()=>!0),i)}function Br(e,i={}){return Ku(St,e,i)}function Fr(e,i){return Yu(e,i)}var hd=el,vd=tl;function yd(e,i={}){let n=new St({type:"custom",check:"custom",fn:(a)=>a instanceof e,abort:!0,...E.normalizeParams(i)});return n._zod.bag.Class=e,n._zod.check=(a)=>{if(!(a.value instanceof e))a.issues.push({code:"invalid_type",expected:e.name,input:a.value,inst:n,path:[...n._zod.def.path??[]]})},n}var bd=(...e)=>il({Codec:wt,Boolean:vt,String:pt},...e);function _d(e){let i=Lr(()=>{return wi([qe(e),Qn(),er(),rr(),bt(i),hr(qe(),i)])});return i}function kd(e,i){return new Pr({type:"pipe",in:xi(e),out:i})}var Rg={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 Cg(e){R({customError:e})}function Lg(){return R().customError}var Mi;(function(e){})(Mi||(Mi={}));var b={...Fl,...Jl,iso:Vn},Zg=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 Mg(e,i){let n=e.$schema;if(n==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(n==="http://json-schema.org/draft-07/schema#")return"draft-7";if(n==="http://json-schema.org/draft-04/schema#")return"draft-4";return i??"draft-2020-12"}function Bg(e,i){if(!e.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return i.rootSchema;let a=i.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===a){let t=n[1];if(!t||!i.defs[t])throw Error(`Reference not found: ${e}`);return i.defs[t]}throw Error(`Reference not found: ${e}`)}function Id(e,i){if(e.not!==void 0){if(typeof e.not==="object"&&Object.keys(e.not).length===0)return b.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let t=e.$ref;if(i.refs.has(t))return i.refs.get(t);if(i.processing.has(t))return b.lazy(()=>{if(!i.refs.has(t))throw Error(`Circular reference not resolved: ${t}`);return i.refs.get(t)});i.processing.add(t);let r=Bg(t,i),o=L(r,i);return i.refs.set(t,o),i.processing.delete(t),o}if(e.enum!==void 0){let t=e.enum;if(i.version==="openapi-3.0"&&e.nullable===!0&&t.length===1&&t[0]===null)return b.null();if(t.length===0)return b.never();if(t.length===1)return b.literal(t[0]);if(t.every((o)=>typeof o==="string"))return b.enum(t);let r=t.map((o)=>b.literal(o));if(r.length<2)return r[0];return b.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return b.literal(e.const);let n=e.type;if(Array.isArray(n)){let t=n.map((r)=>{let o={...e,type:r};return Id(o,i)});if(t.length===0)return b.never();if(t.length===1)return t[0];return b.union(t)}if(!n)return b.any();let a;switch(n){case"string":{let t=b.string();if(e.format){let r=e.format;if(r==="email")t=t.check(b.email());else if(r==="uri"||r==="uri-reference")t=t.check(b.url());else if(r==="uuid"||r==="guid")t=t.check(b.uuid());else if(r==="date-time")t=t.check(b.iso.datetime());else if(r==="date")t=t.check(b.iso.date());else if(r==="time")t=t.check(b.iso.time());else if(r==="duration")t=t.check(b.iso.duration());else if(r==="ipv4")t=t.check(b.ipv4());else if(r==="ipv6")t=t.check(b.ipv6());else if(r==="mac")t=t.check(b.mac());else if(r==="cidr")t=t.check(b.cidrv4());else if(r==="cidr-v6")t=t.check(b.cidrv6());else if(r==="base64")t=t.check(b.base64());else if(r==="base64url")t=t.check(b.base64url());else if(r==="e164")t=t.check(b.e164());else if(r==="jwt")t=t.check(b.jwt());else if(r==="emoji")t=t.check(b.emoji());else if(r==="nanoid")t=t.check(b.nanoid());else if(r==="cuid")t=t.check(b.cuid());else if(r==="cuid2")t=t.check(b.cuid2());else if(r==="ulid")t=t.check(b.ulid());else if(r==="xid")t=t.check(b.xid());else if(r==="ksuid")t=t.check(b.ksuid())}if(typeof e.minLength==="number")t=t.min(e.minLength);if(typeof e.maxLength==="number")t=t.max(e.maxLength);if(e.pattern)t=t.regex(new RegExp(e.pattern));a=t;break}case"number":case"integer":{let t=n==="integer"?b.number().int():b.number();if(typeof e.minimum==="number")t=t.min(e.minimum);if(typeof e.maximum==="number")t=t.max(e.maximum);if(typeof e.exclusiveMinimum==="number")t=t.gt(e.exclusiveMinimum);else if(e.exclusiveMinimum===!0&&typeof e.minimum==="number")t=t.gt(e.minimum);if(typeof e.exclusiveMaximum==="number")t=t.lt(e.exclusiveMaximum);else if(e.exclusiveMaximum===!0&&typeof e.maximum==="number")t=t.lt(e.maximum);if(typeof e.multipleOf==="number")t=t.multipleOf(e.multipleOf);a=t;break}case"boolean":{a=b.boolean();break}case"null":{a=b.null();break}case"object":{let t={},r=e.properties||{},o=new Set(e.required||[]);for(let[l,c]of Object.entries(r)){let d=L(c,i);t[l]=o.has(l)?d:d.optional()}if(e.propertyNames){let l=L(e.propertyNames,i),c=e.additionalProperties&&typeof e.additionalProperties==="object"?L(e.additionalProperties,i):b.any();if(Object.keys(t).length===0){a=b.record(l,c);break}let d=b.object(t).passthrough(),f=b.looseRecord(l,c);a=b.intersection(d,f);break}if(e.patternProperties){let l=e.patternProperties,c=Object.keys(l),d=[];for(let p of c){let y=L(l[p],i),w=b.string().regex(new RegExp(p));d.push(b.looseRecord(w,y))}let f=[];if(Object.keys(t).length>0)f.push(b.object(t).passthrough());if(f.push(...d),f.length===0)a=b.object({}).passthrough();else if(f.length===1)a=f[0];else{let p=b.intersection(f[0],f[1]);for(let y=2;y<f.length;y++)p=b.intersection(p,f[y]);a=p}break}let u=b.object(t);if(e.additionalProperties===!1)a=u.strict();else if(typeof e.additionalProperties==="object")a=u.catchall(L(e.additionalProperties,i));else a=u.passthrough();break}case"array":{let{prefixItems:t,items:r}=e;if(t&&Array.isArray(t)){let o=t.map((l)=>L(l,i)),u=r&&typeof r==="object"&&!Array.isArray(r)?L(r,i):void 0;if(u)a=b.tuple(o).rest(u);else a=b.tuple(o);if(typeof e.minItems==="number")a=a.check(b.minLength(e.minItems));if(typeof e.maxItems==="number")a=a.check(b.maxLength(e.maxItems))}else if(Array.isArray(r)){let o=r.map((l)=>L(l,i)),u=e.additionalItems&&typeof e.additionalItems==="object"?L(e.additionalItems,i):void 0;if(u)a=b.tuple(o).rest(u);else a=b.tuple(o);if(typeof e.minItems==="number")a=a.check(b.minLength(e.minItems));if(typeof e.maxItems==="number")a=a.check(b.maxLength(e.maxItems))}else if(r!==void 0){let o=L(r,i),u=b.array(o);if(typeof e.minItems==="number")u=u.min(e.minItems);if(typeof e.maxItems==="number")u=u.max(e.maxItems);a=u}else a=b.array(b.any());break}default:throw Error(`Unsupported type: ${n}`)}return a}function L(e,i){if(typeof e==="boolean")return e?b.any():b.never();let n=Id(e,i),a=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let u=e.anyOf.map((c)=>L(c,i)),l=b.union(u);n=a?b.intersection(n,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let u=e.oneOf.map((c)=>L(c,i)),l=b.xor(u);n=a?b.intersection(n,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=a?n:b.any();else{let u=a?n:L(e.allOf[0],i),l=a?0:1;for(let c=l;c<e.allOf.length;c++)u=b.intersection(u,L(e.allOf[c],i));n=u}if(e.nullable===!0&&i.version==="openapi-3.0")n=b.nullable(n);if(e.readOnly===!0)n=b.readonly(n);if(e.default!==void 0)n=n.default(e.default);let t={},r=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let u of r)if(u in e)t[u]=e[u];let o=["contentEncoding","contentMediaType","contentSchema"];for(let u of o)if(u in e)t[u]=e[u];for(let u of Object.keys(e))if(!Zg.has(u))t[u]=e[u];if(Object.keys(t).length>0)i.registry.add(n,t);if(e.description)n=n.describe(e.description);return n}function Fg(e,i){if(typeof e==="boolean")return e?b.any():b.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let a=Mg(n,i?.defaultTarget),t=n.$defs||n.definitions||{},r={version:a,defs:t,refs:new Map,processing:new Set,rootSchema:n,registry:i?.registry??K};return L(n,r)}var wd={};ae(wd,{string:()=>Jg,number:()=>Gg,date:()=>qg,boolean:()=>Wg,bigint:()=>Vg});function Jg(e){return yu(pt,e)}function Gg(e){return Eu(ht,e)}function Wg(e){return Au(vt,e)}function Vg(e){return Du(yt,e)}function qg(e){return Wu(Ii,e)}R(mu());var Jr=s,Xg=s.object({id:s.string(),temperature:s.number().optional(),maxTokens:s.number().optional(),contextWindow:s.number().optional(),inputPrice:s.number().optional(),outputPrice:s.number().optional(),supportsImages:s.boolean().optional()}),Hg=s.object({models:s.array(Xg).optional(),openAiBaseUrl:s.string().optional(),openAiHeaders:s.record(s.string(),s.string()).optional(),azureApiVersion:s.string().optional(),azureIdentity:s.boolean().optional()}),Kg=s.object({id:s.string(),thinkingBudgetTokens:s.number().optional()}),Yg=s.object({name:s.string(),baseModelId:s.string(),thinkingBudgetTokens:s.number().optional()}),Qg=s.object({models:s.array(Kg).optional(),customModels:s.array(Yg).optional(),awsRegion:s.string().optional(),awsUseCrossRegionInference:s.boolean().optional(),awsUseGlobalInference:s.boolean().optional(),awsBedrockUsePromptCache:s.boolean().optional(),awsBedrockEndpoint:s.string().optional()}),eh=s.object({id:s.string()}),th=s.object({models:s.array(eh).optional()}),ih=s.object({id:s.string(),thinkingBudgetTokens:s.number().optional()}),nh=s.object({models:s.array(ih).optional(),vertexProjectId:s.string().optional(),vertexRegion:s.string().optional()}),rh=s.object({id:s.string(),thinkingBudgetTokens:s.number().optional(),promptCachingEnabled:s.boolean().optional()}),ah=s.object({models:s.array(rh).optional(),baseUrl:s.string().optional()}),oh=s.object({id:s.string(),thinkingBudgetTokens:s.number().optional()}),sh=s.object({models:s.array(oh).optional(),baseUrl:s.string().optional()}),uh=s.object({OpenAiCompatible:Hg.optional(),AwsBedrock:Qg.optional(),Cline:th.optional(),Vertex:nh.optional(),LiteLLM:ah.optional(),Anthropic:sh.optional()}),lh=s.object({id:s.string()}),ch=s.object({name:s.string(),url:s.string(),alwaysEnabled:s.boolean().optional(),headers:s.record(s.string(),s.string()).optional()}),Ta=s.object({alwaysEnabled:s.boolean(),name:s.string(),contents:s.string()}),Pi=s.object({bucket:s.string(),accessKeyId:s.string(),secretAccessKey:s.string(),region:s.string().optional(),endpoint:s.string().optional(),accountId:s.string().optional()}),dh=s.object({enabled:s.boolean().optional(),type:s.union([s.literal("s3_access_keys"),s.literal("r2_access_keys"),s.literal("azure_access_keys")]).optional(),s3AccessSettings:Pi.optional(),r2AccessSettings:Pi.optional(),azureAccessSettings:Pi.optional()}),mh=s.object({promptUploading:dh.optional()}),Ey=s.object({version:s.string(),providerSettings:uh.optional(),telemetryEnabled:s.boolean().optional(),kanbanEnabled:s.boolean().optional(),mcpMarketplaceEnabled:s.boolean().optional(),allowedMCPServers:s.array(lh).optional(),remoteMCPServers:s.array(ch).optional(),blockPersonalRemoteMCPServers:s.boolean().optional(),yoloModeAllowed:s.boolean().optional(),openTelemetryEnabled:s.boolean().optional(),openTelemetryMetricsExporter:s.string().optional(),openTelemetryLogsExporter:s.string().optional(),openTelemetryOtlpProtocol:s.string().optional(),openTelemetryOtlpEndpoint:s.string().optional(),openTelemetryOtlpHeaders:s.record(s.string(),s.string()).optional(),openTelemetryOtlpMetricsProtocol:s.string().optional(),openTelemetryOtlpMetricsEndpoint:s.string().optional(),openTelemetryOtlpMetricsHeaders:s.record(s.string(),s.string()).optional(),openTelemetryOtlpLogsProtocol:s.string().optional(),openTelemetryOtlpLogsEndpoint:s.string().optional(),openTelemetryOtlpLogsHeaders:s.record(s.string(),s.string()).optional(),openTelemetryMetricExportInterval:s.number().optional(),openTelemetryOtlpInsecure:s.boolean().optional(),openTelemetryLogBatchSize:s.number().optional(),openTelemetryLogBatchTimeout:s.number().optional(),openTelemetryLogMaxQueueSize:s.number().optional(),enterpriseTelemetry:mh.optional(),globalRules:s.array(Ta).optional(),globalWorkflows:s.array(Ta).optional()}),$y=s.record(s.string(),s.string()),Sd="input_progress";var fh=[/\bserver is shutting down\b/i,/^(?:error:\s*)?(?:503\s*)?loading model\b/i,/\b(?:ECONNREFUSED|ECONNRESET|ECONNABORTED|EPIPE|EHOSTUNREACH|EHOSTDOWN|ENETUNREACH|ENETDOWN|ETIMEDOUT|UND_ERR_SOCKET|UND_ERR_CONNECT_TIMEOUT|UND_ERR_CLOSED)\b/,/\bsocket hang up\b/i,/\bother side closed\b/i,/\bsocket (?:was )?closed\b/i,/\bpremature close\b/i,/\bcannot connect to api\b/i,/^fetch failed$/i,/^terminated$/i,/^(?:error:\s*)?terminated:/i,/\bHTTPParserError\b/,/\bHPE_[A-Z_]+\b/,/^(?:network|connection) (?:error|failure|lost|reset)$/i,/^(?:(?:error:\s*)?(?:502|503|504)\s*)?(?:bad gateway|service unavailable|gateway time-?out)$/i,/^no healthy upstream$/i,/^(?:error:\s*)?(?:500\s*)?invalid input batch\.?$/i,/^(?:error:\s*)?got exception: speculative batch index \d+ is not inside the current sub-batch\b/i,/^(?:error:\s*)?(?:AI_TypeValidationError:\s*)?type validation failed\b[^:\n]*: value:/i,/^(?:error:\s*)?(?:AI_JSONParseError:\s*)?json parsing failed: text:/i],ph=new Set([502,503,504]);var Gr=/^(?:error:\s*)?evicted to keep other in-flight requests alive\b/i;function xd(e,i){return i==="kv_evicted"||Gr.test((e??"").trim())}function Ye(e,i=0){if(i>5||e===null||e===void 0)return!1;if(typeof e==="string"){let a=e.trim();if(Gr.test(a))return!0;if(!a.startsWith("{"))return!1;try{return Ye(JSON.parse(a),i+1)}catch{return!1}}if(typeof e!=="object")return!1;let n=e;if(n.error_kind==="evicted_kv_full")return!0;for(let a of["error","responseBody","data","cause","message"]){let t=n[a];if(t!==void 0&&t!==e){if(Ye(t,i+1))return!0}}return!1}var gh=[/projected mean tps below floor/i,/context allocation exhausted/i,/session allocation full/i,/admission (?:rejected|refused|queued)/i,/\btoo many requests\b/i,Gr,/\[opencoti_window_unavailable\b/];function Ed(e){let i=(n,a)=>/^[A-Z]/.test(n)?a.charAt(0).toUpperCase()+a.slice(1):a;return e.replace(/\badmission (?:rejected|refused)\b/gi,(n)=>i(n,"admission queued")).replace(/\b(?:rejected|refused)\b/gi,(n)=>i(n,"queued")).replace(/\b(?:rejecting|refusing)\b/gi,(n)=>i(n,"queueing")).replace(/\b(?:rejections|refusals)\b/gi,(n)=>i(n,"retries")).replace(/\b(?:rejection|refusal)\b/gi,(n)=>i(n,"retry"))}function Ge(e,i){let n=(e??"").trim();if(i==="rate_limited"||i==="kv_evicted"||gh.some((a)=>a.test(n)))return"refusal";if(n&&fh.some((a)=>a.test(n)))return"transport";return}function hh(e){let i=e.code;return typeof i==="string"?i:void 0}function vh(e){let i=e.status??e.statusCode;return typeof i==="number"?i:void 0}function Wr(e,i=0){if(i>5||e===null||e===void 0)return;if(typeof e==="string")return Ge(e);if(typeof e!=="object")return;let n=vh(e);if(n===429||Ye(e,i))return"refusal";let a=e.message,t=typeof a==="string"?Ge(a):void 0;if(t==="refusal")return t;let r=hh(e);if(r&&Ge(r)==="transport")return"transport";if(n!==void 0&&ph.has(n))return"transport";if(t)return t;return Wr(e.cause,i+1)}var $d=["none","minimal","low","medium","high","xhigh","max"],yh=s.enum($d),bh=yh.exclude(["none"]),_h=s.enum([...$d,"default"]).nullable(),kh=s.discriminatedUnion("type",[s.object({type:s.literal("toggle")}).strict(),s.object({type:s.literal("effort"),values:s.array(_h)}).strict(),s.object({type:s.literal("budget_tokens"),min:s.number().min(-1).optional(),max:s.number().min(0).optional()}).strict().refine((e)=>e.min===void 0||e.max===void 0||e.min<=e.max,{message:"Minimum reasoning budget cannot exceed maximum",path:["min"]})]),Ih=s.enum(["default","openai-responses","r1"]);var wh=s.enum(["images","video","tools","streaming","prompt-cache","reasoning","reasoning-effort","computer-use","global-endpoint","structured_output","temperature","files"]),Sh=s.enum(["active","preview","deprecated","legacy"]),xh=s.object({input:s.number().optional(),output:s.number().optional(),cacheWrite:s.number().optional(),cacheRead:s.number().optional()}),Eh=s.object({maxBudget:s.number().optional(),outputPrice:s.number().optional(),thinkingLevel:s.enum(["low","high"]).optional()}),$h=s.object({reasoningDefaultOn:s.boolean().optional()}).catchall(s.unknown()),Oa=s.enum(["text","image","audio","video","pdf"]),Th=s.object({input:s.array(Oa),output:s.array(Oa)});var Oh=s.enum(["language","image-generation","speech-generation","video-generation","transcription"]);var Nh=s.enum(["batch","streaming"]);var Td=s.object({id:s.string(),name:s.string().optional(),description:s.string().optional(),maxTokens:s.number().optional(),contextWindow:s.number().optional(),maxInputTokens:s.number().optional(),capabilities:s.array(wh).optional(),operation:Oh.optional(),operationModes:s.array(Nh).optional(),modalities:Th.optional(),reasoningOptions:s.array(kh).optional(),apiFormat:Ih.optional(),systemRole:s.enum(["system","developer"]).optional(),temperature:s.number().optional(),pricing:xh.optional(),thinkingConfig:Eh.optional(),status:Sh.optional(),deprecationNotice:s.string().optional(),replacedBy:s.string().optional(),releaseDate:s.string().optional(),deprecationDate:s.string().optional(),family:s.string().optional(),metadata:$h.optional()});var Od="NOT a tool or system failure. Clarify with user before proceeding.",Uh=s.object({id:s.string(),name:s.string(),execution:s.enum(["client","provider"]).optional(),input:s.unknown(),output:s.unknown(),error:s.string().optional(),durationMs:s.number(),startedAt:s.date(),endedAt:s.date()}),zh=s.enum(["completed","max_iterations","aborted","mistake_limit","error"]),Ah=s.object({inputTokens:s.number(),outputTokens:s.number(),cacheReadTokens:s.number().optional(),cacheWriteTokens:s.number().optional(),totalCost:s.number().optional()}),Ty=s.object({text:s.string(),usage:Ah,messages:s.array(s.custom()),toolCalls:s.array(Uh),iterations:s.number(),finishReason:zh,model:s.object({id:s.string(),provider:s.string(),info:Td.optional()}),startedAt:s.date(),endedAt:s.date(),durationMs:s.number()}),Oy=s.object({distinctId:s.string().optional(),sessionId:s.string().optional(),providerId:s.string(),modelId:s.string(),apiKey:s.string().optional(),baseUrl:s.string().url().optional(),headers:s.record(s.string(),s.string()).optional(),knownModels:s.record(s.string(),Td).optional(),providerConfig:s.unknown().optional(),initialMessages:s.array(s.custom()).optional(),systemPrompt:s.string(),tools:s.array(s.custom()),modelTools:s.array(s.custom()).optional(),maxIterations:s.number().positive().optional(),maxParallelToolCalls:s.number().int().positive().default(8),maxTokensPerTurn:s.number().positive().optional(),maxToolResultChars:s.number().int().positive().optional(),temperature:s.number().nonnegative().optional(),apiTimeoutMs:s.number().positive().default(180000),userFileContentLoader:s.function().input([s.string()]).output(s.promise(s.string())).optional(),toolContextMetadata:s.record(s.string(),s.unknown()).optional(),execution:s.object({maxConsecutiveMistakes:s.number().int().positive().optional(),reminderAfterIterations:s.number().nonnegative().optional(),reminderText:s.string().optional(),loopDetection:s.union([s.literal(!1),s.object({softThreshold:s.number().int().positive().optional(),hardThreshold:s.number().int().positive().optional()})]).optional(),reasoningLoopDetection:s.union([s.literal(!1),s.object({minChars:s.number().int().positive().optional(),window:s.number().int().positive().optional(),maxPeriod:s.number().int().positive().optional(),minCycles:s.number().int().positive().optional(),maxUniqueInWindow:s.number().int().positive().optional(),minLineChars:s.number().int().positive().optional(),phraseMaxPeriod:s.number().int().positive().optional(),phraseMinCycles:s.number().int().positive().optional(),maxConsecutiveTrips:s.number().int().positive().optional()})]).optional(),reasoningRepetition:s.union([s.literal(!1),s.object({minChars:s.number().int().positive().optional(),minParagraphChars:s.number().int().positive().optional(),minStopwords:s.number().int().nonnegative().optional(),maxRepeatTrip:s.number().int().positive().optional(),duplicateFractionTrip:s.number().min(0).max(1).optional(),cooldownTurns:s.number().int().nonnegative().optional(),maxNudges:s.number().int().nonnegative().optional(),recoveryTokens:s.number().int().nonnegative().optional()})]).optional()}).optional(),reasoningEffort:bh.optional(),thinkingBudgetTokens:s.number().positive().optional(),thinking:s.boolean().optional(),onEvent:s.function().input([s.custom()]).output(s.void()).optional(),hooks:s.custom().optional(),parentAgentId:s.string().optional(),extensions:s.array(s.custom()).optional(),hookErrorMode:s.enum(["ignore","throw"]).default("ignore"),toolPolicies:s.record(s.string(),s.object({enabled:s.boolean().optional(),autoApprove:s.boolean().optional()})).optional(),requestToolApproval:s.function().input([s.object({sessionId:s.string(),agentId:s.string(),conversationId:s.string(),iteration:s.number(),toolCallId:s.string(),toolName:s.string(),input:s.unknown(),policy:s.object({enabled:s.boolean().optional(),autoApprove:s.boolean().optional()}).default({})})]).output(s.union([s.object({approved:s.boolean(),reason:s.string().optional()}),s.promise(s.object({approved:s.boolean(),reason:s.string().optional()}))])).optional(),onConsecutiveMistakeLimitReached:s.function().input([s.object({iteration:s.number().int().positive(),consecutiveMistakes:s.number().int().positive(),maxConsecutiveMistakes:s.number().int().positive(),reason:s.enum(["api_error","invalid_tool_call","tool_execution_failed"]),details:s.string().optional()})]).output(s.union([s.object({action:s.literal("continue"),guidance:s.string().optional()}),s.object({action:s.literal("stop"),reason:s.string().optional()}),s.promise(s.union([s.object({action:s.literal("continue"),guidance:s.string().optional()}),s.object({action:s.literal("stop"),reason:s.string().optional()})]))])).optional(),logger:s.custom().optional(),extensionContext:s.custom().optional(),abortSignal:s.custom().optional()}),Ph=s.enum(["connector.started","connector.stopping","session.authorize","message.received","message.denied","message.completed","message.failed","session.started","session.reused","session.reset","schedule.delivery.started","schedule.delivery.sent","schedule.delivery.failed"]),Dh=s.object({id:s.string().optional(),label:s.string().optional(),role:s.string().optional(),participantKey:s.string().optional(),participantLabel:s.string().optional(),platformUserId:s.string().optional(),metadata:s.record(s.string(),s.unknown()).optional()}),jh=s.object({source:s.string(),sourceEvent:s.string(),threadId:s.string(),channelId:s.string(),isDM:s.boolean(),sessionId:s.string().optional(),workspaceRoot:s.string().optional(),metadata:s.record(s.string(),s.unknown()).optional()}),Ny=s.object({actor:Dh,context:jh,payload:s.record(s.string(),s.unknown()).optional()}),Uy=s.object({action:s.enum(["allow","deny"]).default("allow"),message:s.string().optional(),reason:s.string().optional(),metadata:s.record(s.string(),s.unknown()).optional()}),zy=s.object({adapter:s.string(),botUserName:s.string().optional(),event:Ph,payload:s.record(s.string(),s.unknown()),ts:s.string()});var Rh=["hooks","tools","commands","rules","skills","messageBuilders","providers","automationEvents","mcp"],Ay=new Set(Rh);var Bi={CLINE_PASS:"ext-cline-pass",CODE_ONBOARDING_GITHUB:"code-onboarding-github"},Py={[Bi.CLINE_PASS]:!1,[Bi.CODE_ONBOARDING_GITHUB]:!1},Dy=Object.values(Bi),Ch=s.enum(["agent_start","agent_resume","agent_abort","agent_end","agent_error","tool_call","tool_result","prompt_submit","pre_compact","session_shutdown"]),_e=s.record(s.string(),s.string()),Lh=s.object({toolName:s.string(),parameters:_e}),Zh=s.object({toolName:s.string(),parameters:_e,result:s.string(),success:s.boolean(),executionTimeMs:s.number()}),Mh=s.object({prompt:s.string(),attachments:s.array(s.string())}),Bh=s.object({taskMetadata:_e}),Fh=s.object({taskMetadata:_e,previousState:_e}),Jh=s.object({taskMetadata:_e}),Gh=s.object({taskMetadata:_e}),Wh=s.object({taskId:s.string(),ulid:s.string(),contextSize:s.number(),compactionStrategy:s.string(),previousApiReqIndex:s.number(),tokensIn:s.number(),tokensOut:s.number(),tokensInCache:s.number(),tokensOutCache:s.number(),deletedRangeStart:s.number(),deletedRangeEnd:s.number(),contextJsonPath:s.string(),contextRawPath:s.string()}),jy=s.object({clineVersion:s.string(),hookName:Ch,timestamp:s.string(),taskId:s.string(),sessionContext:s.object({rootSessionId:s.string().optional(),hookLogPath:s.string().optional()}).optional(),workspaceRoots:s.array(s.string()),workspaceInfo:s.custom().optional(),userId:s.string(),agent_id:s.string(),parent_agent_id:s.string().nullable(),iteration:s.number().optional(),reason:s.string().optional(),tool_call:s.object({id:s.string(),name:s.string(),input:s.unknown()}).optional(),tool_result:s.custom().optional(),turn:s.unknown().optional(),error:s.object({name:s.string(),message:s.string(),stack:s.string().optional()}).optional(),preToolUse:Lh.optional(),postToolUse:Zh.optional(),userPromptSubmit:Mh.optional(),taskStart:Bh.optional(),taskResume:Fh.optional(),taskCancel:Jh.optional(),taskComplete:Gh.optional(),preCompact:Wh.optional()}).passthrough();var Vh=["readFile","search","bash","webFetch","editor","applyPatch","skills","askQuestion","submit"],Ry=new Set(Vh);var Na="<tool_call>",qh=/<tool_call>|<parameter=[^>]*>|<\/parameter>/g,Xh=/<function=[^\s>]+\s*>/,Vr="[SYSTEM] Your last message contained no tool calls, so the run was about to end. If the task is not finished, continue now by emitting the tool calls it needs - do not describe what you are going to do without doing it. If the task really is finished, say so in one short sentence.",Nd=" If what you need is a decision from the user, call `ask_question` - that is the only way to reach them. A question written as ordinary text is not a question anyone will see: it reads here as a turn that called nothing, which is what produced this message.",Hh="[SYSTEM] You have now taken ";function Ud(e,i){let n=Math.round(i/1000),a=n>=1?`about ${n.toLocaleString("en-US")},000 characters of reasoning`:"a full turn of reasoning";return Hh+`${e} turns in a row without calling a single tool, spending ${a} on them. Thinking further has not moved this task, and it will not: you have already reasoned past the point where more of it helps. Stop analysing and make one tool call now - the smallest one that makes any progress at all, even if you are not certain it is the right one, because a call you can check beats an analysis you cannot. If you genuinely cannot make one, say what is blocking you in a single sentence and stop.`}var Kh="[SYSTEM] Your last message contained a tool call that could not be read.";function qr(e){if(!e||!e.includes(Na)||!Xh.test(e))return;let i=0,n=0,a=0;for(let l of e.matchAll(qh)){let c=l[0];if(c===Na)i+=1;else if(c==="</parameter>")a+=1;else n+=1}if(i===0)return;let t=Math.max(n-a,0),r=Math.min(Math.max(i-1,0),t),o=[...e.matchAll(/<function=([^\s>]+)\s*>/g)],u=o[o.length-1]?.[1];return{blocks:i,restarts:r,...u?{name:u}:{}}}function Xr(e){let i=e.name?`\`${e.name}\``:"a tool",n=e.restarts>0?` You began ${i} and then, part-way through a parameter you never closed, started the whole call again${e.restarts>1?`, ${e.restarts} times over`:""}. The reader cannot tell an abandoned call from the value of the parameter it was abandoned inside, so all of it came back as text.`:` It named ${i}, but the block was not well formed and could not be read.`;return Kh+n+" Nothing ran, so nothing has changed on disk. Emit the call once, in one clean block: open it, give each parameter and close each parameter, then close the function and the call. Do not restart a call once you have begun it - finish it, or send nothing and start the next turn fresh."}var Yh="[SYSTEM] You wrote ";function zd(e){let i=e.trim().replace(/\s+/g," ").slice(0,200);return Yh+`"${i}" and then called nothing, for the second turn running. Saying what you are about to do is not doing it, and the run ends on the next silent turn with the work undone. Emit the tool call itself now - the first one, not a description of it. If you cannot, say plainly what is stopping you in one sentence.`}var Qh=/\b(?:let me|i'?ll|i will|i'?m going to|i am going to|now i(?:'?ll| will)|next,? i(?:'?ll| will)|let'?s)\b/i,ev=/\b(?:task (?:is )?(?:complete|finished|done)|all done|is now (?:complete|finished|fixed|working)|i(?:'?m| am) (?:done|finished)|nothing (?:else|more) to do|no further changes)\b/i;function Hr(e){let i=e?.trim();if(!i||ev.test(i))return;let n=i.slice(-400);return Qh.test(n)?i:void 0}var tv=s.enum(["image","audio","video","file"]),iv=s.discriminatedUnion("type",[s.object({type:s.literal("base64"),data:s.string().min(1)}),s.object({type:s.literal("url"),url:s.string().url().refine((e)=>{let i=new URL(e).protocol;return i==="http:"||i==="https:"},"Generated media URLs must use HTTP or HTTPS")}),s.object({type:s.literal("artifact"),artifactId:s.string().min(1)})]);function nv(e){if(e.startsWith("image/"))return"image";if(e.startsWith("audio/"))return"audio";if(e.startsWith("video/"))return"video";return"file"}var Cy=s.object({id:s.string().min(1),modality:tv,mediaType:s.string().min(1),source:iv,name:s.string().min(1).optional(),sizeBytes:s.number().int().nonnegative().optional()}).refine((e)=>nv(e.mediaType)===e.modality,{message:"Generated media modality must match its media type",path:["modality"]});function Ua(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function Kr(e,i){if(!e&&!i)return;let n=e?.metadata,a=i?.metadata,t={...e??{},...i??{}};if(Ua(n)&&Ua(a))t.metadata={...n,...a};return t}var za=Symbol.for("cline.shared.tokenCalibration");function rv(e,i){if(e===void 0||i===void 0)return!0;return e===i}function Ad(){let e=globalThis,i=e[za];if(i)return i;let n={};return e[za]=n,n}function av(){return Ad().charsPerToken??3}function Pd(e){let i=Ad();return rv(i.outputCapOwner,e)?i.outputCap:void 0}function Dd(e){return Math.max(1,Math.ceil(e/av()))}function Te(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function ov(e){let i=e.type;if(typeof i==="string")return[i];return Array.isArray(i)?i.filter((n)=>typeof n==="string"):[]}function Fi(e,i){if(ov(e).includes(i))return!0;for(let n of["anyOf","oneOf","allOf"]){let a=e[n];if(Array.isArray(a)&&a.some((t)=>Te(t)&&Fi(t,i)))return!0}return!1}function sv(e,i){if(typeof e!=="string")return e;let n=e.trim(),a=Fi(i,"array"),t=Fi(i,"object");if((!a||!n.startsWith("["))&&(!t||!n.startsWith("{")))return e;try{let r=JSON.parse(n);if(Array.isArray(r))return a?r:e;if(Te(r))return t?r:e;return e}catch{return e}}function Lt(e,i){let n=sv(e,i);if(Array.isArray(n)){let o=i.items;if(!Te(o))return n;let u=!1,l=n.map((c)=>{let d=Lt(c,o);return u||=d!==c,d});return u?l:n}if(!Te(n))return n;let a=i.properties;if(!Te(a))return n;let t=!1,r={...n};for(let[o,u]of Object.entries(a)){if(!(o in n)||!Te(u))continue;let l=Lt(n[o],u);if(l!==n[o])r[o]=l,t=!0}return t?r:n}function jd(e){return Object.fromEntries(Object.entries(e).filter(([,i])=>i!==void 0))}function Z(e){let i=e?.trim();return i?i:void 0}function uv(e){return s.toJSONSchema(e)}var Ly=new RegExp(`${"⁣⟦"}([^${"⟧"}]*)${"⟧"}([\\s\\S]*?)${"⟦/⟧⁣"}`,"g");var Rd=`# Plan Mode
65
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let o of e.seen.entries()){let u=o[1];if(i===o[0]){r(o);continue}if(e.external){let l=e.external.registry.get(o[0])?.id;if(i!==o[0]&&l){r(o);continue}}if(e.metadataRegistry.get(o[0])?.id){r(o);continue}if(u.cycle){r(o);continue}if(u.count>1){if(e.reused==="ref"){r(o);continue}}}}function De(e,i){let n=e.seen.get(i);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let a=(u)=>{let l=e.seen.get(u);if(l.ref===null)return;let c=l.def??l.schema,d={...c},f=l.ref;if(l.ref=null,f){a(f);let y=e.seen.get(f),w=y.schema;if(w.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"))c.allOf=c.allOf??[],c.allOf.push(w);else Object.assign(c,w);if(Object.assign(c,d),u._zod.parent===f)for(let O in c){if(O==="$ref"||O==="allOf")continue;if(!(O in d))delete c[O]}if(w.$ref&&y.def)for(let O in c){if(O==="$ref"||O==="allOf")continue;if(O in y.def&&JSON.stringify(c[O])===JSON.stringify(y.def[O]))delete c[O]}}let p=u._zod.parent;if(p&&p!==f){a(p);let y=e.seen.get(p);if(y?.schema.$ref){if(c.$ref=y.schema.$ref,y.def)for(let w in c){if(w==="$ref"||w==="allOf")continue;if(w in y.def&&JSON.stringify(c[w])===JSON.stringify(y.def[w]))delete c[w]}}}e.override({zodSchema:u,jsonSchema:c,path:l.path??[]})};for(let u of[...e.seen.entries()].reverse())a(u[0]);let t={};if(e.target==="draft-2020-12")t.$schema="https://json-schema.org/draft/2020-12/schema";else if(e.target==="draft-07")t.$schema="http://json-schema.org/draft-07/schema#";else if(e.target==="draft-04")t.$schema="http://json-schema.org/draft-04/schema#";else if(e.target==="openapi-3.0");if(e.external?.uri){let u=e.external.registry.get(i)?.id;if(!u)throw Error("Schema is missing an `id` property");t.$id=e.external.uri(u)}Object.assign(t,n.def??n.schema);let r=e.metadataRegistry.get(i)?.id;if(r!==void 0&&t.id===r)delete t.id;let o=e.external?.defs??{};for(let u of e.seen.entries()){let l=u[1];if(l.def&&l.defId){if(l.def.id===l.defId)delete l.def.id;o[l.defId]=l.def}}if(e.external);else if(Object.keys(o).length>0)if(e.target==="draft-2020-12")t.$defs=o;else t.definitions=o;try{let u=JSON.parse(JSON.stringify(t));return Object.defineProperty(u,"~standard",{value:{...i["~standard"],jsonSchema:{input:Ve(i,"input",e.processors),output:Ve(i,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch(u){throw Error("Error converting schema to JSON.")}}function M(e,i){let n=i??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let a=e._zod.def;if(a.type==="transform")return!0;if(a.type==="array")return M(a.element,n);if(a.type==="set")return M(a.valueType,n);if(a.type==="lazy")return M(a.getter(),n);if(a.type==="promise"||a.type==="optional"||a.type==="nonoptional"||a.type==="nullable"||a.type==="readonly"||a.type==="default"||a.type==="prefault")return M(a.innerType,n);if(a.type==="intersection")return M(a.left,n)||M(a.right,n);if(a.type==="record"||a.type==="map")return M(a.keyType,n)||M(a.valueType,n);if(a.type==="pipe"){if(e._zod.traits.has("$ZodCodec"))return!0;return M(a.in,n)||M(a.out,n)}if(a.type==="object"){for(let t in a.shape)if(M(a.shape[t],n))return!0;return!1}if(a.type==="union"){for(let t of a.options)if(M(t,n))return!0;return!1}if(a.type==="tuple"){for(let t of a.items)if(M(t,n))return!0;if(a.rest&&M(a.rest,n))return!0;return!1}return!1}var nl=(e,i={})=>(n)=>{let a=Ae({...n,processors:i});return U(e,a),Pe(a,e),De(a,e)},Ve=(e,i,n={})=>(a)=>{let{libraryOptions:t,target:r}=a??{},o=Ae({...t??{},target:r,io:i,processors:n});return U(e,o),Pe(o,e),De(o,e)},Pg={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},rl=(e,i,n,a)=>{let t=n;t.type="string";let{minimum:r,maximum:o,format:u,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof r==="number")t.minLength=r;if(typeof o==="number")t.maxLength=o;if(u){if(t.format=Pg[u]??u,t.format==="")delete t.format;if(u==="time")delete t.format}if(c)t.contentEncoding=c;if(l&&l.size>0){let d=[...l];if(d.length===1)t.pattern=d[0].source;else if(d.length>1)t.allOf=[...d.map((f)=>({...i.target==="draft-07"||i.target==="draft-04"||i.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))]}},al=(e,i,n,a)=>{let t=n,{minimum:r,maximum:o,format:u,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:d}=e._zod.bag;if(typeof u==="string"&&u.includes("int"))t.type="integer";else t.type="number";let f=typeof d==="number"&&d>=(r??Number.NEGATIVE_INFINITY),p=typeof c==="number"&&c<=(o??Number.POSITIVE_INFINITY),y=i.target==="draft-04"||i.target==="openapi-3.0";if(f)if(y)t.minimum=d,t.exclusiveMinimum=!0;else t.exclusiveMinimum=d;else if(typeof r==="number")t.minimum=r;if(p)if(y)t.maximum=c,t.exclusiveMaximum=!0;else t.exclusiveMaximum=c;else if(typeof o==="number")t.maximum=o;if(typeof l==="number")t.multipleOf=l},ol=(e,i,n,a)=>{n.type="boolean"},sl=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},ul=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},ll=(e,i,n,a)=>{if(i.target==="openapi-3.0")n.type="string",n.nullable=!0,n.enum=[null];else n.type="null"},cl=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},dl=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},ml=(e,i,n,a)=>{n.not={}},fl=(e,i,n,a)=>{},pl=(e,i,n,a)=>{},gl=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},hl=(e,i,n,a)=>{let t=e._zod.def,r=Ji(t.entries);if(r.every((o)=>typeof o==="number"))n.type="number";if(r.every((o)=>typeof o==="string"))n.type="string";n.enum=r},vl=(e,i,n,a)=>{let t=e._zod.def,r=[];for(let o of t.values)if(o===void 0){if(i.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof o==="bigint")if(i.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else r.push(Number(o));else r.push(o);if(r.length===0);else if(r.length===1){let o=r[0];if(n.type=o===null?"null":typeof o,i.target==="draft-04"||i.target==="openapi-3.0")n.enum=[o];else n.const=o}else{if(r.every((o)=>typeof o==="number"))n.type="number";if(r.every((o)=>typeof o==="string"))n.type="string";if(r.every((o)=>typeof o==="boolean"))n.type="boolean";if(r.every((o)=>o===null))n.type="null";n.enum=r}},yl=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},bl=(e,i,n,a)=>{let t=n,r=e._zod.pattern;if(!r)throw Error("Pattern not found in template literal");t.type="string",t.pattern=r.source},_l=(e,i,n,a)=>{let t=n,r={type:"string",format:"binary",contentEncoding:"binary"},{minimum:o,maximum:u,mime:l}=e._zod.bag;if(o!==void 0)r.minLength=o;if(u!==void 0)r.maxLength=u;if(l)if(l.length===1)r.contentMediaType=l[0],Object.assign(t,r);else Object.assign(t,r),t.anyOf=l.map((c)=>({contentMediaType:c}));else Object.assign(t,r)},kl=(e,i,n,a)=>{n.type="boolean"},Il=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},wl=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},Sl=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},xl=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},El=(e,i,n,a)=>{if(i.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},$l=(e,i,n,a)=>{let t=n,r=e._zod.def,{minimum:o,maximum:u}=e._zod.bag;if(typeof o==="number")t.minItems=o;if(typeof u==="number")t.maxItems=u;t.type="array",t.items=U(r.element,i,{...a,path:[...a.path,"items"]})},Tl=(e,i,n,a)=>{let t=n,r=e._zod.def;t.type="object",t.properties={};let o=r.shape;for(let c in o)t.properties[c]=U(o[c],i,{...a,path:[...a.path,"properties",c]});let u=new Set(Object.keys(o)),l=new Set([...u].filter((c)=>{let d=r.shape[c]._zod;if(i.io==="input")return d.optin===void 0;else return d.optout===void 0}));if(l.size>0)t.required=Array.from(l);if(r.catchall?._zod.def.type==="never")t.additionalProperties=!1;else if(!r.catchall){if(i.io==="output")t.additionalProperties=!1}else if(r.catchall)t.additionalProperties=U(r.catchall,i,{...a,path:[...a.path,"additionalProperties"]})},Gn=(e,i,n,a)=>{let t=e._zod.def,r=t.inclusive===!1,o=t.options.map((u,l)=>U(u,i,{...a,path:[...a.path,r?"oneOf":"anyOf",l]}));if(r)n.oneOf=o;else n.anyOf=o},Ol=(e,i,n,a)=>{let t=e._zod.def,r=U(t.left,i,{...a,path:[...a.path,"allOf",0]}),o=U(t.right,i,{...a,path:[...a.path,"allOf",1]}),u=(c)=>("allOf"in c)&&Object.keys(c).length===1,l=[...u(r)?r.allOf:[r],...u(o)?o.allOf:[o]];n.allOf=l},Nl=(e,i,n,a)=>{let t=n,r=e._zod.def;t.type="array";let o=i.target==="draft-2020-12"?"prefixItems":"items",u=i.target==="draft-2020-12"?"items":i.target==="openapi-3.0"?"items":"additionalItems",l=r.items.map((p,y)=>U(p,i,{...a,path:[...a.path,o,y]})),c=r.rest?U(r.rest,i,{...a,path:[...a.path,u,...i.target==="openapi-3.0"?[r.items.length]:[]]}):null;if(i.target==="draft-2020-12"){if(t.prefixItems=l,c)t.items=c}else if(i.target==="openapi-3.0"){if(t.items={anyOf:l},c)t.items.anyOf.push(c);if(t.minItems=l.length,!c)t.maxItems=l.length}else if(t.items=l,c)t.additionalItems=c;let{minimum:d,maximum:f}=e._zod.bag;if(typeof d==="number")t.minItems=d;if(typeof f==="number")t.maxItems=f},Ul=(e,i,n,a)=>{let t=n,r=e._zod.def;t.type="object";let o=r.keyType,u=o._zod.bag?.patterns;if(r.mode==="loose"&&u&&u.size>0){let c=U(r.valueType,i,{...a,path:[...a.path,"patternProperties","*"]});t.patternProperties={};for(let d of u)t.patternProperties[d.source]=c}else{if(i.target==="draft-07"||i.target==="draft-2020-12")t.propertyNames=U(r.keyType,i,{...a,path:[...a.path,"propertyNames"]});t.additionalProperties=U(r.valueType,i,{...a,path:[...a.path,"additionalProperties"]})}let l=o._zod.values;if(l){let c=[...l].filter((d)=>typeof d==="string"||typeof d==="number");if(c.length>0)t.required=c}},zl=(e,i,n,a)=>{let t=e._zod.def,r=U(t.innerType,i,a),o=i.seen.get(e);if(i.target==="openapi-3.0")o.ref=t.innerType,n.nullable=!0;else n.anyOf=[r,{type:"null"}]},Al=(e,i,n,a)=>{let t=e._zod.def;U(t.innerType,i,a);let r=i.seen.get(e);r.ref=t.innerType},Pl=(e,i,n,a)=>{let t=e._zod.def;U(t.innerType,i,a);let r=i.seen.get(e);r.ref=t.innerType,n.default=JSON.parse(JSON.stringify(t.defaultValue))},Dl=(e,i,n,a)=>{let t=e._zod.def;U(t.innerType,i,a);let r=i.seen.get(e);if(r.ref=t.innerType,i.io==="input")n._prefault=JSON.parse(JSON.stringify(t.defaultValue))},jl=(e,i,n,a)=>{let t=e._zod.def;U(t.innerType,i,a);let r=i.seen.get(e);r.ref=t.innerType;let o;try{o=t.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=o},Rl=(e,i,n,a)=>{let t=e._zod.def,r=t.in._zod.traits.has("$ZodTransform"),o=i.io==="input"?r?t.out:t.in:t.out;U(o,i,a);let u=i.seen.get(e);u.ref=o},Cl=(e,i,n,a)=>{let t=e._zod.def;U(t.innerType,i,a);let r=i.seen.get(e);r.ref=t.innerType,n.readOnly=!0},Ll=(e,i,n,a)=>{let t=e._zod.def;U(t.innerType,i,a);let r=i.seen.get(e);r.ref=t.innerType},Wn=(e,i,n,a)=>{let t=e._zod.def;U(t.innerType,i,a);let r=i.seen.get(e);r.ref=t.innerType},Zl=(e,i,n,a)=>{let t=e._zod.innerType;U(t,i,a);let r=i.seen.get(e);r.ref=t},Zi={string:rl,number:al,boolean:ol,bigint:sl,symbol:ul,null:ll,undefined:cl,void:dl,never:ml,any:fl,unknown:pl,date:gl,enum:hl,literal:vl,nan:yl,template_literal:bl,file:_l,success:kl,custom:Il,function:wl,transform:Sl,map:xl,set:El,array:$l,object:Tl,union:Gn,intersection:Ol,tuple:Nl,record:Ul,nullable:zl,nonoptional:Al,default:Pl,prefault:Dl,catch:jl,pipe:Rl,readonly:Cl,promise:Ll,optional:Wn,lazy:Zl};function Ml(e,i){if("_idmap"in e){let a=e,t=Ae({...i,processors:Zi}),r={};for(let l of a._idmap.entries()){let[c,d]=l;U(d,t)}let o={},u={registry:a,uri:i?.uri,defs:r};t.external=u;for(let l of a._idmap.entries()){let[c,d]=l;Pe(t,d),o[c]=De(t,d)}if(Object.keys(r).length>0){let l=t.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[l]:r}}return{schemas:o}}let n=Ae({...i,processors:Zi});return U(e,n),Pe(n,e),De(n,e)}class Bl{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 i=e?.target??"draft-2020-12";if(i==="draft-4")i="draft-04";if(i==="draft-7")i="draft-07";this.ctx=Ae({processors:Zi,target:i,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,i={path:[],schemaPath:[]}){return U(e,this.ctx,i)}emit(e,i){if(i){if(i.cycles)this.ctx.cycles=i.cycles;if(i.reused)this.ctx.reused=i.reused;if(i.external)this.ctx.external=i.external}Pe(this.ctx,e);let n=De(this.ctx,e),{"~standard":a,...t}=n;return t}}var Dg={},Fl={};ae(Fl,{xor:()=>Yc,xid:()=>kc,void:()=>Wc,uuidv7:()=>fc,uuidv6:()=>mc,uuidv4:()=>dc,uuid:()=>cc,url:()=>pc,unknown:()=>be,union:()=>wi,undefined:()=>Jc,ulid:()=>_c,uint64:()=>Bc,uint32:()=>Lc,tuple:()=>gr,transform:()=>xi,templateLiteral:()=>md,symbol:()=>Fc,superRefine:()=>Fr,success:()=>ud,stringbool:()=>bd,stringFormat:()=>zc,string:()=>qe,strictObject:()=>Hc,set:()=>nd,refine:()=>Br,record:()=>hr,readonly:()=>jr,promise:()=>fd,preprocess:()=>kd,prefault:()=>Tr,pipe:()=>Rt,partialRecord:()=>ed,optional:()=>He,object:()=>Xc,number:()=>Qn,nullish:()=>sd,nullable:()=>Ke,null:()=>rr,nonoptional:()=>Or,never:()=>ki,nativeEnum:()=>rd,nanoid:()=>vc,nan:()=>ld,meta:()=>vd,map:()=>id,mac:()=>Sc,looseRecord:()=>td,looseObject:()=>Kc,literal:()=>ad,lazy:()=>Lr,ksuid:()=>Ic,keyof:()=>qc,jwt:()=>Uc,json:()=>_d,ipv6:()=>xc,ipv4:()=>wc,invertCodec:()=>dd,intersection:()=>fr,int64:()=>Mc,int32:()=>Cc,int:()=>jt,instanceof:()=>yd,httpUrl:()=>gc,hostname:()=>Ac,hex:()=>Pc,hash:()=>Dc,guid:()=>lc,function:()=>Ct,float64:()=>Rc,float32:()=>jc,file:()=>od,exactOptional:()=>wr,enum:()=>Si,emoji:()=>hc,email:()=>uc,e164:()=>Nc,discriminatedUnion:()=>Qc,describe:()=>hd,date:()=>Vc,custom:()=>gd,cuid2:()=>bc,cuid:()=>yc,codec:()=>cd,cidrv6:()=>$c,cidrv4:()=>Ec,check:()=>pd,catch:()=>zr,boolean:()=>er,bigint:()=>Zc,base64url:()=>Oc,base64:()=>Tc,array:()=>bt,any:()=>Gc,_function:()=>Ct,_default:()=>Er,_ZodString:()=>ni,ZodXor:()=>cr,ZodXID:()=>ci,ZodVoid:()=>ur,ZodUnknown:()=>or,ZodUnion:()=>kt,ZodUndefined:()=>ir,ZodUUID:()=>ie,ZodURL:()=>gt,ZodULID:()=>li,ZodType:()=>x,ZodTuple:()=>pr,ZodTransform:()=>kr,ZodTemplateLiteral:()=>Rr,ZodSymbol:()=>tr,ZodSuccess:()=>Nr,ZodStringFormat:()=>A,ZodString:()=>pt,ZodSet:()=>yr,ZodRecord:()=>je,ZodReadonly:()=>Dr,ZodPromise:()=>Zr,ZodPreprocess:()=>Pr,ZodPrefault:()=>$r,ZodPipe:()=>It,ZodOptional:()=>Ei,ZodObject:()=>_t,ZodNumberFormat:()=>Ie,ZodNumber:()=>ht,ZodNullable:()=>Sr,ZodNull:()=>nr,ZodNonOptional:()=>$i,ZodNever:()=>sr,ZodNanoID:()=>oi,ZodNaN:()=>Ar,ZodMap:()=>vr,ZodMAC:()=>Yn,ZodLiteral:()=>br,ZodLazy:()=>Cr,ZodKSUID:()=>di,ZodJWT:()=>bi,ZodIntersection:()=>mr,ZodIPv6:()=>fi,ZodIPv4:()=>mi,ZodGUID:()=>Xe,ZodFunction:()=>Mr,ZodFile:()=>_r,ZodExactOptional:()=>Ir,ZodEnum:()=>Re,ZodEmoji:()=>ai,ZodEmail:()=>ri,ZodE164:()=>yi,ZodDiscriminatedUnion:()=>dr,ZodDefault:()=>xr,ZodDate:()=>Ii,ZodCustomStringFormat:()=>Le,ZodCustom:()=>St,ZodCodec:()=>wt,ZodCatch:()=>Ur,ZodCUID2:()=>ui,ZodCUID:()=>si,ZodCIDRv6:()=>gi,ZodCIDRv4:()=>pi,ZodBoolean:()=>vt,ZodBigIntFormat:()=>_i,ZodBigInt:()=>yt,ZodBase64URL:()=>vi,ZodBase64:()=>hi,ZodArray:()=>lr,ZodAny:()=>ar});var Jl={};ae(Jl,{uppercase:()=>Vt,trim:()=>Qt,toUpperCase:()=>ti,toLowerCase:()=>ei,startsWith:()=>Xt,slugify:()=>ii,size:()=>lt,regex:()=>Gt,property:()=>Jn,positive:()=>Zn,overwrite:()=>se,normalize:()=>Yt,nonpositive:()=>Bn,nonnegative:()=>Fn,negative:()=>Mn,multipleOf:()=>ze,minSize:()=>fe,minLength:()=>ye,mime:()=>Kt,maxSize:()=>Ce,maxLength:()=>ct,lte:()=>Y,lt:()=>de,lowercase:()=>Wt,length:()=>dt,includes:()=>qt,gte:()=>F,gt:()=>me,endsWith:()=>Ht});var Vn={};ae(Vn,{time:()=>Vl,duration:()=>ql,datetime:()=>Gl,date:()=>Wl,ZodISOTime:()=>Hn,ZodISODuration:()=>Kn,ZodISODateTime:()=>qn,ZodISODate:()=>Xn});var qn=m("ZodISODateTime",(e,i)=>{cs.init(e,i),A.init(e,i)});function Gl(e){return ku(qn,e)}var Xn=m("ZodISODate",(e,i)=>{ds.init(e,i),A.init(e,i)});function Wl(e){return Iu(Xn,e)}var Hn=m("ZodISOTime",(e,i)=>{ms.init(e,i),A.init(e,i)});function Vl(e){return wu(Hn,e)}var Kn=m("ZodISODuration",(e,i)=>{fs.init(e,i),A.init(e,i)});function ql(e){return Su(Kn,e)}var Xl=(e,i)=>{Wi.init(e,i),e.name="ZodError",Object.defineProperties(e,{format:{value:(n)=>qi(e,n)},flatten:{value:(n)=>Vi(e,n)},addIssue:{value:(n)=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Ut,2)}},addIssues:{value:(n)=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Ut,2)}},isEmpty:{get(){return e.issues.length===0}}})},jg=m("ZodError",Xl),V=m("ZodError",Xl,{Parent:Error}),Hl=tt(V),Kl=it(V),Yl=nt(V),Ql=rt(V),ec=Xi(V),tc=Hi(V),ic=Ki(V),nc=Yi(V),rc=Qi(V),ac=en(V),oc=tn(V),sc=nn(V),$a=new WeakMap;function ft(e,i,n){let a=Object.getPrototypeOf(e),t=$a.get(a);if(!t)t=new Set,$a.set(a,t);if(t.has(i))return;t.add(i);for(let r in n){let o=n[r];Object.defineProperty(a,r,{configurable:!0,enumerable:!1,get(){let u=o.bind(this);return Object.defineProperty(this,r,{configurable:!0,writable:!0,enumerable:!0,value:u}),u},set(u){Object.defineProperty(this,r,{configurable:!0,writable:!0,enumerable:!0,value:u})}})}}var x=m("ZodType",(e,i)=>{return S.init(e,i),Object.assign(e["~standard"],{jsonSchema:{input:Ve(e,"input"),output:Ve(e,"output")}}),e.toJSONSchema=nl(e,{}),e.def=i,e.type=i.type,Object.defineProperty(e,"_def",{value:i}),e.parse=(n,a)=>Hl(e,n,a,{callee:e.parse}),e.safeParse=(n,a)=>Yl(e,n,a),e.parseAsync=async(n,a)=>Kl(e,n,a,{callee:e.parseAsync}),e.safeParseAsync=async(n,a)=>Ql(e,n,a),e.spa=e.safeParseAsync,e.encode=(n,a)=>ec(e,n,a),e.decode=(n,a)=>tc(e,n,a),e.encodeAsync=async(n,a)=>ic(e,n,a),e.decodeAsync=async(n,a)=>nc(e,n,a),e.safeEncode=(n,a)=>rc(e,n,a),e.safeDecode=(n,a)=>ac(e,n,a),e.safeEncodeAsync=async(n,a)=>oc(e,n,a),e.safeDecodeAsync=async(n,a)=>sc(e,n,a),ft(e,"ZodType",{check(...n){let a=this.def;return this.clone(E.mergeDefs(a,{checks:[...a.checks??[],...n.map((t)=>typeof t==="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,a){return Q(this,n,a)},brand(){return this},register(n,a){return n.add(this,a),this},refine(n,a){return this.check(Br(n,a))},superRefine(n,a){return this.check(Fr(n,a))},overwrite(n){return this.check(se(n))},optional(){return He(this)},exactOptional(){return wr(this)},nullable(){return Ke(this)},nullish(){return He(Ke(this))},nonoptional(n){return Or(this,n)},array(){return bt(this)},or(n){return wi([this,n])},and(n){return fr(this,n)},transform(n){return Rt(this,xi(n))},default(n){return Er(this,n)},prefault(n){return Tr(this,n)},catch(n){return zr(this,n)},pipe(n){return Rt(this,n)},readonly(){return jr(this)},describe(n){let a=this.clone();return K.add(a,{description:n}),a},meta(...n){if(n.length===0)return K.get(this);let a=this.clone();return K.add(a,n[0]),a},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return K.get(e)?.description},configurable:!0}),e}),ni=m("_ZodString",(e,i)=>{ut.init(e,i),x.init(e,i),e._zod.processJSONSchema=(a,t,r)=>rl(e,a,t,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,ft(e,"_ZodString",{regex(...a){return this.check(Gt(...a))},includes(...a){return this.check(qt(...a))},startsWith(...a){return this.check(Xt(...a))},endsWith(...a){return this.check(Ht(...a))},min(...a){return this.check(ye(...a))},max(...a){return this.check(ct(...a))},length(...a){return this.check(dt(...a))},nonempty(...a){return this.check(ye(1,...a))},lowercase(a){return this.check(Wt(a))},uppercase(a){return this.check(Vt(a))},trim(){return this.check(Qt())},normalize(...a){return this.check(Yt(...a))},toLowerCase(){return this.check(ei())},toUpperCase(){return this.check(ti())},slugify(){return this.check(ii())}})}),pt=m("ZodString",(e,i)=>{ut.init(e,i),ni.init(e,i),e.email=(n)=>e.check(_n(ri,n)),e.url=(n)=>e.check(Jt(gt,n)),e.jwt=(n)=>e.check(Ln(bi,n)),e.emoji=(n)=>e.check(xn(ai,n)),e.guid=(n)=>e.check(Dt(Xe,n)),e.uuid=(n)=>e.check(kn(ie,n)),e.uuidv4=(n)=>e.check(In(ie,n)),e.uuidv6=(n)=>e.check(wn(ie,n)),e.uuidv7=(n)=>e.check(Sn(ie,n)),e.nanoid=(n)=>e.check(En(oi,n)),e.guid=(n)=>e.check(Dt(Xe,n)),e.cuid=(n)=>e.check($n(si,n)),e.cuid2=(n)=>e.check(Tn(ui,n)),e.ulid=(n)=>e.check(On(li,n)),e.base64=(n)=>e.check(jn(hi,n)),e.base64url=(n)=>e.check(Rn(vi,n)),e.xid=(n)=>e.check(Nn(ci,n)),e.ksuid=(n)=>e.check(Un(di,n)),e.ipv4=(n)=>e.check(zn(mi,n)),e.ipv6=(n)=>e.check(An(fi,n)),e.cidrv4=(n)=>e.check(Pn(pi,n)),e.cidrv6=(n)=>e.check(Dn(gi,n)),e.e164=(n)=>e.check(Cn(yi,n)),e.datetime=(n)=>e.check(Gl(n)),e.date=(n)=>e.check(Wl(n)),e.time=(n)=>e.check(Vl(n)),e.duration=(n)=>e.check(ql(n))});function qe(e){return vu(pt,e)}var A=m("ZodStringFormat",(e,i)=>{z.init(e,i),ni.init(e,i)}),ri=m("ZodEmail",(e,i)=>{ts.init(e,i),A.init(e,i)});function uc(e){return _n(ri,e)}var Xe=m("ZodGUID",(e,i)=>{Qo.init(e,i),A.init(e,i)});function lc(e){return Dt(Xe,e)}var ie=m("ZodUUID",(e,i)=>{es.init(e,i),A.init(e,i)});function cc(e){return kn(ie,e)}function dc(e){return In(ie,e)}function mc(e){return wn(ie,e)}function fc(e){return Sn(ie,e)}var gt=m("ZodURL",(e,i)=>{is.init(e,i),A.init(e,i)});function pc(e){return Jt(gt,e)}function gc(e){return Jt(gt,{protocol:ce.httpProtocol,hostname:ce.domain,...E.normalizeParams(e)})}var ai=m("ZodEmoji",(e,i)=>{ns.init(e,i),A.init(e,i)});function hc(e){return xn(ai,e)}var oi=m("ZodNanoID",(e,i)=>{rs.init(e,i),A.init(e,i)});function vc(e){return En(oi,e)}var si=m("ZodCUID",(e,i)=>{as.init(e,i),A.init(e,i)});function yc(e){return $n(si,e)}var ui=m("ZodCUID2",(e,i)=>{os.init(e,i),A.init(e,i)});function bc(e){return Tn(ui,e)}var li=m("ZodULID",(e,i)=>{ss.init(e,i),A.init(e,i)});function _c(e){return On(li,e)}var ci=m("ZodXID",(e,i)=>{us.init(e,i),A.init(e,i)});function kc(e){return Nn(ci,e)}var di=m("ZodKSUID",(e,i)=>{ls.init(e,i),A.init(e,i)});function Ic(e){return Un(di,e)}var mi=m("ZodIPv4",(e,i)=>{ps.init(e,i),A.init(e,i)});function wc(e){return zn(mi,e)}var Yn=m("ZodMAC",(e,i)=>{hs.init(e,i),A.init(e,i)});function Sc(e){return bu(Yn,e)}var fi=m("ZodIPv6",(e,i)=>{gs.init(e,i),A.init(e,i)});function xc(e){return An(fi,e)}var pi=m("ZodCIDRv4",(e,i)=>{vs.init(e,i),A.init(e,i)});function Ec(e){return Pn(pi,e)}var gi=m("ZodCIDRv6",(e,i)=>{ys.init(e,i),A.init(e,i)});function $c(e){return Dn(gi,e)}var hi=m("ZodBase64",(e,i)=>{bs.init(e,i),A.init(e,i)});function Tc(e){return jn(hi,e)}var vi=m("ZodBase64URL",(e,i)=>{ks.init(e,i),A.init(e,i)});function Oc(e){return Rn(vi,e)}var yi=m("ZodE164",(e,i)=>{Is.init(e,i),A.init(e,i)});function Nc(e){return Cn(yi,e)}var bi=m("ZodJWT",(e,i)=>{Ss.init(e,i),A.init(e,i)});function Uc(e){return Ln(bi,e)}var Le=m("ZodCustomStringFormat",(e,i)=>{xs.init(e,i),A.init(e,i)});function zc(e,i,n={}){return mt(Le,e,i,n)}function Ac(e){return mt(Le,"hostname",ce.hostname,e)}function Pc(e){return mt(Le,"hex",ce.hex,e)}function Dc(e,i){let n=i?.enc??"hex",a=`${e}_${n}`,t=ce[a];if(!t)throw Error(`Unrecognized hash format: ${a}`);return mt(Le,a,t,i)}var ht=m("ZodNumber",(e,i)=>{cn.init(e,i),x.init(e,i),e._zod.processJSONSchema=(a,t,r)=>al(e,a,t,r),ft(e,"ZodNumber",{gt(a,t){return this.check(me(a,t))},gte(a,t){return this.check(F(a,t))},min(a,t){return this.check(F(a,t))},lt(a,t){return this.check(de(a,t))},lte(a,t){return this.check(Y(a,t))},max(a,t){return this.check(Y(a,t))},int(a){return this.check(jt(a))},safe(a){return this.check(jt(a))},positive(a){return this.check(me(0,a))},nonnegative(a){return this.check(F(0,a))},negative(a){return this.check(de(0,a))},nonpositive(a){return this.check(Y(0,a))},multipleOf(a,t){return this.check(ze(a,t))},step(a,t){return this.check(ze(a,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??0.5),e.isFinite=!0,e.format=n.format??null});function Qn(e){return xu(ht,e)}var Ie=m("ZodNumberFormat",(e,i)=>{Es.init(e,i),ht.init(e,i)});function jt(e){return $u(Ie,e)}function jc(e){return Tu(Ie,e)}function Rc(e){return Ou(Ie,e)}function Cc(e){return Nu(Ie,e)}function Lc(e){return Uu(Ie,e)}var vt=m("ZodBoolean",(e,i)=>{dn.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>ol(e,n,a,t)});function er(e){return zu(vt,e)}var yt=m("ZodBigInt",(e,i)=>{mn.init(e,i),x.init(e,i),e._zod.processJSONSchema=(a,t,r)=>sl(e,a,t,r),e.gte=(a,t)=>e.check(F(a,t)),e.min=(a,t)=>e.check(F(a,t)),e.gt=(a,t)=>e.check(me(a,t)),e.gte=(a,t)=>e.check(F(a,t)),e.min=(a,t)=>e.check(F(a,t)),e.lt=(a,t)=>e.check(de(a,t)),e.lte=(a,t)=>e.check(Y(a,t)),e.max=(a,t)=>e.check(Y(a,t)),e.positive=(a)=>e.check(me(BigInt(0),a)),e.negative=(a)=>e.check(de(BigInt(0),a)),e.nonpositive=(a)=>e.check(Y(BigInt(0),a)),e.nonnegative=(a)=>e.check(F(BigInt(0),a)),e.multipleOf=(a,t)=>e.check(ze(a,t));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function Zc(e){return Pu(yt,e)}var _i=m("ZodBigIntFormat",(e,i)=>{$s.init(e,i),yt.init(e,i)});function Mc(e){return ju(_i,e)}function Bc(e){return Ru(_i,e)}var tr=m("ZodSymbol",(e,i)=>{Ts.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>ul(e,n,a,t)});function Fc(e){return Cu(tr,e)}var ir=m("ZodUndefined",(e,i)=>{Os.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>cl(e,n,a,t)});function Jc(e){return Lu(ir,e)}var nr=m("ZodNull",(e,i)=>{Ns.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>ll(e,n,a,t)});function rr(e){return Zu(nr,e)}var ar=m("ZodAny",(e,i)=>{Us.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>fl(e,n,a,t)});function Gc(){return Mu(ar)}var or=m("ZodUnknown",(e,i)=>{zs.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>pl(e,n,a,t)});function be(){return Bu(or)}var sr=m("ZodNever",(e,i)=>{As.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>ml(e,n,a,t)});function ki(e){return Fu(sr,e)}var ur=m("ZodVoid",(e,i)=>{Ps.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>dl(e,n,a,t)});function Wc(e){return Ju(ur,e)}var Ii=m("ZodDate",(e,i)=>{Ds.init(e,i),x.init(e,i),e._zod.processJSONSchema=(a,t,r)=>gl(e,a,t,r),e.min=(a,t)=>e.check(F(a,t)),e.max=(a,t)=>e.check(Y(a,t));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Vc(e){return Gu(Ii,e)}var lr=m("ZodArray",(e,i)=>{js.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>$l(e,n,a,t),e.element=i.element,ft(e,"ZodArray",{min(n,a){return this.check(ye(n,a))},nonempty(n){return this.check(ye(1,n))},max(n,a){return this.check(ct(n,a))},length(n,a){return this.check(dt(n,a))},unwrap(){return this.element}})});function bt(e,i){return qu(lr,e,i)}function qc(e){let i=e._zod.def.shape;return Si(Object.keys(i))}var _t=m("ZodObject",(e,i)=>{Zs.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Tl(e,n,a,t),E.defineLazy(e,"shape",()=>{return i.shape}),ft(e,"ZodObject",{keyof(){return Si(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:be()})},loose(){return this.clone({...this._zod.def,catchall:be()})},strict(){return this.clone({...this._zod.def,catchall:ki()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return E.extend(this,n)},safeExtend(n){return E.safeExtend(this,n)},merge(n){return E.merge(this,n)},pick(n){return E.pick(this,n)},omit(n){return E.omit(this,n)},partial(...n){return E.partial(Ei,this,n[0])},required(...n){return E.required($i,this,n[0])}})});function Xc(e,i){let n={type:"object",shape:e??{},...E.normalizeParams(i)};return new _t(n)}function Hc(e,i){return new _t({type:"object",shape:e,catchall:ki(),...E.normalizeParams(i)})}function Kc(e,i){return new _t({type:"object",shape:e,catchall:be(),...E.normalizeParams(i)})}var kt=m("ZodUnion",(e,i)=>{Ft.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Gn(e,n,a,t),e.options=i.options});function wi(e,i){return new kt({type:"union",options:e,...E.normalizeParams(i)})}var cr=m("ZodXor",(e,i)=>{kt.init(e,i),Ms.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Gn(e,n,a,t),e.options=i.options});function Yc(e,i){return new cr({type:"union",options:e,inclusive:!1,...E.normalizeParams(i)})}var dr=m("ZodDiscriminatedUnion",(e,i)=>{kt.init(e,i),Bs.init(e,i)});function Qc(e,i,n){return new dr({type:"union",options:i,discriminator:e,...E.normalizeParams(n)})}var mr=m("ZodIntersection",(e,i)=>{Fs.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Ol(e,n,a,t)});function fr(e,i){return new mr({type:"intersection",left:e,right:i})}var pr=m("ZodTuple",(e,i)=>{fn.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Nl(e,n,a,t),e.rest=(n)=>e.clone({...e._zod.def,rest:n})});function gr(e,i,n){let a=i instanceof S,t=a?n:i;return new pr({type:"tuple",items:e,rest:a?i:null,...E.normalizeParams(t)})}var je=m("ZodRecord",(e,i)=>{Js.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Ul(e,n,a,t),e.keyType=i.keyType,e.valueType=i.valueType});function hr(e,i,n){if(!i||!i._zod)return new je({type:"record",keyType:qe(),valueType:e,...E.normalizeParams(i)});return new je({type:"record",keyType:e,valueType:i,...E.normalizeParams(n)})}function ed(e,i,n){let a=Q(e);return a._zod.values=void 0,new je({type:"record",keyType:a,valueType:i,...E.normalizeParams(n)})}function td(e,i,n){return new je({type:"record",keyType:e,valueType:i,mode:"loose",...E.normalizeParams(n)})}var vr=m("ZodMap",(e,i)=>{Gs.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>xl(e,n,a,t),e.keyType=i.keyType,e.valueType=i.valueType,e.min=(...n)=>e.check(fe(...n)),e.nonempty=(n)=>e.check(fe(1,n)),e.max=(...n)=>e.check(Ce(...n)),e.size=(...n)=>e.check(lt(...n))});function id(e,i,n){return new vr({type:"map",keyType:e,valueType:i,...E.normalizeParams(n)})}var yr=m("ZodSet",(e,i)=>{Ws.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>El(e,n,a,t),e.min=(...n)=>e.check(fe(...n)),e.nonempty=(n)=>e.check(fe(1,n)),e.max=(...n)=>e.check(Ce(...n)),e.size=(...n)=>e.check(lt(...n))});function nd(e,i){return new yr({type:"set",valueType:e,...E.normalizeParams(i)})}var Re=m("ZodEnum",(e,i)=>{Vs.init(e,i),x.init(e,i),e._zod.processJSONSchema=(a,t,r)=>hl(e,a,t,r),e.enum=i.entries,e.options=Object.values(i.entries);let n=new Set(Object.keys(i.entries));e.extract=(a,t)=>{let r={};for(let o of a)if(n.has(o))r[o]=i.entries[o];else throw Error(`Key ${o} not found in enum`);return new Re({...i,checks:[],...E.normalizeParams(t),entries:r})},e.exclude=(a,t)=>{let r={...i.entries};for(let o of a)if(n.has(o))delete r[o];else throw Error(`Key ${o} not found in enum`);return new Re({...i,checks:[],...E.normalizeParams(t),entries:r})}});function Si(e,i){let n=Array.isArray(e)?Object.fromEntries(e.map((a)=>[a,a])):e;return new Re({type:"enum",entries:n,...E.normalizeParams(i)})}function rd(e,i){return new Re({type:"enum",entries:e,...E.normalizeParams(i)})}var br=m("ZodLiteral",(e,i)=>{qs.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>vl(e,n,a,t),e.values=new Set(i.values),Object.defineProperty(e,"value",{get(){if(i.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return i.values[0]}})});function ad(e,i){return new br({type:"literal",values:Array.isArray(e)?e:[e],...E.normalizeParams(i)})}var _r=m("ZodFile",(e,i)=>{Xs.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>_l(e,n,a,t),e.min=(n,a)=>e.check(fe(n,a)),e.max=(n,a)=>e.check(Ce(n,a)),e.mime=(n,a)=>e.check(Kt(Array.isArray(n)?n:[n],a))});function od(e){return Xu(_r,e)}var kr=m("ZodTransform",(e,i)=>{Hs.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Sl(e,n,a,t),e._zod.parse=(n,a)=>{if(a.direction==="backward")throw new Qe(e.constructor.name);n.addIssue=(r)=>{if(typeof r==="string")n.issues.push(E.issue(r,n.value,i));else{let o=r;if(o.fatal)o.continue=!1;o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=e),n.issues.push(E.issue(o))}};let t=i.transform(n.value,n);if(t instanceof Promise)return t.then((r)=>{return n.value=r,n.fallback=!0,n});return n.value=t,n.fallback=!0,n}});function xi(e){return new kr({type:"transform",transform:e})}var Ei=m("ZodOptional",(e,i)=>{pn.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Wn(e,n,a,t),e.unwrap=()=>e._zod.def.innerType});function He(e){return new Ei({type:"optional",innerType:e})}var Ir=m("ZodExactOptional",(e,i)=>{Ks.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Wn(e,n,a,t),e.unwrap=()=>e._zod.def.innerType});function wr(e){return new Ir({type:"optional",innerType:e})}var Sr=m("ZodNullable",(e,i)=>{Ys.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>zl(e,n,a,t),e.unwrap=()=>e._zod.def.innerType});function Ke(e){return new Sr({type:"nullable",innerType:e})}function sd(e){return He(Ke(e))}var xr=m("ZodDefault",(e,i)=>{Qs.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Pl(e,n,a,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Er(e,i){return new xr({type:"default",innerType:e,get defaultValue(){return typeof i==="function"?i():E.shallowClone(i)}})}var $r=m("ZodPrefault",(e,i)=>{eu.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Dl(e,n,a,t),e.unwrap=()=>e._zod.def.innerType});function Tr(e,i){return new $r({type:"prefault",innerType:e,get defaultValue(){return typeof i==="function"?i():E.shallowClone(i)}})}var $i=m("ZodNonOptional",(e,i)=>{tu.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Al(e,n,a,t),e.unwrap=()=>e._zod.def.innerType});function Or(e,i){return new $i({type:"nonoptional",innerType:e,...E.normalizeParams(i)})}var Nr=m("ZodSuccess",(e,i)=>{iu.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>kl(e,n,a,t),e.unwrap=()=>e._zod.def.innerType});function ud(e){return new Nr({type:"success",innerType:e})}var Ur=m("ZodCatch",(e,i)=>{nu.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>jl(e,n,a,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function zr(e,i){return new Ur({type:"catch",innerType:e,catchValue:typeof i==="function"?i:()=>i})}var Ar=m("ZodNaN",(e,i)=>{ru.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>yl(e,n,a,t)});function ld(e){return Vu(Ar,e)}var It=m("ZodPipe",(e,i)=>{gn.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Rl(e,n,a,t),e.in=i.in,e.out=i.out});function Rt(e,i){return new It({type:"pipe",in:e,out:i})}var wt=m("ZodCodec",(e,i)=>{It.init(e,i),hn.init(e,i)});function cd(e,i,n){return new wt({type:"pipe",in:e,out:i,transform:n.decode,reverseTransform:n.encode})}function dd(e){let i=e._zod.def;return new wt({type:"pipe",in:i.out,out:i.in,transform:i.reverseTransform,reverseTransform:i.transform})}var Pr=m("ZodPreprocess",(e,i)=>{It.init(e,i),au.init(e,i)}),Dr=m("ZodReadonly",(e,i)=>{ou.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Cl(e,n,a,t),e.unwrap=()=>e._zod.def.innerType});function jr(e){return new Dr({type:"readonly",innerType:e})}var Rr=m("ZodTemplateLiteral",(e,i)=>{su.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>bl(e,n,a,t)});function md(e,i){return new Rr({type:"template_literal",parts:e,...E.normalizeParams(i)})}var Cr=m("ZodLazy",(e,i)=>{cu.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Zl(e,n,a,t),e.unwrap=()=>e._zod.def.getter()});function Lr(e){return new Cr({type:"lazy",getter:e})}var Zr=m("ZodPromise",(e,i)=>{lu.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Ll(e,n,a,t),e.unwrap=()=>e._zod.def.innerType});function fd(e){return new Zr({type:"promise",innerType:e})}var Mr=m("ZodFunction",(e,i)=>{uu.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>wl(e,n,a,t)});function Ct(e){return new Mr({type:"function",input:Array.isArray(e?.input)?gr(e?.input):e?.input??bt(be()),output:e?.output??be()})}var St=m("ZodCustom",(e,i)=>{du.init(e,i),x.init(e,i),e._zod.processJSONSchema=(n,a,t)=>Il(e,n,a,t)});function pd(e){let i=new D({check:"custom"});return i._zod.check=e,i}function gd(e,i){return Hu(St,e??(()=>!0),i)}function Br(e,i={}){return Ku(St,e,i)}function Fr(e,i){return Yu(e,i)}var hd=el,vd=tl;function yd(e,i={}){let n=new St({type:"custom",check:"custom",fn:(a)=>a instanceof e,abort:!0,...E.normalizeParams(i)});return n._zod.bag.Class=e,n._zod.check=(a)=>{if(!(a.value instanceof e))a.issues.push({code:"invalid_type",expected:e.name,input:a.value,inst:n,path:[...n._zod.def.path??[]]})},n}var bd=(...e)=>il({Codec:wt,Boolean:vt,String:pt},...e);function _d(e){let i=Lr(()=>{return wi([qe(e),Qn(),er(),rr(),bt(i),hr(qe(),i)])});return i}function kd(e,i){return new Pr({type:"pipe",in:xi(e),out:i})}var Rg={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 Cg(e){R({customError:e})}function Lg(){return R().customError}var Mi;(function(e){})(Mi||(Mi={}));var b={...Fl,...Jl,iso:Vn},Zg=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 Mg(e,i){let n=e.$schema;if(n==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(n==="http://json-schema.org/draft-07/schema#")return"draft-7";if(n==="http://json-schema.org/draft-04/schema#")return"draft-4";return i??"draft-2020-12"}function Bg(e,i){if(!e.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return i.rootSchema;let a=i.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===a){let t=n[1];if(!t||!i.defs[t])throw Error(`Reference not found: ${e}`);return i.defs[t]}throw Error(`Reference not found: ${e}`)}function Id(e,i){if(e.not!==void 0){if(typeof e.not==="object"&&Object.keys(e.not).length===0)return b.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let t=e.$ref;if(i.refs.has(t))return i.refs.get(t);if(i.processing.has(t))return b.lazy(()=>{if(!i.refs.has(t))throw Error(`Circular reference not resolved: ${t}`);return i.refs.get(t)});i.processing.add(t);let r=Bg(t,i),o=L(r,i);return i.refs.set(t,o),i.processing.delete(t),o}if(e.enum!==void 0){let t=e.enum;if(i.version==="openapi-3.0"&&e.nullable===!0&&t.length===1&&t[0]===null)return b.null();if(t.length===0)return b.never();if(t.length===1)return b.literal(t[0]);if(t.every((o)=>typeof o==="string"))return b.enum(t);let r=t.map((o)=>b.literal(o));if(r.length<2)return r[0];return b.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return b.literal(e.const);let n=e.type;if(Array.isArray(n)){let t=n.map((r)=>{let o={...e,type:r};return Id(o,i)});if(t.length===0)return b.never();if(t.length===1)return t[0];return b.union(t)}if(!n)return b.any();let a;switch(n){case"string":{let t=b.string();if(e.format){let r=e.format;if(r==="email")t=t.check(b.email());else if(r==="uri"||r==="uri-reference")t=t.check(b.url());else if(r==="uuid"||r==="guid")t=t.check(b.uuid());else if(r==="date-time")t=t.check(b.iso.datetime());else if(r==="date")t=t.check(b.iso.date());else if(r==="time")t=t.check(b.iso.time());else if(r==="duration")t=t.check(b.iso.duration());else if(r==="ipv4")t=t.check(b.ipv4());else if(r==="ipv6")t=t.check(b.ipv6());else if(r==="mac")t=t.check(b.mac());else if(r==="cidr")t=t.check(b.cidrv4());else if(r==="cidr-v6")t=t.check(b.cidrv6());else if(r==="base64")t=t.check(b.base64());else if(r==="base64url")t=t.check(b.base64url());else if(r==="e164")t=t.check(b.e164());else if(r==="jwt")t=t.check(b.jwt());else if(r==="emoji")t=t.check(b.emoji());else if(r==="nanoid")t=t.check(b.nanoid());else if(r==="cuid")t=t.check(b.cuid());else if(r==="cuid2")t=t.check(b.cuid2());else if(r==="ulid")t=t.check(b.ulid());else if(r==="xid")t=t.check(b.xid());else if(r==="ksuid")t=t.check(b.ksuid())}if(typeof e.minLength==="number")t=t.min(e.minLength);if(typeof e.maxLength==="number")t=t.max(e.maxLength);if(e.pattern)t=t.regex(new RegExp(e.pattern));a=t;break}case"number":case"integer":{let t=n==="integer"?b.number().int():b.number();if(typeof e.minimum==="number")t=t.min(e.minimum);if(typeof e.maximum==="number")t=t.max(e.maximum);if(typeof e.exclusiveMinimum==="number")t=t.gt(e.exclusiveMinimum);else if(e.exclusiveMinimum===!0&&typeof e.minimum==="number")t=t.gt(e.minimum);if(typeof e.exclusiveMaximum==="number")t=t.lt(e.exclusiveMaximum);else if(e.exclusiveMaximum===!0&&typeof e.maximum==="number")t=t.lt(e.maximum);if(typeof e.multipleOf==="number")t=t.multipleOf(e.multipleOf);a=t;break}case"boolean":{a=b.boolean();break}case"null":{a=b.null();break}case"object":{let t={},r=e.properties||{},o=new Set(e.required||[]);for(let[l,c]of Object.entries(r)){let d=L(c,i);t[l]=o.has(l)?d:d.optional()}if(e.propertyNames){let l=L(e.propertyNames,i),c=e.additionalProperties&&typeof e.additionalProperties==="object"?L(e.additionalProperties,i):b.any();if(Object.keys(t).length===0){a=b.record(l,c);break}let d=b.object(t).passthrough(),f=b.looseRecord(l,c);a=b.intersection(d,f);break}if(e.patternProperties){let l=e.patternProperties,c=Object.keys(l),d=[];for(let p of c){let y=L(l[p],i),w=b.string().regex(new RegExp(p));d.push(b.looseRecord(w,y))}let f=[];if(Object.keys(t).length>0)f.push(b.object(t).passthrough());if(f.push(...d),f.length===0)a=b.object({}).passthrough();else if(f.length===1)a=f[0];else{let p=b.intersection(f[0],f[1]);for(let y=2;y<f.length;y++)p=b.intersection(p,f[y]);a=p}break}let u=b.object(t);if(e.additionalProperties===!1)a=u.strict();else if(typeof e.additionalProperties==="object")a=u.catchall(L(e.additionalProperties,i));else a=u.passthrough();break}case"array":{let{prefixItems:t,items:r}=e;if(t&&Array.isArray(t)){let o=t.map((l)=>L(l,i)),u=r&&typeof r==="object"&&!Array.isArray(r)?L(r,i):void 0;if(u)a=b.tuple(o).rest(u);else a=b.tuple(o);if(typeof e.minItems==="number")a=a.check(b.minLength(e.minItems));if(typeof e.maxItems==="number")a=a.check(b.maxLength(e.maxItems))}else if(Array.isArray(r)){let o=r.map((l)=>L(l,i)),u=e.additionalItems&&typeof e.additionalItems==="object"?L(e.additionalItems,i):void 0;if(u)a=b.tuple(o).rest(u);else a=b.tuple(o);if(typeof e.minItems==="number")a=a.check(b.minLength(e.minItems));if(typeof e.maxItems==="number")a=a.check(b.maxLength(e.maxItems))}else if(r!==void 0){let o=L(r,i),u=b.array(o);if(typeof e.minItems==="number")u=u.min(e.minItems);if(typeof e.maxItems==="number")u=u.max(e.maxItems);a=u}else a=b.array(b.any());break}default:throw Error(`Unsupported type: ${n}`)}return a}function L(e,i){if(typeof e==="boolean")return e?b.any():b.never();let n=Id(e,i),a=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let u=e.anyOf.map((c)=>L(c,i)),l=b.union(u);n=a?b.intersection(n,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let u=e.oneOf.map((c)=>L(c,i)),l=b.xor(u);n=a?b.intersection(n,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=a?n:b.any();else{let u=a?n:L(e.allOf[0],i),l=a?0:1;for(let c=l;c<e.allOf.length;c++)u=b.intersection(u,L(e.allOf[c],i));n=u}if(e.nullable===!0&&i.version==="openapi-3.0")n=b.nullable(n);if(e.readOnly===!0)n=b.readonly(n);if(e.default!==void 0)n=n.default(e.default);let t={},r=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let u of r)if(u in e)t[u]=e[u];let o=["contentEncoding","contentMediaType","contentSchema"];for(let u of o)if(u in e)t[u]=e[u];for(let u of Object.keys(e))if(!Zg.has(u))t[u]=e[u];if(Object.keys(t).length>0)i.registry.add(n,t);if(e.description)n=n.describe(e.description);return n}function Fg(e,i){if(typeof e==="boolean")return e?b.any():b.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let a=Mg(n,i?.defaultTarget),t=n.$defs||n.definitions||{},r={version:a,defs:t,refs:new Map,processing:new Set,rootSchema:n,registry:i?.registry??K};return L(n,r)}var wd={};ae(wd,{string:()=>Jg,number:()=>Gg,date:()=>qg,boolean:()=>Wg,bigint:()=>Vg});function Jg(e){return yu(pt,e)}function Gg(e){return Eu(ht,e)}function Wg(e){return Au(vt,e)}function Vg(e){return Du(yt,e)}function qg(e){return Wu(Ii,e)}R(mu());var Jr=s,Xg=s.object({id:s.string(),temperature:s.number().optional(),maxTokens:s.number().optional(),contextWindow:s.number().optional(),inputPrice:s.number().optional(),outputPrice:s.number().optional(),supportsImages:s.boolean().optional()}),Hg=s.object({models:s.array(Xg).optional(),openAiBaseUrl:s.string().optional(),openAiHeaders:s.record(s.string(),s.string()).optional(),azureApiVersion:s.string().optional(),azureIdentity:s.boolean().optional()}),Kg=s.object({id:s.string(),thinkingBudgetTokens:s.number().optional()}),Yg=s.object({name:s.string(),baseModelId:s.string(),thinkingBudgetTokens:s.number().optional()}),Qg=s.object({models:s.array(Kg).optional(),customModels:s.array(Yg).optional(),awsRegion:s.string().optional(),awsUseCrossRegionInference:s.boolean().optional(),awsUseGlobalInference:s.boolean().optional(),awsBedrockUsePromptCache:s.boolean().optional(),awsBedrockEndpoint:s.string().optional()}),eh=s.object({id:s.string()}),th=s.object({models:s.array(eh).optional()}),ih=s.object({id:s.string(),thinkingBudgetTokens:s.number().optional()}),nh=s.object({models:s.array(ih).optional(),vertexProjectId:s.string().optional(),vertexRegion:s.string().optional()}),rh=s.object({id:s.string(),thinkingBudgetTokens:s.number().optional(),promptCachingEnabled:s.boolean().optional()}),ah=s.object({models:s.array(rh).optional(),baseUrl:s.string().optional()}),oh=s.object({id:s.string(),thinkingBudgetTokens:s.number().optional()}),sh=s.object({models:s.array(oh).optional(),baseUrl:s.string().optional()}),uh=s.object({OpenAiCompatible:Hg.optional(),AwsBedrock:Qg.optional(),Cline:th.optional(),Vertex:nh.optional(),LiteLLM:ah.optional(),Anthropic:sh.optional()}),lh=s.object({id:s.string()}),ch=s.object({name:s.string(),url:s.string(),alwaysEnabled:s.boolean().optional(),headers:s.record(s.string(),s.string()).optional()}),Ta=s.object({alwaysEnabled:s.boolean(),name:s.string(),contents:s.string()}),Pi=s.object({bucket:s.string(),accessKeyId:s.string(),secretAccessKey:s.string(),region:s.string().optional(),endpoint:s.string().optional(),accountId:s.string().optional()}),dh=s.object({enabled:s.boolean().optional(),type:s.union([s.literal("s3_access_keys"),s.literal("r2_access_keys"),s.literal("azure_access_keys")]).optional(),s3AccessSettings:Pi.optional(),r2AccessSettings:Pi.optional(),azureAccessSettings:Pi.optional()}),mh=s.object({promptUploading:dh.optional()}),Ey=s.object({version:s.string(),providerSettings:uh.optional(),telemetryEnabled:s.boolean().optional(),kanbanEnabled:s.boolean().optional(),mcpMarketplaceEnabled:s.boolean().optional(),allowedMCPServers:s.array(lh).optional(),remoteMCPServers:s.array(ch).optional(),blockPersonalRemoteMCPServers:s.boolean().optional(),yoloModeAllowed:s.boolean().optional(),openTelemetryEnabled:s.boolean().optional(),openTelemetryMetricsExporter:s.string().optional(),openTelemetryLogsExporter:s.string().optional(),openTelemetryOtlpProtocol:s.string().optional(),openTelemetryOtlpEndpoint:s.string().optional(),openTelemetryOtlpHeaders:s.record(s.string(),s.string()).optional(),openTelemetryOtlpMetricsProtocol:s.string().optional(),openTelemetryOtlpMetricsEndpoint:s.string().optional(),openTelemetryOtlpMetricsHeaders:s.record(s.string(),s.string()).optional(),openTelemetryOtlpLogsProtocol:s.string().optional(),openTelemetryOtlpLogsEndpoint:s.string().optional(),openTelemetryOtlpLogsHeaders:s.record(s.string(),s.string()).optional(),openTelemetryMetricExportInterval:s.number().optional(),openTelemetryOtlpInsecure:s.boolean().optional(),openTelemetryLogBatchSize:s.number().optional(),openTelemetryLogBatchTimeout:s.number().optional(),openTelemetryLogMaxQueueSize:s.number().optional(),enterpriseTelemetry:mh.optional(),globalRules:s.array(Ta).optional(),globalWorkflows:s.array(Ta).optional()}),$y=s.record(s.string(),s.string()),Sd="input_progress";var fh=[/\bserver is shutting down\b/i,/^(?:error:\s*)?(?:503\s*)?loading model\b/i,/\b(?:ECONNREFUSED|ECONNRESET|ECONNABORTED|EPIPE|EHOSTUNREACH|EHOSTDOWN|ENETUNREACH|ENETDOWN|ETIMEDOUT|UND_ERR_SOCKET|UND_ERR_CONNECT_TIMEOUT|UND_ERR_CLOSED)\b/,/\bsocket hang up\b/i,/\bother side closed\b/i,/\bsocket (?:was )?closed\b/i,/\bpremature close\b/i,/\bcannot connect to api\b/i,/^fetch failed$/i,/^terminated$/i,/^(?:error:\s*)?terminated:/i,/\bHTTPParserError\b/,/\bHPE_[A-Z_]+\b/,/^(?:network|connection) (?:error|failure|lost|reset)$/i,/^(?:(?:error:\s*)?(?:502|503|504)\s*)?(?:bad gateway|service unavailable|gateway time-?out)$/i,/^no healthy upstream$/i,/^(?:error:\s*)?(?:500\s*)?invalid input batch\.?$/i,/^(?:error:\s*)?got exception: speculative batch index \d+ is not inside the current sub-batch\b/i,/^(?:error:\s*)?(?:AI_TypeValidationError:\s*)?type validation failed\b[^:\n]*: value:/i,/^(?:error:\s*)?(?:AI_JSONParseError:\s*)?json parsing failed: text:/i],ph=new Set([502,503,504]);var Gr=/^(?:error:\s*)?evicted to keep other in-flight requests alive\b/i;function xd(e,i){return i==="kv_evicted"||Gr.test((e??"").trim())}function Ye(e,i=0){if(i>5||e===null||e===void 0)return!1;if(typeof e==="string"){let a=e.trim();if(Gr.test(a))return!0;if(!a.startsWith("{"))return!1;try{return Ye(JSON.parse(a),i+1)}catch{return!1}}if(typeof e!=="object")return!1;let n=e;if(n.error_kind==="evicted_kv_full")return!0;for(let a of["error","responseBody","data","cause","message"]){let t=n[a];if(t!==void 0&&t!==e){if(Ye(t,i+1))return!0}}return!1}var gh=[/projected mean tps below floor/i,/context allocation exhausted/i,/session allocation full/i,/admission (?:rejected|refused|queued)/i,/\btoo many requests\b/i,Gr,/\[opencoti_window_unavailable\b/];function Ed(e){let i=(n,a)=>/^[A-Z]/.test(n)?a.charAt(0).toUpperCase()+a.slice(1):a;return e.replace(/\badmission (?:rejected|refused)\b/gi,(n)=>i(n,"admission queued")).replace(/\b(?:rejected|refused)\b/gi,(n)=>i(n,"queued")).replace(/\b(?:rejecting|refusing)\b/gi,(n)=>i(n,"queueing")).replace(/\b(?:rejections|refusals)\b/gi,(n)=>i(n,"retries")).replace(/\b(?:rejection|refusal)\b/gi,(n)=>i(n,"retry"))}function Ge(e,i){let n=(e??"").trim();if(i==="rate_limited"||i==="kv_evicted"||gh.some((a)=>a.test(n)))return"refusal";if(n&&fh.some((a)=>a.test(n)))return"transport";return}function hh(e){let i=e.code;return typeof i==="string"?i:void 0}function vh(e){let i=e.status??e.statusCode;return typeof i==="number"?i:void 0}function Wr(e,i=0){if(i>5||e===null||e===void 0)return;if(typeof e==="string")return Ge(e);if(typeof e!=="object")return;let n=vh(e);if(n===429||Ye(e,i))return"refusal";let a=e.message,t=typeof a==="string"?Ge(a):void 0;if(t==="refusal")return t;let r=hh(e);if(r&&Ge(r)==="transport")return"transport";if(n!==void 0&&ph.has(n))return"transport";if(t)return t;return Wr(e.cause,i+1)}var $d=["none","minimal","low","medium","high","xhigh","max"],yh=s.enum($d),bh=yh.exclude(["none"]),_h=s.enum([...$d,"default"]).nullable(),kh=s.discriminatedUnion("type",[s.object({type:s.literal("toggle")}).strict(),s.object({type:s.literal("effort"),values:s.array(_h)}).strict(),s.object({type:s.literal("budget_tokens"),min:s.number().min(-1).optional(),max:s.number().min(0).optional()}).strict().refine((e)=>e.min===void 0||e.max===void 0||e.min<=e.max,{message:"Minimum reasoning budget cannot exceed maximum",path:["min"]})]),Ih=s.enum(["default","openai-responses","r1"]);var wh=s.enum(["images","video","tools","streaming","prompt-cache","reasoning","reasoning-effort","computer-use","global-endpoint","structured_output","temperature","files"]),Sh=s.enum(["active","preview","deprecated","legacy"]),xh=s.object({input:s.number().optional(),output:s.number().optional(),cacheWrite:s.number().optional(),cacheRead:s.number().optional()}),Eh=s.object({maxBudget:s.number().optional(),outputPrice:s.number().optional(),thinkingLevel:s.enum(["low","high"]).optional()}),$h=s.object({reasoningDefaultOn:s.boolean().optional()}).catchall(s.unknown()),Oa=s.enum(["text","image","audio","video","pdf"]),Th=s.object({input:s.array(Oa),output:s.array(Oa)});var Oh=s.enum(["language","image-generation","speech-generation","video-generation","transcription"]);var Nh=s.enum(["batch","streaming"]);var Td=s.object({id:s.string(),name:s.string().optional(),description:s.string().optional(),maxTokens:s.number().optional(),contextWindow:s.number().optional(),maxInputTokens:s.number().optional(),capabilities:s.array(wh).optional(),operation:Oh.optional(),operationModes:s.array(Nh).optional(),modalities:Th.optional(),reasoningOptions:s.array(kh).optional(),apiFormat:Ih.optional(),systemRole:s.enum(["system","developer"]).optional(),temperature:s.number().optional(),pricing:xh.optional(),thinkingConfig:Eh.optional(),status:Sh.optional(),deprecationNotice:s.string().optional(),replacedBy:s.string().optional(),releaseDate:s.string().optional(),deprecationDate:s.string().optional(),family:s.string().optional(),metadata:$h.optional()});var Od="NOT a tool or system failure. Clarify with user before proceeding.",Uh=s.object({id:s.string(),name:s.string(),execution:s.enum(["client","provider"]).optional(),input:s.unknown(),output:s.unknown(),error:s.string().optional(),durationMs:s.number(),startedAt:s.date(),endedAt:s.date()}),zh=s.enum(["completed","max_iterations","aborted","mistake_limit","error"]),Ah=s.object({inputTokens:s.number(),outputTokens:s.number(),cacheReadTokens:s.number().optional(),cacheWriteTokens:s.number().optional(),totalCost:s.number().optional()}),Ty=s.object({text:s.string(),usage:Ah,messages:s.array(s.custom()),toolCalls:s.array(Uh),iterations:s.number(),finishReason:zh,model:s.object({id:s.string(),provider:s.string(),info:Td.optional()}),startedAt:s.date(),endedAt:s.date(),durationMs:s.number()}),Oy=s.object({distinctId:s.string().optional(),sessionId:s.string().optional(),providerId:s.string(),modelId:s.string(),apiKey:s.string().optional(),baseUrl:s.string().url().optional(),headers:s.record(s.string(),s.string()).optional(),knownModels:s.record(s.string(),Td).optional(),providerConfig:s.unknown().optional(),initialMessages:s.array(s.custom()).optional(),systemPrompt:s.string(),tools:s.array(s.custom()),modelTools:s.array(s.custom()).optional(),maxIterations:s.number().positive().optional(),maxParallelToolCalls:s.number().int().positive().default(8),maxTokensPerTurn:s.number().positive().optional(),maxToolResultChars:s.number().int().positive().optional(),temperature:s.number().nonnegative().optional(),apiTimeoutMs:s.number().positive().default(180000),userFileContentLoader:s.function().input([s.string()]).output(s.promise(s.string())).optional(),toolContextMetadata:s.record(s.string(),s.unknown()).optional(),execution:s.object({maxConsecutiveMistakes:s.number().int().positive().optional(),reminderAfterIterations:s.number().nonnegative().optional(),reminderText:s.string().optional(),loopDetection:s.union([s.literal(!1),s.object({softThreshold:s.number().int().positive().optional(),hardThreshold:s.number().int().positive().optional()})]).optional(),reasoningLoopDetection:s.union([s.literal(!1),s.object({minChars:s.number().int().positive().optional(),window:s.number().int().positive().optional(),maxPeriod:s.number().int().positive().optional(),minCycles:s.number().int().positive().optional(),maxUniqueInWindow:s.number().int().positive().optional(),minLineChars:s.number().int().positive().optional(),phraseMaxPeriod:s.number().int().positive().optional(),phraseMinCycles:s.number().int().positive().optional(),maxConsecutiveTrips:s.number().int().positive().optional()})]).optional(),reasoningRepetition:s.union([s.literal(!1),s.object({minChars:s.number().int().positive().optional(),minParagraphChars:s.number().int().positive().optional(),minStopwords:s.number().int().nonnegative().optional(),maxRepeatTrip:s.number().int().positive().optional(),duplicateFractionTrip:s.number().min(0).max(1).optional(),cooldownTurns:s.number().int().nonnegative().optional(),maxNudges:s.number().int().nonnegative().optional(),recoveryTokens:s.number().int().nonnegative().optional()})]).optional()}).optional(),reasoningEffort:bh.optional(),thinkingBudgetTokens:s.number().positive().optional(),thinking:s.boolean().optional(),onEvent:s.function().input([s.custom()]).output(s.void()).optional(),hooks:s.custom().optional(),parentAgentId:s.string().optional(),extensions:s.array(s.custom()).optional(),hookErrorMode:s.enum(["ignore","throw"]).default("ignore"),toolPolicies:s.record(s.string(),s.object({enabled:s.boolean().optional(),autoApprove:s.boolean().optional()})).optional(),unavailableToolReasons:s.record(s.string(),s.string()).optional(),requestToolApproval:s.function().input([s.object({sessionId:s.string(),agentId:s.string(),conversationId:s.string(),iteration:s.number(),toolCallId:s.string(),toolName:s.string(),input:s.unknown(),policy:s.object({enabled:s.boolean().optional(),autoApprove:s.boolean().optional()}).default({})})]).output(s.union([s.object({approved:s.boolean(),reason:s.string().optional()}),s.promise(s.object({approved:s.boolean(),reason:s.string().optional()}))])).optional(),onConsecutiveMistakeLimitReached:s.function().input([s.object({iteration:s.number().int().positive(),consecutiveMistakes:s.number().int().positive(),maxConsecutiveMistakes:s.number().int().positive(),reason:s.enum(["api_error","invalid_tool_call","tool_execution_failed"]),details:s.string().optional()})]).output(s.union([s.object({action:s.literal("continue"),guidance:s.string().optional()}),s.object({action:s.literal("stop"),reason:s.string().optional()}),s.promise(s.union([s.object({action:s.literal("continue"),guidance:s.string().optional()}),s.object({action:s.literal("stop"),reason:s.string().optional()})]))])).optional(),logger:s.custom().optional(),extensionContext:s.custom().optional(),abortSignal:s.custom().optional()}),Ph=s.enum(["connector.started","connector.stopping","session.authorize","message.received","message.denied","message.completed","message.failed","session.started","session.reused","session.reset","schedule.delivery.started","schedule.delivery.sent","schedule.delivery.failed"]),Dh=s.object({id:s.string().optional(),label:s.string().optional(),role:s.string().optional(),participantKey:s.string().optional(),participantLabel:s.string().optional(),platformUserId:s.string().optional(),metadata:s.record(s.string(),s.unknown()).optional()}),jh=s.object({source:s.string(),sourceEvent:s.string(),threadId:s.string(),channelId:s.string(),isDM:s.boolean(),sessionId:s.string().optional(),workspaceRoot:s.string().optional(),metadata:s.record(s.string(),s.unknown()).optional()}),Ny=s.object({actor:Dh,context:jh,payload:s.record(s.string(),s.unknown()).optional()}),Uy=s.object({action:s.enum(["allow","deny"]).default("allow"),message:s.string().optional(),reason:s.string().optional(),metadata:s.record(s.string(),s.unknown()).optional()}),zy=s.object({adapter:s.string(),botUserName:s.string().optional(),event:Ph,payload:s.record(s.string(),s.unknown()),ts:s.string()});var Rh=["hooks","tools","commands","rules","skills","messageBuilders","providers","automationEvents","mcp"],Ay=new Set(Rh);var Bi={CLINE_PASS:"ext-cline-pass",CODE_ONBOARDING_GITHUB:"code-onboarding-github"},Py={[Bi.CLINE_PASS]:!1,[Bi.CODE_ONBOARDING_GITHUB]:!1},Dy=Object.values(Bi),Ch=s.enum(["agent_start","agent_resume","agent_abort","agent_end","agent_error","tool_call","tool_result","prompt_submit","pre_compact","session_shutdown"]),_e=s.record(s.string(),s.string()),Lh=s.object({toolName:s.string(),parameters:_e}),Zh=s.object({toolName:s.string(),parameters:_e,result:s.string(),success:s.boolean(),executionTimeMs:s.number()}),Mh=s.object({prompt:s.string(),attachments:s.array(s.string())}),Bh=s.object({taskMetadata:_e}),Fh=s.object({taskMetadata:_e,previousState:_e}),Jh=s.object({taskMetadata:_e}),Gh=s.object({taskMetadata:_e}),Wh=s.object({taskId:s.string(),ulid:s.string(),contextSize:s.number(),compactionStrategy:s.string(),previousApiReqIndex:s.number(),tokensIn:s.number(),tokensOut:s.number(),tokensInCache:s.number(),tokensOutCache:s.number(),deletedRangeStart:s.number(),deletedRangeEnd:s.number(),contextJsonPath:s.string(),contextRawPath:s.string()}),jy=s.object({clineVersion:s.string(),hookName:Ch,timestamp:s.string(),taskId:s.string(),sessionContext:s.object({rootSessionId:s.string().optional(),hookLogPath:s.string().optional()}).optional(),workspaceRoots:s.array(s.string()),workspaceInfo:s.custom().optional(),userId:s.string(),agent_id:s.string(),parent_agent_id:s.string().nullable(),iteration:s.number().optional(),reason:s.string().optional(),tool_call:s.object({id:s.string(),name:s.string(),input:s.unknown()}).optional(),tool_result:s.custom().optional(),turn:s.unknown().optional(),error:s.object({name:s.string(),message:s.string(),stack:s.string().optional()}).optional(),preToolUse:Lh.optional(),postToolUse:Zh.optional(),userPromptSubmit:Mh.optional(),taskStart:Bh.optional(),taskResume:Fh.optional(),taskCancel:Jh.optional(),taskComplete:Gh.optional(),preCompact:Wh.optional()}).passthrough();var Vh=["readFile","search","bash","webFetch","editor","applyPatch","skills","askQuestion","submit"],Ry=new Set(Vh);var Na="<tool_call>",qh=/<tool_call>|<parameter=[^>]*>|<\/parameter>/g,Xh=/<function=[^\s>]+\s*>/,Vr="[SYSTEM] Your last message contained no tool calls, so the run was about to end. If the task is not finished, continue now by emitting the tool calls it needs - do not describe what you are going to do without doing it. If the task really is finished, say so in one short sentence.",Nd=" If what you need is a decision from the user, call `ask_question` - that is the only way to reach them. A question written as ordinary text is not a question anyone will see: it reads here as a turn that called nothing, which is what produced this message.",Hh="[SYSTEM] You have now taken ";function Ud(e,i){let n=Math.round(i/1000),a=n>=1?`about ${n.toLocaleString("en-US")},000 characters of reasoning`:"a full turn of reasoning";return Hh+`${e} turns in a row without calling a single tool, spending ${a} on them. Thinking further has not moved this task, and it will not: you have already reasoned past the point where more of it helps. Stop analysing and make one tool call now - the smallest one that makes any progress at all, even if you are not certain it is the right one, because a call you can check beats an analysis you cannot. If you genuinely cannot make one, say what is blocking you in a single sentence and stop.`}var Kh="[SYSTEM] Your last message contained a tool call that could not be read.";function qr(e){if(!e||!e.includes(Na)||!Xh.test(e))return;let i=0,n=0,a=0;for(let l of e.matchAll(qh)){let c=l[0];if(c===Na)i+=1;else if(c==="</parameter>")a+=1;else n+=1}if(i===0)return;let t=Math.max(n-a,0),r=Math.min(Math.max(i-1,0),t),o=[...e.matchAll(/<function=([^\s>]+)\s*>/g)],u=o[o.length-1]?.[1];return{blocks:i,restarts:r,...u?{name:u}:{}}}function Xr(e){let i=e.name?`\`${e.name}\``:"a tool",n=e.restarts>0?` You began ${i} and then, part-way through a parameter you never closed, started the whole call again${e.restarts>1?`, ${e.restarts} times over`:""}. The reader cannot tell an abandoned call from the value of the parameter it was abandoned inside, so all of it came back as text.`:` It named ${i}, but the block was not well formed and could not be read.`;return Kh+n+" Nothing ran, so nothing has changed on disk. Emit the call once, in one clean block: open it, give each parameter and close each parameter, then close the function and the call. Do not restart a call once you have begun it - finish it, or send nothing and start the next turn fresh."}var Yh="[SYSTEM] You wrote ";function zd(e){let i=e.trim().replace(/\s+/g," ").slice(0,200);return Yh+`"${i}" and then called nothing, for the second turn running. Saying what you are about to do is not doing it, and the run ends on the next silent turn with the work undone. Emit the tool call itself now - the first one, not a description of it. If you cannot, say plainly what is stopping you in one sentence.`}var Qh=/\b(?:let me|i'?ll|i will|i'?m going to|i am going to|now i(?:'?ll| will)|next,? i(?:'?ll| will)|let'?s)\b/i,ev=/\b(?:task (?:is )?(?:complete|finished|done)|all done|is now (?:complete|finished|fixed|working)|i(?:'?m| am) (?:done|finished)|nothing (?:else|more) to do|no further changes)\b/i;function Hr(e){let i=e?.trim();if(!i||ev.test(i))return;let n=i.slice(-400);return Qh.test(n)?i:void 0}var tv=s.enum(["image","audio","video","file"]),iv=s.discriminatedUnion("type",[s.object({type:s.literal("base64"),data:s.string().min(1)}),s.object({type:s.literal("url"),url:s.string().url().refine((e)=>{let i=new URL(e).protocol;return i==="http:"||i==="https:"},"Generated media URLs must use HTTP or HTTPS")}),s.object({type:s.literal("artifact"),artifactId:s.string().min(1)})]);function nv(e){if(e.startsWith("image/"))return"image";if(e.startsWith("audio/"))return"audio";if(e.startsWith("video/"))return"video";return"file"}var Cy=s.object({id:s.string().min(1),modality:tv,mediaType:s.string().min(1),source:iv,name:s.string().min(1).optional(),sizeBytes:s.number().int().nonnegative().optional()}).refine((e)=>nv(e.mediaType)===e.modality,{message:"Generated media modality must match its media type",path:["modality"]});function Ua(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function Kr(e,i){if(!e&&!i)return;let n=e?.metadata,a=i?.metadata,t={...e??{},...i??{}};if(Ua(n)&&Ua(a))t.metadata={...n,...a};return t}var za=Symbol.for("cline.shared.tokenCalibration");function rv(e,i){if(e===void 0||i===void 0)return!0;return e===i}function Ad(){let e=globalThis,i=e[za];if(i)return i;let n={};return e[za]=n,n}function av(){return Ad().charsPerToken??3}function Pd(e){let i=Ad();return rv(i.outputCapOwner,e)?i.outputCap:void 0}function Dd(e){return Math.max(1,Math.ceil(e/av()))}function Te(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function ov(e){let i=e.type;if(typeof i==="string")return[i];return Array.isArray(i)?i.filter((n)=>typeof n==="string"):[]}function Fi(e,i){if(ov(e).includes(i))return!0;for(let n of["anyOf","oneOf","allOf"]){let a=e[n];if(Array.isArray(a)&&a.some((t)=>Te(t)&&Fi(t,i)))return!0}return!1}function sv(e,i){if(typeof e!=="string")return e;let n=e.trim(),a=Fi(i,"array"),t=Fi(i,"object");if((!a||!n.startsWith("["))&&(!t||!n.startsWith("{")))return e;try{let r=JSON.parse(n);if(Array.isArray(r))return a?r:e;if(Te(r))return t?r:e;return e}catch{return e}}function Lt(e,i){let n=sv(e,i);if(Array.isArray(n)){let o=i.items;if(!Te(o))return n;let u=!1,l=n.map((c)=>{let d=Lt(c,o);return u||=d!==c,d});return u?l:n}if(!Te(n))return n;let a=i.properties;if(!Te(a))return n;let t=!1,r={...n};for(let[o,u]of Object.entries(a)){if(!(o in n)||!Te(u))continue;let l=Lt(n[o],u);if(l!==n[o])r[o]=l,t=!0}return t?r:n}function jd(e){return Object.fromEntries(Object.entries(e).filter(([,i])=>i!==void 0))}function Z(e){let i=e?.trim();return i?i:void 0}function uv(e){return s.toJSONSchema(e)}var Ly=new RegExp(`${"⁣⟦"}([^${"⟧"}]*)${"⟧"}([\\s\\S]*?)${"⟦/⟧⁣"}`,"g");var Rd=`# Plan Mode
66
66
 
67
67
  You are in Plan mode. Your role is to explore, analyze, and plan -- not to execute.
68
68
 
@@ -90,4 +90,4 @@ ${r}
90
90
 
91
91
  `);this.pendingHookContexts=[];let p=we("user",[{type:"text",text:f}],{userRunSpan:0,displayRole:"system"});this.state.messages.push(p),await this.emit({type:"message-added",snapshot:this.snapshot(),message:p})}await this.emit({type:"turn-finished",snapshot:this.snapshot(),iteration:this.state.iteration,toolCallCount:o.length});let c=this.findCompletingToolMessage(o,l);if(c){let f=await this.runCompletionBoundary(am(c)||xt(n));if(f){await this.addUserReminderMessage(f);continue}let p=this.finishRun("completed",n,am(c)||void 0);return await this.callAfterRunHooks(p),await this.emit({type:"run-finished",snapshot:this.snapshot(),result:p}),p}let d=this.repetitionNudgeFor(n);if(d)await this.addUserReminderMessage(d)}throw new ra(this.config.maxIterations)}catch(i){let n=i instanceof Error?i:Error(String(i)),a=n instanceof zi,r=this.abortController.signal.aborted||a?"aborted":"failed",o=n instanceof Me?"context_window_exceeded":n.message===this.state.lastError?this.state.lastErrorClass:void 0,u=n.message===this.state.lastError&&this.state.lastErrorReported;this.state.status=r,this.state.lastError=n.message,this.state.lastErrorClass=o,this.state.lastErrorReported=u;let l=this.findLastAssistantMessage(),c={agentId:this.state.agentId,agentRole:this.state.agentRole,runId:this.state.runId??ge("run"),status:r,iterations:this.state.iteration,outputText:xt(l),messages:q(this.state.messages),usage:ue(this.state.usage),error:r==="failed"?n:void 0,abortReason:r==="aborted"?n.message:void 0,...r==="failed"&&n instanceof ra?{limit:"max_iterations"}:{}};if(this.config.logger?.log?.(`Agent loop caught error (${r}): ${n.name}: ${n.message}`,{severity:r==="failed"?"error":"warn",agentId:this.state.agentId,agentRole:this.state.agentRole,runId:c.runId,status:r,iteration:this.state.iteration,errorName:n.name,errorMessage:n.message,assistantContentPartCount:l?.content.length??0}),await this.callAfterRunHooks(c),r==="failed")await this.emit({type:"run-failed",snapshot:this.snapshot(),error:n,errorClass:o});else await this.emit({type:"run-finished",snapshot:this.snapshot(),result:c});return c}finally{this.abortController=void 0}}async callBeforeRunHooks(){for(let e of this.hooks.beforeRun){let i=await e({snapshot:this.snapshot()});this.applyStopControl(i)}}async callAfterRunHooks(e){for(let i of this.hooks.afterRun)await i({snapshot:this.snapshot(),result:e})}async generateAssistantMessageRecoveringFaults(){for(let e=1;;e+=1){let i,n,a=!1;try{i=await this.generateAssistantMessageWithOverflowRecovery()}catch(p){if(this.abortController?.signal.aborted||p instanceof zi||p instanceof Me||p instanceof Se)throw p;n=p,a=!0}let t=this.config.recoverTurnFault,r=()=>{if(a)throw n;return i};if(!t)return r();let o,u,l;if(a)o=Wr(n),u=n instanceof Error?n.message:String(n),l=Ye(n);else if(i?.finishReason==="error")u=this.state.lastError??"",o=Ge(u,this.state.lastErrorClass),l=xd(u,this.state.lastErrorClass);else return r();if(!o)return r();let c=Z(this.config.sessionId),d=this.lastRequestTokens;if(l)this.config.logger?.log?.(`Engine bug: the server evicted session ${c??"(unnamed)"} (agent ${this.state.agentId}) at ${new Date().toISOString()}, holding ${d!==void 0?`${d.toLocaleString("en-US")} tokens (its last completed request)`:"an unknown number of tokens (no request had completed)"}, turn ${this.state.iteration}, attempt ${e}: ${u}; waiting to send it again`,{severity:"warn",kind:"engine_eviction",...c?{sessionId:c}:{},agentId:this.state.agentId,...d!==void 0?{tokensHeld:d}:{},iteration:this.state.iteration,attempt:e});else this.config.logger?.log?.(o==="refusal"?`Turn ${this.state.iteration} queued by the server (retry ${e}): ${Ed(u)}; waiting to send it again`:`Turn ${this.state.iteration} failed on a ${o} fault (attempt ${e}): ${u}; waiting to send it again`,{severity:o==="refusal"?"info":"warn"});await this.emit({type:"status-notice",snapshot:this.snapshot(),message:l?"the server evicted the turn to keep others alive (an engine bug) — waiting, then retrying":o==="transport"?"the server dropped the turn — waiting for it to come back, then retrying":"the server queued the turn — waiting for room, then retrying",metadata:{kind:"turn_fault_recovery",reason:o,...l?{evicted:!0}:{},phase:"started",iteration:this.state.iteration,attempt:e,providerError:u}});let f=!1;try{f=await t({kind:o,message:u,attempt:e,iteration:this.state.iteration,...l?{evicted:!0}:{},...l&&d!==void 0?{tokensHeld:d}:{},...c?{sessionId:c}:{},...this.abortController?.signal?{signal:this.abortController.signal}:{}})}catch{f=!1}if(this.throwIfAborted(),!f)return r()}}async generateAssistantMessageWithOverflowRecovery(){if(this.config.alwaysDescribeImages===!0)await this.describeImagesInTranscript();let e=this.compactBeforeNextTurn;this.compactBeforeNextTurn=!1;let i=await this.generateAssistantMessage(e?{overflowRecovery:!0}:void 0);if(this.isRecoverableImageTurn(i))return await this.retryWithoutImages();if(!this.isRecoverableOverflowTurn(i))return i;this.overflowRecoveryAttempted=!0;let n=this.state.lastError;if(!this.config.prepareTurn)throw new Me(ty,n);await this.emit({type:"status-notice",snapshot:this.snapshot(),message:"context window exceeded — compacting and retrying",metadata:{kind:"context_overflow_recovery",reason:"context_overflow_recovery",phase:"started",iteration:this.state.iteration,providerError:n}});let a=await this.generateAssistantMessage({overflowRecovery:!0,requireSmallerRequest:!0});if(a.finishReason==="error"&&this.state.lastErrorClass==="context_window_exceeded")throw new Me(ey,this.state.lastError);return a}async recoverUnparsableToolCall(){if(this.state.lastErrorClass!=="tool_call_unparsable"||this.toolCallParseRetries>=Kv)return!1;return this.toolCallParseRetries+=1,await this.emit({type:"status-notice",snapshot:this.snapshot(),message:"the model's tool call did not parse — asking for it again",metadata:{kind:"tool_call_parse_recovery",reason:"tool_call_parse_recovery",phase:"started",iteration:this.state.iteration,attempt:this.toolCallParseRetries,providerError:this.state.lastError,...this.lastToolCallRejection?{rejection:this.lastToolCallRejection}:{}}}),await this.addUserReminderMessage(Hv(this.lastToolCallRejection)),!0}isRecoverableImageTurn(e){return e.finishReason==="error"&&this.state.lastErrorClass==="image_input_unsupported"&&!this.imageRecoveryAttempted&&this.hasImageContent()}hasImageContent(){return this.state.messages.some((e)=>e.content.some((i)=>i.type==="image"))}async retryWithoutImages(){this.imageRecoveryAttempted=!0;let e=this.state.lastError,i=await this.describeImagesInTranscript(),n=0;for(let a of this.state.messages)for(let t=0;t<a.content.length;t++){if(a.content[t]?.type!=="image")continue;n+=1,a.content[t]={type:"text",text:Cv}}return this.config.onImageInputUnsupported?.(),await this.emit({type:"status-notice",snapshot:this.snapshot(),message:"model does not accept images — resending without them",metadata:{kind:"image_input_recovery",reason:"image_input_recovery",phase:"started",iteration:this.state.iteration,droppedImages:n,describedImages:i,providerError:e}}),await this.generateAssistantMessage()}async describeImagesInTranscript(){let e=this.config.describeImages;if(!e)return 0;let i=[],n=[];for(let o of this.state.messages){let u=o.content.filter((l)=>l.type==="text").map((l)=>l.text).join(`
92
92
  `).slice(0,jv);for(let l=0;l<o.content.length;l++){let c=o.content[l];if(c?.type!=="image")continue;let d=Lv(c);if(d===void 0)continue;i.push({message:o,index:l}),n.push({image:d,mediaType:c.mediaType,context:u.length>0?u:void 0})}}if(n.length===0)return this.config.logger?.log?.(`Vision describer found no images in ${this.state.messages.length} transcript message(s)`),0;let a=[];try{a=await e(n)}catch(o){this.config.logger?.log?.(`Vision model could not describe ${n.length} image(s): ${o instanceof Error?o.message:String(o)}`,{severity:"warn"})}let t=this.config.modelSupportsImages!==!1,r=0;for(let o=0;o<i.length;o++){let u=a[o]?.trim();if(!u&&t)continue;let l=i[o];l.message.content[l.index]={type:"text",text:u?`[image description, from the vision model]
93
- ${u}`:Rv},r+=1}return r}isRecoverableOverflowTurn(e){if(e.finishReason!=="error"||this.state.lastErrorClass!=="context_window_exceeded"||this.overflowRecoveryAttempted)return!1;return!e.message.content.some((i)=>i.type==="tool-call")}async generateAssistantMessage(e){let i=ue(this.state.usage);this.state.lastRequestTimings=void 0;let n=jd({distinctId:Z(this.config.distinctId),clientName:Z(this.config.clientName),clientVersion:Z(this.config.clientVersion),clineCoreVersion:Z(this.config.clineCoreVersion),sessionId:Z(this.config.sessionId),agentId:this.state.agentId,conversationId:Z(this.config.conversationId),runId:this.state.runId,iteration:this.state.iteration}),a=this.getRetryOutputCap();if(a!==void 0)this.config.logger?.log?.(`Retrying a truncated turn on a reduced output cap of ${a} tokens (attempt ${this.consecutiveMaxTokensRetries}, was ${this.truncatedOutputCapTokens})`,{severity:"info"});let t={systemPrompt:this.config.systemPrompt,messages:q(this.state.messages),tools:[...this.tools.values()].map((h)=>({name:h.name,description:h.description,inputSchema:h.inputSchema,...h.readOnly?{readOnly:!0}:{}})),modelTools:this.config.modelTools,signal:this.abortController?.signal,options:Kr(this.config.modelOptions,{metadata:n,...a!==void 0?{maxTokens:a}:{}})},r=Date.now(),o=()=>Date.now()-r;if(this.state.iteration>1){let h=await this.consumePendingUserMessage();if(h)t={...t,messages:[...t.messages,...q([h])]}}t=await this.prepareTurnForModelRequest(t,e),this.throwIfAborted();for(let h of this.hooks.beforeModel){let I=await h({snapshot:this.snapshot(),request:t});if(this.throwIfAborted(),this.applyStopControl(I),I?.messages)t={...t,messages:q(I.messages)};if(I?.tools)t={...t,tools:[...I.tools]};if(I?.options)t={...t,options:Kr(t.options,I.options)}}this.config.logger?.debug("Agent model request diagnostics",{iteration:this.state.iteration,providerId:"providerId"in this.config&&typeof this.config.providerId==="string"?this.config.providerId:void 0,modelId:"modelId"in this.config&&typeof this.config.modelId==="string"?this.config.modelId:void 0,...oy(t)}),this.throwIfAborted(),this.captureTaskLifecycle(Cd,{durationMs:o(),phase:"provider_request_started"});let u=this.openTaskLifecycleStream(t,o),l=[],c=new Map,d=new Map,f=[],p=[],y=0,w="stop",O="",ee="",X=Qr(),C=0,N=this.config.reasoningLoopDetection,P=N===!1?void 0:new Ni(N),J;for await(let h of u){switch(this.throwIfAborted(),h.type){case"text-delta":{O+=h.text,X.textDeltas+=1,X.textChars+=h.text.length;let I=p.at(-1);if(I?.type==="part"&&I.part.type==="text")I.part.text+=h.text;else p.push({type:"part",part:{type:"text",text:h.text}});await this.emit({type:"assistant-text-delta",snapshot:this.snapshot(),iteration:this.state.iteration,text:h.text,accumulatedText:O});break}case"media":{p.push({type:"part",part:{type:"media",media:h.media}}),await this.emit({type:"assistant-media",snapshot:this.snapshot(),iteration:this.state.iteration,media:h.media});break}case"reasoning-delta":{ee+=h.text,X.reasoningDeltas+=1,X.reasoningChars+=h.text.length;let I=p.at(-1);if(I?.type==="part"&&I.part.type==="reasoning")I.part.text+=h.text,I.part.redacted=h.redacted??I.part.redacted,I.part.metadata=h.metadata??I.part.metadata;else p.push({type:"part",part:{type:"reasoning",text:h.text,redacted:h.redacted,metadata:h.metadata}});await this.emit({type:"assistant-reasoning-delta",snapshot:this.snapshot(),iteration:this.state.iteration,text:h.text,accumulatedText:ee,redacted:h.redacted,metadata:h.metadata}),J=P?.push(h.text)??void 0;break}case"tool-input-progress":{await this.emit({type:"tool-updated",snapshot:this.snapshot(),iteration:this.state.iteration,toolCall:{type:"tool-call",toolCallId:h.toolCallId,toolName:h.toolName??"tool",input:void 0},update:{kind:Sd,inputChars:h.inputChars,deltas:h.deltas,...h.inputText?{inputText:h.inputText}:{}}});break}case"tool-call-delta":{if(h.execution){let ne={type:"tool-call",toolCallId:h.toolCallId??ge("model_tool"),toolName:h.toolName??"tool",input:h.input,metadata:h.metadata,execution:h.execution};d.set(ne.toolCallId,{toolCallId:ne.toolCallId,toolName:ne.toolName,execution:h.execution,input:ne.input}),await this.emit({type:"tool-started",snapshot:this.snapshot(),iteration:this.state.iteration,toolCall:ne});break}let I=h.toolCallId??`tool_${h.index??y}`;if(h.index==null&&h.toolCallId==null)y+=1;let j=c.get(I);if(!j)j={toolCallId:h.toolCallId??ge("tool"),inputText:""},c.set(I,j),p.push({type:"tool",key:I});if(h.toolCallId)j.toolCallId=h.toolCallId;if(h.toolName)j.toolName=h.toolName;if(h.input!==void 0)j.inputValue=h.input;if(h.metadata!==void 0)j.metadata=om(j.metadata,h.metadata);if(h.inputText)j.inputText=Iy(j.inputText,h.inputText);break}case"tool-result":{let I=d.get(h.toolCallId),j={...I,toolCallId:h.toolCallId,toolName:h.toolName,execution:h.execution,input:h.input===void 0?I?.input:h.input,output:h.output,isError:h.isError};d.set(h.toolCallId,j);let ne={type:"tool-call",toolCallId:h.toolCallId,toolName:h.toolName,input:j.input,execution:h.execution};await this.emit({type:"tool-finished",snapshot:this.snapshot(),iteration:this.state.iteration,toolCall:ne,message:we("tool",[{type:"tool-result",toolCallId:h.toolCallId,toolName:h.toolName,output:h.output,isError:h.isError,execution:h.execution}])});break}case"usage":{let I=[...c.values()].reduce((ne,lm)=>ne+sy(lm),0);X.toolInputChars=Math.max(0,I-C);let j=Hd({outputTokens:h.usage.outputTokens,providerReasoningTokens:h.usage.reasoningTokenCount,tally:X});C=I,X=Qr(),await this.updateUsage(h.usage,h.timings,{outputSplit:j});break}case"finish":{if(w=h.reason,h.error)this.state.lastError=h.error,this.state.lastErrorClass=h.errorClass??em(h.error),this.lastToolCallRejection=h.toolCallRejection,this.state.lastErrorReported=h.errorReported===!0;break}}if(J)break}if(J)await this.onReasoningLoopCut(J);else if(P)this.reasoningLoopStreak=0;for(let h of p){if(h.type==="part"){l.push(h.part);continue}let I=c.get(h.key);if(!I?.toolName){f.push({toolCallId:I?.toolCallId??h.key,input:Ai(I?.inputText??""),reason:"missing_name"});continue}let j=_y(I,w);if(this.config.logger?.debug?.(Av(this.state.iteration,I.toolName,I.toolCallId,I.inputText,j.input)),j.reason)f.push({toolCallId:I.toolCallId,toolName:I.toolName,input:j.invalidInput,reason:j.reason});l.push({type:"tool-call",toolCallId:I.toolCallId,toolName:I.toolName,input:j.input,metadata:j.parseError?om(I.metadata,{inputParseError:j.parseError,rawInputText:I.inputText}):I.metadata})}let B={};if(J)B.reasoningLoop=J;if(f.length>0)B.invalidToolCalls=f;if(d.size>0)B.modelToolActivities=[...d.values()];let xe=we("assistant",l,Object.keys(B).length>0?B:void 0),$t=ly(i,this.state.usage);if($t){if(this.state.lastRequestTimings)$t.timings=this.state.lastRequestTimings;xe.metrics=$t,this.captureUnexpectedReasoningTokens(t,$t)}if(this.config.messageModelInfo)xe.modelInfo={...this.config.messageModelInfo};for(let h of this.hooks.afterModel){let I=await h({snapshot:this.snapshot(),assistantMessage:xe,finishReason:w});this.applyStopControl(I)}return{message:xe,finishReason:w}}async*openTaskLifecycleStream(e,i){let n,a="provider_request_started",t=Date.now();this.trace(`request-start iter=${this.state.iteration}`);try{n=await this.config.model.stream(e),this.trace(`stream-open iter=${this.state.iteration} after=${Date.now()-t}ms`),this.throwIfAborted(),a="provider_stream_started",this.captureTaskLifecycle(Ld,{durationMs:i(),phase:a})}catch(o){if(!this.isAbortError(o))this.captureTaskLifecycleFailure(o,a,i());throw o}let r=!1;try{for await(let o of n){if(!r)r=!0,this.trace(`first-chunk iter=${this.state.iteration} after=${Date.now()-t}ms type=${o.type}`),a="first_chunk_received",this.captureTaskLifecycle(Zd,{durationMs:i(),phase:a,eventType:o.type});yield o}}catch(o){if(!this.isAbortError(o))this.captureTaskLifecycleFailure(o,a,i());throw o}}captureTaskLifecycleFailure(e,i,n){this.captureTaskLifecycle(Md,{durationMs:n,error:e,errorClass:em(e),phase:i})}captureTaskLifecycle(e,i={}){let n=Z(this.config.sessionId);Jd(this.config.telemetry,{event:e,sessionId:n,ulid:n,agentId:this.state.agentId,conversationId:Z(this.config.conversationId),runId:this.state.runId,iteration:this.state.iteration>0?this.state.iteration:void 0,providerId:this.getTelemetryProviderId(),modelId:this.getTelemetryModelId(),...i})}getTelemetryProviderId(){return Z(this.config.messageModelInfo?.provider)??this.telemetryProviderId}getTelemetryModelId(){return Z(this.config.messageModelInfo?.id)??this.telemetryModelId}isAbortError(e){return e instanceof Se||this.abortController?.signal.aborted===!0}captureUnexpectedReasoningTokens(e,i){if(!cy(e)||(i.reasoningTokenCount??0)<=0)return;let n=i.reasoningTokenCount;if(n===void 0)return;Fd(this.config.telemetry,{sessionId:this.config.sessionId,agentId:this.state.agentId,runId:this.state.runId,iteration:this.state.iteration,providerId:this.config.messageModelInfo?.provider,modelId:this.config.messageModelInfo?.id,requestedThinking:!1,reasoningTokenCount:n})}async prepareTurnForModelRequest(e,i){if(!this.config.prepareTurn)return e;let n=i?.overflowRecovery===!0,a=i?.requireSmallerRequest===!0,t=await this.config.prepareTurn({agentId:this.state.agentId,conversationId:this.config.conversationId,parentAgentId:this.state.parentAgentId??null,iteration:this.state.iteration,messages:e.messages,systemPrompt:e.systemPrompt,tools:e.tools,model:{id:this.config.messageModelInfo?.id,provider:this.config.messageModelInfo?.provider},signal:e.signal,overflowRecovery:n||void 0,emitStatusNotice:(o,u)=>{this.emit({type:"status-notice",snapshot:this.snapshot(),message:o,metadata:u})},reportUsage:(o)=>{this.updateUsage(o,void 0,{auxiliary:!0})}});if(a){if(!(t?.messages!==void 0&&JSON.stringify(t.messages).length<JSON.stringify(e.messages).length))throw new Me(Qv,this.state.lastError)}if(!t)return e;let r=e;if(t.messages){let o=q(t.messages);r={...r,messages:q(o)}}if(t.systemPrompt!==void 0)r={...r,systemPrompt:t.systemPrompt};return r}async consumePendingUserMessage(){let e=this.config.consumePendingUserMessage;if(!e)return;let i=(await e())?.trim();if(!i)return;let n=we("user",[{type:"text",text:i}],{userRunSpan:0});return this.steerAwaitingResume=!0,this.state.messages.push(n),await this.emit({type:"message-added",snapshot:this.snapshot(),message:n}),n}async updateUsage(e,i,n){let a=n?.auxiliary===!0;if(this.state.usage={inputTokens:this.state.usage.inputTokens+(e.inputTokens??0),outputTokens:this.state.usage.outputTokens+(e.outputTokens??0),cacheReadTokens:this.state.usage.cacheReadTokens+(e.cacheReadTokens??0),cacheWriteTokens:this.state.usage.cacheWriteTokens+(e.cacheWriteTokens??0),reasoningTokenCount:(this.state.usage.reasoningTokenCount??0)+(e.reasoningTokenCount??0),totalCost:(this.state.usage.totalCost??0)+(e.totalCost??0)},i)this.state.lastRequestTimings=i;if(e.inputTokens!==void 0&&!a)this.lastRequestTokens=(e.inputTokens??0)+(e.outputTokens??0);await this.emit({type:"usage-updated",snapshot:this.snapshot(),usage:ue(this.state.usage),...i?{timings:i}:{},...n?.outputSplit?{outputSplit:n.outputSplit}:{},...a?{auxiliary:!0}:{}})}async executeToolCalls(e){this.pendingHookContexts=[];let i=[];for(let d of e){let f=Date.now(),p=await this.prepareToolExecution(d);p.prepareMs=Date.now()-f,i.push(p)}let n=Array(i.length),a=[],t=[],r=this.config.maxParallelToolCalls>1;i.forEach((d,f)=>{let p=this.tools.get(d.toolCall.toolName);(r&&p?.lifecycle?.boundsOwnConcurrency===!0?t:a).push(f)});let o=t.map(async(d)=>{n[d]=await this.executePreparedTool(i[d])}),u=Math.min(Math.max(1,this.config.maxParallelToolCalls),a.length);if(u<=1){for(let d of a)n[d]=await this.executePreparedTool(i[d]);return await Promise.all(o),n}let l=0,c=async()=>{while(!0){let d=l;if(l+=1,d>=a.length)return;let f=a[d];n[f]=await this.executePreparedTool(i[f])}};return await Promise.all([...Array.from({length:u},()=>c()),...o]),n}findCompletingToolMessage(e,i){for(let n=0;n<e.length;n+=1){let a=e[n];if(this.tools.get(a.toolName)?.lifecycle?.completesRun!==!0)continue;let t=i[n],r=t?.content.find((o)=>o.type==="tool-result"&&o.toolCallId===a.toolCallId);if(r&&!r.isError)return t}return}async prepareToolExecution(e){let i=this.tools.get(e.toolName),n=e.input,a,t=e.metadata&&typeof e.metadata==="object"&&!Array.isArray(e.metadata)?e.metadata:void 0;if(typeof t?.inputParseError==="string")a=t.inputParseError;let r=t?.toolSource&&typeof t.toolSource==="object"&&!Array.isArray(t.toolSource)?t.toolSource:void 0;if(r?.executionMode==="provider")a=`Tool execution is disabled for provider ${typeof r.providerId==="string"?r.providerId:"provider"}`;if(i&&!a)n=Lt(n,i.inputSchema);let o;if(i&&!a)for(let u of this.hooks.beforeTool){let l=await u({snapshot:this.snapshot(),tool:i,toolCall:{...e,input:n},input:n});if(l?.input!==void 0)n=l.input;if(l?.policy)o={...o,...l.policy};if(l?.appendContext?.trim())this.pendingHookContexts.push(rm("PreToolUse",e,l.appendContext));if(this.applyStopControl(l),l?.skip){a=l.reason??`Tool ${i.name} was blocked by a runtime hook`;break}}if(i&&!a){let u={...ry(e.toolName,this.config.toolPolicies),...o};if(u.enabled===!1)a=`Tool "${e.toolName}" is disabled by policy`;else if(u.autoApprove===!1){let l=await this.requestToolApproval(e,n,u);if(!l.approved)a=`${l.reason??"Tool was not executed"} -- ${Od}`}}return{toolCall:{...e,input:n},tool:i,input:n,skipReason:a}}async requestToolApproval(e,i,n){let a=this.config.requestToolApproval;if(!a)return{approved:!1,reason:`Tool "${e.toolName}" requires approval but no approval callback is configured`};try{return await a({sessionId:this.config.sessionId?.trim()||this.config.conversationId?.trim()||this.state.runId||this.state.agentId,agentId:this.state.agentId,conversationId:this.config.conversationId?.trim()||this.state.runId||this.state.agentId,iteration:this.state.iteration,toolCallId:e.toolCallId,toolName:e.toolName,input:i,policy:n})}catch(t){return{approved:!1,reason:`Tool "${e.toolName}" approval request failed: ${t instanceof Error?t.message:String(t)}`}}}async executePreparedTool(e){let i=new Date,n=Date.now();await this.emit({type:"tool-started",snapshot:this.snapshot(),iteration:this.state.iteration,toolCall:e.toolCall});let a=Date.now(),t;if(e.skipReason)t={output:{error:e.skipReason},isError:!0};else if(!e.tool)t={output:{error:`Unknown tool: ${e.toolCall.toolName}`},isError:!0};else try{t={output:await e.tool.execute(e.input,{sessionId:this.config.sessionId,agentId:this.state.agentId,conversationId:this.config.conversationId,runId:this.state.runId??ge("run"),iteration:this.state.iteration,toolCallId:e.toolCall.toolCallId,signal:this.abortController?.signal,metadata:this.config.toolContextMetadata,snapshot:this.snapshot(),emitUpdate:(d)=>{this.emit({type:"tool-updated",snapshot:this.snapshot(),iteration:this.state.iteration,toolCall:e.toolCall,update:d})}})}}catch(c){t={output:{error:c instanceof Error?c.message:String(c)},isError:!0}}let r=new Date,o=Date.now(),u=Math.max(0,r.getTime()-i.getTime());if(e.tool)for(let c of this.hooks.afterTool){let d=await c({snapshot:this.snapshot(),tool:e.tool,toolCall:e.toolCall,input:e.input,result:t,startedAt:i,endedAt:r,durationMs:u});if(d?.appendContext?.trim())this.pendingHookContexts.push(rm("PostToolUse",e.toolCall,d.appendContext));if(this.applyStopControl(d),d?.result)t=d.result}this.trace(`tool ${e.toolCall.toolName} prepare=${e.prepareMs??-1}ms preEmit=${a-n}ms exec=${o-a}ms afterHooks=${Date.now()-o}ms total=${Date.now()-n}ms | hooks ${this.topEventHooks()}`),this.config.logger?.debug?.(`[tool-timing] ${e.toolCall.toolName} prepare=${e.prepareMs??-1}ms preEmit=${a-n}ms exec=${o-a}ms afterHooks=${Date.now()-o}ms total=${Date.now()-n}ms | hooks ${this.topEventHooks()}`);let l=we("tool",[{type:"tool-result",toolCallId:e.toolCall.toolCallId,toolName:e.toolCall.toolName,output:t.output,isError:t.isError}]);return await this.emit({type:"tool-finished",snapshot:this.snapshot(),iteration:this.state.iteration,toolCall:e.toolCall,message:l}),l}finishRun(e,i,n){return this.state.status=e,{agentId:this.state.agentId,agentRole:this.state.agentRole,runId:this.state.runId??ge("run"),status:e,iterations:this.state.iteration,outputText:n??xt(i??this.findLastAssistantMessage()),messages:q(this.state.messages),usage:ue(this.state.usage)}}findLastAssistantMessage(){return[...this.state.messages].reverse().find((e)=>e.role==="assistant")}async onReasoningLoopCut(e){this.reasoningLoopStreak+=1;let i=(this.config.reasoningLoopDetection===!1?void 0:this.config.reasoningLoopDetection?.maxConsecutiveTrips)??Oi.maxConsecutiveTrips,n=ea(e),a=this.reasoningLoopStreak>=i,t=a?await this.config.onReasoningLoopLimitReached?.({iteration:this.state.iteration,consecutiveTrips:this.reasoningLoopStreak,maxConsecutiveTrips:i,diagnosis:n}):void 0,r=t?.action==="continue"?t.guidance?.trim():void 0,o=a&&t?.action!=="continue";if(await this.emit({type:"status-notice",snapshot:this.snapshot(),message:o?`${n} Ending the run after ${this.reasoningLoopStreak} turns cut for this.`:a?`${n} That is ${this.reasoningLoopStreak} turns cut for this, and the run was to end here.`:`${n} Cutting the request and continuing.`,metadata:{kind:"reasoning_loop",reason:"reasoning_loop",phase:o?"aborted":"cut",iteration:this.state.iteration,consecutiveTrips:this.reasoningLoopStreak,verdict:e}}),o){this.abort(new Se(n)),this.throwIfAborted();return}if(r)await this.addUserReminderMessage(r)}throwIfAborted(){if(this.abortController?.signal.aborted)throw this.normalizeAbortError()}normalizeAbortError(){let e=this.abortController?.signal.reason;if(e instanceof Error)return e;if(typeof e==="string")return Error(e);return Error(this.state.lastError??"Run aborted")}eventHookMs=new Map;noteEventHookMs(e,i,n){let a=`${e}#${i}`,t=this.eventHookMs.get(a);if(t)t.ms+=n,t.n+=1;else this.eventHookMs.set(a,{ms:n,n:1})}topEventHooks(e=4){return[...this.eventHookMs.entries()].sort((i,n)=>n[1].ms-i[1].ms).slice(0,e).map(([i,n])=>`${i}=${Math.round(n.ms)}ms/${n.n}`).join(" ")}trace(e){zv(e),this.config.logger?.debug?.(`[timing] ${e}`)}async emit(e){let i=by(e);switch(e.type){case"run-started":this.config.logger?.info?.("Agent run started",i);break;case"tool-finished":this.config.logger?.info?.("Agent tool finished",i);break;case"run-failed":if(this.config.logger?.error?.("Agent run failed",{...i,error:e.error}),!this.state.lastErrorReported)Gd(this.config.telemetry,{component:"agents",operation:"agent.run",error:e.error,severity:"error",handled:!1,context:{...i,providerId:this.getTelemetryProviderId(),modelId:this.getTelemetryModelId()}});break;default:if(!yy.has(e.type))this.config.logger?.debug?.(`Agent event: ${e.type}`,i);break}switch(e.type){case"assistant-text-delta":case"assistant-reasoning-delta":case"assistant-media":case"tool-updated":break;default:this.config.telemetry?.capture({event:`agent.${e.type}`,properties:i});break}let n=0;for(let a of this.listeners){let t=Date.now();a(e),this.noteEventHookMs(e.type,`listener${n}`,Date.now()-t),n+=1}for(let a=0;a<this.hooks.onEvent.length;a+=1){let t=Date.now();await this.hooks.onEvent[a](e),this.noteEventHookMs(e.type,a,Date.now()-t)}}applyStopControl(e){if(!e?.stop)return;if(e.reason)this.state.lastError=e.reason;throw new zi(e.reason)}}var hy={no_tool_call:"the turn ended without calling anything — asking the model to carry on",unparsed_tool_call:"a tool call was written as text and never ran — asking for it again",announced_intent:"the model described the next step instead of taking it — asking it to make the call",non_convergence:"several turns of thinking with no work done — asking for a different approach",silent_repetition:"the turn repeated what the last one said — asking for a different approach"};function vy(e){return hy[e]??`nudged: ${e}`}var yy=new Set(["assistant-text-delta","assistant-reasoning-delta","assistant-media","tool-updated"]);function by(e){return{agentId:e.snapshot.agentId,agentRole:e.snapshot.agentRole,runId:e.snapshot.runId,status:e.snapshot.status,iteration:e.snapshot.iteration,eventType:e.type}}function om(e,i){if(!i||typeof i!=="object"||Array.isArray(i))return i;if(!e||typeof e!=="object"||Array.isArray(e))return i;return{...e,...i}}function _y(e,i){if(e.inputValue!==void 0)return{input:e.inputValue,invalidInput:Ai(JSON.stringify(e.inputValue))};if(!e.inputText.trim())return{input:{},invalidInput:{}};let n=ky(e.inputText);if(n.ok)return{input:n.value,invalidInput:Ai(e.inputText)};let t=i==="max-tokens"?`was cut off by the output budget before its arguments finished: the turn ended at the cap with ${e.inputText.length} characters of arguments written. Nothing is wrong with the payload you were writing -- there was no room left to finish it. Send the same work in smaller pieces: edit one region per call rather than rewriting the file, and keep each call's arguments short enough to complete.`:`emitted invalid JSON arguments: ${n.error}`;return{input:{},invalidInput:Ai(e.inputText,n.error),parseError:`Tool call ${e.toolName??e.toolCallId} ${t}`,reason:"invalid_arguments"}}function Ai(e,i){if(!e.trim())return{};return i?{rawInputText:e,parseError:i}:{rawInputText:e}}function ky(e){let i=e.trim();if(!i)return{ok:!1,error:"Tool call arguments were empty."};try{return{ok:!0,value:JSON.parse(i)}}catch{}if(!(i.startsWith("{")||i.startsWith("[")))return{ok:!1,error:"Tool call arguments must be encoded as a JSON object or array."};return{ok:!1,error:"Tool call arguments could not be parsed as JSON. Ensure the outer tool payload is valid JSON and escape embedded quotes/newlines inside string fields."}}function Iy(e,i){if(!e)return i;let n=i.trimStart();if(n.startsWith("{")||n.startsWith("["))return i;return e+i}function wy(e){return new Et(e)}var Sy=Et;function xy(e){return new Et(e)}export{Kd as measureReasoningRepetition,Yd as isRepetitionLoop,Qd as describeRepetition,ea as describeReasoningLoop,xv as createTool,ta as createRepetitionNudger,wy as createAgentRuntime,xy as createAgent,Ni as ReasoningLoopGuard,um as NON_CONVERGENCE_MIN_REASONING_CHARS,Ze as DEFAULT_REASONING_REPETITION,Oi as DEFAULT_REASONING_LOOP_GUARD,sm as DEFAULT_NO_TOOL_CALL_TURN_STREAK_LIMIT,Yv as DEFAULT_MAX_NO_TOOL_CALL_NUDGES,Se as AgentRuntimeAbortError,Et as AgentRuntime,Sy as Agent};
93
+ ${u}`:Rv},r+=1}return r}isRecoverableOverflowTurn(e){if(e.finishReason!=="error"||this.state.lastErrorClass!=="context_window_exceeded"||this.overflowRecoveryAttempted)return!1;return!e.message.content.some((i)=>i.type==="tool-call")}async generateAssistantMessage(e){let i=ue(this.state.usage);this.state.lastRequestTimings=void 0;let n=jd({distinctId:Z(this.config.distinctId),clientName:Z(this.config.clientName),clientVersion:Z(this.config.clientVersion),clineCoreVersion:Z(this.config.clineCoreVersion),sessionId:Z(this.config.sessionId),agentId:this.state.agentId,conversationId:Z(this.config.conversationId),runId:this.state.runId,iteration:this.state.iteration}),a=this.getRetryOutputCap();if(a!==void 0)this.config.logger?.log?.(`Retrying a truncated turn on a reduced output cap of ${a} tokens (attempt ${this.consecutiveMaxTokensRetries}, was ${this.truncatedOutputCapTokens})`,{severity:"info"});let t={systemPrompt:this.config.systemPrompt,messages:q(this.state.messages),tools:[...this.tools.values()].map((h)=>({name:h.name,description:h.description,inputSchema:h.inputSchema,...h.readOnly?{readOnly:!0}:{}})),modelTools:this.config.modelTools,signal:this.abortController?.signal,options:Kr(this.config.modelOptions,{metadata:n,...a!==void 0?{maxTokens:a}:{}})},r=Date.now(),o=()=>Date.now()-r;if(this.state.iteration>1){let h=await this.consumePendingUserMessage();if(h)t={...t,messages:[...t.messages,...q([h])]}}t=await this.prepareTurnForModelRequest(t,e),this.throwIfAborted();for(let h of this.hooks.beforeModel){let I=await h({snapshot:this.snapshot(),request:t});if(this.throwIfAborted(),this.applyStopControl(I),I?.messages)t={...t,messages:q(I.messages)};if(I?.tools)t={...t,tools:[...I.tools]};if(I?.options)t={...t,options:Kr(t.options,I.options)}}this.config.logger?.debug("Agent model request diagnostics",{iteration:this.state.iteration,providerId:"providerId"in this.config&&typeof this.config.providerId==="string"?this.config.providerId:void 0,modelId:"modelId"in this.config&&typeof this.config.modelId==="string"?this.config.modelId:void 0,...oy(t)}),this.throwIfAborted(),this.captureTaskLifecycle(Cd,{durationMs:o(),phase:"provider_request_started"});let u=this.openTaskLifecycleStream(t,o),l=[],c=new Map,d=new Map,f=[],p=[],y=0,w="stop",O="",ee="",X=Qr(),C=0,N=this.config.reasoningLoopDetection,P=N===!1?void 0:new Ni(N),J;for await(let h of u){switch(this.throwIfAborted(),h.type){case"text-delta":{O+=h.text,X.textDeltas+=1,X.textChars+=h.text.length;let I=p.at(-1);if(I?.type==="part"&&I.part.type==="text")I.part.text+=h.text;else p.push({type:"part",part:{type:"text",text:h.text}});await this.emit({type:"assistant-text-delta",snapshot:this.snapshot(),iteration:this.state.iteration,text:h.text,accumulatedText:O});break}case"media":{p.push({type:"part",part:{type:"media",media:h.media}}),await this.emit({type:"assistant-media",snapshot:this.snapshot(),iteration:this.state.iteration,media:h.media});break}case"reasoning-delta":{ee+=h.text,X.reasoningDeltas+=1,X.reasoningChars+=h.text.length;let I=p.at(-1);if(I?.type==="part"&&I.part.type==="reasoning")I.part.text+=h.text,I.part.redacted=h.redacted??I.part.redacted,I.part.metadata=h.metadata??I.part.metadata;else p.push({type:"part",part:{type:"reasoning",text:h.text,redacted:h.redacted,metadata:h.metadata}});await this.emit({type:"assistant-reasoning-delta",snapshot:this.snapshot(),iteration:this.state.iteration,text:h.text,accumulatedText:ee,redacted:h.redacted,metadata:h.metadata}),J=P?.push(h.text)??void 0;break}case"tool-input-progress":{await this.emit({type:"tool-updated",snapshot:this.snapshot(),iteration:this.state.iteration,toolCall:{type:"tool-call",toolCallId:h.toolCallId,toolName:h.toolName??"tool",input:void 0},update:{kind:Sd,inputChars:h.inputChars,deltas:h.deltas,...h.inputText?{inputText:h.inputText}:{}}});break}case"tool-call-delta":{if(h.execution){let ne={type:"tool-call",toolCallId:h.toolCallId??ge("model_tool"),toolName:h.toolName??"tool",input:h.input,metadata:h.metadata,execution:h.execution};d.set(ne.toolCallId,{toolCallId:ne.toolCallId,toolName:ne.toolName,execution:h.execution,input:ne.input}),await this.emit({type:"tool-started",snapshot:this.snapshot(),iteration:this.state.iteration,toolCall:ne});break}let I=h.toolCallId??`tool_${h.index??y}`;if(h.index==null&&h.toolCallId==null)y+=1;let j=c.get(I);if(!j)j={toolCallId:h.toolCallId??ge("tool"),inputText:""},c.set(I,j),p.push({type:"tool",key:I});if(h.toolCallId)j.toolCallId=h.toolCallId;if(h.toolName)j.toolName=h.toolName;if(h.input!==void 0)j.inputValue=h.input;if(h.metadata!==void 0)j.metadata=om(j.metadata,h.metadata);if(h.inputText)j.inputText=Iy(j.inputText,h.inputText);break}case"tool-result":{let I=d.get(h.toolCallId),j={...I,toolCallId:h.toolCallId,toolName:h.toolName,execution:h.execution,input:h.input===void 0?I?.input:h.input,output:h.output,isError:h.isError};d.set(h.toolCallId,j);let ne={type:"tool-call",toolCallId:h.toolCallId,toolName:h.toolName,input:j.input,execution:h.execution};await this.emit({type:"tool-finished",snapshot:this.snapshot(),iteration:this.state.iteration,toolCall:ne,message:we("tool",[{type:"tool-result",toolCallId:h.toolCallId,toolName:h.toolName,output:h.output,isError:h.isError,execution:h.execution}])});break}case"usage":{let I=[...c.values()].reduce((ne,lm)=>ne+sy(lm),0);X.toolInputChars=Math.max(0,I-C);let j=Hd({outputTokens:h.usage.outputTokens,providerReasoningTokens:h.usage.reasoningTokenCount,tally:X});C=I,X=Qr(),await this.updateUsage(h.usage,h.timings,{outputSplit:j});break}case"finish":{if(w=h.reason,h.error)this.state.lastError=h.error,this.state.lastErrorClass=h.errorClass??em(h.error),this.lastToolCallRejection=h.toolCallRejection,this.state.lastErrorReported=h.errorReported===!0;break}}if(J)break}if(J)await this.onReasoningLoopCut(J);else if(P)this.reasoningLoopStreak=0;for(let h of p){if(h.type==="part"){l.push(h.part);continue}let I=c.get(h.key);if(!I?.toolName){f.push({toolCallId:I?.toolCallId??h.key,input:Ai(I?.inputText??""),reason:"missing_name"});continue}let j=_y(I,w);if(this.config.logger?.debug?.(Av(this.state.iteration,I.toolName,I.toolCallId,I.inputText,j.input)),j.reason)f.push({toolCallId:I.toolCallId,toolName:I.toolName,input:j.invalidInput,reason:j.reason});l.push({type:"tool-call",toolCallId:I.toolCallId,toolName:I.toolName,input:j.input,metadata:j.parseError?om(I.metadata,{inputParseError:j.parseError,rawInputText:I.inputText}):I.metadata})}let B={};if(J)B.reasoningLoop=J;if(f.length>0)B.invalidToolCalls=f;if(d.size>0)B.modelToolActivities=[...d.values()];let xe=we("assistant",l,Object.keys(B).length>0?B:void 0),$t=ly(i,this.state.usage);if($t){if(this.state.lastRequestTimings)$t.timings=this.state.lastRequestTimings;xe.metrics=$t,this.captureUnexpectedReasoningTokens(t,$t)}if(this.config.messageModelInfo)xe.modelInfo={...this.config.messageModelInfo};for(let h of this.hooks.afterModel){let I=await h({snapshot:this.snapshot(),assistantMessage:xe,finishReason:w});this.applyStopControl(I)}return{message:xe,finishReason:w}}async*openTaskLifecycleStream(e,i){let n,a="provider_request_started",t=Date.now();this.trace(`request-start iter=${this.state.iteration}`);try{n=await this.config.model.stream(e),this.trace(`stream-open iter=${this.state.iteration} after=${Date.now()-t}ms`),this.throwIfAborted(),a="provider_stream_started",this.captureTaskLifecycle(Ld,{durationMs:i(),phase:a})}catch(o){if(!this.isAbortError(o))this.captureTaskLifecycleFailure(o,a,i());throw o}let r=!1;try{for await(let o of n){if(!r)r=!0,this.trace(`first-chunk iter=${this.state.iteration} after=${Date.now()-t}ms type=${o.type}`),a="first_chunk_received",this.captureTaskLifecycle(Zd,{durationMs:i(),phase:a,eventType:o.type});yield o}}catch(o){if(!this.isAbortError(o))this.captureTaskLifecycleFailure(o,a,i());throw o}}captureTaskLifecycleFailure(e,i,n){this.captureTaskLifecycle(Md,{durationMs:n,error:e,errorClass:em(e),phase:i})}captureTaskLifecycle(e,i={}){let n=Z(this.config.sessionId);Jd(this.config.telemetry,{event:e,sessionId:n,ulid:n,agentId:this.state.agentId,conversationId:Z(this.config.conversationId),runId:this.state.runId,iteration:this.state.iteration>0?this.state.iteration:void 0,providerId:this.getTelemetryProviderId(),modelId:this.getTelemetryModelId(),...i})}getTelemetryProviderId(){return Z(this.config.messageModelInfo?.provider)??this.telemetryProviderId}getTelemetryModelId(){return Z(this.config.messageModelInfo?.id)??this.telemetryModelId}isAbortError(e){return e instanceof Se||this.abortController?.signal.aborted===!0}captureUnexpectedReasoningTokens(e,i){if(!cy(e)||(i.reasoningTokenCount??0)<=0)return;let n=i.reasoningTokenCount;if(n===void 0)return;Fd(this.config.telemetry,{sessionId:this.config.sessionId,agentId:this.state.agentId,runId:this.state.runId,iteration:this.state.iteration,providerId:this.config.messageModelInfo?.provider,modelId:this.config.messageModelInfo?.id,requestedThinking:!1,reasoningTokenCount:n})}async prepareTurnForModelRequest(e,i){if(!this.config.prepareTurn)return e;let n=i?.overflowRecovery===!0,a=i?.requireSmallerRequest===!0,t=await this.config.prepareTurn({agentId:this.state.agentId,conversationId:this.config.conversationId,parentAgentId:this.state.parentAgentId??null,iteration:this.state.iteration,messages:e.messages,systemPrompt:e.systemPrompt,tools:e.tools,model:{id:this.config.messageModelInfo?.id,provider:this.config.messageModelInfo?.provider},signal:e.signal,overflowRecovery:n||void 0,emitStatusNotice:(o,u)=>{this.emit({type:"status-notice",snapshot:this.snapshot(),message:o,metadata:u})},reportUsage:(o)=>{this.updateUsage(o,void 0,{auxiliary:!0})}});if(a){if(!(t?.messages!==void 0&&JSON.stringify(t.messages).length<JSON.stringify(e.messages).length))throw new Me(Qv,this.state.lastError)}if(!t)return e;let r=e;if(t.messages){let o=q(t.messages);r={...r,messages:q(o)}}if(t.systemPrompt!==void 0)r={...r,systemPrompt:t.systemPrompt};return r}async consumePendingUserMessage(){let e=this.config.consumePendingUserMessage;if(!e)return;let i=(await e())?.trim();if(!i)return;let n=we("user",[{type:"text",text:i}],{userRunSpan:0});return this.steerAwaitingResume=!0,this.state.messages.push(n),await this.emit({type:"message-added",snapshot:this.snapshot(),message:n}),n}async updateUsage(e,i,n){let a=n?.auxiliary===!0;if(this.state.usage={inputTokens:this.state.usage.inputTokens+(e.inputTokens??0),outputTokens:this.state.usage.outputTokens+(e.outputTokens??0),cacheReadTokens:this.state.usage.cacheReadTokens+(e.cacheReadTokens??0),cacheWriteTokens:this.state.usage.cacheWriteTokens+(e.cacheWriteTokens??0),reasoningTokenCount:(this.state.usage.reasoningTokenCount??0)+(e.reasoningTokenCount??0),totalCost:(this.state.usage.totalCost??0)+(e.totalCost??0)},i)this.state.lastRequestTimings=i;if(e.inputTokens!==void 0&&!a)this.lastRequestTokens=(e.inputTokens??0)+(e.outputTokens??0);await this.emit({type:"usage-updated",snapshot:this.snapshot(),usage:ue(this.state.usage),...i?{timings:i}:{},...n?.outputSplit?{outputSplit:n.outputSplit}:{},...a?{auxiliary:!0}:{}})}async executeToolCalls(e){this.pendingHookContexts=[];let i=[];for(let d of e){let f=Date.now(),p=await this.prepareToolExecution(d);p.prepareMs=Date.now()-f,i.push(p)}let n=Array(i.length),a=[],t=[],r=this.config.maxParallelToolCalls>1;i.forEach((d,f)=>{let p=this.tools.get(d.toolCall.toolName);(r&&p?.lifecycle?.boundsOwnConcurrency===!0?t:a).push(f)});let o=t.map(async(d)=>{n[d]=await this.executePreparedTool(i[d])}),u=Math.min(Math.max(1,this.config.maxParallelToolCalls),a.length);if(u<=1){for(let d of a)n[d]=await this.executePreparedTool(i[d]);return await Promise.all(o),n}let l=0,c=async()=>{while(!0){let d=l;if(l+=1,d>=a.length)return;let f=a[d];n[f]=await this.executePreparedTool(i[f])}};return await Promise.all([...Array.from({length:u},()=>c()),...o]),n}findCompletingToolMessage(e,i){for(let n=0;n<e.length;n+=1){let a=e[n];if(this.tools.get(a.toolName)?.lifecycle?.completesRun!==!0)continue;let t=i[n],r=t?.content.find((o)=>o.type==="tool-result"&&o.toolCallId===a.toolCallId);if(r&&!r.isError)return t}return}async prepareToolExecution(e){let i=this.tools.get(e.toolName),n=e.input,a,t=e.metadata&&typeof e.metadata==="object"&&!Array.isArray(e.metadata)?e.metadata:void 0;if(typeof t?.inputParseError==="string")a=t.inputParseError;let r=i?void 0:this.config.unavailableToolReasons?.[e.toolName];if(r)a=`Tool "${e.toolName}" is not offered in this session: ${r}`;let o=t?.toolSource&&typeof t.toolSource==="object"&&!Array.isArray(t.toolSource)?t.toolSource:void 0;if(o?.executionMode==="provider")a=`Tool execution is disabled for provider ${typeof o.providerId==="string"?o.providerId:"provider"}`;if(i&&!a)n=Lt(n,i.inputSchema);let u;if(i&&!a)for(let l of this.hooks.beforeTool){let c=await l({snapshot:this.snapshot(),tool:i,toolCall:{...e,input:n},input:n});if(c?.input!==void 0)n=c.input;if(c?.policy)u={...u,...c.policy};if(c?.appendContext?.trim())this.pendingHookContexts.push(rm("PreToolUse",e,c.appendContext));if(this.applyStopControl(c),c?.skip){a=c.reason??`Tool ${i.name} was blocked by a runtime hook`;break}}if(i&&!a){let l={...ry(e.toolName,this.config.toolPolicies),...u};if(l.enabled===!1)a=`Tool "${e.toolName}" is disabled by policy`;else if(l.autoApprove===!1){let c=await this.requestToolApproval(e,n,l);if(!c.approved)a=`${c.reason??"Tool was not executed"} -- ${Od}`}}return{toolCall:{...e,input:n},tool:i,input:n,skipReason:a}}async requestToolApproval(e,i,n){let a=this.config.requestToolApproval;if(!a)return{approved:!1,reason:`Tool "${e.toolName}" requires approval but no approval callback is configured`};try{return await a({sessionId:this.config.sessionId?.trim()||this.config.conversationId?.trim()||this.state.runId||this.state.agentId,agentId:this.state.agentId,conversationId:this.config.conversationId?.trim()||this.state.runId||this.state.agentId,iteration:this.state.iteration,toolCallId:e.toolCallId,toolName:e.toolName,input:i,policy:n})}catch(t){return{approved:!1,reason:`Tool "${e.toolName}" approval request failed: ${t instanceof Error?t.message:String(t)}`}}}async executePreparedTool(e){let i=new Date,n=Date.now();await this.emit({type:"tool-started",snapshot:this.snapshot(),iteration:this.state.iteration,toolCall:e.toolCall});let a=Date.now(),t;if(e.skipReason)t={output:{error:e.skipReason},isError:!0};else if(!e.tool)t={output:{error:`Unknown tool: ${e.toolCall.toolName}`},isError:!0};else try{t={output:await e.tool.execute(e.input,{sessionId:this.config.sessionId,agentId:this.state.agentId,conversationId:this.config.conversationId,runId:this.state.runId??ge("run"),iteration:this.state.iteration,toolCallId:e.toolCall.toolCallId,signal:this.abortController?.signal,metadata:this.config.toolContextMetadata,snapshot:this.snapshot(),emitUpdate:(d)=>{this.emit({type:"tool-updated",snapshot:this.snapshot(),iteration:this.state.iteration,toolCall:e.toolCall,update:d})}})}}catch(c){t={output:{error:c instanceof Error?c.message:String(c)},isError:!0}}let r=new Date,o=Date.now(),u=Math.max(0,r.getTime()-i.getTime());if(e.tool)for(let c of this.hooks.afterTool){let d=await c({snapshot:this.snapshot(),tool:e.tool,toolCall:e.toolCall,input:e.input,result:t,startedAt:i,endedAt:r,durationMs:u});if(d?.appendContext?.trim())this.pendingHookContexts.push(rm("PostToolUse",e.toolCall,d.appendContext));if(this.applyStopControl(d),d?.result)t=d.result}this.trace(`tool ${e.toolCall.toolName} prepare=${e.prepareMs??-1}ms preEmit=${a-n}ms exec=${o-a}ms afterHooks=${Date.now()-o}ms total=${Date.now()-n}ms | hooks ${this.topEventHooks()}`),this.config.logger?.debug?.(`[tool-timing] ${e.toolCall.toolName} prepare=${e.prepareMs??-1}ms preEmit=${a-n}ms exec=${o-a}ms afterHooks=${Date.now()-o}ms total=${Date.now()-n}ms | hooks ${this.topEventHooks()}`);let l=we("tool",[{type:"tool-result",toolCallId:e.toolCall.toolCallId,toolName:e.toolCall.toolName,output:t.output,isError:t.isError}]);return await this.emit({type:"tool-finished",snapshot:this.snapshot(),iteration:this.state.iteration,toolCall:e.toolCall,message:l}),l}finishRun(e,i,n){return this.state.status=e,{agentId:this.state.agentId,agentRole:this.state.agentRole,runId:this.state.runId??ge("run"),status:e,iterations:this.state.iteration,outputText:n??xt(i??this.findLastAssistantMessage()),messages:q(this.state.messages),usage:ue(this.state.usage)}}findLastAssistantMessage(){return[...this.state.messages].reverse().find((e)=>e.role==="assistant")}async onReasoningLoopCut(e){this.reasoningLoopStreak+=1;let i=(this.config.reasoningLoopDetection===!1?void 0:this.config.reasoningLoopDetection?.maxConsecutiveTrips)??Oi.maxConsecutiveTrips,n=ea(e),a=this.reasoningLoopStreak>=i,t=a?await this.config.onReasoningLoopLimitReached?.({iteration:this.state.iteration,consecutiveTrips:this.reasoningLoopStreak,maxConsecutiveTrips:i,diagnosis:n}):void 0,r=t?.action==="continue"?t.guidance?.trim():void 0,o=a&&t?.action!=="continue";if(await this.emit({type:"status-notice",snapshot:this.snapshot(),message:o?`${n} Ending the run after ${this.reasoningLoopStreak} turns cut for this.`:a?`${n} That is ${this.reasoningLoopStreak} turns cut for this, and the run was to end here.`:`${n} Cutting the request and continuing.`,metadata:{kind:"reasoning_loop",reason:"reasoning_loop",phase:o?"aborted":"cut",iteration:this.state.iteration,consecutiveTrips:this.reasoningLoopStreak,verdict:e}}),o){this.abort(new Se(n)),this.throwIfAborted();return}if(r)await this.addUserReminderMessage(r)}throwIfAborted(){if(this.abortController?.signal.aborted)throw this.normalizeAbortError()}normalizeAbortError(){let e=this.abortController?.signal.reason;if(e instanceof Error)return e;if(typeof e==="string")return Error(e);return Error(this.state.lastError??"Run aborted")}eventHookMs=new Map;noteEventHookMs(e,i,n){let a=`${e}#${i}`,t=this.eventHookMs.get(a);if(t)t.ms+=n,t.n+=1;else this.eventHookMs.set(a,{ms:n,n:1})}topEventHooks(e=4){return[...this.eventHookMs.entries()].sort((i,n)=>n[1].ms-i[1].ms).slice(0,e).map(([i,n])=>`${i}=${Math.round(n.ms)}ms/${n.n}`).join(" ")}trace(e){zv(e),this.config.logger?.debug?.(`[timing] ${e}`)}async emit(e){let i=by(e);switch(e.type){case"run-started":this.config.logger?.info?.("Agent run started",i);break;case"tool-finished":this.config.logger?.info?.("Agent tool finished",i);break;case"run-failed":if(this.config.logger?.error?.("Agent run failed",{...i,error:e.error}),!this.state.lastErrorReported)Gd(this.config.telemetry,{component:"agents",operation:"agent.run",error:e.error,severity:"error",handled:!1,context:{...i,providerId:this.getTelemetryProviderId(),modelId:this.getTelemetryModelId()}});break;default:if(!yy.has(e.type))this.config.logger?.debug?.(`Agent event: ${e.type}`,i);break}switch(e.type){case"assistant-text-delta":case"assistant-reasoning-delta":case"assistant-media":case"tool-updated":break;default:this.config.telemetry?.capture({event:`agent.${e.type}`,properties:i});break}let n=0;for(let a of this.listeners){let t=Date.now();a(e),this.noteEventHookMs(e.type,`listener${n}`,Date.now()-t),n+=1}for(let a=0;a<this.hooks.onEvent.length;a+=1){let t=Date.now();await this.hooks.onEvent[a](e),this.noteEventHookMs(e.type,a,Date.now()-t)}}applyStopControl(e){if(!e?.stop)return;if(e.reason)this.state.lastError=e.reason;throw new zi(e.reason)}}var hy={no_tool_call:"the turn ended without calling anything — asking the model to carry on",unparsed_tool_call:"a tool call was written as text and never ran — asking for it again",announced_intent:"the model described the next step instead of taking it — asking it to make the call",non_convergence:"several turns of thinking with no work done — asking for a different approach",silent_repetition:"the turn repeated what the last one said — asking for a different approach"};function vy(e){return hy[e]??`nudged: ${e}`}var yy=new Set(["assistant-text-delta","assistant-reasoning-delta","assistant-media","tool-updated"]);function by(e){return{agentId:e.snapshot.agentId,agentRole:e.snapshot.agentRole,runId:e.snapshot.runId,status:e.snapshot.status,iteration:e.snapshot.iteration,eventType:e.type}}function om(e,i){if(!i||typeof i!=="object"||Array.isArray(i))return i;if(!e||typeof e!=="object"||Array.isArray(e))return i;return{...e,...i}}function _y(e,i){if(e.inputValue!==void 0)return{input:e.inputValue,invalidInput:Ai(JSON.stringify(e.inputValue))};if(!e.inputText.trim())return{input:{},invalidInput:{}};let n=ky(e.inputText);if(n.ok)return{input:n.value,invalidInput:Ai(e.inputText)};let t=i==="max-tokens"?`was cut off by the output budget before its arguments finished: the turn ended at the cap with ${e.inputText.length} characters of arguments written. Nothing is wrong with the payload you were writing -- there was no room left to finish it. Send the same work in smaller pieces: edit one region per call rather than rewriting the file, and keep each call's arguments short enough to complete.`:`emitted invalid JSON arguments: ${n.error}`;return{input:{},invalidInput:Ai(e.inputText,n.error),parseError:`Tool call ${e.toolName??e.toolCallId} ${t}`,reason:"invalid_arguments"}}function Ai(e,i){if(!e.trim())return{};return i?{rawInputText:e,parseError:i}:{rawInputText:e}}function ky(e){let i=e.trim();if(!i)return{ok:!1,error:"Tool call arguments were empty."};try{return{ok:!0,value:JSON.parse(i)}}catch{}if(!(i.startsWith("{")||i.startsWith("[")))return{ok:!1,error:"Tool call arguments must be encoded as a JSON object or array."};return{ok:!1,error:"Tool call arguments could not be parsed as JSON. Ensure the outer tool payload is valid JSON and escape embedded quotes/newlines inside string fields."}}function Iy(e,i){if(!e)return i;let n=i.trimStart();if(n.startsWith("{")||n.startsWith("["))return i;return e+i}function wy(e){return new Et(e)}var Sy=Et;function xy(e){return new Et(e)}export{Kd as measureReasoningRepetition,Yd as isRepetitionLoop,Qd as describeRepetition,ea as describeReasoningLoop,xv as createTool,ta as createRepetitionNudger,wy as createAgentRuntime,xy as createAgent,Ni as ReasoningLoopGuard,um as NON_CONVERGENCE_MIN_REASONING_CHARS,Ze as DEFAULT_REASONING_REPETITION,Oi as DEFAULT_REASONING_LOOP_GUARD,sm as DEFAULT_NO_TOOL_CALL_TURN_STREAK_LIMIT,Yv as DEFAULT_MAX_NO_TOOL_CALL_NUDGES,Se as AgentRuntimeAbortError,Et as AgentRuntime,Sy as Agent};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cerebriline/agents",
3
- "version": "4.100.241",
3
+ "version": "4.100.243",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/mann1x/cline.git",
@@ -9,8 +9,8 @@
9
9
  "main": "dist/index.js",
10
10
  "dependencies": {
11
11
  "nanoid": "^5.1.7",
12
- "@cerebriline/llms": "4.100.241",
13
- "@cerebriline/shared": "4.100.241"
12
+ "@cerebriline/llms": "4.100.243",
13
+ "@cerebriline/shared": "4.100.243"
14
14
  },
15
15
  "exports": {
16
16
  ".": {