@bylqwjc/media-editor-image 1.0.26

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.
Files changed (77) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +48 -0
  3. package/dist/chunk-5TBO732O.js +1 -0
  4. package/dist/index-CU3vkvDR.d.ts +44 -0
  5. package/dist/index.css +1 -0
  6. package/dist/index.d.ts +2 -0
  7. package/dist/index.js +36 -0
  8. package/dist/lazy.css +1 -0
  9. package/dist/lazy.d.ts +8 -0
  10. package/dist/lazy.js +1 -0
  11. package/node_modules/@media-editor/core/LICENSE +21 -0
  12. package/node_modules/@media-editor/core/README.md +14 -0
  13. package/node_modules/@media-editor/core/dist/browser.cjs +1 -0
  14. package/node_modules/@media-editor/core/dist/browser.d.ts +117 -0
  15. package/node_modules/@media-editor/core/dist/browser.js +1 -0
  16. package/node_modules/@media-editor/core/dist/chunk-7D4QE3R2.js +1 -0
  17. package/node_modules/@media-editor/core/dist/chunk-7PSQLYXL.js +1 -0
  18. package/node_modules/@media-editor/core/dist/chunk-FAFKY4LX.js +1 -0
  19. package/node_modules/@media-editor/core/dist/chunk-VDEZTXEA.js +1 -0
  20. package/node_modules/@media-editor/core/dist/engine.cjs +1 -0
  21. package/node_modules/@media-editor/core/dist/engine.d.ts +663 -0
  22. package/node_modules/@media-editor/core/dist/engine.js +1 -0
  23. package/node_modules/@media-editor/core/dist/filerobot.cjs +1 -0
  24. package/node_modules/@media-editor/core/dist/filerobot.d.ts +88 -0
  25. package/node_modules/@media-editor/core/dist/filerobot.js +1 -0
  26. package/node_modules/@media-editor/core/dist/index.cjs +1 -0
  27. package/node_modules/@media-editor/core/dist/index.d.ts +250 -0
  28. package/node_modules/@media-editor/core/dist/index.js +1 -0
  29. package/node_modules/@media-editor/core/dist/platform-presets-Ca2LbKQ3.d.ts +80 -0
  30. package/node_modules/@media-editor/core/dist/state-D2oM5s1a.d.ts +2098 -0
  31. package/node_modules/@media-editor/core/node_modules/zod/LICENSE +21 -0
  32. package/node_modules/@media-editor/core/node_modules/zod/README.md +208 -0
  33. package/node_modules/@media-editor/core/node_modules/zod/index.cjs +1 -0
  34. package/node_modules/@media-editor/core/node_modules/zod/index.d.cts +4 -0
  35. package/node_modules/@media-editor/core/node_modules/zod/index.js +1 -0
  36. package/node_modules/@media-editor/core/node_modules/zod/package.json +76 -0
  37. package/node_modules/@media-editor/core/node_modules/zod/v3/ZodError.cjs +1 -0
  38. package/node_modules/@media-editor/core/node_modules/zod/v3/ZodError.d.cts +164 -0
  39. package/node_modules/@media-editor/core/node_modules/zod/v3/ZodError.js +1 -0
  40. package/node_modules/@media-editor/core/node_modules/zod/v3/errors.cjs +1 -0
  41. package/node_modules/@media-editor/core/node_modules/zod/v3/errors.d.cts +5 -0
  42. package/node_modules/@media-editor/core/node_modules/zod/v3/errors.js +1 -0
  43. package/node_modules/@media-editor/core/node_modules/zod/v3/external.cjs +1 -0
  44. package/node_modules/@media-editor/core/node_modules/zod/v3/external.d.cts +6 -0
  45. package/node_modules/@media-editor/core/node_modules/zod/v3/external.js +1 -0
  46. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/enumUtil.cjs +1 -0
  47. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  48. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  49. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/errorUtil.cjs +1 -0
  50. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  51. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/errorUtil.js +1 -0
  52. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/parseUtil.cjs +1 -0
  53. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  54. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/parseUtil.js +1 -0
  55. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/partialUtil.cjs +1 -0
  56. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  57. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  58. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/typeAliases.cjs +1 -0
  59. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  60. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  61. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/util.cjs +1 -0
  62. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/util.d.cts +85 -0
  63. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/util.js +1 -0
  64. package/node_modules/@media-editor/core/node_modules/zod/v3/index.cjs +1 -0
  65. package/node_modules/@media-editor/core/node_modules/zod/v3/index.d.cts +4 -0
  66. package/node_modules/@media-editor/core/node_modules/zod/v3/index.js +1 -0
  67. package/node_modules/@media-editor/core/node_modules/zod/v3/locales/en.cjs +1 -0
  68. package/node_modules/@media-editor/core/node_modules/zod/v3/locales/en.d.cts +3 -0
  69. package/node_modules/@media-editor/core/node_modules/zod/v3/locales/en.js +1 -0
  70. package/node_modules/@media-editor/core/node_modules/zod/v3/standard-schema.cjs +1 -0
  71. package/node_modules/@media-editor/core/node_modules/zod/v3/standard-schema.d.cts +102 -0
  72. package/node_modules/@media-editor/core/node_modules/zod/v3/standard-schema.js +1 -0
  73. package/node_modules/@media-editor/core/node_modules/zod/v3/types.cjs +1 -0
  74. package/node_modules/@media-editor/core/node_modules/zod/v3/types.d.cts +1031 -0
  75. package/node_modules/@media-editor/core/node_modules/zod/v3/types.js +1 -0
  76. package/node_modules/@media-editor/core/package.json +42 -0
  77. package/package.json +34 -0
