@windrun-huaiin/third-ui 7.6.1 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (577) hide show
  1. package/dist/_virtual/advancedFormat.js +1 -1
  2. package/dist/_virtual/advancedFormat.mjs +1 -1
  3. package/dist/_virtual/customParseFormat.js +1 -1
  4. package/dist/_virtual/customParseFormat.mjs +1 -1
  5. package/dist/_virtual/dayjs.min.js +1 -1
  6. package/dist/_virtual/dayjs.min.mjs +1 -1
  7. package/dist/_virtual/isoWeek.js +1 -1
  8. package/dist/_virtual/isoWeek.mjs +1 -1
  9. package/dist/clerk/clerk-organization.js +1 -1
  10. package/dist/clerk/clerk-organization.mjs +1 -1
  11. package/dist/clerk/{clerk-page-generator-client.js → clerk-page-context-generator.js} +2 -2
  12. package/dist/clerk/{clerk-page-generator-client.mjs → clerk-page-context-generator.mjs} +2 -2
  13. package/dist/clerk/clerk-page-generator.js +3 -3
  14. package/dist/clerk/clerk-page-generator.mjs +3 -3
  15. package/dist/clerk/clerk-user-client.js +4 -3
  16. package/dist/clerk/clerk-user-client.mjs +4 -3
  17. package/dist/clerk/clerk-user.js +1 -1
  18. package/dist/clerk/clerk-user.mjs +1 -1
  19. package/dist/clerk/fingerprint/fingerprint-client.js +1 -1
  20. package/dist/clerk/fingerprint/fingerprint-client.mjs +1 -1
  21. package/dist/clerk/fingerprint/fingerprint-provider.js +147 -56
  22. package/dist/clerk/fingerprint/fingerprint-provider.mjs +148 -57
  23. package/dist/clerk/fingerprint/fingerprint-server.d.ts +16 -0
  24. package/dist/clerk/fingerprint/fingerprint-server.js +18 -0
  25. package/dist/clerk/fingerprint/fingerprint-server.mjs +18 -1
  26. package/dist/clerk/fingerprint/server.js +1 -0
  27. package/dist/clerk/fingerprint/server.mjs +1 -1
  28. package/dist/clerk/fingerprint/types.d.ts +13 -2
  29. package/dist/clerk/fingerprint/use-fingerprint.js +1 -1
  30. package/dist/clerk/fingerprint/use-fingerprint.mjs +1 -1
  31. package/dist/clerk/index.d.ts +2 -1
  32. package/dist/clerk/index.js +5 -3
  33. package/dist/clerk/index.mjs +2 -1
  34. package/dist/clerk/signin-with-fingerprint-client.js +4 -11
  35. package/dist/clerk/signin-with-fingerprint-client.mjs +4 -11
  36. package/dist/clerk/signup-button-with-fingerprint-client.d.ts +6 -0
  37. package/dist/clerk/signup-button-with-fingerprint-client.js +56 -0
  38. package/dist/clerk/signup-button-with-fingerprint-client.mjs +54 -0
  39. package/dist/clerk/signup-with-fingerprint-client.js +4 -11
  40. package/dist/clerk/signup-with-fingerprint-client.mjs +4 -11
  41. package/dist/fuma/base/custom-header.d.ts +38 -0
  42. package/dist/fuma/base/custom-header.js +163 -0
  43. package/dist/fuma/base/custom-header.mjs +161 -0
  44. package/dist/fuma/base/custom-home-layout.d.ts +68 -0
  45. package/dist/fuma/base/custom-home-layout.js +48 -0
  46. package/dist/fuma/base/custom-home-layout.mjs +46 -0
  47. package/dist/fuma/base/index.d.ts +2 -0
  48. package/dist/fuma/base/index.js +9 -0
  49. package/dist/fuma/base/index.mjs +2 -0
  50. package/dist/fuma/fuma-banner-suit.d.ts +2 -1
  51. package/dist/fuma/fuma-banner-suit.js +9 -3
  52. package/dist/fuma/fuma-banner-suit.mjs +9 -3
  53. package/dist/fuma/fuma-page-genarator.d.ts +4 -1
  54. package/dist/fuma/fuma-page-genarator.js +15 -6
  55. package/dist/fuma/fuma-page-genarator.mjs +15 -6
  56. package/dist/fuma/fuma-translate-util.d.ts +2 -0
  57. package/dist/fuma/fuma-translate-util.js +40 -0
  58. package/dist/fuma/fuma-translate-util.mjs +38 -0
  59. package/dist/fuma/llm-copy-handler.js +9 -8
  60. package/dist/fuma/llm-copy-handler.mjs +9 -8
  61. package/dist/fuma/mdx/banner.d.ts +7 -1
  62. package/dist/fuma/mdx/banner.js +15 -15
  63. package/dist/fuma/mdx/banner.mjs +15 -15
  64. package/dist/fuma/mdx/fuma-github-info.js +1 -1
  65. package/dist/fuma/mdx/fuma-github-info.mjs +1 -1
  66. package/dist/fuma/mdx/gradient-button.js +29 -18
  67. package/dist/fuma/mdx/gradient-button.mjs +29 -18
  68. package/dist/fuma/mdx/image-zoom.js +2 -2
  69. package/dist/fuma/mdx/image-zoom.mjs +2 -2
  70. package/dist/fuma/mdx/mermaid.js +3 -3
  71. package/dist/fuma/mdx/mermaid.mjs +3 -3
  72. package/dist/fuma/mdx/toc-base.js +9 -4
  73. package/dist/fuma/mdx/toc-base.mjs +9 -4
  74. package/dist/fuma/mdx/zia-card.js +3 -3
  75. package/dist/fuma/mdx/zia-card.mjs +3 -3
  76. package/dist/fuma/mdx/zia-file.js +1 -1
  77. package/dist/fuma/mdx/zia-file.mjs +1 -1
  78. package/dist/fuma/server.d.ts +1 -0
  79. package/dist/fuma/server.js +2 -0
  80. package/dist/fuma/server.mjs +1 -0
  81. package/dist/fuma/site-x.js +1 -1
  82. package/dist/fuma/site-x.mjs +1 -1
  83. package/dist/lib/fuma-schema-check-util.d.ts +4 -57
  84. package/dist/lib/fuma-schema-check-util.js +10 -31
  85. package/dist/lib/fuma-schema-check-util.mjs +11 -29
  86. package/dist/lib/server.d.ts +0 -1
  87. package/dist/lib/server.js +0 -5
  88. package/dist/lib/server.mjs +1 -2
  89. package/dist/main/ai-prompt-textarea.js +1 -1
  90. package/dist/main/ai-prompt-textarea.mjs +1 -1
  91. package/dist/main/credit/credit-nav-button.d.ts +21 -0
  92. package/dist/main/credit/credit-nav-button.js +117 -0
  93. package/dist/main/credit/credit-nav-button.mjs +114 -0
  94. package/dist/main/credit/credit-overview-client.d.ts +26 -0
  95. package/dist/main/credit/credit-overview-client.js +269 -0
  96. package/dist/main/credit/credit-overview-client.mjs +267 -0
  97. package/dist/main/credit/credit-overview.d.ts +8 -0
  98. package/dist/main/credit/credit-overview.js +34 -0
  99. package/dist/main/credit/credit-overview.mjs +32 -0
  100. package/dist/main/credit/types.d.ts +68 -0
  101. package/dist/main/cta.js +3 -2
  102. package/dist/main/cta.mjs +3 -2
  103. package/dist/main/faq.js +5 -4
  104. package/dist/main/faq.mjs +5 -4
  105. package/dist/main/features.js +3 -2
  106. package/dist/main/features.mjs +3 -2
  107. package/dist/main/footer.js +2 -2
  108. package/dist/main/footer.mjs +2 -2
  109. package/dist/main/gallery/gallery-desktop-grid.d.ts +6 -0
  110. package/dist/main/gallery/gallery-desktop-grid.js +10 -0
  111. package/dist/main/gallery/gallery-desktop-grid.mjs +8 -0
  112. package/dist/main/gallery/gallery-interactive.d.ts +4 -0
  113. package/dist/main/gallery/gallery-interactive.js +128 -0
  114. package/dist/main/gallery/gallery-interactive.mjs +126 -0
  115. package/dist/main/gallery/gallery-mobile-swiper.d.ts +6 -0
  116. package/dist/main/gallery/gallery-mobile-swiper.js +13 -0
  117. package/dist/main/gallery/gallery-mobile-swiper.mjs +11 -0
  118. package/dist/main/gallery/gallery-server.d.ts +2 -0
  119. package/dist/main/gallery/gallery-server.js +44 -0
  120. package/dist/main/gallery/gallery-server.mjs +42 -0
  121. package/dist/main/gallery/gallery-types.d.ts +19 -0
  122. package/dist/main/gallery-interactive.js +1 -1
  123. package/dist/main/gallery-interactive.mjs +1 -1
  124. package/dist/main/gallery.js +6 -5
  125. package/dist/main/gallery.mjs +6 -5
  126. package/dist/main/go-to-top.js +1 -1
  127. package/dist/main/go-to-top.mjs +1 -1
  128. package/dist/main/index.d.ts +3 -1
  129. package/dist/main/index.js +5 -1
  130. package/dist/main/index.mjs +3 -1
  131. package/dist/main/money-price/customer-portal.d.ts +7 -0
  132. package/dist/main/money-price/customer-portal.js +54 -0
  133. package/dist/main/money-price/customer-portal.mjs +52 -0
  134. package/dist/main/money-price/money-price-button.d.ts +1 -1
  135. package/dist/main/money-price/money-price-button.js +162 -42
  136. package/dist/main/money-price/money-price-button.mjs +162 -42
  137. package/dist/main/money-price/money-price-config-util.d.ts +50 -2
  138. package/dist/main/money-price/money-price-config-util.js +177 -4
  139. package/dist/main/money-price/money-price-config-util.mjs +175 -4
  140. package/dist/main/money-price/money-price-data.d.ts +8 -0
  141. package/dist/main/money-price/money-price-data.js +28 -0
  142. package/dist/main/money-price/money-price-data.mjs +26 -0
  143. package/dist/main/money-price/money-price-interactive.d.ts +1 -1
  144. package/dist/main/money-price/money-price-interactive.js +251 -288
  145. package/dist/main/money-price/money-price-interactive.mjs +253 -290
  146. package/dist/main/money-price/money-price-types.d.ts +69 -20
  147. package/dist/main/money-price/money-price.d.ts +1 -1
  148. package/dist/main/money-price/money-price.js +9 -62
  149. package/dist/main/money-price/money-price.mjs +10 -63
  150. package/dist/main/price-plan.js +6 -6
  151. package/dist/main/price-plan.mjs +6 -6
  152. package/dist/main/section-layout.d.ts +1 -0
  153. package/dist/main/section-layout.js +7 -0
  154. package/dist/main/section-layout.mjs +5 -0
  155. package/dist/main/seo-content.js +3 -2
  156. package/dist/main/seo-content.mjs +3 -2
  157. package/dist/main/server.d.ts +6 -3
  158. package/dist/main/server.js +9 -4
  159. package/dist/main/server.mjs +4 -2
  160. package/dist/main/tips.js +3 -2
  161. package/dist/main/tips.mjs +3 -2
  162. package/dist/main/usage.js +4 -3
  163. package/dist/main/usage.mjs +4 -3
  164. package/dist/main/x-button.js +6 -6
  165. package/dist/main/x-button.mjs +6 -6
  166. package/dist/node_modules/.pnpm/@fingerprintjs_fingerprintjs@4.6.2/node_modules/@fingerprintjs/fingerprintjs/dist/fp.esm.js +1 -1
  167. package/dist/node_modules/.pnpm/@fingerprintjs_fingerprintjs@4.6.2/node_modules/@fingerprintjs/fingerprintjs/dist/fp.esm.mjs +1 -1
  168. package/dist/node_modules/.pnpm/{@iconify_utils@2.3.0 → @iconify_utils@3.0.2}/node_modules/@iconify/utils/lib/customisations/defaults.js +7 -6
  169. package/dist/node_modules/.pnpm/{@iconify_utils@2.3.0 → @iconify_utils@3.0.2}/node_modules/@iconify/utils/lib/customisations/defaults.mjs +7 -6
  170. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon/defaults.js +39 -0
  171. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon/defaults.mjs +34 -0
  172. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon/merge.js +20 -0
  173. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon/merge.mjs +18 -0
  174. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon/name.js +60 -0
  175. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon/name.mjs +57 -0
  176. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon/transformations.js +15 -0
  177. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon/transformations.mjs +13 -0
  178. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon-set/get-icon.js +30 -0
  179. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon-set/get-icon.mjs +27 -0
  180. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon-set/tree.js +26 -0
  181. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon-set/tree.mjs +24 -0
  182. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/svg/build.js +118 -0
  183. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/svg/build.mjs +115 -0
  184. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/svg/defs.js +36 -0
  185. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/svg/defs.mjs +32 -0
  186. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/svg/html.js +12 -0
  187. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/svg/html.mjs +10 -0
  188. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/svg/id.js +48 -0
  189. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/svg/id.mjs +46 -0
  190. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/svg/size.js +30 -0
  191. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/svg/size.mjs +28 -0
  192. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-U656AL7Q.js +9 -0
  193. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-O4VJ6CD3.mjs → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-U656AL7Q.mjs} +2 -2
  194. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-KMC2YHZD.js → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-76Q3JFCE.js} +8 -8
  195. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-KMC2YHZD.mjs → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-76Q3JFCE.mjs} +1 -1
  196. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-4KMFLZZN.js → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FPAJGGOC.js} +1 -1
  197. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-4KMFLZZN.mjs → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FPAJGGOC.mjs} +1 -1
  198. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-XRWGC2XP.js → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FWNWRKHM.js} +13 -13
  199. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-XRWGC2XP.mjs → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FWNWRKHM.mjs} +1 -1
  200. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-T44TD3VJ.js → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-LBM3YZW2.js} +8 -8
  201. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-T44TD3VJ.mjs → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-LBM3YZW2.mjs} +1 -1
  202. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-WFRQ32O7.js → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-LHMN2FUI.js} +8 -8
  203. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-WFRQ32O7.mjs → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-LHMN2FUI.mjs} +1 -1
  204. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-JEIROHC2.js → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-O7ZBX7Z2.js} +10 -10
  205. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-JEIROHC2.mjs → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-O7ZBX7Z2.mjs} +1 -1
  206. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-BN7GFLIU.js → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-S6J4BHB3.js} +8 -8
  207. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-BN7GFLIU.mjs → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-S6J4BHB3.mjs} +1 -1
  208. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-WFWHJNB7.js → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-T53DSG4Q.js} +10 -10
  209. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-WFWHJNB7.mjs → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-T53DSG4Q.mjs} +1 -1
  210. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-F6HP7TQM.js +9 -0
  211. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-ZV4HHKMB.mjs → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-F6HP7TQM.mjs} +2 -2
  212. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-NVLQJR56.js +9 -0
  213. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-NVLQJR56.mjs +2 -0
  214. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-BFZMPI3H.js +9 -0
  215. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-BFZMPI3H.mjs +2 -0
  216. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-7BOR55EZ.js +9 -0
  217. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-7BOR55EZ.mjs +2 -0
  218. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-NHE76QYJ.js +9 -0
  219. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-NHE76QYJ.mjs +2 -0
  220. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-KMMF4GRG.js +9 -0
  221. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-KMMF4GRG.mjs +2 -0
  222. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js +129 -0
  223. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2 → @mermaid-js_parser@0.6.3}/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.mjs +16 -16
  224. package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/cross-count.js +0 -3
  225. package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/cross-count.mjs +0 -3
  226. package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/position/bk.js +24 -4
  227. package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/position/bk.mjs +24 -4
  228. package/dist/node_modules/.pnpm/{dompurify@3.2.6 → dompurify@3.3.0}/node_modules/dompurify/dist/purify.es.js +59 -25
  229. package/dist/node_modules/.pnpm/{dompurify@3.2.6 → dompurify@3.3.0}/node_modules/dompurify/dist/purify.es.mjs +59 -25
  230. package/dist/node_modules/.pnpm/{katex@0.16.22 → katex@0.16.25}/node_modules/katex/dist/katex.js +26 -34
  231. package/dist/node_modules/.pnpm/{katex@0.16.22 → katex@0.16.25}/node_modules/katex/dist/katex.mjs +26 -34
  232. package/dist/node_modules/.pnpm/marked@16.4.2/node_modules/marked/lib/marked.esm.js +84 -0
  233. package/dist/node_modules/.pnpm/marked@16.4.2/node_modules/marked/lib/marked.esm.mjs +74 -0
  234. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-SUXI7LT5.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-VXUJARFQ.js} +373 -351
  235. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-SUXI7LT5.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-VXUJARFQ.mjs} +320 -298
  236. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-6J76NXCF.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-VD42YOAC.js} +393 -380
  237. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-6J76NXCF.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-VD42YOAC.mjs} +162 -149
  238. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-6F6E4RAY.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-YG6GDRKO.js} +126 -125
  239. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-6F6E4RAY.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-YG6GDRKO.mjs} +10 -9
  240. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-353BL4L5.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-4BX2VUAB.js} +2 -2
  241. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-353BL4L5.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-4BX2VUAB.mjs} +1 -1
  242. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-BFAMUDN2.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.js} +2 -2
  243. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-BFAMUDN2.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.mjs} +1 -1
  244. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-RKKUNAVE.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-6MN3ZHY7.js} +15 -15
  245. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-RKKUNAVE.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-6MN3ZHY7.mjs} +15 -15
  246. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-3XYRH5AP.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ABZYJK2D.js} +142 -203
  247. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-3XYRH5AP.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ABZYJK2D.mjs} +27 -85
  248. package/dist/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.js +81 -0
  249. package/dist/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.mjs +76 -0
  250. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-UWXLY5YG.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ATLVNIR6.js} +30 -11
  251. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-UWXLY5YG.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ATLVNIR6.mjs} +22 -3
  252. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-SZ463SBG.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-B4BG7PRW.js} +207 -205
  253. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-SZ463SBG.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-B4BG7PRW.mjs} +132 -130
  254. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-AC5SNWB5.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-CVBHYZKI.js} +2 -2
  255. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-AC5SNWB5.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-CVBHYZKI.mjs} +1 -1
  256. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-OW32GOEJ.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-DI55MBZ5.js} +98 -97
  257. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-OW32GOEJ.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-DI55MBZ5.mjs} +10 -9
  258. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-P3VETL53.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-EXTU4WIE.js} +4 -3
  259. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-P3VETL53.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-EXTU4WIE.mjs} +2 -1
  260. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-E2GYISFI.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-FMBD7UC4.js} +2 -2
  261. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-E2GYISFI.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-FMBD7UC4.mjs} +1 -1
  262. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-MXNHSMXR.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-HN2XXSSU.js} +17 -9
  263. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-MXNHSMXR.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-HN2XXSSU.mjs} +11 -5
  264. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QESNASVV.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JA3XYJ7Z.js} +51 -50
  265. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QESNASVV.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JA3XYJ7Z.mjs} +23 -22
  266. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JW4RIYDF.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JZLCHNYA.js} +731 -440
  267. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JW4RIYDF.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JZLCHNYA.mjs} +404 -113
  268. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-L5ZGVLVO.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-MI3HLSF2.js} +139 -139
  269. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-L5ZGVLVO.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-MI3HLSF2.mjs} +5 -5
  270. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-IWUHOULB.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-N4CR4FBY.js} +29 -22
  271. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-IWUHOULB.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-N4CR4FBY.mjs} +13 -6
  272. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-SKB7J2MH.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QN33PNHL.js} +7 -6
  273. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-SKB7J2MH.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QN33PNHL.mjs} +2 -1
  274. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-M6DAPIYF.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QXUST7PY.js} +211 -85
  275. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-M6DAPIYF.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QXUST7PY.mjs} +142 -16
  276. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-AACKK3MU.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QZHKN3VN.js} +2 -2
  277. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-AACKK3MU.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QZHKN3VN.mjs} +1 -1
  278. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55PJQP7W.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-S3R3BYOJ.js} +61 -49
  279. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55PJQP7W.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-S3R3BYOJ.mjs} +13 -1
  280. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-67H74DCK.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.js} +10 -9
  281. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-67H74DCK.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.mjs} +2 -1
  282. package/dist/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-2ON5EDUG.js +31 -0
  283. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-M3E45YP4.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-2ON5EDUG.mjs} +9 -8
  284. package/dist/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-WZHVMYZB.js +31 -0
  285. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-YAWTLIQI.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-WZHVMYZB.mjs} +9 -8
  286. package/dist/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.js +302 -0
  287. package/dist/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.mjs +300 -0
  288. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/dagre-JOIXM2OF.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/dagre-6UL2VRFP.js} +123 -122
  289. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/dagre-JOIXM2OF.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/dagre-6UL2VRFP.mjs} +12 -11
  290. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-VMROVX33.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/diagram-PSM6KHXK.js} +46 -45
  291. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-VMROVX33.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/diagram-PSM6KHXK.mjs} +8 -7
  292. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-ZTM2IBQH.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/diagram-QEK2KX5R.js} +45 -44
  293. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-ZTM2IBQH.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/diagram-QEK2KX5R.mjs} +6 -5
  294. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-5UYTHUR4.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/diagram-S2PKOQOG.js} +68 -57
  295. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-5UYTHUR4.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/diagram-S2PKOQOG.mjs} +56 -45
  296. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-3M52JZNH.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-Q2GNP2WA.js} +70 -69
  297. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-3M52JZNH.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-Q2GNP2WA.mjs} +14 -13
  298. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-KYDEHFYC.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-NV44I4VS.js} +97 -93
  299. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-KYDEHFYC.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-NV44I4VS.mjs} +20 -16
  300. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-EK5VF46D.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-LVOFAZNH.js} +134 -125
  301. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-EK5VF46D.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-LVOFAZNH.mjs} +27 -18
  302. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-GW3U2K7C.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-NY62KEGX.js} +116 -115
  303. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-GW3U2K7C.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-NY62KEGX.mjs} +6 -5
  304. package/dist/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-ER5ION4S.js +42 -0
  305. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-LHK5PUON.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-ER5ION4S.mjs} +5 -4
  306. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-EWQZEKCU.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-XKPGCS4Q.js} +100 -99
  307. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-EWQZEKCU.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-XKPGCS4Q.mjs} +10 -9
  308. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/kanban-definition-ZSS6B67P.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/kanban-definition-3W4ZIXB7.js} +79 -78
  309. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/kanban-definition-ZSS6B67P.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/kanban-definition-3W4ZIXB7.mjs} +12 -11
  310. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/mindmap-definition-6CBA2TL7.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/mindmap-definition-VGOIOE7T.js} +277 -379
  311. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/mindmap-definition-6CBA2TL7.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/mindmap-definition-VGOIOE7T.mjs} +234 -336
  312. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-NIOCPIFQ.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-ADFJNKIX.js} +58 -56
  313. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-NIOCPIFQ.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-ADFJNKIX.mjs} +30 -28
  314. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-2OG54O6I.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-AYHSOK5B.js} +96 -95
  315. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-2OG54O6I.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-AYHSOK5B.mjs} +6 -5
  316. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/requirementDiagram-QOLK2EJ7.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/requirementDiagram-UZGBJVZJ.js} +64 -63
  317. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/requirementDiagram-QOLK2EJ7.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/requirementDiagram-UZGBJVZJ.mjs} +14 -13
  318. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-4UZDY2LN.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-TZEHDZUN.js} +73 -69
  319. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-4UZDY2LN.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-TZEHDZUN.mjs} +17 -13
  320. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-SKLFT4DO.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.js} +839 -376
  321. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-SKLFT4DO.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.mjs} +591 -128
  322. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-MI5ZYTHO.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-FKZM4ZOC.js} +94 -93
  323. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-MI5ZYTHO.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-FKZM4ZOC.mjs} +12 -11
  324. package/dist/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-4FDKWEC3.js +31 -0
  325. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-5AN5P6BG.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-4FDKWEC3.mjs} +9 -8
  326. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-MYPXXCX6.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-IT6M3QCI.js} +93 -92
  327. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-MYPXXCX6.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-IT6M3QCI.mjs} +8 -7
  328. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-H2YORKM3.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-PRI3JC2R.js} +136 -133
  329. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-H2YORKM3.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-PRI3JC2R.mjs} +43 -40
  330. package/dist/node_modules/.pnpm/{mermaid@11.9.0 → mermaid@11.12.1}/node_modules/mermaid/dist/mermaid.core.js +226 -225
  331. package/dist/node_modules/.pnpm/{mermaid@11.9.0 → mermaid@11.12.1}/node_modules/mermaid/dist/mermaid.core.mjs +43 -42
  332. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.3.0_react-dom@19.1.0_react@19.1.0__react@19.1.0 → react-medium-image-zoom@5.4.0_react-dom@19.2.0_react@19.2.0__react@19.2.0}/node_modules/react-medium-image-zoom/dist/index.js +16 -12
  333. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.3.0_react-dom@19.1.0_react@19.1.0__react@19.1.0 → react-medium-image-zoom@5.4.0_react-dom@19.2.0_react@19.2.0__react@19.2.0}/node_modules/react-medium-image-zoom/dist/index.mjs +16 -12
  334. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/pagination.js +461 -0
  335. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/pagination.mjs +459 -0
  336. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/classes-to-selector.js +8 -0
  337. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/classes-to-selector.mjs +6 -0
  338. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/create-element-if-not-defined.js +23 -0
  339. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/create-element-if-not-defined.mjs +21 -0
  340. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/ssr-window.esm.js +143 -0
  341. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/ssr-window.esm.mjs +140 -0
  342. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/swiper-core.js +3874 -0
  343. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/swiper-core.mjs +3871 -0
  344. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/update-on-virtual-data.js +129 -0
  345. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/update-on-virtual-data.mjs +124 -0
  346. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/update-swiper.js +226 -0
  347. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/update-swiper.mjs +216 -0
  348. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/utils.js +310 -0
  349. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/utils.mjs +288 -0
  350. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/swiper-react.js +390 -0
  351. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/swiper-react.mjs +387 -0
  352. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.js +6 -0
  353. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.mjs +4 -0
  354. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js +15 -0
  355. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.mjs +13 -0
  356. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js +30 -0
  357. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.mjs +28 -0
  358. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js +21 -0
  359. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.mjs +19 -0
  360. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/errors.js +52 -0
  361. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/errors.mjs +50 -0
  362. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/iso.js +44 -0
  363. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/iso.mjs +35 -0
  364. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/parse.js +31 -0
  365. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/parse.mjs +18 -0
  366. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/schemas.js +492 -0
  367. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/schemas.mjs +439 -0
  368. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/api.js +434 -0
  369. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/api.mjs +388 -0
  370. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/checks.js +245 -0
  371. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/checks.mjs +232 -0
  372. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/core.js +68 -0
  373. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/core.mjs +62 -0
  374. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/errors.js +80 -0
  375. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/errors.mjs +75 -0
  376. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/parse.js +101 -0
  377. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/parse.mjs +86 -0
  378. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/regexes.js +102 -0
  379. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/regexes.mjs +76 -0
  380. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/registries.js +56 -0
  381. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/registries.mjs +52 -0
  382. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/schemas.js +952 -0
  383. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/schemas.mjs +909 -0
  384. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/util.js +182 -0
  385. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/util.mjs +163 -0
  386. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/versions.js +9 -0
  387. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/versions.mjs +7 -0
  388. package/package.json +27 -21
  389. package/src/clerk/{clerk-page-generator-client.tsx → clerk-page-context-generator.tsx} +2 -2
  390. package/src/clerk/clerk-page-generator.tsx +3 -3
  391. package/src/clerk/clerk-user-client.tsx +7 -12
  392. package/src/clerk/fingerprint/fingerprint-provider.tsx +311 -112
  393. package/src/clerk/fingerprint/fingerprint-server.ts +33 -5
  394. package/src/clerk/fingerprint/types.ts +16 -2
  395. package/src/clerk/fingerprint/use-fingerprint.ts +1 -1
  396. package/src/clerk/index.ts +2 -1
  397. package/src/clerk/signin-with-fingerprint-client.tsx +3 -11
  398. package/src/clerk/signup-button-with-fingerprint-client.tsx +87 -0
  399. package/src/clerk/signup-with-fingerprint-client.tsx +3 -11
  400. package/src/fuma/base/custom-header.tsx +574 -0
  401. package/src/fuma/base/custom-home-layout.tsx +146 -0
  402. package/src/fuma/base/index.ts +2 -0
  403. package/src/fuma/fuma-banner-suit.tsx +22 -5
  404. package/src/fuma/fuma-page-genarator.tsx +29 -9
  405. package/src/fuma/fuma-translate-util.ts +44 -0
  406. package/src/fuma/llm-copy-handler.ts +8 -7
  407. package/src/fuma/mdx/airtical-card.tsx +1 -1
  408. package/src/fuma/mdx/banner.tsx +25 -7
  409. package/src/fuma/mdx/gradient-button.tsx +43 -26
  410. package/src/fuma/mdx/mermaid.tsx +2 -2
  411. package/src/fuma/mdx/toc-base.tsx +9 -4
  412. package/src/fuma/mdx/zia-card.tsx +6 -6
  413. package/src/fuma/server.ts +1 -0
  414. package/src/lib/fuma-schema-check-util.ts +11 -40
  415. package/src/lib/server.ts +0 -1
  416. package/src/main/ai-prompt-textarea.tsx +1 -1
  417. package/src/main/credit/credit-nav-button.tsx +283 -0
  418. package/src/main/credit/credit-overview-client.tsx +552 -0
  419. package/src/main/credit/credit-overview.tsx +53 -0
  420. package/src/main/credit/types.ts +89 -0
  421. package/src/main/cta.tsx +9 -8
  422. package/src/main/faq.tsx +4 -3
  423. package/src/main/features.tsx +3 -3
  424. package/src/main/footer.tsx +1 -1
  425. package/src/main/gallery/gallery-desktop-grid.tsx +41 -0
  426. package/src/main/gallery/gallery-interactive.tsx +153 -0
  427. package/src/main/gallery/gallery-mobile-swiper.tsx +65 -0
  428. package/src/main/gallery/gallery-server.tsx +46 -0
  429. package/src/main/gallery/gallery-types.ts +22 -0
  430. package/src/main/go-to-top.tsx +1 -1
  431. package/src/main/index.ts +5 -3
  432. package/src/main/money-price/customer-portal.ts +63 -0
  433. package/src/main/money-price/money-price-button.tsx +211 -56
  434. package/src/main/money-price/money-price-config-util.ts +222 -5
  435. package/src/main/money-price/money-price-data.ts +49 -0
  436. package/src/main/money-price/money-price-interactive.tsx +479 -356
  437. package/src/main/money-price/money-price-types.ts +76 -22
  438. package/src/main/money-price/money-price.tsx +28 -267
  439. package/src/main/price-plan.tsx +3 -3
  440. package/src/main/section-layout.ts +5 -0
  441. package/src/main/seo-content.tsx +2 -2
  442. package/src/main/server.ts +15 -4
  443. package/src/main/tips.tsx +2 -2
  444. package/src/main/usage.tsx +4 -4
  445. package/src/main/x-button.tsx +13 -13
  446. package/src/styles/fuma.css +38 -13
  447. package/src/styles/third-ui.css +37 -2
  448. package/dist/lib/fuma-search-util.d.ts +0 -2
  449. package/dist/lib/fuma-search-util.js +0 -8
  450. package/dist/lib/fuma-search-util.mjs +0 -6
  451. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/defaults.js +0 -29
  452. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/defaults.mjs +0 -24
  453. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/merge.js +0 -22
  454. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/merge.mjs +0 -20
  455. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/name.js +0 -55
  456. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/name.mjs +0 -52
  457. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/transformations.js +0 -18
  458. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/transformations.mjs +0 -16
  459. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon-set/get-icon.js +0 -29
  460. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon-set/get-icon.mjs +0 -26
  461. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon-set/tree.js +0 -25
  462. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon-set/tree.mjs +0 -23
  463. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/build.js +0 -122
  464. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/build.mjs +0 -119
  465. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/defs.js +0 -34
  466. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/defs.mjs +0 -30
  467. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/html.js +0 -11
  468. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/html.mjs +0 -9
  469. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/id.js +0 -30
  470. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/id.mjs +0 -28
  471. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/size.js +0 -42
  472. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/size.mjs +0 -40
  473. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-O4VJ6CD3.js +0 -9
  474. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-ZV4HHKMB.js +0 -9
  475. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-63CPKGFF.js +0 -9
  476. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-63CPKGFF.mjs +0 -2
  477. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-HUATNLJX.js +0 -9
  478. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-HUATNLJX.mjs +0 -2
  479. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-WTHONI2E.js +0 -9
  480. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-WTHONI2E.mjs +0 -2
  481. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-NJJJXTRR.js +0 -9
  482. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-NJJJXTRR.mjs +0 -2
  483. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-75Q7IDZK.js +0 -9
  484. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-75Q7IDZK.mjs +0 -2
  485. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js +0 -129
  486. package/dist/node_modules/.pnpm/marked@16.1.2/node_modules/marked/lib/marked.esm.js +0 -83
  487. package/dist/node_modules/.pnpm/marked@16.1.2/node_modules/marked/lib/marked.esm.mjs +0 -73
  488. package/dist/node_modules/.pnpm/mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-M3E45YP4.js +0 -30
  489. package/dist/node_modules/.pnpm/mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-YAWTLIQI.js +0 -30
  490. package/dist/node_modules/.pnpm/mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-LHK5PUON.js +0 -41
  491. package/dist/node_modules/.pnpm/mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-5AN5P6BG.js +0 -30
  492. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js +0 -135
  493. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.mjs +0 -132
  494. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js +0 -11
  495. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.mjs +0 -8
  496. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js +0 -8
  497. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.mjs +0 -8
  498. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js +0 -122
  499. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.mjs +0 -111
  500. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js +0 -138
  501. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.mjs +0 -135
  502. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js +0 -113
  503. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.mjs +0 -111
  504. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js +0 -3339
  505. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.mjs +0 -3297
  506. package/src/lib/fuma-search-util.ts +0 -6
  507. package/src/main/gallery-interactive.tsx +0 -171
  508. package/src/main/gallery.tsx +0 -98
  509. /package/dist/clerk/{clerk-page-generator-client.d.ts → clerk-page-context-generator.d.ts} +0 -0
  510. /package/dist/node_modules/.pnpm/{@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.2 → @rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3}/node_modules/tslib/tslib.es6.js +0 -0
  511. /package/dist/node_modules/.pnpm/{@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.2 → @rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3}/node_modules/tslib/tslib.es6.mjs +0 -0
  512. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/acyclic.js +0 -0
  513. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/acyclic.mjs +0 -0
  514. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/add-border-segments.js +0 -0
  515. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/add-border-segments.mjs +0 -0
  516. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/coordinate-system.js +0 -0
  517. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/coordinate-system.mjs +0 -0
  518. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/data/list.js +0 -0
  519. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/data/list.mjs +0 -0
  520. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/greedy-fas.js +0 -0
  521. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/greedy-fas.mjs +0 -0
  522. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/layout.js +0 -0
  523. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/layout.mjs +0 -0
  524. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/nesting-graph.js +0 -0
  525. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/nesting-graph.mjs +0 -0
  526. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/normalize.js +0 -0
  527. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/normalize.mjs +0 -0
  528. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js +0 -0
  529. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.mjs +0 -0
  530. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/barycenter.js +0 -0
  531. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/barycenter.mjs +0 -0
  532. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js +0 -0
  533. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.mjs +0 -0
  534. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/index.js +0 -0
  535. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/index.mjs +0 -0
  536. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/init-order.js +0 -0
  537. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/init-order.mjs +0 -0
  538. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js +0 -0
  539. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.mjs +0 -0
  540. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js +0 -0
  541. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.mjs +0 -0
  542. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/sort.js +0 -0
  543. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/sort.mjs +0 -0
  544. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js +0 -0
  545. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.mjs +0 -0
  546. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/position/index.js +0 -0
  547. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/position/index.mjs +0 -0
  548. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js +0 -0
  549. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.mjs +0 -0
  550. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/rank/index.js +0 -0
  551. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/rank/index.mjs +0 -0
  552. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js +0 -0
  553. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.mjs +0 -0
  554. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/rank/util.js +0 -0
  555. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/rank/util.mjs +0 -0
  556. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/util.js +0 -0
  557. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/util.mjs +0 -0
  558. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/alg/dfs.js +0 -0
  559. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/alg/dfs.mjs +0 -0
  560. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/alg/postorder.js +0 -0
  561. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/alg/postorder.mjs +0 -0
  562. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/alg/preorder.js +0 -0
  563. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/alg/preorder.mjs +0 -0
  564. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/alg/topsort.js +0 -0
  565. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/alg/topsort.mjs +0 -0
  566. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/graph.js +0 -0
  567. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/graph.mjs +0 -0
  568. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/json.js +0 -0
  569. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/json.mjs +0 -0
  570. /package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/dayjs.min.js +0 -0
  571. /package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/dayjs.min.mjs +0 -0
  572. /package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/plugin/advancedFormat.js +0 -0
  573. /package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/plugin/advancedFormat.mjs +0 -0
  574. /package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/plugin/customParseFormat.js +0 -0
  575. /package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/plugin/customParseFormat.mjs +0 -0
  576. /package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/plugin/isoWeek.js +0 -0
  577. /package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/plugin/isoWeek.mjs +0 -0
