@piveau/piveau-hub-ui-modules 4.6.49 → 4.6.50

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 (233) hide show
  1. package/dist/PvBadge/PvBadge.vue.mjs.map +1 -1
  2. package/dist/PvDataInfoBox/PvDataInfoBox.vue.mjs +2 -1
  3. package/dist/PvDataInfoBox/PvDataInfoBox.vue.mjs.map +1 -1
  4. package/dist/PvDataInfoBox/PvDataInfoBoxDescription.vue.mjs.map +1 -1
  5. package/dist/PvDataInfoBox/PvDataInfoBoxFooter.vue.mjs.map +1 -1
  6. package/dist/PvDataInfoBox/PvDataInfoBoxFormats.vue.mjs.map +1 -1
  7. package/dist/catalogues/CatalogPage.vue.mjs.map +1 -1
  8. package/dist/catalogues/CatalogPageDatasetCard.vue.mjs +6 -5
  9. package/dist/catalogues/CatalogPageDatasetCard.vue.mjs.map +1 -1
  10. package/dist/catalogues/Catalogues.vue.mjs.map +1 -1
  11. package/dist/catalogues/cataloguesFacets/CataloguesFacets.vue.mjs.map +1 -1
  12. package/dist/citation/DatasetCitationModal.vue.mjs.map +1 -1
  13. package/dist/citation/DatasetCitationTable.vue.mjs.map +1 -1
  14. package/dist/composables/useRuntimeEnv.d.ts +2 -2
  15. package/dist/configurations/config-schema/apiSchema.mjs +1 -1
  16. package/dist/configurations/config-schema/authenticationSchema.mjs +1 -1
  17. package/dist/configurations/config-schema/configSchema.d.ts +5 -5
  18. package/dist/configurations/config-schema/configSchema.mjs +18 -18
  19. package/dist/configurations/config-schema/contentSchema.mjs +1 -1
  20. package/dist/configurations/config-schema/languagesSchema.d.ts +2 -2
  21. package/dist/configurations/config-schema/languagesSchema.mjs +1 -1
  22. package/dist/configurations/config-schema/metadataSchema.mjs +1 -1
  23. package/dist/configurations/config-schema/routingSchema.mjs +1 -1
  24. package/dist/configurations/config-schema/themesSchema.mjs +1 -1
  25. package/dist/configurations/config-schema/trackerSchema.mjs +1 -1
  26. package/dist/data-provider-interface/CatalogueMQA.vue.mjs.map +1 -1
  27. package/dist/data-provider-interface/DPIMenu.vue.d.ts +10 -10
  28. package/dist/data-provider-interface/DPIMenu.vue.mjs.map +1 -1
  29. package/dist/data-provider-interface/DataProviderInterface.vue.d.ts +15 -17
  30. package/dist/data-provider-interface/DataProviderInterface.vue.mjs.map +1 -1
  31. package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs.map +1 -1
  32. package/dist/data-provider-interface/components/ConditionalInput.vue.mjs.map +1 -1
  33. package/dist/data-provider-interface/components/DataFetchingComponent.vue.d.ts +2 -2
  34. package/dist/data-provider-interface/components/DistributionStepper.vue.mjs +2 -1
  35. package/dist/data-provider-interface/components/DistributionStepper.vue.mjs.map +1 -1
  36. package/dist/data-provider-interface/components/Dropup.vue.d.ts +1 -1
  37. package/dist/data-provider-interface/components/Dropup.vue.mjs.map +1 -1
  38. package/dist/data-provider-interface/components/FileUpload.vue.d.ts +1 -1
  39. package/dist/data-provider-interface/components/FileUpload.vue.mjs.map +1 -1
  40. package/dist/data-provider-interface/components/InfoSlot.vue.mjs.map +1 -1
  41. package/dist/data-provider-interface/components/InputPageStep.vue.mjs.map +1 -1
  42. package/dist/data-provider-interface/components/LanguageSelector.vue.mjs.map +1 -1
  43. package/dist/data-provider-interface/components/Navigation.vue.d.ts +8 -8
  44. package/dist/data-provider-interface/components/Navigation.vue.mjs.map +1 -1
  45. package/dist/data-provider-interface/components/SelectControlledGroup.vue.mjs +2 -1
  46. package/dist/data-provider-interface/components/SelectControlledGroup.vue.mjs.map +1 -1
  47. package/dist/data-provider-interface/components/SimpleAccessURLInput.vue.mjs.map +1 -1
  48. package/dist/data-provider-interface/components/SimpleInput.vue.mjs.map +1 -1
  49. package/dist/data-provider-interface/components/SimpleSelect.vue.mjs.map +1 -1
  50. package/dist/data-provider-interface/components/SpatialInput.vue.mjs.map +1 -1
  51. package/dist/data-provider-interface/components/UniqueIdentifierInput.vue.mjs.map +1 -1
  52. package/dist/data-provider-interface/components/WidgetInput.vue.mjs.map +1 -1
  53. package/dist/data-provider-interface/views/DistributionInputPage.vue.mjs.map +1 -1
  54. package/dist/data-provider-interface/views/DistributionOverview.vue.d.ts +2 -2
  55. package/dist/data-provider-interface/views/DistributionOverview.vue.mjs.map +1 -1
  56. package/dist/data-provider-interface/views/DraftsPage.vue.d.ts +5 -5
  57. package/dist/data-provider-interface/views/DraftsPage.vue.mjs +19 -14
  58. package/dist/data-provider-interface/views/DraftsPage.vue.mjs.map +1 -1
  59. package/dist/data-provider-interface/views/InputPage.vue.d.ts +12 -14
  60. package/dist/data-provider-interface/views/InputPage.vue.mjs +4 -2
  61. package/dist/data-provider-interface/views/InputPage.vue.mjs.map +1 -1
  62. package/dist/data-provider-interface/views/LinkedDataViewer.vue.mjs.map +1 -1
  63. package/dist/data-provider-interface/views/OverviewPage/CatalogueOverview.vue.mjs.map +1 -1
  64. package/dist/data-provider-interface/views/OverviewPage/DatasetOverview.vue.mjs.map +1 -1
  65. package/dist/data-provider-interface/views/OverviewPage/DistributionOverview.vue.mjs.map +1 -1
  66. package/dist/data-provider-interface/views/OverviewPage/Properties/MultilingualProp.vue.mjs.map +1 -1
  67. package/dist/data-provider-interface/views/OverviewPage/Properties/SpecialProp.vue.mjs.map +1 -1
  68. package/dist/data-provider-interface/views/OverviewPage/Properties/StringProp.vue.mjs.map +1 -1
  69. package/dist/data-provider-interface/views/OverviewPage/Properties/URIProp.vue.mjs.map +1 -1
  70. package/dist/data-provider-interface/views/OverviewPage/Properties/URLProp.vue.mjs.map +1 -1
  71. package/dist/data-provider-interface/views/OverviewPage/PropertyEntry.vue.mjs.map +1 -1
  72. package/dist/data-provider-interface/views/OverviewPage.vue.d.ts +3 -5
  73. package/dist/data-provider-interface/views/OverviewPage.vue.mjs.map +1 -1
  74. package/dist/data-provider-interface/views/PropertyChooser.vue.mjs.map +1 -1
  75. package/dist/data-provider-interface/views/UserCataloguesPage.vue.mjs.map +1 -1
  76. package/dist/data-provider-interface/views/UserProfilePage.vue.mjs.map +1 -1
  77. package/dist/datasetDetails/AppMarkdownContent.vue.mjs.map +1 -1
  78. package/dist/datasetDetails/DatasetDetails.vue.mjs.map +1 -1
  79. package/dist/datasetDetails/DatasetDetailsActivityStream.vue.mjs.map +1 -1
  80. package/dist/datasetDetails/DatasetDetailsBanners.vue.d.ts +1 -3
  81. package/dist/datasetDetails/DatasetDetailsBanners.vue.mjs.map +1 -1
  82. package/dist/datasetDetails/DatasetDetailsCSVLinter.vue.mjs.map +1 -1
  83. package/dist/datasetDetails/DatasetDetailsCategories.vue.mjs.map +1 -1
  84. package/dist/datasetDetails/DatasetDetailsDataset.vue.mjs +3 -2
  85. package/dist/datasetDetails/DatasetDetailsDataset.vue.mjs.map +1 -1
  86. package/dist/datasetDetails/DatasetDetailsDataset.vue2.mjs +61 -50
  87. package/dist/datasetDetails/DatasetDetailsDataset.vue2.mjs.map +1 -1
  88. package/dist/datasetDetails/DatasetDetailsDescription.vue.d.ts +1 -3
  89. package/dist/datasetDetails/DatasetDetailsDescription.vue.mjs.map +1 -1
  90. package/dist/datasetDetails/DatasetDetailsFeedbackButton.vue.mjs.map +1 -1
  91. package/dist/datasetDetails/DatasetDetailsLinkedMetricsButton.vue.mjs.map +1 -1
  92. package/dist/datasetDetails/DatasetDetailsQuality.vue.mjs.map +1 -1
  93. package/dist/datasetDetails/DatasetDetailsShareButton.vue.mjs.map +1 -1
  94. package/dist/datasetDetails/DatasetDetailsSimilarDatasets.vue.mjs.map +1 -1
  95. package/dist/datasetDetails/DatasetDetailsSkeleton.vue.mjs.map +1 -1
  96. package/dist/datasetDetails/distributions/Distribution.vue.mjs.map +1 -1
  97. package/dist/datasetDetails/distributions/DistributionAdded.vue.mjs.map +1 -1
  98. package/dist/datasetDetails/distributions/DistributionDownloadAsModal.vue.mjs.map +1 -1
  99. package/dist/datasetDetails/distributions/DistributionFormat.vue.d.ts +2 -2
  100. package/dist/datasetDetails/distributions/DistributionFormat.vue.mjs.map +1 -1
  101. package/dist/datasetDetails/distributions/Distributions.vue.mjs.map +1 -1
  102. package/dist/datasetDetails/distributions/DistributionsHeader.vue.d.ts +4 -4
  103. package/dist/datasetDetails/distributions/DistributionsHeader.vue.mjs.map +1 -1
  104. package/dist/datasetDetails/distributions/DownloadAllDistributions.vue.d.ts +8 -8
  105. package/dist/datasetDetails/distributions/DownloadAllDistributions.vue.mjs +2 -1
  106. package/dist/datasetDetails/distributions/DownloadAllDistributions.vue.mjs.map +1 -1
  107. package/dist/datasetDetails/distributions/FadingDistributionOverlay.vue.mjs +7 -5
  108. package/dist/datasetDetails/distributions/FadingDistributionOverlay.vue.mjs.map +1 -1
  109. package/dist/datasetDetails/distributions/distributionActions/DistributionActions.vue.mjs +6 -5
  110. package/dist/datasetDetails/distributions/distributionActions/DistributionActions.vue.mjs.map +1 -1
  111. package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue.d.ts +2 -2
  112. package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue.mjs +15 -12
  113. package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue.mjs.map +1 -1
  114. package/dist/datasetDetails/distributions/distributionActions/DistributionDownloadAs.vue.mjs.map +1 -1
  115. package/dist/datasetDetails/distributions/distributionActions/DistributionDropdownDownload.vue.d.ts +2 -2
  116. package/dist/datasetDetails/distributions/distributionActions/DistributionDropdownDownload.vue.mjs.map +1 -1
  117. package/dist/datasetDetails/distributions/distributionActions/DistributionOptionsDropdown.vue.d.ts +4 -4
  118. package/dist/datasetDetails/distributions/distributionActions/DistributionOptionsDropdown.vue.mjs +6 -5
  119. package/dist/datasetDetails/distributions/distributionActions/DistributionOptionsDropdown.vue.mjs.map +1 -1
  120. package/dist/datasetDetails/distributions/distributionActions/DistributionPreview.vue.d.ts +4 -4
  121. package/dist/datasetDetails/distributions/distributionActions/DistributionPreview.vue.mjs.map +1 -1
  122. package/dist/datasetDetails/distributions/distributionActions/DistributionVisualizeButton.vue.d.ts +4 -4
  123. package/dist/datasetDetails/distributions/distributionActions/DistributionVisualizeButton.vue.mjs.map +1 -1
  124. package/dist/datasetDetails/distributions/distributionActions/LinkedDataButtonsDropdown.vue.mjs.map +1 -1
  125. package/dist/datasetDetails/distributions/distributionDetails/DistributionContent.vue.mjs +22 -21
  126. package/dist/datasetDetails/distributions/distributionDetails/DistributionContent.vue.mjs.map +1 -1
  127. package/dist/datasetDetails/distributions/distributionDetails/DistributionDescription.vue.d.ts +6 -6
  128. package/dist/datasetDetails/distributions/distributionDetails/DistributionDescription.vue.mjs.map +1 -1
  129. package/dist/datasetDetails/distributions/distributionDetails/DistributionDetails.vue.d.ts +16 -16
  130. package/dist/datasetDetails/distributions/distributionDetails/DistributionDetails.vue.mjs.map +1 -1
  131. package/dist/datasetDetails/distributions/distributionDetails/DistributionExpand.vue.d.ts +2 -2
  132. package/dist/datasetDetails/distributions/distributionDetails/DistributionExpand.vue.mjs.map +1 -1
  133. package/dist/datasetDetails/features/DatasetDetailsCategoriesKey.vue.d.ts +1 -1
  134. package/dist/datasetDetails/features/DatasetDetailsCategoriesKey.vue.mjs.map +1 -1
  135. package/dist/datasetDetails/features/DatasetDetailsDataServices.vue.mjs.map +1 -1
  136. package/dist/datasetDetails/features/DatasetDetailsFeatureHeader.vue.mjs.map +1 -1
  137. package/dist/datasetDetails/features/DatasetDetailsFeatures.vue.d.ts +2 -2
  138. package/dist/datasetDetails/features/DatasetDetailsFeatures.vue.mjs.map +1 -1
  139. package/dist/datasetDetails/features/DatasetDetailsHvdThemes.vue.d.ts +1 -1
  140. package/dist/datasetDetails/features/DatasetDetailsHvdThemes.vue.mjs.map +1 -1
  141. package/dist/datasetDetails/features/DatasetDetailsIsUsedBy.vue.mjs.map +1 -1
  142. package/dist/datasetDetails/features/DatasetDetailsKeywords.vue.d.ts +1 -1
  143. package/dist/datasetDetails/features/DatasetDetailsKeywords.vue.mjs.map +1 -1
  144. package/dist/datasetDetails/features/DatasetDetailsMap.vue.mjs.map +1 -1
  145. package/dist/datasetDetails/features/DatasetDetailsPages.vue.mjs.map +1 -1
  146. package/dist/datasetDetails/features/DatasetDetailsRelations.vue.mjs.map +1 -1
  147. package/dist/datasetDetails/features/DatasetDetailsSubject.vue.d.ts +1 -1
  148. package/dist/datasetDetails/features/DatasetDetailsSubject.vue.mjs.map +1 -1
  149. package/dist/datasetDetails/features/DatasetDetailsVisualisations.vue.mjs.map +1 -1
  150. package/dist/datasetDetails/header/DatasetDetailsHeader.vue.mjs.map +1 -1
  151. package/dist/datasetDetails/header/DatasetDetailsHeaderCatalogue.vue.d.ts +2 -2
  152. package/dist/datasetDetails/header/DatasetDetailsHeaderCatalogue.vue.mjs.map +1 -1
  153. package/dist/datasetDetails/header/DatasetDetailsHeaderTitle.vue.d.ts +2 -2
  154. package/dist/datasetDetails/header/DatasetDetailsHeaderTitle.vue.mjs.map +1 -1
  155. package/dist/datasetDetails/navigation/DatasetDetailsNavigation.vue.mjs.map +1 -1
  156. package/dist/datasetDetails/navigation/DatasetDetailsNavigationLinks.vue.d.ts +2 -2
  157. package/dist/datasetDetails/navigation/DatasetDetailsNavigationLinks.vue.mjs.map +1 -1
  158. package/dist/datasetDetails/navigation/DatasetDetailsNavigationPage.vue.mjs.map +1 -1
  159. package/dist/datasetDetails/navigation/DatasetDetailsNavigationPages.vue.d.ts +7 -1
  160. package/dist/datasetDetails/navigation/DatasetDetailsNavigationPages.vue.mjs.map +1 -1
  161. package/dist/datasetDetails/properties/DatasetDetailsProperties.vue.d.ts +200 -1
  162. package/dist/datasetDetails/properties/DatasetDetailsProperties.vue.mjs.map +1 -1
  163. package/dist/datasetDetails/properties/DatasetDetailsProperty.vue.mjs.map +1 -1
  164. package/dist/datasetDetails/properties/ValuesList.vue.mjs.map +1 -1
  165. package/dist/datasets/DatasetDate.vue.mjs.map +1 -1
  166. package/dist/datasets/DatasetList.vue.mjs.map +1 -1
  167. package/dist/datasets/Datasets.vue.mjs.map +1 -1
  168. package/dist/datasets/DatasetsFilters.vue.d.ts +1 -1
  169. package/dist/datasets/DatasetsFilters.vue.mjs.map +1 -1
  170. package/dist/datasets/DatasetsFiltersTabs.vue.d.ts +2 -2
  171. package/dist/datasets/DatasetsFiltersTabs.vue.mjs.map +1 -1
  172. package/dist/datasets/DatasetsTopControls.vue.d.ts +5 -5
  173. package/dist/datasets/DatasetsTopControls.vue.mjs +8 -6
  174. package/dist/datasets/DatasetsTopControls.vue.mjs.map +1 -1
  175. package/dist/datasets/datasetsFacets/DatasetsFacets.vue.mjs.map +1 -1
  176. package/dist/datasets/datasetsFacets/DatasetsFacetsItem.vue.mjs.map +1 -1
  177. package/dist/datasets/datasetsFacets/DatasetsMapFacet.vue.mjs.map +1 -1
  178. package/dist/embed/DatasetEmbedModal.vue.mjs.map +1 -1
  179. package/dist/embed/EmbedDataset.vue.mjs.map +1 -1
  180. package/dist/embed/EmbedDatasetSnippet.vue.mjs.map +1 -1
  181. package/dist/external/zod/dist/esm/v3/ZodError +84 -0
  182. package/dist/external/zod/dist/esm/v3/ZodError.map +1 -0
  183. package/dist/external/zod/dist/esm/v3/errors +10 -0
  184. package/dist/external/zod/dist/esm/v3/errors.map +1 -0
  185. package/dist/external/zod/dist/esm/v3/helpers/errorUtil +8 -0
  186. package/dist/external/zod/dist/esm/v3/helpers/errorUtil.map +1 -0
  187. package/dist/external/zod/dist/esm/v3/helpers/parseUtil +98 -0
  188. package/dist/external/zod/dist/esm/v3/helpers/parseUtil.map +1 -0
  189. package/dist/external/zod/dist/esm/v3/helpers/util +95 -0
  190. package/dist/external/zod/dist/esm/v3/helpers/util.map +1 -0
  191. package/dist/external/zod/dist/esm/v3/locales/en +62 -0
  192. package/dist/external/zod/dist/esm/v3/locales/en.map +1 -0
  193. package/dist/external/zod/dist/esm/v3/types +2440 -0
  194. package/dist/external/zod/dist/esm/v3/types.map +1 -0
  195. package/dist/facets/CatalogDetailsFacet.vue.mjs.map +1 -1
  196. package/dist/facets/ExpandableSelectFacet.vue.mjs.map +1 -1
  197. package/dist/facets/Facet.vue.mjs.map +1 -1
  198. package/dist/facets/FacetTitle.vue.mjs.map +1 -1
  199. package/dist/facets/RadioFacet.vue.mjs.map +1 -1
  200. package/dist/facets/SelectedFacetsOverview.vue.d.ts +2 -2
  201. package/dist/facets/SelectedFacetsOverview.vue.mjs.map +1 -1
  202. package/dist/form/FormKitGroup.vue.mjs.map +1 -1
  203. package/dist/form/Repeatable.vue2.mjs +2 -1
  204. package/dist/form/Repeatable.vue2.mjs.map +1 -1
  205. package/dist/map/MapBasic.vue.mjs.map +1 -1
  206. package/dist/map/MapBoundsReceiver.vue.mjs.map +1 -1
  207. package/dist/map/MapBoundsSender.vue.mjs.map +1 -1
  208. package/dist/modal/AppConfirmationDialog.vue.mjs.map +1 -1
  209. package/dist/modal/AppSnackbar.vue.mjs.map +1 -1
  210. package/dist/modal/AppToast.vue.mjs.map +1 -1
  211. package/dist/navigation/SubNavigation.vue.mjs.map +1 -1
  212. package/dist/pages/NotFound.vue.mjs.map +1 -1
  213. package/dist/pages/SparqlSearch.vue.mjs.map +1 -1
  214. package/dist/pages/user/UserImprint.vue.mjs.map +1 -1
  215. package/dist/pages/user/UserPrivacyPolicy.vue.mjs.map +1 -1
  216. package/dist/piveau-hub-ui-modules.css +1 -1
  217. package/dist/search/Search.vue.mjs.map +1 -1
  218. package/dist/services/datasetService.d.ts +1 -1
  219. package/dist/widgets/AppLink.vue.mjs.map +1 -1
  220. package/dist/widgets/Dropdown.vue.mjs.map +1 -1
  221. package/dist/widgets/Pagination.vue.d.ts +1 -1
  222. package/dist/widgets/Pagination.vue.mjs.map +1 -1
  223. package/dist/widgets/PropertyValue.vue.mjs.map +1 -1
  224. package/dist/widgets/PvBanner.vue.mjs.map +1 -1
  225. package/dist/widgets/PvButton.vue.mjs.map +1 -1
  226. package/dist/widgets/PvShowMore.vue.mjs.map +1 -1
  227. package/dist/widgets/ResourceAccessPopup.vue.d.ts +1 -1
  228. package/dist/widgets/ResourceAccessPopup.vue.mjs.map +1 -1
  229. package/dist/widgets/ResourceDetailsLinkedDataButton.vue.mjs.map +1 -1
  230. package/dist/widgets/Tooltip.vue.mjs.map +1 -1
  231. package/package.json +1 -1
  232. package/dist/external/zod/lib/index +0 -2849
  233. package/dist/external/zod/lib/index.map +0 -1