@@ -0,0 +1 @@
1
+ import{ZodError as e,ZodIssueCode as t}from"./ZodError.js";import{defaultErrorMap as a,getErrorMap as s}from"./errors.js";import{errorUtil as r}from"./helpers/errorUtil.js";import{DIRTY as n,INVALID as i,OK as d,ParseStatus as o,addIssueToContext as c,isAborted as u,isAsync as p,isDirty as l,isValid as h,makeIssue as m}from"./helpers/parseUtil.js";import{util as f,ZodParsedType as y,getParsedType as _}from"./helpers/util.js";class g{constructor(e,t,a,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Z=(t,a)=>{if(h(a))return{success:!0,data:a.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const a=new e(t.common.issues);return this._error=a,this._error}}};function v(e){if(!e)return{};const{errorMap:t,invalid_type_error:a,required_error:s,description:r}=e;if(t&&(a||s))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:r}:{errorMap:(t,r)=>{const{message:n}=e;return"invalid_enum_value"===t.code?{message:n??r.defaultError}:void 0===r.data?{message:n??s??r.defaultError}:"invalid_type"!==t.code?{message:r.defaultError}:{message:n??a??r.defaultError}},description:r}}export class ZodType{get description(){return this._def.description}_getType(e){return _(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:_(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new o,ctx:{common:e.parent.common,data:e.data,parsedType:_(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(p(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){const a={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_(e)},s=this._parseSync({data:e,path:a.path,parent:a});return Z(a,s)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:t});return h(a)?{value:a.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>h(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_(e)},s=this._parse({data:e,path:a.path,parent:a}),r=await(p(s)?s:Promise.resolve(s));return Z(a,r)}refine(e,a){const s=e=>"string"==typeof a||void 0===a?{message:a}:"function"==typeof a?a(e):a;return this._refinement((a,r)=>{const n=e(a),i=()=>r.addIssue({code:t.custom,...s(a)});return"undefined"!=typeof Promise&&n instanceof Promise?n.then(e=>!!e||(i(),!1)):!!n||(i(),!1)})}refinement(e,t){return this._refinement((a,s)=>!!e(a)||(s.addIssue("function"==typeof t?t(a,s):t),!1))}_refinement(e){return new ZodEffects({schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this)}promise(){return ZodPromise.create(this,this._def)}or(e){return ZodUnion.create([this,e],this._def)}and(e){return ZodIntersection.create(this,e,this._def)}transform(e){return new ZodEffects({...v(this._def),schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new ZodDefault({...v(this._def),innerType:this,defaultValue:t,typeName:ZodFirstPartyTypeKind.ZodDefault})}brand(){return new ZodBranded({typeName:ZodFirstPartyTypeKind.ZodBranded,type:this,...v(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new ZodCatch({...v(this._def),innerType:this,catchValue:t,typeName:ZodFirstPartyTypeKind.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return ZodPipeline.create(this,e)}readonly(){return ZodReadonly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const x=/^c[^\s-]{8,}$/i,k=/^[0-9a-z]+$/,T=/^[0-9A-HJKMNP-TV-Z]{26}$/i,b=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,w=/^[a-z0-9_-]{21}$/i,O=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,N=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,C=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let P;const A=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,S=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,F=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,j=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,E=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,R=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,I="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",K=new RegExp(`^${I}$`);function L(e){let t="[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),`([01]\\d|2[0-3]):[0-5]\\d(:${t})${e.precision?"+":"?"}`}function M(e){return new RegExp(`^${L(e)}$`)}export function datetimeRegex(e){let t=`${I}T${L(e)}`;const a=[];return a.push(e.local?"Z?":"Z"),e.offset&&a.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${a.join("|")})`,new RegExp(`^${t}$`)}function U(e,t){return!("v4"!==t&&t||!A.test(e))||!("v6"!==t&&t||!F.test(e))}function D(e,t){if(!O.test(e))return!1;try{const[a]=e.split(".");if(!a)return!1;const s=a.replace(/-/g,"+").replace(/_/g,"/").padEnd(a.length+(4-a.length%4)%4,"="),r=JSON.parse(atob(s));return!("object"!=typeof r||null===r||"typ"in r&&"JWT"!==r?.typ||!r.alg||t&&r.alg!==t)}catch{return!1}}function z(e,t){return!("v4"!==t&&t||!S.test(e))||!("v6"!==t&&t||!j.test(e))}export class ZodString extends ZodType{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==y.string){const a=this._getOrReturnCtx(e);return c(a,{code:t.invalid_type,expected:y.string,received:a.parsedType}),i}const a=new o;let s;for(const r of this._def.checks)if("min"===r.kind)e.data.length<r.value&&(s=this._getOrReturnCtx(e,s),c(s,{code:t.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),a.dirty());else if("max"===r.kind)e.data.length>r.value&&(s=this._getOrReturnCtx(e,s),c(s,{code:t.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),a.dirty());else if("length"===r.kind){const n=e.data.length>r.value,i=e.data.length<r.value;(n||i)&&(s=this._getOrReturnCtx(e,s),n?c(s,{code:t.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}):i&&c(s,{code:t.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}),a.dirty())}else if("email"===r.kind)C.test(e.data)||(s=this._getOrReturnCtx(e,s),c(s,{validation:"email",code:t.invalid_string,message:r.message}),a.dirty());else if("emoji"===r.kind)P||(P=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),P.test(e.data)||(s=this._getOrReturnCtx(e,s),c(s,{validation:"emoji",code:t.invalid_string,message:r.message}),a.dirty());else if("uuid"===r.kind)b.test(e.data)||(s=this._getOrReturnCtx(e,s),c(s,{validation:"uuid",code:t.invalid_string,message:r.message}),a.dirty());else if("nanoid"===r.kind)w.test(e.data)||(s=this._getOrReturnCtx(e,s),c(s,{validation:"nanoid",code:t.invalid_string,message:r.message}),a.dirty());else if("cuid"===r.kind)x.test(e.data)||(s=this._getOrReturnCtx(e,s),c(s,{validation:"cuid",code:t.invalid_string,message:r.message}),a.dirty());else if("cuid2"===r.kind)k.test(e.data)||(s=this._getOrReturnCtx(e,s),c(s,{validation:"cuid2",code:t.invalid_string,message:r.message}),a.dirty());else if("ulid"===r.kind)T.test(e.data)||(s=this._getOrReturnCtx(e,s),c(s,{validation:"ulid",code:t.invalid_string,message:r.message}),a.dirty());else if("url"===r.kind)try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),c(s,{validation:"url",code:t.invalid_string,message:r.message}),a.dirty()}else"regex"===r.kind?(r.regex.lastIndex=0,r.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),c(s,{validation:"regex",code:t.invalid_string,message:r.message}),a.dirty())):"trim"===r.kind?e.data=e.data.trim():"includes"===r.kind?e.data.includes(r.value,r.position)||(s=this._getOrReturnCtx(e,s),c(s,{code:t.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),a.dirty()):"toLowerCase"===r.kind?e.data=e.data.toLowerCase():"toUpperCase"===r.kind?e.data=e.data.toUpperCase():"startsWith"===r.kind?e.data.startsWith(r.value)||(s=this._getOrReturnCtx(e,s),c(s,{code:t.invalid_string,validation:{startsWith:r.value},message:r.message}),a.dirty()):"endsWith"===r.kind?e.data.endsWith(r.value)||(s=this._getOrReturnCtx(e,s),c(s,{code:t.invalid_string,validation:{endsWith:r.value},message:r.message}),a.dirty()):"datetime"===r.kind?datetimeRegex(r).test(e.data)||(s=this._getOrReturnCtx(e,s),c(s,{code:t.invalid_string,validation:"datetime",message:r.message}),a.dirty()):"date"===r.kind?K.test(e.data)||(s=this._getOrReturnCtx(e,s),c(s,{code:t.invalid_string,validation:"date",message:r.message}),a.dirty()):"time"===r.kind?M(r).test(e.data)||(s=this._getOrReturnCtx(e,s),c(s,{code:t.invalid_string,validation:"time",message:r.message}),a.dirty()):"duration"===r.kind?N.test(e.data)||(s=this._getOrReturnCtx(e,s),c(s,{validation:"duration",code:t.invalid_string,message:r.message}),a.dirty()):"ip"===r.kind?U(e.data,r.version)||(s=this._getOrReturnCtx(e,s),c(s,{validation:"ip",code:t.invalid_string,message:r.message}),a.dirty()):"jwt"===r.kind?D(e.data,r.alg)||(s=this._getOrReturnCtx(e,s),c(s,{validation:"jwt",code:t.invalid_string,message:r.message}),a.dirty()):"cidr"===r.kind?z(e.data,r.version)||(s=this._getOrReturnCtx(e,s),c(s,{validation:"cidr",code:t.invalid_string,message:r.message}),a.dirty()):"base64"===r.kind?E.test(e.data)||(s=this._getOrReturnCtx(e,s),c(s,{validation:"base64",code:t.invalid_string,message:r.message}),a.dirty()):"base64url"===r.kind?R.test(e.data)||(s=this._getOrReturnCtx(e,s),c(s,{validation:"base64url",code:t.invalid_string,message:r.message}),a.dirty()):f.assertNever(r);return{status:a.value,value:e.data}}_regex(e,a,s){return this.refinement(t=>e.test(t),{validation:a,code:t.invalid_string,...r.errToObj(s)})}_addCheck(e){return new ZodString({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...r.errToObj(e)})}url(e){return this._addCheck({kind:"url",...r.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...r.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...r.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...r.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...r.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...r.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...r.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...r.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...r.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...r.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...r.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...r.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...r.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...r.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...r.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...r.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...r.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...r.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...r.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...r.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...r.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...r.errToObj(t)})}nonempty(e){return this.min(1,r.errToObj(e))}trim(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function $(e,t){const a=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,r=a>s?a:s;return Number.parseInt(e.toFixed(r).replace(".",""))%Number.parseInt(t.toFixed(r).replace(".",""))/10**r}ZodString.create=e=>new ZodString({checks:[],typeName:ZodFirstPartyTypeKind.ZodString,coerce:e?.coerce??!1,...v(e)});export class ZodNumber extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==y.number){const a=this._getOrReturnCtx(e);return c(a,{code:t.invalid_type,expected:y.number,received:a.parsedType}),i}let a;const s=new o;for(const r of this._def.checks)"int"===r.kind?f.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:t.invalid_type,expected:"integer",received:"float",message:r.message}),s.dirty()):"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:t.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),s.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:t.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),s.dirty()):"multipleOf"===r.kind?0!==$(e.data,r.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:t.not_multiple_of,multipleOf:r.value,message:r.message}),s.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:t.not_finite,message:r.message}),s.dirty()):f.assertNever(r);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,r.toString(t))}gt(e,t){return this.setLimit("min",e,!1,r.toString(t))}lte(e,t){return this.setLimit("max",e,!0,r.toString(t))}lt(e,t){return this.setLimit("max",e,!1,r.toString(t))}setLimit(e,t,a,s){return new ZodNumber({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:r.toString(s)}]})}_addCheck(e){return new ZodNumber({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:r.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:r.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:r.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:r.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:r.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:r.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:r.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:r.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:r.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&f.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if("finite"===a.kind||"int"===a.kind||"multipleOf"===a.kind)return!0;"min"===a.kind?(null===t||a.value>t)&&(t=a.value):"max"===a.kind&&(null===e||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}ZodNumber.create=e=>new ZodNumber({checks:[],typeName:ZodFirstPartyTypeKind.ZodNumber,coerce:e?.coerce||!1,...v(e)});export class ZodBigInt extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==y.bigint)return this._getInvalidInput(e);let a;const s=new o;for(const r of this._def.checks)"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:t.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),s.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:t.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),s.dirty()):"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),c(a,{code:t.not_multiple_of,multipleOf:r.value,message:r.message}),s.dirty()):f.assertNever(r);return{status:s.value,value:e.data}}_getInvalidInput(e){const a=this._getOrReturnCtx(e);return c(a,{code:t.invalid_type,expected:y.bigint,received:a.parsedType}),i}gte(e,t){return this.setLimit("min",e,!0,r.toString(t))}gt(e,t){return this.setLimit("min",e,!1,r.toString(t))}lte(e,t){return this.setLimit("max",e,!0,r.toString(t))}lt(e,t){return this.setLimit("max",e,!1,r.toString(t))}setLimit(e,t,a,s){return new ZodBigInt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:r.toString(s)}]})}_addCheck(e){return new ZodBigInt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:r.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:r.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:r.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:r.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:r.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ZodBigInt.create=e=>new ZodBigInt({checks:[],typeName:ZodFirstPartyTypeKind.ZodBigInt,coerce:e?.coerce??!1,...v(e)});export class ZodBoolean extends ZodType{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==y.boolean){const a=this._getOrReturnCtx(e);return c(a,{code:t.invalid_type,expected:y.boolean,received:a.parsedType}),i}return d(e.data)}}ZodBoolean.create=e=>new ZodBoolean({typeName:ZodFirstPartyTypeKind.ZodBoolean,coerce:e?.coerce||!1,...v(e)});export class ZodDate extends ZodType{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==y.date){const a=this._getOrReturnCtx(e);return c(a,{code:t.invalid_type,expected:y.date,received:a.parsedType}),i}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return c(a,{code:t.invalid_date}),i}const a=new o;let s;for(const r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(s=this._getOrReturnCtx(e,s),c(s,{code:t.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),a.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(s=this._getOrReturnCtx(e,s),c(s,{code:t.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),a.dirty()):f.assertNever(r);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ZodDate({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:r.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:r.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ZodDate.create=e=>new ZodDate({checks:[],coerce:e?.coerce||!1,typeName:ZodFirstPartyTypeKind.ZodDate,...v(e)});export class ZodSymbol extends ZodType{_parse(e){if(this._getType(e)!==y.symbol){const a=this._getOrReturnCtx(e);return c(a,{code:t.invalid_type,expected:y.symbol,received:a.parsedType}),i}return d(e.data)}}ZodSymbol.create=e=>new ZodSymbol({typeName:ZodFirstPartyTypeKind.ZodSymbol,...v(e)});export class ZodUndefined extends ZodType{_parse(e){if(this._getType(e)!==y.undefined){const a=this._getOrReturnCtx(e);return c(a,{code:t.invalid_type,expected:y.undefined,received:a.parsedType}),i}return d(e.data)}}ZodUndefined.create=e=>new ZodUndefined({typeName:ZodFirstPartyTypeKind.ZodUndefined,...v(e)});export class ZodNull extends ZodType{_parse(e){if(this._getType(e)!==y.null){const a=this._getOrReturnCtx(e);return c(a,{code:t.invalid_type,expected:y.null,received:a.parsedType}),i}return d(e.data)}}ZodNull.create=e=>new ZodNull({typeName:ZodFirstPartyTypeKind.ZodNull,...v(e)});export class ZodAny extends ZodType{constructor(){super(...arguments),this._any=!0}_parse(e){return d(e.data)}}ZodAny.create=e=>new ZodAny({typeName:ZodFirstPartyTypeKind.ZodAny,...v(e)});export class ZodUnknown extends ZodType{constructor(){super(...arguments),this._unknown=!0}_parse(e){return d(e.data)}}ZodUnknown.create=e=>new ZodUnknown({typeName:ZodFirstPartyTypeKind.ZodUnknown,...v(e)});export class ZodNever extends ZodType{_parse(e){const a=this._getOrReturnCtx(e);return c(a,{code:t.invalid_type,expected:y.never,received:a.parsedType}),i}}ZodNever.create=e=>new ZodNever({typeName:ZodFirstPartyTypeKind.ZodNever,...v(e)});export class ZodVoid extends ZodType{_parse(e){if(this._getType(e)!==y.undefined){const a=this._getOrReturnCtx(e);return c(a,{code:t.invalid_type,expected:y.void,received:a.parsedType}),i}return d(e.data)}}ZodVoid.create=e=>new ZodVoid({typeName:ZodFirstPartyTypeKind.ZodVoid,...v(e)});export class ZodArray extends ZodType{_parse(e){const{ctx:a,status:s}=this._processInputParams(e),r=this._def;if(a.parsedType!==y.array)return c(a,{code:t.invalid_type,expected:y.array,received:a.parsedType}),i;if(null!==r.exactLength){const e=a.data.length>r.exactLength.value,n=a.data.length<r.exactLength.value;(e||n)&&(c(a,{code:e?t.too_big:t.too_small,minimum:n?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),s.dirty())}if(null!==r.minLength&&a.data.length<r.minLength.value&&(c(a,{code:t.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),s.dirty()),null!==r.maxLength&&a.data.length>r.maxLength.value&&(c(a,{code:t.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),s.dirty()),a.common.async)return Promise.all([...a.data].map((e,t)=>r.type._parseAsync(new g(a,e,a.path,t)))).then(e=>o.mergeArray(s,e));const n=[...a.data].map((e,t)=>r.type._parseSync(new g(a,e,a.path,t)));return o.mergeArray(s,n)}get element(){return this._def.type}min(e,t){return new ZodArray({...this._def,minLength:{value:e,message:r.toString(t)}})}max(e,t){return new ZodArray({...this._def,maxLength:{value:e,message:r.toString(t)}})}length(e,t){return new ZodArray({...this._def,exactLength:{value:e,message:r.toString(t)}})}nonempty(e){return this.min(1,e)}}function B(e){if(e instanceof ZodObject){const t={};for(const a in e.shape){const s=e.shape[a];t[a]=ZodOptional.create(B(s))}return new ZodObject({...e._def,shape:()=>t})}return e instanceof ZodArray?new ZodArray({...e._def,type:B(e.element)}):e instanceof ZodOptional?ZodOptional.create(B(e.unwrap())):e instanceof ZodNullable?ZodNullable.create(B(e.unwrap())):e instanceof ZodTuple?ZodTuple.create(e.items.map(e=>B(e))):e}ZodArray.create=(e,t)=>new ZodArray({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ZodFirstPartyTypeKind.ZodArray,...v(t)});export class ZodObject extends ZodType{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=f.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==y.object){const a=this._getOrReturnCtx(e);return c(a,{code:t.invalid_type,expected:y.object,received:a.parsedType}),i}const{status:a,ctx:s}=this._processInputParams(e),{shape:r,keys:n}=this._getCached(),d=[];if(!(this._def.catchall instanceof ZodNever&&"strip"===this._def.unknownKeys))for(const e in s.data)n.includes(e)||d.push(e);const u=[];for(const e of n){const t=r[e],a=s.data[e];u.push({key:{status:"valid",value:e},value:t._parse(new g(s,a,s.path,e)),alwaysSet:e in s.data})}if(this._def.catchall instanceof ZodNever){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of d)u.push({key:{status:"valid",value:e},value:{status:"valid",value:s.data[e]}});else if("strict"===e)d.length>0&&(c(s,{code:t.unrecognized_keys,keys:d}),a.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of d){const a=s.data[t];u.push({key:{status:"valid",value:t},value:e._parse(new g(s,a,s.path,t)),alwaysSet:t in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const e=[];for(const t of u){const a=await t.key,s=await t.value;e.push({key:a,value:s,alwaysSet:t.alwaysSet})}return e}).then(e=>o.mergeObjectSync(a,e)):o.mergeObjectSync(a,u)}get shape(){return this._def.shape()}strict(e){return r.errToObj,new ZodObject({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,a)=>{const s=this._def.errorMap?.(t,a).message??a.defaultError;return"unrecognized_keys"===t.code?{message:r.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new ZodObject({...this._def,unknownKeys:"strip"})}passthrough(){return new ZodObject({...this._def,unknownKeys:"passthrough"})}extend(e){return new ZodObject({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ZodObject({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ZodFirstPartyTypeKind.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ZodObject({...this._def,catchall:e})}pick(e){const t={};for(const a of f.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new ZodObject({...this._def,shape:()=>t})}omit(e){const t={};for(const a of f.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new ZodObject({...this._def,shape:()=>t})}deepPartial(){return B(this)}partial(e){const t={};for(const a of f.objectKeys(this.shape)){const s=this.shape[a];e&&!e[a]?t[a]=s:t[a]=s.optional()}return new ZodObject({...this._def,shape:()=>t})}required(e){const t={};for(const a of f.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let e=this.shape[a];for(;e instanceof ZodOptional;)e=e._def.innerType;t[a]=e}return new ZodObject({...this._def,shape:()=>t})}keyof(){return q(f.objectKeys(this.shape))}}ZodObject.create=(e,t)=>new ZodObject({shape:()=>e,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...v(t)}),ZodObject.strictCreate=(e,t)=>new ZodObject({shape:()=>e,unknownKeys:"strict",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...v(t)}),ZodObject.lazycreate=(e,t)=>new ZodObject({shape:e,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...v(t)});export class ZodUnion extends ZodType{_parse(a){const{ctx:s}=this._processInputParams(a),r=this._def.options;if(s.common.async)return Promise.all(r.map(async e=>{const t={...s,common:{...s.common,issues:[]},parent:null};return{result:await e._parseAsync({data:s.data,path:s.path,parent:t}),ctx:t}})).then(function(a){for(const e of a)if("valid"===e.result.status)return e.result;for(const e of a)if("dirty"===e.result.status)return s.common.issues.push(...e.ctx.common.issues),e.result;const r=a.map(t=>new e(t.ctx.common.issues));return c(s,{code:t.invalid_union,unionErrors:r}),i});{let a;const n=[];for(const e of r){const t={...s,common:{...s.common,issues:[]},parent:null},r=e._parseSync({data:s.data,path:s.path,parent:t});if("valid"===r.status)return r;"dirty"!==r.status||a||(a={result:r,ctx:t}),t.common.issues.length&&n.push(t.common.issues)}if(a)return s.common.issues.push(...a.ctx.common.issues),a.result;const d=n.map(t=>new e(t));return c(s,{code:t.invalid_union,unionErrors:d}),i}}get options(){return this._def.options}}ZodUnion.create=(e,t)=>new ZodUnion({options:e,typeName:ZodFirstPartyTypeKind.ZodUnion,...v(t)});const V=e=>e instanceof ZodLazy?V(e.schema):e instanceof ZodEffects?V(e.innerType()):e instanceof ZodLiteral?[e.value]:e instanceof ZodEnum?e.options:e instanceof ZodNativeEnum?f.objectValues(e.enum):e instanceof ZodDefault?V(e._def.innerType):e instanceof ZodUndefined?[void 0]:e instanceof ZodNull?[null]:e instanceof ZodOptional?[void 0,...V(e.unwrap())]:e instanceof ZodNullable?[null,...V(e.unwrap())]:e instanceof ZodBranded||e instanceof ZodReadonly?V(e.unwrap()):e instanceof ZodCatch?V(e._def.innerType):[];export class ZodDiscriminatedUnion extends ZodType{_parse(e){const{ctx:a}=this._processInputParams(e);if(a.parsedType!==y.object)return c(a,{code:t.invalid_type,expected:y.object,received:a.parsedType}),i;const s=this.discriminator,r=a.data[s],n=this.optionsMap.get(r);return n?a.common.async?n._parseAsync({data:a.data,path:a.path,parent:a}):n._parseSync({data:a.data,path:a.path,parent:a}):(c(a,{code:t.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),i)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,a){const s=new Map;for(const a of t){const t=V(a.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const r of t){if(s.has(r))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(r)}`);s.set(r,a)}}return new ZodDiscriminatedUnion({typeName:ZodFirstPartyTypeKind.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...v(a)})}}function W(e,t){const a=_(e),s=_(t);if(e===t)return{valid:!0,data:e};if(a===y.object&&s===y.object){const a=f.objectKeys(t),s=f.objectKeys(e).filter(e=>-1!==a.indexOf(e)),r={...e,...t};for(const a of s){const s=W(e[a],t[a]);if(!s.valid)return{valid:!1};r[a]=s.data}return{valid:!0,data:r}}if(a===y.array&&s===y.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let s=0;s<e.length;s++){const r=W(e[s],t[s]);if(!r.valid)return{valid:!1};a.push(r.data)}return{valid:!0,data:a}}return a===y.date&&s===y.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}export class ZodIntersection extends ZodType{_parse(e){const{status:a,ctx:s}=this._processInputParams(e),r=(e,r)=>{if(u(e)||u(r))return i;const n=W(e.value,r.value);return n.valid?((l(e)||l(r))&&a.dirty(),{status:a.value,value:n.data}):(c(s,{code:t.invalid_intersection_types}),i)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}ZodIntersection.create=(e,t,a)=>new ZodIntersection({left:e,right:t,typeName:ZodFirstPartyTypeKind.ZodIntersection,...v(a)});export class ZodTuple extends ZodType{_parse(e){const{status:a,ctx:s}=this._processInputParams(e);if(s.parsedType!==y.array)return c(s,{code:t.invalid_type,expected:y.array,received:s.parsedType}),i;if(s.data.length<this._def.items.length)return c(s,{code:t.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i;!this._def.rest&&s.data.length>this._def.items.length&&(c(s,{code:t.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),a.dirty());const r=[...s.data].map((e,t)=>{const a=this._def.items[t]||this._def.rest;return a?a._parse(new g(s,e,s.path,t)):null}).filter(e=>!!e);return s.common.async?Promise.all(r).then(e=>o.mergeArray(a,e)):o.mergeArray(a,r)}get items(){return this._def.items}rest(e){return new ZodTuple({...this._def,rest:e})}}ZodTuple.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ZodTuple({items:e,typeName:ZodFirstPartyTypeKind.ZodTuple,rest:null,...v(t)})};export class ZodRecord extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:a,ctx:s}=this._processInputParams(e);if(s.parsedType!==y.object)return c(s,{code:t.invalid_type,expected:y.object,received:s.parsedType}),i;const r=[],n=this._def.keyType,d=this._def.valueType;for(const e in s.data)r.push({key:n._parse(new g(s,e,s.path,e)),value:d._parse(new g(s,s.data[e],s.path,e)),alwaysSet:e in s.data});return s.common.async?o.mergeObjectAsync(a,r):o.mergeObjectSync(a,r)}get element(){return this._def.valueType}static create(e,t,a){return new ZodRecord(t instanceof ZodType?{keyType:e,valueType:t,typeName:ZodFirstPartyTypeKind.ZodRecord,...v(a)}:{keyType:ZodString.create(),valueType:e,typeName:ZodFirstPartyTypeKind.ZodRecord,...v(t)})}}export class ZodMap extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:a,ctx:s}=this._processInputParams(e);if(s.parsedType!==y.map)return c(s,{code:t.invalid_type,expected:y.map,received:s.parsedType}),i;const r=this._def.keyType,n=this._def.valueType,d=[...s.data.entries()].map(([e,t],a)=>({key:r._parse(new g(s,e,s.path,[a,"key"])),value:n._parse(new g(s,t,s.path,[a,"value"]))}));if(s.common.async){const e=new Map;return Promise.resolve().then(async()=>{for(const t of d){const s=await t.key,r=await t.value;if("aborted"===s.status||"aborted"===r.status)return i;"dirty"!==s.status&&"dirty"!==r.status||a.dirty(),e.set(s.value,r.value)}return{status:a.value,value:e}})}{const e=new Map;for(const t of d){const s=t.key,r=t.value;if("aborted"===s.status||"aborted"===r.status)return i;"dirty"!==s.status&&"dirty"!==r.status||a.dirty(),e.set(s.value,r.value)}return{status:a.value,value:e}}}}ZodMap.create=(e,t,a)=>new ZodMap({valueType:t,keyType:e,typeName:ZodFirstPartyTypeKind.ZodMap,...v(a)});export class ZodSet extends ZodType{_parse(e){const{status:a,ctx:s}=this._processInputParams(e);if(s.parsedType!==y.set)return c(s,{code:t.invalid_type,expected:y.set,received:s.parsedType}),i;const r=this._def;null!==r.minSize&&s.data.size<r.minSize.value&&(c(s,{code:t.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),a.dirty()),null!==r.maxSize&&s.data.size>r.maxSize.value&&(c(s,{code:t.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),a.dirty());const n=this._def.valueType;function d(e){const t=new Set;for(const s of e){if("aborted"===s.status)return i;"dirty"===s.status&&a.dirty(),t.add(s.value)}return{status:a.value,value:t}}const o=[...s.data.values()].map((e,t)=>n._parse(new g(s,e,s.path,t)));return s.common.async?Promise.all(o).then(e=>d(e)):d(o)}min(e,t){return new ZodSet({...this._def,minSize:{value:e,message:r.toString(t)}})}max(e,t){return new ZodSet({...this._def,maxSize:{value:e,message:r.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ZodSet.create=(e,t)=>new ZodSet({valueType:e,minSize:null,maxSize:null,typeName:ZodFirstPartyTypeKind.ZodSet,...v(t)});export class ZodFunction extends ZodType{constructor(){super(...arguments),this.validate=this.implement}_parse(r){const{ctx:n}=this._processInputParams(r);if(n.parsedType!==y.function)return c(n,{code:t.invalid_type,expected:y.function,received:n.parsedType}),i;function o(e,r){return m({data:e,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,s(),a].filter(e=>!!e),issueData:{code:t.invalid_arguments,argumentsError:r}})}function u(e,r){return m({data:e,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,s(),a].filter(e=>!!e),issueData:{code:t.invalid_return_type,returnTypeError:r}})}const p={errorMap:n.common.contextualErrorMap},l=n.data;if(this._def.returns instanceof ZodPromise){const t=this;return d(async function(...a){const s=new e([]),r=await t._def.args.parseAsync(a,p).catch(e=>{throw s.addIssue(o(a,e)),s}),n=await Reflect.apply(l,this,r);return await t._def.returns._def.type.parseAsync(n,p).catch(e=>{throw s.addIssue(u(n,e)),s})})}{const t=this;return d(function(...a){const s=t._def.args.safeParse(a,p);if(!s.success)throw new e([o(a,s.error)]);const r=Reflect.apply(l,this,s.data),n=t._def.returns.safeParse(r,p);if(!n.success)throw new e([u(r,n.error)]);return n.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ZodFunction({...this._def,args:ZodTuple.create(e).rest(ZodUnknown.create())})}returns(e){return new ZodFunction({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new ZodFunction({args:e||ZodTuple.create([]).rest(ZodUnknown.create()),returns:t||ZodUnknown.create(),typeName:ZodFirstPartyTypeKind.ZodFunction,...v(a)})}}export class ZodLazy extends ZodType{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ZodLazy.create=(e,t)=>new ZodLazy({getter:e,typeName:ZodFirstPartyTypeKind.ZodLazy,...v(t)});export class ZodLiteral extends ZodType{_parse(e){if(e.data!==this._def.value){const a=this._getOrReturnCtx(e);return c(a,{received:a.data,code:t.invalid_literal,expected:this._def.value}),i}return{status:"valid",value:e.data}}get value(){return this._def.value}}function q(e,t){return new ZodEnum({values:e,typeName:ZodFirstPartyTypeKind.ZodEnum,...v(t)})}ZodLiteral.create=(e,t)=>new ZodLiteral({value:e,typeName:ZodFirstPartyTypeKind.ZodLiteral,...v(t)});export class ZodEnum extends ZodType{_parse(e){if("string"!=typeof e.data){const a=this._getOrReturnCtx(e),s=this._def.values;return c(a,{expected:f.joinValues(s),received:a.parsedType,code:t.invalid_type}),i}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const a=this._getOrReturnCtx(e),s=this._def.values;return c(a,{received:a.data,code:t.invalid_enum_value,options:s}),i}return d(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ZodEnum.create(e,{...this._def,...t})}exclude(e,t=this._def){return ZodEnum.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}ZodEnum.create=q;export class ZodNativeEnum extends ZodType{_parse(e){const a=f.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==y.string&&s.parsedType!==y.number){const e=f.objectValues(a);return c(s,{expected:f.joinValues(e),received:s.parsedType,code:t.invalid_type}),i}if(this._cache||(this._cache=new Set(f.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const e=f.objectValues(a);return c(s,{received:s.data,code:t.invalid_enum_value,options:e}),i}return d(e.data)}get enum(){return this._def.values}}ZodNativeEnum.create=(e,t)=>new ZodNativeEnum({values:e,typeName:ZodFirstPartyTypeKind.ZodNativeEnum,...v(t)});export class ZodPromise extends ZodType{unwrap(){return this._def.type}_parse(e){const{ctx:a}=this._processInputParams(e);if(a.parsedType!==y.promise&&!1===a.common.async)return c(a,{code:t.invalid_type,expected:y.promise,received:a.parsedType}),i;const s=a.parsedType===y.promise?a.data:Promise.resolve(a.data);return d(s.then(e=>this._def.type.parseAsync(e,{path:a.path,errorMap:a.common.contextualErrorMap})))}}ZodPromise.create=(e,t)=>new ZodPromise({type:e,typeName:ZodFirstPartyTypeKind.ZodPromise,...v(t)});export class ZodEffects extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ZodFirstPartyTypeKind.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),s=this._def.effect||null,r={addIssue:e=>{c(a,e),e.fatal?t.abort():t.dirty()},get path(){return a.path}};if(r.addIssue=r.addIssue.bind(r),"preprocess"===s.type){const e=s.transform(a.data,r);if(a.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return i;const s=await this._def.schema._parseAsync({data:e,path:a.path,parent:a});return"aborted"===s.status?i:"dirty"===s.status||"dirty"===t.value?n(s.value):s});{if("aborted"===t.value)return i;const s=this._def.schema._parseSync({data:e,path:a.path,parent:a});return"aborted"===s.status?i:"dirty"===s.status||"dirty"===t.value?n(s.value):s}}if("refinement"===s.type){const e=e=>{const t=s.refinement(e,r);if(a.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===a.common.async){const s=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===s.status?i:("dirty"===s.status&&t.dirty(),e(s.value),{status:t.value,value:s.value})}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(a=>"aborted"===a.status?i:("dirty"===a.status&&t.dirty(),e(a.value).then(()=>({status:t.value,value:a.value}))))}if("transform"===s.type){if(!1===a.common.async){const e=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!h(e))return i;const n=s.transform(e.value,r);if(n instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:n}}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(e=>h(e)?Promise.resolve(s.transform(e.value,r)).then(e=>({status:t.value,value:e})):i)}f.assertNever(s)}}ZodEffects.create=(e,t,a)=>new ZodEffects({schema:e,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:t,...v(a)}),ZodEffects.createWithPreprocess=(e,t,a)=>new ZodEffects({schema:t,effect:{type:"preprocess",transform:e},typeName:ZodFirstPartyTypeKind.ZodEffects,...v(a)});export{ZodEffects as ZodTransformer};export class ZodOptional extends ZodType{_parse(e){return this._getType(e)===y.undefined?d(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ZodOptional.create=(e,t)=>new ZodOptional({innerType:e,typeName:ZodFirstPartyTypeKind.ZodOptional,...v(t)});export class ZodNullable extends ZodType{_parse(e){return this._getType(e)===y.null?d(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ZodNullable.create=(e,t)=>new ZodNullable({innerType:e,typeName:ZodFirstPartyTypeKind.ZodNullable,...v(t)});export class ZodDefault extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===y.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ZodDefault.create=(e,t)=>new ZodDefault({innerType:e,typeName:ZodFirstPartyTypeKind.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...v(t)});export class ZodCatch extends ZodType{_parse(t){const{ctx:a}=this._processInputParams(t),s={...a,common:{...a.common,issues:[]}},r=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return p(r)?r.then(t=>({status:"valid",value:"valid"===t.status?t.value:this._def.catchValue({get error(){return new e(s.common.issues)},input:s.data})})):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new e(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}ZodCatch.create=(e,t)=>new ZodCatch({innerType:e,typeName:ZodFirstPartyTypeKind.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...v(t)});export class ZodNaN extends ZodType{_parse(e){if(this._getType(e)!==y.nan){const a=this._getOrReturnCtx(e);return c(a,{code:t.invalid_type,expected:y.nan,received:a.parsedType}),i}return{status:"valid",value:e.data}}}ZodNaN.create=e=>new ZodNaN({typeName:ZodFirstPartyTypeKind.ZodNaN,...v(e)});export const BRAND=Symbol("zod_brand");export class ZodBranded extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}export class ZodPipeline extends ZodType{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?i:"dirty"===e.status?(t.dirty(),n(e.value)):this._def.out._parseAsync({data:e.value,path:a.path,parent:a})})();{const e=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?i:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:a.path,parent:a})}}static create(e,t){return new ZodPipeline({in:e,out:t,typeName:ZodFirstPartyTypeKind.ZodPipeline})}}export class ZodReadonly extends ZodType{_parse(e){const t=this._def.innerType._parse(e),a=e=>(h(e)&&(e.value=Object.freeze(e.value)),e);return p(t)?t.then(e=>a(e)):a(t)}unwrap(){return this._def.innerType}}function H(e,t){const a="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof a?{message:a}:a}ZodReadonly.create=(e,t)=>new ZodReadonly({innerType:e,typeName:ZodFirstPartyTypeKind.ZodReadonly,...v(t)});export function custom(e,t={},a){return e?ZodAny.create().superRefine((s,r)=>{const n=e(s);if(n instanceof Promise)return n.then(e=>{if(!e){const e=H(t,s),n=e.fatal??a??!0;r.addIssue({code:"custom",...e,fatal:n})}});if(!n){const e=H(t,s),n=e.fatal??a??!0;r.addIssue({code:"custom",...e,fatal:n})}}):ZodAny.create()}export{ZodType as Schema,ZodType as ZodSchema};export const late={object:ZodObject.lazycreate};export var ZodFirstPartyTypeKind;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(ZodFirstPartyTypeKind||(ZodFirstPartyTypeKind={}));const J=(e,t={message:`Input not instance of ${e.name}`})=>custom(t=>t instanceof e,t),Y=ZodString.create,G=ZodNumber.create,X=ZodNaN.create,Q=ZodBigInt.create,ee=ZodBoolean.create,te=ZodDate.create,ae=ZodSymbol.create,se=ZodUndefined.create,re=ZodNull.create,ne=ZodAny.create,ie=ZodUnknown.create,de=ZodNever.create,oe=ZodVoid.create,ce=ZodArray.create,ue=ZodObject.create,pe=ZodObject.strictCreate,le=ZodUnion.create,he=ZodDiscriminatedUnion.create,me=ZodIntersection.create,fe=ZodTuple.create,ye=ZodRecord.create,_e=ZodMap.create,ge=ZodSet.create,Ze=ZodFunction.create,ve=ZodLazy.create,xe=ZodLiteral.create,ke=ZodEnum.create,Te=ZodNativeEnum.create,be=ZodPromise.create,we=ZodEffects.create,Oe=ZodOptional.create,Ne=ZodNullable.create,Ce=ZodEffects.createWithPreprocess,Pe=ZodPipeline.create,Ae=()=>Y().optional(),Se=()=>G().optional(),Fe=()=>ee().optional();export const coerce={string:e=>ZodString.create({...e,coerce:!0}),number:e=>ZodNumber.create({...e,coerce:!0}),boolean:e=>ZodBoolean.create({...e,coerce:!0}),bigint:e=>ZodBigInt.create({...e,coerce:!0}),date:e=>ZodDate.create({...e,coerce:!0})};export{ne as any,ce as array,Q as bigint,ee as boolean,te as date,he as discriminatedUnion,we as effect,ke as enum,Ze as function,J as instanceof,me as intersection,ve as lazy,xe as literal,_e as map,X as nan,Te as nativeEnum,de as never,re as null,Ne as nullable,G as number,ue as object,Fe as oboolean,Se as onumber,Oe as optional,Ae as ostring,Pe as pipeline,Ce as preprocess,be as promise,ye as record,ge as set,pe as strictObject,Y as string,ae as symbol,we as transformer,fe as tuple,se as undefined,le as union,ie as unknown,oe as void};export const NEVER=i;
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@media-editor/core",
3
+ "version": "1.0.26",
4
+ "description": "媒体编辑器框架无关内核:状态/时间轴/ffmpeg 参数/几何/标注渲染/VideoEditorEngine/图片编辑器纯配置工厂(零 React)",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js",
11
+ "require": "./dist/index.cjs"
12
+ },
13
+ "./browser": {
14
+ "types": "./dist/browser.d.ts",
15
+ "import": "./dist/browser.js",
16
+ "require": "./dist/browser.cjs"
17
+ },
18
+ "./engine": {
19
+ "types": "./dist/engine.d.ts",
20
+ "import": "./dist/engine.js",
21
+ "require": "./dist/engine.cjs"
22
+ },
23
+ "./filerobot": {
24
+ "types": "./dist/filerobot.d.ts",
25
+ "import": "./dist/filerobot.js",
26
+ "require": "./dist/filerobot.cjs"
27
+ }
28
+ },
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
32
+ "sideEffects": false,
33
+ "files": [
34
+ "dist"
35
+ ],
36
+ "main": "./dist/index.cjs",
37
+ "module": "./dist/index.js",
38
+ "types": "./dist/index.d.ts",
39
+ "dependencies": {
40
+ "zod": "3.25.76"
41
+ }
42
+ }
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@bylqwjc/media-editor-image",
3
+ "version": "1.0.26",
4
+ "description": "媒体编辑器框架无关图片运行时:把 React+Filerobot 封进 mountImageEditor(el, opts) 命令式 API,Vue / React / 原生 JS 共用,消费方无需装 React",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js"
11
+ },
12
+ "./lazy": {
13
+ "types": "./dist/lazy.d.ts",
14
+ "import": "./dist/lazy.js"
15
+ },
16
+ "./style.css": "./dist/index.css"
17
+ },
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "dependencies": {
22
+ "@media-editor/core": "1.0.26",
23
+ "react": "^19.2.0",
24
+ "react-dom": "^19.2.0"
25
+ },
26
+ "files": [
27
+ "dist"
28
+ ],
29
+ "module": "./dist/index.js",
30
+ "types": "./dist/index.d.ts",
31
+ "bundleDependencies": [
32
+ "@media-editor/core"
33
+ ]
34
+ }