@evolver-fi/evolver-basics-admin-components 1.0.0 → 8.2.2-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/dist/EnumSelectFilter-DDWIjz5i.js +35 -0
  2. package/dist/EnumSelectFilter-DDWIjz5i.js.map +1 -0
  3. package/dist/FilterLink-OxQDWR5G.js +29 -0
  4. package/dist/FilterLink-OxQDWR5G.js.map +1 -0
  5. package/dist/Table-IciQttr3.js +79 -0
  6. package/dist/Table-IciQttr3.js.map +1 -0
  7. package/dist/TableMetadataDisplay-BM61EulC.js +49 -0
  8. package/dist/TableMetadataDisplay-BM61EulC.js.map +1 -0
  9. package/dist/TextFilter-CLOKjiSd.js +54 -0
  10. package/dist/TextFilter-CLOKjiSd.js.map +1 -0
  11. package/dist/api-CMiZYkfc.js +32 -0
  12. package/dist/api-CMiZYkfc.js.map +1 -0
  13. package/dist/breadcrumbs/index.js +2 -5
  14. package/dist/breadcrumbs-BAwnKRxL.js +32 -0
  15. package/dist/breadcrumbs-BAwnKRxL.js.map +1 -0
  16. package/dist/breadcrumbs.css +1 -0
  17. package/dist/client/index.js +330 -369
  18. package/dist/client/index.js.map +1 -1
  19. package/dist/configuration-values/index.js +2 -13
  20. package/dist/configuration-values-CjOfmPRq.js +3464 -0
  21. package/dist/configuration-values-CjOfmPRq.js.map +1 -0
  22. package/dist/control-values/index.js +2 -10
  23. package/dist/control-values-CzQOB4WJ.js +144 -0
  24. package/dist/control-values-CzQOB4WJ.js.map +1 -0
  25. package/dist/exhaustiveValues-BYWkg9M1.js +6 -0
  26. package/dist/exhaustiveValues-BYWkg9M1.js.map +1 -0
  27. package/dist/filter/index.js +4 -10
  28. package/dist/formData-BO275hRZ.js +43 -0
  29. package/dist/formData-BO275hRZ.js.map +1 -0
  30. package/dist/jwt-tokens/index.js +2 -9
  31. package/dist/jwt-tokens-DnKsHei4.js +71 -0
  32. package/dist/jwt-tokens-DnKsHei4.js.map +1 -0
  33. package/dist/main/index.js +17 -87
  34. package/dist/message-log/index.js +2 -12
  35. package/dist/message-log-BdrJtbsP.js +337 -0
  36. package/dist/message-log-BdrJtbsP.js.map +1 -0
  37. package/dist/message-sending/index.js +2 -10
  38. package/dist/message-sending-dvTw2fFm.js +181 -0
  39. package/dist/message-sending-dvTw2fFm.js.map +1 -0
  40. package/dist/message-targets/index.js +2 -15
  41. package/dist/message-targets-8EppIJde.js +406 -0
  42. package/dist/message-targets-8EppIJde.js.map +1 -0
  43. package/dist/pagination-C4QUYRMf.js +20 -0
  44. package/dist/pagination-C4QUYRMf.js.map +1 -0
  45. package/dist/scheduled-tasks/index.js +2 -16
  46. package/dist/scheduled-tasks-BtBnBrE7.js +647 -0
  47. package/dist/scheduled-tasks-BtBnBrE7.js.map +1 -0
  48. package/dist/schemas-D-8_LuND.js +2986 -0
  49. package/dist/schemas-D-8_LuND.js.map +1 -0
  50. package/dist/table/index.js +2 -6
  51. package/dist/triggerables/index.js +3 -11
  52. package/dist/triggerables-DgrIeQMi.js +51 -0
  53. package/dist/triggerables-DgrIeQMi.js.map +1 -0
  54. package/dist/types/breadcrumbs.d.ts +1 -0
  55. package/dist/types/client/index.d.ts +5 -0
  56. package/dist/types/client.d.ts +1 -0
  57. package/dist/types/common/exhaustiveValues.d.ts +5 -0
  58. package/dist/types/common/formData.d.ts +20 -0
  59. package/dist/types/common/format.d.ts +1 -0
  60. package/dist/types/common/pagination.d.ts +8 -0
  61. package/dist/types/common/types.d.ts +27 -0
  62. package/dist/types/common/validation.d.ts +5 -0
  63. package/dist/types/components/breadcrumbs/BreadCrumbs.d.ts +10 -0
  64. package/dist/types/components/breadcrumbs/index.d.ts +1 -0
  65. package/dist/types/components/filter/EnumSelectFilter.d.ts +7 -0
  66. package/dist/types/components/filter/FilterHelperTexts.d.ts +4 -0
  67. package/dist/types/components/filter/FilterLink.d.ts +2 -0
  68. package/dist/types/components/filter/TextFilter.d.ts +2 -0
  69. package/dist/types/components/filter/createEnumSelectFilter.d.ts +5 -0
  70. package/dist/types/components/filter/index.d.ts +5 -0
  71. package/dist/types/components/filter/types.d.ts +20 -0
  72. package/dist/types/components/metadata/TableMetadataDisplay.d.ts +2 -0
  73. package/dist/types/components/metadata/utils.d.ts +1 -0
  74. package/dist/types/components/table/Pagination.d.ts +7 -0
  75. package/dist/types/components/table/Table.d.ts +3 -0
  76. package/dist/types/components/table/index.d.ts +3 -0
  77. package/dist/types/components/table/types.d.ts +48 -0
  78. package/dist/types/configuration-values.d.ts +1 -0
  79. package/dist/types/control-values.d.ts +1 -0
  80. package/dist/types/filter.d.ts +1 -0
  81. package/dist/types/index.d.ts +11 -0
  82. package/dist/types/jwt-tokens.d.ts +1 -0
  83. package/dist/types/main.d.ts +1 -0
  84. package/dist/types/message-log.d.ts +1 -0
  85. package/dist/types/message-sending.d.ts +1 -0
  86. package/dist/types/message-targets.d.ts +1 -0
  87. package/dist/types/routes/configuration-values/ConfigurationValueFormRoute.d.ts +2 -0
  88. package/dist/types/routes/configuration-values/ConfigurationValuesRoute.d.ts +2 -0
  89. package/dist/types/routes/configuration-values/action.d.ts +8 -0
  90. package/dist/types/routes/configuration-values/api.d.ts +53 -0
  91. package/dist/types/routes/configuration-values/configurationValueColumns.d.ts +4 -0
  92. package/dist/types/routes/configuration-values/index.d.ts +5 -0
  93. package/dist/types/routes/configuration-values/loader.d.ts +52 -0
  94. package/dist/types/routes/control-values/ControlValuesRoute.d.ts +2 -0
  95. package/dist/types/routes/control-values/SingleControlValueRoute.d.ts +2 -0
  96. package/dist/types/routes/control-values/api.d.ts +43 -0
  97. package/dist/types/routes/control-values/controlValueColumns.d.ts +4 -0
  98. package/dist/types/routes/control-values/index.d.ts +4 -0
  99. package/dist/types/routes/control-values/loader.d.ts +43 -0
  100. package/dist/types/routes/jwt-tokens/JwtTokensRoute.d.ts +6 -0
  101. package/dist/types/routes/jwt-tokens/api.d.ts +41 -0
  102. package/dist/types/routes/jwt-tokens/index.d.ts +3 -0
  103. package/dist/types/routes/jwt-tokens/loader.d.ts +35 -0
  104. package/dist/types/routes/message-log/LogBodyLink.d.ts +6 -0
  105. package/dist/types/routes/message-log/MessageLogRoute.d.ts +2 -0
  106. package/dist/types/routes/message-log/SingleLogMessageRoute.d.ts +6 -0
  107. package/dist/types/routes/message-log/api.d.ts +88 -0
  108. package/dist/types/routes/message-log/index.d.ts +4 -0
  109. package/dist/types/routes/message-log/loader.d.ts +53 -0
  110. package/dist/types/routes/message-log/messageLogColumns.d.ts +3 -0
  111. package/dist/types/routes/message-log/types.d.ts +37 -0
  112. package/dist/types/routes/message-sending/MessageSendingRoute.d.ts +2 -0
  113. package/dist/types/routes/message-sending/SingleMessageRoute.d.ts +2 -0
  114. package/dist/types/routes/message-sending/api.d.ts +92 -0
  115. package/dist/types/routes/message-sending/index.d.ts +4 -0
  116. package/dist/types/routes/message-sending/loader.d.ts +34 -0
  117. package/dist/types/routes/message-sending/messageSendingColumns.d.ts +3 -0
  118. package/dist/types/routes/message-sending/types.d.ts +43 -0
  119. package/dist/types/routes/message-targets/MessageTargetFormRoute.d.ts +2 -0
  120. package/dist/types/routes/message-targets/MessageTargetsRoute.d.ts +2 -0
  121. package/dist/types/routes/message-targets/action.d.ts +8 -0
  122. package/dist/types/routes/message-targets/api.d.ts +12 -0
  123. package/dist/types/routes/message-targets/index.d.ts +5 -0
  124. package/dist/types/routes/message-targets/loader.d.ts +15 -0
  125. package/dist/types/routes/scheduled-tasks/ScheduledTaskFormRoute.d.ts +2 -0
  126. package/dist/types/routes/scheduled-tasks/ScheduledTasksRoute.d.ts +2 -0
  127. package/dist/types/routes/scheduled-tasks/action.d.ts +21 -0
  128. package/dist/types/routes/scheduled-tasks/api.d.ts +75 -0
  129. package/dist/types/routes/scheduled-tasks/index.d.ts +5 -0
  130. package/dist/types/routes/scheduled-tasks/loader.d.ts +57 -0
  131. package/dist/types/routes/scheduled-tasks/parseScheduledTask.d.ts +15 -0
  132. package/dist/types/routes/triggerables/TriggerablesRoute.d.ts +2 -0
  133. package/dist/types/routes/triggerables/action.d.ts +6 -0
  134. package/dist/types/routes/triggerables/api.d.ts +33 -0
  135. package/dist/types/routes/triggerables/index.d.ts +4 -0
  136. package/dist/types/routes/triggerables/loader.d.ts +3 -0
  137. package/dist/types/scheduled-tasks.d.ts +1 -0
  138. package/dist/types/table.d.ts +1 -0
  139. package/dist/types/triggerables.d.ts +1 -0
  140. package/dist/types/types/openapiTypes.d.ts +3321 -0
  141. package/package.json +12 -5
  142. package/dist/ArrowBack-Bifnzxvs.js +0 -6430
  143. package/dist/ArrowBack-Bifnzxvs.js.map +0 -1
  144. package/dist/BreadCrumbs-DMuPCevY.js +0 -19
  145. package/dist/BreadCrumbs-DMuPCevY.js.map +0 -1
  146. package/dist/BreadCrumbs.css +0 -1
  147. package/dist/EnumSelectFilter-BdGla5Yf.js +0 -36
  148. package/dist/EnumSelectFilter-BdGla5Yf.js.map +0 -1
  149. package/dist/ExpandMore-DUn2zrFA.js +0 -1644
  150. package/dist/ExpandMore-DUn2zrFA.js.map +0 -1
  151. package/dist/FilterLink-DIeFjfZX.js +0 -49
  152. package/dist/FilterLink-DIeFjfZX.js.map +0 -1
  153. package/dist/JwtTokensRoute-C74zNV7A.js +0 -2374
  154. package/dist/JwtTokensRoute-C74zNV7A.js.map +0 -1
  155. package/dist/ScheduledTasksRoute-BAetDHqN.js +0 -611
  156. package/dist/ScheduledTasksRoute-BAetDHqN.js.map +0 -1
  157. package/dist/SingleLogMessageRoute-Dl2NFfqG.js +0 -419
  158. package/dist/SingleLogMessageRoute-Dl2NFfqG.js.map +0 -1
  159. package/dist/SingleMessageRoute-fC94BR1C.js +0 -306
  160. package/dist/SingleMessageRoute-fC94BR1C.js.map +0 -1
  161. package/dist/Table-DWiRP1za.js +0 -120
  162. package/dist/Table-DWiRP1za.js.map +0 -1
  163. package/dist/TextFilter-BHWY2B7i.js +0 -67
  164. package/dist/TextFilter-BHWY2B7i.js.map +0 -1
  165. package/dist/TriggerablesRoute-DiEEX1cR.js +0 -3552
  166. package/dist/TriggerablesRoute-DiEEX1cR.js.map +0 -1
  167. package/dist/api-BD_4zyJw.js +0 -38
  168. package/dist/api-BD_4zyJw.js.map +0 -1
  169. package/dist/breadcrumbs/index.js.map +0 -1
  170. package/dist/configuration-values/index.js.map +0 -1
  171. package/dist/control-values/index.js.map +0 -1
  172. package/dist/createSvgIcon-dA_Vj2W0.js +0 -3914
  173. package/dist/createSvgIcon-dA_Vj2W0.js.map +0 -1
  174. package/dist/exhaustiveValues-Dx50G3yz.js +0 -5
  175. package/dist/exhaustiveValues-Dx50G3yz.js.map +0 -1
  176. package/dist/filter/index.js.map +0 -1
  177. package/dist/formData-BH8saYep.js +0 -65
  178. package/dist/formData-BH8saYep.js.map +0 -1
  179. package/dist/jsx-runtime-D858t2LC.js +0 -617
  180. package/dist/jsx-runtime-D858t2LC.js.map +0 -1
  181. package/dist/jwt-tokens/index.js.map +0 -1
  182. package/dist/loader-CrveWlGb.js +0 -375
  183. package/dist/loader-CrveWlGb.js.map +0 -1
  184. package/dist/loader-D-oC32OJ.js +0 -3612
  185. package/dist/loader-D-oC32OJ.js.map +0 -1
  186. package/dist/loader-rVy8Z9xH.js +0 -130
  187. package/dist/loader-rVy8Z9xH.js.map +0 -1
  188. package/dist/main/index.js.map +0 -1
  189. package/dist/message-log/index.js.map +0 -1
  190. package/dist/message-sending/index.js.map +0 -1
  191. package/dist/message-targets/index.js.map +0 -1
  192. package/dist/pagination-Dy4ansKN.js +0 -21
  193. package/dist/pagination-Dy4ansKN.js.map +0 -1
  194. package/dist/scheduled-tasks/index.js.map +0 -1
  195. package/dist/schemas-CBHIJ_eF.js +0 -3059
  196. package/dist/schemas-CBHIJ_eF.js.map +0 -1
  197. package/dist/table/index.js.map +0 -1
  198. package/dist/triggerables/index.js.map +0 -1