@@ -1,2849 +0,0 @@
1
- var g;
2
- (function(r) {
3
- r.assertEqual = (a) => a;
4
- function e(a) {
5
- }
6
- r.assertIs = e;
7
- function t(a) {
8
- throw new Error();
9
- }
10
- r.assertNever = t, r.arrayToEnum = (a) => {
11
- const n = {};
12
- for (const i of a)
13
- n[i] = i;
14
- return n;
15
- }, r.getValidEnumValues = (a) => {
16
- const n = r.objectKeys(a).filter((o) => typeof a[a[o]] != "number"), i = {};
17
- for (const o of n)
18
- i[o] = a[o];
19
- return r.objectValues(i);
20
- }, r.objectValues = (a) => r.objectKeys(a).map(function(n) {
21
- return a[n];
22
- }), r.objectKeys = typeof Object.keys == "function" ? (a) => Object.keys(a) : (a) => {
23
- const n = [];
24
- for (const i in a)
25
- Object.prototype.hasOwnProperty.call(a, i) && n.push(i);
26
- return n;
27
- }, r.find = (a, n) => {
28
- for (const i of a)
29
- if (n(i))
30
- return i;
31
- }, r.isInteger = typeof Number.isInteger == "function" ? (a) => Number.isInteger(a) : (a) => typeof a == "number" && isFinite(a) && Math.floor(a) === a;
32
- function s(a, n = " | ") {
33
- return a.map((i) => typeof i == "string" ? `'${i}'` : i).join(n);
34
- }
35
- r.joinValues = s, r.jsonStringifyReplacer = (a, n) => typeof n == "bigint" ? n.toString() : n;
36
- })(g || (g = {}));
37
- var be;
38
- (function(r) {
39
- r.mergeShapes = (e, t) => ({
40
- ...e,
41
- ...t
42
- // second overwrites first
43
- });
44
- })(be || (be = {}));
45
- const l = g.arrayToEnum([
46
- "string",
47
- "nan",
48
- "number",
49
- "integer",
50
- "float",
51
- "boolean",
52
- "date",
53
- "bigint",
54
- "symbol",
55
- "function",
56
- "undefined",
57
- "null",
58
- "array",
59
- "object",
60
- "unknown",
61
- "promise",
62
- "void",
63
- "never",
64
- "map",
65
- "set"
66
- ]), I = (r) => {
67
- switch (typeof r) {
68
- case "undefined":
69
- return l.undefined;
70
- case "string":
71
- return l.string;
72
- case "number":
73
- return isNaN(r) ? l.nan : l.number;
74
- case "boolean":
75
- return l.boolean;
76
- case "function":
77
- return l.function;
78
- case "bigint":
79
- return l.bigint;
80
- case "symbol":
81
- return l.symbol;
82
- case "object":
83
- return Array.isArray(r) ? l.array : r === null ? l.null : r.then && typeof r.then == "function" && r.catch && typeof r.catch == "function" ? l.promise : typeof Map < "u" && r instanceof Map ? l.map : typeof Set < "u" && r instanceof Set ? l.set : typeof Date < "u" && r instanceof Date ? l.date : l.object;
84
- default:
85
- return l.unknown;
86
- }
87
- }, d = g.arrayToEnum([
88
- "invalid_type",
89
- "invalid_literal",
90
- "custom",
91
- "invalid_union",
92
- "invalid_union_discriminator",
93
- "invalid_enum_value",
94
- "unrecognized_keys",
95
- "invalid_arguments",
96
- "invalid_return_type",
97
- "invalid_date",
98
- "invalid_string",
99
- "too_small",
100
- "too_big",
101
- "invalid_intersection_types",
102
- "not_multiple_of",
103
- "not_finite"
104
- ]);
105
- class T extends Error {
106
- constructor(e) {
107
- super(), this.issues = [], this.addIssue = (s) => {
108
- this.issues = [...this.issues, s];
109
- }, this.addIssues = (s = []) => {
110
- this.issues = [...this.issues, ...s];
111
- };
112
- const t = new.target.prototype;
113
- Object.setPrototypeOf ? Object.setPrototypeOf(this, t) : this.__proto__ = t, this.name = "ZodError", this.issues = e;
114
- }
115
- get errors() {
116
- return this.issues;
117
- }
118
- format(e) {
119
- const t = e || function(n) {
120
- return n.message;
121
- }, s = { _errors: [] }, a = (n) => {
122
- for (const i of n.issues)
123
- if (i.code === "invalid_union")
124
- i.unionErrors.map(a);
125
- else if (i.code === "invalid_return_type")
126
- a(i.returnTypeError);
127
- else if (i.code === "invalid_arguments")
128
- a(i.argumentsError);
129
- else if (i.path.length === 0)
130
- s._errors.push(t(i));
131
- else {
132
- let o = s, h = 0;
133
- for (; h < i.path.length; ) {
134
- const c = i.path[h];
135
- h === i.path.length - 1 ? (o[c] = o[c] || { _errors: [] }, o[c]._errors.push(t(i))) : o[c] = o[c] || { _errors: [] }, o = o[c], h++;
136
- }
137
- }
138
- };
139
- return a(this), s;
140
- }
141
- static assert(e) {
142
- if (!(e instanceof T))
143
- throw new Error(`Not a ZodError: ${e}`);
144
- }
145
- toString() {
146
- return this.message;
147
- }
148
- get message() {
149
- return JSON.stringify(this.issues, g.jsonStringifyReplacer, 2);
150
- }
151
- get isEmpty() {
152
- return this.issues.length === 0;
153
- }
154
- flatten(e = (t) => t.message) {
155
- const t = {}, s = [];
156
- for (const a of this.issues)
157
- a.path.length > 0 ? (t[a.path[0]] = t[a.path[0]] || [], t[a.path[0]].push(e(a))) : s.push(e(a));
158
- return { formErrors: s, fieldErrors: t };
159
- }
160
- get formErrors() {
161
- return this.flatten();
162
- }
163
- }
164
- T.create = (r) => new T(r);
165
- const Y = (r, e) => {
166
- let t;
167
- switch (r.code) {
168
- case d.invalid_type:
169
- r.received === l.undefined ? t = "Required" : t = `Expected ${r.expected}, received ${r.received}`;
170
- break;
171
- case d.invalid_literal:
172
- t = `Invalid literal value, expected ${JSON.stringify(r.expected, g.jsonStringifyReplacer)}`;
173
- break;
174
- case d.unrecognized_keys:
175
- t = `Unrecognized key(s) in object: ${g.joinValues(r.keys, ", ")}`;
176
- break;
177
- case d.invalid_union:
178
- t = "Invalid input";
179
- break;
180
- case d.invalid_union_discriminator:
181
- t = `Invalid discriminator value. Expected ${g.joinValues(r.options)}`;
182
- break;
183
- case d.invalid_enum_value:
184
- t = `Invalid enum value. Expected ${g.joinValues(r.options)}, received '${r.received}'`;
185
- break;
186
- case d.invalid_arguments:
187
- t = "Invalid function arguments";
188
- break;
189
- case d.invalid_return_type:
190
- t = "Invalid function return type";
191
- break;
192
- case d.invalid_date:
193
- t = "Invalid date";
194
- break;
195
- case d.invalid_string:
196
- typeof r.validation == "object" ? "includes" in r.validation ? (t = `Invalid input: must include "${r.validation.includes}"`, typeof r.validation.position == "number" && (t = `${t} at one or more positions greater than or equal to ${r.validation.position}`)) : "startsWith" in r.validation ? t = `Invalid input: must start with "${r.validation.startsWith}"` : "endsWith" in r.validation ? t = `Invalid input: must end with "${r.validation.endsWith}"` : g.assertNever(r.validation) : r.validation !== "regex" ? t = `Invalid ${r.validation}` : t = "Invalid";
197
- break;
198
- case d.too_small:
199
- r.type === "array" ? t = `Array must contain ${r.exact ? "exactly" : r.inclusive ? "at least" : "more than"} ${r.minimum} element(s)` : r.type === "string" ? t = `String must contain ${r.exact ? "exactly" : r.inclusive ? "at least" : "over"} ${r.minimum} character(s)` : r.type === "number" ? t = `Number must be ${r.exact ? "exactly equal to " : r.inclusive ? "greater than or equal to " : "greater than "}${r.minimum}` : r.type === "date" ? t = `Date must be ${r.exact ? "exactly equal to " : r.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(r.minimum))}` : t = "Invalid input";
200
- break;
201
- case d.too_big:
202
- r.type === "array" ? t = `Array must contain ${r.exact ? "exactly" : r.inclusive ? "at most" : "less than"} ${r.maximum} element(s)` : r.type === "string" ? t = `String must contain ${r.exact ? "exactly" : r.inclusive ? "at most" : "under"} ${r.maximum} character(s)` : r.type === "number" ? t = `Number must be ${r.exact ? "exactly" : r.inclusive ? "less than or equal to" : "less than"} ${r.maximum}` : r.type === "bigint" ? t = `BigInt must be ${r.exact ? "exactly" : r.inclusive ? "less than or equal to" : "less than"} ${r.maximum}` : r.type === "date" ? t = `Date must be ${r.exact ? "exactly" : r.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(r.maximum))}` : t = "Invalid input";
203
- break;
204
- case d.custom:
205
- t = "Invalid input";
206
- break;
207
- case d.invalid_intersection_types:
208
- t = "Intersection results could not be merged";
209
- break;
210
- case d.not_multiple_of:
211
- t = `Number must be a multiple of ${r.multipleOf}`;
212
- break;
213
- case d.not_finite:
214
- t = "Number must be finite";
215
- break;
216
- default:
217
- t = e.defaultError, g.assertNever(r);
218
- }
219
- return { message: t };
220
- };
221
- let Re = Y;
222
- function he() {
223
- return Re;
224
- }
225
- const fe = (r) => {
226
- const { data: e, path: t, errorMaps: s, issueData: a } = r, n = [...t, ...a.path || []], i = {
227
- ...a,
228
- path: n
229
- };
230
- if (a.message !== void 0)
231
- return {
232
- ...a,
233
- path: n,
234
- message: a.message
235
- };
236
- let o = "";
237
- const h = s.filter((c) => !!c).slice().reverse();
238
- for (const c of h)
239
- o = c(i, { data: e, defaultError: o }).message;
240
- return {
241
- ...a,
242
- path: n,
243
- message: o
244
- };
245
- };
246
- function u(r, e) {
247
- const t = he(), s = fe({
248
- issueData: e,
249
- data: r.data,
250
- path: r.path,
251
- errorMaps: [
252
- r.common.contextualErrorMap,
253
- r.schemaErrorMap,
254
- t,
255
- t === Y ? void 0 : Y
256
- // then global default map
257
- ].filter((a) => !!a)
258
- });
259
- r.common.issues.push(s);
260
- }
261
- class k {
262
- constructor() {
263
- this.value = "valid";
264
- }
265
- dirty() {
266
- this.value === "valid" && (this.value = "dirty");
267
- }
268
- abort() {
269
- this.value !== "aborted" && (this.value = "aborted");
270
- }
271
- static mergeArray(e, t) {
272
- const s = [];
273
- for (const a of t) {
274
- if (a.status === "aborted")
275
- return v;
276
- a.status === "dirty" && e.dirty(), s.push(a.value);
277
- }
278
- return { status: e.value, value: s };
279
- }
280
- static async mergeObjectAsync(e, t) {
281
- const s = [];
282
- for (const a of t) {
283
- const n = await a.key, i = await a.value;
284
- s.push({
285
- key: n,
286
- value: i
287
- });
288
- }
289
- return k.mergeObjectSync(e, s);
290
- }
291
- static mergeObjectSync(e, t) {
292
- const s = {};
293
- for (const a of t) {
294
- const { key: n, value: i } = a;
295
- if (n.status === "aborted" || i.status === "aborted")
296
- return v;
297
- n.status === "dirty" && e.dirty(), i.status === "dirty" && e.dirty(), n.value !== "__proto__" && (typeof i.value < "u" || a.alwaysSet) && (s[n.value] = i.value);
298
- }
299
- return { status: e.value, value: s };
300
- }
301
- }
302
- const v = Object.freeze({
303
- status: "aborted"
304
- }), U = (r) => ({ status: "dirty", value: r }), b = (r) => ({ status: "valid", value: r }), we = (r) => r.status === "aborted", Te = (r) => r.status === "dirty", H = (r) => r.status === "valid", J = (r) => typeof Promise < "u" && r instanceof Promise;
305
- function X(r, e, t, s) {
306
- if (t === "a" && !s)
307
- throw new TypeError("Private accessor was defined without a getter");
308
- if (typeof e == "function" ? r !== e || !s : !e.has(r))
309
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
310
- return t === "m" ? s : t === "a" ? s.call(r) : s ? s.value : e.get(r);
311
- }
312
- function Ce(r, e, t, s, a) {
313
- if (s === "m")
314
- throw new TypeError("Private method is not writable");
315
- if (s === "a" && !a)
316
- throw new TypeError("Private accessor was defined without a setter");
317
- if (typeof e == "function" ? r !== e || !a : !e.has(r))
318
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
319
- return s === "a" ? a.call(r, t) : a ? a.value = t : e.set(r, t), t;
320
- }
321
- var f;
322
- (function(r) {
323
- r.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, r.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
324
- })(f || (f = {}));
325
- var B, W;
326
- class O {
327
- constructor(e, t, s, a) {
328
- this._cachedPath = [], this.parent = e, this.data = t, this._path = s, this._key = a;
329
- }
330
- get path() {
331
- return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
332
- }
333
- }
334
- const Se = (r, e) => {
335
- if (H(e))
336
- return { success: !0, data: e.value };
337
- if (!r.common.issues.length)
338
- throw new Error("Validation failed but no issues detected.");
339
- return {
340
- success: !1,
341
- get error() {
342
- if (this._error)
343
- return this._error;
344
- const t = new T(r.common.issues);
345
- return this._error = t, this._error;
346
- }
347
- };
348
- };
349
- function _(r) {
350
- if (!r)
351
- return {};
352
- const { errorMap: e, invalid_type_error: t, required_error: s, description: a } = r;
353
- if (e && (t || s))
354
- throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
355
- return e ? { errorMap: e, description: a } : { errorMap: (i, o) => {
356
- var h, c;
357
- const { message: m } = r;
358
- return i.code === "invalid_enum_value" ? { message: m ?? o.defaultError } : typeof o.data > "u" ? { message: (h = m ?? s) !== null && h !== void 0 ? h : o.defaultError } : i.code !== "invalid_type" ? { message: o.defaultError } : { message: (c = m ?? t) !== null && c !== void 0 ? c : o.defaultError };
359
- }, description: a };
360
- }
361
- class y {
362
- constructor(e) {
363
- this.spa = this.safeParseAsync, this._def = e, this.parse = this.parse.bind(this), this.safeParse = this.safeParse.bind(this), this.parseAsync = this.parseAsync.bind(this), this.safeParseAsync = this.safeParseAsync.bind(this), this.spa = this.spa.bind(this), this.refine = this.refine.bind(this), this.refinement = this.refinement.bind(this), this.superRefine = this.superRefine.bind(this), this.optional = this.optional.bind(this), this.nullable = this.nullable.bind(this), this.nullish = this.nullish.bind(this), this.array = this.array.bind(this), this.promise = this.promise.bind(this), this.or = this.or.bind(this), this.and = this.and.bind(this), this.transform = this.transform.bind(this), this.brand = this.brand.bind(this), this.default = this.default.bind(this), this.catch = this.catch.bind(this), this.describe = this.describe.bind(this), this.pipe = this.pipe.bind(this), this.readonly = this.readonly.bind(this), this.isNullable = this.isNullable.bind(this), this.isOptional = this.isOptional.bind(this);
364
- }
365
- get description() {
366
- return this._def.description;
367
- }
368
- _getType(e) {
369
- return I(e.data);
370
- }
371
- _getOrReturnCtx(e, t) {
372
- return t || {
373
- common: e.parent.common,
374
- data: e.data,
375
- parsedType: I(e.data),
376
- schemaErrorMap: this._def.errorMap,
377
- path: e.path,
378
- parent: e.parent
379
- };
380
- }
381
- _processInputParams(e) {
382
- return {
383
- status: new k(),
384
- ctx: {
385
- common: e.parent.common,
386
- data: e.data,
387
- parsedType: I(e.data),
388
- schemaErrorMap: this._def.errorMap,
389
- path: e.path,
390
- parent: e.parent
391
- }
392
- };
393
- }
394
- _parseSync(e) {
395
- const t = this._parse(e);
396
- if (J(t))
397
- throw new Error("Synchronous parse encountered promise.");
398
- return t;
399
- }
400
- _parseAsync(e) {
401
- const t = this._parse(e);
402
- return Promise.resolve(t);
403
- }
404
- parse(e, t) {
405
- const s = this.safeParse(e, t);
406
- if (s.success)
407
- return s.data;
408
- throw s.error;
409
- }
410
- safeParse(e, t) {
411
- var s;
412
- const a = {
413
- common: {
414
- issues: [],
415
- async: (s = t == null ? void 0 : t.async) !== null && s !== void 0 ? s : !1,
416
- contextualErrorMap: t == null ? void 0 : t.errorMap
417
- },
418
- path: (t == null ? void 0 : t.path) || [],
419
- schemaErrorMap: this._def.errorMap,
420
- parent: null,
421
- data: e,
422
- parsedType: I(e)
423
- }, n = this._parseSync({ data: e, path: a.path, parent: a });
424
- return Se(a, n);
425
- }
426
- async parseAsync(e, t) {
427
- const s = await this.safeParseAsync(e, t);
428
- if (s.success)
429
- return s.data;
430
- throw s.error;
431
- }
432
- async safeParseAsync(e, t) {
433
- const s = {
434
- common: {
435
- issues: [],
436
- contextualErrorMap: t == null ? void 0 : t.errorMap,
437
- async: !0
438
- },
439
- path: (t == null ? void 0 : t.path) || [],
440
- schemaErrorMap: this._def.errorMap,
441
- parent: null,
442
- data: e,
443
- parsedType: I(e)
444
- }, a = this._parse({ data: e, path: s.path, parent: s }), n = await (J(a) ? a : Promise.resolve(a));
445
- return Se(s, n);
446
- }
447
- refine(e, t) {
448
- const s = (a) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(a) : t;
449
- return this._refinement((a, n) => {
450
- const i = e(a), o = () => n.addIssue({
451
- code: d.custom,
452
- ...s(a)
453
- });
454
- return typeof Promise < "u" && i instanceof Promise ? i.then((h) => h ? !0 : (o(), !1)) : i ? !0 : (o(), !1);
455
- });
456
- }
457
- refinement(e, t) {
458
- return this._refinement((s, a) => e(s) ? !0 : (a.addIssue(typeof t == "function" ? t(s, a) : t), !1));
459
- }
460
- _refinement(e) {
461
- return new R({
462
- schema: this,
463
- typeName: p.ZodEffects,
464
- effect: { type: "refinement", refinement: e }
465
- });
466
- }
467
- superRefine(e) {
468
- return this._refinement(e);
469
- }
470
- optional() {
471
- return E.create(this, this._def);
472
- }
473
- nullable() {
474
- return P.create(this, this._def);
475
- }
476
- nullish() {
477
- return this.nullable().optional();
478
- }
479
- array() {
480
- return C.create(this, this._def);
481
- }
482
- promise() {
483
- return G.create(this, this._def);
484
- }
485
- or(e) {
486
- return ee.create([this, e], this._def);
487
- }
488
- and(e) {
489
- return te.create(this, e, this._def);
490
- }
491
- transform(e) {
492
- return new R({
493
- ..._(this._def),
494
- schema: this,
495
- typeName: p.ZodEffects,
496
- effect: { type: "transform", transform: e }
497
- });
498
- }
499
- default(e) {
500
- const t = typeof e == "function" ? e : () => e;
501
- return new ie({
502
- ..._(this._def),
503
- innerType: this,
504
- defaultValue: t,
505
- typeName: p.ZodDefault
506
- });
507
- }
508
- brand() {
509
- return new Ze({
510
- typeName: p.ZodBranded,
511
- type: this,
512
- ..._(this._def)
513
- });
514
- }
515
- catch(e) {
516
- const t = typeof e == "function" ? e : () => e;
517
- return new oe({
518
- ..._(this._def),
519
- innerType: this,
520
- catchValue: t,
521
- typeName: p.ZodCatch
522
- });
523
- }
524
- describe(e) {
525
- const t = this.constructor;
526
- return new t({
527
- ...this._def,
528
- description: e
529
- });
530
- }
531
- pipe(e) {
532
- return ce.create(this, e);
533
- }
534
- readonly() {
535
- return de.create(this);
536
- }
537
- isOptional() {
538
- return this.safeParse(void 0).success;
539
- }
540
- isNullable() {
541
- return this.safeParse(null).success;
542
- }
543
- }
544
- const je = /^c[^\s-]{8,}$/i, Ie = /^[0-9a-z]+$/, Ae = /^[0-9A-HJKMNP-TV-Z]{26}$/, $e = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Me = /^[a-z0-9_-]{21}$/i, Pe = /^[-+]?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)?)??$/, Ve = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Le = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
545
- let le;
546
- const De = /^(?:(?: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])$/, ze = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, Ue = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Oe = "((\\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])))", Be = new RegExp(`^${Oe}$`);
547
- function Ne(r) {
548
- let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
549
- return r.precision ? e = `${e}\\.\\d{${r.precision}}` : r.precision == null && (e = `${e}(\\.\\d+)?`), e;
550
- }
551
- function We(r) {
552
- return new RegExp(`^${Ne(r)}$`);
553
- }
554
- function qe(r) {
555
- let e = `${Oe}T${Ne(r)}`;
556
- const t = [];
557
- return t.push(r.local ? "Z?" : "Z"), r.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
558
- }
559
- function Ye(r, e) {
560
- return !!((e === "v4" || !e) && De.test(r) || (e === "v6" || !e) && ze.test(r));
561
- }
562
- class S extends y {
563
- _parse(e) {
564
- if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== l.string) {
565
- const n = this._getOrReturnCtx(e);
566
- return u(n, {
567
- code: d.invalid_type,
568
- expected: l.string,
569
- received: n.parsedType
570
- }), v;
571
- }
572
- const s = new k();
573
- let a;
574
- for (const n of this._def.checks)
575
- if (n.kind === "min")
576
- e.data.length < n.value && (a = this._getOrReturnCtx(e, a), u(a, {
577
- code: d.too_small,
578
- minimum: n.value,
579
- type: "string",
580
- inclusive: !0,
581
- exact: !1,
582
- message: n.message
583
- }), s.dirty());
584
- else if (n.kind === "max")
585
- e.data.length > n.value && (a = this._getOrReturnCtx(e, a), u(a, {
586
- code: d.too_big,
587
- maximum: n.value,
588
- type: "string",
589
- inclusive: !0,
590
- exact: !1,
591
- message: n.message
592
- }), s.dirty());
593
- else if (n.kind === "length") {
594
- const i = e.data.length > n.value, o = e.data.length < n.value;
595
- (i || o) && (a = this._getOrReturnCtx(e, a), i ? u(a, {
596
- code: d.too_big,
597
- maximum: n.value,
598
- type: "string",
599
- inclusive: !0,
600
- exact: !0,
601
- message: n.message
602
- }) : o && u(a, {
603
- code: d.too_small,
604
- minimum: n.value,
605
- type: "string",
606
- inclusive: !0,
607
- exact: !0,
608
- message: n.message
609
- }), s.dirty());
610
- } else if (n.kind === "email")
611
- Ve.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
612
- validation: "email",
613
- code: d.invalid_string,
614
- message: n.message
615
- }), s.dirty());
616
- else if (n.kind === "emoji")
617
- le || (le = new RegExp(Le, "u")), le.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
618
- validation: "emoji",
619
- code: d.invalid_string,
620
- message: n.message
621
- }), s.dirty());
622
- else if (n.kind === "uuid")
623
- $e.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
624
- validation: "uuid",
625
- code: d.invalid_string,
626
- message: n.message
627
- }), s.dirty());
628
- else if (n.kind === "nanoid")
629
- Me.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
630
- validation: "nanoid",
631
- code: d.invalid_string,
632
- message: n.message
633
- }), s.dirty());
634
- else if (n.kind === "cuid")
635
- je.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
636
- validation: "cuid",
637
- code: d.invalid_string,
638
- message: n.message
639
- }), s.dirty());
640
- else if (n.kind === "cuid2")
641
- Ie.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
642
- validation: "cuid2",
643
- code: d.invalid_string,
644
- message: n.message
645
- }), s.dirty());
646
- else if (n.kind === "ulid")
647
- Ae.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
648
- validation: "ulid",
649
- code: d.invalid_string,
650
- message: n.message
651
- }), s.dirty());
652
- else if (n.kind === "url")
653
- try {
654
- new URL(e.data);
655
- } catch {
656
- a = this._getOrReturnCtx(e, a), u(a, {
657
- validation: "url",
658
- code: d.invalid_string,
659
- message: n.message
660
- }), s.dirty();
661
- }
662
- else
663
- n.kind === "regex" ? (n.regex.lastIndex = 0, n.regex.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
664
- validation: "regex",
665
- code: d.invalid_string,
666
- message: n.message
667
- }), s.dirty())) : n.kind === "trim" ? e.data = e.data.trim() : n.kind === "includes" ? e.data.includes(n.value, n.position) || (a = this._getOrReturnCtx(e, a), u(a, {
668
- code: d.invalid_string,
669
- validation: { includes: n.value, position: n.position },
670
- message: n.message
671
- }), s.dirty()) : n.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : n.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : n.kind === "startsWith" ? e.data.startsWith(n.value) || (a = this._getOrReturnCtx(e, a), u(a, {
672
- code: d.invalid_string,
673
- validation: { startsWith: n.value },
674
- message: n.message
675
- }), s.dirty()) : n.kind === "endsWith" ? e.data.endsWith(n.value) || (a = this._getOrReturnCtx(e, a), u(a, {
676
- code: d.invalid_string,
677
- validation: { endsWith: n.value },
678
- message: n.message
679
- }), s.dirty()) : n.kind === "datetime" ? qe(n).test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
680
- code: d.invalid_string,
681
- validation: "datetime",
682
- message: n.message
683
- }), s.dirty()) : n.kind === "date" ? Be.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
684
- code: d.invalid_string,
685
- validation: "date",
686
- message: n.message
687
- }), s.dirty()) : n.kind === "time" ? We(n).test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
688
- code: d.invalid_string,
689
- validation: "time",
690
- message: n.message
691
- }), s.dirty()) : n.kind === "duration" ? Pe.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
692
- validation: "duration",
693
- code: d.invalid_string,
694
- message: n.message
695
- }), s.dirty()) : n.kind === "ip" ? Ye(e.data, n.version) || (a = this._getOrReturnCtx(e, a), u(a, {
696
- validation: "ip",
697
- code: d.invalid_string,
698
- message: n.message
699
- }), s.dirty()) : n.kind === "base64" ? Ue.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
700
- validation: "base64",
701
- code: d.invalid_string,
702
- message: n.message
703
- }), s.dirty()) : g.assertNever(n);
704
- return { status: s.value, value: e.data };
705
- }
706
- _regex(e, t, s) {
707
- return this.refinement((a) => e.test(a), {
708
- validation: t,
709
- code: d.invalid_string,
710
- ...f.errToObj(s)
711
- });
712
- }
713
- _addCheck(e) {
714
- return new S({
715
- ...this._def,
716
- checks: [...this._def.checks, e]
717
- });
718
- }
719
- email(e) {
720
- return this._addCheck({ kind: "email", ...f.errToObj(e) });
721
- }
722
- url(e) {
723
- return this._addCheck({ kind: "url", ...f.errToObj(e) });
724
- }
725
- emoji(e) {
726
- return this._addCheck({ kind: "emoji", ...f.errToObj(e) });
727
- }
728
- uuid(e) {
729
- return this._addCheck({ kind: "uuid", ...f.errToObj(e) });
730
- }
731
- nanoid(e) {
732
- return this._addCheck({ kind: "nanoid", ...f.errToObj(e) });
733
- }
734
- cuid(e) {
735
- return this._addCheck({ kind: "cuid", ...f.errToObj(e) });
736
- }
737
- cuid2(e) {
738
- return this._addCheck({ kind: "cuid2", ...f.errToObj(e) });
739
- }
740
- ulid(e) {
741
- return this._addCheck({ kind: "ulid", ...f.errToObj(e) });
742
- }
743
- base64(e) {
744
- return this._addCheck({ kind: "base64", ...f.errToObj(e) });
745
- }
746
- ip(e) {
747
- return this._addCheck({ kind: "ip", ...f.errToObj(e) });
748
- }
749
- datetime(e) {
750
- var t, s;
751
- return typeof e == "string" ? this._addCheck({
752
- kind: "datetime",
753
- precision: null,
754
- offset: !1,
755
- local: !1,
756
- message: e
757
- }) : this._addCheck({
758
- kind: "datetime",
759
- precision: typeof (e == null ? void 0 : e.precision) > "u" ? null : e == null ? void 0 : e.precision,
760
- offset: (t = e == null ? void 0 : e.offset) !== null && t !== void 0 ? t : !1,
761
- local: (s = e == null ? void 0 : e.local) !== null && s !== void 0 ? s : !1,
762
- ...f.errToObj(e == null ? void 0 : e.message)
763
- });
764
- }
765
- date(e) {
766
- return this._addCheck({ kind: "date", message: e });
767
- }
768
- time(e) {
769
- return typeof e == "string" ? this._addCheck({
770
- kind: "time",
771
- precision: null,
772
- message: e
773
- }) : this._addCheck({
774
- kind: "time",
775
- precision: typeof (e == null ? void 0 : e.precision) > "u" ? null : e == null ? void 0 : e.precision,
776
- ...f.errToObj(e == null ? void 0 : e.message)
777
- });
778
- }
779
- duration(e) {
780
- return this._addCheck({ kind: "duration", ...f.errToObj(e) });
781
- }
782
- regex(e, t) {
783
- return this._addCheck({
784
- kind: "regex",
785
- regex: e,
786
- ...f.errToObj(t)
787
- });
788
- }
789
- includes(e, t) {
790
- return this._addCheck({
791
- kind: "includes",
792
- value: e,
793
- position: t == null ? void 0 : t.position,
794
- ...f.errToObj(t == null ? void 0 : t.message)
795
- });
796
- }
797
- startsWith(e, t) {
798
- return this._addCheck({
799
- kind: "startsWith",
800
- value: e,
801
- ...f.errToObj(t)
802
- });
803
- }
804
- endsWith(e, t) {
805
- return this._addCheck({
806
- kind: "endsWith",
807
- value: e,
808
- ...f.errToObj(t)
809
- });
810
- }
811
- min(e, t) {
812
- return this._addCheck({
813
- kind: "min",
814
- value: e,
815
- ...f.errToObj(t)
816
- });
817
- }
818
- max(e, t) {
819
- return this._addCheck({
820
- kind: "max",
821
- value: e,
822
- ...f.errToObj(t)
823
- });
824
- }
825
- length(e, t) {
826
- return this._addCheck({
827
- kind: "length",
828
- value: e,
829
- ...f.errToObj(t)
830
- });
831
- }
832
- /**
833
- * @deprecated Use z.string().min(1) instead.
834
- * @see {@link ZodString.min}
835
- */
836
- nonempty(e) {
837
- return this.min(1, f.errToObj(e));
838
- }
839
- trim() {
840
- return new S({
841
- ...this._def,
842
- checks: [...this._def.checks, { kind: "trim" }]
843
- });
844
- }
845
- toLowerCase() {
846
- return new S({
847
- ...this._def,
848
- checks: [...this._def.checks, { kind: "toLowerCase" }]
849
- });
850
- }
851
- toUpperCase() {
852
- return new S({
853
- ...this._def,
854
- checks: [...this._def.checks, { kind: "toUpperCase" }]
855
- });
856
- }
857
- get isDatetime() {
858
- return !!this._def.checks.find((e) => e.kind === "datetime");
859
- }
860
- get isDate() {
861
- return !!this._def.checks.find((e) => e.kind === "date");
862
- }
863
- get isTime() {
864
- return !!this._def.checks.find((e) => e.kind === "time");
865
- }
866
- get isDuration() {
867
- return !!this._def.checks.find((e) => e.kind === "duration");
868
- }
869
- get isEmail() {
870
- return !!this._def.checks.find((e) => e.kind === "email");
871
- }
872
- get isURL() {
873
- return !!this._def.checks.find((e) => e.kind === "url");
874
- }
875
- get isEmoji() {
876
- return !!this._def.checks.find((e) => e.kind === "emoji");
877
- }
878
- get isUUID() {
879
- return !!this._def.checks.find((e) => e.kind === "uuid");
880
- }
881
- get isNANOID() {
882
- return !!this._def.checks.find((e) => e.kind === "nanoid");
883
- }
884
- get isCUID() {
885
- return !!this._def.checks.find((e) => e.kind === "cuid");
886
- }
887
- get isCUID2() {
888
- return !!this._def.checks.find((e) => e.kind === "cuid2");
889
- }
890
- get isULID() {
891
- return !!this._def.checks.find((e) => e.kind === "ulid");
892
- }
893
- get isIP() {
894
- return !!this._def.checks.find((e) => e.kind === "ip");
895
- }
896
- get isBase64() {
897
- return !!this._def.checks.find((e) => e.kind === "base64");
898
- }
899
- get minLength() {
900
- let e = null;
901
- for (const t of this._def.checks)
902
- t.kind === "min" && (e === null || t.value > e) && (e = t.value);
903
- return e;
904
- }
905
- get maxLength() {
906
- let e = null;
907
- for (const t of this._def.checks)
908
- t.kind === "max" && (e === null || t.value < e) && (e = t.value);
909
- return e;
910
- }
911
- }
912
- S.create = (r) => {
913
- var e;
914
- return new S({
915
- checks: [],
916
- typeName: p.ZodString,
917
- coerce: (e = r == null ? void 0 : r.coerce) !== null && e !== void 0 ? e : !1,
918
- ..._(r)
919
- });
920
- };
921
- function Ge(r, e) {
922
- const t = (r.toString().split(".")[1] || "").length, s = (e.toString().split(".")[1] || "").length, a = t > s ? t : s, n = parseInt(r.toFixed(a).replace(".", "")), i = parseInt(e.toFixed(a).replace(".", ""));
923
- return n % i / Math.pow(10, a);
924
- }
925
- class A extends y {
926
- constructor() {
927
- super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
928
- }
929
- _parse(e) {
930
- if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== l.number) {
931
- const n = this._getOrReturnCtx(e);
932
- return u(n, {
933
- code: d.invalid_type,
934
- expected: l.number,
935
- received: n.parsedType
936
- }), v;
937
- }
938
- let s;
939
- const a = new k();
940
- for (const n of this._def.checks)
941
- n.kind === "int" ? g.isInteger(e.data) || (s = this._getOrReturnCtx(e, s), u(s, {
942
- code: d.invalid_type,
943
- expected: "integer",
944
- received: "float",
945
- message: n.message
946
- }), a.dirty()) : n.kind === "min" ? (n.inclusive ? e.data < n.value : e.data <= n.value) && (s = this._getOrReturnCtx(e, s), u(s, {
947
- code: d.too_small,
948
- minimum: n.value,
949
- type: "number",
950
- inclusive: n.inclusive,
951
- exact: !1,
952
- message: n.message
953
- }), a.dirty()) : n.kind === "max" ? (n.inclusive ? e.data > n.value : e.data >= n.value) && (s = this._getOrReturnCtx(e, s), u(s, {
954
- code: d.too_big,
955
- maximum: n.value,
956
- type: "number",
957
- inclusive: n.inclusive,
958
- exact: !1,
959
- message: n.message
960
- }), a.dirty()) : n.kind === "multipleOf" ? Ge(e.data, n.value) !== 0 && (s = this._getOrReturnCtx(e, s), u(s, {
961
- code: d.not_multiple_of,
962
- multipleOf: n.value,
963
- message: n.message
964
- }), a.dirty()) : n.kind === "finite" ? Number.isFinite(e.data) || (s = this._getOrReturnCtx(e, s), u(s, {
965
- code: d.not_finite,
966
- message: n.message
967
- }), a.dirty()) : g.assertNever(n);
968
- return { status: a.value, value: e.data };
969
- }
970
- gte(e, t) {
971
- return this.setLimit("min", e, !0, f.toString(t));
972
- }
973
- gt(e, t) {
974
- return this.setLimit("min", e, !1, f.toString(t));
975
- }
976
- lte(e, t) {
977
- return this.setLimit("max", e, !0, f.toString(t));
978
- }
979
- lt(e, t) {
980
- return this.setLimit("max", e, !1, f.toString(t));
981
- }
982
- setLimit(e, t, s, a) {
983
- return new A({
984
- ...this._def,
985
- checks: [
986
- ...this._def.checks,
987
- {
988
- kind: e,
989
- value: t,
990
- inclusive: s,
991
- message: f.toString(a)
992
- }
993
- ]
994
- });
995
- }
996
- _addCheck(e) {
997
- return new A({
998
- ...this._def,
999
- checks: [...this._def.checks, e]
1000
- });
1001
- }
1002
- int(e) {
1003
- return this._addCheck({
1004
- kind: "int",
1005
- message: f.toString(e)
1006
- });
1007
- }
1008
- positive(e) {
1009
- return this._addCheck({
1010
- kind: "min",
1011
- value: 0,
1012
- inclusive: !1,
1013
- message: f.toString(e)
1014
- });
1015
- }
1016
- negative(e) {
1017
- return this._addCheck({
1018
- kind: "max",
1019
- value: 0,
1020
- inclusive: !1,
1021
- message: f.toString(e)
1022
- });
1023
- }
1024
- nonpositive(e) {
1025
- return this._addCheck({
1026
- kind: "max",
1027
- value: 0,
1028
- inclusive: !0,
1029
- message: f.toString(e)
1030
- });
1031
- }
1032
- nonnegative(e) {
1033
- return this._addCheck({
1034
- kind: "min",
1035
- value: 0,
1036
- inclusive: !0,
1037
- message: f.toString(e)
1038
- });
1039
- }
1040
- multipleOf(e, t) {
1041
- return this._addCheck({
1042
- kind: "multipleOf",
1043
- value: e,
1044
- message: f.toString(t)
1045
- });
1046
- }
1047
- finite(e) {
1048
- return this._addCheck({
1049
- kind: "finite",
1050
- message: f.toString(e)
1051
- });
1052
- }
1053
- safe(e) {
1054
- return this._addCheck({
1055
- kind: "min",
1056
- inclusive: !0,
1057
- value: Number.MIN_SAFE_INTEGER,
1058
- message: f.toString(e)
1059
- })._addCheck({
1060
- kind: "max",
1061
- inclusive: !0,
1062
- value: Number.MAX_SAFE_INTEGER,
1063
- message: f.toString(e)
1064
- });
1065
- }
1066
- get minValue() {
1067
- let e = null;
1068
- for (const t of this._def.checks)
1069
- t.kind === "min" && (e === null || t.value > e) && (e = t.value);
1070
- return e;
1071
- }
1072
- get maxValue() {
1073
- let e = null;
1074
- for (const t of this._def.checks)
1075
- t.kind === "max" && (e === null || t.value < e) && (e = t.value);
1076
- return e;
1077
- }
1078
- get isInt() {
1079
- return !!this._def.checks.find((e) => e.kind === "int" || e.kind === "multipleOf" && g.isInteger(e.value));
1080
- }
1081
- get isFinite() {
1082
- let e = null, t = null;
1083
- for (const s of this._def.checks) {
1084
- if (s.kind === "finite" || s.kind === "int" || s.kind === "multipleOf")
1085
- return !0;
1086
- s.kind === "min" ? (t === null || s.value > t) && (t = s.value) : s.kind === "max" && (e === null || s.value < e) && (e = s.value);
1087
- }
1088
- return Number.isFinite(t) && Number.isFinite(e);
1089
- }
1090
- }
1091
- A.create = (r) => new A({
1092
- checks: [],
1093
- typeName: p.ZodNumber,
1094
- coerce: (r == null ? void 0 : r.coerce) || !1,
1095
- ..._(r)
1096
- });
1097
- class $ extends y {
1098
- constructor() {
1099
- super(...arguments), this.min = this.gte, this.max = this.lte;
1100
- }
1101
- _parse(e) {
1102
- if (this._def.coerce && (e.data = BigInt(e.data)), this._getType(e) !== l.bigint) {
1103
- const n = this._getOrReturnCtx(e);
1104
- return u(n, {
1105
- code: d.invalid_type,
1106
- expected: l.bigint,
1107
- received: n.parsedType
1108
- }), v;
1109
- }
1110
- let s;
1111
- const a = new k();
1112
- for (const n of this._def.checks)
1113
- n.kind === "min" ? (n.inclusive ? e.data < n.value : e.data <= n.value) && (s = this._getOrReturnCtx(e, s), u(s, {
1114
- code: d.too_small,
1115
- type: "bigint",
1116
- minimum: n.value,
1117
- inclusive: n.inclusive,
1118
- message: n.message
1119
- }), a.dirty()) : n.kind === "max" ? (n.inclusive ? e.data > n.value : e.data >= n.value) && (s = this._getOrReturnCtx(e, s), u(s, {
1120
- code: d.too_big,
1121
- type: "bigint",
1122
- maximum: n.value,
1123
- inclusive: n.inclusive,
1124
- message: n.message
1125
- }), a.dirty()) : n.kind === "multipleOf" ? e.data % n.value !== BigInt(0) && (s = this._getOrReturnCtx(e, s), u(s, {
1126
- code: d.not_multiple_of,
1127
- multipleOf: n.value,
1128
- message: n.message
1129
- }), a.dirty()) : g.assertNever(n);
1130
- return { status: a.value, value: e.data };
1131
- }
1132
- gte(e, t) {
1133
- return this.setLimit("min", e, !0, f.toString(t));
1134
- }
1135
- gt(e, t) {
1136
- return this.setLimit("min", e, !1, f.toString(t));
1137
- }
1138
- lte(e, t) {
1139
- return this.setLimit("max", e, !0, f.toString(t));
1140
- }
1141
- lt(e, t) {
1142
- return this.setLimit("max", e, !1, f.toString(t));
1143
- }
1144
- setLimit(e, t, s, a) {
1145
- return new $({
1146
- ...this._def,
1147
- checks: [
1148
- ...this._def.checks,
1149
- {
1150
- kind: e,
1151
- value: t,
1152
- inclusive: s,
1153
- message: f.toString(a)
1154
- }
1155
- ]
1156
- });
1157
- }
1158
- _addCheck(e) {
1159
- return new $({
1160
- ...this._def,
1161
- checks: [...this._def.checks, e]
1162
- });
1163
- }
1164
- positive(e) {
1165
- return this._addCheck({
1166
- kind: "min",
1167
- value: BigInt(0),
1168
- inclusive: !1,
1169
- message: f.toString(e)
1170
- });
1171
- }
1172
- negative(e) {
1173
- return this._addCheck({
1174
- kind: "max",
1175
- value: BigInt(0),
1176
- inclusive: !1,
1177
- message: f.toString(e)
1178
- });
1179
- }
1180
- nonpositive(e) {
1181
- return this._addCheck({
1182
- kind: "max",
1183
- value: BigInt(0),
1184
- inclusive: !0,
1185
- message: f.toString(e)
1186
- });
1187
- }
1188
- nonnegative(e) {
1189
- return this._addCheck({
1190
- kind: "min",
1191
- value: BigInt(0),
1192
- inclusive: !0,
1193
- message: f.toString(e)
1194
- });
1195
- }
1196
- multipleOf(e, t) {
1197
- return this._addCheck({
1198
- kind: "multipleOf",
1199
- value: e,
1200
- message: f.toString(t)
1201
- });
1202
- }
1203
- get minValue() {
1204
- let e = null;
1205
- for (const t of this._def.checks)
1206
- t.kind === "min" && (e === null || t.value > e) && (e = t.value);
1207
- return e;
1208
- }
1209
- get maxValue() {
1210
- let e = null;
1211
- for (const t of this._def.checks)
1212
- t.kind === "max" && (e === null || t.value < e) && (e = t.value);
1213
- return e;
1214
- }
1215
- }
1216
- $.create = (r) => {
1217
- var e;
1218
- return new $({
1219
- checks: [],
1220
- typeName: p.ZodBigInt,
1221
- coerce: (e = r == null ? void 0 : r.coerce) !== null && e !== void 0 ? e : !1,
1222
- ..._(r)
1223
- });
1224
- };
1225
- class Q extends y {
1226
- _parse(e) {
1227
- if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== l.boolean) {
1228
- const s = this._getOrReturnCtx(e);
1229
- return u(s, {
1230
- code: d.invalid_type,
1231
- expected: l.boolean,
1232
- received: s.parsedType
1233
- }), v;
1234
- }
1235
- return b(e.data);
1236
- }
1237
- }
1238
- Q.create = (r) => new Q({
1239
- typeName: p.ZodBoolean,
1240
- coerce: (r == null ? void 0 : r.coerce) || !1,
1241
- ..._(r)
1242
- });
1243
- class D extends y {
1244
- _parse(e) {
1245
- if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== l.date) {
1246
- const n = this._getOrReturnCtx(e);
1247
- return u(n, {
1248
- code: d.invalid_type,
1249
- expected: l.date,
1250
- received: n.parsedType
1251
- }), v;
1252
- }
1253
- if (isNaN(e.data.getTime())) {
1254
- const n = this._getOrReturnCtx(e);
1255
- return u(n, {
1256
- code: d.invalid_date
1257
- }), v;
1258
- }
1259
- const s = new k();
1260
- let a;
1261
- for (const n of this._def.checks)
1262
- n.kind === "min" ? e.data.getTime() < n.value && (a = this._getOrReturnCtx(e, a), u(a, {
1263
- code: d.too_small,
1264
- message: n.message,
1265
- inclusive: !0,
1266
- exact: !1,
1267
- minimum: n.value,
1268
- type: "date"
1269
- }), s.dirty()) : n.kind === "max" ? e.data.getTime() > n.value && (a = this._getOrReturnCtx(e, a), u(a, {
1270
- code: d.too_big,
1271
- message: n.message,
1272
- inclusive: !0,
1273
- exact: !1,
1274
- maximum: n.value,
1275
- type: "date"
1276
- }), s.dirty()) : g.assertNever(n);
1277
- return {
1278
- status: s.value,
1279
- value: new Date(e.data.getTime())
1280
- };
1281
- }
1282
- _addCheck(e) {
1283
- return new D({
1284
- ...this._def,
1285
- checks: [...this._def.checks, e]
1286
- });
1287
- }
1288
- min(e, t) {
1289
- return this._addCheck({
1290
- kind: "min",
1291
- value: e.getTime(),
1292
- message: f.toString(t)
1293
- });
1294
- }
1295
- max(e, t) {
1296
- return this._addCheck({
1297
- kind: "max",
1298
- value: e.getTime(),
1299
- message: f.toString(t)
1300
- });
1301
- }
1302
- get minDate() {
1303
- let e = null;
1304
- for (const t of this._def.checks)
1305
- t.kind === "min" && (e === null || t.value > e) && (e = t.value);
1306
- return e != null ? new Date(e) : null;
1307
- }
1308
- get maxDate() {
1309
- let e = null;
1310
- for (const t of this._def.checks)
1311
- t.kind === "max" && (e === null || t.value < e) && (e = t.value);
1312
- return e != null ? new Date(e) : null;
1313
- }
1314
- }
1315
- D.create = (r) => new D({
1316
- checks: [],
1317
- coerce: (r == null ? void 0 : r.coerce) || !1,
1318
- typeName: p.ZodDate,
1319
- ..._(r)
1320
- });
1321
- class pe extends y {
1322
- _parse(e) {
1323
- if (this._getType(e) !== l.symbol) {
1324
- const s = this._getOrReturnCtx(e);
1325
- return u(s, {
1326
- code: d.invalid_type,
1327
- expected: l.symbol,
1328
- received: s.parsedType
1329
- }), v;
1330
- }
1331
- return b(e.data);
1332
- }
1333
- }
1334
- pe.create = (r) => new pe({
1335
- typeName: p.ZodSymbol,
1336
- ..._(r)
1337
- });
1338
- class K extends y {
1339
- _parse(e) {
1340
- if (this._getType(e) !== l.undefined) {
1341
- const s = this._getOrReturnCtx(e);
1342
- return u(s, {
1343
- code: d.invalid_type,
1344
- expected: l.undefined,
1345
- received: s.parsedType
1346
- }), v;
1347
- }
1348
- return b(e.data);
1349
- }
1350
- }
1351
- K.create = (r) => new K({
1352
- typeName: p.ZodUndefined,
1353
- ..._(r)
1354
- });
1355
- class F extends y {
1356
- _parse(e) {
1357
- if (this._getType(e) !== l.null) {
1358
- const s = this._getOrReturnCtx(e);
1359
- return u(s, {
1360
- code: d.invalid_type,
1361
- expected: l.null,
1362
- received: s.parsedType
1363
- }), v;
1364
- }
1365
- return b(e.data);
1366
- }
1367
- }
1368
- F.create = (r) => new F({
1369
- typeName: p.ZodNull,
1370
- ..._(r)
1371
- });
1372
- class me extends y {
1373
- constructor() {
1374
- super(...arguments), this._any = !0;
1375
- }
1376
- _parse(e) {
1377
- return b(e.data);
1378
- }
1379
- }
1380
- me.create = (r) => new me({
1381
- typeName: p.ZodAny,
1382
- ..._(r)
1383
- });
1384
- class L extends y {
1385
- constructor() {
1386
- super(...arguments), this._unknown = !0;
1387
- }
1388
- _parse(e) {
1389
- return b(e.data);
1390
- }
1391
- }
1392
- L.create = (r) => new L({
1393
- typeName: p.ZodUnknown,
1394
- ..._(r)
1395
- });
1396
- class j extends y {
1397
- _parse(e) {
1398
- const t = this._getOrReturnCtx(e);
1399
- return u(t, {
1400
- code: d.invalid_type,
1401
- expected: l.never,
1402
- received: t.parsedType
1403
- }), v;
1404
- }
1405
- }
1406
- j.create = (r) => new j({
1407
- typeName: p.ZodNever,
1408
- ..._(r)
1409
- });
1410
- class ve extends y {
1411
- _parse(e) {
1412
- if (this._getType(e) !== l.undefined) {
1413
- const s = this._getOrReturnCtx(e);
1414
- return u(s, {
1415
- code: d.invalid_type,
1416
- expected: l.void,
1417
- received: s.parsedType
1418
- }), v;
1419
- }
1420
- return b(e.data);
1421
- }
1422
- }
1423
- ve.create = (r) => new ve({
1424
- typeName: p.ZodVoid,
1425
- ..._(r)
1426
- });
1427
- class C extends y {
1428
- _parse(e) {
1429
- const { ctx: t, status: s } = this._processInputParams(e), a = this._def;
1430
- if (t.parsedType !== l.array)
1431
- return u(t, {
1432
- code: d.invalid_type,
1433
- expected: l.array,
1434
- received: t.parsedType
1435
- }), v;
1436
- if (a.exactLength !== null) {
1437
- const i = t.data.length > a.exactLength.value, o = t.data.length < a.exactLength.value;
1438
- (i || o) && (u(t, {
1439
- code: i ? d.too_big : d.too_small,
1440
- minimum: o ? a.exactLength.value : void 0,
1441
- maximum: i ? a.exactLength.value : void 0,
1442
- type: "array",
1443
- inclusive: !0,
1444
- exact: !0,
1445
- message: a.exactLength.message
1446
- }), s.dirty());
1447
- }
1448
- if (a.minLength !== null && t.data.length < a.minLength.value && (u(t, {
1449
- code: d.too_small,
1450
- minimum: a.minLength.value,
1451
- type: "array",
1452
- inclusive: !0,
1453
- exact: !1,
1454
- message: a.minLength.message
1455
- }), s.dirty()), a.maxLength !== null && t.data.length > a.maxLength.value && (u(t, {
1456
- code: d.too_big,
1457
- maximum: a.maxLength.value,
1458
- type: "array",
1459
- inclusive: !0,
1460
- exact: !1,
1461
- message: a.maxLength.message
1462
- }), s.dirty()), t.common.async)
1463
- return Promise.all([...t.data].map((i, o) => a.type._parseAsync(new O(t, i, t.path, o)))).then((i) => k.mergeArray(s, i));
1464
- const n = [...t.data].map((i, o) => a.type._parseSync(new O(t, i, t.path, o)));
1465
- return k.mergeArray(s, n);
1466
- }
1467
- get element() {
1468
- return this._def.type;
1469
- }
1470
- min(e, t) {
1471
- return new C({
1472
- ...this._def,
1473
- minLength: { value: e, message: f.toString(t) }
1474
- });
1475
- }
1476
- max(e, t) {
1477
- return new C({
1478
- ...this._def,
1479
- maxLength: { value: e, message: f.toString(t) }
1480
- });
1481
- }
1482
- length(e, t) {
1483
- return new C({
1484
- ...this._def,
1485
- exactLength: { value: e, message: f.toString(t) }
1486
- });
1487
- }
1488
- nonempty(e) {
1489
- return this.min(1, e);
1490
- }
1491
- }
1492
- C.create = (r, e) => new C({
1493
- type: r,
1494
- minLength: null,
1495
- maxLength: null,
1496
- exactLength: null,
1497
- typeName: p.ZodArray,
1498
- ..._(e)
1499
- });
1500
- function V(r) {
1501
- if (r instanceof x) {
1502
- const e = {};
1503
- for (const t in r.shape) {
1504
- const s = r.shape[t];
1505
- e[t] = E.create(V(s));
1506
- }
1507
- return new x({
1508
- ...r._def,
1509
- shape: () => e
1510
- });
1511
- } else
1512
- return r instanceof C ? new C({
1513
- ...r._def,
1514
- type: V(r.element)
1515
- }) : r instanceof E ? E.create(V(r.unwrap())) : r instanceof P ? P.create(V(r.unwrap())) : r instanceof Z ? Z.create(r.items.map((e) => V(e))) : r;
1516
- }
1517
- class x extends y {
1518
- constructor() {
1519
- super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
1520
- }
1521
- _getCached() {
1522
- if (this._cached !== null)
1523
- return this._cached;
1524
- const e = this._def.shape(), t = g.objectKeys(e);
1525
- return this._cached = { shape: e, keys: t };
1526
- }
1527
- _parse(e) {
1528
- if (this._getType(e) !== l.object) {
1529
- const c = this._getOrReturnCtx(e);
1530
- return u(c, {
1531
- code: d.invalid_type,
1532
- expected: l.object,
1533
- received: c.parsedType
1534
- }), v;
1535
- }
1536
- const { status: s, ctx: a } = this._processInputParams(e), { shape: n, keys: i } = this._getCached(), o = [];
1537
- if (!(this._def.catchall instanceof j && this._def.unknownKeys === "strip"))
1538
- for (const c in a.data)
1539
- i.includes(c) || o.push(c);
1540
- const h = [];
1541
- for (const c of i) {
1542
- const m = n[c], w = a.data[c];
1543
- h.push({
1544
- key: { status: "valid", value: c },
1545
- value: m._parse(new O(a, w, a.path, c)),
1546
- alwaysSet: c in a.data
1547
- });
1548
- }
1549
- if (this._def.catchall instanceof j) {
1550
- const c = this._def.unknownKeys;
1551
- if (c === "passthrough")
1552
- for (const m of o)
1553
- h.push({
1554
- key: { status: "valid", value: m },
1555
- value: { status: "valid", value: a.data[m] }
1556
- });
1557
- else if (c === "strict")
1558
- o.length > 0 && (u(a, {
1559
- code: d.unrecognized_keys,
1560
- keys: o
1561
- }), s.dirty());
1562
- else if (c !== "strip")
1563
- throw new Error("Internal ZodObject error: invalid unknownKeys value.");
1564
- } else {
1565
- const c = this._def.catchall;
1566
- for (const m of o) {
1567
- const w = a.data[m];
1568
- h.push({
1569
- key: { status: "valid", value: m },
1570
- value: c._parse(
1571
- new O(a, w, a.path, m)
1572
- //, ctx.child(key), value, getParsedType(value)
1573
- ),
1574
- alwaysSet: m in a.data
1575
- });
1576
- }
1577
- }
1578
- return a.common.async ? Promise.resolve().then(async () => {
1579
- const c = [];
1580
- for (const m of h) {
1581
- const w = await m.key, ke = await m.value;
1582
- c.push({
1583
- key: w,
1584
- value: ke,
1585
- alwaysSet: m.alwaysSet
1586
- });
1587
- }
1588
- return c;
1589
- }).then((c) => k.mergeObjectSync(s, c)) : k.mergeObjectSync(s, h);
1590
- }
1591
- get shape() {
1592
- return this._def.shape();
1593
- }
1594
- strict(e) {
1595
- return f.errToObj, new x({
1596
- ...this._def,
1597
- unknownKeys: "strict",
1598
- ...e !== void 0 ? {
1599
- errorMap: (t, s) => {
1600
- var a, n, i, o;
1601
- const h = (i = (n = (a = this._def).errorMap) === null || n === void 0 ? void 0 : n.call(a, t, s).message) !== null && i !== void 0 ? i : s.defaultError;
1602
- return t.code === "unrecognized_keys" ? {
1603
- message: (o = f.errToObj(e).message) !== null && o !== void 0 ? o : h
1604
- } : {
1605
- message: h
1606
- };
1607
- }
1608
- } : {}
1609
- });
1610
- }
1611
- strip() {
1612
- return new x({
1613
- ...this._def,
1614
- unknownKeys: "strip"
1615
- });
1616
- }
1617
- passthrough() {
1618
- return new x({
1619
- ...this._def,
1620
- unknownKeys: "passthrough"
1621
- });
1622
- }
1623
- // const AugmentFactory =
1624
- // <Def extends ZodObjectDef>(def: Def) =>
1625
- // <Augmentation extends ZodRawShape>(
1626
- // augmentation: Augmentation
1627
- // ): ZodObject<
1628
- // extendShape<ReturnType<Def["shape"]>, Augmentation>,
1629
- // Def["unknownKeys"],
1630
- // Def["catchall"]
1631
- // > => {
1632
- // return new ZodObject({
1633
- // ...def,
1634
- // shape: () => ({
1635
- // ...def.shape(),
1636
- // ...augmentation,
1637
- // }),
1638
- // }) as any;
1639
- // };
1640
- extend(e) {
1641
- return new x({
1642
- ...this._def,
1643
- shape: () => ({
1644
- ...this._def.shape(),
1645
- ...e
1646
- })
1647
- });
1648
- }
1649
- /**
1650
- * Prior to zod@1.0.12 there was a bug in the
1651
- * inferred type of merged objects. Please
1652
- * upgrade if you are experiencing issues.
1653
- */
1654
- merge(e) {
1655
- return new x({
1656
- unknownKeys: e._def.unknownKeys,
1657
- catchall: e._def.catchall,
1658
- shape: () => ({
1659
- ...this._def.shape(),
1660
- ...e._def.shape()
1661
- }),
1662
- typeName: p.ZodObject
1663
- });
1664
- }
1665
- // merge<
1666
- // Incoming extends AnyZodObject,
1667
- // Augmentation extends Incoming["shape"],
1668
- // NewOutput extends {
1669
- // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation
1670
- // ? Augmentation[k]["_output"]
1671
- // : k extends keyof Output
1672
- // ? Output[k]
1673
- // : never;
1674
- // },
1675
- // NewInput extends {
1676
- // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation
1677
- // ? Augmentation[k]["_input"]
1678
- // : k extends keyof Input
1679
- // ? Input[k]
1680
- // : never;
1681
- // }
1682
- // >(
1683
- // merging: Incoming
1684
- // ): ZodObject<
1685
- // extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
1686
- // Incoming["_def"]["unknownKeys"],
1687
- // Incoming["_def"]["catchall"],
1688
- // NewOutput,
1689
- // NewInput
1690
- // > {
1691
- // const merged: any = new ZodObject({
1692
- // unknownKeys: merging._def.unknownKeys,
1693
- // catchall: merging._def.catchall,
1694
- // shape: () =>
1695
- // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
1696
- // typeName: ZodFirstPartyTypeKind.ZodObject,
1697
- // }) as any;
1698
- // return merged;
1699
- // }
1700
- setKey(e, t) {
1701
- return this.augment({ [e]: t });
1702
- }
1703
- // merge<Incoming extends AnyZodObject>(
1704
- // merging: Incoming
1705
- // ): //ZodObject<T & Incoming["_shape"], UnknownKeys, Catchall> = (merging) => {
1706
- // ZodObject<
1707
- // extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
1708
- // Incoming["_def"]["unknownKeys"],
1709
- // Incoming["_def"]["catchall"]
1710
- // > {
1711
- // // const mergedShape = objectUtil.mergeShapes(
1712
- // // this._def.shape(),
1713
- // // merging._def.shape()
1714
- // // );
1715
- // const merged: any = new ZodObject({
1716
- // unknownKeys: merging._def.unknownKeys,
1717
- // catchall: merging._def.catchall,
1718
- // shape: () =>
1719
- // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
1720
- // typeName: ZodFirstPartyTypeKind.ZodObject,
1721
- // }) as any;
1722
- // return merged;
1723
- // }
1724
- catchall(e) {
1725
- return new x({
1726
- ...this._def,
1727
- catchall: e
1728
- });
1729
- }
1730
- pick(e) {
1731
- const t = {};
1732
- return g.objectKeys(e).forEach((s) => {
1733
- e[s] && this.shape[s] && (t[s] = this.shape[s]);
1734
- }), new x({
1735
- ...this._def,
1736
- shape: () => t
1737
- });
1738
- }
1739
- omit(e) {
1740
- const t = {};
1741
- return g.objectKeys(this.shape).forEach((s) => {
1742
- e[s] || (t[s] = this.shape[s]);
1743
- }), new x({
1744
- ...this._def,
1745
- shape: () => t
1746
- });
1747
- }
1748
- /**
1749
- * @deprecated
1750
- */
1751
- deepPartial() {
1752
- return V(this);
1753
- }
1754
- partial(e) {
1755
- const t = {};
1756
- return g.objectKeys(this.shape).forEach((s) => {
1757
- const a = this.shape[s];
1758
- e && !e[s] ? t[s] = a : t[s] = a.optional();
1759
- }), new x({
1760
- ...this._def,
1761
- shape: () => t
1762
- });
1763
- }
1764
- required(e) {
1765
- const t = {};
1766
- return g.objectKeys(this.shape).forEach((s) => {
1767
- if (e && !e[s])
1768
- t[s] = this.shape[s];
1769
- else {
1770
- let n = this.shape[s];
1771
- for (; n instanceof E; )
1772
- n = n._def.innerType;
1773
- t[s] = n;
1774
- }
1775
- }), new x({
1776
- ...this._def,
1777
- shape: () => t
1778
- });
1779
- }
1780
- keyof() {
1781
- return Ee(g.objectKeys(this.shape));
1782
- }
1783
- }
1784
- x.create = (r, e) => new x({
1785
- shape: () => r,
1786
- unknownKeys: "strip",
1787
- catchall: j.create(),
1788
- typeName: p.ZodObject,
1789
- ..._(e)
1790
- });
1791
- x.strictCreate = (r, e) => new x({
1792
- shape: () => r,
1793
- unknownKeys: "strict",
1794
- catchall: j.create(),
1795
- typeName: p.ZodObject,
1796
- ..._(e)
1797
- });
1798
- x.lazycreate = (r, e) => new x({
1799
- shape: r,
1800
- unknownKeys: "strip",
1801
- catchall: j.create(),
1802
- typeName: p.ZodObject,
1803
- ..._(e)
1804
- });
1805
- class ee extends y {
1806
- _parse(e) {
1807
- const { ctx: t } = this._processInputParams(e), s = this._def.options;
1808
- function a(n) {
1809
- for (const o of n)
1810
- if (o.result.status === "valid")
1811
- return o.result;
1812
- for (const o of n)
1813
- if (o.result.status === "dirty")
1814
- return t.common.issues.push(...o.ctx.common.issues), o.result;
1815
- const i = n.map((o) => new T(o.ctx.common.issues));
1816
- return u(t, {
1817
- code: d.invalid_union,
1818
- unionErrors: i
1819
- }), v;
1820
- }
1821
- if (t.common.async)
1822
- return Promise.all(s.map(async (n) => {
1823
- const i = {
1824
- ...t,
1825
- common: {
1826
- ...t.common,
1827
- issues: []
1828
- },
1829
- parent: null
1830
- };
1831
- return {
1832
- result: await n._parseAsync({
1833
- data: t.data,
1834
- path: t.path,
1835
- parent: i
1836
- }),
1837
- ctx: i
1838
- };
1839
- })).then(a);
1840
- {
1841
- let n;
1842
- const i = [];
1843
- for (const h of s) {
1844
- const c = {
1845
- ...t,
1846
- common: {
1847
- ...t.common,
1848
- issues: []
1849
- },
1850
- parent: null
1851
- }, m = h._parseSync({
1852
- data: t.data,
1853
- path: t.path,
1854
- parent: c
1855
- });
1856
- if (m.status === "valid")
1857
- return m;
1858
- m.status === "dirty" && !n && (n = { result: m, ctx: c }), c.common.issues.length && i.push(c.common.issues);
1859
- }
1860
- if (n)
1861
- return t.common.issues.push(...n.ctx.common.issues), n.result;
1862
- const o = i.map((h) => new T(h));
1863
- return u(t, {
1864
- code: d.invalid_union,
1865
- unionErrors: o
1866
- }), v;
1867
- }
1868
- }
1869
- get options() {
1870
- return this._def.options;
1871
- }
1872
- }
1873
- ee.create = (r, e) => new ee({
1874
- options: r,
1875
- typeName: p.ZodUnion,
1876
- ..._(e)
1877
- });
1878
- const N = (r) => r instanceof se ? N(r.schema) : r instanceof R ? N(r.innerType()) : r instanceof ae ? [r.value] : r instanceof M ? r.options : r instanceof ne ? g.objectValues(r.enum) : r instanceof ie ? N(r._def.innerType) : r instanceof K ? [void 0] : r instanceof F ? [null] : r instanceof E ? [void 0, ...N(r.unwrap())] : r instanceof P ? [null, ...N(r.unwrap())] : r instanceof Ze || r instanceof de ? N(r.unwrap()) : r instanceof oe ? N(r._def.innerType) : [];
1879
- class xe extends y {
1880
- _parse(e) {
1881
- const { ctx: t } = this._processInputParams(e);
1882
- if (t.parsedType !== l.object)
1883
- return u(t, {
1884
- code: d.invalid_type,
1885
- expected: l.object,
1886
- received: t.parsedType
1887
- }), v;
1888
- const s = this.discriminator, a = t.data[s], n = this.optionsMap.get(a);
1889
- return n ? t.common.async ? n._parseAsync({
1890
- data: t.data,
1891
- path: t.path,
1892
- parent: t
1893
- }) : n._parseSync({
1894
- data: t.data,
1895
- path: t.path,
1896
- parent: t
1897
- }) : (u(t, {
1898
- code: d.invalid_union_discriminator,
1899
- options: Array.from(this.optionsMap.keys()),
1900
- path: [s]
1901
- }), v);
1902
- }
1903
- get discriminator() {
1904
- return this._def.discriminator;
1905
- }
1906
- get options() {
1907
- return this._def.options;
1908
- }
1909
- get optionsMap() {
1910
- return this._def.optionsMap;
1911
- }
1912
- /**
1913
- * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.
1914
- * However, it only allows a union of objects, all of which need to share a discriminator property. This property must
1915
- * have a different value for each object in the union.
1916
- * @param discriminator the name of the discriminator property
1917
- * @param types an array of object schemas
1918
- * @param params
1919
- */
1920
- static create(e, t, s) {
1921
- const a = /* @__PURE__ */ new Map();
1922
- for (const n of t) {
1923
- const i = N(n.shape[e]);
1924
- if (!i.length)
1925
- throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
1926
- for (const o of i) {
1927
- if (a.has(o))
1928
- throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);
1929
- a.set(o, n);
1930
- }
1931
- }
1932
- return new xe({
1933
- typeName: p.ZodDiscriminatedUnion,
1934
- discriminator: e,
1935
- options: t,
1936
- optionsMap: a,
1937
- ..._(s)
1938
- });
1939
- }
1940
- }
1941
- function _e(r, e) {
1942
- const t = I(r), s = I(e);
1943
- if (r === e)
1944
- return { valid: !0, data: r };
1945
- if (t === l.object && s === l.object) {
1946
- const a = g.objectKeys(e), n = g.objectKeys(r).filter((o) => a.indexOf(o) !== -1), i = { ...r, ...e };
1947
- for (const o of n) {
1948
- const h = _e(r[o], e[o]);
1949
- if (!h.valid)
1950
- return { valid: !1 };
1951
- i[o] = h.data;
1952
- }
1953
- return { valid: !0, data: i };
1954
- } else if (t === l.array && s === l.array) {
1955
- if (r.length !== e.length)
1956
- return { valid: !1 };
1957
- const a = [];
1958
- for (let n = 0; n < r.length; n++) {
1959
- const i = r[n], o = e[n], h = _e(i, o);
1960
- if (!h.valid)
1961
- return { valid: !1 };
1962
- a.push(h.data);
1963
- }
1964
- return { valid: !0, data: a };
1965
- } else
1966
- return t === l.date && s === l.date && +r == +e ? { valid: !0, data: r } : { valid: !1 };
1967
- }
1968
- class te extends y {
1969
- _parse(e) {
1970
- const { status: t, ctx: s } = this._processInputParams(e), a = (n, i) => {
1971
- if (we(n) || we(i))
1972
- return v;
1973
- const o = _e(n.value, i.value);
1974
- return o.valid ? ((Te(n) || Te(i)) && t.dirty(), { status: t.value, value: o.data }) : (u(s, {
1975
- code: d.invalid_intersection_types
1976
- }), v);
1977
- };
1978
- return s.common.async ? Promise.all([
1979
- this._def.left._parseAsync({
1980
- data: s.data,
1981
- path: s.path,
1982
- parent: s
1983
- }),
1984
- this._def.right._parseAsync({
1985
- data: s.data,
1986
- path: s.path,
1987
- parent: s
1988
- })
1989
- ]).then(([n, i]) => a(n, i)) : a(this._def.left._parseSync({
1990
- data: s.data,
1991
- path: s.path,
1992
- parent: s
1993
- }), this._def.right._parseSync({
1994
- data: s.data,
1995
- path: s.path,
1996
- parent: s
1997
- }));
1998
- }
1999
- }
2000
- te.create = (r, e, t) => new te({
2001
- left: r,
2002
- right: e,
2003
- typeName: p.ZodIntersection,
2004
- ..._(t)
2005
- });
2006
- class Z extends y {
2007
- _parse(e) {
2008
- const { status: t, ctx: s } = this._processInputParams(e);
2009
- if (s.parsedType !== l.array)
2010
- return u(s, {
2011
- code: d.invalid_type,
2012
- expected: l.array,
2013
- received: s.parsedType
2014
- }), v;
2015
- if (s.data.length < this._def.items.length)
2016
- return u(s, {
2017
- code: d.too_small,
2018
- minimum: this._def.items.length,
2019
- inclusive: !0,
2020
- exact: !1,
2021
- type: "array"
2022
- }), v;
2023
- !this._def.rest && s.data.length > this._def.items.length && (u(s, {
2024
- code: d.too_big,
2025
- maximum: this._def.items.length,
2026
- inclusive: !0,
2027
- exact: !1,
2028
- type: "array"
2029
- }), t.dirty());
2030
- const n = [...s.data].map((i, o) => {
2031
- const h = this._def.items[o] || this._def.rest;
2032
- return h ? h._parse(new O(s, i, s.path, o)) : null;
2033
- }).filter((i) => !!i);
2034
- return s.common.async ? Promise.all(n).then((i) => k.mergeArray(t, i)) : k.mergeArray(t, n);
2035
- }
2036
- get items() {
2037
- return this._def.items;
2038
- }
2039
- rest(e) {
2040
- return new Z({
2041
- ...this._def,
2042
- rest: e
2043
- });
2044
- }
2045
- }
2046
- Z.create = (r, e) => {
2047
- if (!Array.isArray(r))
2048
- throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
2049
- return new Z({
2050
- items: r,
2051
- typeName: p.ZodTuple,
2052
- rest: null,
2053
- ..._(e)
2054
- });
2055
- };
2056
- class re extends y {
2057
- get keySchema() {
2058
- return this._def.keyType;
2059
- }
2060
- get valueSchema() {
2061
- return this._def.valueType;
2062
- }
2063
- _parse(e) {
2064
- const { status: t, ctx: s } = this._processInputParams(e);
2065
- if (s.parsedType !== l.object)
2066
- return u(s, {
2067
- code: d.invalid_type,
2068
- expected: l.object,
2069
- received: s.parsedType
2070
- }), v;
2071
- const a = [], n = this._def.keyType, i = this._def.valueType;
2072
- for (const o in s.data)
2073
- a.push({
2074
- key: n._parse(new O(s, o, s.path, o)),
2075
- value: i._parse(new O(s, s.data[o], s.path, o)),
2076
- alwaysSet: o in s.data
2077
- });
2078
- return s.common.async ? k.mergeObjectAsync(t, a) : k.mergeObjectSync(t, a);
2079
- }
2080
- get element() {
2081
- return this._def.valueType;
2082
- }
2083
- static create(e, t, s) {
2084
- return t instanceof y ? new re({
2085
- keyType: e,
2086
- valueType: t,
2087
- typeName: p.ZodRecord,
2088
- ..._(s)
2089
- }) : new re({
2090
- keyType: S.create(),
2091
- valueType: e,
2092
- typeName: p.ZodRecord,
2093
- ..._(t)
2094
- });
2095
- }
2096
- }
2097
- class ye extends y {
2098
- get keySchema() {
2099
- return this._def.keyType;
2100
- }
2101
- get valueSchema() {
2102
- return this._def.valueType;
2103
- }
2104
- _parse(e) {
2105
- const { status: t, ctx: s } = this._processInputParams(e);
2106
- if (s.parsedType !== l.map)
2107
- return u(s, {
2108
- code: d.invalid_type,
2109
- expected: l.map,
2110
- received: s.parsedType
2111
- }), v;
2112
- const a = this._def.keyType, n = this._def.valueType, i = [...s.data.entries()].map(([o, h], c) => ({
2113
- key: a._parse(new O(s, o, s.path, [c, "key"])),
2114
- value: n._parse(new O(s, h, s.path, [c, "value"]))
2115
- }));
2116
- if (s.common.async) {
2117
- const o = /* @__PURE__ */ new Map();
2118
- return Promise.resolve().then(async () => {
2119
- for (const h of i) {
2120
- const c = await h.key, m = await h.value;
2121
- if (c.status === "aborted" || m.status === "aborted")
2122
- return v;
2123
- (c.status === "dirty" || m.status === "dirty") && t.dirty(), o.set(c.value, m.value);
2124
- }
2125
- return { status: t.value, value: o };
2126
- });
2127
- } else {
2128
- const o = /* @__PURE__ */ new Map();
2129
- for (const h of i) {
2130
- const c = h.key, m = h.value;
2131
- if (c.status === "aborted" || m.status === "aborted")
2132
- return v;
2133
- (c.status === "dirty" || m.status === "dirty") && t.dirty(), o.set(c.value, m.value);
2134
- }
2135
- return { status: t.value, value: o };
2136
- }
2137
- }
2138
- }
2139
- ye.create = (r, e, t) => new ye({
2140
- valueType: e,
2141
- keyType: r,
2142
- typeName: p.ZodMap,
2143
- ..._(t)
2144
- });
2145
- class z extends y {
2146
- _parse(e) {
2147
- const { status: t, ctx: s } = this._processInputParams(e);
2148
- if (s.parsedType !== l.set)
2149
- return u(s, {
2150
- code: d.invalid_type,
2151
- expected: l.set,
2152
- received: s.parsedType
2153
- }), v;
2154
- const a = this._def;
2155
- a.minSize !== null && s.data.size < a.minSize.value && (u(s, {
2156
- code: d.too_small,
2157
- minimum: a.minSize.value,
2158
- type: "set",
2159
- inclusive: !0,
2160
- exact: !1,
2161
- message: a.minSize.message
2162
- }), t.dirty()), a.maxSize !== null && s.data.size > a.maxSize.value && (u(s, {
2163
- code: d.too_big,
2164
- maximum: a.maxSize.value,
2165
- type: "set",
2166
- inclusive: !0,
2167
- exact: !1,
2168
- message: a.maxSize.message
2169
- }), t.dirty());
2170
- const n = this._def.valueType;
2171
- function i(h) {
2172
- const c = /* @__PURE__ */ new Set();
2173
- for (const m of h) {
2174
- if (m.status === "aborted")
2175
- return v;
2176
- m.status === "dirty" && t.dirty(), c.add(m.value);
2177
- }
2178
- return { status: t.value, value: c };
2179
- }
2180
- const o = [...s.data.values()].map((h, c) => n._parse(new O(s, h, s.path, c)));
2181
- return s.common.async ? Promise.all(o).then((h) => i(h)) : i(o);
2182
- }
2183
- min(e, t) {
2184
- return new z({
2185
- ...this._def,
2186
- minSize: { value: e, message: f.toString(t) }
2187
- });
2188
- }
2189
- max(e, t) {
2190
- return new z({
2191
- ...this._def,
2192
- maxSize: { value: e, message: f.toString(t) }
2193
- });
2194
- }
2195
- size(e, t) {
2196
- return this.min(e, t).max(e, t);
2197
- }
2198
- nonempty(e) {
2199
- return this.min(1, e);
2200
- }
2201
- }
2202
- z.create = (r, e) => new z({
2203
- valueType: r,
2204
- minSize: null,
2205
- maxSize: null,
2206
- typeName: p.ZodSet,
2207
- ..._(e)
2208
- });
2209
- class q extends y {
2210
- constructor() {
2211
- super(...arguments), this.validate = this.implement;
2212
- }
2213
- _parse(e) {
2214
- const { ctx: t } = this._processInputParams(e);
2215
- if (t.parsedType !== l.function)
2216
- return u(t, {
2217
- code: d.invalid_type,
2218
- expected: l.function,
2219
- received: t.parsedType
2220
- }), v;
2221
- function s(o, h) {
2222
- return fe({
2223
- data: o,
2224
- path: t.path,
2225
- errorMaps: [
2226
- t.common.contextualErrorMap,
2227
- t.schemaErrorMap,
2228
- he(),
2229
- Y
2230
- ].filter((c) => !!c),
2231
- issueData: {
2232
- code: d.invalid_arguments,
2233
- argumentsError: h
2234
- }
2235
- });
2236
- }
2237
- function a(o, h) {
2238
- return fe({
2239
- data: o,
2240
- path: t.path,
2241
- errorMaps: [
2242
- t.common.contextualErrorMap,
2243
- t.schemaErrorMap,
2244
- he(),
2245
- Y
2246
- ].filter((c) => !!c),
2247
- issueData: {
2248
- code: d.invalid_return_type,
2249
- returnTypeError: h
2250
- }
2251
- });
2252
- }
2253
- const n = { errorMap: t.common.contextualErrorMap }, i = t.data;
2254
- if (this._def.returns instanceof G) {
2255
- const o = this;
2256
- return b(async function(...h) {
2257
- const c = new T([]), m = await o._def.args.parseAsync(h, n).catch((ue) => {
2258
- throw c.addIssue(s(h, ue)), c;
2259
- }), w = await Reflect.apply(i, this, m);
2260
- return await o._def.returns._def.type.parseAsync(w, n).catch((ue) => {
2261
- throw c.addIssue(a(w, ue)), c;
2262
- });
2263
- });
2264
- } else {
2265
- const o = this;
2266
- return b(function(...h) {
2267
- const c = o._def.args.safeParse(h, n);
2268
- if (!c.success)
2269
- throw new T([s(h, c.error)]);
2270
- const m = Reflect.apply(i, this, c.data), w = o._def.returns.safeParse(m, n);
2271
- if (!w.success)
2272
- throw new T([a(m, w.error)]);
2273
- return w.data;
2274
- });
2275
- }
2276
- }
2277
- parameters() {
2278
- return this._def.args;
2279
- }
2280
- returnType() {
2281
- return this._def.returns;
2282
- }
2283
- args(...e) {
2284
- return new q({
2285
- ...this._def,
2286
- args: Z.create(e).rest(L.create())
2287
- });
2288
- }
2289
- returns(e) {
2290
- return new q({
2291
- ...this._def,
2292
- returns: e
2293
- });
2294
- }
2295
- implement(e) {
2296
- return this.parse(e);
2297
- }
2298
- strictImplement(e) {
2299
- return this.parse(e);
2300
- }
2301
- static create(e, t, s) {
2302
- return new q({
2303
- args: e || Z.create([]).rest(L.create()),
2304
- returns: t || L.create(),
2305
- typeName: p.ZodFunction,
2306
- ..._(s)
2307
- });
2308
- }
2309
- }
2310
- class se extends y {
2311
- get schema() {
2312
- return this._def.getter();
2313
- }
2314
- _parse(e) {
2315
- const { ctx: t } = this._processInputParams(e);
2316
- return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
2317
- }
2318
- }
2319
- se.create = (r, e) => new se({
2320
- getter: r,
2321
- typeName: p.ZodLazy,
2322
- ..._(e)
2323
- });
2324
- class ae extends y {
2325
- _parse(e) {
2326
- if (e.data !== this._def.value) {
2327
- const t = this._getOrReturnCtx(e);
2328
- return u(t, {
2329
- received: t.data,
2330
- code: d.invalid_literal,
2331
- expected: this._def.value
2332
- }), v;
2333
- }
2334
- return { status: "valid", value: e.data };
2335
- }
2336
- get value() {
2337
- return this._def.value;
2338
- }
2339
- }
2340
- ae.create = (r, e) => new ae({
2341
- value: r,
2342
- typeName: p.ZodLiteral,
2343
- ..._(e)
2344
- });
2345
- function Ee(r, e) {
2346
- return new M({
2347
- values: r,
2348
- typeName: p.ZodEnum,
2349
- ..._(e)
2350
- });
2351
- }
2352
- class M extends y {
2353
- constructor() {
2354
- super(...arguments), B.set(this, void 0);
2355
- }
2356
- _parse(e) {
2357
- if (typeof e.data != "string") {
2358
- const t = this._getOrReturnCtx(e), s = this._def.values;
2359
- return u(t, {
2360
- expected: g.joinValues(s),
2361
- received: t.parsedType,
2362
- code: d.invalid_type
2363
- }), v;
2364
- }
2365
- if (X(this, B, "f") || Ce(this, B, new Set(this._def.values), "f"), !X(this, B, "f").has(e.data)) {
2366
- const t = this._getOrReturnCtx(e), s = this._def.values;
2367
- return u(t, {
2368
- received: t.data,
2369
- code: d.invalid_enum_value,
2370
- options: s
2371
- }), v;
2372
- }
2373
- return b(e.data);
2374
- }
2375
- get options() {
2376
- return this._def.values;
2377
- }
2378
- get enum() {
2379
- const e = {};
2380
- for (const t of this._def.values)
2381
- e[t] = t;
2382
- return e;
2383
- }
2384
- get Values() {
2385
- const e = {};
2386
- for (const t of this._def.values)
2387
- e[t] = t;
2388
- return e;
2389
- }
2390
- get Enum() {
2391
- const e = {};
2392
- for (const t of this._def.values)
2393
- e[t] = t;
2394
- return e;
2395
- }
2396
- extract(e, t = this._def) {
2397
- return M.create(e, {
2398
- ...this._def,
2399
- ...t
2400
- });
2401
- }
2402
- exclude(e, t = this._def) {
2403
- return M.create(this.options.filter((s) => !e.includes(s)), {
2404
- ...this._def,
2405
- ...t
2406
- });
2407
- }
2408
- }
2409
- B = /* @__PURE__ */ new WeakMap();
2410
- M.create = Ee;
2411
- class ne extends y {
2412
- constructor() {
2413
- super(...arguments), W.set(this, void 0);
2414
- }
2415
- _parse(e) {
2416
- const t = g.getValidEnumValues(this._def.values), s = this._getOrReturnCtx(e);
2417
- if (s.parsedType !== l.string && s.parsedType !== l.number) {
2418
- const a = g.objectValues(t);
2419
- return u(s, {
2420
- expected: g.joinValues(a),
2421
- received: s.parsedType,
2422
- code: d.invalid_type
2423
- }), v;
2424
- }
2425
- if (X(this, W, "f") || Ce(this, W, new Set(g.getValidEnumValues(this._def.values)), "f"), !X(this, W, "f").has(e.data)) {
2426
- const a = g.objectValues(t);
2427
- return u(s, {
2428
- received: s.data,
2429
- code: d.invalid_enum_value,
2430
- options: a
2431
- }), v;
2432
- }
2433
- return b(e.data);
2434
- }
2435
- get enum() {
2436
- return this._def.values;
2437
- }
2438
- }
2439
- W = /* @__PURE__ */ new WeakMap();
2440
- ne.create = (r, e) => new ne({
2441
- values: r,
2442
- typeName: p.ZodNativeEnum,
2443
- ..._(e)
2444
- });
2445
- class G extends y {
2446
- unwrap() {
2447
- return this._def.type;
2448
- }
2449
- _parse(e) {
2450
- const { ctx: t } = this._processInputParams(e);
2451
- if (t.parsedType !== l.promise && t.common.async === !1)
2452
- return u(t, {
2453
- code: d.invalid_type,
2454
- expected: l.promise,
2455
- received: t.parsedType
2456
- }), v;
2457
- const s = t.parsedType === l.promise ? t.data : Promise.resolve(t.data);
2458
- return b(s.then((a) => this._def.type.parseAsync(a, {
2459
- path: t.path,
2460
- errorMap: t.common.contextualErrorMap
2461
- })));
2462
- }
2463
- }
2464
- G.create = (r, e) => new G({
2465
- type: r,
2466
- typeName: p.ZodPromise,
2467
- ..._(e)
2468
- });
2469
- class R extends y {
2470
- innerType() {
2471
- return this._def.schema;
2472
- }
2473
- sourceType() {
2474
- return this._def.schema._def.typeName === p.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
2475
- }
2476
- _parse(e) {
2477
- const { status: t, ctx: s } = this._processInputParams(e), a = this._def.effect || null, n = {
2478
- addIssue: (i) => {
2479
- u(s, i), i.fatal ? t.abort() : t.dirty();
2480
- },
2481
- get path() {
2482
- return s.path;
2483
- }
2484
- };
2485
- if (n.addIssue = n.addIssue.bind(n), a.type === "preprocess") {
2486
- const i = a.transform(s.data, n);
2487
- if (s.common.async)
2488
- return Promise.resolve(i).then(async (o) => {
2489
- if (t.value === "aborted")
2490
- return v;
2491
- const h = await this._def.schema._parseAsync({
2492
- data: o,
2493
- path: s.path,
2494
- parent: s
2495
- });
2496
- return h.status === "aborted" ? v : h.status === "dirty" || t.value === "dirty" ? U(h.value) : h;
2497
- });
2498
- {
2499
- if (t.value === "aborted")
2500
- return v;
2501
- const o = this._def.schema._parseSync({
2502
- data: i,
2503
- path: s.path,
2504
- parent: s
2505
- });
2506
- return o.status === "aborted" ? v : o.status === "dirty" || t.value === "dirty" ? U(o.value) : o;
2507
- }
2508
- }
2509
- if (a.type === "refinement") {
2510
- const i = (o) => {
2511
- const h = a.refinement(o, n);
2512
- if (s.common.async)
2513
- return Promise.resolve(h);
2514
- if (h instanceof Promise)
2515
- throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
2516
- return o;
2517
- };
2518
- if (s.common.async === !1) {
2519
- const o = this._def.schema._parseSync({
2520
- data: s.data,
2521
- path: s.path,
2522
- parent: s
2523
- });
2524
- return o.status === "aborted" ? v : (o.status === "dirty" && t.dirty(), i(o.value), { status: t.value, value: o.value });
2525
- } else
2526
- return this._def.schema._parseAsync({ data: s.data, path: s.path, parent: s }).then((o) => o.status === "aborted" ? v : (o.status === "dirty" && t.dirty(), i(o.value).then(() => ({ status: t.value, value: o.value }))));
2527
- }
2528
- if (a.type === "transform")
2529
- if (s.common.async === !1) {
2530
- const i = this._def.schema._parseSync({
2531
- data: s.data,
2532
- path: s.path,
2533
- parent: s
2534
- });
2535
- if (!H(i))
2536
- return i;
2537
- const o = a.transform(i.value, n);
2538
- if (o instanceof Promise)
2539
- throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
2540
- return { status: t.value, value: o };
2541
- } else
2542
- return this._def.schema._parseAsync({ data: s.data, path: s.path, parent: s }).then((i) => H(i) ? Promise.resolve(a.transform(i.value, n)).then((o) => ({ status: t.value, value: o })) : i);
2543
- g.assertNever(a);
2544
- }
2545
- }
2546
- R.create = (r, e, t) => new R({
2547
- schema: r,
2548
- typeName: p.ZodEffects,
2549
- effect: e,
2550
- ..._(t)
2551
- });
2552
- R.createWithPreprocess = (r, e, t) => new R({
2553
- schema: e,
2554
- effect: { type: "preprocess", transform: r },
2555
- typeName: p.ZodEffects,
2556
- ..._(t)
2557
- });
2558
- class E extends y {
2559
- _parse(e) {
2560
- return this._getType(e) === l.undefined ? b(void 0) : this._def.innerType._parse(e);
2561
- }
2562
- unwrap() {
2563
- return this._def.innerType;
2564
- }
2565
- }
2566
- E.create = (r, e) => new E({
2567
- innerType: r,
2568
- typeName: p.ZodOptional,
2569
- ..._(e)
2570
- });
2571
- class P extends y {
2572
- _parse(e) {
2573
- return this._getType(e) === l.null ? b(null) : this._def.innerType._parse(e);
2574
- }
2575
- unwrap() {
2576
- return this._def.innerType;
2577
- }
2578
- }
2579
- P.create = (r, e) => new P({
2580
- innerType: r,
2581
- typeName: p.ZodNullable,
2582
- ..._(e)
2583
- });
2584
- class ie extends y {
2585
- _parse(e) {
2586
- const { ctx: t } = this._processInputParams(e);
2587
- let s = t.data;
2588
- return t.parsedType === l.undefined && (s = this._def.defaultValue()), this._def.innerType._parse({
2589
- data: s,
2590
- path: t.path,
2591
- parent: t
2592
- });
2593
- }
2594
- removeDefault() {
2595
- return this._def.innerType;
2596
- }
2597
- }
2598
- ie.create = (r, e) => new ie({
2599
- innerType: r,
2600
- typeName: p.ZodDefault,
2601
- defaultValue: typeof e.default == "function" ? e.default : () => e.default,
2602
- ..._(e)
2603
- });
2604
- class oe extends y {
2605
- _parse(e) {
2606
- const { ctx: t } = this._processInputParams(e), s = {
2607
- ...t,
2608
- common: {
2609
- ...t.common,
2610
- issues: []
2611
- }
2612
- }, a = this._def.innerType._parse({
2613
- data: s.data,
2614
- path: s.path,
2615
- parent: {
2616
- ...s
2617
- }
2618
- });
2619
- return J(a) ? a.then((n) => ({
2620
- status: "valid",
2621
- value: n.status === "valid" ? n.value : this._def.catchValue({
2622
- get error() {
2623
- return new T(s.common.issues);
2624
- },
2625
- input: s.data
2626
- })
2627
- })) : {
2628
- status: "valid",
2629
- value: a.status === "valid" ? a.value : this._def.catchValue({
2630
- get error() {
2631
- return new T(s.common.issues);
2632
- },
2633
- input: s.data
2634
- })
2635
- };
2636
- }
2637
- removeCatch() {
2638
- return this._def.innerType;
2639
- }
2640
- }
2641
- oe.create = (r, e) => new oe({
2642
- innerType: r,
2643
- typeName: p.ZodCatch,
2644
- catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
2645
- ..._(e)
2646
- });
2647
- class ge extends y {
2648
- _parse(e) {
2649
- if (this._getType(e) !== l.nan) {
2650
- const s = this._getOrReturnCtx(e);
2651
- return u(s, {
2652
- code: d.invalid_type,
2653
- expected: l.nan,
2654
- received: s.parsedType
2655
- }), v;
2656
- }
2657
- return { status: "valid", value: e.data };
2658
- }
2659
- }
2660
- ge.create = (r) => new ge({
2661
- typeName: p.ZodNaN,
2662
- ..._(r)
2663
- });
2664
- class Ze extends y {
2665
- _parse(e) {
2666
- const { ctx: t } = this._processInputParams(e), s = t.data;
2667
- return this._def.type._parse({
2668
- data: s,
2669
- path: t.path,
2670
- parent: t
2671
- });
2672
- }
2673
- unwrap() {
2674
- return this._def.type;
2675
- }
2676
- }
2677
- class ce extends y {
2678
- _parse(e) {
2679
- const { status: t, ctx: s } = this._processInputParams(e);
2680
- if (s.common.async)
2681
- return (async () => {
2682
- const n = await this._def.in._parseAsync({
2683
- data: s.data,
2684
- path: s.path,
2685
- parent: s
2686
- });
2687
- return n.status === "aborted" ? v : n.status === "dirty" ? (t.dirty(), U(n.value)) : this._def.out._parseAsync({
2688
- data: n.value,
2689
- path: s.path,
2690
- parent: s
2691
- });
2692
- })();
2693
- {
2694
- const a = this._def.in._parseSync({
2695
- data: s.data,
2696
- path: s.path,
2697
- parent: s
2698
- });
2699
- return a.status === "aborted" ? v : a.status === "dirty" ? (t.dirty(), {
2700
- status: "dirty",
2701
- value: a.value
2702
- }) : this._def.out._parseSync({
2703
- data: a.value,
2704
- path: s.path,
2705
- parent: s
2706
- });
2707
- }
2708
- }
2709
- static create(e, t) {
2710
- return new ce({
2711
- in: e,
2712
- out: t,
2713
- typeName: p.ZodPipeline
2714
- });
2715
- }
2716
- }
2717
- class de extends y {
2718
- _parse(e) {
2719
- const t = this._def.innerType._parse(e), s = (a) => (H(a) && (a.value = Object.freeze(a.value)), a);
2720
- return J(t) ? t.then((a) => s(a)) : s(t);
2721
- }
2722
- unwrap() {
2723
- return this._def.innerType;
2724
- }
2725
- }
2726
- de.create = (r, e) => new de({
2727
- innerType: r,
2728
- typeName: p.ZodReadonly,
2729
- ..._(e)
2730
- });
2731
- x.lazycreate;
2732
- var p;
2733
- (function(r) {
2734
- r.ZodString = "ZodString", r.ZodNumber = "ZodNumber", r.ZodNaN = "ZodNaN", r.ZodBigInt = "ZodBigInt", r.ZodBoolean = "ZodBoolean", r.ZodDate = "ZodDate", r.ZodSymbol = "ZodSymbol", r.ZodUndefined = "ZodUndefined", r.ZodNull = "ZodNull", r.ZodAny = "ZodAny", r.ZodUnknown = "ZodUnknown", r.ZodNever = "ZodNever", r.ZodVoid = "ZodVoid", r.ZodArray = "ZodArray", r.ZodObject = "ZodObject", r.ZodUnion = "ZodUnion", r.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", r.ZodIntersection = "ZodIntersection", r.ZodTuple = "ZodTuple", r.ZodRecord = "ZodRecord", r.ZodMap = "ZodMap", r.ZodSet = "ZodSet", r.ZodFunction = "ZodFunction", r.ZodLazy = "ZodLazy", r.ZodLiteral = "ZodLiteral", r.ZodEnum = "ZodEnum", r.ZodEffects = "ZodEffects", r.ZodNativeEnum = "ZodNativeEnum", r.ZodOptional = "ZodOptional", r.ZodNullable = "ZodNullable", r.ZodDefault = "ZodDefault", r.ZodCatch = "ZodCatch", r.ZodPromise = "ZodPromise", r.ZodBranded = "ZodBranded", r.ZodPipeline = "ZodPipeline", r.ZodReadonly = "ZodReadonly";
2735
- })(p || (p = {}));
2736
- const He = S.create, Je = A.create;
2737
- ge.create;
2738
- $.create;
2739
- const Xe = Q.create;
2740
- D.create;
2741
- pe.create;
2742
- K.create;
2743
- F.create;
2744
- me.create;
2745
- L.create;
2746
- j.create;
2747
- ve.create;
2748
- const Qe = C.create, Ke = x.create;
2749
- x.strictCreate;
2750
- const Fe = ee.create;
2751
- xe.create;
2752
- te.create;
2753
- const et = Z.create, tt = re.create;
2754
- ye.create;
2755
- z.create;
2756
- q.create;
2757
- se.create;
2758
- const rt = ae.create, st = M.create;
2759
- ne.create;
2760
- G.create;
2761
- R.create;
2762
- E.create;
2763
- P.create;
2764
- R.createWithPreprocess;
2765
- ce.create;
2766
- const at = {
2767
- string: (r) => S.create({ ...r, coerce: !0 }),
2768
- number: (r) => A.create({ ...r, coerce: !0 }),
2769
- boolean: (r) => Q.create({
2770
- ...r,
2771
- coerce: !0
2772
- }),
2773
- bigint: (r) => $.create({ ...r, coerce: !0 }),
2774
- date: (r) => D.create({ ...r, coerce: !0 })
2775
- };
2776
- export {
2777
- U as DIRTY,
2778
- v as INVALID,
2779
- b as OK,
2780
- k as ParseStatus,
2781
- y as Schema,
2782
- me as ZodAny,
2783
- C as ZodArray,
2784
- $ as ZodBigInt,
2785
- Q as ZodBoolean,
2786
- Ze as ZodBranded,
2787
- oe as ZodCatch,
2788
- D as ZodDate,
2789
- ie as ZodDefault,
2790
- xe as ZodDiscriminatedUnion,
2791
- R as ZodEffects,
2792
- M as ZodEnum,
2793
- T as ZodError,
2794
- p as ZodFirstPartyTypeKind,
2795
- q as ZodFunction,
2796
- te as ZodIntersection,
2797
- d as ZodIssueCode,
2798
- se as ZodLazy,
2799
- ae as ZodLiteral,
2800
- ye as ZodMap,
2801
- ge as ZodNaN,
2802
- ne as ZodNativeEnum,
2803
- j as ZodNever,
2804
- F as ZodNull,
2805
- P as ZodNullable,
2806
- A as ZodNumber,
2807
- x as ZodObject,
2808
- E as ZodOptional,
2809
- l as ZodParsedType,
2810
- ce as ZodPipeline,
2811
- G as ZodPromise,
2812
- de as ZodReadonly,
2813
- re as ZodRecord,
2814
- y as ZodSchema,
2815
- z as ZodSet,
2816
- S as ZodString,
2817
- pe as ZodSymbol,
2818
- R as ZodTransformer,
2819
- Z as ZodTuple,
2820
- y as ZodType,
2821
- K as ZodUndefined,
2822
- ee as ZodUnion,
2823
- L as ZodUnknown,
2824
- ve as ZodVoid,
2825
- u as addIssueToContext,
2826
- Qe as array,
2827
- Xe as boolean,
2828
- at as coerce,
2829
- qe as datetimeRegex,
2830
- Y as defaultErrorMap,
2831
- st as enum,
2832
- he as getErrorMap,
2833
- I as getParsedType,
2834
- we as isAborted,
2835
- J as isAsync,
2836
- Te as isDirty,
2837
- H as isValid,
2838
- rt as literal,
2839
- fe as makeIssue,
2840
- Je as number,
2841
- Ke as object,
2842
- be as objectUtil,
2843
- tt as record,
2844
- He as string,
2845
- et as tuple,
2846
- Fe as union,
2847
- g as util
2848
- };
2849
- //# sourceMappingURL=index.map