@synnaxlabs/x 0.42.1 → 0.43.0

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 (296) hide show
  1. package/.turbo/turbo-build.log +93 -105
  2. package/.vscode/settings.json +4 -6
  3. package/README.md +1 -7
  4. package/dist/array.cjs +1 -0
  5. package/dist/array.js +7 -0
  6. package/dist/base-B5lQIJKc.js +38 -0
  7. package/dist/base-CTq-lhpU.cjs +1 -0
  8. package/dist/binary.cjs +1 -1
  9. package/dist/binary.js +1 -1
  10. package/dist/bounds.cjs +1 -1
  11. package/dist/bounds.js +2 -2
  12. package/dist/box.cjs +1 -1
  13. package/dist/box.js +1 -1
  14. package/dist/caseconv.cjs +1 -1
  15. package/dist/caseconv.js +2 -2
  16. package/dist/change.cjs +1 -1
  17. package/dist/change.js +10 -2
  18. package/dist/compare.cjs +1 -1
  19. package/dist/compare.js +1 -1
  20. package/dist/deep.cjs +1 -1
  21. package/dist/deep.js +92 -79
  22. package/dist/dimensions.cjs +1 -1
  23. package/dist/dimensions.js +41 -2
  24. package/dist/direction.cjs +1 -1
  25. package/dist/direction.js +1 -1
  26. package/dist/index-4GlOgZuh.js +99 -0
  27. package/dist/{direction-C-b6XTeU.cjs → index-B58dnYRu.cjs} +1 -1
  28. package/dist/index-BMGaoK93.cjs +1 -0
  29. package/dist/index-BTet04Hd.cjs +6 -0
  30. package/dist/{scale-DfJe9755.js → index-BUa-NXAX.js} +46 -46
  31. package/dist/{xy-D_LqxaGt.js → index-C-qYOegc.js} +62 -62
  32. package/dist/index-C07SBJhr.js +128 -0
  33. package/dist/{bounds-Bn5_l4Z3.js → index-C9EdKeu1.js} +77 -76
  34. package/dist/index-CM8ZDZ6s.cjs +1 -0
  35. package/dist/index-CV2JaHfw.cjs +1 -0
  36. package/dist/index-CeBvOwG8.cjs +3 -0
  37. package/dist/index-ClrGyGDp.js +205 -0
  38. package/dist/index-CqQXXeCI.cjs +1 -0
  39. package/dist/{location-C3aeu046.js → index-D6V-8SKw.js} +26 -26
  40. package/dist/index-DBGAIs_7.js +2492 -0
  41. package/dist/index-DEdq2tza.cjs +1 -0
  42. package/dist/index-DKMnHBGR.cjs +1 -0
  43. package/dist/index-Dql5FMcH.js +47 -0
  44. package/dist/{direction-BL0PhD1k.js → index-DxU1zwsd.js} +1 -1
  45. package/dist/index-WwMnwoLy.cjs +1 -0
  46. package/dist/index.cjs +5 -3
  47. package/dist/index.js +5372 -649
  48. package/dist/kv.cjs +1 -1
  49. package/dist/kv.js +45 -2
  50. package/dist/location.cjs +1 -1
  51. package/dist/location.js +1 -1
  52. package/dist/position.cjs +1 -1
  53. package/dist/position.js +83 -2
  54. package/dist/record.cjs +1 -1
  55. package/dist/record.js +8 -10
  56. package/dist/runtime.cjs +1 -1
  57. package/dist/runtime.js +27 -2
  58. package/dist/scale.cjs +1 -1
  59. package/dist/scale.js +1 -1
  60. package/dist/schemas-55Usj0Fg.js +3998 -0
  61. package/dist/schemas-DbXuI2Qr.cjs +27 -0
  62. package/dist/spatial.cjs +1 -1
  63. package/dist/spatial.js +25 -18
  64. package/dist/src/array/index.d.ts +2 -0
  65. package/dist/src/array/index.d.ts.map +1 -0
  66. package/dist/src/array/toArray.d.ts +19 -0
  67. package/dist/src/array/toArray.d.ts.map +1 -0
  68. package/dist/src/array/toArray.spec.d.ts +2 -0
  69. package/dist/src/array/toArray.spec.d.ts.map +1 -0
  70. package/dist/src/binary/codec.d.ts +8 -16
  71. package/dist/src/binary/codec.d.ts.map +1 -1
  72. package/dist/src/breaker/breaker.d.ts +6 -6
  73. package/dist/src/breaker/breaker.d.ts.map +1 -1
  74. package/dist/src/caseconv/caseconv.d.ts +1 -1
  75. package/dist/src/caseconv/caseconv.d.ts.map +1 -1
  76. package/dist/src/change/change.d.ts +3 -3
  77. package/dist/src/change/change.d.ts.map +1 -1
  78. package/dist/src/color/color.d.ts +63 -28
  79. package/dist/src/color/color.d.ts.map +1 -1
  80. package/dist/src/color/external.d.ts +0 -1
  81. package/dist/src/color/external.d.ts.map +1 -1
  82. package/dist/src/color/gradient.d.ts +9 -5
  83. package/dist/src/color/gradient.d.ts.map +1 -1
  84. package/dist/src/color/palette.d.ts +14 -6
  85. package/dist/src/color/palette.d.ts.map +1 -1
  86. package/dist/src/compare/compare.d.ts +4 -4
  87. package/dist/src/compare/compare.d.ts.map +1 -1
  88. package/dist/src/control/control.d.ts +32 -32
  89. package/dist/src/control/control.d.ts.map +1 -1
  90. package/dist/src/debounce/debounce.d.ts +1 -1
  91. package/dist/src/debounce/debounce.d.ts.map +1 -1
  92. package/dist/src/deep/delete.d.ts +1 -1
  93. package/dist/src/deep/delete.d.ts.map +1 -1
  94. package/dist/src/deep/difference.d.ts.map +1 -1
  95. package/dist/src/deep/equal.d.ts +4 -4
  96. package/dist/src/deep/equal.d.ts.map +1 -1
  97. package/dist/src/deep/merge.d.ts +1 -1
  98. package/dist/src/deep/merge.d.ts.map +1 -1
  99. package/dist/src/errors/errors.d.ts +62 -36
  100. package/dist/src/errors/errors.d.ts.map +1 -1
  101. package/dist/src/index.d.ts +4 -1
  102. package/dist/src/index.d.ts.map +1 -1
  103. package/dist/src/instance/index.d.ts +2 -0
  104. package/dist/src/instance/index.d.ts.map +1 -0
  105. package/dist/src/instance/matcher.d.ts +79 -0
  106. package/dist/src/instance/matcher.d.ts.map +1 -0
  107. package/dist/src/instance/matcher.spec.d.ts +2 -0
  108. package/dist/src/instance/matcher.spec.d.ts.map +1 -0
  109. package/dist/src/jsonrpc/jsonrpc.d.ts +40 -9
  110. package/dist/src/jsonrpc/jsonrpc.d.ts.map +1 -1
  111. package/dist/src/kv/types.d.ts +2 -2
  112. package/dist/src/kv/types.d.ts.map +1 -1
  113. package/dist/src/migrate/migrate.d.ts +5 -5
  114. package/dist/src/migrate/migrate.d.ts.map +1 -1
  115. package/dist/src/notation/notation.d.ts +1 -1
  116. package/dist/src/notation/notation.d.ts.map +1 -1
  117. package/dist/src/primitive/index.d.ts +2 -0
  118. package/dist/src/primitive/index.d.ts.map +1 -0
  119. package/dist/src/primitive/primitive.d.ts +39 -0
  120. package/dist/src/primitive/primitive.d.ts.map +1 -0
  121. package/dist/src/primitive/primitive.spec.d.ts +2 -0
  122. package/dist/src/primitive/primitive.spec.d.ts.map +1 -0
  123. package/dist/src/record.d.ts +2 -2
  124. package/dist/src/record.d.ts.map +1 -1
  125. package/dist/src/renderable.d.ts +1 -1
  126. package/dist/src/renderable.d.ts.map +1 -1
  127. package/dist/src/replace.d.ts.map +1 -1
  128. package/dist/src/runtime/detect.d.ts.map +1 -1
  129. package/dist/src/runtime/os.d.ts +1 -1
  130. package/dist/src/runtime/os.d.ts.map +1 -1
  131. package/dist/src/spatial/base.d.ts +10 -10
  132. package/dist/src/spatial/base.d.ts.map +1 -1
  133. package/dist/src/spatial/bounds/bounds.d.ts +82 -16
  134. package/dist/src/spatial/bounds/bounds.d.ts.map +1 -1
  135. package/dist/src/spatial/box/box.d.ts +7 -7
  136. package/dist/src/spatial/box/box.d.ts.map +1 -1
  137. package/dist/src/spatial/dimensions/dimensions.d.ts +5 -5
  138. package/dist/src/spatial/dimensions/dimensions.d.ts.map +1 -1
  139. package/dist/src/spatial/direction/direction.d.ts +1 -1
  140. package/dist/src/spatial/location/location.d.ts +4 -4
  141. package/dist/src/spatial/location/location.d.ts.map +1 -1
  142. package/dist/src/spatial/scale/scale.d.ts +11 -11
  143. package/dist/src/spatial/scale/scale.d.ts.map +1 -1
  144. package/dist/src/spatial/xy/xy.d.ts +5 -5
  145. package/dist/src/spatial/xy/xy.d.ts.map +1 -1
  146. package/dist/src/status/index.d.ts +2 -0
  147. package/dist/src/status/index.d.ts.map +1 -0
  148. package/dist/src/status/types.d.ts +11 -0
  149. package/dist/src/status/types.d.ts.map +1 -0
  150. package/dist/src/sync/index.d.ts.map +1 -1
  151. package/dist/src/sync/mutex.d.ts +0 -1
  152. package/dist/src/sync/mutex.d.ts.map +1 -1
  153. package/dist/src/telem/gl.d.ts +1 -1
  154. package/dist/src/telem/gl.d.ts.map +1 -1
  155. package/dist/src/telem/series.d.ts +468 -62
  156. package/dist/src/telem/series.d.ts.map +1 -1
  157. package/dist/src/telem/telem.d.ts +243 -53
  158. package/dist/src/telem/telem.d.ts.map +1 -1
  159. package/dist/src/uuid/index.d.ts +2 -0
  160. package/dist/src/uuid/index.d.ts.map +1 -0
  161. package/dist/src/uuid/uuid.d.ts +35 -0
  162. package/dist/src/uuid/uuid.d.ts.map +1 -0
  163. package/dist/src/uuid/uuid.spec.d.ts +2 -0
  164. package/dist/src/uuid/uuid.spec.d.ts.map +1 -0
  165. package/dist/src/zod/external.d.ts +1 -1
  166. package/dist/src/zod/external.d.ts.map +1 -1
  167. package/dist/src/zod/nullToUndefined.d.ts +3 -0
  168. package/dist/src/zod/nullToUndefined.d.ts.map +1 -0
  169. package/dist/src/zod/nullToUndefined.spec.d.ts +2 -0
  170. package/dist/src/zod/nullToUndefined.spec.d.ts.map +1 -0
  171. package/dist/src/zod/util.d.ts +2 -2
  172. package/dist/src/zod/util.d.ts.map +1 -1
  173. package/dist/telem.cjs +1 -1
  174. package/dist/telem.js +1 -1
  175. package/dist/xy.cjs +1 -1
  176. package/dist/xy.js +1 -1
  177. package/dist/zod.cjs +1 -1
  178. package/dist/zod.js +19 -2
  179. package/eslint.config.js +1 -1
  180. package/package.json +16 -14
  181. package/src/{toArray.ts → array/index.ts} +1 -5
  182. package/src/array/toArray.spec.ts +56 -0
  183. package/src/array/toArray.ts +28 -0
  184. package/src/binary/codec.spec.ts +201 -278
  185. package/src/binary/codec.ts +20 -76
  186. package/src/breaker/breaker.ts +3 -3
  187. package/src/caseconv/caseconv.ts +6 -4
  188. package/src/change/change.ts +2 -2
  189. package/src/color/color.spec.ts +121 -2
  190. package/src/color/color.ts +90 -54
  191. package/src/color/external.ts +0 -1
  192. package/src/color/gradient.ts +20 -28
  193. package/src/color/palette.ts +1 -1
  194. package/src/compare/compare.ts +5 -5
  195. package/src/control/control.ts +22 -19
  196. package/src/debounce/debounce.ts +1 -1
  197. package/src/deep/delete.ts +5 -4
  198. package/src/deep/difference.ts +6 -2
  199. package/src/deep/equal.spec.ts +1 -1
  200. package/src/deep/equal.ts +5 -5
  201. package/src/deep/merge.spec.ts +13 -1
  202. package/src/deep/merge.ts +16 -7
  203. package/src/deep/path.ts +1 -1
  204. package/src/errors/errors.ts +65 -44
  205. package/src/index.ts +4 -1
  206. package/src/instance/index.ts +10 -0
  207. package/src/instance/matcher.spec.ts +78 -0
  208. package/src/instance/matcher.ts +98 -0
  209. package/src/jsonrpc/jsonrpc.spec.ts +2 -1
  210. package/src/jsonrpc/jsonrpc.ts +36 -7
  211. package/src/kv/types.ts +1 -1
  212. package/src/migrate/migrate.spec.ts +1 -1
  213. package/src/migrate/migrate.ts +7 -7
  214. package/src/notation/notation.ts +1 -1
  215. package/src/primitive/index.ts +10 -0
  216. package/src/primitive/primitive.spec.ts +126 -0
  217. package/src/primitive/primitive.ts +82 -0
  218. package/src/record.ts +3 -5
  219. package/src/renderable.ts +1 -1
  220. package/src/replace.ts +9 -0
  221. package/src/runtime/detect.ts +0 -2
  222. package/src/runtime/os.ts +1 -1
  223. package/src/spatial/base.ts +1 -1
  224. package/src/spatial/bounds/bounds.spec.ts +20 -0
  225. package/src/spatial/bounds/bounds.ts +101 -18
  226. package/src/spatial/box/box.ts +1 -1
  227. package/src/spatial/dimensions/dimensions.ts +3 -3
  228. package/src/spatial/location/location.ts +1 -1
  229. package/src/spatial/scale/scale.ts +1 -1
  230. package/src/spatial/xy/xy.ts +1 -1
  231. package/src/status/index.ts +10 -0
  232. package/src/status/types.ts +22 -0
  233. package/src/sync/index.ts +9 -0
  234. package/src/sync/mutex.ts +9 -4
  235. package/src/telem/gl.ts +1 -1
  236. package/src/telem/series.spec.ts +735 -68
  237. package/src/telem/series.ts +536 -195
  238. package/src/telem/telem.spec.ts +60 -7
  239. package/src/telem/telem.ts +287 -95
  240. package/src/uuid/index.ts +10 -0
  241. package/src/uuid/uuid.spec.ts +82 -0
  242. package/src/uuid/uuid.ts +48 -0
  243. package/src/zod/external.ts +1 -1
  244. package/src/zod/nullToUndefined.spec.ts +31 -0
  245. package/src/zod/nullToUndefined.ts +23 -0
  246. package/src/zod/util.spec.ts +1 -1
  247. package/src/zod/util.ts +6 -6
  248. package/tsconfig.json +1 -1
  249. package/tsconfig.tsbuildinfo +1 -1
  250. package/vite.config.ts +1 -1
  251. package/dist/base-BAM2mqCy.cjs +0 -1
  252. package/dist/base-DFq0vvGn.js +0 -38
  253. package/dist/bounds-BQo7rvs9.cjs +0 -1
  254. package/dist/box-0YrQibkB.cjs +0 -1
  255. package/dist/box-Cc8IzcNo.js +0 -205
  256. package/dist/change-C-YELKx6.cjs +0 -1
  257. package/dist/change-DLl6DccR.js +0 -12
  258. package/dist/dimensions-CRgergMS.js +0 -43
  259. package/dist/dimensions-D2QGoNXO.cjs +0 -1
  260. package/dist/external-BPgtxa8d.js +0 -29
  261. package/dist/external-C-dNgNQw.cjs +0 -1
  262. package/dist/external-C8TFju8Q.js +0 -29
  263. package/dist/external-DWQITF5_.cjs +0 -1
  264. package/dist/external-DqPrWKvU.js +0 -47
  265. package/dist/external-uXk0Avrg.cjs +0 -1
  266. package/dist/index-BywOGO8U.js +0 -1074
  267. package/dist/index-CYYjI7Uf.cjs +0 -1
  268. package/dist/index-C_6NXBlg.cjs +0 -3
  269. package/dist/index-Dd8DLyMx.cjs +0 -1
  270. package/dist/index-DizUWH6z.js +0 -47
  271. package/dist/index-QGplUHuy.js +0 -98
  272. package/dist/location-BGl5Ddds.cjs +0 -1
  273. package/dist/position-Cai5-wi1.cjs +0 -1
  274. package/dist/position-DIglP1l2.js +0 -85
  275. package/dist/scale-BtZINJ-A.cjs +0 -1
  276. package/dist/series-B9JERcqi.js +0 -1977
  277. package/dist/series-DqJ6f97G.cjs +0 -11
  278. package/dist/spatial-BSWPzMkK.js +0 -11
  279. package/dist/spatial-DGpZ2sO3.cjs +0 -1
  280. package/dist/src/color/transformColorsToHex.d.ts +0 -6
  281. package/dist/src/color/transformColorsToHex.d.ts.map +0 -1
  282. package/dist/src/primitive.d.ts +0 -9
  283. package/dist/src/primitive.d.ts.map +0 -1
  284. package/dist/src/toArray.d.ts +0 -3
  285. package/dist/src/toArray.d.ts.map +0 -1
  286. package/dist/src/zod/integer.d.ts +0 -10
  287. package/dist/src/zod/integer.d.ts.map +0 -1
  288. package/dist/src/zod/integer.spec.d.ts +0 -2
  289. package/dist/src/zod/integer.spec.d.ts.map +0 -1
  290. package/dist/toArray.cjs +0 -1
  291. package/dist/toArray.js +0 -5
  292. package/dist/xy-B7065J2S.cjs +0 -1
  293. package/src/color/transformColorsToHex.ts +0 -30
  294. package/src/primitive.ts +0 -46
  295. package/src/zod/integer.spec.ts +0 -148
  296. package/src/zod/integer.ts +0 -38