@@ -1,3059 +0,0 @@
1
- var _e;
2
- const Xi = /* @__PURE__ */ Object.freeze({
3
- status: "aborted"
4
- });
5
- function u(e, t, n) {
6
- function r(c, a) {
7
- if (c._zod || Object.defineProperty(c, "_zod", {
8
- value: {
9
- def: a,
10
- constr: i,
11
- traits: /* @__PURE__ */ new Set()
12
- },
13
- enumerable: !1
14
- }), c._zod.traits.has(e))
15
- return;
16
- c._zod.traits.add(e), t(c, a);
17
- const f = i.prototype, l = Object.keys(f);
18
- for (let m = 0; m < l.length; m++) {
19
- const h = l[m];
20
- h in c || (c[h] = f[h].bind(c));
21
- }
22
- }
23
- const o = n?.Parent ?? Object;
24
- class s extends o {
25
- }
26
- Object.defineProperty(s, "name", { value: e });
27
- function i(c) {
28
- var a;
29
- const f = n?.Parent ? new s() : this;
30
- r(f, c), (a = f._zod).deferred ?? (a.deferred = []);
31
- for (const l of f._zod.deferred)
32
- l();
33
- return f;
34
- }
35
- return Object.defineProperty(i, "init", { value: r }), Object.defineProperty(i, Symbol.hasInstance, {
36
- value: (c) => n?.Parent && c instanceof n.Parent ? !0 : c?._zod?.traits?.has(e)
37
- }), Object.defineProperty(i, "name", { value: e }), i;
38
- }
39
- class C extends Error {
40
- constructor() {
41
- super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
42
- }
43
- }
44
- class Fe extends Error {
45
- constructor(t) {
46
- super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
47
- }
48
- }
49
- (_e = globalThis).__zod_globalConfig ?? (_e.__zod_globalConfig = {});
50
- const se = globalThis.__zod_globalConfig;
51
- function N(e) {
52
- return se;
53
- }
54
- function Me(e) {
55
- const t = Object.values(e).filter((r) => typeof r == "number");
56
- return Object.entries(e).filter(([r, o]) => t.indexOf(+r) === -1).map(([r, o]) => o);
57
- }
58
- function re(e, t) {
59
- return typeof t == "bigint" ? t.toString() : t;
60
- }
61
- function ce(e) {
62
- return {
63
- get value() {
64
- {
65
- const t = e();
66
- return Object.defineProperty(this, "value", { value: t }), t;
67
- }
68
- }
69
- };
70
- }
71
- function ue(e) {
72
- return e == null;
73
- }
74
- function ae(e) {
75
- const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
76
- return e.slice(t, n);
77
- }
78
- function vt(e, t) {
79
- const n = e / t, r = Math.round(n), o = Number.EPSILON * Math.max(Math.abs(n), 1);
80
- return Math.abs(n - r) < o ? 0 : n - r;
81
- }
82
- const ge = /* @__PURE__ */ Symbol("evaluating");
83
- function g(e, t, n) {
84
- let r;
85
- Object.defineProperty(e, t, {
86
- get() {
87
- if (r !== ge)
88
- return r === void 0 && (r = ge, r = n()), r;
89
- },
90
- set(o) {
91
- Object.defineProperty(e, t, {
92
- value: o
93
- // configurable: true,
94
- });
95
- },
96
- configurable: !0
97
- });
98
- }
99
- function A(e, t, n) {
100
- Object.defineProperty(e, t, {
101
- value: n,
102
- writable: !0,
103
- enumerable: !0,
104
- configurable: !0
105
- });
106
- }
107
- function P(...e) {
108
- const t = {};
109
- for (const n of e) {
110
- const r = Object.getOwnPropertyDescriptors(n);
111
- Object.assign(t, r);
112
- }
113
- return Object.defineProperties({}, t);
114
- }
115
- function ve(e) {
116
- return JSON.stringify(e);
117
- }
118
- function bt(e) {
119
- return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
120
- }
121
- const Je = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
122
- };
123
- function G(e) {
124
- return typeof e == "object" && e !== null && !Array.isArray(e);
125
- }
126
- const zt = /* @__PURE__ */ ce(() => {
127
- if (se.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
128
- return !1;
129
- try {
130
- const e = Function;
131
- return new e(""), !0;
132
- } catch {
133
- return !1;
134
- }
135
- });
136
- function F(e) {
137
- if (G(e) === !1)
138
- return !1;
139
- const t = e.constructor;
140
- if (t === void 0 || typeof t != "function")
141
- return !0;
142
- const n = t.prototype;
143
- return !(G(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
144
- }
145
- function Le(e) {
146
- return F(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
147
- }
148
- const yt = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
149
- function X(e) {
150
- return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
151
- }
152
- function T(e, t, n) {
153
- const r = new e._zod.constr(t ?? e._zod.def);
154
- return (!t || n?.parent) && (r._zod.parent = e), r;
155
- }
156
- function d(e) {
157
- const t = e;
158
- if (!t)
159
- return {};
160
- if (typeof t == "string")
161
- return { error: () => t };
162
- if (t?.message !== void 0) {
163
- if (t?.error !== void 0)
164
- throw new Error("Cannot specify both `message` and `error` params");
165
- t.error = t.message;
166
- }
167
- return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
168
- }
169
- function wt(e) {
170
- return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
171
- }
172
- const kt = {
173
- safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
174
- int32: [-2147483648, 2147483647],
175
- uint32: [0, 4294967295],
176
- float32: [-34028234663852886e22, 34028234663852886e22],
177
- float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
178
- };
179
- function $t(e, t) {
180
- const n = e._zod.def, r = n.checks;
181
- if (r && r.length > 0)
182
- throw new Error(".pick() cannot be used on object schemas containing refinements");
183
- const s = P(e._zod.def, {
184
- get shape() {
185
- const i = {};
186
- for (const c in t) {
187
- if (!(c in n.shape))
188
- throw new Error(`Unrecognized key: "${c}"`);
189
- t[c] && (i[c] = n.shape[c]);
190
- }
191
- return A(this, "shape", i), i;
192
- },
193
- checks: []
194
- });
195
- return T(e, s);
196
- }
197
- function Zt(e, t) {
198
- const n = e._zod.def, r = n.checks;
199
- if (r && r.length > 0)
200
- throw new Error(".omit() cannot be used on object schemas containing refinements");
201
- const s = P(e._zod.def, {
202
- get shape() {
203
- const i = { ...e._zod.def.shape };
204
- for (const c in t) {
205
- if (!(c in n.shape))
206
- throw new Error(`Unrecognized key: "${c}"`);
207
- t[c] && delete i[c];
208
- }
209
- return A(this, "shape", i), i;
210
- },
211
- checks: []
212
- });
213
- return T(e, s);
214
- }
215
- function Ot(e, t) {
216
- if (!F(t))
217
- throw new Error("Invalid input to extend: expected a plain object");
218
- const n = e._zod.def.checks;
219
- if (n && n.length > 0) {
220
- const s = e._zod.def.shape;
221
- for (const i in t)
222
- if (Object.getOwnPropertyDescriptor(s, i) !== void 0)
223
- throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
224
- }
225
- const o = P(e._zod.def, {
226
- get shape() {
227
- const s = { ...e._zod.def.shape, ...t };
228
- return A(this, "shape", s), s;
229
- }
230
- });
231
- return T(e, o);
232
- }
233
- function St(e, t) {
234
- if (!F(t))
235
- throw new Error("Invalid input to safeExtend: expected a plain object");
236
- const n = P(e._zod.def, {
237
- get shape() {
238
- const r = { ...e._zod.def.shape, ...t };
239
- return A(this, "shape", r), r;
240
- }
241
- });
242
- return T(e, n);
243
- }
244
- function It(e, t) {
245
- if (e._zod.def.checks?.length)
246
- throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
247
- const n = P(e._zod.def, {
248
- get shape() {
249
- const r = { ...e._zod.def.shape, ...t._zod.def.shape };
250
- return A(this, "shape", r), r;
251
- },
252
- get catchall() {
253
- return t._zod.def.catchall;
254
- },
255
- checks: t._zod.def.checks ?? []
256
- });
257
- return T(e, n);
258
- }
259
- function Et(e, t, n) {
260
- const o = t._zod.def.checks;
261
- if (o && o.length > 0)
262
- throw new Error(".partial() cannot be used on object schemas containing refinements");
263
- const i = P(t._zod.def, {
264
- get shape() {
265
- const c = t._zod.def.shape, a = { ...c };
266
- if (n)
267
- for (const f in n) {
268
- if (!(f in c))
269
- throw new Error(`Unrecognized key: "${f}"`);
270
- n[f] && (a[f] = e ? new e({
271
- type: "optional",
272
- innerType: c[f]
273
- }) : c[f]);
274
- }
275
- else
276
- for (const f in c)
277
- a[f] = e ? new e({
278
- type: "optional",
279
- innerType: c[f]
280
- }) : c[f];
281
- return A(this, "shape", a), a;
282
- },
283
- checks: []
284
- });
285
- return T(t, i);
286
- }
287
- function Pt(e, t, n) {
288
- const r = P(t._zod.def, {
289
- get shape() {
290
- const o = t._zod.def.shape, s = { ...o };
291
- if (n)
292
- for (const i in n) {
293
- if (!(i in s))
294
- throw new Error(`Unrecognized key: "${i}"`);
295
- n[i] && (s[i] = new e({
296
- type: "nonoptional",
297
- innerType: o[i]
298
- }));
299
- }
300
- else
301
- for (const i in o)
302
- s[i] = new e({
303
- type: "nonoptional",
304
- innerType: o[i]
305
- });
306
- return A(this, "shape", s), s;
307
- }
308
- });
309
- return T(t, r);
310
- }
311
- function R(e, t = 0) {
312
- if (e.aborted === !0)
313
- return !0;
314
- for (let n = t; n < e.issues.length; n++)
315
- if (e.issues[n]?.continue !== !0)
316
- return !0;
317
- return !1;
318
- }
319
- function Tt(e, t = 0) {
320
- if (e.aborted === !0)
321
- return !0;
322
- for (let n = t; n < e.issues.length; n++)
323
- if (e.issues[n]?.continue === !1)
324
- return !0;
325
- return !1;
326
- }
327
- function Ve(e, t) {
328
- return t.map((n) => {
329
- var r;
330
- return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
331
- });
332
- }
333
- function L(e) {
334
- return typeof e == "string" ? e : e?.message;
335
- }
336
- function j(e, t, n) {
337
- const r = e.message ? e.message : L(e.inst?._zod.def?.error?.(e)) ?? L(t?.error?.(e)) ?? L(n.customError?.(e)) ?? L(n.localeError?.(e)) ?? "Invalid input", { inst: o, continue: s, input: i, ...c } = e;
338
- return c.path ?? (c.path = []), c.message = r, t?.reportInput && (c.input = i), c;
339
- }
340
- function fe(e) {
341
- return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
342
- }
343
- function M(...e) {
344
- const [t, n, r] = e;
345
- return typeof t == "string" ? {
346
- message: t,
347
- code: "custom",
348
- input: n,
349
- inst: r
350
- } : { ...t };
351
- }
352
- const We = (e, t) => {
353
- e.name = "$ZodError", Object.defineProperty(e, "_zod", {
354
- value: e._zod,
355
- enumerable: !1
356
- }), Object.defineProperty(e, "issues", {
357
- value: t,
358
- enumerable: !1
359
- }), e.message = JSON.stringify(t, re, 2), Object.defineProperty(e, "toString", {
360
- value: () => e.message,
361
- enumerable: !1
362
- });
363
- }, Ge = u("$ZodError", We), Ke = u("$ZodError", We, { Parent: Error });
364
- function Nt(e, t = (n) => n.message) {
365
- const n = {}, r = [];
366
- for (const o of e.issues)
367
- o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
368
- return { formErrors: r, fieldErrors: n };
369
- }
370
- function jt(e, t = (n) => n.message) {
371
- const n = { _errors: [] }, r = (o, s = []) => {
372
- for (const i of o.issues)
373
- if (i.code === "invalid_union" && i.errors.length)
374
- i.errors.map((c) => r({ issues: c }, [...s, ...i.path]));
375
- else if (i.code === "invalid_key")
376
- r({ issues: i.issues }, [...s, ...i.path]);
377
- else if (i.code === "invalid_element")
378
- r({ issues: i.issues }, [...s, ...i.path]);
379
- else {
380
- const c = [...s, ...i.path];
381
- if (c.length === 0)
382
- n._errors.push(t(i));
383
- else {
384
- let a = n, f = 0;
385
- for (; f < c.length; ) {
386
- const l = c[f];
387
- f === c.length - 1 ? (a[l] = a[l] || { _errors: [] }, a[l]._errors.push(t(i))) : a[l] = a[l] || { _errors: [] }, a = a[l], f++;
388
- }
389
- }
390
- }
391
- };
392
- return r(e), n;
393
- }
394
- const le = (e) => (t, n, r, o) => {
395
- const s = r ? { ...r, async: !1 } : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, s);
396
- if (i instanceof Promise)
397
- throw new C();
398
- if (i.issues.length) {
399
- const c = new (o?.Err ?? e)(i.issues.map((a) => j(a, s, N())));
400
- throw Je(c, o?.callee), c;
401
- }
402
- return i.value;
403
- }, de = (e) => async (t, n, r, o) => {
404
- const s = r ? { ...r, async: !0 } : { async: !0 };
405
- let i = t._zod.run({ value: n, issues: [] }, s);
406
- if (i instanceof Promise && (i = await i), i.issues.length) {
407
- const c = new (o?.Err ?? e)(i.issues.map((a) => j(a, s, N())));
408
- throw Je(c, o?.callee), c;
409
- }
410
- return i.value;
411
- }, q = (e) => (t, n, r) => {
412
- const o = r ? { ...r, async: !1 } : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, o);
413
- if (s instanceof Promise)
414
- throw new C();
415
- return s.issues.length ? {
416
- success: !1,
417
- error: new (e ?? Ge)(s.issues.map((i) => j(i, o, N())))
418
- } : { success: !0, data: s.value };
419
- }, At = /* @__PURE__ */ q(Ke), H = (e) => async (t, n, r) => {
420
- const o = r ? { ...r, async: !0 } : { async: !0 };
421
- let s = t._zod.run({ value: n, issues: [] }, o);
422
- return s instanceof Promise && (s = await s), s.issues.length ? {
423
- success: !1,
424
- error: new e(s.issues.map((i) => j(i, o, N())))
425
- } : { success: !0, data: s.value };
426
- }, Rt = /* @__PURE__ */ H(Ke), Ct = (e) => (t, n, r) => {
427
- const o = r ? { ...r, direction: "backward" } : { direction: "backward" };
428
- return le(e)(t, n, o);
429
- }, Dt = (e) => (t, n, r) => le(e)(t, n, r), xt = (e) => async (t, n, r) => {
430
- const o = r ? { ...r, direction: "backward" } : { direction: "backward" };
431
- return de(e)(t, n, o);
432
- }, Ut = (e) => async (t, n, r) => de(e)(t, n, r), Ft = (e) => (t, n, r) => {
433
- const o = r ? { ...r, direction: "backward" } : { direction: "backward" };
434
- return q(e)(t, n, o);
435
- }, Mt = (e) => (t, n, r) => q(e)(t, n, r), Jt = (e) => async (t, n, r) => {
436
- const o = r ? { ...r, direction: "backward" } : { direction: "backward" };
437
- return H(e)(t, n, o);
438
- }, Lt = (e) => async (t, n, r) => H(e)(t, n, r), Vt = /^[cC][0-9a-z]{6,}$/, Wt = /^[0-9a-z]+$/, Gt = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Kt = /^[0-9a-vA-V]{20}$/, Bt = /^[A-Za-z0-9]{27}$/, Yt = /^[a-zA-Z0-9_-]{21}$/, Xt = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, qt = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, be = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, Ht = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Qt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
439
- function en() {
440
- return new RegExp(Qt, "u");
441
- }
442
- const tn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, nn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, rn = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, on = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, sn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Be = /^[A-Za-z0-9_-]*$/, cn = /^https?$/, un = /^\+[1-9]\d{6,14}$/, Ye = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", an = /* @__PURE__ */ new RegExp(`^${Ye}$`);
443
- function Xe(e) {
444
- const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
445
- return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
446
- }
447
- function fn(e) {
448
- return new RegExp(`^${Xe(e)}$`);
449
- }
450
- function ln(e) {
451
- const t = Xe({ precision: e.precision }), n = ["Z"];
452
- e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
453
- const r = `${t}(?:${n.join("|")})`;
454
- return new RegExp(`^${Ye}T(?:${r})$`);
455
- }
456
- const dn = (e) => {
457
- const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
458
- return new RegExp(`^${t}$`);
459
- }, pn = /^-?\d+$/, hn = /^-?\d+(?:\.\d+)?$/, mn = /^[^A-Z]*$/, _n = /^[^a-z]*$/, S = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
460
- var n;
461
- e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
462
- }), qe = {
463
- number: "number",
464
- bigint: "bigint",
465
- object: "date"
466
- }, He = /* @__PURE__ */ u("$ZodCheckLessThan", (e, t) => {
467
- S.init(e, t);
468
- const n = qe[typeof t.value];
469
- e._zod.onattach.push((r) => {
470
- const o = r._zod.bag, s = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
471
- t.value < s && (t.inclusive ? o.maximum = t.value : o.exclusiveMaximum = t.value);
472
- }), e._zod.check = (r) => {
473
- (t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({
474
- origin: n,
475
- code: "too_big",
476
- maximum: typeof t.value == "object" ? t.value.getTime() : t.value,
477
- input: r.value,
478
- inclusive: t.inclusive,
479
- inst: e,
480
- continue: !t.abort
481
- });
482
- };
483
- }), Qe = /* @__PURE__ */ u("$ZodCheckGreaterThan", (e, t) => {
484
- S.init(e, t);
485
- const n = qe[typeof t.value];
486
- e._zod.onattach.push((r) => {
487
- const o = r._zod.bag, s = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
488
- t.value > s && (t.inclusive ? o.minimum = t.value : o.exclusiveMinimum = t.value);
489
- }), e._zod.check = (r) => {
490
- (t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({
491
- origin: n,
492
- code: "too_small",
493
- minimum: typeof t.value == "object" ? t.value.getTime() : t.value,
494
- input: r.value,
495
- inclusive: t.inclusive,
496
- inst: e,
497
- continue: !t.abort
498
- });
499
- };
500
- }), gn = /* @__PURE__ */ u("$ZodCheckMultipleOf", (e, t) => {
501
- S.init(e, t), e._zod.onattach.push((n) => {
502
- var r;
503
- (r = n._zod.bag).multipleOf ?? (r.multipleOf = t.value);
504
- }), e._zod.check = (n) => {
505
- if (typeof n.value != typeof t.value)
506
- throw new Error("Cannot mix number and bigint in multiple_of check.");
507
- (typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : vt(n.value, t.value) === 0) || n.issues.push({
508
- origin: typeof n.value,
509
- code: "not_multiple_of",
510
- divisor: t.value,
511
- input: n.value,
512
- inst: e,
513
- continue: !t.abort
514
- });
515
- };
516
- }), vn = /* @__PURE__ */ u("$ZodCheckNumberFormat", (e, t) => {
517
- S.init(e, t), t.format = t.format || "float64";
518
- const n = t.format?.includes("int"), r = n ? "int" : "number", [o, s] = kt[t.format];
519
- e._zod.onattach.push((i) => {
520
- const c = i._zod.bag;
521
- c.format = t.format, c.minimum = o, c.maximum = s, n && (c.pattern = pn);
522
- }), e._zod.check = (i) => {
523
- const c = i.value;
524
- if (n) {
525
- if (!Number.isInteger(c)) {
526
- i.issues.push({
527
- expected: r,
528
- format: t.format,
529
- code: "invalid_type",
530
- continue: !1,
531
- input: c,
532
- inst: e
533
- });
534
- return;
535
- }
536
- if (!Number.isSafeInteger(c)) {
537
- c > 0 ? i.issues.push({
538
- input: c,
539
- code: "too_big",
540
- maximum: Number.MAX_SAFE_INTEGER,
541
- note: "Integers must be within the safe integer range.",
542
- inst: e,
543
- origin: r,
544
- inclusive: !0,
545
- continue: !t.abort
546
- }) : i.issues.push({
547
- input: c,
548
- code: "too_small",
549
- minimum: Number.MIN_SAFE_INTEGER,
550
- note: "Integers must be within the safe integer range.",
551
- inst: e,
552
- origin: r,
553
- inclusive: !0,
554
- continue: !t.abort
555
- });
556
- return;
557
- }
558
- }
559
- c < o && i.issues.push({
560
- origin: "number",
561
- input: c,
562
- code: "too_small",
563
- minimum: o,
564
- inclusive: !0,
565
- inst: e,
566
- continue: !t.abort
567
- }), c > s && i.issues.push({
568
- origin: "number",
569
- input: c,
570
- code: "too_big",
571
- maximum: s,
572
- inclusive: !0,
573
- inst: e,
574
- continue: !t.abort
575
- });
576
- };
577
- }), bn = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, t) => {
578
- var n;
579
- S.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
580
- const o = r.value;
581
- return !ue(o) && o.length !== void 0;
582
- }), e._zod.onattach.push((r) => {
583
- const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
584
- t.maximum < o && (r._zod.bag.maximum = t.maximum);
585
- }), e._zod.check = (r) => {
586
- const o = r.value;
587
- if (o.length <= t.maximum)
588
- return;
589
- const i = fe(o);
590
- r.issues.push({
591
- origin: i,
592
- code: "too_big",
593
- maximum: t.maximum,
594
- inclusive: !0,
595
- input: o,
596
- inst: e,
597
- continue: !t.abort
598
- });
599
- };
600
- }), zn = /* @__PURE__ */ u("$ZodCheckMinLength", (e, t) => {
601
- var n;
602
- S.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
603
- const o = r.value;
604
- return !ue(o) && o.length !== void 0;
605
- }), e._zod.onattach.push((r) => {
606
- const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
607
- t.minimum > o && (r._zod.bag.minimum = t.minimum);
608
- }), e._zod.check = (r) => {
609
- const o = r.value;
610
- if (o.length >= t.minimum)
611
- return;
612
- const i = fe(o);
613
- r.issues.push({
614
- origin: i,
615
- code: "too_small",
616
- minimum: t.minimum,
617
- inclusive: !0,
618
- input: o,
619
- inst: e,
620
- continue: !t.abort
621
- });
622
- };
623
- }), yn = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, t) => {
624
- var n;
625
- S.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
626
- const o = r.value;
627
- return !ue(o) && o.length !== void 0;
628
- }), e._zod.onattach.push((r) => {
629
- const o = r._zod.bag;
630
- o.minimum = t.length, o.maximum = t.length, o.length = t.length;
631
- }), e._zod.check = (r) => {
632
- const o = r.value, s = o.length;
633
- if (s === t.length)
634
- return;
635
- const i = fe(o), c = s > t.length;
636
- r.issues.push({
637
- origin: i,
638
- ...c ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
639
- inclusive: !0,
640
- exact: !0,
641
- input: r.value,
642
- inst: e,
643
- continue: !t.abort
644
- });
645
- };
646
- }), Q = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, t) => {
647
- var n, r;
648
- S.init(e, t), e._zod.onattach.push((o) => {
649
- const s = o._zod.bag;
650
- s.format = t.format, t.pattern && (s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(t.pattern));
651
- }), t.pattern ? (n = e._zod).check ?? (n.check = (o) => {
652
- t.pattern.lastIndex = 0, !t.pattern.test(o.value) && o.issues.push({
653
- origin: "string",
654
- code: "invalid_format",
655
- format: t.format,
656
- input: o.value,
657
- ...t.pattern ? { pattern: t.pattern.toString() } : {},
658
- inst: e,
659
- continue: !t.abort
660
- });
661
- }) : (r = e._zod).check ?? (r.check = () => {
662
- });
663
- }), wn = /* @__PURE__ */ u("$ZodCheckRegex", (e, t) => {
664
- Q.init(e, t), e._zod.check = (n) => {
665
- t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
666
- origin: "string",
667
- code: "invalid_format",
668
- format: "regex",
669
- input: n.value,
670
- pattern: t.pattern.toString(),
671
- inst: e,
672
- continue: !t.abort
673
- });
674
- };
675
- }), kn = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, t) => {
676
- t.pattern ?? (t.pattern = mn), Q.init(e, t);
677
- }), $n = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
678
- t.pattern ?? (t.pattern = _n), Q.init(e, t);
679
- }), Zn = /* @__PURE__ */ u("$ZodCheckIncludes", (e, t) => {
680
- S.init(e, t);
681
- const n = X(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
682
- t.pattern = r, e._zod.onattach.push((o) => {
683
- const s = o._zod.bag;
684
- s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(r);
685
- }), e._zod.check = (o) => {
686
- o.value.includes(t.includes, t.position) || o.issues.push({
687
- origin: "string",
688
- code: "invalid_format",
689
- format: "includes",
690
- includes: t.includes,
691
- input: o.value,
692
- inst: e,
693
- continue: !t.abort
694
- });
695
- };
696
- }), On = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, t) => {
697
- S.init(e, t);
698
- const n = new RegExp(`^${X(t.prefix)}.*`);
699
- t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
700
- const o = r._zod.bag;
701
- o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
702
- }), e._zod.check = (r) => {
703
- r.value.startsWith(t.prefix) || r.issues.push({
704
- origin: "string",
705
- code: "invalid_format",
706
- format: "starts_with",
707
- prefix: t.prefix,
708
- input: r.value,
709
- inst: e,
710
- continue: !t.abort
711
- });
712
- };
713
- }), Sn = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, t) => {
714
- S.init(e, t);
715
- const n = new RegExp(`.*${X(t.suffix)}$`);
716
- t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
717
- const o = r._zod.bag;
718
- o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
719
- }), e._zod.check = (r) => {
720
- r.value.endsWith(t.suffix) || r.issues.push({
721
- origin: "string",
722
- code: "invalid_format",
723
- format: "ends_with",
724
- suffix: t.suffix,
725
- input: r.value,
726
- inst: e,
727
- continue: !t.abort
728
- });
729
- };
730
- }), In = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, t) => {
731
- S.init(e, t), e._zod.check = (n) => {
732
- n.value = t.tx(n.value);
733
- };
734
- });
735
- class En {
736
- constructor(t = []) {
737
- this.content = [], this.indent = 0, this && (this.args = t);
738
- }
739
- indented(t) {
740
- this.indent += 1, t(this), this.indent -= 1;
741
- }
742
- write(t) {
743
- if (typeof t == "function") {
744
- t(this, { execution: "sync" }), t(this, { execution: "async" });
745
- return;
746
- }
747
- const r = t.split(`
748
- `).filter((i) => i), o = Math.min(...r.map((i) => i.length - i.trimStart().length)), s = r.map((i) => i.slice(o)).map((i) => " ".repeat(this.indent * 2) + i);
749
- for (const i of s)
750
- this.content.push(i);
751
- }
752
- compile() {
753
- const t = Function, n = this?.args, o = [...(this?.content ?? [""]).map((s) => ` ${s}`)];
754
- return new t(...n, o.join(`
755
- `));
756
- }
757
- }
758
- const Pn = {
759
- major: 4,
760
- minor: 4,
761
- patch: 3
762
- }, y = /* @__PURE__ */ u("$ZodType", (e, t) => {
763
- var n;
764
- e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Pn;
765
- const r = [...e._zod.def.checks ?? []];
766
- e._zod.traits.has("$ZodCheck") && r.unshift(e);
767
- for (const o of r)
768
- for (const s of o._zod.onattach)
769
- s(e);
770
- if (r.length === 0)
771
- (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
772
- e._zod.run = e._zod.parse;
773
- });
774
- else {
775
- const o = (i, c, a) => {
776
- let f = R(i), l;
777
- for (const m of c) {
778
- if (m._zod.def.when) {
779
- if (Tt(i) || !m._zod.def.when(i))
780
- continue;
781
- } else if (f)
782
- continue;
783
- const h = i.issues.length, p = m._zod.check(i);
784
- if (p instanceof Promise && a?.async === !1)
785
- throw new C();
786
- if (l || p instanceof Promise)
787
- l = (l ?? Promise.resolve()).then(async () => {
788
- await p, i.issues.length !== h && (f || (f = R(i, h)));
789
- });
790
- else {
791
- if (i.issues.length === h)
792
- continue;
793
- f || (f = R(i, h));
794
- }
795
- }
796
- return l ? l.then(() => i) : i;
797
- }, s = (i, c, a) => {
798
- if (R(i))
799
- return i.aborted = !0, i;
800
- const f = o(c, r, a);
801
- if (f instanceof Promise) {
802
- if (a.async === !1)
803
- throw new C();
804
- return f.then((l) => e._zod.parse(l, a));
805
- }
806
- return e._zod.parse(f, a);
807
- };
808
- e._zod.run = (i, c) => {
809
- if (c.skipChecks)
810
- return e._zod.parse(i, c);
811
- if (c.direction === "backward") {
812
- const f = e._zod.parse({ value: i.value, issues: [] }, { ...c, skipChecks: !0 });
813
- return f instanceof Promise ? f.then((l) => s(l, i, c)) : s(f, i, c);
814
- }
815
- const a = e._zod.parse(i, c);
816
- if (a instanceof Promise) {
817
- if (c.async === !1)
818
- throw new C();
819
- return a.then((f) => o(f, r, c));
820
- }
821
- return o(a, r, c);
822
- };
823
- }
824
- g(e, "~standard", () => ({
825
- validate: (o) => {
826
- try {
827
- const s = At(e, o);
828
- return s.success ? { value: s.data } : { issues: s.error?.issues };
829
- } catch {
830
- return Rt(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
831
- }
832
- },
833
- vendor: "zod",
834
- version: 1
835
- }));
836
- }), pe = /* @__PURE__ */ u("$ZodString", (e, t) => {
837
- y.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? dn(e._zod.bag), e._zod.parse = (n, r) => {
838
- if (t.coerce)
839
- try {
840
- n.value = String(n.value);
841
- } catch {
842
- }
843
- return typeof n.value == "string" || n.issues.push({
844
- expected: "string",
845
- code: "invalid_type",
846
- input: n.value,
847
- inst: e
848
- }), n;
849
- };
850
- }), v = /* @__PURE__ */ u("$ZodStringFormat", (e, t) => {
851
- Q.init(e, t), pe.init(e, t);
852
- }), Tn = /* @__PURE__ */ u("$ZodGUID", (e, t) => {
853
- t.pattern ?? (t.pattern = qt), v.init(e, t);
854
- }), Nn = /* @__PURE__ */ u("$ZodUUID", (e, t) => {
855
- if (t.version) {
856
- const r = {
857
- v1: 1,
858
- v2: 2,
859
- v3: 3,
860
- v4: 4,
861
- v5: 5,
862
- v6: 6,
863
- v7: 7,
864
- v8: 8
865
- }[t.version];
866
- if (r === void 0)
867
- throw new Error(`Invalid UUID version: "${t.version}"`);
868
- t.pattern ?? (t.pattern = be(r));
869
- } else
870
- t.pattern ?? (t.pattern = be());
871
- v.init(e, t);
872
- }), jn = /* @__PURE__ */ u("$ZodEmail", (e, t) => {
873
- t.pattern ?? (t.pattern = Ht), v.init(e, t);
874
- }), An = /* @__PURE__ */ u("$ZodURL", (e, t) => {
875
- v.init(e, t), e._zod.check = (n) => {
876
- try {
877
- const r = n.value.trim();
878
- if (!t.normalize && t.protocol?.source === cn.source && !/^https?:\/\//i.test(r)) {
879
- n.issues.push({
880
- code: "invalid_format",
881
- format: "url",
882
- note: "Invalid URL format",
883
- input: n.value,
884
- inst: e,
885
- continue: !t.abort
886
- });
887
- return;
888
- }
889
- const o = new URL(r);
890
- t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(o.hostname) || n.issues.push({
891
- code: "invalid_format",
892
- format: "url",
893
- note: "Invalid hostname",
894
- pattern: t.hostname.source,
895
- input: n.value,
896
- inst: e,
897
- continue: !t.abort
898
- })), t.protocol && (t.protocol.lastIndex = 0, t.protocol.test(o.protocol.endsWith(":") ? o.protocol.slice(0, -1) : o.protocol) || n.issues.push({
899
- code: "invalid_format",
900
- format: "url",
901
- note: "Invalid protocol",
902
- pattern: t.protocol.source,
903
- input: n.value,
904
- inst: e,
905
- continue: !t.abort
906
- })), t.normalize ? n.value = o.href : n.value = r;
907
- return;
908
- } catch {
909
- n.issues.push({
910
- code: "invalid_format",
911
- format: "url",
912
- input: n.value,
913
- inst: e,
914
- continue: !t.abort
915
- });
916
- }
917
- };
918
- }), Rn = /* @__PURE__ */ u("$ZodEmoji", (e, t) => {
919
- t.pattern ?? (t.pattern = en()), v.init(e, t);
920
- }), Cn = /* @__PURE__ */ u("$ZodNanoID", (e, t) => {
921
- t.pattern ?? (t.pattern = Yt), v.init(e, t);
922
- }), Dn = /* @__PURE__ */ u("$ZodCUID", (e, t) => {
923
- t.pattern ?? (t.pattern = Vt), v.init(e, t);
924
- }), xn = /* @__PURE__ */ u("$ZodCUID2", (e, t) => {
925
- t.pattern ?? (t.pattern = Wt), v.init(e, t);
926
- }), Un = /* @__PURE__ */ u("$ZodULID", (e, t) => {
927
- t.pattern ?? (t.pattern = Gt), v.init(e, t);
928
- }), Fn = /* @__PURE__ */ u("$ZodXID", (e, t) => {
929
- t.pattern ?? (t.pattern = Kt), v.init(e, t);
930
- }), Mn = /* @__PURE__ */ u("$ZodKSUID", (e, t) => {
931
- t.pattern ?? (t.pattern = Bt), v.init(e, t);
932
- }), Jn = /* @__PURE__ */ u("$ZodISODateTime", (e, t) => {
933
- t.pattern ?? (t.pattern = ln(t)), v.init(e, t);
934
- }), Ln = /* @__PURE__ */ u("$ZodISODate", (e, t) => {
935
- t.pattern ?? (t.pattern = an), v.init(e, t);
936
- }), Vn = /* @__PURE__ */ u("$ZodISOTime", (e, t) => {
937
- t.pattern ?? (t.pattern = fn(t)), v.init(e, t);
938
- }), Wn = /* @__PURE__ */ u("$ZodISODuration", (e, t) => {
939
- t.pattern ?? (t.pattern = Xt), v.init(e, t);
940
- }), Gn = /* @__PURE__ */ u("$ZodIPv4", (e, t) => {
941
- t.pattern ?? (t.pattern = tn), v.init(e, t), e._zod.bag.format = "ipv4";
942
- }), Kn = /* @__PURE__ */ u("$ZodIPv6", (e, t) => {
943
- t.pattern ?? (t.pattern = nn), v.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
944
- try {
945
- new URL(`http://[${n.value}]`);
946
- } catch {
947
- n.issues.push({
948
- code: "invalid_format",
949
- format: "ipv6",
950
- input: n.value,
951
- inst: e,
952
- continue: !t.abort
953
- });
954
- }
955
- };
956
- }), Bn = /* @__PURE__ */ u("$ZodCIDRv4", (e, t) => {
957
- t.pattern ?? (t.pattern = rn), v.init(e, t);
958
- }), Yn = /* @__PURE__ */ u("$ZodCIDRv6", (e, t) => {
959
- t.pattern ?? (t.pattern = on), v.init(e, t), e._zod.check = (n) => {
960
- const r = n.value.split("/");
961
- try {
962
- if (r.length !== 2)
963
- throw new Error();
964
- const [o, s] = r;
965
- if (!s)
966
- throw new Error();
967
- const i = Number(s);
968
- if (`${i}` !== s)
969
- throw new Error();
970
- if (i < 0 || i > 128)
971
- throw new Error();
972
- new URL(`http://[${o}]`);
973
- } catch {
974
- n.issues.push({
975
- code: "invalid_format",
976
- format: "cidrv6",
977
- input: n.value,
978
- inst: e,
979
- continue: !t.abort
980
- });
981
- }
982
- };
983
- });
984
- function et(e) {
985
- if (e === "")
986
- return !0;
987
- if (/\s/.test(e) || e.length % 4 !== 0)
988
- return !1;
989
- try {
990
- return atob(e), !0;
991
- } catch {
992
- return !1;
993
- }
994
- }
995
- const Xn = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
996
- t.pattern ?? (t.pattern = sn), v.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
997
- et(n.value) || n.issues.push({
998
- code: "invalid_format",
999
- format: "base64",
1000
- input: n.value,
1001
- inst: e,
1002
- continue: !t.abort
1003
- });
1004
- };
1005
- });
1006
- function qn(e) {
1007
- if (!Be.test(e))
1008
- return !1;
1009
- const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
1010
- return et(n);
1011
- }
1012
- const Hn = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
1013
- t.pattern ?? (t.pattern = Be), v.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
1014
- qn(n.value) || n.issues.push({
1015
- code: "invalid_format",
1016
- format: "base64url",
1017
- input: n.value,
1018
- inst: e,
1019
- continue: !t.abort
1020
- });
1021
- };
1022
- }), Qn = /* @__PURE__ */ u("$ZodE164", (e, t) => {
1023
- t.pattern ?? (t.pattern = un), v.init(e, t);
1024
- });
1025
- function er(e, t = null) {
1026
- try {
1027
- const n = e.split(".");
1028
- if (n.length !== 3)
1029
- return !1;
1030
- const [r] = n;
1031
- if (!r)
1032
- return !1;
1033
- const o = JSON.parse(atob(r));
1034
- return !("typ" in o && o?.typ !== "JWT" || !o.alg || t && (!("alg" in o) || o.alg !== t));
1035
- } catch {
1036
- return !1;
1037
- }
1038
- }
1039
- const tr = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
1040
- v.init(e, t), e._zod.check = (n) => {
1041
- er(n.value, t.alg) || n.issues.push({
1042
- code: "invalid_format",
1043
- format: "jwt",
1044
- input: n.value,
1045
- inst: e,
1046
- continue: !t.abort
1047
- });
1048
- };
1049
- }), tt = /* @__PURE__ */ u("$ZodNumber", (e, t) => {
1050
- y.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? hn, e._zod.parse = (n, r) => {
1051
- if (t.coerce)
1052
- try {
1053
- n.value = Number(n.value);
1054
- } catch {
1055
- }
1056
- const o = n.value;
1057
- if (typeof o == "number" && !Number.isNaN(o) && Number.isFinite(o))
1058
- return n;
1059
- const s = typeof o == "number" ? Number.isNaN(o) ? "NaN" : Number.isFinite(o) ? void 0 : "Infinity" : void 0;
1060
- return n.issues.push({
1061
- expected: "number",
1062
- code: "invalid_type",
1063
- input: o,
1064
- inst: e,
1065
- ...s ? { received: s } : {}
1066
- }), n;
1067
- };
1068
- }), nr = /* @__PURE__ */ u("$ZodNumberFormat", (e, t) => {
1069
- vn.init(e, t), tt.init(e, t);
1070
- }), rr = /* @__PURE__ */ u("$ZodUnknown", (e, t) => {
1071
- y.init(e, t), e._zod.parse = (n) => n;
1072
- }), or = /* @__PURE__ */ u("$ZodNever", (e, t) => {
1073
- y.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
1074
- expected: "never",
1075
- code: "invalid_type",
1076
- input: n.value,
1077
- inst: e
1078
- }), n);
1079
- });
1080
- function ze(e, t, n) {
1081
- e.issues.length && t.issues.push(...Ve(n, e.issues)), t.value[n] = e.value;
1082
- }
1083
- const ir = /* @__PURE__ */ u("$ZodArray", (e, t) => {
1084
- y.init(e, t), e._zod.parse = (n, r) => {
1085
- const o = n.value;
1086
- if (!Array.isArray(o))
1087
- return n.issues.push({
1088
- expected: "array",
1089
- code: "invalid_type",
1090
- input: o,
1091
- inst: e
1092
- }), n;
1093
- n.value = Array(o.length);
1094
- const s = [];
1095
- for (let i = 0; i < o.length; i++) {
1096
- const c = o[i], a = t.element._zod.run({
1097
- value: c,
1098
- issues: []
1099
- }, r);
1100
- a instanceof Promise ? s.push(a.then((f) => ze(f, n, i))) : ze(a, n, i);
1101
- }
1102
- return s.length ? Promise.all(s).then(() => n) : n;
1103
- };
1104
- });
1105
- function K(e, t, n, r, o, s) {
1106
- const i = n in r;
1107
- if (e.issues.length) {
1108
- if (o && s && !i)
1109
- return;
1110
- t.issues.push(...Ve(n, e.issues));
1111
- }
1112
- if (!i && !o) {
1113
- e.issues.length || t.issues.push({
1114
- code: "invalid_type",
1115
- expected: "nonoptional",
1116
- input: void 0,
1117
- path: [n]
1118
- });
1119
- return;
1120
- }
1121
- e.value === void 0 ? i && (t.value[n] = void 0) : t.value[n] = e.value;
1122
- }
1123
- function nt(e) {
1124
- const t = Object.keys(e.shape);
1125
- for (const r of t)
1126
- if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
1127
- throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
1128
- const n = wt(e.shape);
1129
- return {
1130
- ...e,
1131
- keys: t,
1132
- keySet: new Set(t),
1133
- numKeys: t.length,
1134
- optionalKeys: new Set(n)
1135
- };
1136
- }
1137
- function rt(e, t, n, r, o, s) {
1138
- const i = [], c = o.keySet, a = o.catchall._zod, f = a.def.type, l = a.optin === "optional", m = a.optout === "optional";
1139
- for (const h in t) {
1140
- if (h === "__proto__" || c.has(h))
1141
- continue;
1142
- if (f === "never") {
1143
- i.push(h);
1144
- continue;
1145
- }
1146
- const p = a.run({ value: t[h], issues: [] }, r);
1147
- p instanceof Promise ? e.push(p.then((_) => K(_, n, h, t, l, m))) : K(p, n, h, t, l, m);
1148
- }
1149
- return i.length && n.issues.push({
1150
- code: "unrecognized_keys",
1151
- keys: i,
1152
- input: t,
1153
- inst: s
1154
- }), e.length ? Promise.all(e).then(() => n) : n;
1155
- }
1156
- const sr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
1157
- if (y.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1158
- const c = t.shape;
1159
- Object.defineProperty(t, "shape", {
1160
- get: () => {
1161
- const a = { ...c };
1162
- return Object.defineProperty(t, "shape", {
1163
- value: a
1164
- }), a;
1165
- }
1166
- });
1167
- }
1168
- const r = ce(() => nt(t));
1169
- g(e._zod, "propValues", () => {
1170
- const c = t.shape, a = {};
1171
- for (const f in c) {
1172
- const l = c[f]._zod;
1173
- if (l.values) {
1174
- a[f] ?? (a[f] = /* @__PURE__ */ new Set());
1175
- for (const m of l.values)
1176
- a[f].add(m);
1177
- }
1178
- }
1179
- return a;
1180
- });
1181
- const o = G, s = t.catchall;
1182
- let i;
1183
- e._zod.parse = (c, a) => {
1184
- i ?? (i = r.value);
1185
- const f = c.value;
1186
- if (!o(f))
1187
- return c.issues.push({
1188
- expected: "object",
1189
- code: "invalid_type",
1190
- input: f,
1191
- inst: e
1192
- }), c;
1193
- c.value = {};
1194
- const l = [], m = i.shape;
1195
- for (const h of i.keys) {
1196
- const p = m[h], _ = p._zod.optin === "optional", x = p._zod.optout === "optional", k = p._zod.run({ value: f[h], issues: [] }, a);
1197
- k instanceof Promise ? l.push(k.then((ee) => K(ee, c, h, f, _, x))) : K(k, c, h, f, _, x);
1198
- }
1199
- return s ? rt(l, f, c, a, r.value, e) : l.length ? Promise.all(l).then(() => c) : c;
1200
- };
1201
- }), cr = /* @__PURE__ */ u("$ZodObjectJIT", (e, t) => {
1202
- sr.init(e, t);
1203
- const n = e._zod.parse, r = ce(() => nt(t)), o = (h) => {
1204
- const p = new En(["shape", "payload", "ctx"]), _ = r.value, x = (E) => {
1205
- const z = ve(E);
1206
- return `shape[${z}]._zod.run({ value: input[${z}], issues: [] }, ctx)`;
1207
- };
1208
- p.write("const input = payload.value;");
1209
- const k = /* @__PURE__ */ Object.create(null);
1210
- let ee = 0;
1211
- for (const E of _.keys)
1212
- k[E] = `key_${ee++}`;
1213
- p.write("const newResult = {};");
1214
- for (const E of _.keys) {
1215
- const z = k[E], $ = ve(E), he = h[E], me = he?._zod?.optin === "optional", gt = he?._zod?.optout === "optional";
1216
- p.write(`const ${z} = ${x(E)};`), me && gt ? p.write(`
1217
- if (${z}.issues.length) {
1218
- if (${$} in input) {
1219
- payload.issues = payload.issues.concat(${z}.issues.map(iss => ({
1220
- ...iss,
1221
- path: iss.path ? [${$}, ...iss.path] : [${$}]
1222
- })));
1223
- }
1224
- }
1225
-
1226
- if (${z}.value === undefined) {
1227
- if (${$} in input) {
1228
- newResult[${$}] = undefined;
1229
- }
1230
- } else {
1231
- newResult[${$}] = ${z}.value;
1232
- }
1233
-
1234
- `) : me ? p.write(`
1235
- if (${z}.issues.length) {
1236
- payload.issues = payload.issues.concat(${z}.issues.map(iss => ({
1237
- ...iss,
1238
- path: iss.path ? [${$}, ...iss.path] : [${$}]
1239
- })));
1240
- }
1241
-
1242
- if (${z}.value === undefined) {
1243
- if (${$} in input) {
1244
- newResult[${$}] = undefined;
1245
- }
1246
- } else {
1247
- newResult[${$}] = ${z}.value;
1248
- }
1249
-
1250
- `) : p.write(`
1251
- const ${z}_present = ${$} in input;
1252
- if (${z}.issues.length) {
1253
- payload.issues = payload.issues.concat(${z}.issues.map(iss => ({
1254
- ...iss,
1255
- path: iss.path ? [${$}, ...iss.path] : [${$}]
1256
- })));
1257
- }
1258
- if (!${z}_present && !${z}.issues.length) {
1259
- payload.issues.push({
1260
- code: "invalid_type",
1261
- expected: "nonoptional",
1262
- input: undefined,
1263
- path: [${$}]
1264
- });
1265
- }
1266
-
1267
- if (${z}_present) {
1268
- if (${z}.value === undefined) {
1269
- newResult[${$}] = undefined;
1270
- } else {
1271
- newResult[${$}] = ${z}.value;
1272
- }
1273
- }
1274
-
1275
- `);
1276
- }
1277
- p.write("payload.value = newResult;"), p.write("return payload;");
1278
- const _t = p.compile();
1279
- return (E, z) => _t(h, E, z);
1280
- };
1281
- let s;
1282
- const i = G, c = !se.jitless, f = c && zt.value, l = t.catchall;
1283
- let m;
1284
- e._zod.parse = (h, p) => {
1285
- m ?? (m = r.value);
1286
- const _ = h.value;
1287
- return i(_) ? c && f && p?.async === !1 && p.jitless !== !0 ? (s || (s = o(t.shape)), h = s(h, p), l ? rt([], _, h, p, m, e) : h) : n(h, p) : (h.issues.push({
1288
- expected: "object",
1289
- code: "invalid_type",
1290
- input: _,
1291
- inst: e
1292
- }), h);
1293
- };
1294
- });
1295
- function ye(e, t, n, r) {
1296
- for (const s of e)
1297
- if (s.issues.length === 0)
1298
- return t.value = s.value, t;
1299
- const o = e.filter((s) => !R(s));
1300
- return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
1301
- code: "invalid_union",
1302
- input: t.value,
1303
- inst: n,
1304
- errors: e.map((s) => s.issues.map((i) => j(i, r, N())))
1305
- }), t);
1306
- }
1307
- const ur = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
1308
- y.init(e, t), g(e._zod, "optin", () => t.options.some((r) => r._zod.optin === "optional") ? "optional" : void 0), g(e._zod, "optout", () => t.options.some((r) => r._zod.optout === "optional") ? "optional" : void 0), g(e._zod, "values", () => {
1309
- if (t.options.every((r) => r._zod.values))
1310
- return new Set(t.options.flatMap((r) => Array.from(r._zod.values)));
1311
- }), g(e._zod, "pattern", () => {
1312
- if (t.options.every((r) => r._zod.pattern)) {
1313
- const r = t.options.map((o) => o._zod.pattern);
1314
- return new RegExp(`^(${r.map((o) => ae(o.source)).join("|")})$`);
1315
- }
1316
- });
1317
- const n = t.options.length === 1 ? t.options[0]._zod.run : null;
1318
- e._zod.parse = (r, o) => {
1319
- if (n)
1320
- return n(r, o);
1321
- let s = !1;
1322
- const i = [];
1323
- for (const c of t.options) {
1324
- const a = c._zod.run({
1325
- value: r.value,
1326
- issues: []
1327
- }, o);
1328
- if (a instanceof Promise)
1329
- i.push(a), s = !0;
1330
- else {
1331
- if (a.issues.length === 0)
1332
- return a;
1333
- i.push(a);
1334
- }
1335
- }
1336
- return s ? Promise.all(i).then((c) => ye(c, r, e, o)) : ye(i, r, e, o);
1337
- };
1338
- }), ar = /* @__PURE__ */ u("$ZodIntersection", (e, t) => {
1339
- y.init(e, t), e._zod.parse = (n, r) => {
1340
- const o = n.value, s = t.left._zod.run({ value: o, issues: [] }, r), i = t.right._zod.run({ value: o, issues: [] }, r);
1341
- return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([a, f]) => we(n, a, f)) : we(n, s, i);
1342
- };
1343
- });
1344
- function oe(e, t) {
1345
- if (e === t)
1346
- return { valid: !0, data: e };
1347
- if (e instanceof Date && t instanceof Date && +e == +t)
1348
- return { valid: !0, data: e };
1349
- if (F(e) && F(t)) {
1350
- const n = Object.keys(t), r = Object.keys(e).filter((s) => n.indexOf(s) !== -1), o = { ...e, ...t };
1351
- for (const s of r) {
1352
- const i = oe(e[s], t[s]);
1353
- if (!i.valid)
1354
- return {
1355
- valid: !1,
1356
- mergeErrorPath: [s, ...i.mergeErrorPath]
1357
- };
1358
- o[s] = i.data;
1359
- }
1360
- return { valid: !0, data: o };
1361
- }
1362
- if (Array.isArray(e) && Array.isArray(t)) {
1363
- if (e.length !== t.length)
1364
- return { valid: !1, mergeErrorPath: [] };
1365
- const n = [];
1366
- for (let r = 0; r < e.length; r++) {
1367
- const o = e[r], s = t[r], i = oe(o, s);
1368
- if (!i.valid)
1369
- return {
1370
- valid: !1,
1371
- mergeErrorPath: [r, ...i.mergeErrorPath]
1372
- };
1373
- n.push(i.data);
1374
- }
1375
- return { valid: !0, data: n };
1376
- }
1377
- return { valid: !1, mergeErrorPath: [] };
1378
- }
1379
- function we(e, t, n) {
1380
- const r = /* @__PURE__ */ new Map();
1381
- let o;
1382
- for (const c of t.issues)
1383
- if (c.code === "unrecognized_keys") {
1384
- o ?? (o = c);
1385
- for (const a of c.keys)
1386
- r.has(a) || r.set(a, {}), r.get(a).l = !0;
1387
- } else
1388
- e.issues.push(c);
1389
- for (const c of n.issues)
1390
- if (c.code === "unrecognized_keys")
1391
- for (const a of c.keys)
1392
- r.has(a) || r.set(a, {}), r.get(a).r = !0;
1393
- else
1394
- e.issues.push(c);
1395
- const s = [...r].filter(([, c]) => c.l && c.r).map(([c]) => c);
1396
- if (s.length && o && e.issues.push({ ...o, keys: s }), R(e))
1397
- return e;
1398
- const i = oe(t.value, n.value);
1399
- if (!i.valid)
1400
- throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);
1401
- return e.value = i.data, e;
1402
- }
1403
- const fr = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
1404
- y.init(e, t);
1405
- const n = Me(t.entries), r = new Set(n);
1406
- e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => yt.has(typeof o)).map((o) => typeof o == "string" ? X(o) : o.toString()).join("|")})$`), e._zod.parse = (o, s) => {
1407
- const i = o.value;
1408
- return r.has(i) || o.issues.push({
1409
- code: "invalid_value",
1410
- values: n,
1411
- input: i,
1412
- inst: e
1413
- }), o;
1414
- };
1415
- }), lr = /* @__PURE__ */ u("$ZodTransform", (e, t) => {
1416
- y.init(e, t), e._zod.optin = "optional", e._zod.parse = (n, r) => {
1417
- if (r.direction === "backward")
1418
- throw new Fe(e.constructor.name);
1419
- const o = t.transform(n.value, n);
1420
- if (r.async)
1421
- return (o instanceof Promise ? o : Promise.resolve(o)).then((i) => (n.value = i, n.fallback = !0, n));
1422
- if (o instanceof Promise)
1423
- throw new C();
1424
- return n.value = o, n.fallback = !0, n;
1425
- };
1426
- });
1427
- function ke(e, t) {
1428
- return t === void 0 && (e.issues.length || e.fallback) ? { issues: [], value: void 0 } : e;
1429
- }
1430
- const ot = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
1431
- y.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", g(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), g(e._zod, "pattern", () => {
1432
- const n = t.innerType._zod.pattern;
1433
- return n ? new RegExp(`^(${ae(n.source)})?$`) : void 0;
1434
- }), e._zod.parse = (n, r) => {
1435
- if (t.innerType._zod.optin === "optional") {
1436
- const o = n.value, s = t.innerType._zod.run(n, r);
1437
- return s instanceof Promise ? s.then((i) => ke(i, o)) : ke(s, o);
1438
- }
1439
- return n.value === void 0 ? n : t.innerType._zod.run(n, r);
1440
- };
1441
- }), dr = /* @__PURE__ */ u("$ZodExactOptional", (e, t) => {
1442
- ot.init(e, t), g(e._zod, "values", () => t.innerType._zod.values), g(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
1443
- }), pr = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
1444
- y.init(e, t), g(e._zod, "optin", () => t.innerType._zod.optin), g(e._zod, "optout", () => t.innerType._zod.optout), g(e._zod, "pattern", () => {
1445
- const n = t.innerType._zod.pattern;
1446
- return n ? new RegExp(`^(${ae(n.source)}|null)$`) : void 0;
1447
- }), g(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
1448
- }), hr = /* @__PURE__ */ u("$ZodDefault", (e, t) => {
1449
- y.init(e, t), e._zod.optin = "optional", g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1450
- if (r.direction === "backward")
1451
- return t.innerType._zod.run(n, r);
1452
- if (n.value === void 0)
1453
- return n.value = t.defaultValue, n;
1454
- const o = t.innerType._zod.run(n, r);
1455
- return o instanceof Promise ? o.then((s) => $e(s, t)) : $e(o, t);
1456
- };
1457
- });
1458
- function $e(e, t) {
1459
- return e.value === void 0 && (e.value = t.defaultValue), e;
1460
- }
1461
- const mr = /* @__PURE__ */ u("$ZodPrefault", (e, t) => {
1462
- y.init(e, t), e._zod.optin = "optional", g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
1463
- }), _r = /* @__PURE__ */ u("$ZodNonOptional", (e, t) => {
1464
- y.init(e, t), g(e._zod, "values", () => {
1465
- const n = t.innerType._zod.values;
1466
- return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
1467
- }), e._zod.parse = (n, r) => {
1468
- const o = t.innerType._zod.run(n, r);
1469
- return o instanceof Promise ? o.then((s) => Ze(s, e)) : Ze(o, e);
1470
- };
1471
- });
1472
- function Ze(e, t) {
1473
- return !e.issues.length && e.value === void 0 && e.issues.push({
1474
- code: "invalid_type",
1475
- expected: "nonoptional",
1476
- input: e.value,
1477
- inst: t
1478
- }), e;
1479
- }
1480
- const gr = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
1481
- y.init(e, t), e._zod.optin = "optional", g(e._zod, "optout", () => t.innerType._zod.optout), g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1482
- if (r.direction === "backward")
1483
- return t.innerType._zod.run(n, r);
1484
- const o = t.innerType._zod.run(n, r);
1485
- return o instanceof Promise ? o.then((s) => (n.value = s.value, s.issues.length && (n.value = t.catchValue({
1486
- ...n,
1487
- error: {
1488
- issues: s.issues.map((i) => j(i, r, N()))
1489
- },
1490
- input: n.value
1491
- }), n.issues = [], n.fallback = !0), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
1492
- ...n,
1493
- error: {
1494
- issues: o.issues.map((s) => j(s, r, N()))
1495
- },
1496
- input: n.value
1497
- }), n.issues = [], n.fallback = !0), n);
1498
- };
1499
- }), vr = /* @__PURE__ */ u("$ZodPipe", (e, t) => {
1500
- y.init(e, t), g(e._zod, "values", () => t.in._zod.values), g(e._zod, "optin", () => t.in._zod.optin), g(e._zod, "optout", () => t.out._zod.optout), g(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
1501
- if (r.direction === "backward") {
1502
- const s = t.out._zod.run(n, r);
1503
- return s instanceof Promise ? s.then((i) => V(i, t.in, r)) : V(s, t.in, r);
1504
- }
1505
- const o = t.in._zod.run(n, r);
1506
- return o instanceof Promise ? o.then((s) => V(s, t.out, r)) : V(o, t.out, r);
1507
- };
1508
- });
1509
- function V(e, t, n) {
1510
- return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues, fallback: e.fallback }, n);
1511
- }
1512
- const br = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
1513
- y.init(e, t), g(e._zod, "propValues", () => t.innerType._zod.propValues), g(e._zod, "values", () => t.innerType._zod.values), g(e._zod, "optin", () => t.innerType?._zod?.optin), g(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
1514
- if (r.direction === "backward")
1515
- return t.innerType._zod.run(n, r);
1516
- const o = t.innerType._zod.run(n, r);
1517
- return o instanceof Promise ? o.then(Oe) : Oe(o);
1518
- };
1519
- });
1520
- function Oe(e) {
1521
- return e.value = Object.freeze(e.value), e;
1522
- }
1523
- const zr = /* @__PURE__ */ u("$ZodCustom", (e, t) => {
1524
- S.init(e, t), y.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
1525
- const r = n.value, o = t.fn(r);
1526
- if (o instanceof Promise)
1527
- return o.then((s) => Se(s, n, r, e));
1528
- Se(o, n, r, e);
1529
- };
1530
- });
1531
- function Se(e, t, n, r) {
1532
- if (!e) {
1533
- const o = {
1534
- code: "custom",
1535
- input: n,
1536
- inst: r,
1537
- // incorporates params.error into issue reporting
1538
- path: [...r._zod.def.path ?? []],
1539
- // incorporates params.error into issue reporting
1540
- continue: !r._zod.def.abort
1541
- // params: inst._zod.def.params,
1542
- };
1543
- r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(M(o));
1544
- }
1545
- }
1546
- var Ie;
1547
- class yr {
1548
- constructor() {
1549
- this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1550
- }
1551
- add(t, ...n) {
1552
- const r = n[0];
1553
- return this._map.set(t, r), r && typeof r == "object" && "id" in r && this._idmap.set(r.id, t), this;
1554
- }
1555
- clear() {
1556
- return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
1557
- }
1558
- remove(t) {
1559
- const n = this._map.get(t);
1560
- return n && typeof n == "object" && "id" in n && this._idmap.delete(n.id), this._map.delete(t), this;
1561
- }
1562
- get(t) {
1563
- const n = t._zod.parent;
1564
- if (n) {
1565
- const r = { ...this.get(n) ?? {} };
1566
- delete r.id;
1567
- const o = { ...r, ...this._map.get(t) };
1568
- return Object.keys(o).length ? o : void 0;
1569
- }
1570
- return this._map.get(t);
1571
- }
1572
- has(t) {
1573
- return this._map.has(t);
1574
- }
1575
- }
1576
- function wr() {
1577
- return new yr();
1578
- }
1579
- (Ie = globalThis).__zod_globalRegistry ?? (Ie.__zod_globalRegistry = wr());
1580
- const U = globalThis.__zod_globalRegistry;
1581
- // @__NO_SIDE_EFFECTS__
1582
- function kr(e, t) {
1583
- return new e({
1584
- type: "string",
1585
- ...d(t)
1586
- });
1587
- }
1588
- // @__NO_SIDE_EFFECTS__
1589
- function $r(e, t) {
1590
- return new e({
1591
- type: "string",
1592
- format: "email",
1593
- check: "string_format",
1594
- abort: !1,
1595
- ...d(t)
1596
- });
1597
- }
1598
- // @__NO_SIDE_EFFECTS__
1599
- function Ee(e, t) {
1600
- return new e({
1601
- type: "string",
1602
- format: "guid",
1603
- check: "string_format",
1604
- abort: !1,
1605
- ...d(t)
1606
- });
1607
- }
1608
- // @__NO_SIDE_EFFECTS__
1609
- function Zr(e, t) {
1610
- return new e({
1611
- type: "string",
1612
- format: "uuid",
1613
- check: "string_format",
1614
- abort: !1,
1615
- ...d(t)
1616
- });
1617
- }
1618
- // @__NO_SIDE_EFFECTS__
1619
- function Or(e, t) {
1620
- return new e({
1621
- type: "string",
1622
- format: "uuid",
1623
- check: "string_format",
1624
- abort: !1,
1625
- version: "v4",
1626
- ...d(t)
1627
- });
1628
- }
1629
- // @__NO_SIDE_EFFECTS__
1630
- function Sr(e, t) {
1631
- return new e({
1632
- type: "string",
1633
- format: "uuid",
1634
- check: "string_format",
1635
- abort: !1,
1636
- version: "v6",
1637
- ...d(t)
1638
- });
1639
- }
1640
- // @__NO_SIDE_EFFECTS__
1641
- function Ir(e, t) {
1642
- return new e({
1643
- type: "string",
1644
- format: "uuid",
1645
- check: "string_format",
1646
- abort: !1,
1647
- version: "v7",
1648
- ...d(t)
1649
- });
1650
- }
1651
- // @__NO_SIDE_EFFECTS__
1652
- function Er(e, t) {
1653
- return new e({
1654
- type: "string",
1655
- format: "url",
1656
- check: "string_format",
1657
- abort: !1,
1658
- ...d(t)
1659
- });
1660
- }
1661
- // @__NO_SIDE_EFFECTS__
1662
- function Pr(e, t) {
1663
- return new e({
1664
- type: "string",
1665
- format: "emoji",
1666
- check: "string_format",
1667
- abort: !1,
1668
- ...d(t)
1669
- });
1670
- }
1671
- // @__NO_SIDE_EFFECTS__
1672
- function Tr(e, t) {
1673
- return new e({
1674
- type: "string",
1675
- format: "nanoid",
1676
- check: "string_format",
1677
- abort: !1,
1678
- ...d(t)
1679
- });
1680
- }
1681
- // @__NO_SIDE_EFFECTS__
1682
- function Nr(e, t) {
1683
- return new e({
1684
- type: "string",
1685
- format: "cuid",
1686
- check: "string_format",
1687
- abort: !1,
1688
- ...d(t)
1689
- });
1690
- }
1691
- // @__NO_SIDE_EFFECTS__
1692
- function jr(e, t) {
1693
- return new e({
1694
- type: "string",
1695
- format: "cuid2",
1696
- check: "string_format",
1697
- abort: !1,
1698
- ...d(t)
1699
- });
1700
- }
1701
- // @__NO_SIDE_EFFECTS__
1702
- function Ar(e, t) {
1703
- return new e({
1704
- type: "string",
1705
- format: "ulid",
1706
- check: "string_format",
1707
- abort: !1,
1708
- ...d(t)
1709
- });
1710
- }
1711
- // @__NO_SIDE_EFFECTS__
1712
- function Rr(e, t) {
1713
- return new e({
1714
- type: "string",
1715
- format: "xid",
1716
- check: "string_format",
1717
- abort: !1,
1718
- ...d(t)
1719
- });
1720
- }
1721
- // @__NO_SIDE_EFFECTS__
1722
- function Cr(e, t) {
1723
- return new e({
1724
- type: "string",
1725
- format: "ksuid",
1726
- check: "string_format",
1727
- abort: !1,
1728
- ...d(t)
1729
- });
1730
- }
1731
- // @__NO_SIDE_EFFECTS__
1732
- function Dr(e, t) {
1733
- return new e({
1734
- type: "string",
1735
- format: "ipv4",
1736
- check: "string_format",
1737
- abort: !1,
1738
- ...d(t)
1739
- });
1740
- }
1741
- // @__NO_SIDE_EFFECTS__
1742
- function xr(e, t) {
1743
- return new e({
1744
- type: "string",
1745
- format: "ipv6",
1746
- check: "string_format",
1747
- abort: !1,
1748
- ...d(t)
1749
- });
1750
- }
1751
- // @__NO_SIDE_EFFECTS__
1752
- function Ur(e, t) {
1753
- return new e({
1754
- type: "string",
1755
- format: "cidrv4",
1756
- check: "string_format",
1757
- abort: !1,
1758
- ...d(t)
1759
- });
1760
- }
1761
- // @__NO_SIDE_EFFECTS__
1762
- function Fr(e, t) {
1763
- return new e({
1764
- type: "string",
1765
- format: "cidrv6",
1766
- check: "string_format",
1767
- abort: !1,
1768
- ...d(t)
1769
- });
1770
- }
1771
- // @__NO_SIDE_EFFECTS__
1772
- function Mr(e, t) {
1773
- return new e({
1774
- type: "string",
1775
- format: "base64",
1776
- check: "string_format",
1777
- abort: !1,
1778
- ...d(t)
1779
- });
1780
- }
1781
- // @__NO_SIDE_EFFECTS__
1782
- function Jr(e, t) {
1783
- return new e({
1784
- type: "string",
1785
- format: "base64url",
1786
- check: "string_format",
1787
- abort: !1,
1788
- ...d(t)
1789
- });
1790
- }
1791
- // @__NO_SIDE_EFFECTS__
1792
- function Lr(e, t) {
1793
- return new e({
1794
- type: "string",
1795
- format: "e164",
1796
- check: "string_format",
1797
- abort: !1,
1798
- ...d(t)
1799
- });
1800
- }
1801
- // @__NO_SIDE_EFFECTS__
1802
- function Vr(e, t) {
1803
- return new e({
1804
- type: "string",
1805
- format: "jwt",
1806
- check: "string_format",
1807
- abort: !1,
1808
- ...d(t)
1809
- });
1810
- }
1811
- // @__NO_SIDE_EFFECTS__
1812
- function Wr(e, t) {
1813
- return new e({
1814
- type: "string",
1815
- format: "datetime",
1816
- check: "string_format",
1817
- offset: !1,
1818
- local: !1,
1819
- precision: null,
1820
- ...d(t)
1821
- });
1822
- }
1823
- // @__NO_SIDE_EFFECTS__
1824
- function Gr(e, t) {
1825
- return new e({
1826
- type: "string",
1827
- format: "date",
1828
- check: "string_format",
1829
- ...d(t)
1830
- });
1831
- }
1832
- // @__NO_SIDE_EFFECTS__
1833
- function Kr(e, t) {
1834
- return new e({
1835
- type: "string",
1836
- format: "time",
1837
- check: "string_format",
1838
- precision: null,
1839
- ...d(t)
1840
- });
1841
- }
1842
- // @__NO_SIDE_EFFECTS__
1843
- function Br(e, t) {
1844
- return new e({
1845
- type: "string",
1846
- format: "duration",
1847
- check: "string_format",
1848
- ...d(t)
1849
- });
1850
- }
1851
- // @__NO_SIDE_EFFECTS__
1852
- function Yr(e, t) {
1853
- return new e({
1854
- type: "number",
1855
- checks: [],
1856
- ...d(t)
1857
- });
1858
- }
1859
- // @__NO_SIDE_EFFECTS__
1860
- function Xr(e, t) {
1861
- return new e({
1862
- type: "number",
1863
- check: "number_format",
1864
- abort: !1,
1865
- format: "safeint",
1866
- ...d(t)
1867
- });
1868
- }
1869
- // @__NO_SIDE_EFFECTS__
1870
- function qr(e) {
1871
- return new e({
1872
- type: "unknown"
1873
- });
1874
- }
1875
- // @__NO_SIDE_EFFECTS__
1876
- function Hr(e, t) {
1877
- return new e({
1878
- type: "never",
1879
- ...d(t)
1880
- });
1881
- }
1882
- // @__NO_SIDE_EFFECTS__
1883
- function Pe(e, t) {
1884
- return new He({
1885
- check: "less_than",
1886
- ...d(t),
1887
- value: e,
1888
- inclusive: !1
1889
- });
1890
- }
1891
- // @__NO_SIDE_EFFECTS__
1892
- function te(e, t) {
1893
- return new He({
1894
- check: "less_than",
1895
- ...d(t),
1896
- value: e,
1897
- inclusive: !0
1898
- });
1899
- }
1900
- // @__NO_SIDE_EFFECTS__
1901
- function Te(e, t) {
1902
- return new Qe({
1903
- check: "greater_than",
1904
- ...d(t),
1905
- value: e,
1906
- inclusive: !1
1907
- });
1908
- }
1909
- // @__NO_SIDE_EFFECTS__
1910
- function ne(e, t) {
1911
- return new Qe({
1912
- check: "greater_than",
1913
- ...d(t),
1914
- value: e,
1915
- inclusive: !0
1916
- });
1917
- }
1918
- // @__NO_SIDE_EFFECTS__
1919
- function Ne(e, t) {
1920
- return new gn({
1921
- check: "multiple_of",
1922
- ...d(t),
1923
- value: e
1924
- });
1925
- }
1926
- // @__NO_SIDE_EFFECTS__
1927
- function it(e, t) {
1928
- return new bn({
1929
- check: "max_length",
1930
- ...d(t),
1931
- maximum: e
1932
- });
1933
- }
1934
- // @__NO_SIDE_EFFECTS__
1935
- function B(e, t) {
1936
- return new zn({
1937
- check: "min_length",
1938
- ...d(t),
1939
- minimum: e
1940
- });
1941
- }
1942
- // @__NO_SIDE_EFFECTS__
1943
- function st(e, t) {
1944
- return new yn({
1945
- check: "length_equals",
1946
- ...d(t),
1947
- length: e
1948
- });
1949
- }
1950
- // @__NO_SIDE_EFFECTS__
1951
- function Qr(e, t) {
1952
- return new wn({
1953
- check: "string_format",
1954
- format: "regex",
1955
- ...d(t),
1956
- pattern: e
1957
- });
1958
- }
1959
- // @__NO_SIDE_EFFECTS__
1960
- function eo(e) {
1961
- return new kn({
1962
- check: "string_format",
1963
- format: "lowercase",
1964
- ...d(e)
1965
- });
1966
- }
1967
- // @__NO_SIDE_EFFECTS__
1968
- function to(e) {
1969
- return new $n({
1970
- check: "string_format",
1971
- format: "uppercase",
1972
- ...d(e)
1973
- });
1974
- }
1975
- // @__NO_SIDE_EFFECTS__
1976
- function no(e, t) {
1977
- return new Zn({
1978
- check: "string_format",
1979
- format: "includes",
1980
- ...d(t),
1981
- includes: e
1982
- });
1983
- }
1984
- // @__NO_SIDE_EFFECTS__
1985
- function ro(e, t) {
1986
- return new On({
1987
- check: "string_format",
1988
- format: "starts_with",
1989
- ...d(t),
1990
- prefix: e
1991
- });
1992
- }
1993
- // @__NO_SIDE_EFFECTS__
1994
- function oo(e, t) {
1995
- return new Sn({
1996
- check: "string_format",
1997
- format: "ends_with",
1998
- ...d(t),
1999
- suffix: e
2000
- });
2001
- }
2002
- // @__NO_SIDE_EFFECTS__
2003
- function D(e) {
2004
- return new In({
2005
- check: "overwrite",
2006
- tx: e
2007
- });
2008
- }
2009
- // @__NO_SIDE_EFFECTS__
2010
- function io(e) {
2011
- return /* @__PURE__ */ D((t) => t.normalize(e));
2012
- }
2013
- // @__NO_SIDE_EFFECTS__
2014
- function so() {
2015
- return /* @__PURE__ */ D((e) => e.trim());
2016
- }
2017
- // @__NO_SIDE_EFFECTS__
2018
- function co() {
2019
- return /* @__PURE__ */ D((e) => e.toLowerCase());
2020
- }
2021
- // @__NO_SIDE_EFFECTS__
2022
- function uo() {
2023
- return /* @__PURE__ */ D((e) => e.toUpperCase());
2024
- }
2025
- // @__NO_SIDE_EFFECTS__
2026
- function ao() {
2027
- return /* @__PURE__ */ D((e) => bt(e));
2028
- }
2029
- // @__NO_SIDE_EFFECTS__
2030
- function fo(e, t, n) {
2031
- return new e({
2032
- type: "array",
2033
- element: t,
2034
- // get element() {
2035
- // return element;
2036
- // },
2037
- ...d(n)
2038
- });
2039
- }
2040
- // @__NO_SIDE_EFFECTS__
2041
- function lo(e, t, n) {
2042
- const r = d(n);
2043
- return r.abort ?? (r.abort = !0), new e({
2044
- type: "custom",
2045
- check: "custom",
2046
- fn: t,
2047
- ...r
2048
- });
2049
- }
2050
- // @__NO_SIDE_EFFECTS__
2051
- function po(e, t, n) {
2052
- return new e({
2053
- type: "custom",
2054
- check: "custom",
2055
- fn: t,
2056
- ...d(n)
2057
- });
2058
- }
2059
- // @__NO_SIDE_EFFECTS__
2060
- function ho(e, t) {
2061
- const n = /* @__PURE__ */ mo((r) => (r.addIssue = (o) => {
2062
- if (typeof o == "string")
2063
- r.issues.push(M(o, r.value, n._zod.def));
2064
- else {
2065
- const s = o;
2066
- s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = r.value), s.inst ?? (s.inst = n), s.continue ?? (s.continue = !n._zod.def.abort), r.issues.push(M(s));
2067
- }
2068
- }, e(r.value, r)), t);
2069
- return n;
2070
- }
2071
- // @__NO_SIDE_EFFECTS__
2072
- function mo(e, t) {
2073
- const n = new S({
2074
- check: "custom",
2075
- ...d(t)
2076
- });
2077
- return n._zod.check = e, n;
2078
- }
2079
- function ct(e) {
2080
- let t = e?.target ?? "draft-2020-12";
2081
- return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
2082
- processors: e.processors ?? {},
2083
- metadataRegistry: e?.metadata ?? U,
2084
- target: t,
2085
- unrepresentable: e?.unrepresentable ?? "throw",
2086
- override: e?.override ?? (() => {
2087
- }),
2088
- io: e?.io ?? "output",
2089
- counter: 0,
2090
- seen: /* @__PURE__ */ new Map(),
2091
- cycles: e?.cycles ?? "ref",
2092
- reused: e?.reused ?? "inline",
2093
- external: e?.external ?? void 0
2094
- };
2095
- }
2096
- function Z(e, t, n = { path: [], schemaPath: [] }) {
2097
- var r;
2098
- const o = e._zod.def, s = t.seen.get(e);
2099
- if (s)
2100
- return s.count++, n.schemaPath.includes(e) && (s.cycle = n.path), s.schema;
2101
- const i = { schema: {}, count: 1, cycle: void 0, path: n.path };
2102
- t.seen.set(e, i);
2103
- const c = e._zod.toJSONSchema?.();
2104
- if (c)
2105
- i.schema = c;
2106
- else {
2107
- const l = {
2108
- ...n,
2109
- schemaPath: [...n.schemaPath, e],
2110
- path: n.path
2111
- };
2112
- if (e._zod.processJSONSchema)
2113
- e._zod.processJSONSchema(t, i.schema, l);
2114
- else {
2115
- const h = i.schema, p = t.processors[o.type];
2116
- if (!p)
2117
- throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
2118
- p(e, t, h, l);
2119
- }
2120
- const m = e._zod.parent;
2121
- m && (i.ref || (i.ref = m), Z(m, t, l), t.seen.get(m).isParent = !0);
2122
- }
2123
- const a = t.metadataRegistry.get(e);
2124
- return a && Object.assign(i.schema, a), t.io === "input" && O(e) && (delete i.schema.examples, delete i.schema.default), t.io === "input" && "_prefault" in i.schema && ((r = i.schema).default ?? (r.default = i.schema._prefault)), delete i.schema._prefault, t.seen.get(e).schema;
2125
- }
2126
- function ut(e, t) {
2127
- const n = e.seen.get(t);
2128
- if (!n)
2129
- throw new Error("Unprocessed schema. This is a bug in Zod.");
2130
- const r = /* @__PURE__ */ new Map();
2131
- for (const i of e.seen.entries()) {
2132
- const c = e.metadataRegistry.get(i[0])?.id;
2133
- if (c) {
2134
- const a = r.get(c);
2135
- if (a && a !== i[0])
2136
- throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
2137
- r.set(c, i[0]);
2138
- }
2139
- }
2140
- const o = (i) => {
2141
- const c = e.target === "draft-2020-12" ? "$defs" : "definitions";
2142
- if (e.external) {
2143
- const m = e.external.registry.get(i[0])?.id, h = e.external.uri ?? ((_) => _);
2144
- if (m)
2145
- return { ref: h(m) };
2146
- const p = i[1].defId ?? i[1].schema.id ?? `schema${e.counter++}`;
2147
- return i[1].defId = p, { defId: p, ref: `${h("__shared")}#/${c}/${p}` };
2148
- }
2149
- if (i[1] === n)
2150
- return { ref: "#" };
2151
- const f = `#/${c}/`, l = i[1].schema.id ?? `__schema${e.counter++}`;
2152
- return { defId: l, ref: f + l };
2153
- }, s = (i) => {
2154
- if (i[1].schema.$ref)
2155
- return;
2156
- const c = i[1], { ref: a, defId: f } = o(i);
2157
- c.def = { ...c.schema }, f && (c.defId = f);
2158
- const l = c.schema;
2159
- for (const m in l)
2160
- delete l[m];
2161
- l.$ref = a;
2162
- };
2163
- if (e.cycles === "throw")
2164
- for (const i of e.seen.entries()) {
2165
- const c = i[1];
2166
- if (c.cycle)
2167
- throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
2168
-
2169
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
2170
- }
2171
- for (const i of e.seen.entries()) {
2172
- const c = i[1];
2173
- if (t === i[0]) {
2174
- s(i);
2175
- continue;
2176
- }
2177
- if (e.external) {
2178
- const f = e.external.registry.get(i[0])?.id;
2179
- if (t !== i[0] && f) {
2180
- s(i);
2181
- continue;
2182
- }
2183
- }
2184
- if (e.metadataRegistry.get(i[0])?.id) {
2185
- s(i);
2186
- continue;
2187
- }
2188
- if (c.cycle) {
2189
- s(i);
2190
- continue;
2191
- }
2192
- if (c.count > 1 && e.reused === "ref") {
2193
- s(i);
2194
- continue;
2195
- }
2196
- }
2197
- }
2198
- function at(e, t) {
2199
- const n = e.seen.get(t);
2200
- if (!n)
2201
- throw new Error("Unprocessed schema. This is a bug in Zod.");
2202
- const r = (c) => {
2203
- const a = e.seen.get(c);
2204
- if (a.ref === null)
2205
- return;
2206
- const f = a.def ?? a.schema, l = { ...f }, m = a.ref;
2207
- if (a.ref = null, m) {
2208
- r(m);
2209
- const p = e.seen.get(m), _ = p.schema;
2210
- if (_.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (f.allOf = f.allOf ?? [], f.allOf.push(_)) : Object.assign(f, _), Object.assign(f, l), c._zod.parent === m)
2211
- for (const k in f)
2212
- k === "$ref" || k === "allOf" || k in l || delete f[k];
2213
- if (_.$ref && p.def)
2214
- for (const k in f)
2215
- k === "$ref" || k === "allOf" || k in p.def && JSON.stringify(f[k]) === JSON.stringify(p.def[k]) && delete f[k];
2216
- }
2217
- const h = c._zod.parent;
2218
- if (h && h !== m) {
2219
- r(h);
2220
- const p = e.seen.get(h);
2221
- if (p?.schema.$ref && (f.$ref = p.schema.$ref, p.def))
2222
- for (const _ in f)
2223
- _ === "$ref" || _ === "allOf" || _ in p.def && JSON.stringify(f[_]) === JSON.stringify(p.def[_]) && delete f[_];
2224
- }
2225
- e.override({
2226
- zodSchema: c,
2227
- jsonSchema: f,
2228
- path: a.path ?? []
2229
- });
2230
- };
2231
- for (const c of [...e.seen.entries()].reverse())
2232
- r(c[0]);
2233
- const o = {};
2234
- if (e.target === "draft-2020-12" ? o.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? o.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? o.$schema = "http://json-schema.org/draft-04/schema#" : e.target, e.external?.uri) {
2235
- const c = e.external.registry.get(t)?.id;
2236
- if (!c)
2237
- throw new Error("Schema is missing an `id` property");
2238
- o.$id = e.external.uri(c);
2239
- }
2240
- Object.assign(o, n.def ?? n.schema);
2241
- const s = e.metadataRegistry.get(t)?.id;
2242
- s !== void 0 && o.id === s && delete o.id;
2243
- const i = e.external?.defs ?? {};
2244
- for (const c of e.seen.entries()) {
2245
- const a = c[1];
2246
- a.def && a.defId && (a.def.id === a.defId && delete a.def.id, i[a.defId] = a.def);
2247
- }
2248
- e.external || Object.keys(i).length > 0 && (e.target === "draft-2020-12" ? o.$defs = i : o.definitions = i);
2249
- try {
2250
- const c = JSON.parse(JSON.stringify(o));
2251
- return Object.defineProperty(c, "~standard", {
2252
- value: {
2253
- ...t["~standard"],
2254
- jsonSchema: {
2255
- input: Y(t, "input", e.processors),
2256
- output: Y(t, "output", e.processors)
2257
- }
2258
- },
2259
- enumerable: !1,
2260
- writable: !1
2261
- }), c;
2262
- } catch {
2263
- throw new Error("Error converting schema to JSON.");
2264
- }
2265
- }
2266
- function O(e, t) {
2267
- const n = t ?? { seen: /* @__PURE__ */ new Set() };
2268
- if (n.seen.has(e))
2269
- return !1;
2270
- n.seen.add(e);
2271
- const r = e._zod.def;
2272
- if (r.type === "transform")
2273
- return !0;
2274
- if (r.type === "array")
2275
- return O(r.element, n);
2276
- if (r.type === "set")
2277
- return O(r.valueType, n);
2278
- if (r.type === "lazy")
2279
- return O(r.getter(), n);
2280
- if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault")
2281
- return O(r.innerType, n);
2282
- if (r.type === "intersection")
2283
- return O(r.left, n) || O(r.right, n);
2284
- if (r.type === "record" || r.type === "map")
2285
- return O(r.keyType, n) || O(r.valueType, n);
2286
- if (r.type === "pipe")
2287
- return e._zod.traits.has("$ZodCodec") ? !0 : O(r.in, n) || O(r.out, n);
2288
- if (r.type === "object") {
2289
- for (const o in r.shape)
2290
- if (O(r.shape[o], n))
2291
- return !0;
2292
- return !1;
2293
- }
2294
- if (r.type === "union") {
2295
- for (const o of r.options)
2296
- if (O(o, n))
2297
- return !0;
2298
- return !1;
2299
- }
2300
- if (r.type === "tuple") {
2301
- for (const o of r.items)
2302
- if (O(o, n))
2303
- return !0;
2304
- return !!(r.rest && O(r.rest, n));
2305
- }
2306
- return !1;
2307
- }
2308
- const _o = (e, t = {}) => (n) => {
2309
- const r = ct({ ...n, processors: t });
2310
- return Z(e, r), ut(r, e), at(r, e);
2311
- }, Y = (e, t, n = {}) => (r) => {
2312
- const { libraryOptions: o, target: s } = r ?? {}, i = ct({ ...o ?? {}, target: s, io: t, processors: n });
2313
- return Z(e, i), ut(i, e), at(i, e);
2314
- }, go = {
2315
- guid: "uuid",
2316
- url: "uri",
2317
- datetime: "date-time",
2318
- json_string: "json-string",
2319
- regex: ""
2320
- // do not set
2321
- }, vo = (e, t, n, r) => {
2322
- const o = n;
2323
- o.type = "string";
2324
- const { minimum: s, maximum: i, format: c, patterns: a, contentEncoding: f } = e._zod.bag;
2325
- if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), c && (o.format = go[c] ?? c, o.format === "" && delete o.format, c === "time" && delete o.format), f && (o.contentEncoding = f), a && a.size > 0) {
2326
- const l = [...a];
2327
- l.length === 1 ? o.pattern = l[0].source : l.length > 1 && (o.allOf = [
2328
- ...l.map((m) => ({
2329
- ...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
2330
- pattern: m.source
2331
- }))
2332
- ]);
2333
- }
2334
- }, bo = (e, t, n, r) => {
2335
- const o = n, { minimum: s, maximum: i, format: c, multipleOf: a, exclusiveMaximum: f, exclusiveMinimum: l } = e._zod.bag;
2336
- typeof c == "string" && c.includes("int") ? o.type = "integer" : o.type = "number";
2337
- const m = typeof l == "number" && l >= (s ?? Number.NEGATIVE_INFINITY), h = typeof f == "number" && f <= (i ?? Number.POSITIVE_INFINITY), p = t.target === "draft-04" || t.target === "openapi-3.0";
2338
- m ? p ? (o.minimum = l, o.exclusiveMinimum = !0) : o.exclusiveMinimum = l : typeof s == "number" && (o.minimum = s), h ? p ? (o.maximum = f, o.exclusiveMaximum = !0) : o.exclusiveMaximum = f : typeof i == "number" && (o.maximum = i), typeof a == "number" && (o.multipleOf = a);
2339
- }, zo = (e, t, n, r) => {
2340
- n.not = {};
2341
- }, yo = (e, t, n, r) => {
2342
- }, wo = (e, t, n, r) => {
2343
- const o = e._zod.def, s = Me(o.entries);
2344
- s.every((i) => typeof i == "number") && (n.type = "number"), s.every((i) => typeof i == "string") && (n.type = "string"), n.enum = s;
2345
- }, ko = (e, t, n, r) => {
2346
- if (t.unrepresentable === "throw")
2347
- throw new Error("Custom types cannot be represented in JSON Schema");
2348
- }, $o = (e, t, n, r) => {
2349
- if (t.unrepresentable === "throw")
2350
- throw new Error("Transforms cannot be represented in JSON Schema");
2351
- }, Zo = (e, t, n, r) => {
2352
- const o = n, s = e._zod.def, { minimum: i, maximum: c } = e._zod.bag;
2353
- typeof i == "number" && (o.minItems = i), typeof c == "number" && (o.maxItems = c), o.type = "array", o.items = Z(s.element, t, {
2354
- ...r,
2355
- path: [...r.path, "items"]
2356
- });
2357
- }, Oo = (e, t, n, r) => {
2358
- const o = n, s = e._zod.def;
2359
- o.type = "object", o.properties = {};
2360
- const i = s.shape;
2361
- for (const f in i)
2362
- o.properties[f] = Z(i[f], t, {
2363
- ...r,
2364
- path: [...r.path, "properties", f]
2365
- });
2366
- const c = new Set(Object.keys(i)), a = new Set([...c].filter((f) => {
2367
- const l = s.shape[f]._zod;
2368
- return t.io === "input" ? l.optin === void 0 : l.optout === void 0;
2369
- }));
2370
- a.size > 0 && (o.required = Array.from(a)), s.catchall?._zod.def.type === "never" ? o.additionalProperties = !1 : s.catchall ? s.catchall && (o.additionalProperties = Z(s.catchall, t, {
2371
- ...r,
2372
- path: [...r.path, "additionalProperties"]
2373
- })) : t.io === "output" && (o.additionalProperties = !1);
2374
- }, So = (e, t, n, r) => {
2375
- const o = e._zod.def, s = o.inclusive === !1, i = o.options.map((c, a) => Z(c, t, {
2376
- ...r,
2377
- path: [...r.path, s ? "oneOf" : "anyOf", a]
2378
- }));
2379
- s ? n.oneOf = i : n.anyOf = i;
2380
- }, Io = (e, t, n, r) => {
2381
- const o = e._zod.def, s = Z(o.left, t, {
2382
- ...r,
2383
- path: [...r.path, "allOf", 0]
2384
- }), i = Z(o.right, t, {
2385
- ...r,
2386
- path: [...r.path, "allOf", 1]
2387
- }), c = (f) => "allOf" in f && Object.keys(f).length === 1, a = [
2388
- ...c(s) ? s.allOf : [s],
2389
- ...c(i) ? i.allOf : [i]
2390
- ];
2391
- n.allOf = a;
2392
- }, Eo = (e, t, n, r) => {
2393
- const o = e._zod.def, s = Z(o.innerType, t, r), i = t.seen.get(e);
2394
- t.target === "openapi-3.0" ? (i.ref = o.innerType, n.nullable = !0) : n.anyOf = [s, { type: "null" }];
2395
- }, Po = (e, t, n, r) => {
2396
- const o = e._zod.def;
2397
- Z(o.innerType, t, r);
2398
- const s = t.seen.get(e);
2399
- s.ref = o.innerType;
2400
- }, To = (e, t, n, r) => {
2401
- const o = e._zod.def;
2402
- Z(o.innerType, t, r);
2403
- const s = t.seen.get(e);
2404
- s.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
2405
- }, No = (e, t, n, r) => {
2406
- const o = e._zod.def;
2407
- Z(o.innerType, t, r);
2408
- const s = t.seen.get(e);
2409
- s.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
2410
- }, jo = (e, t, n, r) => {
2411
- const o = e._zod.def;
2412
- Z(o.innerType, t, r);
2413
- const s = t.seen.get(e);
2414
- s.ref = o.innerType;
2415
- let i;
2416
- try {
2417
- i = o.catchValue(void 0);
2418
- } catch {
2419
- throw new Error("Dynamic catch values are not supported in JSON Schema");
2420
- }
2421
- n.default = i;
2422
- }, Ao = (e, t, n, r) => {
2423
- const o = e._zod.def, s = o.in._zod.traits.has("$ZodTransform"), i = t.io === "input" ? s ? o.out : o.in : o.out;
2424
- Z(i, t, r);
2425
- const c = t.seen.get(e);
2426
- c.ref = i;
2427
- }, Ro = (e, t, n, r) => {
2428
- const o = e._zod.def;
2429
- Z(o.innerType, t, r);
2430
- const s = t.seen.get(e);
2431
- s.ref = o.innerType, n.readOnly = !0;
2432
- }, ft = (e, t, n, r) => {
2433
- const o = e._zod.def;
2434
- Z(o.innerType, t, r);
2435
- const s = t.seen.get(e);
2436
- s.ref = o.innerType;
2437
- }, Co = /* @__PURE__ */ u("ZodISODateTime", (e, t) => {
2438
- Jn.init(e, t), b.init(e, t);
2439
- });
2440
- function Do(e) {
2441
- return /* @__PURE__ */ Wr(Co, e);
2442
- }
2443
- const xo = /* @__PURE__ */ u("ZodISODate", (e, t) => {
2444
- Ln.init(e, t), b.init(e, t);
2445
- });
2446
- function Uo(e) {
2447
- return /* @__PURE__ */ Gr(xo, e);
2448
- }
2449
- const Fo = /* @__PURE__ */ u("ZodISOTime", (e, t) => {
2450
- Vn.init(e, t), b.init(e, t);
2451
- });
2452
- function Mo(e) {
2453
- return /* @__PURE__ */ Kr(Fo, e);
2454
- }
2455
- const Jo = /* @__PURE__ */ u("ZodISODuration", (e, t) => {
2456
- Wn.init(e, t), b.init(e, t);
2457
- });
2458
- function Lo(e) {
2459
- return /* @__PURE__ */ Br(Jo, e);
2460
- }
2461
- const Vo = (e, t) => {
2462
- Ge.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2463
- format: {
2464
- value: (n) => jt(e, n)
2465
- // enumerable: false,
2466
- },
2467
- flatten: {
2468
- value: (n) => Nt(e, n)
2469
- // enumerable: false,
2470
- },
2471
- addIssue: {
2472
- value: (n) => {
2473
- e.issues.push(n), e.message = JSON.stringify(e.issues, re, 2);
2474
- }
2475
- // enumerable: false,
2476
- },
2477
- addIssues: {
2478
- value: (n) => {
2479
- e.issues.push(...n), e.message = JSON.stringify(e.issues, re, 2);
2480
- }
2481
- // enumerable: false,
2482
- },
2483
- isEmpty: {
2484
- get() {
2485
- return e.issues.length === 0;
2486
- }
2487
- // enumerable: false,
2488
- }
2489
- });
2490
- }, I = /* @__PURE__ */ u("ZodError", Vo, {
2491
- Parent: Error
2492
- }), Wo = /* @__PURE__ */ le(I), Go = /* @__PURE__ */ de(I), Ko = /* @__PURE__ */ q(I), Bo = /* @__PURE__ */ H(I), Yo = /* @__PURE__ */ Ct(I), Xo = /* @__PURE__ */ Dt(I), qo = /* @__PURE__ */ xt(I), Ho = /* @__PURE__ */ Ut(I), Qo = /* @__PURE__ */ Ft(I), ei = /* @__PURE__ */ Mt(I), ti = /* @__PURE__ */ Jt(I), ni = /* @__PURE__ */ Lt(I), je = /* @__PURE__ */ new WeakMap();
2493
- function J(e, t, n) {
2494
- const r = Object.getPrototypeOf(e);
2495
- let o = je.get(r);
2496
- if (o || (o = /* @__PURE__ */ new Set(), je.set(r, o)), !o.has(t)) {
2497
- o.add(t);
2498
- for (const s in n) {
2499
- const i = n[s];
2500
- Object.defineProperty(r, s, {
2501
- configurable: !0,
2502
- enumerable: !1,
2503
- get() {
2504
- const c = i.bind(this);
2505
- return Object.defineProperty(this, s, {
2506
- configurable: !0,
2507
- writable: !0,
2508
- enumerable: !0,
2509
- value: c
2510
- }), c;
2511
- },
2512
- set(c) {
2513
- Object.defineProperty(this, s, {
2514
- configurable: !0,
2515
- writable: !0,
2516
- enumerable: !0,
2517
- value: c
2518
- });
2519
- }
2520
- });
2521
- }
2522
- }
2523
- }
2524
- const w = /* @__PURE__ */ u("ZodType", (e, t) => (y.init(e, t), Object.assign(e["~standard"], {
2525
- jsonSchema: {
2526
- input: Y(e, "input"),
2527
- output: Y(e, "output")
2528
- }
2529
- }), e.toJSONSchema = _o(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.parse = (n, r) => Wo(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Ko(e, n, r), e.parseAsync = async (n, r) => Go(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Bo(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Yo(e, n, r), e.decode = (n, r) => Xo(e, n, r), e.encodeAsync = async (n, r) => qo(e, n, r), e.decodeAsync = async (n, r) => Ho(e, n, r), e.safeEncode = (n, r) => Qo(e, n, r), e.safeDecode = (n, r) => ei(e, n, r), e.safeEncodeAsync = async (n, r) => ti(e, n, r), e.safeDecodeAsync = async (n, r) => ni(e, n, r), J(e, "ZodType", {
2530
- check(...n) {
2531
- const r = this.def;
2532
- return this.clone(P(r, {
2533
- checks: [
2534
- ...r.checks ?? [],
2535
- ...n.map((o) => typeof o == "function" ? { _zod: { check: o, def: { check: "custom" }, onattach: [] } } : o)
2536
- ]
2537
- }), { parent: !0 });
2538
- },
2539
- with(...n) {
2540
- return this.check(...n);
2541
- },
2542
- clone(n, r) {
2543
- return T(this, n, r);
2544
- },
2545
- brand() {
2546
- return this;
2547
- },
2548
- register(n, r) {
2549
- return n.add(this, r), this;
2550
- },
2551
- refine(n, r) {
2552
- return this.check(Bi(n, r));
2553
- },
2554
- superRefine(n, r) {
2555
- return this.check(Yi(n, r));
2556
- },
2557
- overwrite(n) {
2558
- return this.check(/* @__PURE__ */ D(n));
2559
- },
2560
- optional() {
2561
- return De(this);
2562
- },
2563
- exactOptional() {
2564
- return Ci(this);
2565
- },
2566
- nullable() {
2567
- return xe(this);
2568
- },
2569
- nullish() {
2570
- return De(xe(this));
2571
- },
2572
- nonoptional(n) {
2573
- return Ji(this, n);
2574
- },
2575
- array() {
2576
- return Oi(this);
2577
- },
2578
- or(n) {
2579
- return Ei([this, n]);
2580
- },
2581
- and(n) {
2582
- return Ti(this, n);
2583
- },
2584
- transform(n) {
2585
- return Ue(this, Ai(n));
2586
- },
2587
- default(n) {
2588
- return Ui(this, n);
2589
- },
2590
- prefault(n) {
2591
- return Mi(this, n);
2592
- },
2593
- catch(n) {
2594
- return Vi(this, n);
2595
- },
2596
- pipe(n) {
2597
- return Ue(this, n);
2598
- },
2599
- readonly() {
2600
- return Ki(this);
2601
- },
2602
- describe(n) {
2603
- const r = this.clone();
2604
- return U.add(r, { description: n }), r;
2605
- },
2606
- meta(...n) {
2607
- if (n.length === 0)
2608
- return U.get(this);
2609
- const r = this.clone();
2610
- return U.add(r, n[0]), r;
2611
- },
2612
- isOptional() {
2613
- return this.safeParse(void 0).success;
2614
- },
2615
- isNullable() {
2616
- return this.safeParse(null).success;
2617
- },
2618
- apply(n) {
2619
- return n(this);
2620
- }
2621
- }), Object.defineProperty(e, "description", {
2622
- get() {
2623
- return U.get(e)?.description;
2624
- },
2625
- configurable: !0
2626
- }), e)), lt = /* @__PURE__ */ u("_ZodString", (e, t) => {
2627
- pe.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, o, s) => vo(e, r, o);
2628
- const n = e._zod.bag;
2629
- e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, J(e, "_ZodString", {
2630
- regex(...r) {
2631
- return this.check(/* @__PURE__ */ Qr(...r));
2632
- },
2633
- includes(...r) {
2634
- return this.check(/* @__PURE__ */ no(...r));
2635
- },
2636
- startsWith(...r) {
2637
- return this.check(/* @__PURE__ */ ro(...r));
2638
- },
2639
- endsWith(...r) {
2640
- return this.check(/* @__PURE__ */ oo(...r));
2641
- },
2642
- min(...r) {
2643
- return this.check(/* @__PURE__ */ B(...r));
2644
- },
2645
- max(...r) {
2646
- return this.check(/* @__PURE__ */ it(...r));
2647
- },
2648
- length(...r) {
2649
- return this.check(/* @__PURE__ */ st(...r));
2650
- },
2651
- nonempty(...r) {
2652
- return this.check(/* @__PURE__ */ B(1, ...r));
2653
- },
2654
- lowercase(r) {
2655
- return this.check(/* @__PURE__ */ eo(r));
2656
- },
2657
- uppercase(r) {
2658
- return this.check(/* @__PURE__ */ to(r));
2659
- },
2660
- trim() {
2661
- return this.check(/* @__PURE__ */ so());
2662
- },
2663
- normalize(...r) {
2664
- return this.check(/* @__PURE__ */ io(...r));
2665
- },
2666
- toLowerCase() {
2667
- return this.check(/* @__PURE__ */ co());
2668
- },
2669
- toUpperCase() {
2670
- return this.check(/* @__PURE__ */ uo());
2671
- },
2672
- slugify() {
2673
- return this.check(/* @__PURE__ */ ao());
2674
- }
2675
- });
2676
- }), ri = /* @__PURE__ */ u("ZodString", (e, t) => {
2677
- pe.init(e, t), lt.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ $r(oi, n)), e.url = (n) => e.check(/* @__PURE__ */ Er(ii, n)), e.jwt = (n) => e.check(/* @__PURE__ */ Vr(zi, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Pr(si, n)), e.guid = (n) => e.check(/* @__PURE__ */ Ee(Ae, n)), e.uuid = (n) => e.check(/* @__PURE__ */ Zr(W, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Or(W, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ Sr(W, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Ir(W, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Tr(ci, n)), e.guid = (n) => e.check(/* @__PURE__ */ Ee(Ae, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Nr(ui, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ jr(ai, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Ar(fi, n)), e.base64 = (n) => e.check(/* @__PURE__ */ Mr(gi, n)), e.base64url = (n) => e.check(/* @__PURE__ */ Jr(vi, n)), e.xid = (n) => e.check(/* @__PURE__ */ Rr(li, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Cr(di, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Dr(pi, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ xr(hi, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ Ur(mi, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ Fr(_i, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Lr(bi, n)), e.datetime = (n) => e.check(Do(n)), e.date = (n) => e.check(Uo(n)), e.time = (n) => e.check(Mo(n)), e.duration = (n) => e.check(Lo(n));
2678
- });
2679
- function qi(e) {
2680
- return /* @__PURE__ */ kr(ri, e);
2681
- }
2682
- const b = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
2683
- v.init(e, t), lt.init(e, t);
2684
- }), oi = /* @__PURE__ */ u("ZodEmail", (e, t) => {
2685
- jn.init(e, t), b.init(e, t);
2686
- }), Ae = /* @__PURE__ */ u("ZodGUID", (e, t) => {
2687
- Tn.init(e, t), b.init(e, t);
2688
- }), W = /* @__PURE__ */ u("ZodUUID", (e, t) => {
2689
- Nn.init(e, t), b.init(e, t);
2690
- }), ii = /* @__PURE__ */ u("ZodURL", (e, t) => {
2691
- An.init(e, t), b.init(e, t);
2692
- }), si = /* @__PURE__ */ u("ZodEmoji", (e, t) => {
2693
- Rn.init(e, t), b.init(e, t);
2694
- }), ci = /* @__PURE__ */ u("ZodNanoID", (e, t) => {
2695
- Cn.init(e, t), b.init(e, t);
2696
- }), ui = /* @__PURE__ */ u("ZodCUID", (e, t) => {
2697
- Dn.init(e, t), b.init(e, t);
2698
- }), ai = /* @__PURE__ */ u("ZodCUID2", (e, t) => {
2699
- xn.init(e, t), b.init(e, t);
2700
- }), fi = /* @__PURE__ */ u("ZodULID", (e, t) => {
2701
- Un.init(e, t), b.init(e, t);
2702
- }), li = /* @__PURE__ */ u("ZodXID", (e, t) => {
2703
- Fn.init(e, t), b.init(e, t);
2704
- }), di = /* @__PURE__ */ u("ZodKSUID", (e, t) => {
2705
- Mn.init(e, t), b.init(e, t);
2706
- }), pi = /* @__PURE__ */ u("ZodIPv4", (e, t) => {
2707
- Gn.init(e, t), b.init(e, t);
2708
- }), hi = /* @__PURE__ */ u("ZodIPv6", (e, t) => {
2709
- Kn.init(e, t), b.init(e, t);
2710
- }), mi = /* @__PURE__ */ u("ZodCIDRv4", (e, t) => {
2711
- Bn.init(e, t), b.init(e, t);
2712
- }), _i = /* @__PURE__ */ u("ZodCIDRv6", (e, t) => {
2713
- Yn.init(e, t), b.init(e, t);
2714
- }), gi = /* @__PURE__ */ u("ZodBase64", (e, t) => {
2715
- Xn.init(e, t), b.init(e, t);
2716
- }), vi = /* @__PURE__ */ u("ZodBase64URL", (e, t) => {
2717
- Hn.init(e, t), b.init(e, t);
2718
- }), bi = /* @__PURE__ */ u("ZodE164", (e, t) => {
2719
- Qn.init(e, t), b.init(e, t);
2720
- }), zi = /* @__PURE__ */ u("ZodJWT", (e, t) => {
2721
- tr.init(e, t), b.init(e, t);
2722
- }), dt = /* @__PURE__ */ u("ZodNumber", (e, t) => {
2723
- tt.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, o, s) => bo(e, r, o), J(e, "ZodNumber", {
2724
- gt(r, o) {
2725
- return this.check(/* @__PURE__ */ Te(r, o));
2726
- },
2727
- gte(r, o) {
2728
- return this.check(/* @__PURE__ */ ne(r, o));
2729
- },
2730
- min(r, o) {
2731
- return this.check(/* @__PURE__ */ ne(r, o));
2732
- },
2733
- lt(r, o) {
2734
- return this.check(/* @__PURE__ */ Pe(r, o));
2735
- },
2736
- lte(r, o) {
2737
- return this.check(/* @__PURE__ */ te(r, o));
2738
- },
2739
- max(r, o) {
2740
- return this.check(/* @__PURE__ */ te(r, o));
2741
- },
2742
- int(r) {
2743
- return this.check(Re(r));
2744
- },
2745
- safe(r) {
2746
- return this.check(Re(r));
2747
- },
2748
- positive(r) {
2749
- return this.check(/* @__PURE__ */ Te(0, r));
2750
- },
2751
- nonnegative(r) {
2752
- return this.check(/* @__PURE__ */ ne(0, r));
2753
- },
2754
- negative(r) {
2755
- return this.check(/* @__PURE__ */ Pe(0, r));
2756
- },
2757
- nonpositive(r) {
2758
- return this.check(/* @__PURE__ */ te(0, r));
2759
- },
2760
- multipleOf(r, o) {
2761
- return this.check(/* @__PURE__ */ Ne(r, o));
2762
- },
2763
- step(r, o) {
2764
- return this.check(/* @__PURE__ */ Ne(r, o));
2765
- },
2766
- finite() {
2767
- return this;
2768
- }
2769
- });
2770
- const n = e._zod.bag;
2771
- e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
2772
- });
2773
- function Hi(e) {
2774
- return /* @__PURE__ */ Yr(dt, e);
2775
- }
2776
- const yi = /* @__PURE__ */ u("ZodNumberFormat", (e, t) => {
2777
- nr.init(e, t), dt.init(e, t);
2778
- });
2779
- function Re(e) {
2780
- return /* @__PURE__ */ Xr(yi, e);
2781
- }
2782
- const wi = /* @__PURE__ */ u("ZodUnknown", (e, t) => {
2783
- rr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => yo();
2784
- });
2785
- function Ce() {
2786
- return /* @__PURE__ */ qr(wi);
2787
- }
2788
- const ki = /* @__PURE__ */ u("ZodNever", (e, t) => {
2789
- or.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => zo(e, n, r);
2790
- });
2791
- function $i(e) {
2792
- return /* @__PURE__ */ Hr(ki, e);
2793
- }
2794
- const Zi = /* @__PURE__ */ u("ZodArray", (e, t) => {
2795
- ir.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => Zo(e, n, r, o), e.element = t.element, J(e, "ZodArray", {
2796
- min(n, r) {
2797
- return this.check(/* @__PURE__ */ B(n, r));
2798
- },
2799
- nonempty(n) {
2800
- return this.check(/* @__PURE__ */ B(1, n));
2801
- },
2802
- max(n, r) {
2803
- return this.check(/* @__PURE__ */ it(n, r));
2804
- },
2805
- length(n, r) {
2806
- return this.check(/* @__PURE__ */ st(n, r));
2807
- },
2808
- unwrap() {
2809
- return this.element;
2810
- }
2811
- });
2812
- });
2813
- function Oi(e, t) {
2814
- return /* @__PURE__ */ fo(Zi, e, t);
2815
- }
2816
- const Si = /* @__PURE__ */ u("ZodObject", (e, t) => {
2817
- cr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => Oo(e, n, r, o), g(e, "shape", () => t.shape), J(e, "ZodObject", {
2818
- keyof() {
2819
- return Ni(Object.keys(this._zod.def.shape));
2820
- },
2821
- catchall(n) {
2822
- return this.clone({ ...this._zod.def, catchall: n });
2823
- },
2824
- passthrough() {
2825
- return this.clone({ ...this._zod.def, catchall: Ce() });
2826
- },
2827
- loose() {
2828
- return this.clone({ ...this._zod.def, catchall: Ce() });
2829
- },
2830
- strict() {
2831
- return this.clone({ ...this._zod.def, catchall: $i() });
2832
- },
2833
- strip() {
2834
- return this.clone({ ...this._zod.def, catchall: void 0 });
2835
- },
2836
- extend(n) {
2837
- return Ot(this, n);
2838
- },
2839
- safeExtend(n) {
2840
- return St(this, n);
2841
- },
2842
- merge(n) {
2843
- return It(this, n);
2844
- },
2845
- pick(n) {
2846
- return $t(this, n);
2847
- },
2848
- omit(n) {
2849
- return Zt(this, n);
2850
- },
2851
- partial(...n) {
2852
- return Et(pt, this, n[0]);
2853
- },
2854
- required(...n) {
2855
- return Pt(ht, this, n[0]);
2856
- }
2857
- });
2858
- });
2859
- function Qi(e, t) {
2860
- const n = {
2861
- type: "object",
2862
- shape: e ?? {},
2863
- ...d(t)
2864
- };
2865
- return new Si(n);
2866
- }
2867
- const Ii = /* @__PURE__ */ u("ZodUnion", (e, t) => {
2868
- ur.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => So(e, n, r, o), e.options = t.options;
2869
- });
2870
- function Ei(e, t) {
2871
- return new Ii({
2872
- type: "union",
2873
- options: e,
2874
- ...d(t)
2875
- });
2876
- }
2877
- const Pi = /* @__PURE__ */ u("ZodIntersection", (e, t) => {
2878
- ar.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => Io(e, n, r, o);
2879
- });
2880
- function Ti(e, t) {
2881
- return new Pi({
2882
- type: "intersection",
2883
- left: e,
2884
- right: t
2885
- });
2886
- }
2887
- const ie = /* @__PURE__ */ u("ZodEnum", (e, t) => {
2888
- fr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, o, s) => wo(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
2889
- const n = new Set(Object.keys(t.entries));
2890
- e.extract = (r, o) => {
2891
- const s = {};
2892
- for (const i of r)
2893
- if (n.has(i))
2894
- s[i] = t.entries[i];
2895
- else
2896
- throw new Error(`Key ${i} not found in enum`);
2897
- return new ie({
2898
- ...t,
2899
- checks: [],
2900
- ...d(o),
2901
- entries: s
2902
- });
2903
- }, e.exclude = (r, o) => {
2904
- const s = { ...t.entries };
2905
- for (const i of r)
2906
- if (n.has(i))
2907
- delete s[i];
2908
- else
2909
- throw new Error(`Key ${i} not found in enum`);
2910
- return new ie({
2911
- ...t,
2912
- checks: [],
2913
- ...d(o),
2914
- entries: s
2915
- });
2916
- };
2917
- });
2918
- function Ni(e, t) {
2919
- const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
2920
- return new ie({
2921
- type: "enum",
2922
- entries: n,
2923
- ...d(t)
2924
- });
2925
- }
2926
- const ji = /* @__PURE__ */ u("ZodTransform", (e, t) => {
2927
- lr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => $o(e, n), e._zod.parse = (n, r) => {
2928
- if (r.direction === "backward")
2929
- throw new Fe(e.constructor.name);
2930
- n.addIssue = (s) => {
2931
- if (typeof s == "string")
2932
- n.issues.push(M(s, n.value, t));
2933
- else {
2934
- const i = s;
2935
- i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), n.issues.push(M(i));
2936
- }
2937
- };
2938
- const o = t.transform(n.value, n);
2939
- return o instanceof Promise ? o.then((s) => (n.value = s, n.fallback = !0, n)) : (n.value = o, n.fallback = !0, n);
2940
- };
2941
- });
2942
- function Ai(e) {
2943
- return new ji({
2944
- type: "transform",
2945
- transform: e
2946
- });
2947
- }
2948
- const pt = /* @__PURE__ */ u("ZodOptional", (e, t) => {
2949
- ot.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => ft(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2950
- });
2951
- function De(e) {
2952
- return new pt({
2953
- type: "optional",
2954
- innerType: e
2955
- });
2956
- }
2957
- const Ri = /* @__PURE__ */ u("ZodExactOptional", (e, t) => {
2958
- dr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => ft(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2959
- });
2960
- function Ci(e) {
2961
- return new Ri({
2962
- type: "optional",
2963
- innerType: e
2964
- });
2965
- }
2966
- const Di = /* @__PURE__ */ u("ZodNullable", (e, t) => {
2967
- pr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => Eo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2968
- });
2969
- function xe(e) {
2970
- return new Di({
2971
- type: "nullable",
2972
- innerType: e
2973
- });
2974
- }
2975
- const xi = /* @__PURE__ */ u("ZodDefault", (e, t) => {
2976
- hr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => To(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2977
- });
2978
- function Ui(e, t) {
2979
- return new xi({
2980
- type: "default",
2981
- innerType: e,
2982
- get defaultValue() {
2983
- return typeof t == "function" ? t() : Le(t);
2984
- }
2985
- });
2986
- }
2987
- const Fi = /* @__PURE__ */ u("ZodPrefault", (e, t) => {
2988
- mr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => No(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2989
- });
2990
- function Mi(e, t) {
2991
- return new Fi({
2992
- type: "prefault",
2993
- innerType: e,
2994
- get defaultValue() {
2995
- return typeof t == "function" ? t() : Le(t);
2996
- }
2997
- });
2998
- }
2999
- const ht = /* @__PURE__ */ u("ZodNonOptional", (e, t) => {
3000
- _r.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => Po(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3001
- });
3002
- function Ji(e, t) {
3003
- return new ht({
3004
- type: "nonoptional",
3005
- innerType: e,
3006
- ...d(t)
3007
- });
3008
- }
3009
- const Li = /* @__PURE__ */ u("ZodCatch", (e, t) => {
3010
- gr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => jo(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3011
- });
3012
- function Vi(e, t) {
3013
- return new Li({
3014
- type: "catch",
3015
- innerType: e,
3016
- catchValue: typeof t == "function" ? t : () => t
3017
- });
3018
- }
3019
- const Wi = /* @__PURE__ */ u("ZodPipe", (e, t) => {
3020
- vr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ao(e, n, r, o), e.in = t.in, e.out = t.out;
3021
- });
3022
- function Ue(e, t) {
3023
- return new Wi({
3024
- type: "pipe",
3025
- in: e,
3026
- out: t
3027
- // ...util.normalizeParams(params),
3028
- });
3029
- }
3030
- const Gi = /* @__PURE__ */ u("ZodReadonly", (e, t) => {
3031
- br.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ro(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3032
- });
3033
- function Ki(e) {
3034
- return new Gi({
3035
- type: "readonly",
3036
- innerType: e
3037
- });
3038
- }
3039
- const mt = /* @__PURE__ */ u("ZodCustom", (e, t) => {
3040
- zr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => ko(e, n);
3041
- });
3042
- function es(e, t) {
3043
- return /* @__PURE__ */ lo(mt, e ?? (() => !0), t);
3044
- }
3045
- function Bi(e, t = {}) {
3046
- return /* @__PURE__ */ po(mt, e, t);
3047
- }
3048
- function Yi(e, t) {
3049
- return /* @__PURE__ */ ho(e, t);
3050
- }
3051
- export {
3052
- Xi as N,
3053
- Ni as _,
3054
- es as c,
3055
- Hi as n,
3056
- Qi as o,
3057
- qi as s
3058
- };
3059
- //# sourceMappingURL=schemas-CBHIJ_eF.js.map