@storm-software/config 1.2.14 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,263 @@
1
+ ## 1.3.5 (2024-02-20)
2
+
3
+
4
+ ### 🚀 Features
5
+
6
+ - **git-tools:** Support for updated Nx Release processing ([92f99126](https://github.com/storm-software/storm-ops/commit/92f99126))
7
+
8
+
9
+ ### 🩹 Fixes
10
+
11
+ - **changelog:** Resolved type issues when calling changelogRenderer ([3c84ddd5](https://github.com/storm-software/storm-ops/commit/3c84ddd5))
12
+
13
+ - **config:** Update type of package ([60f75b96](https://github.com/storm-software/storm-ops/commit/60f75b96))
14
+
15
+ - **config:** Update package to use CommonJs ([f8c863cd](https://github.com/storm-software/storm-ops/commit/f8c863cd))
16
+
17
+ - **config-tools:** Update method of importing config package ([197213a6](https://github.com/storm-software/storm-ops/commit/197213a6))
18
+
19
+ - **config:** Mark config to no longer bundle code ([2b97e77e](https://github.com/storm-software/storm-ops/commit/2b97e77e))
20
+
21
+ - **config:** Update package import handlers ([5d6e83c8](https://github.com/storm-software/storm-ops/commit/5d6e83c8))
22
+
23
+
24
+ ### ❤️ Thank You
25
+
26
+ - Patrick Sullivan
27
+
28
+ ## 1.3.4 (2024-02-20)
29
+
30
+
31
+ ### 🚀 Features
32
+
33
+ - **git-tools:** Support for updated Nx Release processing ([92f99126](https://github.com/storm-software/storm-ops/commit/92f99126))
34
+
35
+
36
+ ### 🩹 Fixes
37
+
38
+ - **changelog:** Resolved type issues when calling changelogRenderer ([3c84ddd5](https://github.com/storm-software/storm-ops/commit/3c84ddd5))
39
+
40
+ - **config:** Update type of package ([60f75b96](https://github.com/storm-software/storm-ops/commit/60f75b96))
41
+
42
+ - **config:** Update package to use CommonJs ([f8c863cd](https://github.com/storm-software/storm-ops/commit/f8c863cd))
43
+
44
+ - **config-tools:** Update method of importing config package ([197213a6](https://github.com/storm-software/storm-ops/commit/197213a6))
45
+
46
+ - **config:** Mark config to no longer bundle code ([2b97e77e](https://github.com/storm-software/storm-ops/commit/2b97e77e))
47
+
48
+
49
+ ### ❤️ Thank You
50
+
51
+ - Patrick Sullivan
52
+
53
+ ## 1.3.3 (2024-02-20)
54
+
55
+
56
+ ### 🚀 Features
57
+
58
+ - **git-tools:** Support for updated Nx Release processing ([92f99126](https://github.com/storm-software/storm-ops/commit/92f99126))
59
+
60
+
61
+ ### 🩹 Fixes
62
+
63
+ - **changelog:** Resolved type issues when calling changelogRenderer ([3c84ddd5](https://github.com/storm-software/storm-ops/commit/3c84ddd5))
64
+
65
+ - **config:** Update type of package ([60f75b96](https://github.com/storm-software/storm-ops/commit/60f75b96))
66
+
67
+ - **config:** Update package to use CommonJs ([f8c863cd](https://github.com/storm-software/storm-ops/commit/f8c863cd))
68
+
69
+ - **config-tools:** Update method of importing config package ([197213a6](https://github.com/storm-software/storm-ops/commit/197213a6))
70
+
71
+
72
+ ### ❤️ Thank You
73
+
74
+ - Patrick Sullivan
75
+
76
+ ## 1.3.2 (2024-02-20)
77
+
78
+
79
+ ### 🚀 Features
80
+
81
+ - **git-tools:** Support for updated Nx Release processing ([92f99126](https://github.com/storm-software/storm-ops/commit/92f99126))
82
+
83
+
84
+ ### 🩹 Fixes
85
+
86
+ - **changelog:** Resolved type issues when calling changelogRenderer ([3c84ddd5](https://github.com/storm-software/storm-ops/commit/3c84ddd5))
87
+
88
+ - **config:** Update type of package ([60f75b96](https://github.com/storm-software/storm-ops/commit/60f75b96))
89
+
90
+ - **config:** Update package to use CommonJs ([f8c863cd](https://github.com/storm-software/storm-ops/commit/f8c863cd))
91
+
92
+
93
+ ### ❤️ Thank You
94
+
95
+ - Patrick Sullivan
96
+
97
+ ## 1.3.1 (2024-02-20)
98
+
99
+
100
+ ### 🚀 Features
101
+
102
+ - **git-tools:** Support for updated Nx Release processing ([92f99126](https://github.com/storm-software/storm-ops/commit/92f99126))
103
+
104
+
105
+ ### 🩹 Fixes
106
+
107
+ - **changelog:** Resolved type issues when calling changelogRenderer ([3c84ddd5](https://github.com/storm-software/storm-ops/commit/3c84ddd5))
108
+
109
+ - **config:** Update type of package ([60f75b96](https://github.com/storm-software/storm-ops/commit/60f75b96))
110
+
111
+
112
+ ### ❤️ Thank You
113
+
114
+ - Patrick Sullivan
115
+
116
+ ## 1.3.0 (2024-02-20)
117
+
118
+
119
+ ### 🚀 Features
120
+
121
+ - **git-tools:** Support for updated Nx Release processing ([92f99126](https://github.com/storm-software/storm-ops/commit/92f99126))
122
+
123
+
124
+ ### 🩹 Fixes
125
+
126
+ - **changelog:** Resolved type issues when calling changelogRenderer ([3c84ddd5](https://github.com/storm-software/storm-ops/commit/3c84ddd5))
127
+
128
+
129
+ ### ❤️ Thank You
130
+
131
+ - Patrick Sullivan
132
+
133
+ ## 1.2.22 (2024-02-17)
134
+
135
+
136
+ ### 🩹 Fixes
137
+
138
+ - **storm-ops:** Update the chalk version to v4.1.2 ([0d50334a](https://github.com/storm-software/storm-ops/commit/0d50334a))
139
+
140
+ - **storm-ops:** Resolve issue with the pnpm version ([f124fd94](https://github.com/storm-software/storm-ops/commit/f124fd94))
141
+
142
+ - **config-tools:** Update package type to a module to resolve import issues ([4a9649c9](https://github.com/storm-software/storm-ops/commit/4a9649c9))
143
+
144
+ - **config:** Updated the default import method ([3556e215](https://github.com/storm-software/storm-ops/commit/3556e215))
145
+
146
+ - **workspace-tools:** Add `zod` as external depencency ([05b66136](https://github.com/storm-software/storm-ops/commit/05b66136))
147
+
148
+ - **workspace-tools:** Update method of referencing the internal packages ([b3f127c4](https://github.com/storm-software/storm-ops/commit/b3f127c4))
149
+
150
+
151
+ ### ❤️ Thank You
152
+
153
+ - Patrick Sullivan
154
+
155
+ ## 1.2.21 (2024-02-17)
156
+
157
+
158
+ ### 🩹 Fixes
159
+
160
+ - **storm-ops:** Update the chalk version to v4.1.2 ([0d50334a](https://github.com/storm-software/storm-ops/commit/0d50334a))
161
+
162
+ - **storm-ops:** Resolve issue with the pnpm version ([f124fd94](https://github.com/storm-software/storm-ops/commit/f124fd94))
163
+
164
+ - **config-tools:** Update package type to a module to resolve import issues ([4a9649c9](https://github.com/storm-software/storm-ops/commit/4a9649c9))
165
+
166
+ - **config:** Updated the default import method ([3556e215](https://github.com/storm-software/storm-ops/commit/3556e215))
167
+
168
+ - **workspace-tools:** Add `zod` as external depencency ([05b66136](https://github.com/storm-software/storm-ops/commit/05b66136))
169
+
170
+
171
+ ### ❤️ Thank You
172
+
173
+ - Patrick Sullivan
174
+
175
+ ## 1.2.20 (2024-02-17)
176
+
177
+
178
+ ### 🩹 Fixes
179
+
180
+ - **storm-ops:** Update the chalk version to v4.1.2 ([0d50334a](https://github.com/storm-software/storm-ops/commit/0d50334a))
181
+
182
+ - **storm-ops:** Resolve issue with the pnpm version ([f124fd94](https://github.com/storm-software/storm-ops/commit/f124fd94))
183
+
184
+ - **config-tools:** Update package type to a module to resolve import issues ([4a9649c9](https://github.com/storm-software/storm-ops/commit/4a9649c9))
185
+
186
+ - **config:** Updated the default import method ([3556e215](https://github.com/storm-software/storm-ops/commit/3556e215))
187
+
188
+
189
+ ### ❤️ Thank You
190
+
191
+ - Patrick Sullivan
192
+
193
+ ## 1.2.19 (2024-02-15)
194
+
195
+
196
+ ### 🩹 Fixes
197
+
198
+ - **storm-ops:** Update the chalk version to v4.1.2 ([0d50334a](https://github.com/storm-software/storm-ops/commit/0d50334a))
199
+
200
+ - **storm-ops:** Resolve issue with the pnpm version ([f124fd94](https://github.com/storm-software/storm-ops/commit/f124fd94))
201
+
202
+ - **config-tools:** Update package type to a module to resolve import issues ([4a9649c9](https://github.com/storm-software/storm-ops/commit/4a9649c9))
203
+
204
+
205
+ ### ❤️ Thank You
206
+
207
+ - Patrick Sullivan
208
+
209
+ ## 1.2.18 (2024-02-15)
210
+
211
+
212
+ ### 🩹 Fixes
213
+
214
+ - **storm-ops:** Update the chalk version to v4.1.2 ([0d50334a](https://github.com/storm-software/storm-ops/commit/0d50334a))
215
+
216
+ - **storm-ops:** Resolve issue with the pnpm version ([f124fd94](https://github.com/storm-software/storm-ops/commit/f124fd94))
217
+
218
+
219
+ ### ❤️ Thank You
220
+
221
+ - Patrick Sullivan
222
+
223
+ ## 1.2.17 (2024-02-15)
224
+
225
+
226
+ ### 🩹 Fixes
227
+
228
+ - **storm-ops:** Update the chalk version to v4.1.2 ([0d50334a](https://github.com/storm-software/storm-ops/commit/0d50334a))
229
+
230
+
231
+ ### ❤️ Thank You
232
+
233
+ - Patrick Sullivan
234
+
235
+ ## 1.2.16 (2024-02-15)
236
+
237
+
238
+ ### 🩹 Fixes
239
+
240
+ - **storm-ops:** Update chalk dependency for all modules ([d8a55c49](https://github.com/storm-software/storm-ops/commit/d8a55c49))
241
+
242
+ - **storm-ops:** Downgrade dependencies to work with cjs task runners ([bece51de](https://github.com/storm-software/storm-ops/commit/bece51de))
243
+
244
+
245
+ ### ❤️ Thank You
246
+
247
+ - Patrick Sullivan
248
+
249
+ ## 1.2.15 (2024-02-15)
250
+
251
+
252
+ ### 🩹 Fixes
253
+
254
+ - **storm-ops:** Update chalk dependency for all modules ([d8a55c49](https://github.com/storm-software/storm-ops/commit/d8a55c49))
255
+
256
+
257
+ ### ❤️ Thank You
258
+
259
+ - Patrick Sullivan
260
+
1
261
 
2
262
 
3
263
 
package/README.md CHANGED
@@ -16,7 +16,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
16
16
 
17
17
  <h3 align="center">💻 Visit <a href="https://stormsoftware.org" target="_blank">stormsoftware.org</a> to stay up to date with this developer</h3><br />
18
18
 
19
- [![Version](https://img.shields.io/badge/version-1.19.5-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;
19
+ [![Version](https://img.shields.io/badge/version-1.3.1-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;
20
20
  [![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with docusaurus](https://img.shields.io/badge/documented_with-docusaurus-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://docusaurus.io/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
21
21
 
22
22
  > [!IMPORTANT]
package/declarations.d.ts CHANGED
@@ -4,10 +4,9 @@ import type { StormConfigSchema } from "./src/schema";
4
4
  type TStormConfig = z.infer<typeof StormConfigSchema>;
5
5
 
6
6
  declare type StormConfig<
7
- TExtensionName extends
8
- keyof TStormConfig["extensions"] = keyof TStormConfig["extensions"],
7
+ TExtensionName extends keyof TStormConfig["extensions"] = keyof TStormConfig["extensions"],
9
8
  TExtensionConfig extends
10
- TStormConfig["extensions"][TExtensionName] = TStormConfig["extensions"][TExtensionName],
9
+ TStormConfig["extensions"][TExtensionName] = TStormConfig["extensions"][TExtensionName]
11
10
  > = TStormConfig & {
12
11
  extensions:
13
12
  | (TStormConfig["extensions"] & {
package/index.cjs CHANGED
@@ -1 +1 @@
1
- var le=Object.defineProperty;var Re=Object.getOwnPropertyDescriptor;var Ie=Object.getOwnPropertyNames;var Ae=Object.prototype.hasOwnProperty;var ze=(r,e)=>{for(var t in e)le(r,t,{get:e[t],enumerable:!0})},Me=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ie(e))!Ae.call(r,n)&&n!==t&&le(r,n,{get:()=>e[n],enumerable:!(s=Re(e,n))||s.enumerable});return r};var $e=r=>Me(le({},"__esModule",{value:!0}),r);var Fe={};ze(Fe,{ColorConfigSchema:()=>je,StormConfigSchema:()=>Ke});module.exports=$e(Fe);var _;(function(r){r.assertEqual=n=>n;function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{let a={};for(let i of n)a[i]=i;return a},r.getValidEnumValues=n=>{let a=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(let o of a)i[o]=n[o];return r.objectValues(i)},r.objectValues=n=>r.objectKeys(n).map(function(a){return n[a]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let a=[];for(let i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},r.find=(n,a)=>{for(let i of n)if(a(i))return i},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function s(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}r.joinValues=s,r.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(_||(_={}));var we;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(we||(we={}));var d=_.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),A=r=>{switch(typeof r){case"undefined":return d.undefined;case"string":return d.string;case"number":return isNaN(r)?d.nan:d.number;case"boolean":return d.boolean;case"function":return d.function;case"bigint":return d.bigint;case"symbol":return d.symbol;case"object":return Array.isArray(r)?d.array:r===null?d.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?d.promise:typeof Map<"u"&&r instanceof Map?d.map:typeof Set<"u"&&r instanceof Set?d.set:typeof Date<"u"&&r instanceof Date?d.date:d.object;default:return d.unknown}},c=_.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var S=class extends Error{constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(a){return a.message},s={_errors:[]},n=a=>{for(let i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let o=s,f=0;for(;f<i.path.length;){let u=i.path[f];f===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(t(i))):o[u]=o[u]||{_errors:[]},o=o[u],f++}}};return n(this),s}toString(){return this.message}get message(){return JSON.stringify(this.issues,_.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t={},s=[];for(let n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}};S.create=r=>new S(r);var ie=(r,e)=>{let t;switch(r.code){case c.invalid_type:r.received===d.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,_.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${_.joinValues(r.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${_.joinValues(r.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${_.joinValues(r.options)}, received '${r.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:_.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case c.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case c.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,_.assertNever(r)}return{message:t}},Ve=ie;function he(){return Ve}var pe=r=>{let{data:e,path:t,errorMaps:s,issueData:n}=r,a=[...t,...n.path||[]],i={...n,path:a},o="",f=s.filter(u=>!!u).slice().reverse();for(let u of f)o=u(i,{data:e,defaultError:o}).message;return{...n,path:a,message:n.message||o}};function l(r,e){let t=pe({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,he(),ie].filter(s=>!!s)});r.common.issues.push(t)}var b=class r{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let s=[];for(let n of t){if(n.status==="aborted")return y;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){let s=[];for(let n of t)s.push({key:await n.key,value:await n.value});return r.mergeObjectSync(e,s)}static mergeObjectSync(e,t){let s={};for(let n of t){let{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return y;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(s[a.value]=i.value)}return{status:e.value,value:s}}},y=Object.freeze({status:"aborted"}),Le=r=>({status:"dirty",value:r}),k=r=>({status:"valid",value:r}),Te=r=>r.status==="aborted",Se=r=>r.status==="dirty",oe=r=>r.status==="valid",me=r=>typeof Promise<"u"&&r instanceof Promise,h;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e?.message})(h||(h={}));var C=class{constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Ce=(r,e)=>{if(oe(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new S(r.common.issues);return this._error=t,this._error}}};function m(r){if(!r)return{};let{errorMap:e,invalid_type_error:t,required_error:s,description:n}=r;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>i.code!=="invalid_type"?{message:o.defaultError}:typeof o.data>"u"?{message:s??o.defaultError}:{message:t??o.defaultError},description:n}}var g=class{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)}get description(){return this._def.description}_getType(e){return A(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:A(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new b,ctx:{common:e.parent.common,data:e.data,parsedType:A(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(me(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;let n={common:{issues:[],async:(s=t?.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:A(e)},a=this._parseSync({data:e,path:n.path,parent:n});return Ce(n,a)}async parseAsync(e,t){let s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){let s={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:A(e)},n=this._parse({data:e,path:s.path,parent:s}),a=await(me(n)?n:Promise.resolve(n));return Ce(s,a)}refine(e,t){let s=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{let i=e(n),o=()=>a.addIssue({code:c.custom,...s(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(f=>f?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof t=="function"?t(s,n):t),!1))}_refinement(e){return new O({schema:this,typeName:p.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Z.create(this,this._def)}nullable(){return I.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return R.create(this,this._def)}promise(){return z.create(this,this._def)}or(e){return P.create([this,e],this._def)}and(e){return D.create(this,e,this._def)}transform(e){return new O({...m(this._def),schema:this,typeName:p.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new J({...m(this._def),innerType:this,defaultValue:t,typeName:p.ZodDefault})}brand(){return new xe({typeName:p.ZodBranded,type:this,...m(this._def)})}catch(e){let t=typeof e=="function"?e:()=>e;return new re({...m(this._def),innerType:this,catchValue:t,typeName:p.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ce.create(this,e)}readonly(){return ne.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Pe=/^c[^\s-]{8,}$/i,De=/^[a-z][a-z0-9]*$/,Ue=/^[0-9A-HJKMNP-TV-Z]{26}$/,Be=/^[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,We=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,qe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",fe,Je=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Ye=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,He=r=>r.precision?r.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}Z$`):r.precision===0?r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function Ge(r,e){return!!((e==="v4"||!e)&&Je.test(r)||(e==="v6"||!e)&&Ye.test(r))}var $=class r extends g{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==d.string){let a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:d.string,received:a.parsedType}),y}let s=new b,n;for(let a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){let i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(n=this._getOrReturnCtx(e,n),i?l(n,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&l(n,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")We.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"email",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")fe||(fe=new RegExp(qe,"u")),fe.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"emoji",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")Be.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"uuid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")Pe.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")De.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid2",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")Ue.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ulid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),l(n,{validation:"url",code:c.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"regex",code:c.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?He(a).test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="ip"?Ge(e.data,a.version)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ip",code:c.invalid_string,message:a.message}),s.dirty()):_.assertNever(a);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(n=>e.test(n),{validation:t,code:c.invalid_string,...h.errToObj(s)})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}datetime(e){var t;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(t=e?.offset)!==null&&t!==void 0?t:!1,...h.errToObj(e?.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...h.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new r({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};$.create=r=>{var e;return new $({checks:[],typeName:p.ZodString,coerce:(e=r?.coerce)!==null&&e!==void 0?e:!1,...m(r)})};function Xe(r,e){let t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,a=parseInt(r.toFixed(n).replace(".","")),i=parseInt(e.toFixed(n).replace(".",""));return a%i/Math.pow(10,n)}var Y=class r extends g{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)!==d.number){let a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:d.number,received:a.parsedType}),y}let s,n=new b;for(let a of this._def.checks)a.kind==="int"?_.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:c.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?Xe(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:c.not_finite,message:a.message}),n.dirty()):_.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&_.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}};Y.create=r=>new Y({checks:[],typeName:p.ZodNumber,coerce:r?.coerce||!1,...m(r)});var H=class r extends g{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==d.bigint){let a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:d.bigint,received:a.parsedType}),y}let s,n=new b;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):_.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};H.create=r=>{var e;return new H({checks:[],typeName:p.ZodBigInt,coerce:(e=r?.coerce)!==null&&e!==void 0?e:!1,...m(r)})};var G=class extends g{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==d.boolean){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:d.boolean,received:s.parsedType}),y}return k(e.data)}};G.create=r=>new G({typeName:p.ZodBoolean,coerce:r?.coerce||!1,...m(r)});var X=class r extends g{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==d.date){let a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:d.date,received:a.parsedType}),y}if(isNaN(e.data.getTime())){let a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_date}),y}let s=new b,n;for(let a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):_.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};X.create=r=>new X({checks:[],coerce:r?.coerce||!1,typeName:p.ZodDate,...m(r)});var Q=class extends g{_parse(e){if(this._getType(e)!==d.symbol){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:d.symbol,received:s.parsedType}),y}return k(e.data)}};Q.create=r=>new Q({typeName:p.ZodSymbol,...m(r)});var V=class extends g{_parse(e){if(this._getType(e)!==d.undefined){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:d.undefined,received:s.parsedType}),y}return k(e.data)}};V.create=r=>new V({typeName:p.ZodUndefined,...m(r)});var L=class extends g{_parse(e){if(this._getType(e)!==d.null){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:d.null,received:s.parsedType}),y}return k(e.data)}};L.create=r=>new L({typeName:p.ZodNull,...m(r)});var K=class extends g{constructor(){super(...arguments),this._any=!0}_parse(e){return k(e.data)}};K.create=r=>new K({typeName:p.ZodAny,...m(r)});var j=class extends g{constructor(){super(...arguments),this._unknown=!0}_parse(e){return k(e.data)}};j.create=r=>new j({typeName:p.ZodUnknown,...m(r)});var N=class extends g{_parse(e){let t=this._getOrReturnCtx(e);return l(t,{code:c.invalid_type,expected:d.never,received:t.parsedType}),y}};N.create=r=>new N({typeName:p.ZodNever,...m(r)});var F=class extends g{_parse(e){if(this._getType(e)!==d.undefined){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:d.void,received:s.parsedType}),y}return k(e.data)}};F.create=r=>new F({typeName:p.ZodVoid,...m(r)});var R=class r extends g{_parse(e){let{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==d.array)return l(t,{code:c.invalid_type,expected:d.array,received:t.parsedType}),y;if(n.exactLength!==null){let i=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(i||o)&&(l(t,{code:i?c.too_big:c.too_small,minimum:o?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(l(t,{code:c.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(l(t,{code:c.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new C(t,i,t.path,o)))).then(i=>b.mergeArray(s,i));let a=[...t.data].map((i,o)=>n.type._parseSync(new C(t,i,t.path,o)));return b.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new r({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new r({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new r({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}};R.create=(r,e)=>new R({type:r,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,...m(e)});function M(r){if(r instanceof w){let e={};for(let t in r.shape){let s=r.shape[t];e[t]=Z.create(M(s))}return new w({...r._def,shape:()=>e})}else return r instanceof R?new R({...r._def,type:M(r.element)}):r instanceof Z?Z.create(M(r.unwrap())):r instanceof I?I.create(M(r.unwrap())):r instanceof E?E.create(r.items.map(e=>M(e))):r}var w=class r extends g{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=_.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==d.object){let u=this._getOrReturnCtx(e);return l(u,{code:c.invalid_type,expected:d.object,received:u.parsedType}),y}let{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof N&&this._def.unknownKeys==="strip"))for(let u in n.data)i.includes(u)||o.push(u);let f=[];for(let u of i){let v=a[u],T=n.data[u];f.push({key:{status:"valid",value:u},value:v._parse(new C(n,T,n.path,u)),alwaysSet:u in n.data})}if(this._def.catchall instanceof N){let u=this._def.unknownKeys;if(u==="passthrough")for(let v of o)f.push({key:{status:"valid",value:v},value:{status:"valid",value:n.data[v]}});else if(u==="strict")o.length>0&&(l(n,{code:c.unrecognized_keys,keys:o}),s.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let v of o){let T=n.data[v];f.push({key:{status:"valid",value:v},value:u._parse(new C(n,T,n.path,v)),alwaysSet:v in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let u=[];for(let v of f){let T=await v.key;u.push({key:T,value:await v.value,alwaysSet:v.alwaysSet})}return u}).then(u=>b.mergeObjectSync(s,u)):b.mergeObjectSync(s,f)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new r({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,a,i,o;let f=(i=(a=(n=this._def).errorMap)===null||a===void 0?void 0:a.call(n,t,s).message)!==null&&i!==void 0?i:s.defaultError;return t.code==="unrecognized_keys"?{message:(o=h.errToObj(e).message)!==null&&o!==void 0?o:f}:{message:f}}}:{}})}strip(){return new r({...this._def,unknownKeys:"strip"})}passthrough(){return new r({...this._def,unknownKeys:"passthrough"})}extend(e){return new r({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new r({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:p.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new r({...this._def,catchall:e})}pick(e){let t={};return _.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])}),new r({...this._def,shape:()=>t})}omit(e){let t={};return _.objectKeys(this.shape).forEach(s=>{e[s]||(t[s]=this.shape[s])}),new r({...this._def,shape:()=>t})}deepPartial(){return M(this)}partial(e){let t={};return _.objectKeys(this.shape).forEach(s=>{let n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()}),new r({...this._def,shape:()=>t})}required(e){let t={};return _.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof Z;)a=a._def.innerType;t[s]=a}}),new r({...this._def,shape:()=>t})}keyof(){return Oe(_.objectKeys(this.shape))}};w.create=(r,e)=>new w({shape:()=>r,unknownKeys:"strip",catchall:N.create(),typeName:p.ZodObject,...m(e)});w.strictCreate=(r,e)=>new w({shape:()=>r,unknownKeys:"strict",catchall:N.create(),typeName:p.ZodObject,...m(e)});w.lazycreate=(r,e)=>new w({shape:r,unknownKeys:"strip",catchall:N.create(),typeName:p.ZodObject,...m(e)});var P=class extends g{_parse(e){let{ctx:t}=this._processInputParams(e),s=this._def.options;function n(a){for(let o of a)if(o.result.status==="valid")return o.result;for(let o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;let i=a.map(o=>new S(o.ctx.common.issues));return l(t,{code:c.invalid_union,unionErrors:i}),y}if(t.common.async)return Promise.all(s.map(async a=>{let i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a,i=[];for(let f of s){let u={...t,common:{...t.common,issues:[]},parent:null},v=f._parseSync({data:t.data,path:t.path,parent:u});if(v.status==="valid")return v;v.status==="dirty"&&!a&&(a={result:v,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(f=>new S(f));return l(t,{code:c.invalid_union,unionErrors:o}),y}}get options(){return this._def.options}};P.create=(r,e)=>new P({options:r,typeName:p.ZodUnion,...m(e)});var ae=r=>r instanceof U?ae(r.schema):r instanceof O?ae(r.innerType()):r instanceof B?[r.value]:r instanceof W?r.options:r instanceof q?Object.keys(r.enum):r instanceof J?ae(r._def.innerType):r instanceof V?[void 0]:r instanceof L?[null]:null,ye=class r extends g{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==d.object)return l(t,{code:c.invalid_type,expected:d.object,received:t.parsedType}),y;let s=this.discriminator,n=t.data[s],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(l(t,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),y)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){let n=new Map;for(let a of t){let i=ae(a.shape[e]);if(!i)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of i){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new r({typeName:p.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...m(s)})}};function ge(r,e){let t=A(r),s=A(e);if(r===e)return{valid:!0,data:r};if(t===d.object&&s===d.object){let n=_.objectKeys(e),a=_.objectKeys(r).filter(o=>n.indexOf(o)!==-1),i={...r,...e};for(let o of a){let f=ge(r[o],e[o]);if(!f.valid)return{valid:!1};i[o]=f.data}return{valid:!0,data:i}}else if(t===d.array&&s===d.array){if(r.length!==e.length)return{valid:!1};let n=[];for(let a=0;a<r.length;a++){let i=r[a],o=e[a],f=ge(i,o);if(!f.valid)return{valid:!1};n.push(f.data)}return{valid:!0,data:n}}else return t===d.date&&s===d.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}var D=class extends g{_parse(e){let{status:t,ctx:s}=this._processInputParams(e),n=(a,i)=>{if(Te(a)||Te(i))return y;let o=ge(a.value,i.value);return o.valid?((Se(a)||Se(i))&&t.dirty(),{status:t.value,value:o.data}):(l(s,{code:c.invalid_intersection_types}),y)};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(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}};D.create=(r,e,t)=>new D({left:r,right:e,typeName:p.ZodIntersection,...m(t)});var E=class r extends g{_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==d.array)return l(s,{code:c.invalid_type,expected:d.array,received:s.parsedType}),y;if(s.data.length<this._def.items.length)return l(s,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),y;!this._def.rest&&s.data.length>this._def.items.length&&(l(s,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let a=[...s.data].map((i,o)=>{let f=this._def.items[o]||this._def.rest;return f?f._parse(new C(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>b.mergeArray(t,i)):b.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new r({...this._def,rest:e})}};E.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new E({items:r,typeName:p.ZodTuple,rest:null,...m(e)})};var ve=class r extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==d.object)return l(s,{code:c.invalid_type,expected:d.object,received:s.parsedType}),y;let n=[],a=this._def.keyType,i=this._def.valueType;for(let o in s.data)n.push({key:a._parse(new C(s,o,s.path,o)),value:i._parse(new C(s,s.data[o],s.path,o))});return s.common.async?b.mergeObjectAsync(t,n):b.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof g?new r({keyType:e,valueType:t,typeName:p.ZodRecord,...m(s)}):new r({keyType:$.create(),valueType:e,typeName:p.ZodRecord,...m(t)})}},ee=class extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==d.map)return l(s,{code:c.invalid_type,expected:d.map,received:s.parsedType}),y;let n=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([o,f],u)=>({key:n._parse(new C(s,o,s.path,[u,"key"])),value:a._parse(new C(s,f,s.path,[u,"value"]))}));if(s.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let f of i){let u=await f.key,v=await f.value;if(u.status==="aborted"||v.status==="aborted")return y;(u.status==="dirty"||v.status==="dirty")&&t.dirty(),o.set(u.value,v.value)}return{status:t.value,value:o}})}else{let o=new Map;for(let f of i){let u=f.key,v=f.value;if(u.status==="aborted"||v.status==="aborted")return y;(u.status==="dirty"||v.status==="dirty")&&t.dirty(),o.set(u.value,v.value)}return{status:t.value,value:o}}}};ee.create=(r,e,t)=>new ee({valueType:e,keyType:r,typeName:p.ZodMap,...m(t)});var te=class r extends g{_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==d.set)return l(s,{code:c.invalid_type,expected:d.set,received:s.parsedType}),y;let n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(l(s,{code:c.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(l(s,{code:c.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let a=this._def.valueType;function i(f){let u=new Set;for(let v of f){if(v.status==="aborted")return y;v.status==="dirty"&&t.dirty(),u.add(v.value)}return{status:t.value,value:u}}let o=[...s.data.values()].map((f,u)=>a._parse(new C(s,f,s.path,u)));return s.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new r({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new r({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};te.create=(r,e)=>new te({valueType:r,minSize:null,maxSize:null,typeName:p.ZodSet,...m(e)});var _e=class r extends g{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==d.function)return l(t,{code:c.invalid_type,expected:d.function,received:t.parsedType}),y;function s(o,f){return pe({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,he(),ie].filter(u=>!!u),issueData:{code:c.invalid_arguments,argumentsError:f}})}function n(o,f){return pe({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,he(),ie].filter(u=>!!u),issueData:{code:c.invalid_return_type,returnTypeError:f}})}let a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof z){let o=this;return k(async function(...f){let u=new S([]),v=await o._def.args.parseAsync(f,a).catch(ue=>{throw u.addIssue(s(f,ue)),u}),T=await Reflect.apply(i,this,v);return await o._def.returns._def.type.parseAsync(T,a).catch(ue=>{throw u.addIssue(n(T,ue)),u})})}else{let o=this;return k(function(...f){let u=o._def.args.safeParse(f,a);if(!u.success)throw new S([s(f,u.error)]);let v=Reflect.apply(i,this,u.data),T=o._def.returns.safeParse(v,a);if(!T.success)throw new S([n(v,T.error)]);return T.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new r({...this._def,args:E.create(e).rest(j.create())})}returns(e){return new r({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new r({args:e||E.create([]).rest(j.create()),returns:t||j.create(),typeName:p.ZodFunction,...m(s)})}},U=class extends g{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};U.create=(r,e)=>new U({getter:r,typeName:p.ZodLazy,...m(e)});var B=class extends g{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return l(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),y}return{status:"valid",value:e.data}}get value(){return this._def.value}};B.create=(r,e)=>new B({value:r,typeName:p.ZodLiteral,...m(e)});function Oe(r,e){return new W({values:r,typeName:p.ZodEnum,...m(e)})}var W=class r extends g{_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),s=this._def.values;return l(t,{expected:_.joinValues(s),received:t.parsedType,code:c.invalid_type}),y}if(this._def.values.indexOf(e.data)===-1){let t=this._getOrReturnCtx(e),s=this._def.values;return l(t,{received:t.data,code:c.invalid_enum_value,options:s}),y}return k(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e){return r.create(e)}exclude(e){return r.create(this.options.filter(t=>!e.includes(t)))}};W.create=Oe;var q=class extends g{_parse(e){let t=_.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==d.string&&s.parsedType!==d.number){let n=_.objectValues(t);return l(s,{expected:_.joinValues(n),received:s.parsedType,code:c.invalid_type}),y}if(t.indexOf(e.data)===-1){let n=_.objectValues(t);return l(s,{received:s.data,code:c.invalid_enum_value,options:n}),y}return k(e.data)}get enum(){return this._def.values}};q.create=(r,e)=>new q({values:r,typeName:p.ZodNativeEnum,...m(e)});var z=class extends g{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==d.promise&&t.common.async===!1)return l(t,{code:c.invalid_type,expected:d.promise,received:t.parsedType}),y;let s=t.parsedType===d.promise?t.data:Promise.resolve(t.data);return k(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}};z.create=(r,e)=>new z({type:r,typeName:p.ZodPromise,...m(e)});var O=class extends g{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===p.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{l(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){let i=n.transform(s.data,a);return s.common.issues.length?{status:"dirty",value:s.data}:s.common.async?Promise.resolve(i).then(o=>this._def.schema._parseAsync({data:o,path:s.path,parent:s})):this._def.schema._parseSync({data:i,path:s.path,parent:s})}if(n.type==="refinement"){let i=o=>{let f=n.refinement(o,a);if(s.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){let o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?y:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?y:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){let i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!oe(i))return i;let o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>oe(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):i);_.assertNever(n)}};O.create=(r,e,t)=>new O({schema:r,typeName:p.ZodEffects,effect:e,...m(t)});O.createWithPreprocess=(r,e,t)=>new O({schema:e,effect:{type:"preprocess",transform:r},typeName:p.ZodEffects,...m(t)});var Z=class extends g{_parse(e){return this._getType(e)===d.undefined?k(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Z.create=(r,e)=>new Z({innerType:r,typeName:p.ZodOptional,...m(e)});var I=class extends g{_parse(e){return this._getType(e)===d.null?k(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};I.create=(r,e)=>new I({innerType:r,typeName:p.ZodNullable,...m(e)});var J=class extends g{_parse(e){let{ctx:t}=this._processInputParams(e),s=t.data;return t.parsedType===d.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};J.create=(r,e)=>new J({innerType:r,typeName:p.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...m(e)});var re=class extends g{_parse(e){let{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return me(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new S(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new S(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}};re.create=(r,e)=>new re({innerType:r,typeName:p.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...m(e)});var se=class extends g{_parse(e){if(this._getType(e)!==d.nan){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:d.nan,received:s.parsedType}),y}return{status:"valid",value:e.data}}};se.create=r=>new se({typeName:p.ZodNaN,...m(r)});var rt=Symbol("zod_brand"),xe=class extends g{_parse(e){let{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}},ce=class r extends g{_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?y:a.status==="dirty"?(t.dirty(),Le(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{let n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?y:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,t){return new r({in:e,out:t,typeName:p.ZodPipeline})}},ne=class extends g{_parse(e){let t=this._def.innerType._parse(e);return oe(t)&&(t.value=Object.freeze(t.value)),t}};ne.create=(r,e)=>new ne({innerType:r,typeName:p.ZodReadonly,...m(e)});var st={object:w.lazycreate},p;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(p||(p={}));var x=$.create,nt=Y.create,at=se.create,it=H.create,be=G.create,ot=X.create,ct=Q.create,dt=V.create,ut=L.create,Ze=K.create,lt=j.create,ft=N.create,ht=F.create,Ne=R.create,ke=w.create,pt=w.strictCreate,mt=P.create,yt=ye.create,gt=D.create,vt=E.create,Ee=ve.create,_t=ee.create,xt=te.create,bt=_e.create,kt=U.create,wt=B.create,de=W.create,Tt=q.create,St=z.create,Ct=O.create,Ot=Z.create,Zt=I.create,Nt=O.createWithPreprocess,Et=ce.create;var je=ke({primary:x().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The primary color of the workspace"),background:x().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d232a").describe("The background color of the workspace"),success:x().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace"),info:x().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The informational color of the workspace"),warning:x().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace"),error:x().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#990000").describe("The error color of the workspace"),fatal:x().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#7d1a1a").describe("The fatal color of the workspace")}).describe("Colors used for various workspace elements"),Ke=ke({name:x().trim().toLowerCase().optional().describe("The name of the package"),namespace:x().trim().toLowerCase().optional().describe("The namespace of the package"),organization:x().trim().default("storm-software").describe("The organization of the workspace"),repository:x().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),license:x().trim().default("Apache License 2.0").describe("The root directory of the package"),homepage:x().trim().url().default("https://stormsoftware.org").describe("The homepage of the workspace"),branch:x().trim().default("main").describe("The branch of the workspace"),preid:x().optional().describe("A tag specifying the version pre-release identifier"),owner:x().trim().default("@storm-software/development").describe("The owner of the package"),worker:x().trim().default("stormie-bot").describe("The worker of the package (this is the bot that will be used to perform various tasks)"),env:de(["development","staging","production"]).default("production").describe("The current runtime environment of the package"),ci:be().default(!0).describe("An indicator specifying if the current environment is a CI environment"),workspaceRoot:x().trim().optional().describe("The root directory of the workspace"),packageDirectory:x().trim().optional().describe("The root directory of the package"),externalPackagePatterns:Ne(x()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),skipCache:be().default(!1).describe("Should all known types of workspace caching be skipped?"),cacheDirectory:x().trim().default("node_modules/.cache/storm").describe("The directory used to store the workspace's cached file data"),buildDirectory:x().trim().default("dist").describe("The build directory for the workspace"),runtimeDirectory:x().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),runtimeVersion:x().trim().regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/).default("1.0.0").describe("The global version of the Storm runtime"),packageManager:de(["npm","yarn","pnpm","bun"]).default("npm").describe("The package manager used by the repository"),timezone:x().trim().default("America/New_York").describe("The default timezone of the workspace"),locale:x().trim().default("en-US").describe("The default locale of the workspace"),logLevel:de(["silent","fatal","error","warn","info","debug","trace","all"]).default("debug").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),configFile:x().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),colors:je.describe("Storm theme config values used for styling various package elements"),extensions:Ee(Ze()).optional().default({}).describe("Configuration of each used extension")}).describe("Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo.");
1
+ var ye=Object.defineProperty;var Re=Object.getOwnPropertyDescriptor;var Ae=Object.getOwnPropertyNames;var Me=Object.prototype.hasOwnProperty;var $e=(r,e)=>{for(var t in e)ye(r,t,{get:e[t],enumerable:!0})},Ve=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ae(e))!Me.call(r,n)&&n!==t&&ye(r,n,{get:()=>e[n],enumerable:!(s=Re(e,n))||s.enumerable});return r};var Le=r=>Ve(ye({},"__esModule",{value:!0}),r);var Pt={};$e(Pt,{ColorConfigSchema:()=>Ie,StormConfigSchema:()=>Vt,defineConfig:()=>Lt});module.exports=Le(Pt);var x;(function(r){r.assertEqual=n=>n;function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{let a={};for(let i of n)a[i]=i;return a},r.getValidEnumValues=n=>{let a=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(let o of a)i[o]=n[o];return r.objectValues(i)},r.objectValues=n=>r.objectKeys(n).map(function(a){return n[a]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let a=[];for(let i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},r.find=(n,a)=>{for(let i of n)if(a(i))return i},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function s(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}r.joinValues=s,r.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(x||(x={}));var _e;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(_e||(_e={}));var u=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),A=r=>{switch(typeof r){case"undefined":return u.undefined;case"string":return u.string;case"number":return isNaN(r)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(r)?u.array:r===null?u.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?u.promise:typeof Map<"u"&&r instanceof Map?u.map:typeof Set<"u"&&r instanceof Set?u.set:typeof Date<"u"&&r instanceof Date?u.date:u.object;default:return u.unknown}},c=x.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Pe=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:"),T=class extends Error{constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(a){return a.message},s={_errors:[]},n=a=>{for(let i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let o=s,f=0;for(;f<i.path.length;){let d=i.path[f];f===i.path.length-1?(o[d]=o[d]||{_errors:[]},o[d]._errors.push(t(i))):o[d]=o[d]||{_errors:[]},o=o[d],f++}}};return n(this),s}toString(){return this.message}get message(){return JSON.stringify(this.issues,x.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t={},s=[];for(let n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}};T.create=r=>new T(r);var ae=(r,e)=>{let t;switch(r.code){case c.invalid_type:r.received===u.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,x.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${x.joinValues(r.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${x.joinValues(r.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${x.joinValues(r.options)}, received '${r.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:x.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case c.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case c.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,x.assertNever(r)}return{message:t}},Se=ae;function ze(r){Se=r}function de(){return Se}var ue=r=>{let{data:e,path:t,errorMaps:s,issueData:n}=r,a=[...t,...n.path||[]],i={...n,path:a},o="",f=s.filter(d=>!!d).slice().reverse();for(let d of f)o=d(i,{data:e,defaultError:o}).message;return{...n,path:a,message:n.message||o}},De=[];function l(r,e){let t=ue({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,de(),ae].filter(s=>!!s)});r.common.issues.push(t)}var b=class r{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let s=[];for(let n of t){if(n.status==="aborted")return m;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){let s=[];for(let n of t)s.push({key:await n.key,value:await n.value});return r.mergeObjectSync(e,s)}static mergeObjectSync(e,t){let s={};for(let n of t){let{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return m;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(s[a.value]=i.value)}return{status:e.value,value:s}}},m=Object.freeze({status:"aborted"}),Ce=r=>({status:"dirty",value:r}),k=r=>({status:"valid",value:r}),xe=r=>r.status==="aborted",be=r=>r.status==="dirty",ie=r=>r.status==="valid",le=r=>typeof Promise<"u"&&r instanceof Promise,h;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e?.message})(h||(h={}));var O=class{constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},we=(r,e)=>{if(ie(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new T(r.common.issues);return this._error=t,this._error}}};function g(r){if(!r)return{};let{errorMap:e,invalid_type_error:t,required_error:s,description:n}=r;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>i.code!=="invalid_type"?{message:o.defaultError}:typeof o.data>"u"?{message:s??o.defaultError}:{message:t??o.defaultError},description:n}}var y=class{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)}get description(){return this._def.description}_getType(e){return A(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:A(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new b,ctx:{common:e.parent.common,data:e.data,parsedType:A(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(le(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;let n={common:{issues:[],async:(s=t?.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:A(e)},a=this._parseSync({data:e,path:n.path,parent:n});return we(n,a)}async parseAsync(e,t){let s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){let s={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:A(e)},n=this._parse({data:e,path:s.path,parent:s}),a=await(le(n)?n:Promise.resolve(n));return we(s,a)}refine(e,t){let s=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{let i=e(n),o=()=>a.addIssue({code:c.custom,...s(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(f=>f?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof t=="function"?t(s,n):t),!1))}_refinement(e){return new S({schema:this,typeName:p.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Z.create(this,this._def)}nullable(){return R.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return I.create(this,this._def)}promise(){return V.create(this,this._def)}or(e){return W.create([this,e],this._def)}and(e){return q.create(this,e,this._def)}transform(e){return new S({...g(this._def),schema:this,typeName:p.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new X({...g(this._def),innerType:this,defaultValue:t,typeName:p.ZodDefault})}brand(){return new me({typeName:p.ZodBranded,type:this,...g(this._def)})}catch(e){let t=typeof e=="function"?e:()=>e;return new re({...g(this._def),innerType:this,catchValue:t,typeName:p.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return oe.create(this,e)}readonly(){return ne.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Ue=/^c[^\s-]{8,}$/i,Be=/^[a-z][a-z0-9]*$/,We=/^[0-9A-HJKMNP-TV-Z]{26}$/,qe=/^[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,Je=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ye="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",ve,He=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Ge=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Xe=r=>r.precision?r.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}Z$`):r.precision===0?r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function Qe(r,e){return!!((e==="v4"||!e)&&He.test(r)||(e==="v6"||!e)&&Ge.test(r))}var M=class r extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){let a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:u.string,received:a.parsedType}),m}let s=new b,n;for(let a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){let i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(n=this._getOrReturnCtx(e,n),i?l(n,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&l(n,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")Je.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"email",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")ve||(ve=new RegExp(Ye,"u")),ve.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"emoji",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")qe.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"uuid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")Ue.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")Be.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid2",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")We.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ulid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),l(n,{validation:"url",code:c.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"regex",code:c.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?Xe(a).test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="ip"?Qe(e.data,a.version)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ip",code:c.invalid_string,message:a.message}),s.dirty()):x.assertNever(a);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(n=>e.test(n),{validation:t,code:c.invalid_string,...h.errToObj(s)})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}datetime(e){var t;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(t=e?.offset)!==null&&t!==void 0?t:!1,...h.errToObj(e?.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...h.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new r({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};M.create=r=>{var e;return new M({checks:[],typeName:p.ZodString,coerce:(e=r?.coerce)!==null&&e!==void 0?e:!1,...g(r)})};function Ke(r,e){let t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,a=parseInt(r.toFixed(n).replace(".","")),i=parseInt(e.toFixed(n).replace(".",""));return a%i/Math.pow(10,n)}var L=class r extends y{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)!==u.number){let a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:u.number,received:a.parsedType}),m}let s,n=new b;for(let a of this._def.checks)a.kind==="int"?x.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:c.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?Ke(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:c.not_finite,message:a.message}),n.dirty()):x.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&x.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}};L.create=r=>new L({checks:[],typeName:p.ZodNumber,coerce:r?.coerce||!1,...g(r)});var P=class r extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==u.bigint){let a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:u.bigint,received:a.parsedType}),m}let s,n=new b;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):x.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};P.create=r=>{var e;return new P({checks:[],typeName:p.ZodBigInt,coerce:(e=r?.coerce)!==null&&e!==void 0?e:!1,...g(r)})};var z=class extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.boolean,received:s.parsedType}),m}return k(e.data)}};z.create=r=>new z({typeName:p.ZodBoolean,coerce:r?.coerce||!1,...g(r)});var D=class r extends y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){let a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:u.date,received:a.parsedType}),m}if(isNaN(e.data.getTime())){let a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_date}),m}let s=new b,n;for(let a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):x.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};D.create=r=>new D({checks:[],coerce:r?.coerce||!1,typeName:p.ZodDate,...g(r)});var K=class extends y{_parse(e){if(this._getType(e)!==u.symbol){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.symbol,received:s.parsedType}),m}return k(e.data)}};K.create=r=>new K({typeName:p.ZodSymbol,...g(r)});var U=class extends y{_parse(e){if(this._getType(e)!==u.undefined){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.undefined,received:s.parsedType}),m}return k(e.data)}};U.create=r=>new U({typeName:p.ZodUndefined,...g(r)});var B=class extends y{_parse(e){if(this._getType(e)!==u.null){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.null,received:s.parsedType}),m}return k(e.data)}};B.create=r=>new B({typeName:p.ZodNull,...g(r)});var $=class extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return k(e.data)}};$.create=r=>new $({typeName:p.ZodAny,...g(r)});var j=class extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return k(e.data)}};j.create=r=>new j({typeName:p.ZodUnknown,...g(r)});var N=class extends y{_parse(e){let t=this._getOrReturnCtx(e);return l(t,{code:c.invalid_type,expected:u.never,received:t.parsedType}),m}};N.create=r=>new N({typeName:p.ZodNever,...g(r)});var F=class extends y{_parse(e){if(this._getType(e)!==u.undefined){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.void,received:s.parsedType}),m}return k(e.data)}};F.create=r=>new F({typeName:p.ZodVoid,...g(r)});var I=class r extends y{_parse(e){let{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==u.array)return l(t,{code:c.invalid_type,expected:u.array,received:t.parsedType}),m;if(n.exactLength!==null){let i=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(i||o)&&(l(t,{code:i?c.too_big:c.too_small,minimum:o?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(l(t,{code:c.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(l(t,{code:c.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new O(t,i,t.path,o)))).then(i=>b.mergeArray(s,i));let a=[...t.data].map((i,o)=>n.type._parseSync(new O(t,i,t.path,o)));return b.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new r({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new r({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new r({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}};I.create=(r,e)=>new I({type:r,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,...g(e)});function Q(r){if(r instanceof w){let e={};for(let t in r.shape){let s=r.shape[t];e[t]=Z.create(Q(s))}return new w({...r._def,shape:()=>e})}else return r instanceof I?new I({...r._def,type:Q(r.element)}):r instanceof Z?Z.create(Q(r.unwrap())):r instanceof R?R.create(Q(r.unwrap())):r instanceof E?E.create(r.items.map(e=>Q(e))):r}var w=class r extends y{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=x.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==u.object){let d=this._getOrReturnCtx(e);return l(d,{code:c.invalid_type,expected:u.object,received:d.parsedType}),m}let{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof N&&this._def.unknownKeys==="strip"))for(let d in n.data)i.includes(d)||o.push(d);let f=[];for(let d of i){let _=a[d],C=n.data[d];f.push({key:{status:"valid",value:d},value:_._parse(new O(n,C,n.path,d)),alwaysSet:d in n.data})}if(this._def.catchall instanceof N){let d=this._def.unknownKeys;if(d==="passthrough")for(let _ of o)f.push({key:{status:"valid",value:_},value:{status:"valid",value:n.data[_]}});else if(d==="strict")o.length>0&&(l(n,{code:c.unrecognized_keys,keys:o}),s.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let d=this._def.catchall;for(let _ of o){let C=n.data[_];f.push({key:{status:"valid",value:_},value:d._parse(new O(n,C,n.path,_)),alwaysSet:_ in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let d=[];for(let _ of f){let C=await _.key;d.push({key:C,value:await _.value,alwaysSet:_.alwaysSet})}return d}).then(d=>b.mergeObjectSync(s,d)):b.mergeObjectSync(s,f)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new r({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,a,i,o;let f=(i=(a=(n=this._def).errorMap)===null||a===void 0?void 0:a.call(n,t,s).message)!==null&&i!==void 0?i:s.defaultError;return t.code==="unrecognized_keys"?{message:(o=h.errToObj(e).message)!==null&&o!==void 0?o:f}:{message:f}}}:{}})}strip(){return new r({...this._def,unknownKeys:"strip"})}passthrough(){return new r({...this._def,unknownKeys:"passthrough"})}extend(e){return new r({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new r({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:p.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new r({...this._def,catchall:e})}pick(e){let t={};return x.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])}),new r({...this._def,shape:()=>t})}omit(e){let t={};return x.objectKeys(this.shape).forEach(s=>{e[s]||(t[s]=this.shape[s])}),new r({...this._def,shape:()=>t})}deepPartial(){return Q(this)}partial(e){let t={};return x.objectKeys(this.shape).forEach(s=>{let n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()}),new r({...this._def,shape:()=>t})}required(e){let t={};return x.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof Z;)a=a._def.innerType;t[s]=a}}),new r({...this._def,shape:()=>t})}keyof(){return Oe(x.objectKeys(this.shape))}};w.create=(r,e)=>new w({shape:()=>r,unknownKeys:"strip",catchall:N.create(),typeName:p.ZodObject,...g(e)});w.strictCreate=(r,e)=>new w({shape:()=>r,unknownKeys:"strict",catchall:N.create(),typeName:p.ZodObject,...g(e)});w.lazycreate=(r,e)=>new w({shape:r,unknownKeys:"strip",catchall:N.create(),typeName:p.ZodObject,...g(e)});var W=class extends y{_parse(e){let{ctx:t}=this._processInputParams(e),s=this._def.options;function n(a){for(let o of a)if(o.result.status==="valid")return o.result;for(let o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;let i=a.map(o=>new T(o.ctx.common.issues));return l(t,{code:c.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(s.map(async a=>{let i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a,i=[];for(let f of s){let d={...t,common:{...t.common,issues:[]},parent:null},_=f._parseSync({data:t.data,path:t.path,parent:d});if(_.status==="valid")return _;_.status==="dirty"&&!a&&(a={result:_,ctx:d}),d.common.issues.length&&i.push(d.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(f=>new T(f));return l(t,{code:c.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}};W.create=(r,e)=>new W({options:r,typeName:p.ZodUnion,...g(e)});var ce=r=>r instanceof J?ce(r.schema):r instanceof S?ce(r.innerType()):r instanceof Y?[r.value]:r instanceof H?r.options:r instanceof G?Object.keys(r.enum):r instanceof X?ce(r._def.innerType):r instanceof U?[void 0]:r instanceof B?[null]:null,fe=class r extends y{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return l(t,{code:c.invalid_type,expected:u.object,received:t.parsedType}),m;let s=this.discriminator,n=t.data[s],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(l(t,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){let n=new Map;for(let a of t){let i=ce(a.shape[e]);if(!i)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of i){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new r({typeName:p.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...g(s)})}};function ke(r,e){let t=A(r),s=A(e);if(r===e)return{valid:!0,data:r};if(t===u.object&&s===u.object){let n=x.objectKeys(e),a=x.objectKeys(r).filter(o=>n.indexOf(o)!==-1),i={...r,...e};for(let o of a){let f=ke(r[o],e[o]);if(!f.valid)return{valid:!1};i[o]=f.data}return{valid:!0,data:i}}else if(t===u.array&&s===u.array){if(r.length!==e.length)return{valid:!1};let n=[];for(let a=0;a<r.length;a++){let i=r[a],o=e[a],f=ke(i,o);if(!f.valid)return{valid:!1};n.push(f.data)}return{valid:!0,data:n}}else return t===u.date&&s===u.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}var q=class extends y{_parse(e){let{status:t,ctx:s}=this._processInputParams(e),n=(a,i)=>{if(xe(a)||xe(i))return m;let o=ke(a.value,i.value);return o.valid?((be(a)||be(i))&&t.dirty(),{status:t.value,value:o.data}):(l(s,{code:c.invalid_intersection_types}),m)};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(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}};q.create=(r,e,t)=>new q({left:r,right:e,typeName:p.ZodIntersection,...g(t)});var E=class r extends y{_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.array)return l(s,{code:c.invalid_type,expected:u.array,received:s.parsedType}),m;if(s.data.length<this._def.items.length)return l(s,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&s.data.length>this._def.items.length&&(l(s,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let a=[...s.data].map((i,o)=>{let f=this._def.items[o]||this._def.rest;return f?f._parse(new O(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>b.mergeArray(t,i)):b.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new r({...this._def,rest:e})}};E.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new E({items:r,typeName:p.ZodTuple,rest:null,...g(e)})};var he=class r extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.object)return l(s,{code:c.invalid_type,expected:u.object,received:s.parsedType}),m;let n=[],a=this._def.keyType,i=this._def.valueType;for(let o in s.data)n.push({key:a._parse(new O(s,o,s.path,o)),value:i._parse(new O(s,s.data[o],s.path,o))});return s.common.async?b.mergeObjectAsync(t,n):b.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof y?new r({keyType:e,valueType:t,typeName:p.ZodRecord,...g(s)}):new r({keyType:M.create(),valueType:e,typeName:p.ZodRecord,...g(t)})}},ee=class extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.map)return l(s,{code:c.invalid_type,expected:u.map,received:s.parsedType}),m;let n=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([o,f],d)=>({key:n._parse(new O(s,o,s.path,[d,"key"])),value:a._parse(new O(s,f,s.path,[d,"value"]))}));if(s.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let f of i){let d=await f.key,_=await f.value;if(d.status==="aborted"||_.status==="aborted")return m;(d.status==="dirty"||_.status==="dirty")&&t.dirty(),o.set(d.value,_.value)}return{status:t.value,value:o}})}else{let o=new Map;for(let f of i){let d=f.key,_=f.value;if(d.status==="aborted"||_.status==="aborted")return m;(d.status==="dirty"||_.status==="dirty")&&t.dirty(),o.set(d.value,_.value)}return{status:t.value,value:o}}}};ee.create=(r,e,t)=>new ee({valueType:e,keyType:r,typeName:p.ZodMap,...g(t)});var te=class r extends y{_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.set)return l(s,{code:c.invalid_type,expected:u.set,received:s.parsedType}),m;let n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(l(s,{code:c.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(l(s,{code:c.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let a=this._def.valueType;function i(f){let d=new Set;for(let _ of f){if(_.status==="aborted")return m;_.status==="dirty"&&t.dirty(),d.add(_.value)}return{status:t.value,value:d}}let o=[...s.data.values()].map((f,d)=>a._parse(new O(s,f,s.path,d)));return s.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new r({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new r({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};te.create=(r,e)=>new te({valueType:r,minSize:null,maxSize:null,typeName:p.ZodSet,...g(e)});var pe=class r extends y{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.function)return l(t,{code:c.invalid_type,expected:u.function,received:t.parsedType}),m;function s(o,f){return ue({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,de(),ae].filter(d=>!!d),issueData:{code:c.invalid_arguments,argumentsError:f}})}function n(o,f){return ue({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,de(),ae].filter(d=>!!d),issueData:{code:c.invalid_return_type,returnTypeError:f}})}let a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof V){let o=this;return k(async function(...f){let d=new T([]),_=await o._def.args.parseAsync(f,a).catch(ge=>{throw d.addIssue(s(f,ge)),d}),C=await Reflect.apply(i,this,_);return await o._def.returns._def.type.parseAsync(C,a).catch(ge=>{throw d.addIssue(n(C,ge)),d})})}else{let o=this;return k(function(...f){let d=o._def.args.safeParse(f,a);if(!d.success)throw new T([s(f,d.error)]);let _=Reflect.apply(i,this,d.data),C=o._def.returns.safeParse(_,a);if(!C.success)throw new T([n(_,C.error)]);return C.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new r({...this._def,args:E.create(e).rest(j.create())})}returns(e){return new r({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new r({args:e||E.create([]).rest(j.create()),returns:t||j.create(),typeName:p.ZodFunction,...g(s)})}},J=class extends y{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};J.create=(r,e)=>new J({getter:r,typeName:p.ZodLazy,...g(e)});var Y=class extends y{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return l(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}};Y.create=(r,e)=>new Y({value:r,typeName:p.ZodLiteral,...g(e)});function Oe(r,e){return new H({values:r,typeName:p.ZodEnum,...g(e)})}var H=class r extends y{_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),s=this._def.values;return l(t,{expected:x.joinValues(s),received:t.parsedType,code:c.invalid_type}),m}if(this._def.values.indexOf(e.data)===-1){let t=this._getOrReturnCtx(e),s=this._def.values;return l(t,{received:t.data,code:c.invalid_enum_value,options:s}),m}return k(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e){return r.create(e)}exclude(e){return r.create(this.options.filter(t=>!e.includes(t)))}};H.create=Oe;var G=class extends y{_parse(e){let t=x.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==u.string&&s.parsedType!==u.number){let n=x.objectValues(t);return l(s,{expected:x.joinValues(n),received:s.parsedType,code:c.invalid_type}),m}if(t.indexOf(e.data)===-1){let n=x.objectValues(t);return l(s,{received:s.data,code:c.invalid_enum_value,options:n}),m}return k(e.data)}get enum(){return this._def.values}};G.create=(r,e)=>new G({values:r,typeName:p.ZodNativeEnum,...g(e)});var V=class extends y{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return l(t,{code:c.invalid_type,expected:u.promise,received:t.parsedType}),m;let s=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return k(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}};V.create=(r,e)=>new V({type:r,typeName:p.ZodPromise,...g(e)});var S=class extends y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===p.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{l(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){let i=n.transform(s.data,a);return s.common.issues.length?{status:"dirty",value:s.data}:s.common.async?Promise.resolve(i).then(o=>this._def.schema._parseAsync({data:o,path:s.path,parent:s})):this._def.schema._parseSync({data:i,path:s.path,parent:s})}if(n.type==="refinement"){let i=o=>{let f=n.refinement(o,a);if(s.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){let o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){let i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!ie(i))return i;let o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>ie(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):i);x.assertNever(n)}};S.create=(r,e,t)=>new S({schema:r,typeName:p.ZodEffects,effect:e,...g(t)});S.createWithPreprocess=(r,e,t)=>new S({schema:e,effect:{type:"preprocess",transform:r},typeName:p.ZodEffects,...g(t)});var Z=class extends y{_parse(e){return this._getType(e)===u.undefined?k(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Z.create=(r,e)=>new Z({innerType:r,typeName:p.ZodOptional,...g(e)});var R=class extends y{_parse(e){return this._getType(e)===u.null?k(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};R.create=(r,e)=>new R({innerType:r,typeName:p.ZodNullable,...g(e)});var X=class extends y{_parse(e){let{ctx:t}=this._processInputParams(e),s=t.data;return t.parsedType===u.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};X.create=(r,e)=>new X({innerType:r,typeName:p.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...g(e)});var re=class extends y{_parse(e){let{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return le(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new T(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new T(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}};re.create=(r,e)=>new re({innerType:r,typeName:p.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...g(e)});var se=class extends y{_parse(e){if(this._getType(e)!==u.nan){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.nan,received:s.parsedType}),m}return{status:"valid",value:e.data}}};se.create=r=>new se({typeName:p.ZodNaN,...g(r)});var Fe=Symbol("zod_brand"),me=class extends y{_parse(e){let{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}},oe=class r extends y{_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),Ce(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{let n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,t){return new r({in:e,out:t,typeName:p.ZodPipeline})}},ne=class extends y{_parse(e){let t=this._def.innerType._parse(e);return ie(t)&&(t.value=Object.freeze(t.value)),t}};ne.create=(r,e)=>new ne({innerType:r,typeName:p.ZodReadonly,...g(e)});var Ze=(r,e={},t)=>r?$.create().superRefine((s,n)=>{var a,i;if(!r(s)){let o=typeof e=="function"?e(s):typeof e=="string"?{message:e}:e,f=(i=(a=o.fatal)!==null&&a!==void 0?a:t)!==null&&i!==void 0?i:!0,d=typeof o=="string"?{message:o}:o;n.addIssue({code:"custom",...d,fatal:f})}}):$.create(),et={object:w.lazycreate},p;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(p||(p={}));var tt=(r,e={message:`Input not instance of ${r.name}`})=>Ze(t=>t instanceof r,e),Ne=M.create,Ee=L.create,rt=se.create,st=P.create,je=z.create,nt=D.create,at=K.create,it=U.create,ot=B.create,ct=$.create,dt=j.create,ut=N.create,lt=F.create,ft=I.create,ht=w.create,pt=w.strictCreate,mt=W.create,gt=fe.create,yt=q.create,vt=E.create,_t=he.create,xt=ee.create,bt=te.create,kt=pe.create,wt=J.create,Tt=Y.create,St=H.create,Ct=G.create,Ot=V.create,Te=S.create,Zt=Z.create,Nt=R.create,Et=S.createWithPreprocess,jt=oe.create,It=()=>Ne().optional(),Rt=()=>Ee().optional(),At=()=>je().optional(),Mt={string:r=>M.create({...r,coerce:!0}),number:r=>L.create({...r,coerce:!0}),boolean:r=>z.create({...r,coerce:!0}),bigint:r=>P.create({...r,coerce:!0}),date:r=>D.create({...r,coerce:!0})},$t=m,v=Object.freeze({__proto__:null,defaultErrorMap:ae,setErrorMap:ze,getErrorMap:de,makeIssue:ue,EMPTY_PATH:De,addIssueToContext:l,ParseStatus:b,INVALID:m,DIRTY:Ce,OK:k,isAborted:xe,isDirty:be,isValid:ie,isAsync:le,get util(){return x},get objectUtil(){return _e},ZodParsedType:u,getParsedType:A,ZodType:y,ZodString:M,ZodNumber:L,ZodBigInt:P,ZodBoolean:z,ZodDate:D,ZodSymbol:K,ZodUndefined:U,ZodNull:B,ZodAny:$,ZodUnknown:j,ZodNever:N,ZodVoid:F,ZodArray:I,ZodObject:w,ZodUnion:W,ZodDiscriminatedUnion:fe,ZodIntersection:q,ZodTuple:E,ZodRecord:he,ZodMap:ee,ZodSet:te,ZodFunction:pe,ZodLazy:J,ZodLiteral:Y,ZodEnum:H,ZodNativeEnum:G,ZodPromise:V,ZodEffects:S,ZodTransformer:S,ZodOptional:Z,ZodNullable:R,ZodDefault:X,ZodCatch:re,ZodNaN:se,BRAND:Fe,ZodBranded:me,ZodPipeline:oe,ZodReadonly:ne,custom:Ze,Schema:y,ZodSchema:y,late:et,get ZodFirstPartyTypeKind(){return p},coerce:Mt,any:ct,array:ft,bigint:st,boolean:je,date:nt,discriminatedUnion:gt,effect:Te,enum:St,function:kt,instanceof:tt,intersection:yt,lazy:wt,literal:Tt,map:xt,nan:rt,nativeEnum:Ct,never:ut,null:ot,nullable:Nt,number:Ee,object:ht,oboolean:At,onumber:Rt,optional:Zt,ostring:It,pipeline:jt,preprocess:Et,promise:Ot,record:_t,set:bt,strictObject:pt,string:Ne,symbol:at,transformer:Te,tuple:vt,undefined:it,union:mt,unknown:dt,void:lt,NEVER:$t,ZodIssueCode:c,quotelessJson:Pe,ZodError:T});var Ie=v.object({primary:v.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The primary color of the workspace"),background:v.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d232a").describe("The background color of the workspace"),success:v.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace"),info:v.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The informational color of the workspace"),warning:v.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace"),error:v.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#990000").describe("The error color of the workspace"),fatal:v.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#7d1a1a").describe("The fatal color of the workspace")}).describe("Colors used for various workspace elements"),Vt=v.object({extends:v.string().trim().optional().describe("The path to a base JSON file to use as a configuration preset file"),name:v.string().trim().toLowerCase().optional().describe("The name of the package"),namespace:v.string().trim().toLowerCase().optional().describe("The namespace of the package"),organization:v.string().trim().default("storm-software").describe("The organization of the workspace"),repository:v.string().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),license:v.string().trim().default("Apache License 2.0").describe("The root directory of the package"),homepage:v.string().trim().url().default("https://stormsoftware.org").describe("The homepage of the workspace"),branch:v.string().trim().default("main").describe("The branch of the workspace"),preid:v.string().optional().describe("A tag specifying the version pre-release identifier"),owner:v.string().trim().default("@storm-software/development").describe("The owner of the package"),worker:v.string().trim().default("Stormie-Bot").describe("The worker of the package (this is the bot that will be used to perform various tasks)"),env:v.enum(["development","staging","production"]).default("production").describe("The current runtime environment of the package"),ci:v.boolean().default(!0).describe("An indicator specifying if the current environment is a CI environment"),workspaceRoot:v.string().trim().optional().describe("The root directory of the workspace"),packageDirectory:v.string().trim().optional().describe("The root directory of the package"),externalPackagePatterns:v.array(v.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),skipCache:v.boolean().default(!1).describe("Should all known types of workspace caching be skipped?"),cacheDirectory:v.string().trim().default("node_modules/.cache/storm").describe("The directory used to store the workspace's cached file data"),buildDirectory:v.string().trim().default("dist").describe("The build directory for the workspace"),runtimeDirectory:v.string().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),runtimeVersion:v.string().trim().regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/).default("1.0.0").describe("The global version of the Storm runtime"),packageManager:v.enum(["npm","yarn","pnpm","bun"]).default("npm").describe("The package manager used by the repository"),timezone:v.string().trim().default("America/New_York").describe("The default timezone of the workspace"),locale:v.string().trim().default("en-US").describe("The default locale of the workspace"),logLevel:v.enum(["silent","fatal","error","warn","info","debug","trace","all"]).default("debug").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),configFile:v.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),colors:Ie.describe("Storm theme config values used for styling various package elements"),extensions:v.record(v.any()).optional().default({}).describe("Configuration of each used extension")}).describe("Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo.");var Lt=r=>r;
package/index.js CHANGED
@@ -1 +1 @@
1
- var _;(function(r){r.assertEqual=n=>n;function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{let a={};for(let i of n)a[i]=i;return a},r.getValidEnumValues=n=>{let a=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(let o of a)i[o]=n[o];return r.objectValues(i)},r.objectValues=n=>r.objectKeys(n).map(function(a){return n[a]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let a=[];for(let i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},r.find=(n,a)=>{for(let i of n)if(a(i))return i},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function s(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}r.joinValues=s,r.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(_||(_={}));var ke;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(ke||(ke={}));var d=_.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),A=r=>{switch(typeof r){case"undefined":return d.undefined;case"string":return d.string;case"number":return isNaN(r)?d.nan:d.number;case"boolean":return d.boolean;case"function":return d.function;case"bigint":return d.bigint;case"symbol":return d.symbol;case"object":return Array.isArray(r)?d.array:r===null?d.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?d.promise:typeof Map<"u"&&r instanceof Map?d.map:typeof Set<"u"&&r instanceof Set?d.set:typeof Date<"u"&&r instanceof Date?d.date:d.object;default:return d.unknown}},c=_.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var S=class extends Error{constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(a){return a.message},s={_errors:[]},n=a=>{for(let i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let o=s,f=0;for(;f<i.path.length;){let u=i.path[f];f===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(t(i))):o[u]=o[u]||{_errors:[]},o=o[u],f++}}};return n(this),s}toString(){return this.message}get message(){return JSON.stringify(this.issues,_.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t={},s=[];for(let n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}};S.create=r=>new S(r);var ie=(r,e)=>{let t;switch(r.code){case c.invalid_type:r.received===d.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,_.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${_.joinValues(r.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${_.joinValues(r.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${_.joinValues(r.options)}, received '${r.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:_.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case c.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case c.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,_.assertNever(r)}return{message:t}},Ee=ie;function fe(){return Ee}var he=r=>{let{data:e,path:t,errorMaps:s,issueData:n}=r,a=[...t,...n.path||[]],i={...n,path:a},o="",f=s.filter(u=>!!u).slice().reverse();for(let u of f)o=u(i,{data:e,defaultError:o}).message;return{...n,path:a,message:n.message||o}};function l(r,e){let t=he({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,fe(),ie].filter(s=>!!s)});r.common.issues.push(t)}var b=class r{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let s=[];for(let n of t){if(n.status==="aborted")return y;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){let s=[];for(let n of t)s.push({key:await n.key,value:await n.value});return r.mergeObjectSync(e,s)}static mergeObjectSync(e,t){let s={};for(let n of t){let{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return y;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(s[a.value]=i.value)}return{status:e.value,value:s}}},y=Object.freeze({status:"aborted"}),je=r=>({status:"dirty",value:r}),k=r=>({status:"valid",value:r}),we=r=>r.status==="aborted",Te=r=>r.status==="dirty",oe=r=>r.status==="valid",pe=r=>typeof Promise<"u"&&r instanceof Promise,h;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e?.message})(h||(h={}));var C=class{constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Se=(r,e)=>{if(oe(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new S(r.common.issues);return this._error=t,this._error}}};function m(r){if(!r)return{};let{errorMap:e,invalid_type_error:t,required_error:s,description:n}=r;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>i.code!=="invalid_type"?{message:o.defaultError}:typeof o.data>"u"?{message:s??o.defaultError}:{message:t??o.defaultError},description:n}}var g=class{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)}get description(){return this._def.description}_getType(e){return A(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:A(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new b,ctx:{common:e.parent.common,data:e.data,parsedType:A(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(pe(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;let n={common:{issues:[],async:(s=t?.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:A(e)},a=this._parseSync({data:e,path:n.path,parent:n});return Se(n,a)}async parseAsync(e,t){let s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){let s={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:A(e)},n=this._parse({data:e,path:s.path,parent:s}),a=await(pe(n)?n:Promise.resolve(n));return Se(s,a)}refine(e,t){let s=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{let i=e(n),o=()=>a.addIssue({code:c.custom,...s(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(f=>f?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof t=="function"?t(s,n):t),!1))}_refinement(e){return new O({schema:this,typeName:p.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Z.create(this,this._def)}nullable(){return I.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return R.create(this,this._def)}promise(){return z.create(this,this._def)}or(e){return P.create([this,e],this._def)}and(e){return D.create(this,e,this._def)}transform(e){return new O({...m(this._def),schema:this,typeName:p.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new J({...m(this._def),innerType:this,defaultValue:t,typeName:p.ZodDefault})}brand(){return new _e({typeName:p.ZodBranded,type:this,...m(this._def)})}catch(e){let t=typeof e=="function"?e:()=>e;return new re({...m(this._def),innerType:this,catchValue:t,typeName:p.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ce.create(this,e)}readonly(){return ne.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Re=/^c[^\s-]{8,}$/i,Ie=/^[a-z][a-z0-9]*$/,Ae=/^[0-9A-HJKMNP-TV-Z]{26}$/,ze=/^[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,Me=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,$e="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",le,Ve=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Le=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Pe=r=>r.precision?r.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}Z$`):r.precision===0?r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function De(r,e){return!!((e==="v4"||!e)&&Ve.test(r)||(e==="v6"||!e)&&Le.test(r))}var $=class r extends g{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==d.string){let a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:d.string,received:a.parsedType}),y}let s=new b,n;for(let a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){let i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(n=this._getOrReturnCtx(e,n),i?l(n,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&l(n,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")Me.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"email",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")le||(le=new RegExp($e,"u")),le.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"emoji",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")ze.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"uuid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")Re.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")Ie.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid2",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")Ae.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ulid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),l(n,{validation:"url",code:c.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"regex",code:c.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?Pe(a).test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="ip"?De(e.data,a.version)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ip",code:c.invalid_string,message:a.message}),s.dirty()):_.assertNever(a);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(n=>e.test(n),{validation:t,code:c.invalid_string,...h.errToObj(s)})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}datetime(e){var t;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(t=e?.offset)!==null&&t!==void 0?t:!1,...h.errToObj(e?.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...h.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new r({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};$.create=r=>{var e;return new $({checks:[],typeName:p.ZodString,coerce:(e=r?.coerce)!==null&&e!==void 0?e:!1,...m(r)})};function Ue(r,e){let t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,a=parseInt(r.toFixed(n).replace(".","")),i=parseInt(e.toFixed(n).replace(".",""));return a%i/Math.pow(10,n)}var Y=class r extends g{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)!==d.number){let a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:d.number,received:a.parsedType}),y}let s,n=new b;for(let a of this._def.checks)a.kind==="int"?_.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:c.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?Ue(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:c.not_finite,message:a.message}),n.dirty()):_.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&_.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}};Y.create=r=>new Y({checks:[],typeName:p.ZodNumber,coerce:r?.coerce||!1,...m(r)});var H=class r extends g{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==d.bigint){let a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:d.bigint,received:a.parsedType}),y}let s,n=new b;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):_.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};H.create=r=>{var e;return new H({checks:[],typeName:p.ZodBigInt,coerce:(e=r?.coerce)!==null&&e!==void 0?e:!1,...m(r)})};var G=class extends g{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==d.boolean){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:d.boolean,received:s.parsedType}),y}return k(e.data)}};G.create=r=>new G({typeName:p.ZodBoolean,coerce:r?.coerce||!1,...m(r)});var X=class r extends g{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==d.date){let a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:d.date,received:a.parsedType}),y}if(isNaN(e.data.getTime())){let a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_date}),y}let s=new b,n;for(let a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):_.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};X.create=r=>new X({checks:[],coerce:r?.coerce||!1,typeName:p.ZodDate,...m(r)});var Q=class extends g{_parse(e){if(this._getType(e)!==d.symbol){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:d.symbol,received:s.parsedType}),y}return k(e.data)}};Q.create=r=>new Q({typeName:p.ZodSymbol,...m(r)});var V=class extends g{_parse(e){if(this._getType(e)!==d.undefined){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:d.undefined,received:s.parsedType}),y}return k(e.data)}};V.create=r=>new V({typeName:p.ZodUndefined,...m(r)});var L=class extends g{_parse(e){if(this._getType(e)!==d.null){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:d.null,received:s.parsedType}),y}return k(e.data)}};L.create=r=>new L({typeName:p.ZodNull,...m(r)});var K=class extends g{constructor(){super(...arguments),this._any=!0}_parse(e){return k(e.data)}};K.create=r=>new K({typeName:p.ZodAny,...m(r)});var j=class extends g{constructor(){super(...arguments),this._unknown=!0}_parse(e){return k(e.data)}};j.create=r=>new j({typeName:p.ZodUnknown,...m(r)});var N=class extends g{_parse(e){let t=this._getOrReturnCtx(e);return l(t,{code:c.invalid_type,expected:d.never,received:t.parsedType}),y}};N.create=r=>new N({typeName:p.ZodNever,...m(r)});var F=class extends g{_parse(e){if(this._getType(e)!==d.undefined){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:d.void,received:s.parsedType}),y}return k(e.data)}};F.create=r=>new F({typeName:p.ZodVoid,...m(r)});var R=class r extends g{_parse(e){let{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==d.array)return l(t,{code:c.invalid_type,expected:d.array,received:t.parsedType}),y;if(n.exactLength!==null){let i=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(i||o)&&(l(t,{code:i?c.too_big:c.too_small,minimum:o?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(l(t,{code:c.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(l(t,{code:c.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new C(t,i,t.path,o)))).then(i=>b.mergeArray(s,i));let a=[...t.data].map((i,o)=>n.type._parseSync(new C(t,i,t.path,o)));return b.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new r({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new r({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new r({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}};R.create=(r,e)=>new R({type:r,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,...m(e)});function M(r){if(r instanceof w){let e={};for(let t in r.shape){let s=r.shape[t];e[t]=Z.create(M(s))}return new w({...r._def,shape:()=>e})}else return r instanceof R?new R({...r._def,type:M(r.element)}):r instanceof Z?Z.create(M(r.unwrap())):r instanceof I?I.create(M(r.unwrap())):r instanceof E?E.create(r.items.map(e=>M(e))):r}var w=class r extends g{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=_.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==d.object){let u=this._getOrReturnCtx(e);return l(u,{code:c.invalid_type,expected:d.object,received:u.parsedType}),y}let{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof N&&this._def.unknownKeys==="strip"))for(let u in n.data)i.includes(u)||o.push(u);let f=[];for(let u of i){let v=a[u],T=n.data[u];f.push({key:{status:"valid",value:u},value:v._parse(new C(n,T,n.path,u)),alwaysSet:u in n.data})}if(this._def.catchall instanceof N){let u=this._def.unknownKeys;if(u==="passthrough")for(let v of o)f.push({key:{status:"valid",value:v},value:{status:"valid",value:n.data[v]}});else if(u==="strict")o.length>0&&(l(n,{code:c.unrecognized_keys,keys:o}),s.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let v of o){let T=n.data[v];f.push({key:{status:"valid",value:v},value:u._parse(new C(n,T,n.path,v)),alwaysSet:v in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let u=[];for(let v of f){let T=await v.key;u.push({key:T,value:await v.value,alwaysSet:v.alwaysSet})}return u}).then(u=>b.mergeObjectSync(s,u)):b.mergeObjectSync(s,f)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new r({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,a,i,o;let f=(i=(a=(n=this._def).errorMap)===null||a===void 0?void 0:a.call(n,t,s).message)!==null&&i!==void 0?i:s.defaultError;return t.code==="unrecognized_keys"?{message:(o=h.errToObj(e).message)!==null&&o!==void 0?o:f}:{message:f}}}:{}})}strip(){return new r({...this._def,unknownKeys:"strip"})}passthrough(){return new r({...this._def,unknownKeys:"passthrough"})}extend(e){return new r({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new r({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:p.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new r({...this._def,catchall:e})}pick(e){let t={};return _.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])}),new r({...this._def,shape:()=>t})}omit(e){let t={};return _.objectKeys(this.shape).forEach(s=>{e[s]||(t[s]=this.shape[s])}),new r({...this._def,shape:()=>t})}deepPartial(){return M(this)}partial(e){let t={};return _.objectKeys(this.shape).forEach(s=>{let n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()}),new r({...this._def,shape:()=>t})}required(e){let t={};return _.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof Z;)a=a._def.innerType;t[s]=a}}),new r({...this._def,shape:()=>t})}keyof(){return Ce(_.objectKeys(this.shape))}};w.create=(r,e)=>new w({shape:()=>r,unknownKeys:"strip",catchall:N.create(),typeName:p.ZodObject,...m(e)});w.strictCreate=(r,e)=>new w({shape:()=>r,unknownKeys:"strict",catchall:N.create(),typeName:p.ZodObject,...m(e)});w.lazycreate=(r,e)=>new w({shape:r,unknownKeys:"strip",catchall:N.create(),typeName:p.ZodObject,...m(e)});var P=class extends g{_parse(e){let{ctx:t}=this._processInputParams(e),s=this._def.options;function n(a){for(let o of a)if(o.result.status==="valid")return o.result;for(let o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;let i=a.map(o=>new S(o.ctx.common.issues));return l(t,{code:c.invalid_union,unionErrors:i}),y}if(t.common.async)return Promise.all(s.map(async a=>{let i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a,i=[];for(let f of s){let u={...t,common:{...t.common,issues:[]},parent:null},v=f._parseSync({data:t.data,path:t.path,parent:u});if(v.status==="valid")return v;v.status==="dirty"&&!a&&(a={result:v,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(f=>new S(f));return l(t,{code:c.invalid_union,unionErrors:o}),y}}get options(){return this._def.options}};P.create=(r,e)=>new P({options:r,typeName:p.ZodUnion,...m(e)});var ae=r=>r instanceof U?ae(r.schema):r instanceof O?ae(r.innerType()):r instanceof B?[r.value]:r instanceof W?r.options:r instanceof q?Object.keys(r.enum):r instanceof J?ae(r._def.innerType):r instanceof V?[void 0]:r instanceof L?[null]:null,me=class r extends g{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==d.object)return l(t,{code:c.invalid_type,expected:d.object,received:t.parsedType}),y;let s=this.discriminator,n=t.data[s],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(l(t,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),y)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){let n=new Map;for(let a of t){let i=ae(a.shape[e]);if(!i)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of i){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new r({typeName:p.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...m(s)})}};function ye(r,e){let t=A(r),s=A(e);if(r===e)return{valid:!0,data:r};if(t===d.object&&s===d.object){let n=_.objectKeys(e),a=_.objectKeys(r).filter(o=>n.indexOf(o)!==-1),i={...r,...e};for(let o of a){let f=ye(r[o],e[o]);if(!f.valid)return{valid:!1};i[o]=f.data}return{valid:!0,data:i}}else if(t===d.array&&s===d.array){if(r.length!==e.length)return{valid:!1};let n=[];for(let a=0;a<r.length;a++){let i=r[a],o=e[a],f=ye(i,o);if(!f.valid)return{valid:!1};n.push(f.data)}return{valid:!0,data:n}}else return t===d.date&&s===d.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}var D=class extends g{_parse(e){let{status:t,ctx:s}=this._processInputParams(e),n=(a,i)=>{if(we(a)||we(i))return y;let o=ye(a.value,i.value);return o.valid?((Te(a)||Te(i))&&t.dirty(),{status:t.value,value:o.data}):(l(s,{code:c.invalid_intersection_types}),y)};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(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}};D.create=(r,e,t)=>new D({left:r,right:e,typeName:p.ZodIntersection,...m(t)});var E=class r extends g{_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==d.array)return l(s,{code:c.invalid_type,expected:d.array,received:s.parsedType}),y;if(s.data.length<this._def.items.length)return l(s,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),y;!this._def.rest&&s.data.length>this._def.items.length&&(l(s,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let a=[...s.data].map((i,o)=>{let f=this._def.items[o]||this._def.rest;return f?f._parse(new C(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>b.mergeArray(t,i)):b.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new r({...this._def,rest:e})}};E.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new E({items:r,typeName:p.ZodTuple,rest:null,...m(e)})};var ge=class r extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==d.object)return l(s,{code:c.invalid_type,expected:d.object,received:s.parsedType}),y;let n=[],a=this._def.keyType,i=this._def.valueType;for(let o in s.data)n.push({key:a._parse(new C(s,o,s.path,o)),value:i._parse(new C(s,s.data[o],s.path,o))});return s.common.async?b.mergeObjectAsync(t,n):b.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof g?new r({keyType:e,valueType:t,typeName:p.ZodRecord,...m(s)}):new r({keyType:$.create(),valueType:e,typeName:p.ZodRecord,...m(t)})}},ee=class extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==d.map)return l(s,{code:c.invalid_type,expected:d.map,received:s.parsedType}),y;let n=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([o,f],u)=>({key:n._parse(new C(s,o,s.path,[u,"key"])),value:a._parse(new C(s,f,s.path,[u,"value"]))}));if(s.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let f of i){let u=await f.key,v=await f.value;if(u.status==="aborted"||v.status==="aborted")return y;(u.status==="dirty"||v.status==="dirty")&&t.dirty(),o.set(u.value,v.value)}return{status:t.value,value:o}})}else{let o=new Map;for(let f of i){let u=f.key,v=f.value;if(u.status==="aborted"||v.status==="aborted")return y;(u.status==="dirty"||v.status==="dirty")&&t.dirty(),o.set(u.value,v.value)}return{status:t.value,value:o}}}};ee.create=(r,e,t)=>new ee({valueType:e,keyType:r,typeName:p.ZodMap,...m(t)});var te=class r extends g{_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==d.set)return l(s,{code:c.invalid_type,expected:d.set,received:s.parsedType}),y;let n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(l(s,{code:c.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(l(s,{code:c.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let a=this._def.valueType;function i(f){let u=new Set;for(let v of f){if(v.status==="aborted")return y;v.status==="dirty"&&t.dirty(),u.add(v.value)}return{status:t.value,value:u}}let o=[...s.data.values()].map((f,u)=>a._parse(new C(s,f,s.path,u)));return s.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new r({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new r({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};te.create=(r,e)=>new te({valueType:r,minSize:null,maxSize:null,typeName:p.ZodSet,...m(e)});var ve=class r extends g{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==d.function)return l(t,{code:c.invalid_type,expected:d.function,received:t.parsedType}),y;function s(o,f){return he({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,fe(),ie].filter(u=>!!u),issueData:{code:c.invalid_arguments,argumentsError:f}})}function n(o,f){return he({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,fe(),ie].filter(u=>!!u),issueData:{code:c.invalid_return_type,returnTypeError:f}})}let a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof z){let o=this;return k(async function(...f){let u=new S([]),v=await o._def.args.parseAsync(f,a).catch(ue=>{throw u.addIssue(s(f,ue)),u}),T=await Reflect.apply(i,this,v);return await o._def.returns._def.type.parseAsync(T,a).catch(ue=>{throw u.addIssue(n(T,ue)),u})})}else{let o=this;return k(function(...f){let u=o._def.args.safeParse(f,a);if(!u.success)throw new S([s(f,u.error)]);let v=Reflect.apply(i,this,u.data),T=o._def.returns.safeParse(v,a);if(!T.success)throw new S([n(v,T.error)]);return T.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new r({...this._def,args:E.create(e).rest(j.create())})}returns(e){return new r({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new r({args:e||E.create([]).rest(j.create()),returns:t||j.create(),typeName:p.ZodFunction,...m(s)})}},U=class extends g{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};U.create=(r,e)=>new U({getter:r,typeName:p.ZodLazy,...m(e)});var B=class extends g{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return l(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),y}return{status:"valid",value:e.data}}get value(){return this._def.value}};B.create=(r,e)=>new B({value:r,typeName:p.ZodLiteral,...m(e)});function Ce(r,e){return new W({values:r,typeName:p.ZodEnum,...m(e)})}var W=class r extends g{_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),s=this._def.values;return l(t,{expected:_.joinValues(s),received:t.parsedType,code:c.invalid_type}),y}if(this._def.values.indexOf(e.data)===-1){let t=this._getOrReturnCtx(e),s=this._def.values;return l(t,{received:t.data,code:c.invalid_enum_value,options:s}),y}return k(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e){return r.create(e)}exclude(e){return r.create(this.options.filter(t=>!e.includes(t)))}};W.create=Ce;var q=class extends g{_parse(e){let t=_.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==d.string&&s.parsedType!==d.number){let n=_.objectValues(t);return l(s,{expected:_.joinValues(n),received:s.parsedType,code:c.invalid_type}),y}if(t.indexOf(e.data)===-1){let n=_.objectValues(t);return l(s,{received:s.data,code:c.invalid_enum_value,options:n}),y}return k(e.data)}get enum(){return this._def.values}};q.create=(r,e)=>new q({values:r,typeName:p.ZodNativeEnum,...m(e)});var z=class extends g{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==d.promise&&t.common.async===!1)return l(t,{code:c.invalid_type,expected:d.promise,received:t.parsedType}),y;let s=t.parsedType===d.promise?t.data:Promise.resolve(t.data);return k(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}};z.create=(r,e)=>new z({type:r,typeName:p.ZodPromise,...m(e)});var O=class extends g{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===p.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{l(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){let i=n.transform(s.data,a);return s.common.issues.length?{status:"dirty",value:s.data}:s.common.async?Promise.resolve(i).then(o=>this._def.schema._parseAsync({data:o,path:s.path,parent:s})):this._def.schema._parseSync({data:i,path:s.path,parent:s})}if(n.type==="refinement"){let i=o=>{let f=n.refinement(o,a);if(s.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){let o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?y:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?y:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){let i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!oe(i))return i;let o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>oe(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):i);_.assertNever(n)}};O.create=(r,e,t)=>new O({schema:r,typeName:p.ZodEffects,effect:e,...m(t)});O.createWithPreprocess=(r,e,t)=>new O({schema:e,effect:{type:"preprocess",transform:r},typeName:p.ZodEffects,...m(t)});var Z=class extends g{_parse(e){return this._getType(e)===d.undefined?k(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Z.create=(r,e)=>new Z({innerType:r,typeName:p.ZodOptional,...m(e)});var I=class extends g{_parse(e){return this._getType(e)===d.null?k(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};I.create=(r,e)=>new I({innerType:r,typeName:p.ZodNullable,...m(e)});var J=class extends g{_parse(e){let{ctx:t}=this._processInputParams(e),s=t.data;return t.parsedType===d.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};J.create=(r,e)=>new J({innerType:r,typeName:p.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...m(e)});var re=class extends g{_parse(e){let{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return pe(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new S(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new S(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}};re.create=(r,e)=>new re({innerType:r,typeName:p.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...m(e)});var se=class extends g{_parse(e){if(this._getType(e)!==d.nan){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:d.nan,received:s.parsedType}),y}return{status:"valid",value:e.data}}};se.create=r=>new se({typeName:p.ZodNaN,...m(r)});var Je=Symbol("zod_brand"),_e=class extends g{_parse(e){let{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}},ce=class r extends g{_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?y:a.status==="dirty"?(t.dirty(),je(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{let n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?y:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,t){return new r({in:e,out:t,typeName:p.ZodPipeline})}},ne=class extends g{_parse(e){let t=this._def.innerType._parse(e);return oe(t)&&(t.value=Object.freeze(t.value)),t}};ne.create=(r,e)=>new ne({innerType:r,typeName:p.ZodReadonly,...m(e)});var Ye={object:w.lazycreate},p;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(p||(p={}));var x=$.create,He=Y.create,Ge=se.create,Xe=H.create,xe=G.create,Qe=X.create,Ke=Q.create,Fe=V.create,et=L.create,Oe=K.create,tt=j.create,rt=N.create,st=F.create,Ze=R.create,be=w.create,nt=w.strictCreate,at=P.create,it=me.create,ot=D.create,ct=E.create,Ne=ge.create,dt=ee.create,ut=te.create,lt=ve.create,ft=U.create,ht=B.create,de=W.create,pt=q.create,mt=z.create,yt=O.create,gt=Z.create,vt=I.create,_t=O.createWithPreprocess,xt=ce.create;var We=be({primary:x().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The primary color of the workspace"),background:x().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d232a").describe("The background color of the workspace"),success:x().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace"),info:x().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The informational color of the workspace"),warning:x().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace"),error:x().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#990000").describe("The error color of the workspace"),fatal:x().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#7d1a1a").describe("The fatal color of the workspace")}).describe("Colors used for various workspace elements"),bt=be({name:x().trim().toLowerCase().optional().describe("The name of the package"),namespace:x().trim().toLowerCase().optional().describe("The namespace of the package"),organization:x().trim().default("storm-software").describe("The organization of the workspace"),repository:x().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),license:x().trim().default("Apache License 2.0").describe("The root directory of the package"),homepage:x().trim().url().default("https://stormsoftware.org").describe("The homepage of the workspace"),branch:x().trim().default("main").describe("The branch of the workspace"),preid:x().optional().describe("A tag specifying the version pre-release identifier"),owner:x().trim().default("@storm-software/development").describe("The owner of the package"),worker:x().trim().default("stormie-bot").describe("The worker of the package (this is the bot that will be used to perform various tasks)"),env:de(["development","staging","production"]).default("production").describe("The current runtime environment of the package"),ci:xe().default(!0).describe("An indicator specifying if the current environment is a CI environment"),workspaceRoot:x().trim().optional().describe("The root directory of the workspace"),packageDirectory:x().trim().optional().describe("The root directory of the package"),externalPackagePatterns:Ze(x()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),skipCache:xe().default(!1).describe("Should all known types of workspace caching be skipped?"),cacheDirectory:x().trim().default("node_modules/.cache/storm").describe("The directory used to store the workspace's cached file data"),buildDirectory:x().trim().default("dist").describe("The build directory for the workspace"),runtimeDirectory:x().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),runtimeVersion:x().trim().regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/).default("1.0.0").describe("The global version of the Storm runtime"),packageManager:de(["npm","yarn","pnpm","bun"]).default("npm").describe("The package manager used by the repository"),timezone:x().trim().default("America/New_York").describe("The default timezone of the workspace"),locale:x().trim().default("en-US").describe("The default locale of the workspace"),logLevel:de(["silent","fatal","error","warn","info","debug","trace","all"]).default("debug").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),configFile:x().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),colors:We.describe("Storm theme config values used for styling various package elements"),extensions:Ne(Oe()).optional().default({}).describe("Configuration of each used extension")}).describe("Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo.");export{We as ColorConfigSchema,bt as StormConfigSchema};
1
+ var x;(function(r){r.assertEqual=n=>n;function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{let a={};for(let i of n)a[i]=i;return a},r.getValidEnumValues=n=>{let a=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(let o of a)i[o]=n[o];return r.objectValues(i)},r.objectValues=n=>r.objectKeys(n).map(function(a){return n[a]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let a=[];for(let i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},r.find=(n,a)=>{for(let i of n)if(a(i))return i},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function s(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}r.joinValues=s,r.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(x||(x={}));var ve;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(ve||(ve={}));var u=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),A=r=>{switch(typeof r){case"undefined":return u.undefined;case"string":return u.string;case"number":return isNaN(r)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(r)?u.array:r===null?u.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?u.promise:typeof Map<"u"&&r instanceof Map?u.map:typeof Set<"u"&&r instanceof Set?u.set:typeof Date<"u"&&r instanceof Date?u.date:u.object;default:return u.unknown}},c=x.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),je=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:"),T=class extends Error{constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(a){return a.message},s={_errors:[]},n=a=>{for(let i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let o=s,f=0;for(;f<i.path.length;){let d=i.path[f];f===i.path.length-1?(o[d]=o[d]||{_errors:[]},o[d]._errors.push(t(i))):o[d]=o[d]||{_errors:[]},o=o[d],f++}}};return n(this),s}toString(){return this.message}get message(){return JSON.stringify(this.issues,x.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t={},s=[];for(let n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}};T.create=r=>new T(r);var ae=(r,e)=>{let t;switch(r.code){case c.invalid_type:r.received===u.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,x.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${x.joinValues(r.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${x.joinValues(r.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${x.joinValues(r.options)}, received '${r.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:x.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case c.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case c.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,x.assertNever(r)}return{message:t}},Te=ae;function Ie(r){Te=r}function de(){return Te}var ue=r=>{let{data:e,path:t,errorMaps:s,issueData:n}=r,a=[...t,...n.path||[]],i={...n,path:a},o="",f=s.filter(d=>!!d).slice().reverse();for(let d of f)o=d(i,{data:e,defaultError:o}).message;return{...n,path:a,message:n.message||o}},Re=[];function l(r,e){let t=ue({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,de(),ae].filter(s=>!!s)});r.common.issues.push(t)}var b=class r{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let s=[];for(let n of t){if(n.status==="aborted")return m;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){let s=[];for(let n of t)s.push({key:await n.key,value:await n.value});return r.mergeObjectSync(e,s)}static mergeObjectSync(e,t){let s={};for(let n of t){let{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return m;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(s[a.value]=i.value)}return{status:e.value,value:s}}},m=Object.freeze({status:"aborted"}),Se=r=>({status:"dirty",value:r}),k=r=>({status:"valid",value:r}),_e=r=>r.status==="aborted",xe=r=>r.status==="dirty",ie=r=>r.status==="valid",le=r=>typeof Promise<"u"&&r instanceof Promise,h;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e?.message})(h||(h={}));var O=class{constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},ke=(r,e)=>{if(ie(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new T(r.common.issues);return this._error=t,this._error}}};function g(r){if(!r)return{};let{errorMap:e,invalid_type_error:t,required_error:s,description:n}=r;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>i.code!=="invalid_type"?{message:o.defaultError}:typeof o.data>"u"?{message:s??o.defaultError}:{message:t??o.defaultError},description:n}}var y=class{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)}get description(){return this._def.description}_getType(e){return A(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:A(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new b,ctx:{common:e.parent.common,data:e.data,parsedType:A(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(le(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;let n={common:{issues:[],async:(s=t?.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:A(e)},a=this._parseSync({data:e,path:n.path,parent:n});return ke(n,a)}async parseAsync(e,t){let s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){let s={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:A(e)},n=this._parse({data:e,path:s.path,parent:s}),a=await(le(n)?n:Promise.resolve(n));return ke(s,a)}refine(e,t){let s=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{let i=e(n),o=()=>a.addIssue({code:c.custom,...s(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(f=>f?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof t=="function"?t(s,n):t),!1))}_refinement(e){return new S({schema:this,typeName:p.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Z.create(this,this._def)}nullable(){return R.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return I.create(this,this._def)}promise(){return V.create(this,this._def)}or(e){return W.create([this,e],this._def)}and(e){return q.create(this,e,this._def)}transform(e){return new S({...g(this._def),schema:this,typeName:p.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new X({...g(this._def),innerType:this,defaultValue:t,typeName:p.ZodDefault})}brand(){return new me({typeName:p.ZodBranded,type:this,...g(this._def)})}catch(e){let t=typeof e=="function"?e:()=>e;return new re({...g(this._def),innerType:this,catchValue:t,typeName:p.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return oe.create(this,e)}readonly(){return ne.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Ae=/^c[^\s-]{8,}$/i,Me=/^[a-z][a-z0-9]*$/,$e=/^[0-9A-HJKMNP-TV-Z]{26}$/,Ve=/^[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,Le=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Pe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",ye,ze=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,De=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Ue=r=>r.precision?r.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}Z$`):r.precision===0?r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function Be(r,e){return!!((e==="v4"||!e)&&ze.test(r)||(e==="v6"||!e)&&De.test(r))}var M=class r extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){let a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:u.string,received:a.parsedType}),m}let s=new b,n;for(let a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){let i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(n=this._getOrReturnCtx(e,n),i?l(n,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&l(n,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")Le.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"email",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")ye||(ye=new RegExp(Pe,"u")),ye.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"emoji",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")Ve.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"uuid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")Ae.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")Me.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid2",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")$e.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ulid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),l(n,{validation:"url",code:c.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"regex",code:c.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?Ue(a).test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="ip"?Be(e.data,a.version)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ip",code:c.invalid_string,message:a.message}),s.dirty()):x.assertNever(a);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(n=>e.test(n),{validation:t,code:c.invalid_string,...h.errToObj(s)})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}datetime(e){var t;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(t=e?.offset)!==null&&t!==void 0?t:!1,...h.errToObj(e?.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...h.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new r({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};M.create=r=>{var e;return new M({checks:[],typeName:p.ZodString,coerce:(e=r?.coerce)!==null&&e!==void 0?e:!1,...g(r)})};function We(r,e){let t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,a=parseInt(r.toFixed(n).replace(".","")),i=parseInt(e.toFixed(n).replace(".",""));return a%i/Math.pow(10,n)}var L=class r extends y{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)!==u.number){let a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:u.number,received:a.parsedType}),m}let s,n=new b;for(let a of this._def.checks)a.kind==="int"?x.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:c.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?We(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:c.not_finite,message:a.message}),n.dirty()):x.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&x.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}};L.create=r=>new L({checks:[],typeName:p.ZodNumber,coerce:r?.coerce||!1,...g(r)});var P=class r extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==u.bigint){let a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:u.bigint,received:a.parsedType}),m}let s,n=new b;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):x.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};P.create=r=>{var e;return new P({checks:[],typeName:p.ZodBigInt,coerce:(e=r?.coerce)!==null&&e!==void 0?e:!1,...g(r)})};var z=class extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.boolean,received:s.parsedType}),m}return k(e.data)}};z.create=r=>new z({typeName:p.ZodBoolean,coerce:r?.coerce||!1,...g(r)});var D=class r extends y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){let a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:u.date,received:a.parsedType}),m}if(isNaN(e.data.getTime())){let a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_date}),m}let s=new b,n;for(let a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):x.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};D.create=r=>new D({checks:[],coerce:r?.coerce||!1,typeName:p.ZodDate,...g(r)});var K=class extends y{_parse(e){if(this._getType(e)!==u.symbol){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.symbol,received:s.parsedType}),m}return k(e.data)}};K.create=r=>new K({typeName:p.ZodSymbol,...g(r)});var U=class extends y{_parse(e){if(this._getType(e)!==u.undefined){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.undefined,received:s.parsedType}),m}return k(e.data)}};U.create=r=>new U({typeName:p.ZodUndefined,...g(r)});var B=class extends y{_parse(e){if(this._getType(e)!==u.null){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.null,received:s.parsedType}),m}return k(e.data)}};B.create=r=>new B({typeName:p.ZodNull,...g(r)});var $=class extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return k(e.data)}};$.create=r=>new $({typeName:p.ZodAny,...g(r)});var j=class extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return k(e.data)}};j.create=r=>new j({typeName:p.ZodUnknown,...g(r)});var N=class extends y{_parse(e){let t=this._getOrReturnCtx(e);return l(t,{code:c.invalid_type,expected:u.never,received:t.parsedType}),m}};N.create=r=>new N({typeName:p.ZodNever,...g(r)});var F=class extends y{_parse(e){if(this._getType(e)!==u.undefined){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.void,received:s.parsedType}),m}return k(e.data)}};F.create=r=>new F({typeName:p.ZodVoid,...g(r)});var I=class r extends y{_parse(e){let{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==u.array)return l(t,{code:c.invalid_type,expected:u.array,received:t.parsedType}),m;if(n.exactLength!==null){let i=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(i||o)&&(l(t,{code:i?c.too_big:c.too_small,minimum:o?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(l(t,{code:c.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(l(t,{code:c.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new O(t,i,t.path,o)))).then(i=>b.mergeArray(s,i));let a=[...t.data].map((i,o)=>n.type._parseSync(new O(t,i,t.path,o)));return b.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new r({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new r({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new r({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}};I.create=(r,e)=>new I({type:r,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,...g(e)});function Q(r){if(r instanceof w){let e={};for(let t in r.shape){let s=r.shape[t];e[t]=Z.create(Q(s))}return new w({...r._def,shape:()=>e})}else return r instanceof I?new I({...r._def,type:Q(r.element)}):r instanceof Z?Z.create(Q(r.unwrap())):r instanceof R?R.create(Q(r.unwrap())):r instanceof E?E.create(r.items.map(e=>Q(e))):r}var w=class r extends y{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=x.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==u.object){let d=this._getOrReturnCtx(e);return l(d,{code:c.invalid_type,expected:u.object,received:d.parsedType}),m}let{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof N&&this._def.unknownKeys==="strip"))for(let d in n.data)i.includes(d)||o.push(d);let f=[];for(let d of i){let _=a[d],C=n.data[d];f.push({key:{status:"valid",value:d},value:_._parse(new O(n,C,n.path,d)),alwaysSet:d in n.data})}if(this._def.catchall instanceof N){let d=this._def.unknownKeys;if(d==="passthrough")for(let _ of o)f.push({key:{status:"valid",value:_},value:{status:"valid",value:n.data[_]}});else if(d==="strict")o.length>0&&(l(n,{code:c.unrecognized_keys,keys:o}),s.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let d=this._def.catchall;for(let _ of o){let C=n.data[_];f.push({key:{status:"valid",value:_},value:d._parse(new O(n,C,n.path,_)),alwaysSet:_ in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let d=[];for(let _ of f){let C=await _.key;d.push({key:C,value:await _.value,alwaysSet:_.alwaysSet})}return d}).then(d=>b.mergeObjectSync(s,d)):b.mergeObjectSync(s,f)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new r({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,a,i,o;let f=(i=(a=(n=this._def).errorMap)===null||a===void 0?void 0:a.call(n,t,s).message)!==null&&i!==void 0?i:s.defaultError;return t.code==="unrecognized_keys"?{message:(o=h.errToObj(e).message)!==null&&o!==void 0?o:f}:{message:f}}}:{}})}strip(){return new r({...this._def,unknownKeys:"strip"})}passthrough(){return new r({...this._def,unknownKeys:"passthrough"})}extend(e){return new r({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new r({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:p.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new r({...this._def,catchall:e})}pick(e){let t={};return x.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])}),new r({...this._def,shape:()=>t})}omit(e){let t={};return x.objectKeys(this.shape).forEach(s=>{e[s]||(t[s]=this.shape[s])}),new r({...this._def,shape:()=>t})}deepPartial(){return Q(this)}partial(e){let t={};return x.objectKeys(this.shape).forEach(s=>{let n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()}),new r({...this._def,shape:()=>t})}required(e){let t={};return x.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof Z;)a=a._def.innerType;t[s]=a}}),new r({...this._def,shape:()=>t})}keyof(){return Ce(x.objectKeys(this.shape))}};w.create=(r,e)=>new w({shape:()=>r,unknownKeys:"strip",catchall:N.create(),typeName:p.ZodObject,...g(e)});w.strictCreate=(r,e)=>new w({shape:()=>r,unknownKeys:"strict",catchall:N.create(),typeName:p.ZodObject,...g(e)});w.lazycreate=(r,e)=>new w({shape:r,unknownKeys:"strip",catchall:N.create(),typeName:p.ZodObject,...g(e)});var W=class extends y{_parse(e){let{ctx:t}=this._processInputParams(e),s=this._def.options;function n(a){for(let o of a)if(o.result.status==="valid")return o.result;for(let o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;let i=a.map(o=>new T(o.ctx.common.issues));return l(t,{code:c.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(s.map(async a=>{let i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a,i=[];for(let f of s){let d={...t,common:{...t.common,issues:[]},parent:null},_=f._parseSync({data:t.data,path:t.path,parent:d});if(_.status==="valid")return _;_.status==="dirty"&&!a&&(a={result:_,ctx:d}),d.common.issues.length&&i.push(d.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(f=>new T(f));return l(t,{code:c.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}};W.create=(r,e)=>new W({options:r,typeName:p.ZodUnion,...g(e)});var ce=r=>r instanceof J?ce(r.schema):r instanceof S?ce(r.innerType()):r instanceof Y?[r.value]:r instanceof H?r.options:r instanceof G?Object.keys(r.enum):r instanceof X?ce(r._def.innerType):r instanceof U?[void 0]:r instanceof B?[null]:null,fe=class r extends y{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return l(t,{code:c.invalid_type,expected:u.object,received:t.parsedType}),m;let s=this.discriminator,n=t.data[s],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(l(t,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){let n=new Map;for(let a of t){let i=ce(a.shape[e]);if(!i)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of i){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new r({typeName:p.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...g(s)})}};function be(r,e){let t=A(r),s=A(e);if(r===e)return{valid:!0,data:r};if(t===u.object&&s===u.object){let n=x.objectKeys(e),a=x.objectKeys(r).filter(o=>n.indexOf(o)!==-1),i={...r,...e};for(let o of a){let f=be(r[o],e[o]);if(!f.valid)return{valid:!1};i[o]=f.data}return{valid:!0,data:i}}else if(t===u.array&&s===u.array){if(r.length!==e.length)return{valid:!1};let n=[];for(let a=0;a<r.length;a++){let i=r[a],o=e[a],f=be(i,o);if(!f.valid)return{valid:!1};n.push(f.data)}return{valid:!0,data:n}}else return t===u.date&&s===u.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}var q=class extends y{_parse(e){let{status:t,ctx:s}=this._processInputParams(e),n=(a,i)=>{if(_e(a)||_e(i))return m;let o=be(a.value,i.value);return o.valid?((xe(a)||xe(i))&&t.dirty(),{status:t.value,value:o.data}):(l(s,{code:c.invalid_intersection_types}),m)};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(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}};q.create=(r,e,t)=>new q({left:r,right:e,typeName:p.ZodIntersection,...g(t)});var E=class r extends y{_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.array)return l(s,{code:c.invalid_type,expected:u.array,received:s.parsedType}),m;if(s.data.length<this._def.items.length)return l(s,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&s.data.length>this._def.items.length&&(l(s,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let a=[...s.data].map((i,o)=>{let f=this._def.items[o]||this._def.rest;return f?f._parse(new O(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>b.mergeArray(t,i)):b.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new r({...this._def,rest:e})}};E.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new E({items:r,typeName:p.ZodTuple,rest:null,...g(e)})};var he=class r extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.object)return l(s,{code:c.invalid_type,expected:u.object,received:s.parsedType}),m;let n=[],a=this._def.keyType,i=this._def.valueType;for(let o in s.data)n.push({key:a._parse(new O(s,o,s.path,o)),value:i._parse(new O(s,s.data[o],s.path,o))});return s.common.async?b.mergeObjectAsync(t,n):b.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof y?new r({keyType:e,valueType:t,typeName:p.ZodRecord,...g(s)}):new r({keyType:M.create(),valueType:e,typeName:p.ZodRecord,...g(t)})}},ee=class extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.map)return l(s,{code:c.invalid_type,expected:u.map,received:s.parsedType}),m;let n=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([o,f],d)=>({key:n._parse(new O(s,o,s.path,[d,"key"])),value:a._parse(new O(s,f,s.path,[d,"value"]))}));if(s.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let f of i){let d=await f.key,_=await f.value;if(d.status==="aborted"||_.status==="aborted")return m;(d.status==="dirty"||_.status==="dirty")&&t.dirty(),o.set(d.value,_.value)}return{status:t.value,value:o}})}else{let o=new Map;for(let f of i){let d=f.key,_=f.value;if(d.status==="aborted"||_.status==="aborted")return m;(d.status==="dirty"||_.status==="dirty")&&t.dirty(),o.set(d.value,_.value)}return{status:t.value,value:o}}}};ee.create=(r,e,t)=>new ee({valueType:e,keyType:r,typeName:p.ZodMap,...g(t)});var te=class r extends y{_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.set)return l(s,{code:c.invalid_type,expected:u.set,received:s.parsedType}),m;let n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(l(s,{code:c.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(l(s,{code:c.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let a=this._def.valueType;function i(f){let d=new Set;for(let _ of f){if(_.status==="aborted")return m;_.status==="dirty"&&t.dirty(),d.add(_.value)}return{status:t.value,value:d}}let o=[...s.data.values()].map((f,d)=>a._parse(new O(s,f,s.path,d)));return s.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new r({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new r({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};te.create=(r,e)=>new te({valueType:r,minSize:null,maxSize:null,typeName:p.ZodSet,...g(e)});var pe=class r extends y{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.function)return l(t,{code:c.invalid_type,expected:u.function,received:t.parsedType}),m;function s(o,f){return ue({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,de(),ae].filter(d=>!!d),issueData:{code:c.invalid_arguments,argumentsError:f}})}function n(o,f){return ue({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,de(),ae].filter(d=>!!d),issueData:{code:c.invalid_return_type,returnTypeError:f}})}let a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof V){let o=this;return k(async function(...f){let d=new T([]),_=await o._def.args.parseAsync(f,a).catch(ge=>{throw d.addIssue(s(f,ge)),d}),C=await Reflect.apply(i,this,_);return await o._def.returns._def.type.parseAsync(C,a).catch(ge=>{throw d.addIssue(n(C,ge)),d})})}else{let o=this;return k(function(...f){let d=o._def.args.safeParse(f,a);if(!d.success)throw new T([s(f,d.error)]);let _=Reflect.apply(i,this,d.data),C=o._def.returns.safeParse(_,a);if(!C.success)throw new T([n(_,C.error)]);return C.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new r({...this._def,args:E.create(e).rest(j.create())})}returns(e){return new r({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new r({args:e||E.create([]).rest(j.create()),returns:t||j.create(),typeName:p.ZodFunction,...g(s)})}},J=class extends y{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};J.create=(r,e)=>new J({getter:r,typeName:p.ZodLazy,...g(e)});var Y=class extends y{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return l(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}};Y.create=(r,e)=>new Y({value:r,typeName:p.ZodLiteral,...g(e)});function Ce(r,e){return new H({values:r,typeName:p.ZodEnum,...g(e)})}var H=class r extends y{_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),s=this._def.values;return l(t,{expected:x.joinValues(s),received:t.parsedType,code:c.invalid_type}),m}if(this._def.values.indexOf(e.data)===-1){let t=this._getOrReturnCtx(e),s=this._def.values;return l(t,{received:t.data,code:c.invalid_enum_value,options:s}),m}return k(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e){return r.create(e)}exclude(e){return r.create(this.options.filter(t=>!e.includes(t)))}};H.create=Ce;var G=class extends y{_parse(e){let t=x.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==u.string&&s.parsedType!==u.number){let n=x.objectValues(t);return l(s,{expected:x.joinValues(n),received:s.parsedType,code:c.invalid_type}),m}if(t.indexOf(e.data)===-1){let n=x.objectValues(t);return l(s,{received:s.data,code:c.invalid_enum_value,options:n}),m}return k(e.data)}get enum(){return this._def.values}};G.create=(r,e)=>new G({values:r,typeName:p.ZodNativeEnum,...g(e)});var V=class extends y{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return l(t,{code:c.invalid_type,expected:u.promise,received:t.parsedType}),m;let s=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return k(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}};V.create=(r,e)=>new V({type:r,typeName:p.ZodPromise,...g(e)});var S=class extends y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===p.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{l(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){let i=n.transform(s.data,a);return s.common.issues.length?{status:"dirty",value:s.data}:s.common.async?Promise.resolve(i).then(o=>this._def.schema._parseAsync({data:o,path:s.path,parent:s})):this._def.schema._parseSync({data:i,path:s.path,parent:s})}if(n.type==="refinement"){let i=o=>{let f=n.refinement(o,a);if(s.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){let o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){let i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!ie(i))return i;let o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>ie(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):i);x.assertNever(n)}};S.create=(r,e,t)=>new S({schema:r,typeName:p.ZodEffects,effect:e,...g(t)});S.createWithPreprocess=(r,e,t)=>new S({schema:e,effect:{type:"preprocess",transform:r},typeName:p.ZodEffects,...g(t)});var Z=class extends y{_parse(e){return this._getType(e)===u.undefined?k(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Z.create=(r,e)=>new Z({innerType:r,typeName:p.ZodOptional,...g(e)});var R=class extends y{_parse(e){return this._getType(e)===u.null?k(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};R.create=(r,e)=>new R({innerType:r,typeName:p.ZodNullable,...g(e)});var X=class extends y{_parse(e){let{ctx:t}=this._processInputParams(e),s=t.data;return t.parsedType===u.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};X.create=(r,e)=>new X({innerType:r,typeName:p.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...g(e)});var re=class extends y{_parse(e){let{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return le(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new T(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new T(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}};re.create=(r,e)=>new re({innerType:r,typeName:p.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...g(e)});var se=class extends y{_parse(e){if(this._getType(e)!==u.nan){let s=this._getOrReturnCtx(e);return l(s,{code:c.invalid_type,expected:u.nan,received:s.parsedType}),m}return{status:"valid",value:e.data}}};se.create=r=>new se({typeName:p.ZodNaN,...g(r)});var qe=Symbol("zod_brand"),me=class extends y{_parse(e){let{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}},oe=class r extends y{_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),Se(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{let n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,t){return new r({in:e,out:t,typeName:p.ZodPipeline})}},ne=class extends y{_parse(e){let t=this._def.innerType._parse(e);return ie(t)&&(t.value=Object.freeze(t.value)),t}};ne.create=(r,e)=>new ne({innerType:r,typeName:p.ZodReadonly,...g(e)});var Oe=(r,e={},t)=>r?$.create().superRefine((s,n)=>{var a,i;if(!r(s)){let o=typeof e=="function"?e(s):typeof e=="string"?{message:e}:e,f=(i=(a=o.fatal)!==null&&a!==void 0?a:t)!==null&&i!==void 0?i:!0,d=typeof o=="string"?{message:o}:o;n.addIssue({code:"custom",...d,fatal:f})}}):$.create(),Je={object:w.lazycreate},p;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(p||(p={}));var Ye=(r,e={message:`Input not instance of ${r.name}`})=>Oe(t=>t instanceof r,e),Ze=M.create,Ne=L.create,He=se.create,Ge=P.create,Ee=z.create,Xe=D.create,Qe=K.create,Ke=U.create,Fe=B.create,et=$.create,tt=j.create,rt=N.create,st=F.create,nt=I.create,at=w.create,it=w.strictCreate,ot=W.create,ct=fe.create,dt=q.create,ut=E.create,lt=he.create,ft=ee.create,ht=te.create,pt=pe.create,mt=J.create,gt=Y.create,yt=H.create,vt=G.create,_t=V.create,we=S.create,xt=Z.create,bt=R.create,kt=S.createWithPreprocess,wt=oe.create,Tt=()=>Ze().optional(),St=()=>Ne().optional(),Ct=()=>Ee().optional(),Ot={string:r=>M.create({...r,coerce:!0}),number:r=>L.create({...r,coerce:!0}),boolean:r=>z.create({...r,coerce:!0}),bigint:r=>P.create({...r,coerce:!0}),date:r=>D.create({...r,coerce:!0})},Zt=m,v=Object.freeze({__proto__:null,defaultErrorMap:ae,setErrorMap:Ie,getErrorMap:de,makeIssue:ue,EMPTY_PATH:Re,addIssueToContext:l,ParseStatus:b,INVALID:m,DIRTY:Se,OK:k,isAborted:_e,isDirty:xe,isValid:ie,isAsync:le,get util(){return x},get objectUtil(){return ve},ZodParsedType:u,getParsedType:A,ZodType:y,ZodString:M,ZodNumber:L,ZodBigInt:P,ZodBoolean:z,ZodDate:D,ZodSymbol:K,ZodUndefined:U,ZodNull:B,ZodAny:$,ZodUnknown:j,ZodNever:N,ZodVoid:F,ZodArray:I,ZodObject:w,ZodUnion:W,ZodDiscriminatedUnion:fe,ZodIntersection:q,ZodTuple:E,ZodRecord:he,ZodMap:ee,ZodSet:te,ZodFunction:pe,ZodLazy:J,ZodLiteral:Y,ZodEnum:H,ZodNativeEnum:G,ZodPromise:V,ZodEffects:S,ZodTransformer:S,ZodOptional:Z,ZodNullable:R,ZodDefault:X,ZodCatch:re,ZodNaN:se,BRAND:qe,ZodBranded:me,ZodPipeline:oe,ZodReadonly:ne,custom:Oe,Schema:y,ZodSchema:y,late:Je,get ZodFirstPartyTypeKind(){return p},coerce:Ot,any:et,array:nt,bigint:Ge,boolean:Ee,date:Xe,discriminatedUnion:ct,effect:we,enum:yt,function:pt,instanceof:Ye,intersection:dt,lazy:mt,literal:gt,map:ft,nan:He,nativeEnum:vt,never:rt,null:Fe,nullable:bt,number:Ne,object:at,oboolean:Ct,onumber:St,optional:xt,ostring:Tt,pipeline:wt,preprocess:kt,promise:_t,record:lt,set:ht,strictObject:it,string:Ze,symbol:Qe,transformer:we,tuple:ut,undefined:Ke,union:ot,unknown:tt,void:st,NEVER:Zt,ZodIssueCode:c,quotelessJson:je,ZodError:T});var Nt=v.object({primary:v.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The primary color of the workspace"),background:v.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d232a").describe("The background color of the workspace"),success:v.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace"),info:v.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The informational color of the workspace"),warning:v.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace"),error:v.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#990000").describe("The error color of the workspace"),fatal:v.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#7d1a1a").describe("The fatal color of the workspace")}).describe("Colors used for various workspace elements"),Rt=v.object({extends:v.string().trim().optional().describe("The path to a base JSON file to use as a configuration preset file"),name:v.string().trim().toLowerCase().optional().describe("The name of the package"),namespace:v.string().trim().toLowerCase().optional().describe("The namespace of the package"),organization:v.string().trim().default("storm-software").describe("The organization of the workspace"),repository:v.string().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),license:v.string().trim().default("Apache License 2.0").describe("The root directory of the package"),homepage:v.string().trim().url().default("https://stormsoftware.org").describe("The homepage of the workspace"),branch:v.string().trim().default("main").describe("The branch of the workspace"),preid:v.string().optional().describe("A tag specifying the version pre-release identifier"),owner:v.string().trim().default("@storm-software/development").describe("The owner of the package"),worker:v.string().trim().default("Stormie-Bot").describe("The worker of the package (this is the bot that will be used to perform various tasks)"),env:v.enum(["development","staging","production"]).default("production").describe("The current runtime environment of the package"),ci:v.boolean().default(!0).describe("An indicator specifying if the current environment is a CI environment"),workspaceRoot:v.string().trim().optional().describe("The root directory of the workspace"),packageDirectory:v.string().trim().optional().describe("The root directory of the package"),externalPackagePatterns:v.array(v.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),skipCache:v.boolean().default(!1).describe("Should all known types of workspace caching be skipped?"),cacheDirectory:v.string().trim().default("node_modules/.cache/storm").describe("The directory used to store the workspace's cached file data"),buildDirectory:v.string().trim().default("dist").describe("The build directory for the workspace"),runtimeDirectory:v.string().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),runtimeVersion:v.string().trim().regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/).default("1.0.0").describe("The global version of the Storm runtime"),packageManager:v.enum(["npm","yarn","pnpm","bun"]).default("npm").describe("The package manager used by the repository"),timezone:v.string().trim().default("America/New_York").describe("The default timezone of the workspace"),locale:v.string().trim().default("en-US").describe("The default locale of the workspace"),logLevel:v.enum(["silent","fatal","error","warn","info","debug","trace","all"]).default("debug").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),configFile:v.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),colors:Nt.describe("Storm theme config values used for styling various package elements"),extensions:v.record(v.any()).optional().default({}).describe("Configuration of each used extension")}).describe("Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo.");var Mt=r=>r;export{Nt as ColorConfigSchema,Rt as StormConfigSchema,Mt as defineConfig};
package/meta.cjs.json CHANGED
@@ -1 +1 @@
1
- {"inputs":{"node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs":{"bytes":139540,"imports":[],"format":"esm"},"packages/config/src/schema.ts":{"bytes":6218,"imports":[{"path":"node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs","kind":"import-statement","original":"zod"}],"format":"esm"},"packages/config/src/types.ts":{"bytes":769,"imports":[],"format":"esm"},"packages/config/src/index.ts":{"bytes":278,"imports":[{"path":"packages/config/src/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/config/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"}},"outputs":{"dist/packages/config/index.cjs":{"imports":[],"exports":[],"entryPoint":"packages/config/src/index.ts","inputs":{"packages/config/src/index.ts":{"bytesInOutput":91},"node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs":{"bytesInOutput":50923},"packages/config/src/schema.ts":{"bytesInOutput":4460}},"bytes":55901}}}
1
+ {"inputs":{"node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs":{"bytes":139540,"imports":[],"format":"esm"},"packages/config/src/schema.ts":{"bytes":6363,"imports":[{"path":"node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs","kind":"import-statement","original":"zod"}],"format":"esm"},"packages/config/src/types.ts":{"bytes":759,"imports":[],"format":"esm"},"packages/config/src/define-config.ts":{"bytes":313,"imports":[],"format":"esm"},"packages/config/src/index.ts":{"bytes":311,"imports":[{"path":"packages/config/src/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/config/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/config/src/define-config.ts","kind":"import-statement","original":"./define-config"}],"format":"esm"}},"outputs":{"dist/packages/config/index.cjs":{"imports":[],"exports":[],"entryPoint":"packages/config/src/index.ts","inputs":{"packages/config/src/index.ts":{"bytesInOutput":111},"node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs":{"bytesInOutput":52984},"packages/config/src/schema.ts":{"bytesInOutput":4817},"packages/config/src/define-config.ts":{"bytesInOutput":12}},"bytes":58351}}}
package/meta.esm.json CHANGED
@@ -1 +1 @@
1
- {"inputs":{"node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs":{"bytes":139540,"imports":[],"format":"esm"},"packages/config/src/schema.ts":{"bytes":6218,"imports":[{"path":"node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs","kind":"import-statement","original":"zod"}],"format":"esm"},"packages/config/src/types.ts":{"bytes":769,"imports":[],"format":"esm"},"packages/config/src/index.ts":{"bytes":278,"imports":[{"path":"packages/config/src/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/config/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"}},"outputs":{"dist/packages/config/index.js":{"imports":[],"exports":["ColorConfigSchema","StormConfigSchema"],"entryPoint":"packages/config/src/index.ts","inputs":{"node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs":{"bytesInOutput":50923},"packages/config/src/schema.ts":{"bytesInOutput":4460},"packages/config/src/index.ts":{"bytesInOutput":0}},"bytes":55440}}}
1
+ {"inputs":{"node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs":{"bytes":139540,"imports":[],"format":"esm"},"packages/config/src/schema.ts":{"bytes":6363,"imports":[{"path":"node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs","kind":"import-statement","original":"zod"}],"format":"esm"},"packages/config/src/types.ts":{"bytes":759,"imports":[],"format":"esm"},"packages/config/src/define-config.ts":{"bytes":313,"imports":[],"format":"esm"},"packages/config/src/index.ts":{"bytes":311,"imports":[{"path":"packages/config/src/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/config/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/config/src/define-config.ts","kind":"import-statement","original":"./define-config"}],"format":"esm"}},"outputs":{"dist/packages/config/index.js":{"imports":[],"exports":["ColorConfigSchema","StormConfigSchema","defineConfig"],"entryPoint":"packages/config/src/index.ts","inputs":{"node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs":{"bytesInOutput":52984},"packages/config/src/schema.ts":{"bytesInOutput":4817},"packages/config/src/index.ts":{"bytesInOutput":0},"packages/config/src/define-config.ts":{"bytesInOutput":12}},"bytes":57889}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/config",
3
- "version": "1.2.14",
3
+ "version": "1.3.5",
4
4
  "private": false,
5
5
  "description": "⚡The Storm-Ops monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.",
6
6
  "repository": {
@@ -9,8 +9,6 @@
9
9
  "directory": "packages/config"
10
10
  },
11
11
  "type": "module",
12
- "main": "./index.cjs",
13
- "module": "./index.js",
14
12
  "types": "declarations.d.ts",
15
13
  "dependencies": {
16
14
  "zod": "3.22.4"
@@ -0,0 +1,25 @@
1
+ {
2
+ "organization": "storm-software",
3
+ "ci": true,
4
+ "owner": "@storm-software/development",
5
+ "timezone": "America/New_York",
6
+ "locale": "en-US",
7
+ "logLevel": "debug",
8
+ "colors": {
9
+ "primary": "#1fb2a6",
10
+ "background": "#1d232a",
11
+ "success": "#087f5b",
12
+ "info": "#0ea5e9",
13
+ "warning": "#fcc419",
14
+ "error": "#990000",
15
+ "fatal": "#7d1a1a"
16
+ },
17
+ "extensions": {
18
+ "telemetry": {
19
+ "fileName": "storm",
20
+ "fileExtension": "log",
21
+ "path": "tmp/storm/logs",
22
+ "stacktrace": true
23
+ }
24
+ }
25
+ }