@@ -0,0 +1,3998 @@
1
+ function u(e, n, t) {
2
+ function r(c, l) {
3
+ var p;
4
+ Object.defineProperty(c, "_zod", {
5
+ value: c._zod ?? {},
6
+ enumerable: !1
7
+ }), (p = c._zod).traits ?? (p.traits = /* @__PURE__ */ new Set()), c._zod.traits.add(e), n(c, l);
8
+ for (const d in s.prototype)
9
+ d in c || Object.defineProperty(c, d, { value: s.prototype[d].bind(c) });
10
+ c._zod.constr = s, c._zod.def = l;
11
+ }
12
+ const o = (t == null ? void 0 : t.Parent) ?? Object;
13
+ class i extends o {
14
+ }
15
+ Object.defineProperty(i, "name", { value: e });
16
+ function s(c) {
17
+ var l;
18
+ const p = t != null && t.Parent ? new i() : this;
19
+ r(p, c), (l = p._zod).deferred ?? (l.deferred = []);
20
+ for (const d of p._zod.deferred)
21
+ d();
22
+ return p;
23
+ }
24
+ return Object.defineProperty(s, "init", { value: r }), Object.defineProperty(s, Symbol.hasInstance, {
25
+ value: (c) => {
26
+ var l, p;
27
+ return t != null && t.Parent && c instanceof t.Parent ? !0 : (p = (l = c == null ? void 0 : c._zod) == null ? void 0 : l.traits) == null ? void 0 : p.has(e);
28
+ }
29
+ }), Object.defineProperty(s, "name", { value: e }), s;
30
+ }
31
+ const Ws = Symbol("zod_brand");
32
+ class W extends Error {
33
+ constructor() {
34
+ super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
35
+ }
36
+ }
37
+ const de = {};
38
+ function x(e) {
39
+ return e && Object.assign(de, e), de;
40
+ }
41
+ function pr(e) {
42
+ return e;
43
+ }
44
+ function fr(e) {
45
+ return e;
46
+ }
47
+ function dr(e) {
48
+ }
49
+ function hr(e) {
50
+ throw new Error();
51
+ }
52
+ function mr(e) {
53
+ }
54
+ function We(e) {
55
+ const n = Object.values(e).filter((r) => typeof r == "number");
56
+ return Object.entries(e).filter(([r, o]) => n.indexOf(+r) === -1).map(([r, o]) => o);
57
+ }
58
+ function _r(e, n = "|") {
59
+ return e.map((t) => qe(t)).join(n);
60
+ }
61
+ function Ge(e, n) {
62
+ return typeof n == "bigint" ? n.toString() : n;
63
+ }
64
+ function ie(e) {
65
+ return {
66
+ get value() {
67
+ {
68
+ const n = e();
69
+ return Object.defineProperty(this, "value", { value: n }), n;
70
+ }
71
+ }
72
+ };
73
+ }
74
+ function j(e) {
75
+ return e == null;
76
+ }
77
+ function se(e) {
78
+ const n = e.startsWith("^") ? 1 : 0, t = e.endsWith("$") ? e.length - 1 : e.length;
79
+ return e.slice(n, t);
80
+ }
81
+ function Ke(e, n) {
82
+ const t = (e.toString().split(".")[1] || "").length, r = (n.toString().split(".")[1] || "").length, o = t > r ? t : r, i = Number.parseInt(e.toFixed(o).replace(".", "")), s = Number.parseInt(n.toFixed(o).replace(".", ""));
83
+ return i % s / 10 ** o;
84
+ }
85
+ function g(e, n, t) {
86
+ Object.defineProperty(e, n, {
87
+ get() {
88
+ {
89
+ const r = t();
90
+ return e[n] = r, r;
91
+ }
92
+ },
93
+ set(r) {
94
+ Object.defineProperty(e, n, {
95
+ value: r
96
+ // configurable: true,
97
+ });
98
+ },
99
+ configurable: !0
100
+ });
101
+ }
102
+ function L(e, n, t) {
103
+ Object.defineProperty(e, n, {
104
+ value: t,
105
+ writable: !0,
106
+ enumerable: !0,
107
+ configurable: !0
108
+ });
109
+ }
110
+ function vr(e, n) {
111
+ return n ? n.reduce((t, r) => t == null ? void 0 : t[r], e) : e;
112
+ }
113
+ function gr(e) {
114
+ const n = Object.keys(e), t = n.map((r) => e[r]);
115
+ return Promise.all(t).then((r) => {
116
+ const o = {};
117
+ for (let i = 0; i < n.length; i++)
118
+ o[n[i]] = r[i];
119
+ return o;
120
+ });
121
+ }
122
+ function Ze(e = 10) {
123
+ const n = "abcdefghijklmnopqrstuvwxyz";
124
+ let t = "";
125
+ for (let r = 0; r < e; r++)
126
+ t += n[Math.floor(Math.random() * n.length)];
127
+ return t;
128
+ }
129
+ function C(e) {
130
+ return JSON.stringify(e);
131
+ }
132
+ function G(e) {
133
+ return typeof e == "object" && e !== null && !Array.isArray(e);
134
+ }
135
+ const Je = ie(() => {
136
+ if (typeof navigator < "u" && (navigator != null && navigator.userAgent.includes("Cloudflare")))
137
+ return !1;
138
+ try {
139
+ const e = Function;
140
+ return new e(""), !0;
141
+ } catch {
142
+ return !1;
143
+ }
144
+ });
145
+ function ne(e) {
146
+ if (G(e) === !1)
147
+ return !1;
148
+ const n = e.constructor;
149
+ if (n === void 0)
150
+ return !0;
151
+ const t = n.prototype;
152
+ return !(G(t) === !1 || Object.prototype.hasOwnProperty.call(t, "isPrototypeOf") === !1);
153
+ }
154
+ function br(e) {
155
+ let n = 0;
156
+ for (const t in e)
157
+ Object.prototype.hasOwnProperty.call(e, t) && n++;
158
+ return n;
159
+ }
160
+ const zr = (e) => {
161
+ const n = typeof e;
162
+ switch (n) {
163
+ case "undefined":
164
+ return "undefined";
165
+ case "string":
166
+ return "string";
167
+ case "number":
168
+ return Number.isNaN(e) ? "nan" : "number";
169
+ case "boolean":
170
+ return "boolean";
171
+ case "function":
172
+ return "function";
173
+ case "bigint":
174
+ return "bigint";
175
+ case "symbol":
176
+ return "symbol";
177
+ case "object":
178
+ return Array.isArray(e) ? "array" : e === null ? "null" : e.then && typeof e.then == "function" && e.catch && typeof e.catch == "function" ? "promise" : typeof Map < "u" && e instanceof Map ? "map" : typeof Set < "u" && e instanceof Set ? "set" : typeof Date < "u" && e instanceof Date ? "date" : typeof File < "u" && e instanceof File ? "file" : "object";
179
+ default:
180
+ throw new Error(`Unknown data type: ${n}`);
181
+ }
182
+ }, te = /* @__PURE__ */ new Set(["string", "number", "symbol"]), Ye = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
183
+ function D(e) {
184
+ return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
185
+ }
186
+ function O(e, n, t) {
187
+ const r = new e._zod.constr(n ?? e._zod.def);
188
+ return (!n || t != null && t.parent) && (r._zod.parent = e), r;
189
+ }
190
+ function a(e) {
191
+ const n = e;
192
+ if (!n)
193
+ return {};
194
+ if (typeof n == "string")
195
+ return { error: () => n };
196
+ if ((n == null ? void 0 : n.message) !== void 0) {
197
+ if ((n == null ? void 0 : n.error) !== void 0)
198
+ throw new Error("Cannot specify both `message` and `error` params");
199
+ n.error = n.message;
200
+ }
201
+ return delete n.message, typeof n.error == "string" ? { ...n, error: () => n.error } : n;
202
+ }
203
+ function $r(e) {
204
+ let n;
205
+ return new Proxy({}, {
206
+ get(t, r, o) {
207
+ return n ?? (n = e()), Reflect.get(n, r, o);
208
+ },
209
+ set(t, r, o, i) {
210
+ return n ?? (n = e()), Reflect.set(n, r, o, i);
211
+ },
212
+ has(t, r) {
213
+ return n ?? (n = e()), Reflect.has(n, r);
214
+ },
215
+ deleteProperty(t, r) {
216
+ return n ?? (n = e()), Reflect.deleteProperty(n, r);
217
+ },
218
+ ownKeys(t) {
219
+ return n ?? (n = e()), Reflect.ownKeys(n);
220
+ },
221
+ getOwnPropertyDescriptor(t, r) {
222
+ return n ?? (n = e()), Reflect.getOwnPropertyDescriptor(n, r);
223
+ },
224
+ defineProperty(t, r, o) {
225
+ return n ?? (n = e()), Reflect.defineProperty(n, r, o);
226
+ }
227
+ });
228
+ }
229
+ function qe(e) {
230
+ return typeof e == "bigint" ? e.toString() + "n" : typeof e == "string" ? `"${e}"` : `${e}`;
231
+ }
232
+ function Xe(e) {
233
+ return Object.keys(e).filter((n) => e[n]._zod.optin === "optional" && e[n]._zod.optout === "optional");
234
+ }
235
+ const He = {
236
+ safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
237
+ int32: [-2147483648, 2147483647],
238
+ uint32: [0, 4294967295],
239
+ float32: [-34028234663852886e22, 34028234663852886e22],
240
+ float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
241
+ }, Qe = {
242
+ int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")],
243
+ uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")]
244
+ };
245
+ function en(e, n) {
246
+ const t = {}, r = e._zod.def;
247
+ for (const o in n) {
248
+ if (!(o in r.shape))
249
+ throw new Error(`Unrecognized key: "${o}"`);
250
+ n[o] && (t[o] = r.shape[o]);
251
+ }
252
+ return O(e, {
253
+ ...e._zod.def,
254
+ shape: t,
255
+ checks: []
256
+ });
257
+ }
258
+ function nn(e, n) {
259
+ const t = { ...e._zod.def.shape }, r = e._zod.def;
260
+ for (const o in n) {
261
+ if (!(o in r.shape))
262
+ throw new Error(`Unrecognized key: "${o}"`);
263
+ n[o] && delete t[o];
264
+ }
265
+ return O(e, {
266
+ ...e._zod.def,
267
+ shape: t,
268
+ checks: []
269
+ });
270
+ }
271
+ function tn(e, n) {
272
+ const t = {
273
+ ...e._zod.def,
274
+ get shape() {
275
+ const r = { ...e._zod.def.shape, ...n };
276
+ return L(this, "shape", r), r;
277
+ },
278
+ checks: []
279
+ // delete existing checks
280
+ };
281
+ return O(e, t);
282
+ }
283
+ function rn(e, n) {
284
+ return O(e, {
285
+ ...e._zod.def,
286
+ get shape() {
287
+ const t = { ...e._zod.def.shape, ...n._zod.def.shape };
288
+ return L(this, "shape", t), t;
289
+ },
290
+ catchall: n._zod.def.catchall,
291
+ checks: []
292
+ // delete existing checks
293
+ });
294
+ }
295
+ function on(e, n, t) {
296
+ const r = n._zod.def.shape, o = { ...r };
297
+ if (t)
298
+ for (const i in t) {
299
+ if (!(i in r))
300
+ throw new Error(`Unrecognized key: "${i}"`);
301
+ t[i] && (o[i] = e ? new e({
302
+ type: "optional",
303
+ innerType: r[i]
304
+ }) : r[i]);
305
+ }
306
+ else
307
+ for (const i in r)
308
+ o[i] = e ? new e({
309
+ type: "optional",
310
+ innerType: r[i]
311
+ }) : r[i];
312
+ return O(n, {
313
+ ...n._zod.def,
314
+ shape: o,
315
+ checks: []
316
+ });
317
+ }
318
+ function sn(e, n, t) {
319
+ const r = n._zod.def.shape, o = { ...r };
320
+ if (t)
321
+ for (const i in t) {
322
+ if (!(i in o))
323
+ throw new Error(`Unrecognized key: "${i}"`);
324
+ t[i] && (o[i] = new e({
325
+ type: "nonoptional",
326
+ innerType: r[i]
327
+ }));
328
+ }
329
+ else
330
+ for (const i in r)
331
+ o[i] = new e({
332
+ type: "nonoptional",
333
+ innerType: r[i]
334
+ });
335
+ return O(n, {
336
+ ...n._zod.def,
337
+ shape: o,
338
+ // optional: [],
339
+ checks: []
340
+ });
341
+ }
342
+ function U(e, n = 0) {
343
+ for (let t = n; t < e.issues.length; t++)
344
+ if (e.issues[t].continue !== !0)
345
+ return !0;
346
+ return !1;
347
+ }
348
+ function T(e, n) {
349
+ return n.map((t) => {
350
+ var r;
351
+ return (r = t).path ?? (r.path = []), t.path.unshift(e), t;
352
+ });
353
+ }
354
+ function V(e) {
355
+ return typeof e == "string" ? e : e == null ? void 0 : e.message;
356
+ }
357
+ function E(e, n, t) {
358
+ var o, i, s, c, l, p;
359
+ const r = { ...e, path: e.path ?? [] };
360
+ if (!e.message) {
361
+ const d = V((s = (i = (o = e.inst) == null ? void 0 : o._zod.def) == null ? void 0 : i.error) == null ? void 0 : s.call(i, e)) ?? V((c = n == null ? void 0 : n.error) == null ? void 0 : c.call(n, e)) ?? V((l = t.customError) == null ? void 0 : l.call(t, e)) ?? V((p = t.localeError) == null ? void 0 : p.call(t, e)) ?? "Invalid input";
362
+ r.message = d;
363
+ }
364
+ return delete r.inst, delete r.continue, n != null && n.reportInput || delete r.input, r;
365
+ }
366
+ function ue(e) {
367
+ return e instanceof Set ? "set" : e instanceof Map ? "map" : e instanceof File ? "file" : "unknown";
368
+ }
369
+ function ce(e) {
370
+ return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
371
+ }
372
+ function F(...e) {
373
+ const [n, t, r] = e;
374
+ return typeof n == "string" ? {
375
+ message: n,
376
+ code: "custom",
377
+ input: t,
378
+ inst: r
379
+ } : { ...n };
380
+ }
381
+ function wr(e) {
382
+ return Object.entries(e).filter(([n, t]) => Number.isNaN(Number.parseInt(n, 10))).map((n) => n[1]);
383
+ }
384
+ class Zr {
385
+ constructor(...n) {
386
+ }
387
+ }
388
+ const Gs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
389
+ __proto__: null,
390
+ BIGINT_FORMAT_RANGES: Qe,
391
+ Class: Zr,
392
+ NUMBER_FORMAT_RANGES: He,
393
+ aborted: U,
394
+ allowsEval: Je,
395
+ assert: mr,
396
+ assertEqual: pr,
397
+ assertIs: dr,
398
+ assertNever: hr,
399
+ assertNotEqual: fr,
400
+ assignProp: L,
401
+ cached: ie,
402
+ cleanEnum: wr,
403
+ cleanRegex: se,
404
+ clone: O,
405
+ createTransparentProxy: $r,
406
+ defineLazy: g,
407
+ esc: C,
408
+ escapeRegex: D,
409
+ extend: tn,
410
+ finalizeIssue: E,
411
+ floatSafeRemainder: Ke,
412
+ getElementAtPath: vr,
413
+ getEnumValues: We,
414
+ getLengthableOrigin: ce,
415
+ getParsedType: zr,
416
+ getSizableOrigin: ue,
417
+ isObject: G,
418
+ isPlainObject: ne,
419
+ issue: F,
420
+ joinValues: _r,
421
+ jsonStringifyReplacer: Ge,
422
+ merge: rn,
423
+ normalizeParams: a,
424
+ nullish: j,
425
+ numKeys: br,
426
+ omit: nn,
427
+ optionalKeys: Xe,
428
+ partial: on,
429
+ pick: en,
430
+ prefixIssues: T,
431
+ primitiveTypes: Ye,
432
+ promiseAllObject: gr,
433
+ propertyKeyTypes: te,
434
+ randomString: Ze,
435
+ required: sn,
436
+ stringifyPrimitive: qe,
437
+ unwrapMessage: V
438
+ }, Symbol.toStringTag, { value: "Module" })), un = (e, n) => {
439
+ e.name = "$ZodError", Object.defineProperty(e, "_zod", {
440
+ value: e._zod,
441
+ enumerable: !1
442
+ }), Object.defineProperty(e, "issues", {
443
+ value: n,
444
+ enumerable: !1
445
+ }), Object.defineProperty(e, "message", {
446
+ get() {
447
+ return JSON.stringify(n, Ge, 2);
448
+ },
449
+ enumerable: !0
450
+ // configurable: false,
451
+ });
452
+ }, cn = u("$ZodError", un), ae = u("$ZodError", un, { Parent: Error });
453
+ function yr(e, n = (t) => t.message) {
454
+ const t = {}, r = [];
455
+ for (const o of e.issues)
456
+ o.path.length > 0 ? (t[o.path[0]] = t[o.path[0]] || [], t[o.path[0]].push(n(o))) : r.push(n(o));
457
+ return { formErrors: r, fieldErrors: t };
458
+ }
459
+ function kr(e, n) {
460
+ const t = n || function(i) {
461
+ return i.message;
462
+ }, r = { _errors: [] }, o = (i) => {
463
+ for (const s of i.issues)
464
+ if (s.code === "invalid_union" && s.errors.length)
465
+ s.errors.map((c) => o({ issues: c }));
466
+ else if (s.code === "invalid_key")
467
+ o({ issues: s.issues });
468
+ else if (s.code === "invalid_element")
469
+ o({ issues: s.issues });
470
+ else if (s.path.length === 0)
471
+ r._errors.push(t(s));
472
+ else {
473
+ let c = r, l = 0;
474
+ for (; l < s.path.length; ) {
475
+ const p = s.path[l];
476
+ l === s.path.length - 1 ? (c[p] = c[p] || { _errors: [] }, c[p]._errors.push(t(s))) : c[p] = c[p] || { _errors: [] }, c = c[p], l++;
477
+ }
478
+ }
479
+ };
480
+ return o(e), r;
481
+ }
482
+ function Ks(e, n) {
483
+ const t = n || function(i) {
484
+ return i.message;
485
+ }, r = { errors: [] }, o = (i, s = []) => {
486
+ var c, l;
487
+ for (const p of i.issues)
488
+ if (p.code === "invalid_union" && p.errors.length)
489
+ p.errors.map((d) => o({ issues: d }, p.path));
490
+ else if (p.code === "invalid_key")
491
+ o({ issues: p.issues }, p.path);
492
+ else if (p.code === "invalid_element")
493
+ o({ issues: p.issues }, p.path);
494
+ else {
495
+ const d = [...s, ...p.path];
496
+ if (d.length === 0) {
497
+ r.errors.push(t(p));
498
+ continue;
499
+ }
500
+ let f = r, m = 0;
501
+ for (; m < d.length; ) {
502
+ const v = d[m], y = m === d.length - 1;
503
+ typeof v == "string" ? (f.properties ?? (f.properties = {}), (c = f.properties)[v] ?? (c[v] = { errors: [] }), f = f.properties[v]) : (f.items ?? (f.items = []), (l = f.items)[v] ?? (l[v] = { errors: [] }), f = f.items[v]), y && f.errors.push(t(p)), m++;
504
+ }
505
+ }
506
+ };
507
+ return o(e), r;
508
+ }
509
+ function Ir(e) {
510
+ const n = [];
511
+ for (const t of e)
512
+ typeof t == "number" ? n.push(`[${t}]`) : typeof t == "symbol" ? n.push(`[${JSON.stringify(String(t))}]`) : /[^\w$]/.test(t) ? n.push(`[${JSON.stringify(t)}]`) : (n.length && n.push("."), n.push(t));
513
+ return n.join("");
514
+ }
515
+ function Js(e) {
516
+ var r;
517
+ const n = [], t = [...e.issues].sort((o, i) => o.path.length - i.path.length);
518
+ for (const o of t)
519
+ n.push(`✖ ${o.message}`), (r = o.path) != null && r.length && n.push(` → at ${Ir(o.path)}`);
520
+ return n.join(`
521
+ `);
522
+ }
523
+ const an = (e) => (n, t, r, o) => {
524
+ const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, s = n._zod.run({ value: t, issues: [] }, i);
525
+ if (s instanceof Promise)
526
+ throw new W();
527
+ if (s.issues.length) {
528
+ const c = new ((o == null ? void 0 : o.Err) ?? e)(s.issues.map((l) => E(l, i, x())));
529
+ throw Error.captureStackTrace(c, o == null ? void 0 : o.callee), c;
530
+ }
531
+ return s.value;
532
+ }, Ys = /* @__PURE__ */ an(ae), ln = (e) => async (n, t, r, o) => {
533
+ const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
534
+ let s = n._zod.run({ value: t, issues: [] }, i);
535
+ if (s instanceof Promise && (s = await s), s.issues.length) {
536
+ const c = new ((o == null ? void 0 : o.Err) ?? e)(s.issues.map((l) => E(l, i, x())));
537
+ throw Error.captureStackTrace(c, o == null ? void 0 : o.callee), c;
538
+ }
539
+ return s.value;
540
+ }, qs = /* @__PURE__ */ ln(ae), pn = (e) => (n, t, r) => {
541
+ const o = r ? { ...r, async: !1 } : { async: !1 }, i = n._zod.run({ value: t, issues: [] }, o);
542
+ if (i instanceof Promise)
543
+ throw new W();
544
+ return i.issues.length ? {
545
+ success: !1,
546
+ error: new (e ?? cn)(i.issues.map((s) => E(s, o, x())))
547
+ } : { success: !0, data: i.value };
548
+ }, Tr = /* @__PURE__ */ pn(ae), fn = (e) => async (n, t, r) => {
549
+ const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
550
+ let i = n._zod.run({ value: t, issues: [] }, o);
551
+ return i instanceof Promise && (i = await i), i.issues.length ? {
552
+ success: !1,
553
+ error: new e(i.issues.map((s) => E(s, o, x())))
554
+ } : { success: !0, data: i.value };
555
+ }, Er = /* @__PURE__ */ fn(ae), dn = /^[cC][^\s-]{8,}$/, hn = /^[0-9a-z]+$/, mn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, _n = /^[0-9a-vA-V]{20}$/, vn = /^[A-Za-z0-9]{27}$/, gn = /^[a-zA-Z0-9_-]{21}$/, bn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Sr = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, zn = /^([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})$/, M = (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)$/, Pr = /* @__PURE__ */ M(4), xr = /* @__PURE__ */ M(6), Ar = /* @__PURE__ */ M(7), $n = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Nr = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, Or = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, jr = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u, Dr = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, wn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
556
+ function Zn() {
557
+ return new RegExp(wn, "u");
558
+ }
559
+ const yn = /^(?:(?: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])$/, kn = /^(([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})$/, In = /^((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])$/, Tn = /^(([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])$/, En = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, ye = /^[A-Za-z0-9_-]*$/, Sn = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/, Rr = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/, Pn = /^\+(?:[0-9]){6,14}[0-9]$/, xn = "(?:(?:\\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(`^${xn}$`);
560
+ function Nn(e) {
561
+ const n = "(?:[01]\\d|2[0-3]):[0-5]\\d";
562
+ return typeof e.precision == "number" ? e.precision === -1 ? `${n}` : e.precision === 0 ? `${n}:[0-5]\\d` : `${n}:[0-5]\\d\\.\\d{${e.precision}}` : `${n}(?::[0-5]\\d(?:\\.\\d+)?)?`;
563
+ }
564
+ function On(e) {
565
+ return new RegExp(`^${Nn(e)}$`);
566
+ }
567
+ function jn(e) {
568
+ const n = Nn({ precision: e.precision }), t = ["Z"];
569
+ e.local && t.push(""), e.offset && t.push("([+-]\\d{2}:\\d{2})");
570
+ const r = `${n}(?:${t.join("|")})`;
571
+ return new RegExp(`^${xn}T(?:${r})$`);
572
+ }
573
+ const Dn = (e) => {
574
+ const n = e ? `[\\s\\S]{${(e == null ? void 0 : e.minimum) ?? 0},${(e == null ? void 0 : e.maximum) ?? ""}}` : "[\\s\\S]*";
575
+ return new RegExp(`^${n}$`);
576
+ }, Rn = /^\d+n?$/, Cn = /^\d+$/, Un = /^-?\d+(?:\.\d+)?/i, Fn = /true|false/i, Mn = /null/i, Ln = /undefined/i, Bn = /^[^A-Z]*$/, Vn = /^[^a-z]*$/, Xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
577
+ __proto__: null,
578
+ _emoji: wn,
579
+ base64: En,
580
+ base64url: ye,
581
+ bigint: Rn,
582
+ boolean: Fn,
583
+ browserEmail: Dr,
584
+ cidrv4: In,
585
+ cidrv6: Tn,
586
+ cuid: dn,
587
+ cuid2: hn,
588
+ date: An,
589
+ datetime: jn,
590
+ domain: Rr,
591
+ duration: bn,
592
+ e164: Pn,
593
+ email: $n,
594
+ emoji: Zn,
595
+ extendedDuration: Sr,
596
+ guid: zn,
597
+ hostname: Sn,
598
+ html5Email: Nr,
599
+ integer: Cn,
600
+ ipv4: yn,
601
+ ipv6: kn,
602
+ ksuid: vn,
603
+ lowercase: Bn,
604
+ nanoid: gn,
605
+ null: Mn,
606
+ number: Un,
607
+ rfc5322Email: Or,
608
+ string: Dn,
609
+ time: On,
610
+ ulid: mn,
611
+ undefined: Ln,
612
+ unicodeEmail: jr,
613
+ uppercase: Vn,
614
+ uuid: M,
615
+ uuid4: Pr,
616
+ uuid6: xr,
617
+ uuid7: Ar,
618
+ xid: _n
619
+ }, Symbol.toStringTag, { value: "Module" })), Z = /* @__PURE__ */ u("$ZodCheck", (e, n) => {
620
+ var t;
621
+ e._zod ?? (e._zod = {}), e._zod.def = n, (t = e._zod).onattach ?? (t.onattach = []);
622
+ }), Wn = {
623
+ number: "number",
624
+ bigint: "bigint",
625
+ object: "date"
626
+ }, Gn = /* @__PURE__ */ u("$ZodCheckLessThan", (e, n) => {
627
+ Z.init(e, n);
628
+ const t = Wn[typeof n.value];
629
+ e._zod.onattach.push((r) => {
630
+ const o = r._zod.bag, i = (n.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
631
+ n.value < i && (n.inclusive ? o.maximum = n.value : o.exclusiveMaximum = n.value);
632
+ }), e._zod.check = (r) => {
633
+ (n.inclusive ? r.value <= n.value : r.value < n.value) || r.issues.push({
634
+ origin: t,
635
+ code: "too_big",
636
+ maximum: n.value,
637
+ input: r.value,
638
+ inclusive: n.inclusive,
639
+ inst: e,
640
+ continue: !n.abort
641
+ });
642
+ };
643
+ }), Kn = /* @__PURE__ */ u("$ZodCheckGreaterThan", (e, n) => {
644
+ Z.init(e, n);
645
+ const t = Wn[typeof n.value];
646
+ e._zod.onattach.push((r) => {
647
+ const o = r._zod.bag, i = (n.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
648
+ n.value > i && (n.inclusive ? o.minimum = n.value : o.exclusiveMinimum = n.value);
649
+ }), e._zod.check = (r) => {
650
+ (n.inclusive ? r.value >= n.value : r.value > n.value) || r.issues.push({
651
+ origin: t,
652
+ code: "too_small",
653
+ minimum: n.value,
654
+ input: r.value,
655
+ inclusive: n.inclusive,
656
+ inst: e,
657
+ continue: !n.abort
658
+ });
659
+ };
660
+ }), Cr = /* @__PURE__ */ u("$ZodCheckMultipleOf", (e, n) => {
661
+ Z.init(e, n), e._zod.onattach.push((t) => {
662
+ var r;
663
+ (r = t._zod.bag).multipleOf ?? (r.multipleOf = n.value);
664
+ }), e._zod.check = (t) => {
665
+ if (typeof t.value != typeof n.value)
666
+ throw new Error("Cannot mix number and bigint in multiple_of check.");
667
+ (typeof t.value == "bigint" ? t.value % n.value === BigInt(0) : Ke(t.value, n.value) === 0) || t.issues.push({
668
+ origin: typeof t.value,
669
+ code: "not_multiple_of",
670
+ divisor: n.value,
671
+ input: t.value,
672
+ inst: e,
673
+ continue: !n.abort
674
+ });
675
+ };
676
+ }), Ur = /* @__PURE__ */ u("$ZodCheckNumberFormat", (e, n) => {
677
+ var s;
678
+ Z.init(e, n), n.format = n.format || "float64";
679
+ const t = (s = n.format) == null ? void 0 : s.includes("int"), r = t ? "int" : "number", [o, i] = He[n.format];
680
+ e._zod.onattach.push((c) => {
681
+ const l = c._zod.bag;
682
+ l.format = n.format, l.minimum = o, l.maximum = i, t && (l.pattern = Cn);
683
+ }), e._zod.check = (c) => {
684
+ const l = c.value;
685
+ if (t) {
686
+ if (!Number.isInteger(l)) {
687
+ c.issues.push({
688
+ expected: r,
689
+ format: n.format,
690
+ code: "invalid_type",
691
+ input: l,
692
+ inst: e
693
+ });
694
+ return;
695
+ }
696
+ if (!Number.isSafeInteger(l)) {
697
+ l > 0 ? c.issues.push({
698
+ input: l,
699
+ code: "too_big",
700
+ maximum: Number.MAX_SAFE_INTEGER,
701
+ note: "Integers must be within the safe integer range.",
702
+ inst: e,
703
+ origin: r,
704
+ continue: !n.abort
705
+ }) : c.issues.push({
706
+ input: l,
707
+ code: "too_small",
708
+ minimum: Number.MIN_SAFE_INTEGER,
709
+ note: "Integers must be within the safe integer range.",
710
+ inst: e,
711
+ origin: r,
712
+ continue: !n.abort
713
+ });
714
+ return;
715
+ }
716
+ }
717
+ l < o && c.issues.push({
718
+ origin: "number",
719
+ input: l,
720
+ code: "too_small",
721
+ minimum: o,
722
+ inclusive: !0,
723
+ inst: e,
724
+ continue: !n.abort
725
+ }), l > i && c.issues.push({
726
+ origin: "number",
727
+ input: l,
728
+ code: "too_big",
729
+ maximum: i,
730
+ inst: e
731
+ });
732
+ };
733
+ }), Fr = /* @__PURE__ */ u("$ZodCheckBigIntFormat", (e, n) => {
734
+ Z.init(e, n);
735
+ const [t, r] = Qe[n.format];
736
+ e._zod.onattach.push((o) => {
737
+ const i = o._zod.bag;
738
+ i.format = n.format, i.minimum = t, i.maximum = r;
739
+ }), e._zod.check = (o) => {
740
+ const i = o.value;
741
+ i < t && o.issues.push({
742
+ origin: "bigint",
743
+ input: i,
744
+ code: "too_small",
745
+ minimum: t,
746
+ inclusive: !0,
747
+ inst: e,
748
+ continue: !n.abort
749
+ }), i > r && o.issues.push({
750
+ origin: "bigint",
751
+ input: i,
752
+ code: "too_big",
753
+ maximum: r,
754
+ inst: e
755
+ });
756
+ };
757
+ }), Mr = /* @__PURE__ */ u("$ZodCheckMaxSize", (e, n) => {
758
+ Z.init(e, n), e._zod.when = (t) => {
759
+ const r = t.value;
760
+ return !j(r) && r.size !== void 0;
761
+ }, e._zod.onattach.push((t) => {
762
+ const r = t._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
763
+ n.maximum < r && (t._zod.bag.maximum = n.maximum);
764
+ }), e._zod.check = (t) => {
765
+ const r = t.value;
766
+ r.size <= n.maximum || t.issues.push({
767
+ origin: ue(r),
768
+ code: "too_big",
769
+ maximum: n.maximum,
770
+ input: r,
771
+ inst: e,
772
+ continue: !n.abort
773
+ });
774
+ };
775
+ }), Lr = /* @__PURE__ */ u("$ZodCheckMinSize", (e, n) => {
776
+ Z.init(e, n), e._zod.when = (t) => {
777
+ const r = t.value;
778
+ return !j(r) && r.size !== void 0;
779
+ }, e._zod.onattach.push((t) => {
780
+ const r = t._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
781
+ n.minimum > r && (t._zod.bag.minimum = n.minimum);
782
+ }), e._zod.check = (t) => {
783
+ const r = t.value;
784
+ r.size >= n.minimum || t.issues.push({
785
+ origin: ue(r),
786
+ code: "too_small",
787
+ minimum: n.minimum,
788
+ input: r,
789
+ inst: e,
790
+ continue: !n.abort
791
+ });
792
+ };
793
+ }), Br = /* @__PURE__ */ u("$ZodCheckSizeEquals", (e, n) => {
794
+ Z.init(e, n), e._zod.when = (t) => {
795
+ const r = t.value;
796
+ return !j(r) && r.size !== void 0;
797
+ }, e._zod.onattach.push((t) => {
798
+ const r = t._zod.bag;
799
+ r.minimum = n.size, r.maximum = n.size, r.size = n.size;
800
+ }), e._zod.check = (t) => {
801
+ const r = t.value, o = r.size;
802
+ if (o === n.size)
803
+ return;
804
+ const i = o > n.size;
805
+ t.issues.push({
806
+ origin: ue(r),
807
+ ...i ? { code: "too_big", maximum: n.size } : { code: "too_small", minimum: n.size },
808
+ input: t.value,
809
+ inst: e,
810
+ continue: !n.abort
811
+ });
812
+ };
813
+ }), Vr = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, n) => {
814
+ Z.init(e, n), e._zod.when = (t) => {
815
+ const r = t.value;
816
+ return !j(r) && r.length !== void 0;
817
+ }, e._zod.onattach.push((t) => {
818
+ const r = t._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
819
+ n.maximum < r && (t._zod.bag.maximum = n.maximum);
820
+ }), e._zod.check = (t) => {
821
+ const r = t.value;
822
+ if (r.length <= n.maximum)
823
+ return;
824
+ const i = ce(r);
825
+ t.issues.push({
826
+ origin: i,
827
+ code: "too_big",
828
+ maximum: n.maximum,
829
+ inclusive: !0,
830
+ input: r,
831
+ inst: e,
832
+ continue: !n.abort
833
+ });
834
+ };
835
+ }), Wr = /* @__PURE__ */ u("$ZodCheckMinLength", (e, n) => {
836
+ Z.init(e, n), e._zod.when = (t) => {
837
+ const r = t.value;
838
+ return !j(r) && r.length !== void 0;
839
+ }, e._zod.onattach.push((t) => {
840
+ const r = t._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
841
+ n.minimum > r && (t._zod.bag.minimum = n.minimum);
842
+ }), e._zod.check = (t) => {
843
+ const r = t.value;
844
+ if (r.length >= n.minimum)
845
+ return;
846
+ const i = ce(r);
847
+ t.issues.push({
848
+ origin: i,
849
+ code: "too_small",
850
+ minimum: n.minimum,
851
+ inclusive: !0,
852
+ input: r,
853
+ inst: e,
854
+ continue: !n.abort
855
+ });
856
+ };
857
+ }), Gr = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, n) => {
858
+ Z.init(e, n), e._zod.when = (t) => {
859
+ const r = t.value;
860
+ return !j(r) && r.length !== void 0;
861
+ }, e._zod.onattach.push((t) => {
862
+ const r = t._zod.bag;
863
+ r.minimum = n.length, r.maximum = n.length, r.length = n.length;
864
+ }), e._zod.check = (t) => {
865
+ const r = t.value, o = r.length;
866
+ if (o === n.length)
867
+ return;
868
+ const i = ce(r), s = o > n.length;
869
+ t.issues.push({
870
+ origin: i,
871
+ ...s ? { code: "too_big", maximum: n.length } : { code: "too_small", minimum: n.length },
872
+ input: t.value,
873
+ inst: e,
874
+ continue: !n.abort
875
+ });
876
+ };
877
+ }), le = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, n) => {
878
+ var t;
879
+ Z.init(e, n), e._zod.onattach.push((r) => {
880
+ const o = r._zod.bag;
881
+ o.format = n.format, n.pattern && (o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n.pattern));
882
+ }), (t = e._zod).check ?? (t.check = (r) => {
883
+ if (!n.pattern)
884
+ throw new Error("Not implemented.");
885
+ n.pattern.lastIndex = 0, !n.pattern.test(r.value) && r.issues.push({
886
+ origin: "string",
887
+ code: "invalid_format",
888
+ format: n.format,
889
+ input: r.value,
890
+ ...n.pattern ? { pattern: n.pattern.toString() } : {},
891
+ inst: e,
892
+ continue: !n.abort
893
+ });
894
+ });
895
+ }), Kr = /* @__PURE__ */ u("$ZodCheckRegex", (e, n) => {
896
+ le.init(e, n), e._zod.check = (t) => {
897
+ n.pattern.lastIndex = 0, !n.pattern.test(t.value) && t.issues.push({
898
+ origin: "string",
899
+ code: "invalid_format",
900
+ format: "regex",
901
+ input: t.value,
902
+ pattern: n.pattern.toString(),
903
+ inst: e,
904
+ continue: !n.abort
905
+ });
906
+ };
907
+ }), Jr = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, n) => {
908
+ n.pattern ?? (n.pattern = Bn), le.init(e, n);
909
+ }), Yr = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, n) => {
910
+ n.pattern ?? (n.pattern = Vn), le.init(e, n);
911
+ }), qr = /* @__PURE__ */ u("$ZodCheckIncludes", (e, n) => {
912
+ Z.init(e, n);
913
+ const t = D(n.includes), r = new RegExp(typeof n.position == "number" ? `^.{${n.position}}${t}` : t);
914
+ n.pattern = r, e._zod.onattach.push((o) => {
915
+ const i = o._zod.bag;
916
+ i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(r);
917
+ }), e._zod.check = (o) => {
918
+ o.value.includes(n.includes, n.position) || o.issues.push({
919
+ origin: "string",
920
+ code: "invalid_format",
921
+ format: "includes",
922
+ includes: n.includes,
923
+ input: o.value,
924
+ inst: e,
925
+ continue: !n.abort
926
+ });
927
+ };
928
+ }), Xr = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, n) => {
929
+ Z.init(e, n);
930
+ const t = new RegExp(`^${D(n.prefix)}.*`);
931
+ n.pattern ?? (n.pattern = t), e._zod.onattach.push((r) => {
932
+ const o = r._zod.bag;
933
+ o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(t);
934
+ }), e._zod.check = (r) => {
935
+ r.value.startsWith(n.prefix) || r.issues.push({
936
+ origin: "string",
937
+ code: "invalid_format",
938
+ format: "starts_with",
939
+ prefix: n.prefix,
940
+ input: r.value,
941
+ inst: e,
942
+ continue: !n.abort
943
+ });
944
+ };
945
+ }), Hr = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, n) => {
946
+ Z.init(e, n);
947
+ const t = new RegExp(`.*${D(n.suffix)}$`);
948
+ n.pattern ?? (n.pattern = t), e._zod.onattach.push((r) => {
949
+ const o = r._zod.bag;
950
+ o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(t);
951
+ }), e._zod.check = (r) => {
952
+ r.value.endsWith(n.suffix) || r.issues.push({
953
+ origin: "string",
954
+ code: "invalid_format",
955
+ format: "ends_with",
956
+ suffix: n.suffix,
957
+ input: r.value,
958
+ inst: e,
959
+ continue: !n.abort
960
+ });
961
+ };
962
+ });
963
+ function xe(e, n, t) {
964
+ e.issues.length && n.issues.push(...T(t, e.issues));
965
+ }
966
+ const Qr = /* @__PURE__ */ u("$ZodCheckProperty", (e, n) => {
967
+ Z.init(e, n), e._zod.check = (t) => {
968
+ const r = n.schema._zod.run({
969
+ value: t.value[n.property],
970
+ issues: []
971
+ }, {});
972
+ if (r instanceof Promise)
973
+ return r.then((o) => xe(o, t, n.property));
974
+ xe(r, t, n.property);
975
+ };
976
+ }), eo = /* @__PURE__ */ u("$ZodCheckMimeType", (e, n) => {
977
+ Z.init(e, n);
978
+ const t = new Set(n.mime);
979
+ e._zod.onattach.push((r) => {
980
+ r._zod.bag.mime = n.mime;
981
+ }), e._zod.check = (r) => {
982
+ t.has(r.value.type) || r.issues.push({
983
+ code: "invalid_value",
984
+ values: n.mime,
985
+ input: r.value.type,
986
+ path: ["type"],
987
+ inst: e
988
+ });
989
+ };
990
+ }), no = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, n) => {
991
+ Z.init(e, n), e._zod.check = (t) => {
992
+ t.value = n.tx(t.value);
993
+ };
994
+ });
995
+ class to {
996
+ constructor(n = []) {
997
+ this.content = [], this.indent = 0, this && (this.args = n);
998
+ }
999
+ indented(n) {
1000
+ this.indent += 1, n(this), this.indent -= 1;
1001
+ }
1002
+ write(n) {
1003
+ if (typeof n == "function") {
1004
+ n(this, { execution: "sync" }), n(this, { execution: "async" });
1005
+ return;
1006
+ }
1007
+ const r = n.split(`
1008
+ `).filter((s) => s), o = Math.min(...r.map((s) => s.length - s.trimStart().length)), i = r.map((s) => s.slice(o)).map((s) => " ".repeat(this.indent * 2) + s);
1009
+ for (const s of i)
1010
+ this.content.push(s);
1011
+ }
1012
+ compile() {
1013
+ const n = Function, t = this == null ? void 0 : this.args, o = [...((this == null ? void 0 : this.content) ?? [""]).map((i) => ` ${i}`)];
1014
+ return new n(...t, o.join(`
1015
+ `));
1016
+ }
1017
+ }
1018
+ const ro = {
1019
+ major: 4,
1020
+ minor: 0,
1021
+ patch: 0
1022
+ }, h = /* @__PURE__ */ u("$ZodType", (e, n) => {
1023
+ var o;
1024
+ var t;
1025
+ e ?? (e = {}), g(e._zod, "id", () => n.type + "_" + Ze(10)), e._zod.def = n, e._zod.bag = e._zod.bag || {}, e._zod.version = ro;
1026
+ const r = [...e._zod.def.checks ?? []];
1027
+ e._zod.traits.has("$ZodCheck") && r.unshift(e);
1028
+ for (const i of r)
1029
+ for (const s of i._zod.onattach)
1030
+ s(e);
1031
+ if (r.length === 0)
1032
+ (t = e._zod).deferred ?? (t.deferred = []), (o = e._zod.deferred) == null || o.push(() => {
1033
+ e._zod.run = e._zod.parse;
1034
+ });
1035
+ else {
1036
+ const i = (s, c, l) => {
1037
+ let p = U(s), d;
1038
+ for (const f of c) {
1039
+ if (f._zod.when) {
1040
+ if (!f._zod.when(s))
1041
+ continue;
1042
+ } else if (p)
1043
+ continue;
1044
+ const m = s.issues.length, v = f._zod.check(s);
1045
+ if (v instanceof Promise && (l == null ? void 0 : l.async) === !1)
1046
+ throw new W();
1047
+ if (d || v instanceof Promise)
1048
+ d = (d ?? Promise.resolve()).then(async () => {
1049
+ await v, s.issues.length !== m && (p || (p = U(s, m)));
1050
+ });
1051
+ else {
1052
+ if (s.issues.length === m)
1053
+ continue;
1054
+ p || (p = U(s, m));
1055
+ }
1056
+ }
1057
+ return d ? d.then(() => s) : s;
1058
+ };
1059
+ e._zod.run = (s, c) => {
1060
+ const l = e._zod.parse(s, c);
1061
+ if (l instanceof Promise) {
1062
+ if (c.async === !1)
1063
+ throw new W();
1064
+ return l.then((p) => i(p, r, c));
1065
+ }
1066
+ return i(l, r, c);
1067
+ };
1068
+ }
1069
+ e["~standard"] = {
1070
+ validate: (i) => {
1071
+ var s;
1072
+ try {
1073
+ const c = Tr(e, i);
1074
+ return c.success ? { value: c.data } : { issues: (s = c.error) == null ? void 0 : s.issues };
1075
+ } catch {
1076
+ return Er(e, i).then((l) => {
1077
+ var p;
1078
+ return l.success ? { value: l.data } : { issues: (p = l.error) == null ? void 0 : p.issues };
1079
+ });
1080
+ }
1081
+ },
1082
+ vendor: "zod",
1083
+ version: 1
1084
+ };
1085
+ }), pe = /* @__PURE__ */ u("$ZodString", (e, n) => {
1086
+ var t;
1087
+ h.init(e, n), e._zod.pattern = [...((t = e == null ? void 0 : e._zod.bag) == null ? void 0 : t.patterns) ?? []].pop() ?? Dn(e._zod.bag), e._zod.parse = (r, o) => {
1088
+ if (n.coerce)
1089
+ try {
1090
+ r.value = String(r.value);
1091
+ } catch {
1092
+ }
1093
+ return typeof r.value == "string" || r.issues.push({
1094
+ expected: "string",
1095
+ code: "invalid_type",
1096
+ input: r.value,
1097
+ inst: e
1098
+ }), r;
1099
+ };
1100
+ }), z = /* @__PURE__ */ u("$ZodStringFormat", (e, n) => {
1101
+ le.init(e, n), pe.init(e, n);
1102
+ }), oo = /* @__PURE__ */ u("$ZodGUID", (e, n) => {
1103
+ n.pattern ?? (n.pattern = zn), z.init(e, n);
1104
+ }), io = /* @__PURE__ */ u("$ZodUUID", (e, n) => {
1105
+ if (n.version) {
1106
+ const r = {
1107
+ v1: 1,
1108
+ v2: 2,
1109
+ v3: 3,
1110
+ v4: 4,
1111
+ v5: 5,
1112
+ v6: 6,
1113
+ v7: 7,
1114
+ v8: 8
1115
+ }[n.version];
1116
+ if (r === void 0)
1117
+ throw new Error(`Invalid UUID version: "${n.version}"`);
1118
+ n.pattern ?? (n.pattern = M(r));
1119
+ } else
1120
+ n.pattern ?? (n.pattern = M());
1121
+ z.init(e, n);
1122
+ }), so = /* @__PURE__ */ u("$ZodEmail", (e, n) => {
1123
+ n.pattern ?? (n.pattern = $n), z.init(e, n);
1124
+ }), uo = /* @__PURE__ */ u("$ZodURL", (e, n) => {
1125
+ z.init(e, n), e._zod.check = (t) => {
1126
+ try {
1127
+ const r = new URL(t.value);
1128
+ n.hostname && (n.hostname.lastIndex = 0, n.hostname.test(r.hostname) || t.issues.push({
1129
+ code: "invalid_format",
1130
+ format: "url",
1131
+ note: "Invalid hostname",
1132
+ pattern: Sn.source,
1133
+ input: t.value,
1134
+ inst: e,
1135
+ continue: !n.abort
1136
+ })), n.protocol && (n.protocol.lastIndex = 0, n.protocol.test(r.protocol.endsWith(":") ? r.protocol.slice(0, -1) : r.protocol) || t.issues.push({
1137
+ code: "invalid_format",
1138
+ format: "url",
1139
+ note: "Invalid protocol",
1140
+ pattern: n.protocol.source,
1141
+ input: t.value,
1142
+ inst: e,
1143
+ continue: !n.abort
1144
+ }));
1145
+ return;
1146
+ } catch {
1147
+ t.issues.push({
1148
+ code: "invalid_format",
1149
+ format: "url",
1150
+ input: t.value,
1151
+ inst: e,
1152
+ continue: !n.abort
1153
+ });
1154
+ }
1155
+ };
1156
+ }), co = /* @__PURE__ */ u("$ZodEmoji", (e, n) => {
1157
+ n.pattern ?? (n.pattern = Zn()), z.init(e, n);
1158
+ }), ao = /* @__PURE__ */ u("$ZodNanoID", (e, n) => {
1159
+ n.pattern ?? (n.pattern = gn), z.init(e, n);
1160
+ }), lo = /* @__PURE__ */ u("$ZodCUID", (e, n) => {
1161
+ n.pattern ?? (n.pattern = dn), z.init(e, n);
1162
+ }), po = /* @__PURE__ */ u("$ZodCUID2", (e, n) => {
1163
+ n.pattern ?? (n.pattern = hn), z.init(e, n);
1164
+ }), fo = /* @__PURE__ */ u("$ZodULID", (e, n) => {
1165
+ n.pattern ?? (n.pattern = mn), z.init(e, n);
1166
+ }), ho = /* @__PURE__ */ u("$ZodXID", (e, n) => {
1167
+ n.pattern ?? (n.pattern = _n), z.init(e, n);
1168
+ }), mo = /* @__PURE__ */ u("$ZodKSUID", (e, n) => {
1169
+ n.pattern ?? (n.pattern = vn), z.init(e, n);
1170
+ }), _o = /* @__PURE__ */ u("$ZodISODateTime", (e, n) => {
1171
+ n.pattern ?? (n.pattern = jn(n)), z.init(e, n), e._zod.check;
1172
+ }), vo = /* @__PURE__ */ u("$ZodISODate", (e, n) => {
1173
+ n.pattern ?? (n.pattern = An), z.init(e, n);
1174
+ }), go = /* @__PURE__ */ u("$ZodISOTime", (e, n) => {
1175
+ n.pattern ?? (n.pattern = On(n)), z.init(e, n), e._zod.check;
1176
+ }), bo = /* @__PURE__ */ u("$ZodISODuration", (e, n) => {
1177
+ n.pattern ?? (n.pattern = bn), z.init(e, n);
1178
+ }), zo = /* @__PURE__ */ u("$ZodIPv4", (e, n) => {
1179
+ n.pattern ?? (n.pattern = yn), z.init(e, n), e._zod.onattach.push((t) => {
1180
+ const r = t._zod.bag;
1181
+ r.format = "ipv4";
1182
+ });
1183
+ }), $o = /* @__PURE__ */ u("$ZodIPv6", (e, n) => {
1184
+ n.pattern ?? (n.pattern = kn), z.init(e, n), e._zod.onattach.push((t) => {
1185
+ const r = t._zod.bag;
1186
+ r.format = "ipv6";
1187
+ }), e._zod.check = (t) => {
1188
+ try {
1189
+ new URL(`http://[${t.value}]`);
1190
+ } catch {
1191
+ t.issues.push({
1192
+ code: "invalid_format",
1193
+ format: "ipv6",
1194
+ input: t.value,
1195
+ inst: e,
1196
+ continue: !n.abort
1197
+ });
1198
+ }
1199
+ };
1200
+ }), wo = /* @__PURE__ */ u("$ZodCIDRv4", (e, n) => {
1201
+ n.pattern ?? (n.pattern = In), z.init(e, n);
1202
+ }), Zo = /* @__PURE__ */ u("$ZodCIDRv6", (e, n) => {
1203
+ n.pattern ?? (n.pattern = Tn), z.init(e, n), e._zod.check = (t) => {
1204
+ const [r, o] = t.value.split("/");
1205
+ try {
1206
+ if (!o)
1207
+ throw new Error();
1208
+ const i = Number(o);
1209
+ if (`${i}` !== o)
1210
+ throw new Error();
1211
+ if (i < 0 || i > 128)
1212
+ throw new Error();
1213
+ new URL(`http://[${r}]`);
1214
+ } catch {
1215
+ t.issues.push({
1216
+ code: "invalid_format",
1217
+ format: "cidrv6",
1218
+ input: t.value,
1219
+ inst: e,
1220
+ continue: !n.abort
1221
+ });
1222
+ }
1223
+ };
1224
+ });
1225
+ function Jn(e) {
1226
+ if (e === "")
1227
+ return !0;
1228
+ if (e.length % 4 !== 0)
1229
+ return !1;
1230
+ try {
1231
+ return atob(e), !0;
1232
+ } catch {
1233
+ return !1;
1234
+ }
1235
+ }
1236
+ const yo = /* @__PURE__ */ u("$ZodBase64", (e, n) => {
1237
+ n.pattern ?? (n.pattern = En), z.init(e, n), e._zod.onattach.push((t) => {
1238
+ t._zod.bag.contentEncoding = "base64";
1239
+ }), e._zod.check = (t) => {
1240
+ Jn(t.value) || t.issues.push({
1241
+ code: "invalid_format",
1242
+ format: "base64",
1243
+ input: t.value,
1244
+ inst: e,
1245
+ continue: !n.abort
1246
+ });
1247
+ };
1248
+ });
1249
+ function ko(e) {
1250
+ if (!ye.test(e))
1251
+ return !1;
1252
+ const n = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), t = n.padEnd(Math.ceil(n.length / 4) * 4, "=");
1253
+ return Jn(t);
1254
+ }
1255
+ const Io = /* @__PURE__ */ u("$ZodBase64URL", (e, n) => {
1256
+ n.pattern ?? (n.pattern = ye), z.init(e, n), e._zod.onattach.push((t) => {
1257
+ t._zod.bag.contentEncoding = "base64url";
1258
+ }), e._zod.check = (t) => {
1259
+ ko(t.value) || t.issues.push({
1260
+ code: "invalid_format",
1261
+ format: "base64url",
1262
+ input: t.value,
1263
+ inst: e,
1264
+ continue: !n.abort
1265
+ });
1266
+ };
1267
+ }), To = /* @__PURE__ */ u("$ZodE164", (e, n) => {
1268
+ n.pattern ?? (n.pattern = Pn), z.init(e, n);
1269
+ });
1270
+ function Eo(e, n = null) {
1271
+ try {
1272
+ const t = e.split(".");
1273
+ if (t.length !== 3)
1274
+ return !1;
1275
+ const [r] = t, o = JSON.parse(atob(r));
1276
+ return !("typ" in o && (o == null ? void 0 : o.typ) !== "JWT" || !o.alg || n && (!("alg" in o) || o.alg !== n));
1277
+ } catch {
1278
+ return !1;
1279
+ }
1280
+ }
1281
+ const So = /* @__PURE__ */ u("$ZodJWT", (e, n) => {
1282
+ z.init(e, n), e._zod.check = (t) => {
1283
+ Eo(t.value, n.alg) || t.issues.push({
1284
+ code: "invalid_format",
1285
+ format: "jwt",
1286
+ input: t.value,
1287
+ inst: e,
1288
+ continue: !n.abort
1289
+ });
1290
+ };
1291
+ }), Yn = /* @__PURE__ */ u("$ZodNumber", (e, n) => {
1292
+ h.init(e, n), e._zod.pattern = e._zod.bag.pattern ?? Un, e._zod.parse = (t, r) => {
1293
+ if (n.coerce)
1294
+ try {
1295
+ t.value = Number(t.value);
1296
+ } catch {
1297
+ }
1298
+ const o = t.value;
1299
+ if (typeof o == "number" && !Number.isNaN(o) && Number.isFinite(o))
1300
+ return t;
1301
+ const i = typeof o == "number" ? Number.isNaN(o) ? "NaN" : Number.isFinite(o) ? void 0 : "Infinity" : void 0;
1302
+ return t.issues.push({
1303
+ expected: "number",
1304
+ code: "invalid_type",
1305
+ input: o,
1306
+ inst: e,
1307
+ ...i ? { received: i } : {}
1308
+ }), t;
1309
+ };
1310
+ }), Po = /* @__PURE__ */ u("$ZodNumber", (e, n) => {
1311
+ Ur.init(e, n), Yn.init(e, n);
1312
+ }), qn = /* @__PURE__ */ u("$ZodBoolean", (e, n) => {
1313
+ h.init(e, n), e._zod.pattern = Fn, e._zod.parse = (t, r) => {
1314
+ if (n.coerce)
1315
+ try {
1316
+ t.value = !!t.value;
1317
+ } catch {
1318
+ }
1319
+ const o = t.value;
1320
+ return typeof o == "boolean" || t.issues.push({
1321
+ expected: "boolean",
1322
+ code: "invalid_type",
1323
+ input: o,
1324
+ inst: e
1325
+ }), t;
1326
+ };
1327
+ }), Xn = /* @__PURE__ */ u("$ZodBigInt", (e, n) => {
1328
+ h.init(e, n), e._zod.pattern = Rn, e._zod.parse = (t, r) => {
1329
+ if (n.coerce)
1330
+ try {
1331
+ t.value = BigInt(t.value);
1332
+ } catch {
1333
+ }
1334
+ const { value: o } = t;
1335
+ return typeof o == "bigint" || t.issues.push({
1336
+ expected: "bigint",
1337
+ code: "invalid_type",
1338
+ input: o,
1339
+ inst: e
1340
+ }), t;
1341
+ };
1342
+ }), xo = /* @__PURE__ */ u("$ZodBigInt", (e, n) => {
1343
+ Fr.init(e, n), Xn.init(e, n);
1344
+ }), Ao = /* @__PURE__ */ u("$ZodSymbol", (e, n) => {
1345
+ h.init(e, n), e._zod.parse = (t, r) => {
1346
+ const { value: o } = t;
1347
+ return typeof o == "symbol" || t.issues.push({
1348
+ expected: "symbol",
1349
+ code: "invalid_type",
1350
+ input: o,
1351
+ inst: e
1352
+ }), t;
1353
+ };
1354
+ }), No = /* @__PURE__ */ u("$ZodUndefined", (e, n) => {
1355
+ h.init(e, n), e._zod.pattern = Ln, e._zod.values = /* @__PURE__ */ new Set([void 0]), e._zod.parse = (t, r) => {
1356
+ const { value: o } = t;
1357
+ return typeof o > "u" || t.issues.push({
1358
+ expected: "undefined",
1359
+ code: "invalid_type",
1360
+ input: o,
1361
+ inst: e
1362
+ }), t;
1363
+ };
1364
+ }), Oo = /* @__PURE__ */ u("$ZodNull", (e, n) => {
1365
+ h.init(e, n), e._zod.pattern = Mn, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (t, r) => {
1366
+ const { value: o } = t;
1367
+ return o === null || t.issues.push({
1368
+ expected: "null",
1369
+ code: "invalid_type",
1370
+ input: o,
1371
+ inst: e
1372
+ }), t;
1373
+ };
1374
+ }), jo = /* @__PURE__ */ u("$ZodAny", (e, n) => {
1375
+ h.init(e, n), e._zod.parse = (t) => t;
1376
+ }), Do = /* @__PURE__ */ u("$ZodUnknown", (e, n) => {
1377
+ h.init(e, n), e._zod.parse = (t) => t;
1378
+ }), Ro = /* @__PURE__ */ u("$ZodNever", (e, n) => {
1379
+ h.init(e, n), e._zod.parse = (t, r) => (t.issues.push({
1380
+ expected: "never",
1381
+ code: "invalid_type",
1382
+ input: t.value,
1383
+ inst: e
1384
+ }), t);
1385
+ }), Co = /* @__PURE__ */ u("$ZodVoid", (e, n) => {
1386
+ h.init(e, n), e._zod.parse = (t, r) => {
1387
+ const { value: o } = t;
1388
+ return typeof o > "u" || t.issues.push({
1389
+ expected: "void",
1390
+ code: "invalid_type",
1391
+ input: o,
1392
+ inst: e
1393
+ }), t;
1394
+ };
1395
+ }), Uo = /* @__PURE__ */ u("$ZodDate", (e, n) => {
1396
+ h.init(e, n), e._zod.parse = (t, r) => {
1397
+ if (n.coerce)
1398
+ try {
1399
+ t.value = new Date(t.value);
1400
+ } catch {
1401
+ }
1402
+ const o = t.value, i = o instanceof Date;
1403
+ return i && !Number.isNaN(o.getTime()) || t.issues.push({
1404
+ expected: "date",
1405
+ code: "invalid_type",
1406
+ input: o,
1407
+ ...i ? { received: "Invalid Date" } : {},
1408
+ inst: e
1409
+ }), t;
1410
+ };
1411
+ });
1412
+ function Ae(e, n, t) {
1413
+ e.issues.length && n.issues.push(...T(t, e.issues)), n.value[t] = e.value;
1414
+ }
1415
+ const Fo = /* @__PURE__ */ u("$ZodArray", (e, n) => {
1416
+ h.init(e, n), e._zod.parse = (t, r) => {
1417
+ const o = t.value;
1418
+ if (!Array.isArray(o))
1419
+ return t.issues.push({
1420
+ expected: "array",
1421
+ code: "invalid_type",
1422
+ input: o,
1423
+ inst: e
1424
+ }), t;
1425
+ t.value = Array(o.length);
1426
+ const i = [];
1427
+ for (let s = 0; s < o.length; s++) {
1428
+ const c = o[s], l = n.element._zod.run({
1429
+ value: c,
1430
+ issues: []
1431
+ }, r);
1432
+ l instanceof Promise ? i.push(l.then((p) => Ae(p, t, s))) : Ae(l, t, s);
1433
+ }
1434
+ return i.length ? Promise.all(i).then(() => t) : t;
1435
+ };
1436
+ });
1437
+ function H(e, n, t) {
1438
+ e.issues.length && n.issues.push(...T(t, e.issues)), n.value[t] = e.value;
1439
+ }
1440
+ function Ne(e, n, t, r) {
1441
+ e.issues.length ? r[t] === void 0 ? t in r ? n.value[t] = void 0 : n.value[t] = e.value : n.issues.push(...T(t, e.issues)) : e.value === void 0 ? t in r && (n.value[t] = void 0) : n.value[t] = e.value;
1442
+ }
1443
+ const Mo = /* @__PURE__ */ u("$ZodObject", (e, n) => {
1444
+ h.init(e, n);
1445
+ const t = ie(() => {
1446
+ const f = Object.keys(n.shape);
1447
+ for (const v of f)
1448
+ if (!(n.shape[v] instanceof h))
1449
+ throw new Error(`Invalid element at key "${v}": expected a Zod schema`);
1450
+ const m = Xe(n.shape);
1451
+ return {
1452
+ shape: n.shape,
1453
+ keys: f,
1454
+ keySet: new Set(f),
1455
+ numKeys: f.length,
1456
+ optionalKeys: new Set(m)
1457
+ };
1458
+ });
1459
+ g(e._zod, "propValues", () => {
1460
+ const f = n.shape, m = {};
1461
+ for (const v in f) {
1462
+ const y = f[v]._zod;
1463
+ if (y.values) {
1464
+ m[v] ?? (m[v] = /* @__PURE__ */ new Set());
1465
+ for (const S of y.values)
1466
+ m[v].add(S);
1467
+ }
1468
+ }
1469
+ return m;
1470
+ });
1471
+ const r = (f) => {
1472
+ const m = new to(["shape", "payload", "ctx"]), { keys: v, optionalKeys: y } = t.value, S = (w) => {
1473
+ const b = C(w);
1474
+ return `shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`;
1475
+ };
1476
+ m.write("const input = payload.value;");
1477
+ const R = /* @__PURE__ */ Object.create(null);
1478
+ for (const w of v)
1479
+ R[w] = Ze(15);
1480
+ m.write("const newResult = {}");
1481
+ for (const w of v)
1482
+ if (y.has(w)) {
1483
+ const b = R[w];
1484
+ m.write(`const ${b} = ${S(w)};`);
1485
+ const k = C(w);
1486
+ m.write(`
1487
+ if (${b}.issues.length) {
1488
+ if (input[${k}] === undefined) {
1489
+ if (${k} in input) {
1490
+ newResult[${k}] = undefined;
1491
+ }
1492
+ } else {
1493
+ payload.issues = payload.issues.concat(
1494
+ ${b}.issues.map((iss) => ({
1495
+ ...iss,
1496
+ path: iss.path ? [${k}, ...iss.path] : [${k}],
1497
+ }))
1498
+ );
1499
+ }
1500
+ } else if (${b}.value === undefined) {
1501
+ if (${k} in input) newResult[${k}] = undefined;
1502
+ } else {
1503
+ newResult[${k}] = ${b}.value;
1504
+ }
1505
+ `);
1506
+ } else {
1507
+ const b = R[w];
1508
+ m.write(`const ${b} = ${S(w)};`), m.write(`
1509
+ if (${b}.issues.length) payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
1510
+ ...iss,
1511
+ path: iss.path ? [${C(w)}, ...iss.path] : [${C(w)}]
1512
+ })));`), m.write(`newResult[${C(w)}] = ${b}.value`);
1513
+ }
1514
+ m.write("payload.value = newResult;"), m.write("return payload;");
1515
+ const I = m.compile();
1516
+ return (w, b) => I(f, w, b);
1517
+ };
1518
+ let o;
1519
+ const i = G, s = !de.jitless, l = s && Je.value, { catchall: p } = n;
1520
+ let d;
1521
+ e._zod.parse = (f, m) => {
1522
+ d ?? (d = t.value);
1523
+ const v = f.value;
1524
+ if (!i(v))
1525
+ return f.issues.push({
1526
+ expected: "object",
1527
+ code: "invalid_type",
1528
+ input: v,
1529
+ inst: e
1530
+ }), f;
1531
+ const y = [];
1532
+ if (s && l && (m == null ? void 0 : m.async) === !1 && m.jitless !== !0)
1533
+ o || (o = r(n.shape)), f = o(f, m);
1534
+ else {
1535
+ f.value = {};
1536
+ const b = d.shape;
1537
+ for (const k of d.keys) {
1538
+ const B = b[k], X = B._zod.run({ value: v[k], issues: [] }, m), Se = B._zod.optin === "optional" && B._zod.optout === "optional";
1539
+ X instanceof Promise ? y.push(X.then((Pe) => Se ? Ne(Pe, f, k, v) : H(Pe, f, k))) : Se ? Ne(X, f, k, v) : H(X, f, k);
1540
+ }
1541
+ }
1542
+ if (!p)
1543
+ return y.length ? Promise.all(y).then(() => f) : f;
1544
+ const S = [], R = d.keySet, I = p._zod, w = I.def.type;
1545
+ for (const b of Object.keys(v)) {
1546
+ if (R.has(b))
1547
+ continue;
1548
+ if (w === "never") {
1549
+ S.push(b);
1550
+ continue;
1551
+ }
1552
+ const k = I.run({ value: v[b], issues: [] }, m);
1553
+ k instanceof Promise ? y.push(k.then((B) => H(B, f, b))) : H(k, f, b);
1554
+ }
1555
+ return S.length && f.issues.push({
1556
+ code: "unrecognized_keys",
1557
+ keys: S,
1558
+ input: v,
1559
+ inst: e
1560
+ }), y.length ? Promise.all(y).then(() => f) : f;
1561
+ };
1562
+ });
1563
+ function Oe(e, n, t, r) {
1564
+ for (const o of e)
1565
+ if (o.issues.length === 0)
1566
+ return n.value = o.value, n;
1567
+ return n.issues.push({
1568
+ code: "invalid_union",
1569
+ input: n.value,
1570
+ inst: t,
1571
+ errors: e.map((o) => o.issues.map((i) => E(i, r, x())))
1572
+ }), n;
1573
+ }
1574
+ const Hn = /* @__PURE__ */ u("$ZodUnion", (e, n) => {
1575
+ h.init(e, n), g(e._zod, "values", () => {
1576
+ if (n.options.every((t) => t._zod.values))
1577
+ return new Set(n.options.flatMap((t) => Array.from(t._zod.values)));
1578
+ }), g(e._zod, "pattern", () => {
1579
+ if (n.options.every((t) => t._zod.pattern)) {
1580
+ const t = n.options.map((r) => r._zod.pattern);
1581
+ return new RegExp(`^(${t.map((r) => se(r.source)).join("|")})$`);
1582
+ }
1583
+ }), e._zod.parse = (t, r) => {
1584
+ let o = !1;
1585
+ const i = [];
1586
+ for (const s of n.options) {
1587
+ const c = s._zod.run({
1588
+ value: t.value,
1589
+ issues: []
1590
+ }, r);
1591
+ if (c instanceof Promise)
1592
+ i.push(c), o = !0;
1593
+ else {
1594
+ if (c.issues.length === 0)
1595
+ return c;
1596
+ i.push(c);
1597
+ }
1598
+ }
1599
+ return o ? Promise.all(i).then((s) => Oe(s, t, e, r)) : Oe(i, t, e, r);
1600
+ };
1601
+ }), Lo = /* @__PURE__ */ u("$ZodDiscriminatedUnion", (e, n) => {
1602
+ Hn.init(e, n);
1603
+ const t = e._zod.parse;
1604
+ g(e._zod, "propValues", () => {
1605
+ const o = {};
1606
+ for (const i of n.options) {
1607
+ const s = i._zod.propValues;
1608
+ if (!s || Object.keys(s).length === 0)
1609
+ throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(i)}"`);
1610
+ for (const [c, l] of Object.entries(s)) {
1611
+ o[c] || (o[c] = /* @__PURE__ */ new Set());
1612
+ for (const p of l)
1613
+ o[c].add(p);
1614
+ }
1615
+ }
1616
+ return o;
1617
+ });
1618
+ const r = ie(() => {
1619
+ const o = n.options, i = /* @__PURE__ */ new Map();
1620
+ for (const s of o) {
1621
+ const c = s._zod.propValues[n.discriminator];
1622
+ if (!c || c.size === 0)
1623
+ throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(s)}"`);
1624
+ for (const l of c) {
1625
+ if (i.has(l))
1626
+ throw new Error(`Duplicate discriminator value "${String(l)}"`);
1627
+ i.set(l, s);
1628
+ }
1629
+ }
1630
+ return i;
1631
+ });
1632
+ e._zod.parse = (o, i) => {
1633
+ const s = o.value;
1634
+ if (!G(s))
1635
+ return o.issues.push({
1636
+ code: "invalid_type",
1637
+ expected: "object",
1638
+ input: s,
1639
+ inst: e
1640
+ }), o;
1641
+ const c = r.value.get(s == null ? void 0 : s[n.discriminator]);
1642
+ return c ? c._zod.run(o, i) : n.unionFallback ? t(o, i) : (o.issues.push({
1643
+ code: "invalid_union",
1644
+ errors: [],
1645
+ note: "No matching discriminator",
1646
+ input: s,
1647
+ path: [n.discriminator],
1648
+ inst: e
1649
+ }), o);
1650
+ };
1651
+ }), Bo = /* @__PURE__ */ u("$ZodIntersection", (e, n) => {
1652
+ h.init(e, n), e._zod.parse = (t, r) => {
1653
+ const { value: o } = t, i = n.left._zod.run({ value: o, issues: [] }, r), s = n.right._zod.run({ value: o, issues: [] }, r);
1654
+ return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([l, p]) => je(t, l, p)) : je(t, i, s);
1655
+ };
1656
+ });
1657
+ function he(e, n) {
1658
+ if (e === n)
1659
+ return { valid: !0, data: e };
1660
+ if (e instanceof Date && n instanceof Date && +e == +n)
1661
+ return { valid: !0, data: e };
1662
+ if (ne(e) && ne(n)) {
1663
+ const t = Object.keys(n), r = Object.keys(e).filter((i) => t.indexOf(i) !== -1), o = { ...e, ...n };
1664
+ for (const i of r) {
1665
+ const s = he(e[i], n[i]);
1666
+ if (!s.valid)
1667
+ return {
1668
+ valid: !1,
1669
+ mergeErrorPath: [i, ...s.mergeErrorPath]
1670
+ };
1671
+ o[i] = s.data;
1672
+ }
1673
+ return { valid: !0, data: o };
1674
+ }
1675
+ if (Array.isArray(e) && Array.isArray(n)) {
1676
+ if (e.length !== n.length)
1677
+ return { valid: !1, mergeErrorPath: [] };
1678
+ const t = [];
1679
+ for (let r = 0; r < e.length; r++) {
1680
+ const o = e[r], i = n[r], s = he(o, i);
1681
+ if (!s.valid)
1682
+ return {
1683
+ valid: !1,
1684
+ mergeErrorPath: [r, ...s.mergeErrorPath]
1685
+ };
1686
+ t.push(s.data);
1687
+ }
1688
+ return { valid: !0, data: t };
1689
+ }
1690
+ return { valid: !1, mergeErrorPath: [] };
1691
+ }
1692
+ function je(e, n, t) {
1693
+ if (n.issues.length && e.issues.push(...n.issues), t.issues.length && e.issues.push(...t.issues), U(e))
1694
+ return e;
1695
+ const r = he(n.value, t.value);
1696
+ if (!r.valid)
1697
+ throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
1698
+ return e.value = r.data, e;
1699
+ }
1700
+ const Vo = /* @__PURE__ */ u("$ZodTuple", (e, n) => {
1701
+ h.init(e, n);
1702
+ const t = n.items, r = t.length - [...t].reverse().findIndex((o) => o._zod.optin !== "optional");
1703
+ e._zod.parse = (o, i) => {
1704
+ const s = o.value;
1705
+ if (!Array.isArray(s))
1706
+ return o.issues.push({
1707
+ input: s,
1708
+ inst: e,
1709
+ expected: "tuple",
1710
+ code: "invalid_type"
1711
+ }), o;
1712
+ o.value = [];
1713
+ const c = [];
1714
+ if (!n.rest) {
1715
+ const p = s.length > t.length, d = s.length < r - 1;
1716
+ if (p || d)
1717
+ return o.issues.push({
1718
+ input: s,
1719
+ inst: e,
1720
+ origin: "array",
1721
+ ...p ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length }
1722
+ }), o;
1723
+ }
1724
+ let l = -1;
1725
+ for (const p of t) {
1726
+ if (l++, l >= s.length && l >= r)
1727
+ continue;
1728
+ const d = p._zod.run({
1729
+ value: s[l],
1730
+ issues: []
1731
+ }, i);
1732
+ d instanceof Promise ? c.push(d.then((f) => Q(f, o, l))) : Q(d, o, l);
1733
+ }
1734
+ if (n.rest) {
1735
+ const p = s.slice(t.length);
1736
+ for (const d of p) {
1737
+ l++;
1738
+ const f = n.rest._zod.run({
1739
+ value: d,
1740
+ issues: []
1741
+ }, i);
1742
+ f instanceof Promise ? c.push(f.then((m) => Q(m, o, l))) : Q(f, o, l);
1743
+ }
1744
+ }
1745
+ return c.length ? Promise.all(c).then(() => o) : o;
1746
+ };
1747
+ });
1748
+ function Q(e, n, t) {
1749
+ e.issues.length && n.issues.push(...T(t, e.issues)), n.value[t] = e.value;
1750
+ }
1751
+ const Wo = /* @__PURE__ */ u("$ZodRecord", (e, n) => {
1752
+ h.init(e, n), e._zod.parse = (t, r) => {
1753
+ const o = t.value;
1754
+ if (!ne(o))
1755
+ return t.issues.push({
1756
+ expected: "record",
1757
+ code: "invalid_type",
1758
+ input: o,
1759
+ inst: e
1760
+ }), t;
1761
+ const i = [];
1762
+ if (n.keyType._zod.values) {
1763
+ const s = n.keyType._zod.values;
1764
+ t.value = {};
1765
+ for (const l of s)
1766
+ if (typeof l == "string" || typeof l == "number" || typeof l == "symbol") {
1767
+ const p = n.valueType._zod.run({ value: o[l], issues: [] }, r);
1768
+ p instanceof Promise ? i.push(p.then((d) => {
1769
+ d.issues.length && t.issues.push(...T(l, d.issues)), t.value[l] = d.value;
1770
+ })) : (p.issues.length && t.issues.push(...T(l, p.issues)), t.value[l] = p.value);
1771
+ }
1772
+ let c;
1773
+ for (const l in o)
1774
+ s.has(l) || (c = c ?? [], c.push(l));
1775
+ c && c.length > 0 && t.issues.push({
1776
+ code: "unrecognized_keys",
1777
+ input: o,
1778
+ inst: e,
1779
+ keys: c
1780
+ });
1781
+ } else {
1782
+ t.value = {};
1783
+ for (const s of Reflect.ownKeys(o)) {
1784
+ if (s === "__proto__")
1785
+ continue;
1786
+ const c = n.keyType._zod.run({ value: s, issues: [] }, r);
1787
+ if (c instanceof Promise)
1788
+ throw new Error("Async schemas not supported in object keys currently");
1789
+ if (c.issues.length) {
1790
+ t.issues.push({
1791
+ origin: "record",
1792
+ code: "invalid_key",
1793
+ issues: c.issues.map((p) => E(p, r, x())),
1794
+ input: s,
1795
+ path: [s],
1796
+ inst: e
1797
+ }), t.value[c.value] = c.value;
1798
+ continue;
1799
+ }
1800
+ const l = n.valueType._zod.run({ value: o[s], issues: [] }, r);
1801
+ l instanceof Promise ? i.push(l.then((p) => {
1802
+ p.issues.length && t.issues.push(...T(s, p.issues)), t.value[c.value] = p.value;
1803
+ })) : (l.issues.length && t.issues.push(...T(s, l.issues)), t.value[c.value] = l.value);
1804
+ }
1805
+ }
1806
+ return i.length ? Promise.all(i).then(() => t) : t;
1807
+ };
1808
+ }), Go = /* @__PURE__ */ u("$ZodMap", (e, n) => {
1809
+ h.init(e, n), e._zod.parse = (t, r) => {
1810
+ const o = t.value;
1811
+ if (!(o instanceof Map))
1812
+ return t.issues.push({
1813
+ expected: "map",
1814
+ code: "invalid_type",
1815
+ input: o,
1816
+ inst: e
1817
+ }), t;
1818
+ const i = [];
1819
+ t.value = /* @__PURE__ */ new Map();
1820
+ for (const [s, c] of o) {
1821
+ const l = n.keyType._zod.run({ value: s, issues: [] }, r), p = n.valueType._zod.run({ value: c, issues: [] }, r);
1822
+ l instanceof Promise || p instanceof Promise ? i.push(Promise.all([l, p]).then(([d, f]) => {
1823
+ De(d, f, t, s, o, e, r);
1824
+ })) : De(l, p, t, s, o, e, r);
1825
+ }
1826
+ return i.length ? Promise.all(i).then(() => t) : t;
1827
+ };
1828
+ });
1829
+ function De(e, n, t, r, o, i, s) {
1830
+ e.issues.length && (te.has(typeof r) ? t.issues.push(...T(r, e.issues)) : t.issues.push({
1831
+ origin: "map",
1832
+ code: "invalid_key",
1833
+ input: o,
1834
+ inst: i,
1835
+ issues: e.issues.map((c) => E(c, s, x()))
1836
+ })), n.issues.length && (te.has(typeof r) ? t.issues.push(...T(r, n.issues)) : t.issues.push({
1837
+ origin: "map",
1838
+ code: "invalid_element",
1839
+ input: o,
1840
+ inst: i,
1841
+ key: r,
1842
+ issues: n.issues.map((c) => E(c, s, x()))
1843
+ })), t.value.set(e.value, n.value);
1844
+ }
1845
+ const Ko = /* @__PURE__ */ u("$ZodSet", (e, n) => {
1846
+ h.init(e, n), e._zod.parse = (t, r) => {
1847
+ const o = t.value;
1848
+ if (!(o instanceof Set))
1849
+ return t.issues.push({
1850
+ input: o,
1851
+ inst: e,
1852
+ expected: "set",
1853
+ code: "invalid_type"
1854
+ }), t;
1855
+ const i = [];
1856
+ t.value = /* @__PURE__ */ new Set();
1857
+ for (const s of o) {
1858
+ const c = n.valueType._zod.run({ value: s, issues: [] }, r);
1859
+ c instanceof Promise ? i.push(c.then((l) => Re(l, t))) : Re(c, t);
1860
+ }
1861
+ return i.length ? Promise.all(i).then(() => t) : t;
1862
+ };
1863
+ });
1864
+ function Re(e, n) {
1865
+ e.issues.length && n.issues.push(...e.issues), n.value.add(e.value);
1866
+ }
1867
+ const Jo = /* @__PURE__ */ u("$ZodEnum", (e, n) => {
1868
+ h.init(e, n);
1869
+ const t = We(n.entries);
1870
+ e._zod.values = new Set(t), e._zod.pattern = new RegExp(`^(${t.filter((r) => te.has(typeof r)).map((r) => typeof r == "string" ? D(r) : r.toString()).join("|")})$`), e._zod.parse = (r, o) => {
1871
+ const i = r.value;
1872
+ return e._zod.values.has(i) || r.issues.push({
1873
+ code: "invalid_value",
1874
+ values: t,
1875
+ input: i,
1876
+ inst: e
1877
+ }), r;
1878
+ };
1879
+ }), Yo = /* @__PURE__ */ u("$ZodLiteral", (e, n) => {
1880
+ h.init(e, n), e._zod.values = new Set(n.values), e._zod.pattern = new RegExp(`^(${n.values.map((t) => typeof t == "string" ? D(t) : t ? t.toString() : String(t)).join("|")})$`), e._zod.parse = (t, r) => {
1881
+ const o = t.value;
1882
+ return e._zod.values.has(o) || t.issues.push({
1883
+ code: "invalid_value",
1884
+ values: n.values,
1885
+ input: o,
1886
+ inst: e
1887
+ }), t;
1888
+ };
1889
+ }), qo = /* @__PURE__ */ u("$ZodFile", (e, n) => {
1890
+ h.init(e, n), e._zod.parse = (t, r) => {
1891
+ const o = t.value;
1892
+ return o instanceof File || t.issues.push({
1893
+ expected: "file",
1894
+ code: "invalid_type",
1895
+ input: o,
1896
+ inst: e
1897
+ }), t;
1898
+ };
1899
+ }), Qn = /* @__PURE__ */ u("$ZodTransform", (e, n) => {
1900
+ h.init(e, n), e._zod.parse = (t, r) => {
1901
+ const o = n.transform(t.value, t);
1902
+ if (r.async)
1903
+ return (o instanceof Promise ? o : Promise.resolve(o)).then((s) => (t.value = s, t));
1904
+ if (o instanceof Promise)
1905
+ throw new W();
1906
+ return t.value = o, t;
1907
+ };
1908
+ }), Xo = /* @__PURE__ */ u("$ZodOptional", (e, n) => {
1909
+ h.init(e, n), e._zod.optin = "optional", e._zod.optout = "optional", g(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, void 0]) : void 0), g(e._zod, "pattern", () => {
1910
+ const t = n.innerType._zod.pattern;
1911
+ return t ? new RegExp(`^(${se(t.source)})?$`) : void 0;
1912
+ }), e._zod.parse = (t, r) => t.value === void 0 ? t : n.innerType._zod.run(t, r);
1913
+ }), Ho = /* @__PURE__ */ u("$ZodNullable", (e, n) => {
1914
+ h.init(e, n), g(e._zod, "optin", () => n.innerType._zod.optin), g(e._zod, "optout", () => n.innerType._zod.optout), g(e._zod, "pattern", () => {
1915
+ const t = n.innerType._zod.pattern;
1916
+ return t ? new RegExp(`^(${se(t.source)}|null)$`) : void 0;
1917
+ }), g(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, null]) : void 0), e._zod.parse = (t, r) => t.value === null ? t : n.innerType._zod.run(t, r);
1918
+ }), Qo = /* @__PURE__ */ u("$ZodDefault", (e, n) => {
1919
+ h.init(e, n), e._zod.optin = "optional", g(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
1920
+ if (t.value === void 0)
1921
+ return t.value = n.defaultValue, t;
1922
+ const o = n.innerType._zod.run(t, r);
1923
+ return o instanceof Promise ? o.then((i) => Ce(i, n)) : Ce(o, n);
1924
+ };
1925
+ });
1926
+ function Ce(e, n) {
1927
+ return e.value === void 0 && (e.value = n.defaultValue), e;
1928
+ }
1929
+ const ei = /* @__PURE__ */ u("$ZodPrefault", (e, n) => {
1930
+ h.init(e, n), e._zod.optin = "optional", g(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => (t.value === void 0 && (t.value = n.defaultValue), n.innerType._zod.run(t, r));
1931
+ }), ni = /* @__PURE__ */ u("$ZodNonOptional", (e, n) => {
1932
+ h.init(e, n), g(e._zod, "values", () => {
1933
+ const t = n.innerType._zod.values;
1934
+ return t ? new Set([...t].filter((r) => r !== void 0)) : void 0;
1935
+ }), e._zod.parse = (t, r) => {
1936
+ const o = n.innerType._zod.run(t, r);
1937
+ return o instanceof Promise ? o.then((i) => Ue(i, e)) : Ue(o, e);
1938
+ };
1939
+ });
1940
+ function Ue(e, n) {
1941
+ return !e.issues.length && e.value === void 0 && e.issues.push({
1942
+ code: "invalid_type",
1943
+ expected: "nonoptional",
1944
+ input: e.value,
1945
+ inst: n
1946
+ }), e;
1947
+ }
1948
+ const ti = /* @__PURE__ */ u("$ZodSuccess", (e, n) => {
1949
+ h.init(e, n), e._zod.parse = (t, r) => {
1950
+ const o = n.innerType._zod.run(t, r);
1951
+ return o instanceof Promise ? o.then((i) => (t.value = i.issues.length === 0, t)) : (t.value = o.issues.length === 0, t);
1952
+ };
1953
+ }), ri = /* @__PURE__ */ u("$ZodCatch", (e, n) => {
1954
+ h.init(e, n), g(e._zod, "optin", () => n.innerType._zod.optin), g(e._zod, "optout", () => n.innerType._zod.optout), g(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
1955
+ const o = n.innerType._zod.run(t, r);
1956
+ return o instanceof Promise ? o.then((i) => (t.value = i.value, i.issues.length && (t.value = n.catchValue({
1957
+ ...t,
1958
+ error: {
1959
+ issues: i.issues.map((s) => E(s, r, x()))
1960
+ },
1961
+ input: t.value
1962
+ }), t.issues = []), t)) : (t.value = o.value, o.issues.length && (t.value = n.catchValue({
1963
+ ...t,
1964
+ error: {
1965
+ issues: o.issues.map((i) => E(i, r, x()))
1966
+ },
1967
+ input: t.value
1968
+ }), t.issues = []), t);
1969
+ };
1970
+ }), oi = /* @__PURE__ */ u("$ZodNaN", (e, n) => {
1971
+ h.init(e, n), e._zod.parse = (t, r) => ((typeof t.value != "number" || !Number.isNaN(t.value)) && t.issues.push({
1972
+ input: t.value,
1973
+ inst: e,
1974
+ expected: "nan",
1975
+ code: "invalid_type"
1976
+ }), t);
1977
+ }), et = /* @__PURE__ */ u("$ZodPipe", (e, n) => {
1978
+ h.init(e, n), g(e._zod, "values", () => n.in._zod.values), g(e._zod, "optin", () => n.in._zod.optin), g(e._zod, "optout", () => n.out._zod.optout), e._zod.parse = (t, r) => {
1979
+ const o = n.in._zod.run(t, r);
1980
+ return o instanceof Promise ? o.then((i) => Fe(i, n, r)) : Fe(o, n, r);
1981
+ };
1982
+ });
1983
+ function Fe(e, n, t) {
1984
+ return U(e) ? e : n.out._zod.run({ value: e.value, issues: e.issues }, t);
1985
+ }
1986
+ const ii = /* @__PURE__ */ u("$ZodReadonly", (e, n) => {
1987
+ h.init(e, n), g(e._zod, "propValues", () => n.innerType._zod.propValues), g(e._zod, "optin", () => n.innerType._zod.optin), g(e._zod, "optout", () => n.innerType._zod.optout), e._zod.parse = (t, r) => {
1988
+ const o = n.innerType._zod.run(t, r);
1989
+ return o instanceof Promise ? o.then(Me) : Me(o);
1990
+ };
1991
+ });
1992
+ function Me(e) {
1993
+ return e.value = Object.freeze(e.value), e;
1994
+ }
1995
+ const si = /* @__PURE__ */ u("$ZodTemplateLiteral", (e, n) => {
1996
+ h.init(e, n);
1997
+ const t = [];
1998
+ for (const r of n.parts)
1999
+ if (r instanceof h) {
2000
+ if (!r._zod.pattern)
2001
+ throw new Error(`Invalid template literal part, no pattern found: ${[...r._zod.traits].shift()}`);
2002
+ const o = r._zod.pattern instanceof RegExp ? r._zod.pattern.source : r._zod.pattern;
2003
+ if (!o)
2004
+ throw new Error(`Invalid template literal part: ${r._zod.traits}`);
2005
+ const i = o.startsWith("^") ? 1 : 0, s = o.endsWith("$") ? o.length - 1 : o.length;
2006
+ t.push(o.slice(i, s));
2007
+ } else if (r === null || Ye.has(typeof r))
2008
+ t.push(D(`${r}`));
2009
+ else
2010
+ throw new Error(`Invalid template literal part: ${r}`);
2011
+ e._zod.pattern = new RegExp(`^${t.join("")}$`), e._zod.parse = (r, o) => typeof r.value != "string" ? (r.issues.push({
2012
+ input: r.value,
2013
+ inst: e,
2014
+ expected: "template_literal",
2015
+ code: "invalid_type"
2016
+ }), r) : (e._zod.pattern.lastIndex = 0, e._zod.pattern.test(r.value) || r.issues.push({
2017
+ input: r.value,
2018
+ inst: e,
2019
+ code: "invalid_format",
2020
+ format: "template_literal",
2021
+ pattern: e._zod.pattern.source
2022
+ }), r);
2023
+ }), ui = /* @__PURE__ */ u("$ZodPromise", (e, n) => {
2024
+ h.init(e, n), e._zod.parse = (t, r) => Promise.resolve(t.value).then((o) => n.innerType._zod.run({ value: o, issues: [] }, r));
2025
+ }), ci = /* @__PURE__ */ u("$ZodLazy", (e, n) => {
2026
+ h.init(e, n), g(e._zod, "innerType", () => n.getter()), g(e._zod, "pattern", () => e._zod.innerType._zod.pattern), g(e._zod, "propValues", () => e._zod.innerType._zod.propValues), g(e._zod, "optin", () => e._zod.innerType._zod.optin), g(e._zod, "optout", () => e._zod.innerType._zod.optout), e._zod.parse = (t, r) => e._zod.innerType._zod.run(t, r);
2027
+ }), ai = /* @__PURE__ */ u("$ZodCustom", (e, n) => {
2028
+ Z.init(e, n), h.init(e, n), e._zod.parse = (t, r) => t, e._zod.check = (t) => {
2029
+ const r = t.value, o = n.fn(r);
2030
+ if (o instanceof Promise)
2031
+ return o.then((i) => Le(i, t, r, e));
2032
+ Le(o, t, r, e);
2033
+ };
2034
+ });
2035
+ function Le(e, n, t, r) {
2036
+ if (!e) {
2037
+ const o = {
2038
+ code: "custom",
2039
+ input: t,
2040
+ inst: r,
2041
+ // incorporates params.error into issue reporting
2042
+ path: [...r._zod.def.path ?? []],
2043
+ // incorporates params.error into issue reporting
2044
+ continue: !r._zod.def.abort
2045
+ // params: inst._zod.def.params,
2046
+ };
2047
+ r._zod.def.params && (o.params = r._zod.def.params), n.issues.push(F(o));
2048
+ }
2049
+ }
2050
+ const Hs = Symbol("ZodOutput"), Qs = Symbol("ZodInput");
2051
+ class li {
2052
+ constructor() {
2053
+ this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
2054
+ }
2055
+ add(n, ...t) {
2056
+ const r = t[0];
2057
+ if (this._map.set(n, r), r && typeof r == "object" && "id" in r) {
2058
+ if (this._idmap.has(r.id))
2059
+ throw new Error(`ID ${r.id} already exists in the registry`);
2060
+ this._idmap.set(r.id, n);
2061
+ }
2062
+ return this;
2063
+ }
2064
+ remove(n) {
2065
+ return this._map.delete(n), this;
2066
+ }
2067
+ get(n) {
2068
+ const t = n._zod.parent;
2069
+ if (t) {
2070
+ const r = { ...this.get(t) ?? {} };
2071
+ return delete r.id, { ...r, ...this._map.get(n) };
2072
+ }
2073
+ return this._map.get(n);
2074
+ }
2075
+ has(n) {
2076
+ return this._map.has(n);
2077
+ }
2078
+ }
2079
+ function pi() {
2080
+ return new li();
2081
+ }
2082
+ const ee = /* @__PURE__ */ pi();
2083
+ function fi(e, n) {
2084
+ return new e({
2085
+ type: "string",
2086
+ ...a(n)
2087
+ });
2088
+ }
2089
+ function eu(e, n) {
2090
+ return new e({
2091
+ type: "string",
2092
+ coerce: !0,
2093
+ ...a(n)
2094
+ });
2095
+ }
2096
+ function nt(e, n) {
2097
+ return new e({
2098
+ type: "string",
2099
+ format: "email",
2100
+ check: "string_format",
2101
+ abort: !1,
2102
+ ...a(n)
2103
+ });
2104
+ }
2105
+ function me(e, n) {
2106
+ return new e({
2107
+ type: "string",
2108
+ format: "guid",
2109
+ check: "string_format",
2110
+ abort: !1,
2111
+ ...a(n)
2112
+ });
2113
+ }
2114
+ function tt(e, n) {
2115
+ return new e({
2116
+ type: "string",
2117
+ format: "uuid",
2118
+ check: "string_format",
2119
+ abort: !1,
2120
+ ...a(n)
2121
+ });
2122
+ }
2123
+ function rt(e, n) {
2124
+ return new e({
2125
+ type: "string",
2126
+ format: "uuid",
2127
+ check: "string_format",
2128
+ abort: !1,
2129
+ version: "v4",
2130
+ ...a(n)
2131
+ });
2132
+ }
2133
+ function ot(e, n) {
2134
+ return new e({
2135
+ type: "string",
2136
+ format: "uuid",
2137
+ check: "string_format",
2138
+ abort: !1,
2139
+ version: "v6",
2140
+ ...a(n)
2141
+ });
2142
+ }
2143
+ function it(e, n) {
2144
+ return new e({
2145
+ type: "string",
2146
+ format: "uuid",
2147
+ check: "string_format",
2148
+ abort: !1,
2149
+ version: "v7",
2150
+ ...a(n)
2151
+ });
2152
+ }
2153
+ function st(e, n) {
2154
+ return new e({
2155
+ type: "string",
2156
+ format: "url",
2157
+ check: "string_format",
2158
+ abort: !1,
2159
+ ...a(n)
2160
+ });
2161
+ }
2162
+ function ut(e, n) {
2163
+ return new e({
2164
+ type: "string",
2165
+ format: "emoji",
2166
+ check: "string_format",
2167
+ abort: !1,
2168
+ ...a(n)
2169
+ });
2170
+ }
2171
+ function ct(e, n) {
2172
+ return new e({
2173
+ type: "string",
2174
+ format: "nanoid",
2175
+ check: "string_format",
2176
+ abort: !1,
2177
+ ...a(n)
2178
+ });
2179
+ }
2180
+ function at(e, n) {
2181
+ return new e({
2182
+ type: "string",
2183
+ format: "cuid",
2184
+ check: "string_format",
2185
+ abort: !1,
2186
+ ...a(n)
2187
+ });
2188
+ }
2189
+ function lt(e, n) {
2190
+ return new e({
2191
+ type: "string",
2192
+ format: "cuid2",
2193
+ check: "string_format",
2194
+ abort: !1,
2195
+ ...a(n)
2196
+ });
2197
+ }
2198
+ function pt(e, n) {
2199
+ return new e({
2200
+ type: "string",
2201
+ format: "ulid",
2202
+ check: "string_format",
2203
+ abort: !1,
2204
+ ...a(n)
2205
+ });
2206
+ }
2207
+ function ft(e, n) {
2208
+ return new e({
2209
+ type: "string",
2210
+ format: "xid",
2211
+ check: "string_format",
2212
+ abort: !1,
2213
+ ...a(n)
2214
+ });
2215
+ }
2216
+ function dt(e, n) {
2217
+ return new e({
2218
+ type: "string",
2219
+ format: "ksuid",
2220
+ check: "string_format",
2221
+ abort: !1,
2222
+ ...a(n)
2223
+ });
2224
+ }
2225
+ function ht(e, n) {
2226
+ return new e({
2227
+ type: "string",
2228
+ format: "ipv4",
2229
+ check: "string_format",
2230
+ abort: !1,
2231
+ ...a(n)
2232
+ });
2233
+ }
2234
+ function mt(e, n) {
2235
+ return new e({
2236
+ type: "string",
2237
+ format: "ipv6",
2238
+ check: "string_format",
2239
+ abort: !1,
2240
+ ...a(n)
2241
+ });
2242
+ }
2243
+ function _t(e, n) {
2244
+ return new e({
2245
+ type: "string",
2246
+ format: "cidrv4",
2247
+ check: "string_format",
2248
+ abort: !1,
2249
+ ...a(n)
2250
+ });
2251
+ }
2252
+ function vt(e, n) {
2253
+ return new e({
2254
+ type: "string",
2255
+ format: "cidrv6",
2256
+ check: "string_format",
2257
+ abort: !1,
2258
+ ...a(n)
2259
+ });
2260
+ }
2261
+ function gt(e, n) {
2262
+ return new e({
2263
+ type: "string",
2264
+ format: "base64",
2265
+ check: "string_format",
2266
+ abort: !1,
2267
+ ...a(n)
2268
+ });
2269
+ }
2270
+ function bt(e, n) {
2271
+ return new e({
2272
+ type: "string",
2273
+ format: "base64url",
2274
+ check: "string_format",
2275
+ abort: !1,
2276
+ ...a(n)
2277
+ });
2278
+ }
2279
+ function zt(e, n) {
2280
+ return new e({
2281
+ type: "string",
2282
+ format: "e164",
2283
+ check: "string_format",
2284
+ abort: !1,
2285
+ ...a(n)
2286
+ });
2287
+ }
2288
+ function $t(e, n) {
2289
+ return new e({
2290
+ type: "string",
2291
+ format: "jwt",
2292
+ check: "string_format",
2293
+ abort: !1,
2294
+ ...a(n)
2295
+ });
2296
+ }
2297
+ const nu = {
2298
+ Any: null,
2299
+ Minute: -1,
2300
+ Second: 0,
2301
+ Millisecond: 3,
2302
+ Microsecond: 6
2303
+ };
2304
+ function di(e, n) {
2305
+ return new e({
2306
+ type: "string",
2307
+ format: "datetime",
2308
+ check: "string_format",
2309
+ offset: !1,
2310
+ local: !1,
2311
+ precision: null,
2312
+ ...a(n)
2313
+ });
2314
+ }
2315
+ function hi(e, n) {
2316
+ return new e({
2317
+ type: "string",
2318
+ format: "date",
2319
+ check: "string_format",
2320
+ ...a(n)
2321
+ });
2322
+ }
2323
+ function mi(e, n) {
2324
+ return new e({
2325
+ type: "string",
2326
+ format: "time",
2327
+ check: "string_format",
2328
+ precision: null,
2329
+ ...a(n)
2330
+ });
2331
+ }
2332
+ function _i(e, n) {
2333
+ return new e({
2334
+ type: "string",
2335
+ format: "duration",
2336
+ check: "string_format",
2337
+ ...a(n)
2338
+ });
2339
+ }
2340
+ function vi(e, n) {
2341
+ return new e({
2342
+ type: "number",
2343
+ checks: [],
2344
+ ...a(n)
2345
+ });
2346
+ }
2347
+ function tu(e, n) {
2348
+ return new e({
2349
+ type: "number",
2350
+ coerce: !0,
2351
+ checks: [],
2352
+ ...a(n)
2353
+ });
2354
+ }
2355
+ function gi(e, n) {
2356
+ return new e({
2357
+ type: "number",
2358
+ check: "number_format",
2359
+ abort: !1,
2360
+ format: "safeint",
2361
+ ...a(n)
2362
+ });
2363
+ }
2364
+ function bi(e, n) {
2365
+ return new e({
2366
+ type: "number",
2367
+ check: "number_format",
2368
+ abort: !1,
2369
+ format: "float32",
2370
+ ...a(n)
2371
+ });
2372
+ }
2373
+ function zi(e, n) {
2374
+ return new e({
2375
+ type: "number",
2376
+ check: "number_format",
2377
+ abort: !1,
2378
+ format: "float64",
2379
+ ...a(n)
2380
+ });
2381
+ }
2382
+ function $i(e, n) {
2383
+ return new e({
2384
+ type: "number",
2385
+ check: "number_format",
2386
+ abort: !1,
2387
+ format: "int32",
2388
+ ...a(n)
2389
+ });
2390
+ }
2391
+ function wi(e, n) {
2392
+ return new e({
2393
+ type: "number",
2394
+ check: "number_format",
2395
+ abort: !1,
2396
+ format: "uint32",
2397
+ ...a(n)
2398
+ });
2399
+ }
2400
+ function Zi(e, n) {
2401
+ return new e({
2402
+ type: "boolean",
2403
+ ...a(n)
2404
+ });
2405
+ }
2406
+ function ru(e, n) {
2407
+ return new e({
2408
+ type: "boolean",
2409
+ coerce: !0,
2410
+ ...a(n)
2411
+ });
2412
+ }
2413
+ function yi(e, n) {
2414
+ return new e({
2415
+ type: "bigint",
2416
+ ...a(n)
2417
+ });
2418
+ }
2419
+ function ou(e, n) {
2420
+ return new e({
2421
+ type: "bigint",
2422
+ coerce: !0,
2423
+ ...a(n)
2424
+ });
2425
+ }
2426
+ function ki(e, n) {
2427
+ return new e({
2428
+ type: "bigint",
2429
+ check: "bigint_format",
2430
+ abort: !1,
2431
+ format: "int64",
2432
+ ...a(n)
2433
+ });
2434
+ }
2435
+ function Ii(e, n) {
2436
+ return new e({
2437
+ type: "bigint",
2438
+ check: "bigint_format",
2439
+ abort: !1,
2440
+ format: "uint64",
2441
+ ...a(n)
2442
+ });
2443
+ }
2444
+ function Ti(e, n) {
2445
+ return new e({
2446
+ type: "symbol",
2447
+ ...a(n)
2448
+ });
2449
+ }
2450
+ function Ei(e, n) {
2451
+ return new e({
2452
+ type: "undefined",
2453
+ ...a(n)
2454
+ });
2455
+ }
2456
+ function Si(e, n) {
2457
+ return new e({
2458
+ type: "null",
2459
+ ...a(n)
2460
+ });
2461
+ }
2462
+ function Pi(e) {
2463
+ return new e({
2464
+ type: "any"
2465
+ });
2466
+ }
2467
+ function xi(e) {
2468
+ return new e({
2469
+ type: "unknown"
2470
+ });
2471
+ }
2472
+ function Ai(e, n) {
2473
+ return new e({
2474
+ type: "never",
2475
+ ...a(n)
2476
+ });
2477
+ }
2478
+ function Ni(e, n) {
2479
+ return new e({
2480
+ type: "void",
2481
+ ...a(n)
2482
+ });
2483
+ }
2484
+ function Oi(e, n) {
2485
+ return new e({
2486
+ type: "date",
2487
+ ...a(n)
2488
+ });
2489
+ }
2490
+ function iu(e, n) {
2491
+ return new e({
2492
+ type: "date",
2493
+ coerce: !0,
2494
+ ...a(n)
2495
+ });
2496
+ }
2497
+ function ji(e, n) {
2498
+ return new e({
2499
+ type: "nan",
2500
+ ...a(n)
2501
+ });
2502
+ }
2503
+ function K(e, n) {
2504
+ return new Gn({
2505
+ check: "less_than",
2506
+ ...a(n),
2507
+ value: e,
2508
+ inclusive: !1
2509
+ });
2510
+ }
2511
+ function N(e, n) {
2512
+ return new Gn({
2513
+ check: "less_than",
2514
+ ...a(n),
2515
+ value: e,
2516
+ inclusive: !0
2517
+ });
2518
+ }
2519
+ function J(e, n) {
2520
+ return new Kn({
2521
+ check: "greater_than",
2522
+ ...a(n),
2523
+ value: e,
2524
+ inclusive: !1
2525
+ });
2526
+ }
2527
+ function P(e, n) {
2528
+ return new Kn({
2529
+ check: "greater_than",
2530
+ ...a(n),
2531
+ value: e,
2532
+ inclusive: !0
2533
+ });
2534
+ }
2535
+ function su(e) {
2536
+ return J(0, e);
2537
+ }
2538
+ function uu(e) {
2539
+ return K(0, e);
2540
+ }
2541
+ function cu(e) {
2542
+ return N(0, e);
2543
+ }
2544
+ function au(e) {
2545
+ return P(0, e);
2546
+ }
2547
+ function _e(e, n) {
2548
+ return new Cr({
2549
+ check: "multiple_of",
2550
+ ...a(n),
2551
+ value: e
2552
+ });
2553
+ }
2554
+ function wt(e, n) {
2555
+ return new Mr({
2556
+ check: "max_size",
2557
+ ...a(n),
2558
+ maximum: e
2559
+ });
2560
+ }
2561
+ function ve(e, n) {
2562
+ return new Lr({
2563
+ check: "min_size",
2564
+ ...a(n),
2565
+ minimum: e
2566
+ });
2567
+ }
2568
+ function Di(e, n) {
2569
+ return new Br({
2570
+ check: "size_equals",
2571
+ ...a(n),
2572
+ size: e
2573
+ });
2574
+ }
2575
+ function Zt(e, n) {
2576
+ return new Vr({
2577
+ check: "max_length",
2578
+ ...a(n),
2579
+ maximum: e
2580
+ });
2581
+ }
2582
+ function re(e, n) {
2583
+ return new Wr({
2584
+ check: "min_length",
2585
+ ...a(n),
2586
+ minimum: e
2587
+ });
2588
+ }
2589
+ function yt(e, n) {
2590
+ return new Gr({
2591
+ check: "length_equals",
2592
+ ...a(n),
2593
+ length: e
2594
+ });
2595
+ }
2596
+ function Ri(e, n) {
2597
+ return new Kr({
2598
+ check: "string_format",
2599
+ format: "regex",
2600
+ ...a(n),
2601
+ pattern: e
2602
+ });
2603
+ }
2604
+ function Ci(e) {
2605
+ return new Jr({
2606
+ check: "string_format",
2607
+ format: "lowercase",
2608
+ ...a(e)
2609
+ });
2610
+ }
2611
+ function Ui(e) {
2612
+ return new Yr({
2613
+ check: "string_format",
2614
+ format: "uppercase",
2615
+ ...a(e)
2616
+ });
2617
+ }
2618
+ function Fi(e, n) {
2619
+ return new qr({
2620
+ check: "string_format",
2621
+ format: "includes",
2622
+ ...a(n),
2623
+ includes: e
2624
+ });
2625
+ }
2626
+ function Mi(e, n) {
2627
+ return new Xr({
2628
+ check: "string_format",
2629
+ format: "starts_with",
2630
+ ...a(n),
2631
+ prefix: e
2632
+ });
2633
+ }
2634
+ function Li(e, n) {
2635
+ return new Hr({
2636
+ check: "string_format",
2637
+ format: "ends_with",
2638
+ ...a(n),
2639
+ suffix: e
2640
+ });
2641
+ }
2642
+ function lu(e, n, t) {
2643
+ return new Qr({
2644
+ check: "property",
2645
+ property: e,
2646
+ schema: n,
2647
+ ...a(t)
2648
+ });
2649
+ }
2650
+ function Bi(e, n) {
2651
+ return new eo({
2652
+ check: "mime_type",
2653
+ mime: e,
2654
+ ...a(n)
2655
+ });
2656
+ }
2657
+ function Y(e) {
2658
+ return new no({
2659
+ check: "overwrite",
2660
+ tx: e
2661
+ });
2662
+ }
2663
+ function Vi(e) {
2664
+ return Y((n) => n.normalize(e));
2665
+ }
2666
+ function Wi() {
2667
+ return Y((e) => e.trim());
2668
+ }
2669
+ function Gi() {
2670
+ return Y((e) => e.toLowerCase());
2671
+ }
2672
+ function Ki() {
2673
+ return Y((e) => e.toUpperCase());
2674
+ }
2675
+ function Ji(e, n, t) {
2676
+ return new e({
2677
+ type: "array",
2678
+ element: n,
2679
+ // get element() {
2680
+ // return element;
2681
+ // },
2682
+ ...a(t)
2683
+ });
2684
+ }
2685
+ function pu(e, n, t) {
2686
+ return new e({
2687
+ type: "union",
2688
+ options: n,
2689
+ ...a(t)
2690
+ });
2691
+ }
2692
+ function fu(e, n, t, r) {
2693
+ return new e({
2694
+ type: "union",
2695
+ options: t,
2696
+ discriminator: n,
2697
+ ...a(r)
2698
+ });
2699
+ }
2700
+ function du(e, n, t) {
2701
+ return new e({
2702
+ type: "intersection",
2703
+ left: n,
2704
+ right: t
2705
+ });
2706
+ }
2707
+ function hu(e, n, t, r) {
2708
+ const o = t instanceof h, i = o ? r : t, s = o ? t : null;
2709
+ return new e({
2710
+ type: "tuple",
2711
+ items: n,
2712
+ rest: s,
2713
+ ...a(i)
2714
+ });
2715
+ }
2716
+ function mu(e, n, t, r) {
2717
+ return new e({
2718
+ type: "record",
2719
+ keyType: n,
2720
+ valueType: t,
2721
+ ...a(r)
2722
+ });
2723
+ }
2724
+ function _u(e, n, t, r) {
2725
+ return new e({
2726
+ type: "map",
2727
+ keyType: n,
2728
+ valueType: t,
2729
+ ...a(r)
2730
+ });
2731
+ }
2732
+ function vu(e, n, t) {
2733
+ return new e({
2734
+ type: "set",
2735
+ valueType: n,
2736
+ ...a(t)
2737
+ });
2738
+ }
2739
+ function gu(e, n, t) {
2740
+ const r = Array.isArray(n) ? Object.fromEntries(n.map((o) => [o, o])) : n;
2741
+ return new e({
2742
+ type: "enum",
2743
+ entries: r,
2744
+ ...a(t)
2745
+ });
2746
+ }
2747
+ function bu(e, n, t) {
2748
+ return new e({
2749
+ type: "enum",
2750
+ entries: n,
2751
+ ...a(t)
2752
+ });
2753
+ }
2754
+ function zu(e, n, t) {
2755
+ return new e({
2756
+ type: "literal",
2757
+ values: Array.isArray(n) ? n : [n],
2758
+ ...a(t)
2759
+ });
2760
+ }
2761
+ function Yi(e, n) {
2762
+ return new e({
2763
+ type: "file",
2764
+ ...a(n)
2765
+ });
2766
+ }
2767
+ function $u(e, n) {
2768
+ return new e({
2769
+ type: "transform",
2770
+ transform: n
2771
+ });
2772
+ }
2773
+ function wu(e, n) {
2774
+ return new e({
2775
+ type: "optional",
2776
+ innerType: n
2777
+ });
2778
+ }
2779
+ function Zu(e, n) {
2780
+ return new e({
2781
+ type: "nullable",
2782
+ innerType: n
2783
+ });
2784
+ }
2785
+ function yu(e, n, t) {
2786
+ return new e({
2787
+ type: "default",
2788
+ innerType: n,
2789
+ get defaultValue() {
2790
+ return typeof t == "function" ? t() : t;
2791
+ }
2792
+ });
2793
+ }
2794
+ function ku(e, n, t) {
2795
+ return new e({
2796
+ type: "nonoptional",
2797
+ innerType: n,
2798
+ ...a(t)
2799
+ });
2800
+ }
2801
+ function Iu(e, n) {
2802
+ return new e({
2803
+ type: "success",
2804
+ innerType: n
2805
+ });
2806
+ }
2807
+ function Tu(e, n, t) {
2808
+ return new e({
2809
+ type: "catch",
2810
+ innerType: n,
2811
+ catchValue: typeof t == "function" ? t : () => t
2812
+ });
2813
+ }
2814
+ function Eu(e, n, t) {
2815
+ return new e({
2816
+ type: "pipe",
2817
+ in: n,
2818
+ out: t
2819
+ });
2820
+ }
2821
+ function Su(e, n) {
2822
+ return new e({
2823
+ type: "readonly",
2824
+ innerType: n
2825
+ });
2826
+ }
2827
+ function Pu(e, n, t) {
2828
+ return new e({
2829
+ type: "template_literal",
2830
+ parts: n,
2831
+ ...a(t)
2832
+ });
2833
+ }
2834
+ function xu(e, n) {
2835
+ return new e({
2836
+ type: "lazy",
2837
+ getter: n
2838
+ });
2839
+ }
2840
+ function Au(e, n) {
2841
+ return new e({
2842
+ type: "promise",
2843
+ innerType: n
2844
+ });
2845
+ }
2846
+ function qi(e, n, t) {
2847
+ const r = a(t);
2848
+ return r.abort ?? (r.abort = !0), new e({
2849
+ type: "custom",
2850
+ check: "custom",
2851
+ fn: n,
2852
+ ...r
2853
+ });
2854
+ }
2855
+ function Xi(e, n, t) {
2856
+ return new e({
2857
+ type: "custom",
2858
+ check: "custom",
2859
+ fn: n,
2860
+ ...a(t)
2861
+ });
2862
+ }
2863
+ function Hi(e, n) {
2864
+ const { case: t, error: r, truthy: o, falsy: i } = a(n);
2865
+ let s = o ?? ["true", "1", "yes", "on", "y", "enabled"], c = i ?? ["false", "0", "no", "off", "n", "disabled"];
2866
+ t !== "sensitive" && (s = s.map((I) => typeof I == "string" ? I.toLowerCase() : I), c = c.map((I) => typeof I == "string" ? I.toLowerCase() : I));
2867
+ const l = new Set(s), p = new Set(c), d = e.Pipe ?? et, f = e.Boolean ?? qn, m = e.String ?? pe, v = e.Transform ?? Qn, y = new v({
2868
+ type: "transform",
2869
+ transform: (I, w) => {
2870
+ let b = I;
2871
+ return t !== "sensitive" && (b = b.toLowerCase()), l.has(b) ? !0 : p.has(b) ? !1 : (w.issues.push({
2872
+ code: "invalid_value",
2873
+ expected: "stringbool",
2874
+ values: [...l, ...p],
2875
+ input: w.value,
2876
+ inst: y
2877
+ }), {});
2878
+ },
2879
+ error: r
2880
+ }), S = new d({
2881
+ type: "pipe",
2882
+ in: new m({ type: "string", error: r }),
2883
+ out: y,
2884
+ error: r
2885
+ });
2886
+ return new d({
2887
+ type: "pipe",
2888
+ in: S,
2889
+ out: new f({
2890
+ type: "boolean",
2891
+ error: r
2892
+ }),
2893
+ error: r
2894
+ });
2895
+ }
2896
+ const kt = /* @__PURE__ */ u("ZodISODateTime", (e, n) => {
2897
+ _o.init(e, n), $.init(e, n);
2898
+ });
2899
+ function It(e) {
2900
+ return di(kt, e);
2901
+ }
2902
+ const Tt = /* @__PURE__ */ u("ZodISODate", (e, n) => {
2903
+ vo.init(e, n), $.init(e, n);
2904
+ });
2905
+ function Et(e) {
2906
+ return hi(Tt, e);
2907
+ }
2908
+ const St = /* @__PURE__ */ u("ZodISOTime", (e, n) => {
2909
+ go.init(e, n), $.init(e, n);
2910
+ });
2911
+ function Pt(e) {
2912
+ return mi(St, e);
2913
+ }
2914
+ const xt = /* @__PURE__ */ u("ZodISODuration", (e, n) => {
2915
+ bo.init(e, n), $.init(e, n);
2916
+ });
2917
+ function At(e) {
2918
+ return _i(xt, e);
2919
+ }
2920
+ const Nu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2921
+ __proto__: null,
2922
+ ZodISODate: Tt,
2923
+ ZodISODateTime: kt,
2924
+ ZodISODuration: xt,
2925
+ ZodISOTime: St,
2926
+ date: Et,
2927
+ datetime: It,
2928
+ duration: At,
2929
+ time: Pt
2930
+ }, Symbol.toStringTag, { value: "Module" })), Nt = (e, n) => {
2931
+ cn.init(e, n), e.name = "ZodError", Object.defineProperties(e, {
2932
+ format: {
2933
+ value: (t) => kr(e, t)
2934
+ // enumerable: false,
2935
+ },
2936
+ flatten: {
2937
+ value: (t) => yr(e, t)
2938
+ // enumerable: false,
2939
+ },
2940
+ addIssue: {
2941
+ value: (t) => e.issues.push(t)
2942
+ // enumerable: false,
2943
+ },
2944
+ addIssues: {
2945
+ value: (t) => e.issues.push(...t)
2946
+ // enumerable: false,
2947
+ },
2948
+ isEmpty: {
2949
+ get() {
2950
+ return e.issues.length === 0;
2951
+ }
2952
+ // enumerable: false,
2953
+ }
2954
+ });
2955
+ }, Ou = u("ZodError", Nt), fe = u("ZodError", Nt, {
2956
+ Parent: Error
2957
+ }), Qi = /* @__PURE__ */ an(fe), es = /* @__PURE__ */ ln(fe), ns = /* @__PURE__ */ pn(fe), ts = /* @__PURE__ */ fn(fe), _ = /* @__PURE__ */ u("ZodType", (e, n) => (h.init(e, n), e.def = n, Object.defineProperty(e, "_def", { value: n }), e.check = (...t) => e.clone(
2958
+ {
2959
+ ...n,
2960
+ checks: [
2961
+ ...n.checks ?? [],
2962
+ ...t.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
2963
+ ]
2964
+ }
2965
+ // { parent: true }
2966
+ ), e.clone = (t, r) => O(e, t, r), e.brand = () => e, e.register = (t, r) => (t.add(e, r), e), e.parse = (t, r) => Qi(e, t, r, { callee: e.parse }), e.safeParse = (t, r) => ns(e, t, r), e.parseAsync = async (t, r) => es(e, t, r, { callee: e.parseAsync }), e.safeParseAsync = async (t, r) => ts(e, t, r), e.spa = e.safeParseAsync, e.refine = (t, r) => e.check(Bs(t, r)), e.superRefine = (t) => e.check(Vs(t)), e.overwrite = (t) => e.check(Y(t)), e.optional = () => ze(e), e.nullable = () => $e(e), e.nullish = () => ze($e(e)), e.nonoptional = (t) => xs(e, t), e.array = () => rr(e), e.or = (t) => Te([e, t]), e.and = (t) => vs(e, t), e.transform = (t) => we(e, ur(t)), e.default = (t) => Es(e, t), e.prefault = (t) => Ps(e, t), e.catch = (t) => Os(e, t), e.pipe = (t) => we(e, t), e.readonly = () => Rs(e), e.describe = (t) => {
2967
+ const r = e.clone();
2968
+ return ee.add(r, { description: t }), r;
2969
+ }, Object.defineProperty(e, "description", {
2970
+ get() {
2971
+ var t;
2972
+ return (t = ee.get(e)) == null ? void 0 : t.description;
2973
+ },
2974
+ configurable: !0
2975
+ }), e.meta = (...t) => {
2976
+ if (t.length === 0)
2977
+ return ee.get(e);
2978
+ const r = e.clone();
2979
+ return ee.add(r, t[0]), r;
2980
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Ot = /* @__PURE__ */ u("_ZodString", (e, n) => {
2981
+ pe.init(e, n), _.init(e, n);
2982
+ const t = e._zod.bag;
2983
+ e.format = t.format ?? null, e.minLength = t.minimum ?? null, e.maxLength = t.maximum ?? null, e.regex = (...r) => e.check(Ri(...r)), e.includes = (...r) => e.check(Fi(...r)), e.startsWith = (...r) => e.check(Mi(...r)), e.endsWith = (...r) => e.check(Li(...r)), e.min = (...r) => e.check(re(...r)), e.max = (...r) => e.check(Zt(...r)), e.length = (...r) => e.check(yt(...r)), e.nonempty = (...r) => e.check(re(1, ...r)), e.lowercase = (r) => e.check(Ci(r)), e.uppercase = (r) => e.check(Ui(r)), e.trim = () => e.check(Wi()), e.normalize = (...r) => e.check(Vi(...r)), e.toLowerCase = () => e.check(Gi()), e.toUpperCase = () => e.check(Ki());
2984
+ }), jt = /* @__PURE__ */ u("ZodString", (e, n) => {
2985
+ pe.init(e, n), Ot.init(e, n), e.email = (t) => e.check(nt(Dt, t)), e.url = (t) => e.check(st(Rt, t)), e.jwt = (t) => e.check($t(Ht, t)), e.emoji = (t) => e.check(ut(Ct, t)), e.guid = (t) => e.check(me(ge, t)), e.uuid = (t) => e.check(tt(A, t)), e.uuidv4 = (t) => e.check(rt(A, t)), e.uuidv6 = (t) => e.check(ot(A, t)), e.uuidv7 = (t) => e.check(it(A, t)), e.nanoid = (t) => e.check(ct(Ut, t)), e.guid = (t) => e.check(me(ge, t)), e.cuid = (t) => e.check(at(Ft, t)), e.cuid2 = (t) => e.check(lt(Mt, t)), e.ulid = (t) => e.check(pt(Lt, t)), e.base64 = (t) => e.check(gt(Yt, t)), e.base64url = (t) => e.check(bt(qt, t)), e.xid = (t) => e.check(ft(Bt, t)), e.ksuid = (t) => e.check(dt(Vt, t)), e.ipv4 = (t) => e.check(ht(Wt, t)), e.ipv6 = (t) => e.check(mt(Gt, t)), e.cidrv4 = (t) => e.check(_t(Kt, t)), e.cidrv6 = (t) => e.check(vt(Jt, t)), e.e164 = (t) => e.check(zt(Xt, t)), e.datetime = (t) => e.check(It(t)), e.date = (t) => e.check(Et(t)), e.time = (t) => e.check(Pt(t)), e.duration = (t) => e.check(At(t));
2986
+ });
2987
+ function Be(e) {
2988
+ return fi(jt, e);
2989
+ }
2990
+ const $ = /* @__PURE__ */ u("ZodStringFormat", (e, n) => {
2991
+ z.init(e, n), Ot.init(e, n);
2992
+ }), Dt = /* @__PURE__ */ u("ZodEmail", (e, n) => {
2993
+ so.init(e, n), $.init(e, n);
2994
+ });
2995
+ function ju(e) {
2996
+ return nt(Dt, e);
2997
+ }
2998
+ const ge = /* @__PURE__ */ u("ZodGUID", (e, n) => {
2999
+ oo.init(e, n), $.init(e, n);
3000
+ });
3001
+ function Du(e) {
3002
+ return me(ge, e);
3003
+ }
3004
+ const A = /* @__PURE__ */ u("ZodUUID", (e, n) => {
3005
+ io.init(e, n), $.init(e, n);
3006
+ });
3007
+ function Ru(e) {
3008
+ return tt(A, e);
3009
+ }
3010
+ function Cu(e) {
3011
+ return rt(A, e);
3012
+ }
3013
+ function Uu(e) {
3014
+ return ot(A, e);
3015
+ }
3016
+ function Fu(e) {
3017
+ return it(A, e);
3018
+ }
3019
+ const Rt = /* @__PURE__ */ u("ZodURL", (e, n) => {
3020
+ uo.init(e, n), $.init(e, n);
3021
+ });
3022
+ function Mu(e) {
3023
+ return st(Rt, e);
3024
+ }
3025
+ const Ct = /* @__PURE__ */ u("ZodEmoji", (e, n) => {
3026
+ co.init(e, n), $.init(e, n);
3027
+ });
3028
+ function Lu(e) {
3029
+ return ut(Ct, e);
3030
+ }
3031
+ const Ut = /* @__PURE__ */ u("ZodNanoID", (e, n) => {
3032
+ ao.init(e, n), $.init(e, n);
3033
+ });
3034
+ function Bu(e) {
3035
+ return ct(Ut, e);
3036
+ }
3037
+ const Ft = /* @__PURE__ */ u("ZodCUID", (e, n) => {
3038
+ lo.init(e, n), $.init(e, n);
3039
+ });
3040
+ function Vu(e) {
3041
+ return at(Ft, e);
3042
+ }
3043
+ const Mt = /* @__PURE__ */ u("ZodCUID2", (e, n) => {
3044
+ po.init(e, n), $.init(e, n);
3045
+ });
3046
+ function Wu(e) {
3047
+ return lt(Mt, e);
3048
+ }
3049
+ const Lt = /* @__PURE__ */ u("ZodULID", (e, n) => {
3050
+ fo.init(e, n), $.init(e, n);
3051
+ });
3052
+ function Gu(e) {
3053
+ return pt(Lt, e);
3054
+ }
3055
+ const Bt = /* @__PURE__ */ u("ZodXID", (e, n) => {
3056
+ ho.init(e, n), $.init(e, n);
3057
+ });
3058
+ function Ku(e) {
3059
+ return ft(Bt, e);
3060
+ }
3061
+ const Vt = /* @__PURE__ */ u("ZodKSUID", (e, n) => {
3062
+ mo.init(e, n), $.init(e, n);
3063
+ });
3064
+ function Ju(e) {
3065
+ return dt(Vt, e);
3066
+ }
3067
+ const Wt = /* @__PURE__ */ u("ZodIPv4", (e, n) => {
3068
+ zo.init(e, n), $.init(e, n);
3069
+ });
3070
+ function Yu(e) {
3071
+ return ht(Wt, e);
3072
+ }
3073
+ const Gt = /* @__PURE__ */ u("ZodIPv6", (e, n) => {
3074
+ $o.init(e, n), $.init(e, n);
3075
+ });
3076
+ function qu(e) {
3077
+ return mt(Gt, e);
3078
+ }
3079
+ const Kt = /* @__PURE__ */ u("ZodCIDRv4", (e, n) => {
3080
+ wo.init(e, n), $.init(e, n);
3081
+ });
3082
+ function Xu(e) {
3083
+ return _t(Kt, e);
3084
+ }
3085
+ const Jt = /* @__PURE__ */ u("ZodCIDRv6", (e, n) => {
3086
+ Zo.init(e, n), $.init(e, n);
3087
+ });
3088
+ function Hu(e) {
3089
+ return vt(Jt, e);
3090
+ }
3091
+ const Yt = /* @__PURE__ */ u("ZodBase64", (e, n) => {
3092
+ yo.init(e, n), $.init(e, n);
3093
+ });
3094
+ function Qu(e) {
3095
+ return gt(Yt, e);
3096
+ }
3097
+ const qt = /* @__PURE__ */ u("ZodBase64URL", (e, n) => {
3098
+ Io.init(e, n), $.init(e, n);
3099
+ });
3100
+ function ec(e) {
3101
+ return bt(qt, e);
3102
+ }
3103
+ const Xt = /* @__PURE__ */ u("ZodE164", (e, n) => {
3104
+ To.init(e, n), $.init(e, n);
3105
+ });
3106
+ function nc(e) {
3107
+ return zt(Xt, e);
3108
+ }
3109
+ const Ht = /* @__PURE__ */ u("ZodJWT", (e, n) => {
3110
+ So.init(e, n), $.init(e, n);
3111
+ });
3112
+ function tc(e) {
3113
+ return $t(Ht, e);
3114
+ }
3115
+ const Qt = /* @__PURE__ */ u("ZodNumber", (e, n) => {
3116
+ Yn.init(e, n), _.init(e, n), e.gt = (r, o) => e.check(J(r, o)), e.gte = (r, o) => e.check(P(r, o)), e.min = (r, o) => e.check(P(r, o)), e.lt = (r, o) => e.check(K(r, o)), e.lte = (r, o) => e.check(N(r, o)), e.max = (r, o) => e.check(N(r, o)), e.int = (r) => e.check(Ve(r)), e.safe = (r) => e.check(Ve(r)), e.positive = (r) => e.check(J(0, r)), e.nonnegative = (r) => e.check(P(0, r)), e.negative = (r) => e.check(K(0, r)), e.nonpositive = (r) => e.check(N(0, r)), e.multipleOf = (r, o) => e.check(_e(r, o)), e.step = (r, o) => e.check(_e(r, o)), e.finite = () => e;
3117
+ const t = e._zod.bag;
3118
+ e.minValue = Math.max(t.minimum ?? Number.NEGATIVE_INFINITY, t.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(t.maximum ?? Number.POSITIVE_INFINITY, t.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (t.format ?? "").includes("int") || Number.isSafeInteger(t.multipleOf ?? 0.5), e.isFinite = !0, e.format = t.format ?? null;
3119
+ });
3120
+ function rs(e) {
3121
+ return vi(Qt, e);
3122
+ }
3123
+ const q = /* @__PURE__ */ u("ZodNumberFormat", (e, n) => {
3124
+ Po.init(e, n), Qt.init(e, n);
3125
+ });
3126
+ function Ve(e) {
3127
+ return gi(q, e);
3128
+ }
3129
+ function rc(e) {
3130
+ return bi(q, e);
3131
+ }
3132
+ function oc(e) {
3133
+ return zi(q, e);
3134
+ }
3135
+ function ic(e) {
3136
+ return $i(q, e);
3137
+ }
3138
+ function sc(e) {
3139
+ return wi(q, e);
3140
+ }
3141
+ const er = /* @__PURE__ */ u("ZodBoolean", (e, n) => {
3142
+ qn.init(e, n), _.init(e, n);
3143
+ });
3144
+ function os(e) {
3145
+ return Zi(er, e);
3146
+ }
3147
+ const nr = /* @__PURE__ */ u("ZodBigInt", (e, n) => {
3148
+ Xn.init(e, n), _.init(e, n), e.gte = (r, o) => e.check(P(r, o)), e.min = (r, o) => e.check(P(r, o)), e.gt = (r, o) => e.check(J(r, o)), e.gte = (r, o) => e.check(P(r, o)), e.min = (r, o) => e.check(P(r, o)), e.lt = (r, o) => e.check(K(r, o)), e.lte = (r, o) => e.check(N(r, o)), e.max = (r, o) => e.check(N(r, o)), e.positive = (r) => e.check(J(BigInt(0), r)), e.negative = (r) => e.check(K(BigInt(0), r)), e.nonpositive = (r) => e.check(N(BigInt(0), r)), e.nonnegative = (r) => e.check(P(BigInt(0), r)), e.multipleOf = (r, o) => e.check(_e(r, o));
3149
+ const t = e._zod.bag;
3150
+ e.minValue = t.minimum ?? null, e.maxValue = t.maximum ?? null, e.format = t.format ?? null;
3151
+ });
3152
+ function uc(e) {
3153
+ return yi(nr, e);
3154
+ }
3155
+ const tr = /* @__PURE__ */ u("ZodBigIntFormat", (e, n) => {
3156
+ xo.init(e, n), nr.init(e, n);
3157
+ });
3158
+ function cc(e) {
3159
+ return ki(tr, e);
3160
+ }
3161
+ function ac(e) {
3162
+ return Ii(tr, e);
3163
+ }
3164
+ const is = /* @__PURE__ */ u("ZodSymbol", (e, n) => {
3165
+ Ao.init(e, n), _.init(e, n);
3166
+ });
3167
+ function lc(e) {
3168
+ return Ti(is, e);
3169
+ }
3170
+ const ss = /* @__PURE__ */ u("ZodUndefined", (e, n) => {
3171
+ No.init(e, n), _.init(e, n);
3172
+ });
3173
+ function pc(e) {
3174
+ return Ei(ss, e);
3175
+ }
3176
+ const us = /* @__PURE__ */ u("ZodNull", (e, n) => {
3177
+ Oo.init(e, n), _.init(e, n);
3178
+ });
3179
+ function cs(e) {
3180
+ return Si(us, e);
3181
+ }
3182
+ const as = /* @__PURE__ */ u("ZodAny", (e, n) => {
3183
+ jo.init(e, n), _.init(e, n);
3184
+ });
3185
+ function fc() {
3186
+ return Pi(as);
3187
+ }
3188
+ const ls = /* @__PURE__ */ u("ZodUnknown", (e, n) => {
3189
+ Do.init(e, n), _.init(e, n);
3190
+ });
3191
+ function be() {
3192
+ return xi(ls);
3193
+ }
3194
+ const ps = /* @__PURE__ */ u("ZodNever", (e, n) => {
3195
+ Ro.init(e, n), _.init(e, n);
3196
+ });
3197
+ function ke(e) {
3198
+ return Ai(ps, e);
3199
+ }
3200
+ const fs = /* @__PURE__ */ u("ZodVoid", (e, n) => {
3201
+ Co.init(e, n), _.init(e, n);
3202
+ });
3203
+ function dc(e) {
3204
+ return Ni(fs, e);
3205
+ }
3206
+ const ds = /* @__PURE__ */ u("ZodDate", (e, n) => {
3207
+ Uo.init(e, n), _.init(e, n), e.min = (r, o) => e.check(P(r, o)), e.max = (r, o) => e.check(N(r, o));
3208
+ const t = e._zod.bag;
3209
+ e.minDate = t.minimum ? new Date(t.minimum) : null, e.maxDate = t.maximum ? new Date(t.maximum) : null;
3210
+ });
3211
+ function hc(e) {
3212
+ return Oi(ds, e);
3213
+ }
3214
+ const hs = /* @__PURE__ */ u("ZodArray", (e, n) => {
3215
+ Fo.init(e, n), _.init(e, n), e.element = n.element, e.min = (t, r) => e.check(re(t, r)), e.nonempty = (t) => e.check(re(1, t)), e.max = (t, r) => e.check(Zt(t, r)), e.length = (t, r) => e.check(yt(t, r)), e.unwrap = () => e.element;
3216
+ });
3217
+ function rr(e, n) {
3218
+ return Ji(hs, e, n);
3219
+ }
3220
+ function mc(e) {
3221
+ const n = e._zod.def.shape;
3222
+ return ys(Object.keys(n));
3223
+ }
3224
+ const Ie = /* @__PURE__ */ u("ZodObject", (e, n) => {
3225
+ Mo.init(e, n), _.init(e, n), g(e, "shape", () => Object.fromEntries(Object.entries(e._zod.def.shape))), e.keyof = () => ws(Object.keys(e._zod.def.shape)), e.catchall = (t) => e.clone({ ...e._zod.def, catchall: t }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: be() }), e.loose = () => e.clone({ ...e._zod.def, catchall: be() }), e.strict = () => e.clone({ ...e._zod.def, catchall: ke() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (t) => tn(e, t), e.merge = (t) => rn(e, t), e.pick = (t) => en(e, t), e.omit = (t) => nn(e, t), e.partial = (...t) => on(cr, e, t[0]), e.required = (...t) => sn(ar, e, t[0]);
3226
+ });
3227
+ function _c(e, n) {
3228
+ const t = {
3229
+ type: "object",
3230
+ get shape() {
3231
+ return L(this, "shape", { ...e }), this.shape;
3232
+ },
3233
+ ...a(n)
3234
+ };
3235
+ return new Ie(t);
3236
+ }
3237
+ function vc(e, n) {
3238
+ return new Ie({
3239
+ type: "object",
3240
+ get shape() {
3241
+ return L(this, "shape", { ...e }), this.shape;
3242
+ },
3243
+ catchall: ke(),
3244
+ ...a(n)
3245
+ });
3246
+ }
3247
+ function gc(e, n) {
3248
+ return new Ie({
3249
+ type: "object",
3250
+ get shape() {
3251
+ return L(this, "shape", { ...e }), this.shape;
3252
+ },
3253
+ catchall: be(),
3254
+ ...a(n)
3255
+ });
3256
+ }
3257
+ const or = /* @__PURE__ */ u("ZodUnion", (e, n) => {
3258
+ Hn.init(e, n), _.init(e, n), e.options = n.options;
3259
+ });
3260
+ function Te(e, n) {
3261
+ return new or({
3262
+ type: "union",
3263
+ options: e,
3264
+ ...a(n)
3265
+ });
3266
+ }
3267
+ const ms = /* @__PURE__ */ u("ZodDiscriminatedUnion", (e, n) => {
3268
+ or.init(e, n), Lo.init(e, n);
3269
+ });
3270
+ function bc(e, n, t) {
3271
+ return new ms({
3272
+ type: "union",
3273
+ options: n,
3274
+ discriminator: e,
3275
+ ...a(t)
3276
+ });
3277
+ }
3278
+ const _s = /* @__PURE__ */ u("ZodIntersection", (e, n) => {
3279
+ Bo.init(e, n), _.init(e, n);
3280
+ });
3281
+ function vs(e, n) {
3282
+ return new _s({
3283
+ type: "intersection",
3284
+ left: e,
3285
+ right: n
3286
+ });
3287
+ }
3288
+ const gs = /* @__PURE__ */ u("ZodTuple", (e, n) => {
3289
+ Vo.init(e, n), _.init(e, n), e.rest = (t) => e.clone({
3290
+ ...e._zod.def,
3291
+ rest: t
3292
+ });
3293
+ });
3294
+ function zc(e, n, t) {
3295
+ const r = n instanceof h, o = r ? t : n, i = r ? n : null;
3296
+ return new gs({
3297
+ type: "tuple",
3298
+ items: e,
3299
+ rest: i,
3300
+ ...a(o)
3301
+ });
3302
+ }
3303
+ const ir = /* @__PURE__ */ u("ZodRecord", (e, n) => {
3304
+ Wo.init(e, n), _.init(e, n), e.keyType = n.keyType, e.valueType = n.valueType;
3305
+ });
3306
+ function bs(e, n, t) {
3307
+ return new ir({
3308
+ type: "record",
3309
+ keyType: e,
3310
+ valueType: n,
3311
+ ...a(t)
3312
+ });
3313
+ }
3314
+ function $c(e, n, t) {
3315
+ return new ir({
3316
+ type: "record",
3317
+ keyType: Te([e, ke()]),
3318
+ valueType: n,
3319
+ ...a(t)
3320
+ });
3321
+ }
3322
+ const zs = /* @__PURE__ */ u("ZodMap", (e, n) => {
3323
+ Go.init(e, n), _.init(e, n), e.keyType = n.keyType, e.valueType = n.valueType;
3324
+ });
3325
+ function wc(e, n, t) {
3326
+ return new zs({
3327
+ type: "map",
3328
+ keyType: e,
3329
+ valueType: n,
3330
+ ...a(t)
3331
+ });
3332
+ }
3333
+ const $s = /* @__PURE__ */ u("ZodSet", (e, n) => {
3334
+ Ko.init(e, n), _.init(e, n), e.min = (...t) => e.check(ve(...t)), e.nonempty = (t) => e.check(ve(1, t)), e.max = (...t) => e.check(wt(...t)), e.size = (...t) => e.check(Di(...t));
3335
+ });
3336
+ function Zc(e, n) {
3337
+ return new $s({
3338
+ type: "set",
3339
+ valueType: e,
3340
+ ...a(n)
3341
+ });
3342
+ }
3343
+ const oe = /* @__PURE__ */ u("ZodEnum", (e, n) => {
3344
+ Jo.init(e, n), _.init(e, n), e.enum = n.entries, e.options = Object.values(n.entries);
3345
+ const t = new Set(Object.keys(n.entries));
3346
+ e.extract = (r, o) => {
3347
+ const i = {};
3348
+ for (const s of r)
3349
+ if (t.has(s))
3350
+ i[s] = n.entries[s];
3351
+ else
3352
+ throw new Error(`Key ${s} not found in enum`);
3353
+ return new oe({
3354
+ ...n,
3355
+ checks: [],
3356
+ ...a(o),
3357
+ entries: i
3358
+ });
3359
+ }, e.exclude = (r, o) => {
3360
+ const i = { ...n.entries };
3361
+ for (const s of r)
3362
+ if (t.has(s))
3363
+ delete i[s];
3364
+ else
3365
+ throw new Error(`Key ${s} not found in enum`);
3366
+ return new oe({
3367
+ ...n,
3368
+ checks: [],
3369
+ ...a(o),
3370
+ entries: i
3371
+ });
3372
+ };
3373
+ });
3374
+ function ws(e, n) {
3375
+ const t = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
3376
+ return new oe({
3377
+ type: "enum",
3378
+ entries: t,
3379
+ ...a(n)
3380
+ });
3381
+ }
3382
+ function yc(e, n) {
3383
+ return new oe({
3384
+ type: "enum",
3385
+ entries: e,
3386
+ ...a(n)
3387
+ });
3388
+ }
3389
+ const Zs = /* @__PURE__ */ u("ZodLiteral", (e, n) => {
3390
+ Yo.init(e, n), _.init(e, n), e.values = new Set(n.values), Object.defineProperty(e, "value", {
3391
+ get() {
3392
+ if (n.values.length > 1)
3393
+ throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
3394
+ return n.values[0];
3395
+ }
3396
+ });
3397
+ });
3398
+ function ys(e, n) {
3399
+ return new Zs({
3400
+ type: "literal",
3401
+ values: Array.isArray(e) ? e : [e],
3402
+ ...a(n)
3403
+ });
3404
+ }
3405
+ const ks = /* @__PURE__ */ u("ZodFile", (e, n) => {
3406
+ qo.init(e, n), _.init(e, n), e.min = (t, r) => e.check(ve(t, r)), e.max = (t, r) => e.check(wt(t, r)), e.mime = (t, r) => e.check(Bi(Array.isArray(t) ? t : [t], r));
3407
+ });
3408
+ function kc(e) {
3409
+ return Yi(ks, e);
3410
+ }
3411
+ const sr = /* @__PURE__ */ u("ZodTransform", (e, n) => {
3412
+ Qn.init(e, n), _.init(e, n), e._zod.parse = (t, r) => {
3413
+ t.addIssue = (i) => {
3414
+ if (typeof i == "string")
3415
+ t.issues.push(F(i, t.value, n));
3416
+ else {
3417
+ const s = i;
3418
+ s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = t.value), s.inst ?? (s.inst = e), s.continue ?? (s.continue = !0), t.issues.push(F(s));
3419
+ }
3420
+ };
3421
+ const o = n.transform(t.value, t);
3422
+ return o instanceof Promise ? o.then((i) => (t.value = i, t)) : (t.value = o, t);
3423
+ };
3424
+ });
3425
+ function ur(e) {
3426
+ return new sr({
3427
+ type: "transform",
3428
+ transform: e
3429
+ });
3430
+ }
3431
+ const cr = /* @__PURE__ */ u("ZodOptional", (e, n) => {
3432
+ Xo.init(e, n), _.init(e, n), e.unwrap = () => e._zod.def.innerType;
3433
+ });
3434
+ function ze(e) {
3435
+ return new cr({
3436
+ type: "optional",
3437
+ innerType: e
3438
+ });
3439
+ }
3440
+ const Is = /* @__PURE__ */ u("ZodNullable", (e, n) => {
3441
+ Ho.init(e, n), _.init(e, n), e.unwrap = () => e._zod.def.innerType;
3442
+ });
3443
+ function $e(e) {
3444
+ return new Is({
3445
+ type: "nullable",
3446
+ innerType: e
3447
+ });
3448
+ }
3449
+ function Ic(e) {
3450
+ return ze($e(e));
3451
+ }
3452
+ const Ts = /* @__PURE__ */ u("ZodDefault", (e, n) => {
3453
+ Qo.init(e, n), _.init(e, n), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3454
+ });
3455
+ function Es(e, n) {
3456
+ return new Ts({
3457
+ type: "default",
3458
+ innerType: e,
3459
+ get defaultValue() {
3460
+ return typeof n == "function" ? n() : n;
3461
+ }
3462
+ });
3463
+ }
3464
+ const Ss = /* @__PURE__ */ u("ZodPrefault", (e, n) => {
3465
+ ei.init(e, n), _.init(e, n), e.unwrap = () => e._zod.def.innerType;
3466
+ });
3467
+ function Ps(e, n) {
3468
+ return new Ss({
3469
+ type: "prefault",
3470
+ innerType: e,
3471
+ get defaultValue() {
3472
+ return typeof n == "function" ? n() : n;
3473
+ }
3474
+ });
3475
+ }
3476
+ const ar = /* @__PURE__ */ u("ZodNonOptional", (e, n) => {
3477
+ ni.init(e, n), _.init(e, n), e.unwrap = () => e._zod.def.innerType;
3478
+ });
3479
+ function xs(e, n) {
3480
+ return new ar({
3481
+ type: "nonoptional",
3482
+ innerType: e,
3483
+ ...a(n)
3484
+ });
3485
+ }
3486
+ const As = /* @__PURE__ */ u("ZodSuccess", (e, n) => {
3487
+ ti.init(e, n), _.init(e, n), e.unwrap = () => e._zod.def.innerType;
3488
+ });
3489
+ function Tc(e) {
3490
+ return new As({
3491
+ type: "success",
3492
+ innerType: e
3493
+ });
3494
+ }
3495
+ const Ns = /* @__PURE__ */ u("ZodCatch", (e, n) => {
3496
+ ri.init(e, n), _.init(e, n), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3497
+ });
3498
+ function Os(e, n) {
3499
+ return new Ns({
3500
+ type: "catch",
3501
+ innerType: e,
3502
+ catchValue: typeof n == "function" ? n : () => n
3503
+ });
3504
+ }
3505
+ const js = /* @__PURE__ */ u("ZodNaN", (e, n) => {
3506
+ oi.init(e, n), _.init(e, n);
3507
+ });
3508
+ function Ec(e) {
3509
+ return ji(js, e);
3510
+ }
3511
+ const lr = /* @__PURE__ */ u("ZodPipe", (e, n) => {
3512
+ et.init(e, n), _.init(e, n), e.in = n.in, e.out = n.out;
3513
+ });
3514
+ function we(e, n) {
3515
+ return new lr({
3516
+ type: "pipe",
3517
+ in: e,
3518
+ out: n
3519
+ // ...util.normalizeParams(params),
3520
+ });
3521
+ }
3522
+ const Ds = /* @__PURE__ */ u("ZodReadonly", (e, n) => {
3523
+ ii.init(e, n), _.init(e, n);
3524
+ });
3525
+ function Rs(e) {
3526
+ return new Ds({
3527
+ type: "readonly",
3528
+ innerType: e
3529
+ });
3530
+ }
3531
+ const Cs = /* @__PURE__ */ u("ZodTemplateLiteral", (e, n) => {
3532
+ si.init(e, n), _.init(e, n);
3533
+ });
3534
+ function Sc(e, n) {
3535
+ return new Cs({
3536
+ type: "template_literal",
3537
+ parts: e,
3538
+ ...a(n)
3539
+ });
3540
+ }
3541
+ const Us = /* @__PURE__ */ u("ZodLazy", (e, n) => {
3542
+ ci.init(e, n), _.init(e, n), e.unwrap = () => e._zod.def.getter();
3543
+ });
3544
+ function Fs(e) {
3545
+ return new Us({
3546
+ type: "lazy",
3547
+ getter: e
3548
+ });
3549
+ }
3550
+ const Ms = /* @__PURE__ */ u("ZodPromise", (e, n) => {
3551
+ ui.init(e, n), _.init(e, n), e.unwrap = () => e._zod.def.innerType;
3552
+ });
3553
+ function Pc(e) {
3554
+ return new Ms({
3555
+ type: "promise",
3556
+ innerType: e
3557
+ });
3558
+ }
3559
+ const Ee = /* @__PURE__ */ u("ZodCustom", (e, n) => {
3560
+ ai.init(e, n), _.init(e, n);
3561
+ });
3562
+ function Ls(e, n) {
3563
+ const t = new Z({
3564
+ check: "custom",
3565
+ ...a(n)
3566
+ });
3567
+ return t._zod.check = e, t;
3568
+ }
3569
+ function xc(e, n) {
3570
+ return qi(Ee, e ?? (() => !0), n);
3571
+ }
3572
+ function Bs(e, n = {}) {
3573
+ return Xi(Ee, e, n);
3574
+ }
3575
+ function Vs(e, n) {
3576
+ const t = Ls((r) => (r.addIssue = (o) => {
3577
+ if (typeof o == "string")
3578
+ r.issues.push(F(o, r.value, t._zod.def));
3579
+ else {
3580
+ const i = o;
3581
+ i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = r.value), i.inst ?? (i.inst = t), i.continue ?? (i.continue = !t._zod.def.abort), r.issues.push(F(i));
3582
+ }
3583
+ }, e(r.value, r)), n);
3584
+ return t;
3585
+ }
3586
+ function Ac(e, n = {
3587
+ error: `Input not instance of ${e.name}`
3588
+ }) {
3589
+ const t = new Ee({
3590
+ type: "custom",
3591
+ check: "custom",
3592
+ fn: (r) => r instanceof e,
3593
+ abort: !0,
3594
+ ...a(n)
3595
+ });
3596
+ return t._zod.bag.Class = e, t;
3597
+ }
3598
+ const Nc = (...e) => Hi({
3599
+ Pipe: lr,
3600
+ Boolean: er,
3601
+ String: jt,
3602
+ Transform: sr
3603
+ }, ...e);
3604
+ function Oc(e) {
3605
+ const n = Fs(() => Te([Be(e), rs(), os(), cs(), rr(n), bs(Be(), n)]));
3606
+ return n;
3607
+ }
3608
+ function jc(e, n) {
3609
+ return we(ur(e), n);
3610
+ }
3611
+ export {
3612
+ Vo as $,
3613
+ Xn as A,
3614
+ xo as B,
3615
+ qn as C,
3616
+ wo as D,
3617
+ Zo as E,
3618
+ lo as F,
3619
+ po as G,
3620
+ ri as H,
3621
+ Z as I,
3622
+ Fr as J,
3623
+ Hr as K,
3624
+ Kn as L,
3625
+ qr as M,
3626
+ Gr as N,
3627
+ Gn as O,
3628
+ Jr as P,
3629
+ Vr as Q,
3630
+ Mr as R,
3631
+ eo as S,
3632
+ Wr as T,
3633
+ Lr as U,
3634
+ Cr as V,
3635
+ Ur as W,
3636
+ no as X,
3637
+ Qr as Y,
3638
+ Kr as Z,
3639
+ ws as _,
3640
+ Ac as a,
3641
+ nu as a$,
3642
+ Br as a0,
3643
+ Xr as a1,
3644
+ le as a2,
3645
+ Yr as a3,
3646
+ ai as a4,
3647
+ Uo as a5,
3648
+ Qo as a6,
3649
+ Lo as a7,
3650
+ To as a8,
3651
+ so as a9,
3652
+ Xo as aA,
3653
+ et as aB,
3654
+ ei as aC,
3655
+ ui as aD,
3656
+ ii as aE,
3657
+ ae as aF,
3658
+ Wo as aG,
3659
+ Ko as aH,
3660
+ pe as aI,
3661
+ z as aJ,
3662
+ ti as aK,
3663
+ Ao as aL,
3664
+ si as aM,
3665
+ Qn as aN,
3666
+ h as aO,
3667
+ fo as aP,
3668
+ uo as aQ,
3669
+ io as aR,
3670
+ No as aS,
3671
+ Hn as aT,
3672
+ Co as aU,
3673
+ ho as aV,
3674
+ Ws as aW,
3675
+ u as aX,
3676
+ Qs as aY,
3677
+ Hs as aZ,
3678
+ to as a_,
3679
+ co as aa,
3680
+ Jo as ab,
3681
+ cn as ac,
3682
+ qo as ad,
3683
+ oo as ae,
3684
+ zo as af,
3685
+ $o as ag,
3686
+ vo as ah,
3687
+ _o as ai,
3688
+ bo as aj,
3689
+ go as ak,
3690
+ Bo as al,
3691
+ So as am,
3692
+ mo as an,
3693
+ ci as ao,
3694
+ Yo as ap,
3695
+ Go as aq,
3696
+ oi as ar,
3697
+ ao as as,
3698
+ Ro as at,
3699
+ ni as au,
3700
+ Oo as av,
3701
+ Ho as aw,
3702
+ Yn as ax,
3703
+ Po as ay,
3704
+ Mo as az,
3705
+ uc as b,
3706
+ cu as b$,
3707
+ Pi as b0,
3708
+ gt as b1,
3709
+ bt as b2,
3710
+ yi as b3,
3711
+ Zi as b4,
3712
+ Tu as b5,
3713
+ _t as b6,
3714
+ vt as b7,
3715
+ ou as b8,
3716
+ ru as b9,
3717
+ mt as bA,
3718
+ hi as bB,
3719
+ di as bC,
3720
+ _i as bD,
3721
+ mi as bE,
3722
+ $t as bF,
3723
+ dt as bG,
3724
+ xu as bH,
3725
+ yt as bI,
3726
+ zu as bJ,
3727
+ Ci as bK,
3728
+ K as bL,
3729
+ N as bM,
3730
+ _u as bN,
3731
+ Zt as bO,
3732
+ wt as bP,
3733
+ Bi as bQ,
3734
+ re as bR,
3735
+ ve as bS,
3736
+ _e as bT,
3737
+ ji as bU,
3738
+ ct as bV,
3739
+ bu as bW,
3740
+ uu as bX,
3741
+ Ai as bY,
3742
+ au as bZ,
3743
+ ku as b_,
3744
+ iu as ba,
3745
+ tu as bb,
3746
+ eu as bc,
3747
+ at as bd,
3748
+ lt as be,
3749
+ qi as bf,
3750
+ Oi as bg,
3751
+ yu as bh,
3752
+ fu as bi,
3753
+ zt as bj,
3754
+ nt as bk,
3755
+ ut as bl,
3756
+ Li as bm,
3757
+ gu as bn,
3758
+ Yi as bo,
3759
+ bi as bp,
3760
+ zi as bq,
3761
+ J as br,
3762
+ P as bs,
3763
+ me as bt,
3764
+ Fi as bu,
3765
+ gi as bv,
3766
+ $i as bw,
3767
+ ki as bx,
3768
+ du as by,
3769
+ ht as bz,
3770
+ be as c,
3771
+ qt as c$,
3772
+ Vi as c0,
3773
+ Si as c1,
3774
+ Zu as c2,
3775
+ vi as c3,
3776
+ wu as c4,
3777
+ Y as c5,
3778
+ an as c6,
3779
+ ln as c7,
3780
+ Eu as c8,
3781
+ su as c9,
3782
+ st as cA,
3783
+ tt as cB,
3784
+ rt as cC,
3785
+ ot as cD,
3786
+ it as cE,
3787
+ Ni as cF,
3788
+ ft as cG,
3789
+ O as cH,
3790
+ x as cI,
3791
+ yr as cJ,
3792
+ kr as cK,
3793
+ de as cL,
3794
+ Jn as cM,
3795
+ ko as cN,
3796
+ Eo as cO,
3797
+ Js as cP,
3798
+ Xs as cQ,
3799
+ pi as cR,
3800
+ Tr as cS,
3801
+ Er as cT,
3802
+ Ir as cU,
3803
+ Ks as cV,
3804
+ Gs as cW,
3805
+ ro as cX,
3806
+ as as cY,
3807
+ hs as cZ,
3808
+ Yt as c_,
3809
+ Au as ca,
3810
+ lu as cb,
3811
+ Su as cc,
3812
+ mu as cd,
3813
+ Xi as ce,
3814
+ Ri as cf,
3815
+ pn as cg,
3816
+ fn as ch,
3817
+ vu as ci,
3818
+ Di as cj,
3819
+ Mi as ck,
3820
+ fi as cl,
3821
+ Hi as cm,
3822
+ Iu as cn,
3823
+ Ti as co,
3824
+ Pu as cp,
3825
+ Gi as cq,
3826
+ Ki as cr,
3827
+ $u as cs,
3828
+ Wi as ct,
3829
+ wi as cu,
3830
+ Ii as cv,
3831
+ pt as cw,
3832
+ Ei as cx,
3833
+ pu as cy,
3834
+ Ui as cz,
3835
+ lc as d,
3836
+ fs as d$,
3837
+ nr as d0,
3838
+ tr as d1,
3839
+ er as d2,
3840
+ Kt as d3,
3841
+ Jt as d4,
3842
+ Ft as d5,
3843
+ Mt as d6,
3844
+ Ns as d7,
3845
+ Ee as d8,
3846
+ ds as d9,
3847
+ us as dA,
3848
+ Is as dB,
3849
+ Qt as dC,
3850
+ q as dD,
3851
+ Ie as dE,
3852
+ cr as dF,
3853
+ lr as dG,
3854
+ Ss as dH,
3855
+ Ms as dI,
3856
+ Ds as dJ,
3857
+ fe as dK,
3858
+ ir as dL,
3859
+ $s as dM,
3860
+ jt as dN,
3861
+ $ as dO,
3862
+ As as dP,
3863
+ is as dQ,
3864
+ Cs as dR,
3865
+ sr as dS,
3866
+ gs as dT,
3867
+ _ as dU,
3868
+ Lt as dV,
3869
+ Rt as dW,
3870
+ A as dX,
3871
+ ss as dY,
3872
+ or as dZ,
3873
+ ls as d_,
3874
+ Ts as da,
3875
+ ms as db,
3876
+ Xt as dc,
3877
+ Dt as dd,
3878
+ Ct as de,
3879
+ oe as df,
3880
+ Ou as dg,
3881
+ ks as dh,
3882
+ ge as di,
3883
+ Wt as dj,
3884
+ Gt as dk,
3885
+ Tt as dl,
3886
+ kt as dm,
3887
+ xt as dn,
3888
+ St as dp,
3889
+ _s as dq,
3890
+ Ht as dr,
3891
+ Vt as ds,
3892
+ Us as dt,
3893
+ Zs as du,
3894
+ zs as dv,
3895
+ js as dw,
3896
+ Ut as dx,
3897
+ ps as dy,
3898
+ ar as dz,
3899
+ qe as e,
3900
+ Vs as e$,
3901
+ Bt as e0,
3902
+ Ot as e1,
3903
+ Es as e2,
3904
+ fc as e3,
3905
+ rr as e4,
3906
+ Qu as e5,
3907
+ ec as e6,
3908
+ os as e7,
3909
+ Os as e8,
3910
+ Ls as e9,
3911
+ ys as eA,
3912
+ gc as eB,
3913
+ wc as eC,
3914
+ Ec as eD,
3915
+ Bu as eE,
3916
+ yc as eF,
3917
+ ke as eG,
3918
+ xs as eH,
3919
+ cs as eI,
3920
+ $e as eJ,
3921
+ Ic as eK,
3922
+ ze as eL,
3923
+ Qi as eM,
3924
+ es as eN,
3925
+ $c as eO,
3926
+ we as eP,
3927
+ Ps as eQ,
3928
+ jc as eR,
3929
+ Pc as eS,
3930
+ Rs as eT,
3931
+ Bs as eU,
3932
+ ns as eV,
3933
+ ts as eW,
3934
+ Zc as eX,
3935
+ vc as eY,
3936
+ Nc as eZ,
3937
+ Tc as e_,
3938
+ Xu as ea,
3939
+ Hu as eb,
3940
+ Vu as ec,
3941
+ Wu as ed,
3942
+ xc as ee,
3943
+ hc as ef,
3944
+ bc as eg,
3945
+ nc as eh,
3946
+ ju as ei,
3947
+ Lu as ej,
3948
+ kc as ek,
3949
+ rc as el,
3950
+ oc as em,
3951
+ Du as en,
3952
+ Ve as eo,
3953
+ ic as ep,
3954
+ cc as eq,
3955
+ vs as er,
3956
+ Yu as es,
3957
+ qu as et,
3958
+ Nu as eu,
3959
+ Oc as ev,
3960
+ tc as ew,
3961
+ mc as ex,
3962
+ Ju as ey,
3963
+ Fs as ez,
3964
+ xi as f,
3965
+ Sc as f0,
3966
+ ur as f1,
3967
+ sc as f2,
3968
+ ac as f3,
3969
+ Gu as f4,
3970
+ pc as f5,
3971
+ Mu as f6,
3972
+ Ru as f7,
3973
+ Cu as f8,
3974
+ Uu as f9,
3975
+ Fu as fa,
3976
+ dc as fb,
3977
+ Ku as fc,
3978
+ hu as g,
3979
+ Ji as h,
3980
+ Do as i,
3981
+ _r as j,
3982
+ Fo as k,
3983
+ qs as l,
3984
+ ee as m,
3985
+ rs as n,
3986
+ _c as o,
3987
+ Ys as p,
3988
+ We as q,
3989
+ bs as r,
3990
+ Be as s,
3991
+ zc as t,
3992
+ Te as u,
3993
+ li as v,
3994
+ jo as w,
3995
+ W as x,
3996
+ yo as y,
3997
+ Io as z
3998
+ };