@@ -1,3339 +0,0 @@
1
- 'use strict';
2
-
3
- var ZodError = require('./ZodError.js');
4
- var errorUtil = require('./helpers/errorUtil.js');
5
- var parseUtil = require('./helpers/parseUtil.js');
6
- var util = require('./helpers/util.js');
7
-
8
- class ParseInputLazyPath {
9
- constructor(parent, value, path, key) {
10
- this._cachedPath = [];
11
- this.parent = parent;
12
- this.data = value;
13
- this._path = path;
14
- this._key = key;
15
- }
16
- get path() {
17
- if (!this._cachedPath.length) {
18
- if (Array.isArray(this._key)) {
19
- this._cachedPath.push(...this._path, ...this._key);
20
- }
21
- else {
22
- this._cachedPath.push(...this._path, this._key);
23
- }
24
- }
25
- return this._cachedPath;
26
- }
27
- }
28
- const handleResult = (ctx, result) => {
29
- if (parseUtil.isValid(result)) {
30
- return { success: true, data: result.value };
31
- }
32
- else {
33
- if (!ctx.common.issues.length) {
34
- throw new Error("Validation failed but no issues detected.");
35
- }
36
- return {
37
- success: false,
38
- get error() {
39
- if (this._error)
40
- return this._error;
41
- const error = new ZodError.ZodError(ctx.common.issues);
42
- this._error = error;
43
- return this._error;
44
- },
45
- };
46
- }
47
- };
48
- function processCreateParams(params) {
49
- if (!params)
50
- return {};
51
- const { errorMap, invalid_type_error, required_error, description } = params;
52
- if (errorMap && (invalid_type_error || required_error)) {
53
- throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
54
- }
55
- if (errorMap)
56
- return { errorMap: errorMap, description };
57
- const customMap = (iss, ctx) => {
58
- const { message } = params;
59
- if (iss.code === "invalid_enum_value") {
60
- return { message: message ?? ctx.defaultError };
61
- }
62
- if (typeof ctx.data === "undefined") {
63
- return { message: message ?? required_error ?? ctx.defaultError };
64
- }
65
- if (iss.code !== "invalid_type")
66
- return { message: ctx.defaultError };
67
- return { message: message ?? invalid_type_error ?? ctx.defaultError };
68
- };
69
- return { errorMap: customMap, description };
70
- }
71
- class ZodType {
72
- get description() {
73
- return this._def.description;
74
- }
75
- _getType(input) {
76
- return util.getParsedType(input.data);
77
- }
78
- _getOrReturnCtx(input, ctx) {
79
- return (ctx || {
80
- common: input.parent.common,
81
- data: input.data,
82
- parsedType: util.getParsedType(input.data),
83
- schemaErrorMap: this._def.errorMap,
84
- path: input.path,
85
- parent: input.parent,
86
- });
87
- }
88
- _processInputParams(input) {
89
- return {
90
- status: new parseUtil.ParseStatus(),
91
- ctx: {
92
- common: input.parent.common,
93
- data: input.data,
94
- parsedType: util.getParsedType(input.data),
95
- schemaErrorMap: this._def.errorMap,
96
- path: input.path,
97
- parent: input.parent,
98
- },
99
- };
100
- }
101
- _parseSync(input) {
102
- const result = this._parse(input);
103
- if (parseUtil.isAsync(result)) {
104
- throw new Error("Synchronous parse encountered promise.");
105
- }
106
- return result;
107
- }
108
- _parseAsync(input) {
109
- const result = this._parse(input);
110
- return Promise.resolve(result);
111
- }
112
- parse(data, params) {
113
- const result = this.safeParse(data, params);
114
- if (result.success)
115
- return result.data;
116
- throw result.error;
117
- }
118
- safeParse(data, params) {
119
- const ctx = {
120
- common: {
121
- issues: [],
122
- async: params?.async ?? false,
123
- contextualErrorMap: params?.errorMap,
124
- },
125
- path: params?.path || [],
126
- schemaErrorMap: this._def.errorMap,
127
- parent: null,
128
- data,
129
- parsedType: util.getParsedType(data),
130
- };
131
- const result = this._parseSync({ data, path: ctx.path, parent: ctx });
132
- return handleResult(ctx, result);
133
- }
134
- "~validate"(data) {
135
- const ctx = {
136
- common: {
137
- issues: [],
138
- async: !!this["~standard"].async,
139
- },
140
- path: [],
141
- schemaErrorMap: this._def.errorMap,
142
- parent: null,
143
- data,
144
- parsedType: util.getParsedType(data),
145
- };
146
- if (!this["~standard"].async) {
147
- try {
148
- const result = this._parseSync({ data, path: [], parent: ctx });
149
- return parseUtil.isValid(result)
150
- ? {
151
- value: result.value,
152
- }
153
- : {
154
- issues: ctx.common.issues,
155
- };
156
- }
157
- catch (err) {
158
- if (err?.message?.toLowerCase()?.includes("encountered")) {
159
- this["~standard"].async = true;
160
- }
161
- ctx.common = {
162
- issues: [],
163
- async: true,
164
- };
165
- }
166
- }
167
- return this._parseAsync({ data, path: [], parent: ctx }).then((result) => parseUtil.isValid(result)
168
- ? {
169
- value: result.value,
170
- }
171
- : {
172
- issues: ctx.common.issues,
173
- });
174
- }
175
- async parseAsync(data, params) {
176
- const result = await this.safeParseAsync(data, params);
177
- if (result.success)
178
- return result.data;
179
- throw result.error;
180
- }
181
- async safeParseAsync(data, params) {
182
- const ctx = {
183
- common: {
184
- issues: [],
185
- contextualErrorMap: params?.errorMap,
186
- async: true,
187
- },
188
- path: params?.path || [],
189
- schemaErrorMap: this._def.errorMap,
190
- parent: null,
191
- data,
192
- parsedType: util.getParsedType(data),
193
- };
194
- const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });
195
- const result = await (parseUtil.isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult));
196
- return handleResult(ctx, result);
197
- }
198
- refine(check, message) {
199
- const getIssueProperties = (val) => {
200
- if (typeof message === "string" || typeof message === "undefined") {
201
- return { message };
202
- }
203
- else if (typeof message === "function") {
204
- return message(val);
205
- }
206
- else {
207
- return message;
208
- }
209
- };
210
- return this._refinement((val, ctx) => {
211
- const result = check(val);
212
- const setError = () => ctx.addIssue({
213
- code: ZodError.ZodIssueCode.custom,
214
- ...getIssueProperties(val),
215
- });
216
- if (typeof Promise !== "undefined" && result instanceof Promise) {
217
- return result.then((data) => {
218
- if (!data) {
219
- setError();
220
- return false;
221
- }
222
- else {
223
- return true;
224
- }
225
- });
226
- }
227
- if (!result) {
228
- setError();
229
- return false;
230
- }
231
- else {
232
- return true;
233
- }
234
- });
235
- }
236
- refinement(check, refinementData) {
237
- return this._refinement((val, ctx) => {
238
- if (!check(val)) {
239
- ctx.addIssue(typeof refinementData === "function" ? refinementData(val, ctx) : refinementData);
240
- return false;
241
- }
242
- else {
243
- return true;
244
- }
245
- });
246
- }
247
- _refinement(refinement) {
248
- return new ZodEffects({
249
- schema: this,
250
- typeName: exports.ZodFirstPartyTypeKind.ZodEffects,
251
- effect: { type: "refinement", refinement },
252
- });
253
- }
254
- superRefine(refinement) {
255
- return this._refinement(refinement);
256
- }
257
- constructor(def) {
258
- /** Alias of safeParseAsync */
259
- this.spa = this.safeParseAsync;
260
- this._def = def;
261
- this.parse = this.parse.bind(this);
262
- this.safeParse = this.safeParse.bind(this);
263
- this.parseAsync = this.parseAsync.bind(this);
264
- this.safeParseAsync = this.safeParseAsync.bind(this);
265
- this.spa = this.spa.bind(this);
266
- this.refine = this.refine.bind(this);
267
- this.refinement = this.refinement.bind(this);
268
- this.superRefine = this.superRefine.bind(this);
269
- this.optional = this.optional.bind(this);
270
- this.nullable = this.nullable.bind(this);
271
- this.nullish = this.nullish.bind(this);
272
- this.array = this.array.bind(this);
273
- this.promise = this.promise.bind(this);
274
- this.or = this.or.bind(this);
275
- this.and = this.and.bind(this);
276
- this.transform = this.transform.bind(this);
277
- this.brand = this.brand.bind(this);
278
- this.default = this.default.bind(this);
279
- this.catch = this.catch.bind(this);
280
- this.describe = this.describe.bind(this);
281
- this.pipe = this.pipe.bind(this);
282
- this.readonly = this.readonly.bind(this);
283
- this.isNullable = this.isNullable.bind(this);
284
- this.isOptional = this.isOptional.bind(this);
285
- this["~standard"] = {
286
- version: 1,
287
- vendor: "zod",
288
- validate: (data) => this["~validate"](data),
289
- };
290
- }
291
- optional() {
292
- return ZodOptional.create(this, this._def);
293
- }
294
- nullable() {
295
- return ZodNullable.create(this, this._def);
296
- }
297
- nullish() {
298
- return this.nullable().optional();
299
- }
300
- array() {
301
- return ZodArray.create(this);
302
- }
303
- promise() {
304
- return ZodPromise.create(this, this._def);
305
- }
306
- or(option) {
307
- return ZodUnion.create([this, option], this._def);
308
- }
309
- and(incoming) {
310
- return ZodIntersection.create(this, incoming, this._def);
311
- }
312
- transform(transform) {
313
- return new ZodEffects({
314
- ...processCreateParams(this._def),
315
- schema: this,
316
- typeName: exports.ZodFirstPartyTypeKind.ZodEffects,
317
- effect: { type: "transform", transform },
318
- });
319
- }
320
- default(def) {
321
- const defaultValueFunc = typeof def === "function" ? def : () => def;
322
- return new ZodDefault({
323
- ...processCreateParams(this._def),
324
- innerType: this,
325
- defaultValue: defaultValueFunc,
326
- typeName: exports.ZodFirstPartyTypeKind.ZodDefault,
327
- });
328
- }
329
- brand() {
330
- return new ZodBranded({
331
- typeName: exports.ZodFirstPartyTypeKind.ZodBranded,
332
- type: this,
333
- ...processCreateParams(this._def),
334
- });
335
- }
336
- catch(def) {
337
- const catchValueFunc = typeof def === "function" ? def : () => def;
338
- return new ZodCatch({
339
- ...processCreateParams(this._def),
340
- innerType: this,
341
- catchValue: catchValueFunc,
342
- typeName: exports.ZodFirstPartyTypeKind.ZodCatch,
343
- });
344
- }
345
- describe(description) {
346
- const This = this.constructor;
347
- return new This({
348
- ...this._def,
349
- description,
350
- });
351
- }
352
- pipe(target) {
353
- return ZodPipeline.create(this, target);
354
- }
355
- readonly() {
356
- return ZodReadonly.create(this);
357
- }
358
- isOptional() {
359
- return this.safeParse(undefined).success;
360
- }
361
- isNullable() {
362
- return this.safeParse(null).success;
363
- }
364
- }
365
- const cuidRegex = /^c[^\s-]{8,}$/i;
366
- const cuid2Regex = /^[0-9a-z]+$/;
367
- const ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;
368
- // const uuidRegex =
369
- // /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;
370
- const uuidRegex = /^[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;
371
- const nanoidRegex = /^[a-z0-9_-]{21}$/i;
372
- const jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;
373
- const durationRegex = /^[-+]?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)?)??$/;
374
- // from https://stackoverflow.com/a/46181/1550155
375
- // old version: too slow, didn't support unicode
376
- // const emailRegex = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i;
377
- //old email regex
378
- // const emailRegex = /^(([^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*)|(".+"))@((?!-)([^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{1,})[^-<>()[\].,;:\s@"]$/i;
379
- // eslint-disable-next-line
380
- // const emailRegex =
381
- // /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((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}))\])|(\[IPv6:(([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})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/;
382
- // const emailRegex =
383
- // /^[a-zA-Z0-9\.\!\#\$\%\&\'\*\+\/\=\?\^\_\`\{\|\}\~\-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
384
- // const emailRegex =
385
- // /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;
386
- const emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
387
- // const emailRegex =
388
- // /^[a-z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-z0-9-]+(?:\.[a-z0-9\-]+)*$/i;
389
- // from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression
390
- const _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
391
- let emojiRegex;
392
- // faster, simpler, safer
393
- const ipv4Regex = /^(?:(?: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])$/;
394
- const ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/;
395
- // const ipv6Regex =
396
- // /^(([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})))$/;
397
- const ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
398
- const ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
399
- // https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript
400
- const base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
401
- // https://base64.guru/standards/base64url
402
- const base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;
403
- // simple
404
- // const dateRegexSource = `\\d{4}-\\d{2}-\\d{2}`;
405
- // no leap year validation
406
- // const dateRegexSource = `\\d{4}-((0[13578]|10|12)-31|(0[13-9]|1[0-2])-30|(0[1-9]|1[0-2])-(0[1-9]|1\\d|2\\d))`;
407
- // with leap year validation
408
- const dateRegexSource = `((\\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])))`;
409
- const dateRegex = new RegExp(`^${dateRegexSource}$`);
410
- function timeRegexSource(args) {
411
- let secondsRegexSource = `[0-5]\\d`;
412
- if (args.precision) {
413
- secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
414
- }
415
- else if (args.precision == null) {
416
- secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
417
- }
418
- const secondsQuantifier = args.precision ? "+" : "?"; // require seconds if precision is nonzero
419
- return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
420
- }
421
- function timeRegex(args) {
422
- return new RegExp(`^${timeRegexSource(args)}$`);
423
- }
424
- // Adapted from https://stackoverflow.com/a/3143231
425
- function datetimeRegex(args) {
426
- let regex = `${dateRegexSource}T${timeRegexSource(args)}`;
427
- const opts = [];
428
- opts.push(args.local ? `Z?` : `Z`);
429
- if (args.offset)
430
- opts.push(`([+-]\\d{2}:?\\d{2})`);
431
- regex = `${regex}(${opts.join("|")})`;
432
- return new RegExp(`^${regex}$`);
433
- }
434
- function isValidIP(ip, version) {
435
- if ((version === "v4" || !version) && ipv4Regex.test(ip)) {
436
- return true;
437
- }
438
- if ((version === "v6" || !version) && ipv6Regex.test(ip)) {
439
- return true;
440
- }
441
- return false;
442
- }
443
- function isValidJWT(jwt, alg) {
444
- if (!jwtRegex.test(jwt))
445
- return false;
446
- try {
447
- const [header] = jwt.split(".");
448
- if (!header)
449
- return false;
450
- // Convert base64url to base64
451
- const base64 = header
452
- .replace(/-/g, "+")
453
- .replace(/_/g, "/")
454
- .padEnd(header.length + ((4 - (header.length % 4)) % 4), "=");
455
- const decoded = JSON.parse(atob(base64));
456
- if (typeof decoded !== "object" || decoded === null)
457
- return false;
458
- if ("typ" in decoded && decoded?.typ !== "JWT")
459
- return false;
460
- if (!decoded.alg)
461
- return false;
462
- if (alg && decoded.alg !== alg)
463
- return false;
464
- return true;
465
- }
466
- catch {
467
- return false;
468
- }
469
- }
470
- function isValidCidr(ip, version) {
471
- if ((version === "v4" || !version) && ipv4CidrRegex.test(ip)) {
472
- return true;
473
- }
474
- if ((version === "v6" || !version) && ipv6CidrRegex.test(ip)) {
475
- return true;
476
- }
477
- return false;
478
- }
479
- class ZodString extends ZodType {
480
- _parse(input) {
481
- if (this._def.coerce) {
482
- input.data = String(input.data);
483
- }
484
- const parsedType = this._getType(input);
485
- if (parsedType !== util.ZodParsedType.string) {
486
- const ctx = this._getOrReturnCtx(input);
487
- parseUtil.addIssueToContext(ctx, {
488
- code: ZodError.ZodIssueCode.invalid_type,
489
- expected: util.ZodParsedType.string,
490
- received: ctx.parsedType,
491
- });
492
- return parseUtil.INVALID;
493
- }
494
- const status = new parseUtil.ParseStatus();
495
- let ctx = undefined;
496
- for (const check of this._def.checks) {
497
- if (check.kind === "min") {
498
- if (input.data.length < check.value) {
499
- ctx = this._getOrReturnCtx(input, ctx);
500
- parseUtil.addIssueToContext(ctx, {
501
- code: ZodError.ZodIssueCode.too_small,
502
- minimum: check.value,
503
- type: "string",
504
- inclusive: true,
505
- exact: false,
506
- message: check.message,
507
- });
508
- status.dirty();
509
- }
510
- }
511
- else if (check.kind === "max") {
512
- if (input.data.length > check.value) {
513
- ctx = this._getOrReturnCtx(input, ctx);
514
- parseUtil.addIssueToContext(ctx, {
515
- code: ZodError.ZodIssueCode.too_big,
516
- maximum: check.value,
517
- type: "string",
518
- inclusive: true,
519
- exact: false,
520
- message: check.message,
521
- });
522
- status.dirty();
523
- }
524
- }
525
- else if (check.kind === "length") {
526
- const tooBig = input.data.length > check.value;
527
- const tooSmall = input.data.length < check.value;
528
- if (tooBig || tooSmall) {
529
- ctx = this._getOrReturnCtx(input, ctx);
530
- if (tooBig) {
531
- parseUtil.addIssueToContext(ctx, {
532
- code: ZodError.ZodIssueCode.too_big,
533
- maximum: check.value,
534
- type: "string",
535
- inclusive: true,
536
- exact: true,
537
- message: check.message,
538
- });
539
- }
540
- else if (tooSmall) {
541
- parseUtil.addIssueToContext(ctx, {
542
- code: ZodError.ZodIssueCode.too_small,
543
- minimum: check.value,
544
- type: "string",
545
- inclusive: true,
546
- exact: true,
547
- message: check.message,
548
- });
549
- }
550
- status.dirty();
551
- }
552
- }
553
- else if (check.kind === "email") {
554
- if (!emailRegex.test(input.data)) {
555
- ctx = this._getOrReturnCtx(input, ctx);
556
- parseUtil.addIssueToContext(ctx, {
557
- validation: "email",
558
- code: ZodError.ZodIssueCode.invalid_string,
559
- message: check.message,
560
- });
561
- status.dirty();
562
- }
563
- }
564
- else if (check.kind === "emoji") {
565
- if (!emojiRegex) {
566
- emojiRegex = new RegExp(_emojiRegex, "u");
567
- }
568
- if (!emojiRegex.test(input.data)) {
569
- ctx = this._getOrReturnCtx(input, ctx);
570
- parseUtil.addIssueToContext(ctx, {
571
- validation: "emoji",
572
- code: ZodError.ZodIssueCode.invalid_string,
573
- message: check.message,
574
- });
575
- status.dirty();
576
- }
577
- }
578
- else if (check.kind === "uuid") {
579
- if (!uuidRegex.test(input.data)) {
580
- ctx = this._getOrReturnCtx(input, ctx);
581
- parseUtil.addIssueToContext(ctx, {
582
- validation: "uuid",
583
- code: ZodError.ZodIssueCode.invalid_string,
584
- message: check.message,
585
- });
586
- status.dirty();
587
- }
588
- }
589
- else if (check.kind === "nanoid") {
590
- if (!nanoidRegex.test(input.data)) {
591
- ctx = this._getOrReturnCtx(input, ctx);
592
- parseUtil.addIssueToContext(ctx, {
593
- validation: "nanoid",
594
- code: ZodError.ZodIssueCode.invalid_string,
595
- message: check.message,
596
- });
597
- status.dirty();
598
- }
599
- }
600
- else if (check.kind === "cuid") {
601
- if (!cuidRegex.test(input.data)) {
602
- ctx = this._getOrReturnCtx(input, ctx);
603
- parseUtil.addIssueToContext(ctx, {
604
- validation: "cuid",
605
- code: ZodError.ZodIssueCode.invalid_string,
606
- message: check.message,
607
- });
608
- status.dirty();
609
- }
610
- }
611
- else if (check.kind === "cuid2") {
612
- if (!cuid2Regex.test(input.data)) {
613
- ctx = this._getOrReturnCtx(input, ctx);
614
- parseUtil.addIssueToContext(ctx, {
615
- validation: "cuid2",
616
- code: ZodError.ZodIssueCode.invalid_string,
617
- message: check.message,
618
- });
619
- status.dirty();
620
- }
621
- }
622
- else if (check.kind === "ulid") {
623
- if (!ulidRegex.test(input.data)) {
624
- ctx = this._getOrReturnCtx(input, ctx);
625
- parseUtil.addIssueToContext(ctx, {
626
- validation: "ulid",
627
- code: ZodError.ZodIssueCode.invalid_string,
628
- message: check.message,
629
- });
630
- status.dirty();
631
- }
632
- }
633
- else if (check.kind === "url") {
634
- try {
635
- new URL(input.data);
636
- }
637
- catch {
638
- ctx = this._getOrReturnCtx(input, ctx);
639
- parseUtil.addIssueToContext(ctx, {
640
- validation: "url",
641
- code: ZodError.ZodIssueCode.invalid_string,
642
- message: check.message,
643
- });
644
- status.dirty();
645
- }
646
- }
647
- else if (check.kind === "regex") {
648
- check.regex.lastIndex = 0;
649
- const testResult = check.regex.test(input.data);
650
- if (!testResult) {
651
- ctx = this._getOrReturnCtx(input, ctx);
652
- parseUtil.addIssueToContext(ctx, {
653
- validation: "regex",
654
- code: ZodError.ZodIssueCode.invalid_string,
655
- message: check.message,
656
- });
657
- status.dirty();
658
- }
659
- }
660
- else if (check.kind === "trim") {
661
- input.data = input.data.trim();
662
- }
663
- else if (check.kind === "includes") {
664
- if (!input.data.includes(check.value, check.position)) {
665
- ctx = this._getOrReturnCtx(input, ctx);
666
- parseUtil.addIssueToContext(ctx, {
667
- code: ZodError.ZodIssueCode.invalid_string,
668
- validation: { includes: check.value, position: check.position },
669
- message: check.message,
670
- });
671
- status.dirty();
672
- }
673
- }
674
- else if (check.kind === "toLowerCase") {
675
- input.data = input.data.toLowerCase();
676
- }
677
- else if (check.kind === "toUpperCase") {
678
- input.data = input.data.toUpperCase();
679
- }
680
- else if (check.kind === "startsWith") {
681
- if (!input.data.startsWith(check.value)) {
682
- ctx = this._getOrReturnCtx(input, ctx);
683
- parseUtil.addIssueToContext(ctx, {
684
- code: ZodError.ZodIssueCode.invalid_string,
685
- validation: { startsWith: check.value },
686
- message: check.message,
687
- });
688
- status.dirty();
689
- }
690
- }
691
- else if (check.kind === "endsWith") {
692
- if (!input.data.endsWith(check.value)) {
693
- ctx = this._getOrReturnCtx(input, ctx);
694
- parseUtil.addIssueToContext(ctx, {
695
- code: ZodError.ZodIssueCode.invalid_string,
696
- validation: { endsWith: check.value },
697
- message: check.message,
698
- });
699
- status.dirty();
700
- }
701
- }
702
- else if (check.kind === "datetime") {
703
- const regex = datetimeRegex(check);
704
- if (!regex.test(input.data)) {
705
- ctx = this._getOrReturnCtx(input, ctx);
706
- parseUtil.addIssueToContext(ctx, {
707
- code: ZodError.ZodIssueCode.invalid_string,
708
- validation: "datetime",
709
- message: check.message,
710
- });
711
- status.dirty();
712
- }
713
- }
714
- else if (check.kind === "date") {
715
- const regex = dateRegex;
716
- if (!regex.test(input.data)) {
717
- ctx = this._getOrReturnCtx(input, ctx);
718
- parseUtil.addIssueToContext(ctx, {
719
- code: ZodError.ZodIssueCode.invalid_string,
720
- validation: "date",
721
- message: check.message,
722
- });
723
- status.dirty();
724
- }
725
- }
726
- else if (check.kind === "time") {
727
- const regex = timeRegex(check);
728
- if (!regex.test(input.data)) {
729
- ctx = this._getOrReturnCtx(input, ctx);
730
- parseUtil.addIssueToContext(ctx, {
731
- code: ZodError.ZodIssueCode.invalid_string,
732
- validation: "time",
733
- message: check.message,
734
- });
735
- status.dirty();
736
- }
737
- }
738
- else if (check.kind === "duration") {
739
- if (!durationRegex.test(input.data)) {
740
- ctx = this._getOrReturnCtx(input, ctx);
741
- parseUtil.addIssueToContext(ctx, {
742
- validation: "duration",
743
- code: ZodError.ZodIssueCode.invalid_string,
744
- message: check.message,
745
- });
746
- status.dirty();
747
- }
748
- }
749
- else if (check.kind === "ip") {
750
- if (!isValidIP(input.data, check.version)) {
751
- ctx = this._getOrReturnCtx(input, ctx);
752
- parseUtil.addIssueToContext(ctx, {
753
- validation: "ip",
754
- code: ZodError.ZodIssueCode.invalid_string,
755
- message: check.message,
756
- });
757
- status.dirty();
758
- }
759
- }
760
- else if (check.kind === "jwt") {
761
- if (!isValidJWT(input.data, check.alg)) {
762
- ctx = this._getOrReturnCtx(input, ctx);
763
- parseUtil.addIssueToContext(ctx, {
764
- validation: "jwt",
765
- code: ZodError.ZodIssueCode.invalid_string,
766
- message: check.message,
767
- });
768
- status.dirty();
769
- }
770
- }
771
- else if (check.kind === "cidr") {
772
- if (!isValidCidr(input.data, check.version)) {
773
- ctx = this._getOrReturnCtx(input, ctx);
774
- parseUtil.addIssueToContext(ctx, {
775
- validation: "cidr",
776
- code: ZodError.ZodIssueCode.invalid_string,
777
- message: check.message,
778
- });
779
- status.dirty();
780
- }
781
- }
782
- else if (check.kind === "base64") {
783
- if (!base64Regex.test(input.data)) {
784
- ctx = this._getOrReturnCtx(input, ctx);
785
- parseUtil.addIssueToContext(ctx, {
786
- validation: "base64",
787
- code: ZodError.ZodIssueCode.invalid_string,
788
- message: check.message,
789
- });
790
- status.dirty();
791
- }
792
- }
793
- else if (check.kind === "base64url") {
794
- if (!base64urlRegex.test(input.data)) {
795
- ctx = this._getOrReturnCtx(input, ctx);
796
- parseUtil.addIssueToContext(ctx, {
797
- validation: "base64url",
798
- code: ZodError.ZodIssueCode.invalid_string,
799
- message: check.message,
800
- });
801
- status.dirty();
802
- }
803
- }
804
- else {
805
- util.util.assertNever(check);
806
- }
807
- }
808
- return { status: status.value, value: input.data };
809
- }
810
- _regex(regex, validation, message) {
811
- return this.refinement((data) => regex.test(data), {
812
- validation,
813
- code: ZodError.ZodIssueCode.invalid_string,
814
- ...errorUtil.errorUtil.errToObj(message),
815
- });
816
- }
817
- _addCheck(check) {
818
- return new ZodString({
819
- ...this._def,
820
- checks: [...this._def.checks, check],
821
- });
822
- }
823
- email(message) {
824
- return this._addCheck({ kind: "email", ...errorUtil.errorUtil.errToObj(message) });
825
- }
826
- url(message) {
827
- return this._addCheck({ kind: "url", ...errorUtil.errorUtil.errToObj(message) });
828
- }
829
- emoji(message) {
830
- return this._addCheck({ kind: "emoji", ...errorUtil.errorUtil.errToObj(message) });
831
- }
832
- uuid(message) {
833
- return this._addCheck({ kind: "uuid", ...errorUtil.errorUtil.errToObj(message) });
834
- }
835
- nanoid(message) {
836
- return this._addCheck({ kind: "nanoid", ...errorUtil.errorUtil.errToObj(message) });
837
- }
838
- cuid(message) {
839
- return this._addCheck({ kind: "cuid", ...errorUtil.errorUtil.errToObj(message) });
840
- }
841
- cuid2(message) {
842
- return this._addCheck({ kind: "cuid2", ...errorUtil.errorUtil.errToObj(message) });
843
- }
844
- ulid(message) {
845
- return this._addCheck({ kind: "ulid", ...errorUtil.errorUtil.errToObj(message) });
846
- }
847
- base64(message) {
848
- return this._addCheck({ kind: "base64", ...errorUtil.errorUtil.errToObj(message) });
849
- }
850
- base64url(message) {
851
- // base64url encoding is a modification of base64 that can safely be used in URLs and filenames
852
- return this._addCheck({
853
- kind: "base64url",
854
- ...errorUtil.errorUtil.errToObj(message),
855
- });
856
- }
857
- jwt(options) {
858
- return this._addCheck({ kind: "jwt", ...errorUtil.errorUtil.errToObj(options) });
859
- }
860
- ip(options) {
861
- return this._addCheck({ kind: "ip", ...errorUtil.errorUtil.errToObj(options) });
862
- }
863
- cidr(options) {
864
- return this._addCheck({ kind: "cidr", ...errorUtil.errorUtil.errToObj(options) });
865
- }
866
- datetime(options) {
867
- if (typeof options === "string") {
868
- return this._addCheck({
869
- kind: "datetime",
870
- precision: null,
871
- offset: false,
872
- local: false,
873
- message: options,
874
- });
875
- }
876
- return this._addCheck({
877
- kind: "datetime",
878
- precision: typeof options?.precision === "undefined" ? null : options?.precision,
879
- offset: options?.offset ?? false,
880
- local: options?.local ?? false,
881
- ...errorUtil.errorUtil.errToObj(options?.message),
882
- });
883
- }
884
- date(message) {
885
- return this._addCheck({ kind: "date", message });
886
- }
887
- time(options) {
888
- if (typeof options === "string") {
889
- return this._addCheck({
890
- kind: "time",
891
- precision: null,
892
- message: options,
893
- });
894
- }
895
- return this._addCheck({
896
- kind: "time",
897
- precision: typeof options?.precision === "undefined" ? null : options?.precision,
898
- ...errorUtil.errorUtil.errToObj(options?.message),
899
- });
900
- }
901
- duration(message) {
902
- return this._addCheck({ kind: "duration", ...errorUtil.errorUtil.errToObj(message) });
903
- }
904
- regex(regex, message) {
905
- return this._addCheck({
906
- kind: "regex",
907
- regex: regex,
908
- ...errorUtil.errorUtil.errToObj(message),
909
- });
910
- }
911
- includes(value, options) {
912
- return this._addCheck({
913
- kind: "includes",
914
- value: value,
915
- position: options?.position,
916
- ...errorUtil.errorUtil.errToObj(options?.message),
917
- });
918
- }
919
- startsWith(value, message) {
920
- return this._addCheck({
921
- kind: "startsWith",
922
- value: value,
923
- ...errorUtil.errorUtil.errToObj(message),
924
- });
925
- }
926
- endsWith(value, message) {
927
- return this._addCheck({
928
- kind: "endsWith",
929
- value: value,
930
- ...errorUtil.errorUtil.errToObj(message),
931
- });
932
- }
933
- min(minLength, message) {
934
- return this._addCheck({
935
- kind: "min",
936
- value: minLength,
937
- ...errorUtil.errorUtil.errToObj(message),
938
- });
939
- }
940
- max(maxLength, message) {
941
- return this._addCheck({
942
- kind: "max",
943
- value: maxLength,
944
- ...errorUtil.errorUtil.errToObj(message),
945
- });
946
- }
947
- length(len, message) {
948
- return this._addCheck({
949
- kind: "length",
950
- value: len,
951
- ...errorUtil.errorUtil.errToObj(message),
952
- });
953
- }
954
- /**
955
- * Equivalent to `.min(1)`
956
- */
957
- nonempty(message) {
958
- return this.min(1, errorUtil.errorUtil.errToObj(message));
959
- }
960
- trim() {
961
- return new ZodString({
962
- ...this._def,
963
- checks: [...this._def.checks, { kind: "trim" }],
964
- });
965
- }
966
- toLowerCase() {
967
- return new ZodString({
968
- ...this._def,
969
- checks: [...this._def.checks, { kind: "toLowerCase" }],
970
- });
971
- }
972
- toUpperCase() {
973
- return new ZodString({
974
- ...this._def,
975
- checks: [...this._def.checks, { kind: "toUpperCase" }],
976
- });
977
- }
978
- get isDatetime() {
979
- return !!this._def.checks.find((ch) => ch.kind === "datetime");
980
- }
981
- get isDate() {
982
- return !!this._def.checks.find((ch) => ch.kind === "date");
983
- }
984
- get isTime() {
985
- return !!this._def.checks.find((ch) => ch.kind === "time");
986
- }
987
- get isDuration() {
988
- return !!this._def.checks.find((ch) => ch.kind === "duration");
989
- }
990
- get isEmail() {
991
- return !!this._def.checks.find((ch) => ch.kind === "email");
992
- }
993
- get isURL() {
994
- return !!this._def.checks.find((ch) => ch.kind === "url");
995
- }
996
- get isEmoji() {
997
- return !!this._def.checks.find((ch) => ch.kind === "emoji");
998
- }
999
- get isUUID() {
1000
- return !!this._def.checks.find((ch) => ch.kind === "uuid");
1001
- }
1002
- get isNANOID() {
1003
- return !!this._def.checks.find((ch) => ch.kind === "nanoid");
1004
- }
1005
- get isCUID() {
1006
- return !!this._def.checks.find((ch) => ch.kind === "cuid");
1007
- }
1008
- get isCUID2() {
1009
- return !!this._def.checks.find((ch) => ch.kind === "cuid2");
1010
- }
1011
- get isULID() {
1012
- return !!this._def.checks.find((ch) => ch.kind === "ulid");
1013
- }
1014
- get isIP() {
1015
- return !!this._def.checks.find((ch) => ch.kind === "ip");
1016
- }
1017
- get isCIDR() {
1018
- return !!this._def.checks.find((ch) => ch.kind === "cidr");
1019
- }
1020
- get isBase64() {
1021
- return !!this._def.checks.find((ch) => ch.kind === "base64");
1022
- }
1023
- get isBase64url() {
1024
- // base64url encoding is a modification of base64 that can safely be used in URLs and filenames
1025
- return !!this._def.checks.find((ch) => ch.kind === "base64url");
1026
- }
1027
- get minLength() {
1028
- let min = null;
1029
- for (const ch of this._def.checks) {
1030
- if (ch.kind === "min") {
1031
- if (min === null || ch.value > min)
1032
- min = ch.value;
1033
- }
1034
- }
1035
- return min;
1036
- }
1037
- get maxLength() {
1038
- let max = null;
1039
- for (const ch of this._def.checks) {
1040
- if (ch.kind === "max") {
1041
- if (max === null || ch.value < max)
1042
- max = ch.value;
1043
- }
1044
- }
1045
- return max;
1046
- }
1047
- }
1048
- ZodString.create = (params) => {
1049
- return new ZodString({
1050
- checks: [],
1051
- typeName: exports.ZodFirstPartyTypeKind.ZodString,
1052
- coerce: params?.coerce ?? false,
1053
- ...processCreateParams(params),
1054
- });
1055
- };
1056
- // https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034
1057
- function floatSafeRemainder(val, step) {
1058
- const valDecCount = (val.toString().split(".")[1] || "").length;
1059
- const stepDecCount = (step.toString().split(".")[1] || "").length;
1060
- const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
1061
- const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
1062
- const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
1063
- return (valInt % stepInt) / 10 ** decCount;
1064
- }
1065
- class ZodNumber extends ZodType {
1066
- constructor() {
1067
- super(...arguments);
1068
- this.min = this.gte;
1069
- this.max = this.lte;
1070
- this.step = this.multipleOf;
1071
- }
1072
- _parse(input) {
1073
- if (this._def.coerce) {
1074
- input.data = Number(input.data);
1075
- }
1076
- const parsedType = this._getType(input);
1077
- if (parsedType !== util.ZodParsedType.number) {
1078
- const ctx = this._getOrReturnCtx(input);
1079
- parseUtil.addIssueToContext(ctx, {
1080
- code: ZodError.ZodIssueCode.invalid_type,
1081
- expected: util.ZodParsedType.number,
1082
- received: ctx.parsedType,
1083
- });
1084
- return parseUtil.INVALID;
1085
- }
1086
- let ctx = undefined;
1087
- const status = new parseUtil.ParseStatus();
1088
- for (const check of this._def.checks) {
1089
- if (check.kind === "int") {
1090
- if (!util.util.isInteger(input.data)) {
1091
- ctx = this._getOrReturnCtx(input, ctx);
1092
- parseUtil.addIssueToContext(ctx, {
1093
- code: ZodError.ZodIssueCode.invalid_type,
1094
- expected: "integer",
1095
- received: "float",
1096
- message: check.message,
1097
- });
1098
- status.dirty();
1099
- }
1100
- }
1101
- else if (check.kind === "min") {
1102
- const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;
1103
- if (tooSmall) {
1104
- ctx = this._getOrReturnCtx(input, ctx);
1105
- parseUtil.addIssueToContext(ctx, {
1106
- code: ZodError.ZodIssueCode.too_small,
1107
- minimum: check.value,
1108
- type: "number",
1109
- inclusive: check.inclusive,
1110
- exact: false,
1111
- message: check.message,
1112
- });
1113
- status.dirty();
1114
- }
1115
- }
1116
- else if (check.kind === "max") {
1117
- const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;
1118
- if (tooBig) {
1119
- ctx = this._getOrReturnCtx(input, ctx);
1120
- parseUtil.addIssueToContext(ctx, {
1121
- code: ZodError.ZodIssueCode.too_big,
1122
- maximum: check.value,
1123
- type: "number",
1124
- inclusive: check.inclusive,
1125
- exact: false,
1126
- message: check.message,
1127
- });
1128
- status.dirty();
1129
- }
1130
- }
1131
- else if (check.kind === "multipleOf") {
1132
- if (floatSafeRemainder(input.data, check.value) !== 0) {
1133
- ctx = this._getOrReturnCtx(input, ctx);
1134
- parseUtil.addIssueToContext(ctx, {
1135
- code: ZodError.ZodIssueCode.not_multiple_of,
1136
- multipleOf: check.value,
1137
- message: check.message,
1138
- });
1139
- status.dirty();
1140
- }
1141
- }
1142
- else if (check.kind === "finite") {
1143
- if (!Number.isFinite(input.data)) {
1144
- ctx = this._getOrReturnCtx(input, ctx);
1145
- parseUtil.addIssueToContext(ctx, {
1146
- code: ZodError.ZodIssueCode.not_finite,
1147
- message: check.message,
1148
- });
1149
- status.dirty();
1150
- }
1151
- }
1152
- else {
1153
- util.util.assertNever(check);
1154
- }
1155
- }
1156
- return { status: status.value, value: input.data };
1157
- }
1158
- gte(value, message) {
1159
- return this.setLimit("min", value, true, errorUtil.errorUtil.toString(message));
1160
- }
1161
- gt(value, message) {
1162
- return this.setLimit("min", value, false, errorUtil.errorUtil.toString(message));
1163
- }
1164
- lte(value, message) {
1165
- return this.setLimit("max", value, true, errorUtil.errorUtil.toString(message));
1166
- }
1167
- lt(value, message) {
1168
- return this.setLimit("max", value, false, errorUtil.errorUtil.toString(message));
1169
- }
1170
- setLimit(kind, value, inclusive, message) {
1171
- return new ZodNumber({
1172
- ...this._def,
1173
- checks: [
1174
- ...this._def.checks,
1175
- {
1176
- kind,
1177
- value,
1178
- inclusive,
1179
- message: errorUtil.errorUtil.toString(message),
1180
- },
1181
- ],
1182
- });
1183
- }
1184
- _addCheck(check) {
1185
- return new ZodNumber({
1186
- ...this._def,
1187
- checks: [...this._def.checks, check],
1188
- });
1189
- }
1190
- int(message) {
1191
- return this._addCheck({
1192
- kind: "int",
1193
- message: errorUtil.errorUtil.toString(message),
1194
- });
1195
- }
1196
- positive(message) {
1197
- return this._addCheck({
1198
- kind: "min",
1199
- value: 0,
1200
- inclusive: false,
1201
- message: errorUtil.errorUtil.toString(message),
1202
- });
1203
- }
1204
- negative(message) {
1205
- return this._addCheck({
1206
- kind: "max",
1207
- value: 0,
1208
- inclusive: false,
1209
- message: errorUtil.errorUtil.toString(message),
1210
- });
1211
- }
1212
- nonpositive(message) {
1213
- return this._addCheck({
1214
- kind: "max",
1215
- value: 0,
1216
- inclusive: true,
1217
- message: errorUtil.errorUtil.toString(message),
1218
- });
1219
- }
1220
- nonnegative(message) {
1221
- return this._addCheck({
1222
- kind: "min",
1223
- value: 0,
1224
- inclusive: true,
1225
- message: errorUtil.errorUtil.toString(message),
1226
- });
1227
- }
1228
- multipleOf(value, message) {
1229
- return this._addCheck({
1230
- kind: "multipleOf",
1231
- value: value,
1232
- message: errorUtil.errorUtil.toString(message),
1233
- });
1234
- }
1235
- finite(message) {
1236
- return this._addCheck({
1237
- kind: "finite",
1238
- message: errorUtil.errorUtil.toString(message),
1239
- });
1240
- }
1241
- safe(message) {
1242
- return this._addCheck({
1243
- kind: "min",
1244
- inclusive: true,
1245
- value: Number.MIN_SAFE_INTEGER,
1246
- message: errorUtil.errorUtil.toString(message),
1247
- })._addCheck({
1248
- kind: "max",
1249
- inclusive: true,
1250
- value: Number.MAX_SAFE_INTEGER,
1251
- message: errorUtil.errorUtil.toString(message),
1252
- });
1253
- }
1254
- get minValue() {
1255
- let min = null;
1256
- for (const ch of this._def.checks) {
1257
- if (ch.kind === "min") {
1258
- if (min === null || ch.value > min)
1259
- min = ch.value;
1260
- }
1261
- }
1262
- return min;
1263
- }
1264
- get maxValue() {
1265
- let max = null;
1266
- for (const ch of this._def.checks) {
1267
- if (ch.kind === "max") {
1268
- if (max === null || ch.value < max)
1269
- max = ch.value;
1270
- }
1271
- }
1272
- return max;
1273
- }
1274
- get isInt() {
1275
- return !!this._def.checks.find((ch) => ch.kind === "int" || (ch.kind === "multipleOf" && util.util.isInteger(ch.value)));
1276
- }
1277
- get isFinite() {
1278
- let max = null;
1279
- let min = null;
1280
- for (const ch of this._def.checks) {
1281
- if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
1282
- return true;
1283
- }
1284
- else if (ch.kind === "min") {
1285
- if (min === null || ch.value > min)
1286
- min = ch.value;
1287
- }
1288
- else if (ch.kind === "max") {
1289
- if (max === null || ch.value < max)
1290
- max = ch.value;
1291
- }
1292
- }
1293
- return Number.isFinite(min) && Number.isFinite(max);
1294
- }
1295
- }
1296
- ZodNumber.create = (params) => {
1297
- return new ZodNumber({
1298
- checks: [],
1299
- typeName: exports.ZodFirstPartyTypeKind.ZodNumber,
1300
- coerce: params?.coerce || false,
1301
- ...processCreateParams(params),
1302
- });
1303
- };
1304
- class ZodBigInt extends ZodType {
1305
- constructor() {
1306
- super(...arguments);
1307
- this.min = this.gte;
1308
- this.max = this.lte;
1309
- }
1310
- _parse(input) {
1311
- if (this._def.coerce) {
1312
- try {
1313
- input.data = BigInt(input.data);
1314
- }
1315
- catch {
1316
- return this._getInvalidInput(input);
1317
- }
1318
- }
1319
- const parsedType = this._getType(input);
1320
- if (parsedType !== util.ZodParsedType.bigint) {
1321
- return this._getInvalidInput(input);
1322
- }
1323
- let ctx = undefined;
1324
- const status = new parseUtil.ParseStatus();
1325
- for (const check of this._def.checks) {
1326
- if (check.kind === "min") {
1327
- const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;
1328
- if (tooSmall) {
1329
- ctx = this._getOrReturnCtx(input, ctx);
1330
- parseUtil.addIssueToContext(ctx, {
1331
- code: ZodError.ZodIssueCode.too_small,
1332
- type: "bigint",
1333
- minimum: check.value,
1334
- inclusive: check.inclusive,
1335
- message: check.message,
1336
- });
1337
- status.dirty();
1338
- }
1339
- }
1340
- else if (check.kind === "max") {
1341
- const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;
1342
- if (tooBig) {
1343
- ctx = this._getOrReturnCtx(input, ctx);
1344
- parseUtil.addIssueToContext(ctx, {
1345
- code: ZodError.ZodIssueCode.too_big,
1346
- type: "bigint",
1347
- maximum: check.value,
1348
- inclusive: check.inclusive,
1349
- message: check.message,
1350
- });
1351
- status.dirty();
1352
- }
1353
- }
1354
- else if (check.kind === "multipleOf") {
1355
- if (input.data % check.value !== BigInt(0)) {
1356
- ctx = this._getOrReturnCtx(input, ctx);
1357
- parseUtil.addIssueToContext(ctx, {
1358
- code: ZodError.ZodIssueCode.not_multiple_of,
1359
- multipleOf: check.value,
1360
- message: check.message,
1361
- });
1362
- status.dirty();
1363
- }
1364
- }
1365
- else {
1366
- util.util.assertNever(check);
1367
- }
1368
- }
1369
- return { status: status.value, value: input.data };
1370
- }
1371
- _getInvalidInput(input) {
1372
- const ctx = this._getOrReturnCtx(input);
1373
- parseUtil.addIssueToContext(ctx, {
1374
- code: ZodError.ZodIssueCode.invalid_type,
1375
- expected: util.ZodParsedType.bigint,
1376
- received: ctx.parsedType,
1377
- });
1378
- return parseUtil.INVALID;
1379
- }
1380
- gte(value, message) {
1381
- return this.setLimit("min", value, true, errorUtil.errorUtil.toString(message));
1382
- }
1383
- gt(value, message) {
1384
- return this.setLimit("min", value, false, errorUtil.errorUtil.toString(message));
1385
- }
1386
- lte(value, message) {
1387
- return this.setLimit("max", value, true, errorUtil.errorUtil.toString(message));
1388
- }
1389
- lt(value, message) {
1390
- return this.setLimit("max", value, false, errorUtil.errorUtil.toString(message));
1391
- }
1392
- setLimit(kind, value, inclusive, message) {
1393
- return new ZodBigInt({
1394
- ...this._def,
1395
- checks: [
1396
- ...this._def.checks,
1397
- {
1398
- kind,
1399
- value,
1400
- inclusive,
1401
- message: errorUtil.errorUtil.toString(message),
1402
- },
1403
- ],
1404
- });
1405
- }
1406
- _addCheck(check) {
1407
- return new ZodBigInt({
1408
- ...this._def,
1409
- checks: [...this._def.checks, check],
1410
- });
1411
- }
1412
- positive(message) {
1413
- return this._addCheck({
1414
- kind: "min",
1415
- value: BigInt(0),
1416
- inclusive: false,
1417
- message: errorUtil.errorUtil.toString(message),
1418
- });
1419
- }
1420
- negative(message) {
1421
- return this._addCheck({
1422
- kind: "max",
1423
- value: BigInt(0),
1424
- inclusive: false,
1425
- message: errorUtil.errorUtil.toString(message),
1426
- });
1427
- }
1428
- nonpositive(message) {
1429
- return this._addCheck({
1430
- kind: "max",
1431
- value: BigInt(0),
1432
- inclusive: true,
1433
- message: errorUtil.errorUtil.toString(message),
1434
- });
1435
- }
1436
- nonnegative(message) {
1437
- return this._addCheck({
1438
- kind: "min",
1439
- value: BigInt(0),
1440
- inclusive: true,
1441
- message: errorUtil.errorUtil.toString(message),
1442
- });
1443
- }
1444
- multipleOf(value, message) {
1445
- return this._addCheck({
1446
- kind: "multipleOf",
1447
- value,
1448
- message: errorUtil.errorUtil.toString(message),
1449
- });
1450
- }
1451
- get minValue() {
1452
- let min = null;
1453
- for (const ch of this._def.checks) {
1454
- if (ch.kind === "min") {
1455
- if (min === null || ch.value > min)
1456
- min = ch.value;
1457
- }
1458
- }
1459
- return min;
1460
- }
1461
- get maxValue() {
1462
- let max = null;
1463
- for (const ch of this._def.checks) {
1464
- if (ch.kind === "max") {
1465
- if (max === null || ch.value < max)
1466
- max = ch.value;
1467
- }
1468
- }
1469
- return max;
1470
- }
1471
- }
1472
- ZodBigInt.create = (params) => {
1473
- return new ZodBigInt({
1474
- checks: [],
1475
- typeName: exports.ZodFirstPartyTypeKind.ZodBigInt,
1476
- coerce: params?.coerce ?? false,
1477
- ...processCreateParams(params),
1478
- });
1479
- };
1480
- class ZodBoolean extends ZodType {
1481
- _parse(input) {
1482
- if (this._def.coerce) {
1483
- input.data = Boolean(input.data);
1484
- }
1485
- const parsedType = this._getType(input);
1486
- if (parsedType !== util.ZodParsedType.boolean) {
1487
- const ctx = this._getOrReturnCtx(input);
1488
- parseUtil.addIssueToContext(ctx, {
1489
- code: ZodError.ZodIssueCode.invalid_type,
1490
- expected: util.ZodParsedType.boolean,
1491
- received: ctx.parsedType,
1492
- });
1493
- return parseUtil.INVALID;
1494
- }
1495
- return parseUtil.OK(input.data);
1496
- }
1497
- }
1498
- ZodBoolean.create = (params) => {
1499
- return new ZodBoolean({
1500
- typeName: exports.ZodFirstPartyTypeKind.ZodBoolean,
1501
- coerce: params?.coerce || false,
1502
- ...processCreateParams(params),
1503
- });
1504
- };
1505
- class ZodDate extends ZodType {
1506
- _parse(input) {
1507
- if (this._def.coerce) {
1508
- input.data = new Date(input.data);
1509
- }
1510
- const parsedType = this._getType(input);
1511
- if (parsedType !== util.ZodParsedType.date) {
1512
- const ctx = this._getOrReturnCtx(input);
1513
- parseUtil.addIssueToContext(ctx, {
1514
- code: ZodError.ZodIssueCode.invalid_type,
1515
- expected: util.ZodParsedType.date,
1516
- received: ctx.parsedType,
1517
- });
1518
- return parseUtil.INVALID;
1519
- }
1520
- if (Number.isNaN(input.data.getTime())) {
1521
- const ctx = this._getOrReturnCtx(input);
1522
- parseUtil.addIssueToContext(ctx, {
1523
- code: ZodError.ZodIssueCode.invalid_date,
1524
- });
1525
- return parseUtil.INVALID;
1526
- }
1527
- const status = new parseUtil.ParseStatus();
1528
- let ctx = undefined;
1529
- for (const check of this._def.checks) {
1530
- if (check.kind === "min") {
1531
- if (input.data.getTime() < check.value) {
1532
- ctx = this._getOrReturnCtx(input, ctx);
1533
- parseUtil.addIssueToContext(ctx, {
1534
- code: ZodError.ZodIssueCode.too_small,
1535
- message: check.message,
1536
- inclusive: true,
1537
- exact: false,
1538
- minimum: check.value,
1539
- type: "date",
1540
- });
1541
- status.dirty();
1542
- }
1543
- }
1544
- else if (check.kind === "max") {
1545
- if (input.data.getTime() > check.value) {
1546
- ctx = this._getOrReturnCtx(input, ctx);
1547
- parseUtil.addIssueToContext(ctx, {
1548
- code: ZodError.ZodIssueCode.too_big,
1549
- message: check.message,
1550
- inclusive: true,
1551
- exact: false,
1552
- maximum: check.value,
1553
- type: "date",
1554
- });
1555
- status.dirty();
1556
- }
1557
- }
1558
- else {
1559
- util.util.assertNever(check);
1560
- }
1561
- }
1562
- return {
1563
- status: status.value,
1564
- value: new Date(input.data.getTime()),
1565
- };
1566
- }
1567
- _addCheck(check) {
1568
- return new ZodDate({
1569
- ...this._def,
1570
- checks: [...this._def.checks, check],
1571
- });
1572
- }
1573
- min(minDate, message) {
1574
- return this._addCheck({
1575
- kind: "min",
1576
- value: minDate.getTime(),
1577
- message: errorUtil.errorUtil.toString(message),
1578
- });
1579
- }
1580
- max(maxDate, message) {
1581
- return this._addCheck({
1582
- kind: "max",
1583
- value: maxDate.getTime(),
1584
- message: errorUtil.errorUtil.toString(message),
1585
- });
1586
- }
1587
- get minDate() {
1588
- let min = null;
1589
- for (const ch of this._def.checks) {
1590
- if (ch.kind === "min") {
1591
- if (min === null || ch.value > min)
1592
- min = ch.value;
1593
- }
1594
- }
1595
- return min != null ? new Date(min) : null;
1596
- }
1597
- get maxDate() {
1598
- let max = null;
1599
- for (const ch of this._def.checks) {
1600
- if (ch.kind === "max") {
1601
- if (max === null || ch.value < max)
1602
- max = ch.value;
1603
- }
1604
- }
1605
- return max != null ? new Date(max) : null;
1606
- }
1607
- }
1608
- ZodDate.create = (params) => {
1609
- return new ZodDate({
1610
- checks: [],
1611
- coerce: params?.coerce || false,
1612
- typeName: exports.ZodFirstPartyTypeKind.ZodDate,
1613
- ...processCreateParams(params),
1614
- });
1615
- };
1616
- class ZodSymbol extends ZodType {
1617
- _parse(input) {
1618
- const parsedType = this._getType(input);
1619
- if (parsedType !== util.ZodParsedType.symbol) {
1620
- const ctx = this._getOrReturnCtx(input);
1621
- parseUtil.addIssueToContext(ctx, {
1622
- code: ZodError.ZodIssueCode.invalid_type,
1623
- expected: util.ZodParsedType.symbol,
1624
- received: ctx.parsedType,
1625
- });
1626
- return parseUtil.INVALID;
1627
- }
1628
- return parseUtil.OK(input.data);
1629
- }
1630
- }
1631
- ZodSymbol.create = (params) => {
1632
- return new ZodSymbol({
1633
- typeName: exports.ZodFirstPartyTypeKind.ZodSymbol,
1634
- ...processCreateParams(params),
1635
- });
1636
- };
1637
- class ZodUndefined extends ZodType {
1638
- _parse(input) {
1639
- const parsedType = this._getType(input);
1640
- if (parsedType !== util.ZodParsedType.undefined) {
1641
- const ctx = this._getOrReturnCtx(input);
1642
- parseUtil.addIssueToContext(ctx, {
1643
- code: ZodError.ZodIssueCode.invalid_type,
1644
- expected: util.ZodParsedType.undefined,
1645
- received: ctx.parsedType,
1646
- });
1647
- return parseUtil.INVALID;
1648
- }
1649
- return parseUtil.OK(input.data);
1650
- }
1651
- }
1652
- ZodUndefined.create = (params) => {
1653
- return new ZodUndefined({
1654
- typeName: exports.ZodFirstPartyTypeKind.ZodUndefined,
1655
- ...processCreateParams(params),
1656
- });
1657
- };
1658
- class ZodNull extends ZodType {
1659
- _parse(input) {
1660
- const parsedType = this._getType(input);
1661
- if (parsedType !== util.ZodParsedType.null) {
1662
- const ctx = this._getOrReturnCtx(input);
1663
- parseUtil.addIssueToContext(ctx, {
1664
- code: ZodError.ZodIssueCode.invalid_type,
1665
- expected: util.ZodParsedType.null,
1666
- received: ctx.parsedType,
1667
- });
1668
- return parseUtil.INVALID;
1669
- }
1670
- return parseUtil.OK(input.data);
1671
- }
1672
- }
1673
- ZodNull.create = (params) => {
1674
- return new ZodNull({
1675
- typeName: exports.ZodFirstPartyTypeKind.ZodNull,
1676
- ...processCreateParams(params),
1677
- });
1678
- };
1679
- class ZodAny extends ZodType {
1680
- constructor() {
1681
- super(...arguments);
1682
- // to prevent instances of other classes from extending ZodAny. this causes issues with catchall in ZodObject.
1683
- this._any = true;
1684
- }
1685
- _parse(input) {
1686
- return parseUtil.OK(input.data);
1687
- }
1688
- }
1689
- ZodAny.create = (params) => {
1690
- return new ZodAny({
1691
- typeName: exports.ZodFirstPartyTypeKind.ZodAny,
1692
- ...processCreateParams(params),
1693
- });
1694
- };
1695
- class ZodUnknown extends ZodType {
1696
- constructor() {
1697
- super(...arguments);
1698
- // required
1699
- this._unknown = true;
1700
- }
1701
- _parse(input) {
1702
- return parseUtil.OK(input.data);
1703
- }
1704
- }
1705
- ZodUnknown.create = (params) => {
1706
- return new ZodUnknown({
1707
- typeName: exports.ZodFirstPartyTypeKind.ZodUnknown,
1708
- ...processCreateParams(params),
1709
- });
1710
- };
1711
- class ZodNever extends ZodType {
1712
- _parse(input) {
1713
- const ctx = this._getOrReturnCtx(input);
1714
- parseUtil.addIssueToContext(ctx, {
1715
- code: ZodError.ZodIssueCode.invalid_type,
1716
- expected: util.ZodParsedType.never,
1717
- received: ctx.parsedType,
1718
- });
1719
- return parseUtil.INVALID;
1720
- }
1721
- }
1722
- ZodNever.create = (params) => {
1723
- return new ZodNever({
1724
- typeName: exports.ZodFirstPartyTypeKind.ZodNever,
1725
- ...processCreateParams(params),
1726
- });
1727
- };
1728
- class ZodVoid extends ZodType {
1729
- _parse(input) {
1730
- const parsedType = this._getType(input);
1731
- if (parsedType !== util.ZodParsedType.undefined) {
1732
- const ctx = this._getOrReturnCtx(input);
1733
- parseUtil.addIssueToContext(ctx, {
1734
- code: ZodError.ZodIssueCode.invalid_type,
1735
- expected: util.ZodParsedType.void,
1736
- received: ctx.parsedType,
1737
- });
1738
- return parseUtil.INVALID;
1739
- }
1740
- return parseUtil.OK(input.data);
1741
- }
1742
- }
1743
- ZodVoid.create = (params) => {
1744
- return new ZodVoid({
1745
- typeName: exports.ZodFirstPartyTypeKind.ZodVoid,
1746
- ...processCreateParams(params),
1747
- });
1748
- };
1749
- class ZodArray extends ZodType {
1750
- _parse(input) {
1751
- const { ctx, status } = this._processInputParams(input);
1752
- const def = this._def;
1753
- if (ctx.parsedType !== util.ZodParsedType.array) {
1754
- parseUtil.addIssueToContext(ctx, {
1755
- code: ZodError.ZodIssueCode.invalid_type,
1756
- expected: util.ZodParsedType.array,
1757
- received: ctx.parsedType,
1758
- });
1759
- return parseUtil.INVALID;
1760
- }
1761
- if (def.exactLength !== null) {
1762
- const tooBig = ctx.data.length > def.exactLength.value;
1763
- const tooSmall = ctx.data.length < def.exactLength.value;
1764
- if (tooBig || tooSmall) {
1765
- parseUtil.addIssueToContext(ctx, {
1766
- code: tooBig ? ZodError.ZodIssueCode.too_big : ZodError.ZodIssueCode.too_small,
1767
- minimum: (tooSmall ? def.exactLength.value : undefined),
1768
- maximum: (tooBig ? def.exactLength.value : undefined),
1769
- type: "array",
1770
- inclusive: true,
1771
- exact: true,
1772
- message: def.exactLength.message,
1773
- });
1774
- status.dirty();
1775
- }
1776
- }
1777
- if (def.minLength !== null) {
1778
- if (ctx.data.length < def.minLength.value) {
1779
- parseUtil.addIssueToContext(ctx, {
1780
- code: ZodError.ZodIssueCode.too_small,
1781
- minimum: def.minLength.value,
1782
- type: "array",
1783
- inclusive: true,
1784
- exact: false,
1785
- message: def.minLength.message,
1786
- });
1787
- status.dirty();
1788
- }
1789
- }
1790
- if (def.maxLength !== null) {
1791
- if (ctx.data.length > def.maxLength.value) {
1792
- parseUtil.addIssueToContext(ctx, {
1793
- code: ZodError.ZodIssueCode.too_big,
1794
- maximum: def.maxLength.value,
1795
- type: "array",
1796
- inclusive: true,
1797
- exact: false,
1798
- message: def.maxLength.message,
1799
- });
1800
- status.dirty();
1801
- }
1802
- }
1803
- if (ctx.common.async) {
1804
- return Promise.all([...ctx.data].map((item, i) => {
1805
- return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));
1806
- })).then((result) => {
1807
- return parseUtil.ParseStatus.mergeArray(status, result);
1808
- });
1809
- }
1810
- const result = [...ctx.data].map((item, i) => {
1811
- return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));
1812
- });
1813
- return parseUtil.ParseStatus.mergeArray(status, result);
1814
- }
1815
- get element() {
1816
- return this._def.type;
1817
- }
1818
- min(minLength, message) {
1819
- return new ZodArray({
1820
- ...this._def,
1821
- minLength: { value: minLength, message: errorUtil.errorUtil.toString(message) },
1822
- });
1823
- }
1824
- max(maxLength, message) {
1825
- return new ZodArray({
1826
- ...this._def,
1827
- maxLength: { value: maxLength, message: errorUtil.errorUtil.toString(message) },
1828
- });
1829
- }
1830
- length(len, message) {
1831
- return new ZodArray({
1832
- ...this._def,
1833
- exactLength: { value: len, message: errorUtil.errorUtil.toString(message) },
1834
- });
1835
- }
1836
- nonempty(message) {
1837
- return this.min(1, message);
1838
- }
1839
- }
1840
- ZodArray.create = (schema, params) => {
1841
- return new ZodArray({
1842
- type: schema,
1843
- minLength: null,
1844
- maxLength: null,
1845
- exactLength: null,
1846
- typeName: exports.ZodFirstPartyTypeKind.ZodArray,
1847
- ...processCreateParams(params),
1848
- });
1849
- };
1850
- function deepPartialify(schema) {
1851
- if (schema instanceof ZodObject) {
1852
- const newShape = {};
1853
- for (const key in schema.shape) {
1854
- const fieldSchema = schema.shape[key];
1855
- newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));
1856
- }
1857
- return new ZodObject({
1858
- ...schema._def,
1859
- shape: () => newShape,
1860
- });
1861
- }
1862
- else if (schema instanceof ZodArray) {
1863
- return new ZodArray({
1864
- ...schema._def,
1865
- type: deepPartialify(schema.element),
1866
- });
1867
- }
1868
- else if (schema instanceof ZodOptional) {
1869
- return ZodOptional.create(deepPartialify(schema.unwrap()));
1870
- }
1871
- else if (schema instanceof ZodNullable) {
1872
- return ZodNullable.create(deepPartialify(schema.unwrap()));
1873
- }
1874
- else if (schema instanceof ZodTuple) {
1875
- return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));
1876
- }
1877
- else {
1878
- return schema;
1879
- }
1880
- }
1881
- class ZodObject extends ZodType {
1882
- constructor() {
1883
- super(...arguments);
1884
- this._cached = null;
1885
- /**
1886
- * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.
1887
- * If you want to pass through unknown properties, use `.passthrough()` instead.
1888
- */
1889
- this.nonstrict = this.passthrough;
1890
- // extend<
1891
- // Augmentation extends ZodRawShape,
1892
- // NewOutput extends util.flatten<{
1893
- // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation
1894
- // ? Augmentation[k]["_output"]
1895
- // : k extends keyof Output
1896
- // ? Output[k]
1897
- // : never;
1898
- // }>,
1899
- // NewInput extends util.flatten<{
1900
- // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation
1901
- // ? Augmentation[k]["_input"]
1902
- // : k extends keyof Input
1903
- // ? Input[k]
1904
- // : never;
1905
- // }>
1906
- // >(
1907
- // augmentation: Augmentation
1908
- // ): ZodObject<
1909
- // extendShape<T, Augmentation>,
1910
- // UnknownKeys,
1911
- // Catchall,
1912
- // NewOutput,
1913
- // NewInput
1914
- // > {
1915
- // return new ZodObject({
1916
- // ...this._def,
1917
- // shape: () => ({
1918
- // ...this._def.shape(),
1919
- // ...augmentation,
1920
- // }),
1921
- // }) as any;
1922
- // }
1923
- /**
1924
- * @deprecated Use `.extend` instead
1925
- * */
1926
- this.augment = this.extend;
1927
- }
1928
- _getCached() {
1929
- if (this._cached !== null)
1930
- return this._cached;
1931
- const shape = this._def.shape();
1932
- const keys = util.util.objectKeys(shape);
1933
- this._cached = { shape, keys };
1934
- return this._cached;
1935
- }
1936
- _parse(input) {
1937
- const parsedType = this._getType(input);
1938
- if (parsedType !== util.ZodParsedType.object) {
1939
- const ctx = this._getOrReturnCtx(input);
1940
- parseUtil.addIssueToContext(ctx, {
1941
- code: ZodError.ZodIssueCode.invalid_type,
1942
- expected: util.ZodParsedType.object,
1943
- received: ctx.parsedType,
1944
- });
1945
- return parseUtil.INVALID;
1946
- }
1947
- const { status, ctx } = this._processInputParams(input);
1948
- const { shape, keys: shapeKeys } = this._getCached();
1949
- const extraKeys = [];
1950
- if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === "strip")) {
1951
- for (const key in ctx.data) {
1952
- if (!shapeKeys.includes(key)) {
1953
- extraKeys.push(key);
1954
- }
1955
- }
1956
- }
1957
- const pairs = [];
1958
- for (const key of shapeKeys) {
1959
- const keyValidator = shape[key];
1960
- const value = ctx.data[key];
1961
- pairs.push({
1962
- key: { status: "valid", value: key },
1963
- value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),
1964
- alwaysSet: key in ctx.data,
1965
- });
1966
- }
1967
- if (this._def.catchall instanceof ZodNever) {
1968
- const unknownKeys = this._def.unknownKeys;
1969
- if (unknownKeys === "passthrough") {
1970
- for (const key of extraKeys) {
1971
- pairs.push({
1972
- key: { status: "valid", value: key },
1973
- value: { status: "valid", value: ctx.data[key] },
1974
- });
1975
- }
1976
- }
1977
- else if (unknownKeys === "strict") {
1978
- if (extraKeys.length > 0) {
1979
- parseUtil.addIssueToContext(ctx, {
1980
- code: ZodError.ZodIssueCode.unrecognized_keys,
1981
- keys: extraKeys,
1982
- });
1983
- status.dirty();
1984
- }
1985
- }
1986
- else if (unknownKeys === "strip") ;
1987
- else {
1988
- throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
1989
- }
1990
- }
1991
- else {
1992
- // run catchall validation
1993
- const catchall = this._def.catchall;
1994
- for (const key of extraKeys) {
1995
- const value = ctx.data[key];
1996
- pairs.push({
1997
- key: { status: "valid", value: key },
1998
- value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key) //, ctx.child(key), value, getParsedType(value)
1999
- ),
2000
- alwaysSet: key in ctx.data,
2001
- });
2002
- }
2003
- }
2004
- if (ctx.common.async) {
2005
- return Promise.resolve()
2006
- .then(async () => {
2007
- const syncPairs = [];
2008
- for (const pair of pairs) {
2009
- const key = await pair.key;
2010
- const value = await pair.value;
2011
- syncPairs.push({
2012
- key,
2013
- value,
2014
- alwaysSet: pair.alwaysSet,
2015
- });
2016
- }
2017
- return syncPairs;
2018
- })
2019
- .then((syncPairs) => {
2020
- return parseUtil.ParseStatus.mergeObjectSync(status, syncPairs);
2021
- });
2022
- }
2023
- else {
2024
- return parseUtil.ParseStatus.mergeObjectSync(status, pairs);
2025
- }
2026
- }
2027
- get shape() {
2028
- return this._def.shape();
2029
- }
2030
- strict(message) {
2031
- errorUtil.errorUtil.errToObj;
2032
- return new ZodObject({
2033
- ...this._def,
2034
- unknownKeys: "strict",
2035
- ...(message !== undefined
2036
- ? {
2037
- errorMap: (issue, ctx) => {
2038
- const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;
2039
- if (issue.code === "unrecognized_keys")
2040
- return {
2041
- message: errorUtil.errorUtil.errToObj(message).message ?? defaultError,
2042
- };
2043
- return {
2044
- message: defaultError,
2045
- };
2046
- },
2047
- }
2048
- : {}),
2049
- });
2050
- }
2051
- strip() {
2052
- return new ZodObject({
2053
- ...this._def,
2054
- unknownKeys: "strip",
2055
- });
2056
- }
2057
- passthrough() {
2058
- return new ZodObject({
2059
- ...this._def,
2060
- unknownKeys: "passthrough",
2061
- });
2062
- }
2063
- // const AugmentFactory =
2064
- // <Def extends ZodObjectDef>(def: Def) =>
2065
- // <Augmentation extends ZodRawShape>(
2066
- // augmentation: Augmentation
2067
- // ): ZodObject<
2068
- // extendShape<ReturnType<Def["shape"]>, Augmentation>,
2069
- // Def["unknownKeys"],
2070
- // Def["catchall"]
2071
- // > => {
2072
- // return new ZodObject({
2073
- // ...def,
2074
- // shape: () => ({
2075
- // ...def.shape(),
2076
- // ...augmentation,
2077
- // }),
2078
- // }) as any;
2079
- // };
2080
- extend(augmentation) {
2081
- return new ZodObject({
2082
- ...this._def,
2083
- shape: () => ({
2084
- ...this._def.shape(),
2085
- ...augmentation,
2086
- }),
2087
- });
2088
- }
2089
- /**
2090
- * Prior to zod@1.0.12 there was a bug in the
2091
- * inferred type of merged objects. Please
2092
- * upgrade if you are experiencing issues.
2093
- */
2094
- merge(merging) {
2095
- const merged = new ZodObject({
2096
- unknownKeys: merging._def.unknownKeys,
2097
- catchall: merging._def.catchall,
2098
- shape: () => ({
2099
- ...this._def.shape(),
2100
- ...merging._def.shape(),
2101
- }),
2102
- typeName: exports.ZodFirstPartyTypeKind.ZodObject,
2103
- });
2104
- return merged;
2105
- }
2106
- // merge<
2107
- // Incoming extends AnyZodObject,
2108
- // Augmentation extends Incoming["shape"],
2109
- // NewOutput extends {
2110
- // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation
2111
- // ? Augmentation[k]["_output"]
2112
- // : k extends keyof Output
2113
- // ? Output[k]
2114
- // : never;
2115
- // },
2116
- // NewInput extends {
2117
- // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation
2118
- // ? Augmentation[k]["_input"]
2119
- // : k extends keyof Input
2120
- // ? Input[k]
2121
- // : never;
2122
- // }
2123
- // >(
2124
- // merging: Incoming
2125
- // ): ZodObject<
2126
- // extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
2127
- // Incoming["_def"]["unknownKeys"],
2128
- // Incoming["_def"]["catchall"],
2129
- // NewOutput,
2130
- // NewInput
2131
- // > {
2132
- // const merged: any = new ZodObject({
2133
- // unknownKeys: merging._def.unknownKeys,
2134
- // catchall: merging._def.catchall,
2135
- // shape: () =>
2136
- // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
2137
- // typeName: ZodFirstPartyTypeKind.ZodObject,
2138
- // }) as any;
2139
- // return merged;
2140
- // }
2141
- setKey(key, schema) {
2142
- return this.augment({ [key]: schema });
2143
- }
2144
- // merge<Incoming extends AnyZodObject>(
2145
- // merging: Incoming
2146
- // ): //ZodObject<T & Incoming["_shape"], UnknownKeys, Catchall> = (merging) => {
2147
- // ZodObject<
2148
- // extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
2149
- // Incoming["_def"]["unknownKeys"],
2150
- // Incoming["_def"]["catchall"]
2151
- // > {
2152
- // // const mergedShape = objectUtil.mergeShapes(
2153
- // // this._def.shape(),
2154
- // // merging._def.shape()
2155
- // // );
2156
- // const merged: any = new ZodObject({
2157
- // unknownKeys: merging._def.unknownKeys,
2158
- // catchall: merging._def.catchall,
2159
- // shape: () =>
2160
- // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
2161
- // typeName: ZodFirstPartyTypeKind.ZodObject,
2162
- // }) as any;
2163
- // return merged;
2164
- // }
2165
- catchall(index) {
2166
- return new ZodObject({
2167
- ...this._def,
2168
- catchall: index,
2169
- });
2170
- }
2171
- pick(mask) {
2172
- const shape = {};
2173
- for (const key of util.util.objectKeys(mask)) {
2174
- if (mask[key] && this.shape[key]) {
2175
- shape[key] = this.shape[key];
2176
- }
2177
- }
2178
- return new ZodObject({
2179
- ...this._def,
2180
- shape: () => shape,
2181
- });
2182
- }
2183
- omit(mask) {
2184
- const shape = {};
2185
- for (const key of util.util.objectKeys(this.shape)) {
2186
- if (!mask[key]) {
2187
- shape[key] = this.shape[key];
2188
- }
2189
- }
2190
- return new ZodObject({
2191
- ...this._def,
2192
- shape: () => shape,
2193
- });
2194
- }
2195
- /**
2196
- * @deprecated
2197
- */
2198
- deepPartial() {
2199
- return deepPartialify(this);
2200
- }
2201
- partial(mask) {
2202
- const newShape = {};
2203
- for (const key of util.util.objectKeys(this.shape)) {
2204
- const fieldSchema = this.shape[key];
2205
- if (mask && !mask[key]) {
2206
- newShape[key] = fieldSchema;
2207
- }
2208
- else {
2209
- newShape[key] = fieldSchema.optional();
2210
- }
2211
- }
2212
- return new ZodObject({
2213
- ...this._def,
2214
- shape: () => newShape,
2215
- });
2216
- }
2217
- required(mask) {
2218
- const newShape = {};
2219
- for (const key of util.util.objectKeys(this.shape)) {
2220
- if (mask && !mask[key]) {
2221
- newShape[key] = this.shape[key];
2222
- }
2223
- else {
2224
- const fieldSchema = this.shape[key];
2225
- let newField = fieldSchema;
2226
- while (newField instanceof ZodOptional) {
2227
- newField = newField._def.innerType;
2228
- }
2229
- newShape[key] = newField;
2230
- }
2231
- }
2232
- return new ZodObject({
2233
- ...this._def,
2234
- shape: () => newShape,
2235
- });
2236
- }
2237
- keyof() {
2238
- return createZodEnum(util.util.objectKeys(this.shape));
2239
- }
2240
- }
2241
- ZodObject.create = (shape, params) => {
2242
- return new ZodObject({
2243
- shape: () => shape,
2244
- unknownKeys: "strip",
2245
- catchall: ZodNever.create(),
2246
- typeName: exports.ZodFirstPartyTypeKind.ZodObject,
2247
- ...processCreateParams(params),
2248
- });
2249
- };
2250
- ZodObject.strictCreate = (shape, params) => {
2251
- return new ZodObject({
2252
- shape: () => shape,
2253
- unknownKeys: "strict",
2254
- catchall: ZodNever.create(),
2255
- typeName: exports.ZodFirstPartyTypeKind.ZodObject,
2256
- ...processCreateParams(params),
2257
- });
2258
- };
2259
- ZodObject.lazycreate = (shape, params) => {
2260
- return new ZodObject({
2261
- shape,
2262
- unknownKeys: "strip",
2263
- catchall: ZodNever.create(),
2264
- typeName: exports.ZodFirstPartyTypeKind.ZodObject,
2265
- ...processCreateParams(params),
2266
- });
2267
- };
2268
- class ZodUnion extends ZodType {
2269
- _parse(input) {
2270
- const { ctx } = this._processInputParams(input);
2271
- const options = this._def.options;
2272
- function handleResults(results) {
2273
- // return first issue-free validation if it exists
2274
- for (const result of results) {
2275
- if (result.result.status === "valid") {
2276
- return result.result;
2277
- }
2278
- }
2279
- for (const result of results) {
2280
- if (result.result.status === "dirty") {
2281
- // add issues from dirty option
2282
- ctx.common.issues.push(...result.ctx.common.issues);
2283
- return result.result;
2284
- }
2285
- }
2286
- // return invalid
2287
- const unionErrors = results.map((result) => new ZodError.ZodError(result.ctx.common.issues));
2288
- parseUtil.addIssueToContext(ctx, {
2289
- code: ZodError.ZodIssueCode.invalid_union,
2290
- unionErrors,
2291
- });
2292
- return parseUtil.INVALID;
2293
- }
2294
- if (ctx.common.async) {
2295
- return Promise.all(options.map(async (option) => {
2296
- const childCtx = {
2297
- ...ctx,
2298
- common: {
2299
- ...ctx.common,
2300
- issues: [],
2301
- },
2302
- parent: null,
2303
- };
2304
- return {
2305
- result: await option._parseAsync({
2306
- data: ctx.data,
2307
- path: ctx.path,
2308
- parent: childCtx,
2309
- }),
2310
- ctx: childCtx,
2311
- };
2312
- })).then(handleResults);
2313
- }
2314
- else {
2315
- let dirty = undefined;
2316
- const issues = [];
2317
- for (const option of options) {
2318
- const childCtx = {
2319
- ...ctx,
2320
- common: {
2321
- ...ctx.common,
2322
- issues: [],
2323
- },
2324
- parent: null,
2325
- };
2326
- const result = option._parseSync({
2327
- data: ctx.data,
2328
- path: ctx.path,
2329
- parent: childCtx,
2330
- });
2331
- if (result.status === "valid") {
2332
- return result;
2333
- }
2334
- else if (result.status === "dirty" && !dirty) {
2335
- dirty = { result, ctx: childCtx };
2336
- }
2337
- if (childCtx.common.issues.length) {
2338
- issues.push(childCtx.common.issues);
2339
- }
2340
- }
2341
- if (dirty) {
2342
- ctx.common.issues.push(...dirty.ctx.common.issues);
2343
- return dirty.result;
2344
- }
2345
- const unionErrors = issues.map((issues) => new ZodError.ZodError(issues));
2346
- parseUtil.addIssueToContext(ctx, {
2347
- code: ZodError.ZodIssueCode.invalid_union,
2348
- unionErrors,
2349
- });
2350
- return parseUtil.INVALID;
2351
- }
2352
- }
2353
- get options() {
2354
- return this._def.options;
2355
- }
2356
- }
2357
- ZodUnion.create = (types, params) => {
2358
- return new ZodUnion({
2359
- options: types,
2360
- typeName: exports.ZodFirstPartyTypeKind.ZodUnion,
2361
- ...processCreateParams(params),
2362
- });
2363
- };
2364
- function mergeValues(a, b) {
2365
- const aType = util.getParsedType(a);
2366
- const bType = util.getParsedType(b);
2367
- if (a === b) {
2368
- return { valid: true, data: a };
2369
- }
2370
- else if (aType === util.ZodParsedType.object && bType === util.ZodParsedType.object) {
2371
- const bKeys = util.util.objectKeys(b);
2372
- const sharedKeys = util.util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1);
2373
- const newObj = { ...a, ...b };
2374
- for (const key of sharedKeys) {
2375
- const sharedValue = mergeValues(a[key], b[key]);
2376
- if (!sharedValue.valid) {
2377
- return { valid: false };
2378
- }
2379
- newObj[key] = sharedValue.data;
2380
- }
2381
- return { valid: true, data: newObj };
2382
- }
2383
- else if (aType === util.ZodParsedType.array && bType === util.ZodParsedType.array) {
2384
- if (a.length !== b.length) {
2385
- return { valid: false };
2386
- }
2387
- const newArray = [];
2388
- for (let index = 0; index < a.length; index++) {
2389
- const itemA = a[index];
2390
- const itemB = b[index];
2391
- const sharedValue = mergeValues(itemA, itemB);
2392
- if (!sharedValue.valid) {
2393
- return { valid: false };
2394
- }
2395
- newArray.push(sharedValue.data);
2396
- }
2397
- return { valid: true, data: newArray };
2398
- }
2399
- else if (aType === util.ZodParsedType.date && bType === util.ZodParsedType.date && +a === +b) {
2400
- return { valid: true, data: a };
2401
- }
2402
- else {
2403
- return { valid: false };
2404
- }
2405
- }
2406
- class ZodIntersection extends ZodType {
2407
- _parse(input) {
2408
- const { status, ctx } = this._processInputParams(input);
2409
- const handleParsed = (parsedLeft, parsedRight) => {
2410
- if (parseUtil.isAborted(parsedLeft) || parseUtil.isAborted(parsedRight)) {
2411
- return parseUtil.INVALID;
2412
- }
2413
- const merged = mergeValues(parsedLeft.value, parsedRight.value);
2414
- if (!merged.valid) {
2415
- parseUtil.addIssueToContext(ctx, {
2416
- code: ZodError.ZodIssueCode.invalid_intersection_types,
2417
- });
2418
- return parseUtil.INVALID;
2419
- }
2420
- if (parseUtil.isDirty(parsedLeft) || parseUtil.isDirty(parsedRight)) {
2421
- status.dirty();
2422
- }
2423
- return { status: status.value, value: merged.data };
2424
- };
2425
- if (ctx.common.async) {
2426
- return Promise.all([
2427
- this._def.left._parseAsync({
2428
- data: ctx.data,
2429
- path: ctx.path,
2430
- parent: ctx,
2431
- }),
2432
- this._def.right._parseAsync({
2433
- data: ctx.data,
2434
- path: ctx.path,
2435
- parent: ctx,
2436
- }),
2437
- ]).then(([left, right]) => handleParsed(left, right));
2438
- }
2439
- else {
2440
- return handleParsed(this._def.left._parseSync({
2441
- data: ctx.data,
2442
- path: ctx.path,
2443
- parent: ctx,
2444
- }), this._def.right._parseSync({
2445
- data: ctx.data,
2446
- path: ctx.path,
2447
- parent: ctx,
2448
- }));
2449
- }
2450
- }
2451
- }
2452
- ZodIntersection.create = (left, right, params) => {
2453
- return new ZodIntersection({
2454
- left: left,
2455
- right: right,
2456
- typeName: exports.ZodFirstPartyTypeKind.ZodIntersection,
2457
- ...processCreateParams(params),
2458
- });
2459
- };
2460
- // type ZodTupleItems = [ZodTypeAny, ...ZodTypeAny[]];
2461
- class ZodTuple extends ZodType {
2462
- _parse(input) {
2463
- const { status, ctx } = this._processInputParams(input);
2464
- if (ctx.parsedType !== util.ZodParsedType.array) {
2465
- parseUtil.addIssueToContext(ctx, {
2466
- code: ZodError.ZodIssueCode.invalid_type,
2467
- expected: util.ZodParsedType.array,
2468
- received: ctx.parsedType,
2469
- });
2470
- return parseUtil.INVALID;
2471
- }
2472
- if (ctx.data.length < this._def.items.length) {
2473
- parseUtil.addIssueToContext(ctx, {
2474
- code: ZodError.ZodIssueCode.too_small,
2475
- minimum: this._def.items.length,
2476
- inclusive: true,
2477
- exact: false,
2478
- type: "array",
2479
- });
2480
- return parseUtil.INVALID;
2481
- }
2482
- const rest = this._def.rest;
2483
- if (!rest && ctx.data.length > this._def.items.length) {
2484
- parseUtil.addIssueToContext(ctx, {
2485
- code: ZodError.ZodIssueCode.too_big,
2486
- maximum: this._def.items.length,
2487
- inclusive: true,
2488
- exact: false,
2489
- type: "array",
2490
- });
2491
- status.dirty();
2492
- }
2493
- const items = [...ctx.data]
2494
- .map((item, itemIndex) => {
2495
- const schema = this._def.items[itemIndex] || this._def.rest;
2496
- if (!schema)
2497
- return null;
2498
- return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
2499
- })
2500
- .filter((x) => !!x); // filter nulls
2501
- if (ctx.common.async) {
2502
- return Promise.all(items).then((results) => {
2503
- return parseUtil.ParseStatus.mergeArray(status, results);
2504
- });
2505
- }
2506
- else {
2507
- return parseUtil.ParseStatus.mergeArray(status, items);
2508
- }
2509
- }
2510
- get items() {
2511
- return this._def.items;
2512
- }
2513
- rest(rest) {
2514
- return new ZodTuple({
2515
- ...this._def,
2516
- rest,
2517
- });
2518
- }
2519
- }
2520
- ZodTuple.create = (schemas, params) => {
2521
- if (!Array.isArray(schemas)) {
2522
- throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
2523
- }
2524
- return new ZodTuple({
2525
- items: schemas,
2526
- typeName: exports.ZodFirstPartyTypeKind.ZodTuple,
2527
- rest: null,
2528
- ...processCreateParams(params),
2529
- });
2530
- };
2531
- class ZodMap extends ZodType {
2532
- get keySchema() {
2533
- return this._def.keyType;
2534
- }
2535
- get valueSchema() {
2536
- return this._def.valueType;
2537
- }
2538
- _parse(input) {
2539
- const { status, ctx } = this._processInputParams(input);
2540
- if (ctx.parsedType !== util.ZodParsedType.map) {
2541
- parseUtil.addIssueToContext(ctx, {
2542
- code: ZodError.ZodIssueCode.invalid_type,
2543
- expected: util.ZodParsedType.map,
2544
- received: ctx.parsedType,
2545
- });
2546
- return parseUtil.INVALID;
2547
- }
2548
- const keyType = this._def.keyType;
2549
- const valueType = this._def.valueType;
2550
- const pairs = [...ctx.data.entries()].map(([key, value], index) => {
2551
- return {
2552
- key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, "key"])),
2553
- value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, "value"])),
2554
- };
2555
- });
2556
- if (ctx.common.async) {
2557
- const finalMap = new Map();
2558
- return Promise.resolve().then(async () => {
2559
- for (const pair of pairs) {
2560
- const key = await pair.key;
2561
- const value = await pair.value;
2562
- if (key.status === "aborted" || value.status === "aborted") {
2563
- return parseUtil.INVALID;
2564
- }
2565
- if (key.status === "dirty" || value.status === "dirty") {
2566
- status.dirty();
2567
- }
2568
- finalMap.set(key.value, value.value);
2569
- }
2570
- return { status: status.value, value: finalMap };
2571
- });
2572
- }
2573
- else {
2574
- const finalMap = new Map();
2575
- for (const pair of pairs) {
2576
- const key = pair.key;
2577
- const value = pair.value;
2578
- if (key.status === "aborted" || value.status === "aborted") {
2579
- return parseUtil.INVALID;
2580
- }
2581
- if (key.status === "dirty" || value.status === "dirty") {
2582
- status.dirty();
2583
- }
2584
- finalMap.set(key.value, value.value);
2585
- }
2586
- return { status: status.value, value: finalMap };
2587
- }
2588
- }
2589
- }
2590
- ZodMap.create = (keyType, valueType, params) => {
2591
- return new ZodMap({
2592
- valueType,
2593
- keyType,
2594
- typeName: exports.ZodFirstPartyTypeKind.ZodMap,
2595
- ...processCreateParams(params),
2596
- });
2597
- };
2598
- class ZodSet extends ZodType {
2599
- _parse(input) {
2600
- const { status, ctx } = this._processInputParams(input);
2601
- if (ctx.parsedType !== util.ZodParsedType.set) {
2602
- parseUtil.addIssueToContext(ctx, {
2603
- code: ZodError.ZodIssueCode.invalid_type,
2604
- expected: util.ZodParsedType.set,
2605
- received: ctx.parsedType,
2606
- });
2607
- return parseUtil.INVALID;
2608
- }
2609
- const def = this._def;
2610
- if (def.minSize !== null) {
2611
- if (ctx.data.size < def.minSize.value) {
2612
- parseUtil.addIssueToContext(ctx, {
2613
- code: ZodError.ZodIssueCode.too_small,
2614
- minimum: def.minSize.value,
2615
- type: "set",
2616
- inclusive: true,
2617
- exact: false,
2618
- message: def.minSize.message,
2619
- });
2620
- status.dirty();
2621
- }
2622
- }
2623
- if (def.maxSize !== null) {
2624
- if (ctx.data.size > def.maxSize.value) {
2625
- parseUtil.addIssueToContext(ctx, {
2626
- code: ZodError.ZodIssueCode.too_big,
2627
- maximum: def.maxSize.value,
2628
- type: "set",
2629
- inclusive: true,
2630
- exact: false,
2631
- message: def.maxSize.message,
2632
- });
2633
- status.dirty();
2634
- }
2635
- }
2636
- const valueType = this._def.valueType;
2637
- function finalizeSet(elements) {
2638
- const parsedSet = new Set();
2639
- for (const element of elements) {
2640
- if (element.status === "aborted")
2641
- return parseUtil.INVALID;
2642
- if (element.status === "dirty")
2643
- status.dirty();
2644
- parsedSet.add(element.value);
2645
- }
2646
- return { status: status.value, value: parsedSet };
2647
- }
2648
- const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));
2649
- if (ctx.common.async) {
2650
- return Promise.all(elements).then((elements) => finalizeSet(elements));
2651
- }
2652
- else {
2653
- return finalizeSet(elements);
2654
- }
2655
- }
2656
- min(minSize, message) {
2657
- return new ZodSet({
2658
- ...this._def,
2659
- minSize: { value: minSize, message: errorUtil.errorUtil.toString(message) },
2660
- });
2661
- }
2662
- max(maxSize, message) {
2663
- return new ZodSet({
2664
- ...this._def,
2665
- maxSize: { value: maxSize, message: errorUtil.errorUtil.toString(message) },
2666
- });
2667
- }
2668
- size(size, message) {
2669
- return this.min(size, message).max(size, message);
2670
- }
2671
- nonempty(message) {
2672
- return this.min(1, message);
2673
- }
2674
- }
2675
- ZodSet.create = (valueType, params) => {
2676
- return new ZodSet({
2677
- valueType,
2678
- minSize: null,
2679
- maxSize: null,
2680
- typeName: exports.ZodFirstPartyTypeKind.ZodSet,
2681
- ...processCreateParams(params),
2682
- });
2683
- };
2684
- class ZodLazy extends ZodType {
2685
- get schema() {
2686
- return this._def.getter();
2687
- }
2688
- _parse(input) {
2689
- const { ctx } = this._processInputParams(input);
2690
- const lazySchema = this._def.getter();
2691
- return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });
2692
- }
2693
- }
2694
- ZodLazy.create = (getter, params) => {
2695
- return new ZodLazy({
2696
- getter: getter,
2697
- typeName: exports.ZodFirstPartyTypeKind.ZodLazy,
2698
- ...processCreateParams(params),
2699
- });
2700
- };
2701
- class ZodLiteral extends ZodType {
2702
- _parse(input) {
2703
- if (input.data !== this._def.value) {
2704
- const ctx = this._getOrReturnCtx(input);
2705
- parseUtil.addIssueToContext(ctx, {
2706
- received: ctx.data,
2707
- code: ZodError.ZodIssueCode.invalid_literal,
2708
- expected: this._def.value,
2709
- });
2710
- return parseUtil.INVALID;
2711
- }
2712
- return { status: "valid", value: input.data };
2713
- }
2714
- get value() {
2715
- return this._def.value;
2716
- }
2717
- }
2718
- ZodLiteral.create = (value, params) => {
2719
- return new ZodLiteral({
2720
- value: value,
2721
- typeName: exports.ZodFirstPartyTypeKind.ZodLiteral,
2722
- ...processCreateParams(params),
2723
- });
2724
- };
2725
- function createZodEnum(values, params) {
2726
- return new ZodEnum({
2727
- values,
2728
- typeName: exports.ZodFirstPartyTypeKind.ZodEnum,
2729
- ...processCreateParams(params),
2730
- });
2731
- }
2732
- class ZodEnum extends ZodType {
2733
- _parse(input) {
2734
- if (typeof input.data !== "string") {
2735
- const ctx = this._getOrReturnCtx(input);
2736
- const expectedValues = this._def.values;
2737
- parseUtil.addIssueToContext(ctx, {
2738
- expected: util.util.joinValues(expectedValues),
2739
- received: ctx.parsedType,
2740
- code: ZodError.ZodIssueCode.invalid_type,
2741
- });
2742
- return parseUtil.INVALID;
2743
- }
2744
- if (!this._cache) {
2745
- this._cache = new Set(this._def.values);
2746
- }
2747
- if (!this._cache.has(input.data)) {
2748
- const ctx = this._getOrReturnCtx(input);
2749
- const expectedValues = this._def.values;
2750
- parseUtil.addIssueToContext(ctx, {
2751
- received: ctx.data,
2752
- code: ZodError.ZodIssueCode.invalid_enum_value,
2753
- options: expectedValues,
2754
- });
2755
- return parseUtil.INVALID;
2756
- }
2757
- return parseUtil.OK(input.data);
2758
- }
2759
- get options() {
2760
- return this._def.values;
2761
- }
2762
- get enum() {
2763
- const enumValues = {};
2764
- for (const val of this._def.values) {
2765
- enumValues[val] = val;
2766
- }
2767
- return enumValues;
2768
- }
2769
- get Values() {
2770
- const enumValues = {};
2771
- for (const val of this._def.values) {
2772
- enumValues[val] = val;
2773
- }
2774
- return enumValues;
2775
- }
2776
- get Enum() {
2777
- const enumValues = {};
2778
- for (const val of this._def.values) {
2779
- enumValues[val] = val;
2780
- }
2781
- return enumValues;
2782
- }
2783
- extract(values, newDef = this._def) {
2784
- return ZodEnum.create(values, {
2785
- ...this._def,
2786
- ...newDef,
2787
- });
2788
- }
2789
- exclude(values, newDef = this._def) {
2790
- return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {
2791
- ...this._def,
2792
- ...newDef,
2793
- });
2794
- }
2795
- }
2796
- ZodEnum.create = createZodEnum;
2797
- class ZodNativeEnum extends ZodType {
2798
- _parse(input) {
2799
- const nativeEnumValues = util.util.getValidEnumValues(this._def.values);
2800
- const ctx = this._getOrReturnCtx(input);
2801
- if (ctx.parsedType !== util.ZodParsedType.string && ctx.parsedType !== util.ZodParsedType.number) {
2802
- const expectedValues = util.util.objectValues(nativeEnumValues);
2803
- parseUtil.addIssueToContext(ctx, {
2804
- expected: util.util.joinValues(expectedValues),
2805
- received: ctx.parsedType,
2806
- code: ZodError.ZodIssueCode.invalid_type,
2807
- });
2808
- return parseUtil.INVALID;
2809
- }
2810
- if (!this._cache) {
2811
- this._cache = new Set(util.util.getValidEnumValues(this._def.values));
2812
- }
2813
- if (!this._cache.has(input.data)) {
2814
- const expectedValues = util.util.objectValues(nativeEnumValues);
2815
- parseUtil.addIssueToContext(ctx, {
2816
- received: ctx.data,
2817
- code: ZodError.ZodIssueCode.invalid_enum_value,
2818
- options: expectedValues,
2819
- });
2820
- return parseUtil.INVALID;
2821
- }
2822
- return parseUtil.OK(input.data);
2823
- }
2824
- get enum() {
2825
- return this._def.values;
2826
- }
2827
- }
2828
- ZodNativeEnum.create = (values, params) => {
2829
- return new ZodNativeEnum({
2830
- values: values,
2831
- typeName: exports.ZodFirstPartyTypeKind.ZodNativeEnum,
2832
- ...processCreateParams(params),
2833
- });
2834
- };
2835
- class ZodPromise extends ZodType {
2836
- unwrap() {
2837
- return this._def.type;
2838
- }
2839
- _parse(input) {
2840
- const { ctx } = this._processInputParams(input);
2841
- if (ctx.parsedType !== util.ZodParsedType.promise && ctx.common.async === false) {
2842
- parseUtil.addIssueToContext(ctx, {
2843
- code: ZodError.ZodIssueCode.invalid_type,
2844
- expected: util.ZodParsedType.promise,
2845
- received: ctx.parsedType,
2846
- });
2847
- return parseUtil.INVALID;
2848
- }
2849
- const promisified = ctx.parsedType === util.ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);
2850
- return parseUtil.OK(promisified.then((data) => {
2851
- return this._def.type.parseAsync(data, {
2852
- path: ctx.path,
2853
- errorMap: ctx.common.contextualErrorMap,
2854
- });
2855
- }));
2856
- }
2857
- }
2858
- ZodPromise.create = (schema, params) => {
2859
- return new ZodPromise({
2860
- type: schema,
2861
- typeName: exports.ZodFirstPartyTypeKind.ZodPromise,
2862
- ...processCreateParams(params),
2863
- });
2864
- };
2865
- class ZodEffects extends ZodType {
2866
- innerType() {
2867
- return this._def.schema;
2868
- }
2869
- sourceType() {
2870
- return this._def.schema._def.typeName === exports.ZodFirstPartyTypeKind.ZodEffects
2871
- ? this._def.schema.sourceType()
2872
- : this._def.schema;
2873
- }
2874
- _parse(input) {
2875
- const { status, ctx } = this._processInputParams(input);
2876
- const effect = this._def.effect || null;
2877
- const checkCtx = {
2878
- addIssue: (arg) => {
2879
- parseUtil.addIssueToContext(ctx, arg);
2880
- if (arg.fatal) {
2881
- status.abort();
2882
- }
2883
- else {
2884
- status.dirty();
2885
- }
2886
- },
2887
- get path() {
2888
- return ctx.path;
2889
- },
2890
- };
2891
- checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);
2892
- if (effect.type === "preprocess") {
2893
- const processed = effect.transform(ctx.data, checkCtx);
2894
- if (ctx.common.async) {
2895
- return Promise.resolve(processed).then(async (processed) => {
2896
- if (status.value === "aborted")
2897
- return parseUtil.INVALID;
2898
- const result = await this._def.schema._parseAsync({
2899
- data: processed,
2900
- path: ctx.path,
2901
- parent: ctx,
2902
- });
2903
- if (result.status === "aborted")
2904
- return parseUtil.INVALID;
2905
- if (result.status === "dirty")
2906
- return parseUtil.DIRTY(result.value);
2907
- if (status.value === "dirty")
2908
- return parseUtil.DIRTY(result.value);
2909
- return result;
2910
- });
2911
- }
2912
- else {
2913
- if (status.value === "aborted")
2914
- return parseUtil.INVALID;
2915
- const result = this._def.schema._parseSync({
2916
- data: processed,
2917
- path: ctx.path,
2918
- parent: ctx,
2919
- });
2920
- if (result.status === "aborted")
2921
- return parseUtil.INVALID;
2922
- if (result.status === "dirty")
2923
- return parseUtil.DIRTY(result.value);
2924
- if (status.value === "dirty")
2925
- return parseUtil.DIRTY(result.value);
2926
- return result;
2927
- }
2928
- }
2929
- if (effect.type === "refinement") {
2930
- const executeRefinement = (acc) => {
2931
- const result = effect.refinement(acc, checkCtx);
2932
- if (ctx.common.async) {
2933
- return Promise.resolve(result);
2934
- }
2935
- if (result instanceof Promise) {
2936
- throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
2937
- }
2938
- return acc;
2939
- };
2940
- if (ctx.common.async === false) {
2941
- const inner = this._def.schema._parseSync({
2942
- data: ctx.data,
2943
- path: ctx.path,
2944
- parent: ctx,
2945
- });
2946
- if (inner.status === "aborted")
2947
- return parseUtil.INVALID;
2948
- if (inner.status === "dirty")
2949
- status.dirty();
2950
- // return value is ignored
2951
- executeRefinement(inner.value);
2952
- return { status: status.value, value: inner.value };
2953
- }
2954
- else {
2955
- return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => {
2956
- if (inner.status === "aborted")
2957
- return parseUtil.INVALID;
2958
- if (inner.status === "dirty")
2959
- status.dirty();
2960
- return executeRefinement(inner.value).then(() => {
2961
- return { status: status.value, value: inner.value };
2962
- });
2963
- });
2964
- }
2965
- }
2966
- if (effect.type === "transform") {
2967
- if (ctx.common.async === false) {
2968
- const base = this._def.schema._parseSync({
2969
- data: ctx.data,
2970
- path: ctx.path,
2971
- parent: ctx,
2972
- });
2973
- if (!parseUtil.isValid(base))
2974
- return parseUtil.INVALID;
2975
- const result = effect.transform(base.value, checkCtx);
2976
- if (result instanceof Promise) {
2977
- throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);
2978
- }
2979
- return { status: status.value, value: result };
2980
- }
2981
- else {
2982
- return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {
2983
- if (!parseUtil.isValid(base))
2984
- return parseUtil.INVALID;
2985
- return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
2986
- status: status.value,
2987
- value: result,
2988
- }));
2989
- });
2990
- }
2991
- }
2992
- util.util.assertNever(effect);
2993
- }
2994
- }
2995
- ZodEffects.create = (schema, effect, params) => {
2996
- return new ZodEffects({
2997
- schema,
2998
- typeName: exports.ZodFirstPartyTypeKind.ZodEffects,
2999
- effect,
3000
- ...processCreateParams(params),
3001
- });
3002
- };
3003
- ZodEffects.createWithPreprocess = (preprocess, schema, params) => {
3004
- return new ZodEffects({
3005
- schema,
3006
- effect: { type: "preprocess", transform: preprocess },
3007
- typeName: exports.ZodFirstPartyTypeKind.ZodEffects,
3008
- ...processCreateParams(params),
3009
- });
3010
- };
3011
- class ZodOptional extends ZodType {
3012
- _parse(input) {
3013
- const parsedType = this._getType(input);
3014
- if (parsedType === util.ZodParsedType.undefined) {
3015
- return parseUtil.OK(undefined);
3016
- }
3017
- return this._def.innerType._parse(input);
3018
- }
3019
- unwrap() {
3020
- return this._def.innerType;
3021
- }
3022
- }
3023
- ZodOptional.create = (type, params) => {
3024
- return new ZodOptional({
3025
- innerType: type,
3026
- typeName: exports.ZodFirstPartyTypeKind.ZodOptional,
3027
- ...processCreateParams(params),
3028
- });
3029
- };
3030
- class ZodNullable extends ZodType {
3031
- _parse(input) {
3032
- const parsedType = this._getType(input);
3033
- if (parsedType === util.ZodParsedType.null) {
3034
- return parseUtil.OK(null);
3035
- }
3036
- return this._def.innerType._parse(input);
3037
- }
3038
- unwrap() {
3039
- return this._def.innerType;
3040
- }
3041
- }
3042
- ZodNullable.create = (type, params) => {
3043
- return new ZodNullable({
3044
- innerType: type,
3045
- typeName: exports.ZodFirstPartyTypeKind.ZodNullable,
3046
- ...processCreateParams(params),
3047
- });
3048
- };
3049
- class ZodDefault extends ZodType {
3050
- _parse(input) {
3051
- const { ctx } = this._processInputParams(input);
3052
- let data = ctx.data;
3053
- if (ctx.parsedType === util.ZodParsedType.undefined) {
3054
- data = this._def.defaultValue();
3055
- }
3056
- return this._def.innerType._parse({
3057
- data,
3058
- path: ctx.path,
3059
- parent: ctx,
3060
- });
3061
- }
3062
- removeDefault() {
3063
- return this._def.innerType;
3064
- }
3065
- }
3066
- ZodDefault.create = (type, params) => {
3067
- return new ZodDefault({
3068
- innerType: type,
3069
- typeName: exports.ZodFirstPartyTypeKind.ZodDefault,
3070
- defaultValue: typeof params.default === "function" ? params.default : () => params.default,
3071
- ...processCreateParams(params),
3072
- });
3073
- };
3074
- class ZodCatch extends ZodType {
3075
- _parse(input) {
3076
- const { ctx } = this._processInputParams(input);
3077
- // newCtx is used to not collect issues from inner types in ctx
3078
- const newCtx = {
3079
- ...ctx,
3080
- common: {
3081
- ...ctx.common,
3082
- issues: [],
3083
- },
3084
- };
3085
- const result = this._def.innerType._parse({
3086
- data: newCtx.data,
3087
- path: newCtx.path,
3088
- parent: {
3089
- ...newCtx,
3090
- },
3091
- });
3092
- if (parseUtil.isAsync(result)) {
3093
- return result.then((result) => {
3094
- return {
3095
- status: "valid",
3096
- value: result.status === "valid"
3097
- ? result.value
3098
- : this._def.catchValue({
3099
- get error() {
3100
- return new ZodError.ZodError(newCtx.common.issues);
3101
- },
3102
- input: newCtx.data,
3103
- }),
3104
- };
3105
- });
3106
- }
3107
- else {
3108
- return {
3109
- status: "valid",
3110
- value: result.status === "valid"
3111
- ? result.value
3112
- : this._def.catchValue({
3113
- get error() {
3114
- return new ZodError.ZodError(newCtx.common.issues);
3115
- },
3116
- input: newCtx.data,
3117
- }),
3118
- };
3119
- }
3120
- }
3121
- removeCatch() {
3122
- return this._def.innerType;
3123
- }
3124
- }
3125
- ZodCatch.create = (type, params) => {
3126
- return new ZodCatch({
3127
- innerType: type,
3128
- typeName: exports.ZodFirstPartyTypeKind.ZodCatch,
3129
- catchValue: typeof params.catch === "function" ? params.catch : () => params.catch,
3130
- ...processCreateParams(params),
3131
- });
3132
- };
3133
- class ZodNaN extends ZodType {
3134
- _parse(input) {
3135
- const parsedType = this._getType(input);
3136
- if (parsedType !== util.ZodParsedType.nan) {
3137
- const ctx = this._getOrReturnCtx(input);
3138
- parseUtil.addIssueToContext(ctx, {
3139
- code: ZodError.ZodIssueCode.invalid_type,
3140
- expected: util.ZodParsedType.nan,
3141
- received: ctx.parsedType,
3142
- });
3143
- return parseUtil.INVALID;
3144
- }
3145
- return { status: "valid", value: input.data };
3146
- }
3147
- }
3148
- ZodNaN.create = (params) => {
3149
- return new ZodNaN({
3150
- typeName: exports.ZodFirstPartyTypeKind.ZodNaN,
3151
- ...processCreateParams(params),
3152
- });
3153
- };
3154
- class ZodBranded extends ZodType {
3155
- _parse(input) {
3156
- const { ctx } = this._processInputParams(input);
3157
- const data = ctx.data;
3158
- return this._def.type._parse({
3159
- data,
3160
- path: ctx.path,
3161
- parent: ctx,
3162
- });
3163
- }
3164
- unwrap() {
3165
- return this._def.type;
3166
- }
3167
- }
3168
- class ZodPipeline extends ZodType {
3169
- _parse(input) {
3170
- const { status, ctx } = this._processInputParams(input);
3171
- if (ctx.common.async) {
3172
- const handleAsync = async () => {
3173
- const inResult = await this._def.in._parseAsync({
3174
- data: ctx.data,
3175
- path: ctx.path,
3176
- parent: ctx,
3177
- });
3178
- if (inResult.status === "aborted")
3179
- return parseUtil.INVALID;
3180
- if (inResult.status === "dirty") {
3181
- status.dirty();
3182
- return parseUtil.DIRTY(inResult.value);
3183
- }
3184
- else {
3185
- return this._def.out._parseAsync({
3186
- data: inResult.value,
3187
- path: ctx.path,
3188
- parent: ctx,
3189
- });
3190
- }
3191
- };
3192
- return handleAsync();
3193
- }
3194
- else {
3195
- const inResult = this._def.in._parseSync({
3196
- data: ctx.data,
3197
- path: ctx.path,
3198
- parent: ctx,
3199
- });
3200
- if (inResult.status === "aborted")
3201
- return parseUtil.INVALID;
3202
- if (inResult.status === "dirty") {
3203
- status.dirty();
3204
- return {
3205
- status: "dirty",
3206
- value: inResult.value,
3207
- };
3208
- }
3209
- else {
3210
- return this._def.out._parseSync({
3211
- data: inResult.value,
3212
- path: ctx.path,
3213
- parent: ctx,
3214
- });
3215
- }
3216
- }
3217
- }
3218
- static create(a, b) {
3219
- return new ZodPipeline({
3220
- in: a,
3221
- out: b,
3222
- typeName: exports.ZodFirstPartyTypeKind.ZodPipeline,
3223
- });
3224
- }
3225
- }
3226
- class ZodReadonly extends ZodType {
3227
- _parse(input) {
3228
- const result = this._def.innerType._parse(input);
3229
- const freeze = (data) => {
3230
- if (parseUtil.isValid(data)) {
3231
- data.value = Object.freeze(data.value);
3232
- }
3233
- return data;
3234
- };
3235
- return parseUtil.isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);
3236
- }
3237
- unwrap() {
3238
- return this._def.innerType;
3239
- }
3240
- }
3241
- ZodReadonly.create = (type, params) => {
3242
- return new ZodReadonly({
3243
- innerType: type,
3244
- typeName: exports.ZodFirstPartyTypeKind.ZodReadonly,
3245
- ...processCreateParams(params),
3246
- });
3247
- };
3248
- exports.ZodFirstPartyTypeKind = void 0;
3249
- (function (ZodFirstPartyTypeKind) {
3250
- ZodFirstPartyTypeKind["ZodString"] = "ZodString";
3251
- ZodFirstPartyTypeKind["ZodNumber"] = "ZodNumber";
3252
- ZodFirstPartyTypeKind["ZodNaN"] = "ZodNaN";
3253
- ZodFirstPartyTypeKind["ZodBigInt"] = "ZodBigInt";
3254
- ZodFirstPartyTypeKind["ZodBoolean"] = "ZodBoolean";
3255
- ZodFirstPartyTypeKind["ZodDate"] = "ZodDate";
3256
- ZodFirstPartyTypeKind["ZodSymbol"] = "ZodSymbol";
3257
- ZodFirstPartyTypeKind["ZodUndefined"] = "ZodUndefined";
3258
- ZodFirstPartyTypeKind["ZodNull"] = "ZodNull";
3259
- ZodFirstPartyTypeKind["ZodAny"] = "ZodAny";
3260
- ZodFirstPartyTypeKind["ZodUnknown"] = "ZodUnknown";
3261
- ZodFirstPartyTypeKind["ZodNever"] = "ZodNever";
3262
- ZodFirstPartyTypeKind["ZodVoid"] = "ZodVoid";
3263
- ZodFirstPartyTypeKind["ZodArray"] = "ZodArray";
3264
- ZodFirstPartyTypeKind["ZodObject"] = "ZodObject";
3265
- ZodFirstPartyTypeKind["ZodUnion"] = "ZodUnion";
3266
- ZodFirstPartyTypeKind["ZodDiscriminatedUnion"] = "ZodDiscriminatedUnion";
3267
- ZodFirstPartyTypeKind["ZodIntersection"] = "ZodIntersection";
3268
- ZodFirstPartyTypeKind["ZodTuple"] = "ZodTuple";
3269
- ZodFirstPartyTypeKind["ZodRecord"] = "ZodRecord";
3270
- ZodFirstPartyTypeKind["ZodMap"] = "ZodMap";
3271
- ZodFirstPartyTypeKind["ZodSet"] = "ZodSet";
3272
- ZodFirstPartyTypeKind["ZodFunction"] = "ZodFunction";
3273
- ZodFirstPartyTypeKind["ZodLazy"] = "ZodLazy";
3274
- ZodFirstPartyTypeKind["ZodLiteral"] = "ZodLiteral";
3275
- ZodFirstPartyTypeKind["ZodEnum"] = "ZodEnum";
3276
- ZodFirstPartyTypeKind["ZodEffects"] = "ZodEffects";
3277
- ZodFirstPartyTypeKind["ZodNativeEnum"] = "ZodNativeEnum";
3278
- ZodFirstPartyTypeKind["ZodOptional"] = "ZodOptional";
3279
- ZodFirstPartyTypeKind["ZodNullable"] = "ZodNullable";
3280
- ZodFirstPartyTypeKind["ZodDefault"] = "ZodDefault";
3281
- ZodFirstPartyTypeKind["ZodCatch"] = "ZodCatch";
3282
- ZodFirstPartyTypeKind["ZodPromise"] = "ZodPromise";
3283
- ZodFirstPartyTypeKind["ZodBranded"] = "ZodBranded";
3284
- ZodFirstPartyTypeKind["ZodPipeline"] = "ZodPipeline";
3285
- ZodFirstPartyTypeKind["ZodReadonly"] = "ZodReadonly";
3286
- })(exports.ZodFirstPartyTypeKind || (exports.ZodFirstPartyTypeKind = {}));
3287
- const stringType = ZodString.create;
3288
- ZodNever.create;
3289
- const arrayType = ZodArray.create;
3290
- ZodUnion.create;
3291
- ZodIntersection.create;
3292
- ZodTuple.create;
3293
- ZodEnum.create;
3294
- ZodPromise.create;
3295
- ZodOptional.create;
3296
- ZodNullable.create;
3297
- const preprocessType = ZodEffects.createWithPreprocess;
3298
-
3299
- exports.Schema = ZodType;
3300
- exports.ZodAny = ZodAny;
3301
- exports.ZodArray = ZodArray;
3302
- exports.ZodBigInt = ZodBigInt;
3303
- exports.ZodBoolean = ZodBoolean;
3304
- exports.ZodBranded = ZodBranded;
3305
- exports.ZodCatch = ZodCatch;
3306
- exports.ZodDate = ZodDate;
3307
- exports.ZodDefault = ZodDefault;
3308
- exports.ZodEffects = ZodEffects;
3309
- exports.ZodEnum = ZodEnum;
3310
- exports.ZodIntersection = ZodIntersection;
3311
- exports.ZodLazy = ZodLazy;
3312
- exports.ZodLiteral = ZodLiteral;
3313
- exports.ZodMap = ZodMap;
3314
- exports.ZodNaN = ZodNaN;
3315
- exports.ZodNativeEnum = ZodNativeEnum;
3316
- exports.ZodNever = ZodNever;
3317
- exports.ZodNull = ZodNull;
3318
- exports.ZodNullable = ZodNullable;
3319
- exports.ZodNumber = ZodNumber;
3320
- exports.ZodObject = ZodObject;
3321
- exports.ZodOptional = ZodOptional;
3322
- exports.ZodPipeline = ZodPipeline;
3323
- exports.ZodPromise = ZodPromise;
3324
- exports.ZodReadonly = ZodReadonly;
3325
- exports.ZodSchema = ZodType;
3326
- exports.ZodSet = ZodSet;
3327
- exports.ZodString = ZodString;
3328
- exports.ZodSymbol = ZodSymbol;
3329
- exports.ZodTransformer = ZodEffects;
3330
- exports.ZodTuple = ZodTuple;
3331
- exports.ZodType = ZodType;
3332
- exports.ZodUndefined = ZodUndefined;
3333
- exports.ZodUnion = ZodUnion;
3334
- exports.ZodUnknown = ZodUnknown;
3335
- exports.ZodVoid = ZodVoid;
3336
- exports.array = arrayType;
3337
- exports.datetimeRegex = datetimeRegex;
3338
- exports.preprocess = preprocessType;
3339
- exports.string = stringType;