camera.ui3 0.0.3-1.alpha.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 (531) hide show
  1. package/dist/interface/@babel.l0sNRNKZ.0.0.31.alpha.0.js +1 -0
  2. package/dist/interface/@camera.ui.DiVLAlWa.0.0.31.alpha.0.js +3 -0
  3. package/dist/interface/@intlify.D-zKcAzQ.0.0.31.alpha.0.js +19 -0
  4. package/dist/interface/@mdi.DVdKciOk.0.0.31.alpha.0.js +1 -0
  5. package/dist/interface/@popperjs.BQBsAJpH.0.0.31.alpha.0.js +1 -0
  6. package/dist/interface/@react-dnd.CcwRs9xb.0.0.31.alpha.0.js +1 -0
  7. package/dist/interface/@socket.io.Dkula2eQ.0.0.31.alpha.0.js +1 -0
  8. package/dist/interface/@tanstack.JA82H5vk.0.0.31.alpha.0.js +1 -0
  9. package/dist/interface/@vee-validate.CA1ZbSb8.0.0.31.alpha.0.js +5 -0
  10. package/dist/interface/@vue.DawUEI-_.0.0.31.alpha.0.js +17 -0
  11. package/dist/interface/@vueform.7BwteSAI.0.0.31.alpha.0.js +1 -0
  12. package/dist/interface/@vueuse.CxhADbVS.0.0.31.alpha.0.js +1 -0
  13. package/dist/interface/@xterm.DEGikZnR.0.0.31.alpha.0.js +66 -0
  14. package/dist/interface/Account.BWV7axVK.0.0.31.alpha.0.js +1 -0
  15. package/dist/interface/Adminpanel.Cat3Re-m.0.0.31.alpha.0.js +2 -0
  16. package/dist/interface/Appearance.Cy-OjBQU.0.0.31.alpha.0.js +1 -0
  17. package/dist/interface/Backup.DT-lEb0w.0.0.31.alpha.0.js +1 -0
  18. package/dist/interface/Camera.BA2pdfOk.0.0.31.alpha.0.js +1 -0
  19. package/dist/interface/Cameras.Cd5PwZGj.0.0.31.alpha.0.js +1 -0
  20. package/dist/interface/Camview.B_SYtZBE.0.0.31.alpha.0.js +1 -0
  21. package/dist/interface/Config.lwJ4SPlI.0.0.31.alpha.0.js +1 -0
  22. package/dist/interface/Console.DcB6i6K8.0.0.31.alpha.0.js +4 -0
  23. package/dist/interface/FirstSteps.T_0B6C8R.0.0.31.alpha.0.js +1 -0
  24. package/dist/interface/NewCamera.DHO1TCd9.0.0.31.alpha.0.js +448 -0
  25. package/dist/interface/Plugin.DDu7vOMq.0.0.31.alpha.0.js +1 -0
  26. package/dist/interface/Plugins.Bd6tuB3h.0.0.31.alpha.0.js +1 -0
  27. package/dist/interface/Recordings.BD3bPJtl.0.0.31.alpha.0.js +1 -0
  28. package/dist/interface/Recordings.DHA-Tow3.0.0.31.alpha.0.js +1 -0
  29. package/dist/interface/Settings.DfhNSXuH.0.0.31.alpha.0.js +1 -0
  30. package/dist/interface/System.DG6Xdmy5.0.0.31.alpha.0.js +4 -0
  31. package/dist/interface/User.DZlqgjtQ.0.0.31.alpha.0.js +1 -0
  32. package/dist/interface/VConfigEditor.vue_vue_type_script_setup_true_lang.DTxqNgDe.0.0.31.alpha.0.js +2 -0
  33. package/dist/interface/VConsole.AQlLk_M_.0.0.31.alpha.0.js +1 -0
  34. package/dist/interface/VPlayer.S4oDmoQc.0.0.31.alpha.0.js +1 -0
  35. package/dist/interface/VPluginCard.CSvdGcaM.0.0.31.alpha.0.js +4 -0
  36. package/dist/interface/ace-builds.C-7gpKoK.0.0.31.alpha.0.js +970 -0
  37. package/dist/interface/apexcharts.DQhLo52f.0.0.31.alpha.0.js +795 -0
  38. package/dist/interface/assets/@vueform.0.0.31.alpha.0.h7tNX9p6.css +1 -0
  39. package/dist/interface/assets/@xterm.0.0.31.alpha.0.CGrrDQr5.css +32 -0
  40. package/dist/interface/assets/Account.0.0.31.alpha.0.Ce3OmKrC.css +1 -0
  41. package/dist/interface/assets/Adminpanel.0.0.31.alpha.0.CXsTAXPL.css +1 -0
  42. package/dist/interface/assets/Backup.0.0.31.alpha.0.BIwaSlv3.css +1 -0
  43. package/dist/interface/assets/Camera.0.0.31.alpha.0.BDtUJ-lA.css +1 -0
  44. package/dist/interface/assets/Cameras.0.0.31.alpha.0.Djx0F2MM.css +1 -0
  45. package/dist/interface/assets/Camview.0.0.31.alpha.0.Ce_V-Nxj.css +1 -0
  46. package/dist/interface/assets/Config.0.0.31.alpha.0.xOTKGJ5Y.css +1 -0
  47. package/dist/interface/assets/Console.0.0.31.alpha.0.DWrfRWs9.css +1 -0
  48. package/dist/interface/assets/FirstSteps.0.0.31.alpha.0.CCo2y-sU.css +1 -0
  49. package/dist/interface/assets/NewCamera.0.0.31.alpha.0.BWK7TkdY.css +1 -0
  50. package/dist/interface/assets/Plugin.0.0.31.alpha.0.BtRA6zDt.css +1 -0
  51. package/dist/interface/assets/Plugins.0.0.31.alpha.0.Cwu0aGUO.css +1 -0
  52. package/dist/interface/assets/Settings.0.0.31.alpha.0.DC_-E3CR.css +1 -0
  53. package/dist/interface/assets/User.0.0.31.alpha.0.DPDcJbx8.css +1 -0
  54. package/dist/interface/assets/VConsole.0.0.31.alpha.0.BZT1WyS-.css +1 -0
  55. package/dist/interface/assets/VPlayer.0.0.31.alpha.0.BQMP8JwH.css +1 -0
  56. package/dist/interface/assets/VPluginCard.0.0.31.alpha.0.CyNvwFGk.css +1 -0
  57. package/dist/interface/assets/highlight.0.0.31.alpha.0.DgoK_Xib.css +1 -0
  58. package/dist/interface/assets/logo-256.0.0.31.alpha.0.BCQk9H1-.png +0 -0
  59. package/dist/interface/assets/logo-512.0.0.31.alpha.0.DLKVOU2S.png +0 -0
  60. package/dist/interface/assets/logo.0.0.31.alpha.0.DmEiRk0z.png +0 -0
  61. package/dist/interface/assets/main.0.0.31.alpha.0.CqDyfc1x.css +1 -0
  62. package/dist/interface/assets/mode-json.0.0.31.alpha.0.Br7xisR1.js +275 -0
  63. package/dist/interface/assets/mode-yaml.0.0.31.alpha.0.CIYL8U3d.js +395 -0
  64. package/dist/interface/assets/v-calendar.0.0.31.alpha.0.CtSuDYZU.css +1 -0
  65. package/dist/interface/assets/vue3-toastify.0.0.31.alpha.0.DTY1DMRs.css +1 -0
  66. package/dist/interface/assets/vuetify.0.0.31.alpha.0.Cd1awv3t.css +5 -0
  67. package/dist/interface/axios.C-n2IhIP.0.0.31.alpha.0.js +6 -0
  68. package/dist/interface/browserconfig.xml +11 -0
  69. package/dist/interface/compare-versions.DqEOhma6.0.0.31.alpha.0.js +1 -0
  70. package/dist/interface/dijkstrajs.D_NXgYpA.0.0.31.alpha.0.js +1 -0
  71. package/dist/interface/dnd-core.ulJ0mknj.0.0.31.alpha.0.js +1 -0
  72. package/dist/interface/draggabilly.eq53ylJ3.0.0.31.alpha.0.js +6 -0
  73. package/dist/interface/engine.io-client.BWNiR0rU.0.0.31.alpha.0.js +1 -0
  74. package/dist/interface/engine.io-parser.BiEtp6m2.0.0.31.alpha.0.js +1 -0
  75. package/dist/interface/entities.C20TfXL6.0.0.31.alpha.0.js +1 -0
  76. package/dist/interface/ev-emitter.s441qML4.0.0.31.alpha.0.js +1 -0
  77. package/dist/interface/fast-deep-equal.D-ZniTWc.0.0.31.alpha.0.js +1 -0
  78. package/dist/interface/fonts/Inter/Inter-Regular.ttf +0 -0
  79. package/dist/interface/get-size.D1dS-IaP.0.0.31.alpha.0.js +5 -0
  80. package/dist/interface/highlight.js.BPsCA8BI.0.0.31.alpha.0.js +2 -0
  81. package/dist/interface/index.html +376 -0
  82. package/dist/interface/linkify-it.CYQWol_J.0.0.31.alpha.0.js +1 -0
  83. package/dist/interface/main.BF6AA77k.0.0.31.alpha.0.js +2 -0
  84. package/dist/interface/manifest.webmanifest +1 -0
  85. package/dist/interface/markdown-it.1DZlV4JT.0.0.31.alpha.0.js +15 -0
  86. package/dist/interface/mdurl.k9Sl0PQj.0.0.31.alpha.0.js +2 -0
  87. package/dist/interface/nprogress.B9MKHEWD.0.0.31.alpha.0.js +2 -0
  88. package/dist/interface/pinia.DTboBXXN.0.0.31.alpha.0.js +5 -0
  89. package/dist/interface/plugins.DQaBHq32.0.0.31.alpha.0.js +1 -0
  90. package/dist/interface/punycode.js.Dj65hjkv.0.0.31.alpha.0.js +1 -0
  91. package/dist/interface/pwa/apple-splash-landscape-dark-1136x640.png +0 -0
  92. package/dist/interface/pwa/apple-splash-landscape-dark-1334x750.png +0 -0
  93. package/dist/interface/pwa/apple-splash-landscape-dark-1792x828.png +0 -0
  94. package/dist/interface/pwa/apple-splash-landscape-dark-2048x1536.png +0 -0
  95. package/dist/interface/pwa/apple-splash-landscape-dark-2160x1620.png +0 -0
  96. package/dist/interface/pwa/apple-splash-landscape-dark-2208x1242.png +0 -0
  97. package/dist/interface/pwa/apple-splash-landscape-dark-2224x1668.png +0 -0
  98. package/dist/interface/pwa/apple-splash-landscape-dark-2388x1668.png +0 -0
  99. package/dist/interface/pwa/apple-splash-landscape-dark-2436x1125.png +0 -0
  100. package/dist/interface/pwa/apple-splash-landscape-dark-2532x1170.png +0 -0
  101. package/dist/interface/pwa/apple-splash-landscape-dark-2556x1179.png +0 -0
  102. package/dist/interface/pwa/apple-splash-landscape-dark-2688x1242.png +0 -0
  103. package/dist/interface/pwa/apple-splash-landscape-dark-2732x2048.png +0 -0
  104. package/dist/interface/pwa/apple-splash-landscape-dark-2778x1284.png +0 -0
  105. package/dist/interface/pwa/apple-splash-landscape-dark-2796x1290.png +0 -0
  106. package/dist/interface/pwa/apple-splash-landscape-light-1136x640.png +0 -0
  107. package/dist/interface/pwa/apple-splash-landscape-light-1334x750.png +0 -0
  108. package/dist/interface/pwa/apple-splash-landscape-light-1792x828.png +0 -0
  109. package/dist/interface/pwa/apple-splash-landscape-light-2048x1536.png +0 -0
  110. package/dist/interface/pwa/apple-splash-landscape-light-2160x1620.png +0 -0
  111. package/dist/interface/pwa/apple-splash-landscape-light-2208x1242.png +0 -0
  112. package/dist/interface/pwa/apple-splash-landscape-light-2224x1668.png +0 -0
  113. package/dist/interface/pwa/apple-splash-landscape-light-2388x1668.png +0 -0
  114. package/dist/interface/pwa/apple-splash-landscape-light-2436x1125.png +0 -0
  115. package/dist/interface/pwa/apple-splash-landscape-light-2532x1170.png +0 -0
  116. package/dist/interface/pwa/apple-splash-landscape-light-2556x1179.png +0 -0
  117. package/dist/interface/pwa/apple-splash-landscape-light-2688x1242.png +0 -0
  118. package/dist/interface/pwa/apple-splash-landscape-light-2732x2048.png +0 -0
  119. package/dist/interface/pwa/apple-splash-landscape-light-2778x1284.png +0 -0
  120. package/dist/interface/pwa/apple-splash-landscape-light-2796x1290.png +0 -0
  121. package/dist/interface/pwa/apple-splash-portrait-dark-1125x2436.png +0 -0
  122. package/dist/interface/pwa/apple-splash-portrait-dark-1170x2532.png +0 -0
  123. package/dist/interface/pwa/apple-splash-portrait-dark-1179x2556.png +0 -0
  124. package/dist/interface/pwa/apple-splash-portrait-dark-1242x2208.png +0 -0
  125. package/dist/interface/pwa/apple-splash-portrait-dark-1242x2688.png +0 -0
  126. package/dist/interface/pwa/apple-splash-portrait-dark-1284x2778.png +0 -0
  127. package/dist/interface/pwa/apple-splash-portrait-dark-1290x2796.png +0 -0
  128. package/dist/interface/pwa/apple-splash-portrait-dark-1536x2048.png +0 -0
  129. package/dist/interface/pwa/apple-splash-portrait-dark-1620x2160.png +0 -0
  130. package/dist/interface/pwa/apple-splash-portrait-dark-1668x2224.png +0 -0
  131. package/dist/interface/pwa/apple-splash-portrait-dark-1668x2388.png +0 -0
  132. package/dist/interface/pwa/apple-splash-portrait-dark-2048x2732.png +0 -0
  133. package/dist/interface/pwa/apple-splash-portrait-dark-640x1136.png +0 -0
  134. package/dist/interface/pwa/apple-splash-portrait-dark-750x1334.png +0 -0
  135. package/dist/interface/pwa/apple-splash-portrait-dark-828x1792.png +0 -0
  136. package/dist/interface/pwa/apple-splash-portrait-light-1125x2436.png +0 -0
  137. package/dist/interface/pwa/apple-splash-portrait-light-1170x2532.png +0 -0
  138. package/dist/interface/pwa/apple-splash-portrait-light-1179x2556.png +0 -0
  139. package/dist/interface/pwa/apple-splash-portrait-light-1242x2208.png +0 -0
  140. package/dist/interface/pwa/apple-splash-portrait-light-1242x2688.png +0 -0
  141. package/dist/interface/pwa/apple-splash-portrait-light-1284x2778.png +0 -0
  142. package/dist/interface/pwa/apple-splash-portrait-light-1290x2796.png +0 -0
  143. package/dist/interface/pwa/apple-splash-portrait-light-1536x2048.png +0 -0
  144. package/dist/interface/pwa/apple-splash-portrait-light-1620x2160.png +0 -0
  145. package/dist/interface/pwa/apple-splash-portrait-light-1668x2224.png +0 -0
  146. package/dist/interface/pwa/apple-splash-portrait-light-1668x2388.png +0 -0
  147. package/dist/interface/pwa/apple-splash-portrait-light-2048x2732.png +0 -0
  148. package/dist/interface/pwa/apple-splash-portrait-light-640x1136.png +0 -0
  149. package/dist/interface/pwa/apple-splash-portrait-light-750x1334.png +0 -0
  150. package/dist/interface/pwa/apple-splash-portrait-light-828x1792.png +0 -0
  151. package/dist/interface/pwa/apple-touch-icon-180x180.png +0 -0
  152. package/dist/interface/pwa/favicon-16.ico +0 -0
  153. package/dist/interface/pwa/favicon-32.ico +0 -0
  154. package/dist/interface/pwa/favicon-48.ico +0 -0
  155. package/dist/interface/pwa/favicon-64.ico +0 -0
  156. package/dist/interface/pwa/logo.svg +1 -0
  157. package/dist/interface/pwa/maskable-icon-1240x600.png +0 -0
  158. package/dist/interface/pwa/maskable-icon-512x512.png +0 -0
  159. package/dist/interface/pwa/maskable-icon-620x300.png +0 -0
  160. package/dist/interface/pwa/pwa-1024x1024.png +0 -0
  161. package/dist/interface/pwa/pwa-120x120.png +0 -0
  162. package/dist/interface/pwa/pwa-144x144.png +0 -0
  163. package/dist/interface/pwa/pwa-152x152.png +0 -0
  164. package/dist/interface/pwa/pwa-167x167.png +0 -0
  165. package/dist/interface/pwa/pwa-180x180.png +0 -0
  166. package/dist/interface/pwa/pwa-192x192.png +0 -0
  167. package/dist/interface/pwa/pwa-24x24.png +0 -0
  168. package/dist/interface/pwa/pwa-300x300.png +0 -0
  169. package/dist/interface/pwa/pwa-36x36.png +0 -0
  170. package/dist/interface/pwa/pwa-48x48.png +0 -0
  171. package/dist/interface/pwa/pwa-50x50.png +0 -0
  172. package/dist/interface/pwa/pwa-64x64.png +0 -0
  173. package/dist/interface/pwa/pwa-72x72.png +0 -0
  174. package/dist/interface/pwa/pwa-88x88.png +0 -0
  175. package/dist/interface/pwa/pwa-96x96.png +0 -0
  176. package/dist/interface/qrcode.DIpB2cN9.0.0.31.alpha.0.js +8 -0
  177. package/dist/interface/react-dnd-html5-backend.1HQjlkwI.0.0.31.alpha.0.js +2 -0
  178. package/dist/interface/react-dnd-touch-backend.B1qQXtk5.0.0.31.alpha.0.js +1 -0
  179. package/dist/interface/redux.CuxFRhX_.0.0.31.alpha.0.js +1 -0
  180. package/dist/interface/registerSW.js +1 -0
  181. package/dist/interface/robots.txt +2 -0
  182. package/dist/interface/rxjs.D3x1dEbj.0.0.31.alpha.0.js +3 -0
  183. package/dist/interface/socket.io-client.Bb26UC3A.0.0.31.alpha.0.js +1 -0
  184. package/dist/interface/socket.io-parser.Cg20fkq3.0.0.31.alpha.0.js +1 -0
  185. package/dist/interface/sw.js +1 -0
  186. package/dist/interface/system.z_YWfuXO.0.0.31.alpha.0.js +1 -0
  187. package/dist/interface/tslib.9k7AwCpt.0.0.31.alpha.0.js +1 -0
  188. package/dist/interface/types.Cz9TaZAP.0.0.31.alpha.0.js +1 -0
  189. package/dist/interface/uc.micro.kMc2yuuw.0.0.31.alpha.0.js +1 -0
  190. package/dist/interface/ui.EWScThRV.0.0.31.alpha.0.js +1 -0
  191. package/dist/interface/unidragger.CFLVmDeU.0.0.31.alpha.0.js +5 -0
  192. package/dist/interface/utils.mAKpSMLY.0.0.31.alpha.0.js +1 -0
  193. package/dist/interface/uuid.DvF23Exx.0.0.31.alpha.0.js +1 -0
  194. package/dist/interface/v-calendar.C7xnHLY1.0.0.31.alpha.0.js +1 -0
  195. package/dist/interface/vee-validate.CIbc50Ub.0.0.31.alpha.0.js +5 -0
  196. package/dist/interface/vue-i18n.DR91v838.0.0.31.alpha.0.js +9 -0
  197. package/dist/interface/vue-inline-svg.BfskkdgC.0.0.31.alpha.0.js +1 -0
  198. package/dist/interface/vue-router.ZwJI20Fm.0.0.31.alpha.0.js +5 -0
  199. package/dist/interface/vue.l0sNRNKZ.0.0.31.alpha.0.js +1 -0
  200. package/dist/interface/vue3-apexcharts.D_cl2oKo.0.0.31.alpha.0.js +1 -0
  201. package/dist/interface/vue3-dnd.ImnQytSf.0.0.31.alpha.0.js +1 -0
  202. package/dist/interface/vue3-toastify.DB_3YzbA.0.0.31.alpha.0.js +1 -0
  203. package/dist/interface/vuetify.DSEe9Drp.0.0.31.alpha.0.js +5 -0
  204. package/dist/interface/workbox-3e911b1d.js +1 -0
  205. package/dist/interface/zod.DnW1_kUe.0.0.31.alpha.0.js +1 -0
  206. package/dist/server/bin/cameraui.d.ts +54 -0
  207. package/dist/server/bin/cameraui.js +625 -0
  208. package/dist/server/bin/cameraui.js.map +1 -0
  209. package/dist/server/bin/fork.d.ts +2 -0
  210. package/dist/server/bin/fork.js +13 -0
  211. package/dist/server/bin/fork.js.map +1 -0
  212. package/dist/server/bin/installer/base.d.ts +17 -0
  213. package/dist/server/bin/installer/base.js +45 -0
  214. package/dist/server/bin/installer/base.js.map +1 -0
  215. package/dist/server/bin/installer/darwin.d.ts +61 -0
  216. package/dist/server/bin/installer/darwin.js +249 -0
  217. package/dist/server/bin/installer/darwin.js.map +1 -0
  218. package/dist/server/bin/installer/freebsd.d.ts +64 -0
  219. package/dist/server/bin/installer/freebsd.js +254 -0
  220. package/dist/server/bin/installer/freebsd.js.map +1 -0
  221. package/dist/server/bin/installer/linux.d.ts +103 -0
  222. package/dist/server/bin/installer/linux.js +482 -0
  223. package/dist/server/bin/installer/linux.js.map +1 -0
  224. package/dist/server/bin/installer/win32.d.ts +45 -0
  225. package/dist/server/bin/installer/win32.js +178 -0
  226. package/dist/server/bin/installer/win32.js.map +1 -0
  227. package/dist/server/package.json +137 -0
  228. package/dist/server/requirements.txt +13 -0
  229. package/dist/server/src/api/controllers/api.controller.d.ts +7 -0
  230. package/dist/server/src/api/controllers/api.controller.js +14 -0
  231. package/dist/server/src/api/controllers/api.controller.js.map +1 -0
  232. package/dist/server/src/api/controllers/auth.controller.d.ts +16 -0
  233. package/dist/server/src/api/controllers/auth.controller.js +233 -0
  234. package/dist/server/src/api/controllers/auth.controller.js.map +1 -0
  235. package/dist/server/src/api/controllers/backup.controller.d.ts +10 -0
  236. package/dist/server/src/api/controllers/backup.controller.js +52 -0
  237. package/dist/server/src/api/controllers/backup.controller.js.map +1 -0
  238. package/dist/server/src/api/controllers/cameras.controller.d.ts +36 -0
  239. package/dist/server/src/api/controllers/cameras.controller.js +586 -0
  240. package/dist/server/src/api/controllers/cameras.controller.js.map +1 -0
  241. package/dist/server/src/api/controllers/config.controller.d.ts +14 -0
  242. package/dist/server/src/api/controllers/config.controller.js +89 -0
  243. package/dist/server/src/api/controllers/config.controller.js.map +1 -0
  244. package/dist/server/src/api/controllers/files.controller.d.ts +8 -0
  245. package/dist/server/src/api/controllers/files.controller.js +28 -0
  246. package/dist/server/src/api/controllers/files.controller.js.map +1 -0
  247. package/dist/server/src/api/controllers/frameWorkers.controller.d.ts +11 -0
  248. package/dist/server/src/api/controllers/frameWorkers.controller.js +85 -0
  249. package/dist/server/src/api/controllers/frameWorkers.controller.js.map +1 -0
  250. package/dist/server/src/api/controllers/plugins.controller.d.ts +58 -0
  251. package/dist/server/src/api/controllers/plugins.controller.js +1282 -0
  252. package/dist/server/src/api/controllers/plugins.controller.js.map +1 -0
  253. package/dist/server/src/api/controllers/system.controller.d.ts +21 -0
  254. package/dist/server/src/api/controllers/system.controller.js +228 -0
  255. package/dist/server/src/api/controllers/system.controller.js.map +1 -0
  256. package/dist/server/src/api/controllers/users.controller.d.ts +28 -0
  257. package/dist/server/src/api/controllers/users.controller.js +507 -0
  258. package/dist/server/src/api/controllers/users.controller.js.map +1 -0
  259. package/dist/server/src/api/database/constants.d.ts +8 -0
  260. package/dist/server/src/api/database/constants.js +9 -0
  261. package/dist/server/src/api/database/constants.js.map +1 -0
  262. package/dist/server/src/api/database/index.d.ts +32 -0
  263. package/dist/server/src/api/database/index.js +274 -0
  264. package/dist/server/src/api/database/index.js.map +1 -0
  265. package/dist/server/src/api/database/migration.d.ts +12 -0
  266. package/dist/server/src/api/database/migration.js +48 -0
  267. package/dist/server/src/api/database/migration.js.map +1 -0
  268. package/dist/server/src/api/database/types.d.ts +105 -0
  269. package/dist/server/src/api/database/types.js +2 -0
  270. package/dist/server/src/api/database/types.js.map +1 -0
  271. package/dist/server/src/api/go2rtc/api/application.d.ts +9 -0
  272. package/dist/server/src/api/go2rtc/api/application.js +38 -0
  273. package/dist/server/src/api/go2rtc/api/application.js.map +1 -0
  274. package/dist/server/src/api/go2rtc/api/config.d.ts +8 -0
  275. package/dist/server/src/api/go2rtc/api/config.js +44 -0
  276. package/dist/server/src/api/go2rtc/api/config.js.map +1 -0
  277. package/dist/server/src/api/go2rtc/api/index.d.ts +1 -0
  278. package/dist/server/src/api/go2rtc/api/index.js +28 -0
  279. package/dist/server/src/api/go2rtc/api/index.js.map +1 -0
  280. package/dist/server/src/api/go2rtc/api/snapshot.d.ts +8 -0
  281. package/dist/server/src/api/go2rtc/api/snapshot.js +34 -0
  282. package/dist/server/src/api/go2rtc/api/snapshot.js.map +1 -0
  283. package/dist/server/src/api/go2rtc/api/streams.d.ts +11 -0
  284. package/dist/server/src/api/go2rtc/api/streams.js +57 -0
  285. package/dist/server/src/api/go2rtc/api/streams.js.map +1 -0
  286. package/dist/server/src/api/go2rtc/index.d.ts +13 -0
  287. package/dist/server/src/api/go2rtc/index.js +25 -0
  288. package/dist/server/src/api/go2rtc/index.js.map +1 -0
  289. package/dist/server/src/api/go2rtc/queue.d.ts +10 -0
  290. package/dist/server/src/api/go2rtc/queue.js +38 -0
  291. package/dist/server/src/api/go2rtc/queue.js.map +1 -0
  292. package/dist/server/src/api/go2rtc/types.d.ts +108 -0
  293. package/dist/server/src/api/go2rtc/types.js +2 -0
  294. package/dist/server/src/api/go2rtc/types.js.map +1 -0
  295. package/dist/server/src/api/index.d.ts +20 -0
  296. package/dist/server/src/api/index.js +223 -0
  297. package/dist/server/src/api/index.js.map +1 -0
  298. package/dist/server/src/api/middlewares/authPermission.middleware.d.ts +5 -0
  299. package/dist/server/src/api/middlewares/authPermission.middleware.js +28 -0
  300. package/dist/server/src/api/middlewares/authPermission.middleware.js.map +1 -0
  301. package/dist/server/src/api/middlewares/authValidation.middleware.d.ts +4 -0
  302. package/dist/server/src/api/middlewares/authValidation.middleware.js +129 -0
  303. package/dist/server/src/api/middlewares/authValidation.middleware.js.map +1 -0
  304. package/dist/server/src/api/middlewares/pagination.middleware.d.ts +3 -0
  305. package/dist/server/src/api/middlewares/pagination.middleware.js +65 -0
  306. package/dist/server/src/api/middlewares/pagination.middleware.js.map +1 -0
  307. package/dist/server/src/api/middlewares/socketAuth.middleware.d.ts +41 -0
  308. package/dist/server/src/api/middlewares/socketAuth.middleware.js +81 -0
  309. package/dist/server/src/api/middlewares/socketAuth.middleware.js.map +1 -0
  310. package/dist/server/src/api/plugins/cameraui.plugin.d.ts +11 -0
  311. package/dist/server/src/api/plugins/cameraui.plugin.js +6 -0
  312. package/dist/server/src/api/plugins/cameraui.plugin.js.map +1 -0
  313. package/dist/server/src/api/plugins/database.plugin.d.ts +11 -0
  314. package/dist/server/src/api/plugins/database.plugin.js +12 -0
  315. package/dist/server/src/api/plugins/database.plugin.js.map +1 -0
  316. package/dist/server/src/api/plugins/go2rtc.plugin.d.ts +11 -0
  317. package/dist/server/src/api/plugins/go2rtc.plugin.js +11 -0
  318. package/dist/server/src/api/plugins/go2rtc.plugin.js.map +1 -0
  319. package/dist/server/src/api/plugins/logger.plugin.d.ts +7 -0
  320. package/dist/server/src/api/plugins/logger.plugin.js +29 -0
  321. package/dist/server/src/api/plugins/logger.plugin.js.map +1 -0
  322. package/dist/server/src/api/plugins/socket.plugin.d.ts +11 -0
  323. package/dist/server/src/api/plugins/socket.plugin.js +12 -0
  324. package/dist/server/src/api/plugins/socket.plugin.js.map +1 -0
  325. package/dist/server/src/api/plugins/system.plugin.d.ts +18 -0
  326. package/dist/server/src/api/plugins/system.plugin.js +22 -0
  327. package/dist/server/src/api/plugins/system.plugin.js.map +1 -0
  328. package/dist/server/src/api/plugins/useragent.plugin.d.ts +8 -0
  329. package/dist/server/src/api/plugins/useragent.plugin.js +10 -0
  330. package/dist/server/src/api/plugins/useragent.plugin.js.map +1 -0
  331. package/dist/server/src/api/routes/api.routes.d.ts +2 -0
  332. package/dist/server/src/api/routes/api.routes.js +7 -0
  333. package/dist/server/src/api/routes/api.routes.js.map +1 -0
  334. package/dist/server/src/api/routes/auth.routes.d.ts +2 -0
  335. package/dist/server/src/api/routes/auth.routes.js +47 -0
  336. package/dist/server/src/api/routes/auth.routes.js.map +1 -0
  337. package/dist/server/src/api/routes/backup.routes.d.ts +2 -0
  338. package/dist/server/src/api/routes/backup.routes.js +23 -0
  339. package/dist/server/src/api/routes/backup.routes.js.map +1 -0
  340. package/dist/server/src/api/routes/cameras.routes.d.ts +2 -0
  341. package/dist/server/src/api/routes/cameras.routes.js +205 -0
  342. package/dist/server/src/api/routes/cameras.routes.js.map +1 -0
  343. package/dist/server/src/api/routes/config.routes.d.ts +2 -0
  344. package/dist/server/src/api/routes/config.routes.js +55 -0
  345. package/dist/server/src/api/routes/config.routes.js.map +1 -0
  346. package/dist/server/src/api/routes/files.routes.d.ts +2 -0
  347. package/dist/server/src/api/routes/files.routes.js +12 -0
  348. package/dist/server/src/api/routes/files.routes.js.map +1 -0
  349. package/dist/server/src/api/routes/frameWorkers.routes.d.ts +2 -0
  350. package/dist/server/src/api/routes/frameWorkers.routes.js +33 -0
  351. package/dist/server/src/api/routes/frameWorkers.routes.js.map +1 -0
  352. package/dist/server/src/api/routes/index.d.ts +6 -0
  353. package/dist/server/src/api/routes/index.js +32 -0
  354. package/dist/server/src/api/routes/index.js.map +1 -0
  355. package/dist/server/src/api/routes/plugins.routes.d.ts +2 -0
  356. package/dist/server/src/api/routes/plugins.routes.js +339 -0
  357. package/dist/server/src/api/routes/plugins.routes.js.map +1 -0
  358. package/dist/server/src/api/routes/system.routes.d.ts +2 -0
  359. package/dist/server/src/api/routes/system.routes.js +83 -0
  360. package/dist/server/src/api/routes/system.routes.js.map +1 -0
  361. package/dist/server/src/api/routes/users.routes.d.ts +2 -0
  362. package/dist/server/src/api/routes/users.routes.js +139 -0
  363. package/dist/server/src/api/routes/users.routes.js.map +1 -0
  364. package/dist/server/src/api/schemas/backup.schema.d.ts +118 -0
  365. package/dist/server/src/api/schemas/backup.schema.js +75 -0
  366. package/dist/server/src/api/schemas/backup.schema.js.map +1 -0
  367. package/dist/server/src/api/schemas/cameras.schema.d.ts +960 -0
  368. package/dist/server/src/api/schemas/cameras.schema.js +316 -0
  369. package/dist/server/src/api/schemas/cameras.schema.js.map +1 -0
  370. package/dist/server/src/api/schemas/config.schema.d.ts +122 -0
  371. package/dist/server/src/api/schemas/config.schema.js +44 -0
  372. package/dist/server/src/api/schemas/config.schema.js.map +1 -0
  373. package/dist/server/src/api/schemas/go2rtc.schema.d.ts +703 -0
  374. package/dist/server/src/api/schemas/go2rtc.schema.js +180 -0
  375. package/dist/server/src/api/schemas/go2rtc.schema.js.map +1 -0
  376. package/dist/server/src/api/schemas/plugins.schema.d.ts +72 -0
  377. package/dist/server/src/api/schemas/plugins.schema.js +103 -0
  378. package/dist/server/src/api/schemas/plugins.schema.js.map +1 -0
  379. package/dist/server/src/api/schemas/system.schema.d.ts +9 -0
  380. package/dist/server/src/api/schemas/system.schema.js +8 -0
  381. package/dist/server/src/api/schemas/system.schema.js.map +1 -0
  382. package/dist/server/src/api/schemas/users.schema.d.ts +1013 -0
  383. package/dist/server/src/api/schemas/users.schema.js +157 -0
  384. package/dist/server/src/api/schemas/users.schema.js.map +1 -0
  385. package/dist/server/src/api/services/auth.service.d.ts +24 -0
  386. package/dist/server/src/api/services/auth.service.js +191 -0
  387. package/dist/server/src/api/services/auth.service.js.map +1 -0
  388. package/dist/server/src/api/services/backup.service.d.ts +11 -0
  389. package/dist/server/src/api/services/backup.service.js +109 -0
  390. package/dist/server/src/api/services/backup.service.js.map +1 -0
  391. package/dist/server/src/api/services/cameras.service.d.ts +53 -0
  392. package/dist/server/src/api/services/cameras.service.js +743 -0
  393. package/dist/server/src/api/services/cameras.service.js.map +1 -0
  394. package/dist/server/src/api/services/plugins.service.d.ts +25 -0
  395. package/dist/server/src/api/services/plugins.service.js +143 -0
  396. package/dist/server/src/api/services/plugins.service.js.map +1 -0
  397. package/dist/server/src/api/services/system.service.d.ts +7 -0
  398. package/dist/server/src/api/services/system.service.js +23 -0
  399. package/dist/server/src/api/services/system.service.js.map +1 -0
  400. package/dist/server/src/api/services/users.service.d.ts +25 -0
  401. package/dist/server/src/api/services/users.service.js +198 -0
  402. package/dist/server/src/api/services/users.service.js.map +1 -0
  403. package/dist/server/src/api/types/index.d.ts +599 -0
  404. package/dist/server/src/api/types/index.js +9 -0
  405. package/dist/server/src/api/types/index.js.map +1 -0
  406. package/dist/server/src/api/utils/cameraSource.d.ts +2 -0
  407. package/dist/server/src/api/utils/cameraSource.js +34 -0
  408. package/dist/server/src/api/utils/cameraSource.js.map +1 -0
  409. package/dist/server/src/api/utils/cert.d.ts +11 -0
  410. package/dist/server/src/api/utils/cert.js +411 -0
  411. package/dist/server/src/api/utils/cert.js.map +1 -0
  412. package/dist/server/src/api/utils/constants.d.ts +15 -0
  413. package/dist/server/src/api/utils/constants.js +17 -0
  414. package/dist/server/src/api/utils/constants.js.map +1 -0
  415. package/dist/server/src/api/utils/fetch.d.ts +2 -0
  416. package/dist/server/src/api/utils/fetch.js +24 -0
  417. package/dist/server/src/api/utils/fetch.js.map +1 -0
  418. package/dist/server/src/api/utils/moveFiles.d.ts +1 -0
  419. package/dist/server/src/api/utils/moveFiles.js +39 -0
  420. package/dist/server/src/api/utils/moveFiles.js.map +1 -0
  421. package/dist/server/src/api/utils/parse.d.ts +2 -0
  422. package/dist/server/src/api/utils/parse.js +12 -0
  423. package/dist/server/src/api/utils/parse.js.map +1 -0
  424. package/dist/server/src/api/websocket/index.d.ts +16 -0
  425. package/dist/server/src/api/websocket/index.js +75 -0
  426. package/dist/server/src/api/websocket/index.js.map +1 -0
  427. package/dist/server/src/api/websocket/nsp/logs.d.ts +11 -0
  428. package/dist/server/src/api/websocket/nsp/logs.js +114 -0
  429. package/dist/server/src/api/websocket/nsp/logs.js.map +1 -0
  430. package/dist/server/src/api/websocket/nsp/main.d.ts +7 -0
  431. package/dist/server/src/api/websocket/nsp/main.js +8 -0
  432. package/dist/server/src/api/websocket/nsp/main.js.map +1 -0
  433. package/dist/server/src/api/websocket/nsp/metrics.d.ts +24 -0
  434. package/dist/server/src/api/websocket/nsp/metrics.js +166 -0
  435. package/dist/server/src/api/websocket/nsp/metrics.js.map +1 -0
  436. package/dist/server/src/api/websocket/nsp/notifications.d.ts +12 -0
  437. package/dist/server/src/api/websocket/nsp/notifications.js +30 -0
  438. package/dist/server/src/api/websocket/nsp/notifications.js.map +1 -0
  439. package/dist/server/src/api/websocket/nsp/plugins.d.ts +13 -0
  440. package/dist/server/src/api/websocket/nsp/plugins.js +29 -0
  441. package/dist/server/src/api/websocket/nsp/plugins.js.map +1 -0
  442. package/dist/server/src/api/websocket/nsp/server.d.ts +21 -0
  443. package/dist/server/src/api/websocket/nsp/server.js +134 -0
  444. package/dist/server/src/api/websocket/nsp/server.js.map +1 -0
  445. package/dist/server/src/api/websocket/nsp/status.d.ts +15 -0
  446. package/dist/server/src/api/websocket/nsp/status.js +53 -0
  447. package/dist/server/src/api/websocket/nsp/status.js.map +1 -0
  448. package/dist/server/src/api/websocket/types.d.ts +47 -0
  449. package/dist/server/src/api/websocket/types.js +2 -0
  450. package/dist/server/src/api/websocket/types.js.map +1 -0
  451. package/dist/server/src/api.d.ts +37 -0
  452. package/dist/server/src/api.js +90 -0
  453. package/dist/server/src/api.js.map +1 -0
  454. package/dist/server/src/camera/controller.d.ts +49 -0
  455. package/dist/server/src/camera/controller.js +454 -0
  456. package/dist/server/src/camera/controller.js.map +1 -0
  457. package/dist/server/src/camera/types.d.ts +11 -0
  458. package/dist/server/src/camera/types.js +2 -0
  459. package/dist/server/src/camera/types.js.map +1 -0
  460. package/dist/server/src/decoder/index.d.ts +11 -0
  461. package/dist/server/src/decoder/index.js +32 -0
  462. package/dist/server/src/decoder/index.js.map +1 -0
  463. package/dist/server/src/decoder/types.d.ts +7 -0
  464. package/dist/server/src/decoder/types.js +2 -0
  465. package/dist/server/src/decoder/types.js.map +1 -0
  466. package/dist/server/src/decoder/worker.d.ts +40 -0
  467. package/dist/server/src/decoder/worker.js +233 -0
  468. package/dist/server/src/decoder/worker.js.map +1 -0
  469. package/dist/server/src/go2rtc/index.d.ts +25 -0
  470. package/dist/server/src/go2rtc/index.js +220 -0
  471. package/dist/server/src/go2rtc/index.js.map +1 -0
  472. package/dist/server/src/go2rtc/types.d.ts +14 -0
  473. package/dist/server/src/go2rtc/types.js +73 -0
  474. package/dist/server/src/go2rtc/types.js.map +1 -0
  475. package/dist/server/src/main.d.ts +1 -0
  476. package/dist/server/src/main.js +132 -0
  477. package/dist/server/src/main.js.map +1 -0
  478. package/dist/server/src/nats/index.d.ts +39 -0
  479. package/dist/server/src/nats/index.js +162 -0
  480. package/dist/server/src/nats/index.js.map +1 -0
  481. package/dist/server/src/nats/proxy/cameraDevice.d.ts +21 -0
  482. package/dist/server/src/nats/proxy/cameraDevice.js +262 -0
  483. package/dist/server/src/nats/proxy/cameraDevice.js.map +1 -0
  484. package/dist/server/src/nats/proxy/coreManager.d.ts +14 -0
  485. package/dist/server/src/nats/proxy/coreManager.js +70 -0
  486. package/dist/server/src/nats/proxy/coreManager.js.map +1 -0
  487. package/dist/server/src/nats/proxy/deviceManager.d.ts +14 -0
  488. package/dist/server/src/nats/proxy/deviceManager.js +101 -0
  489. package/dist/server/src/nats/proxy/deviceManager.js.map +1 -0
  490. package/dist/server/src/nats/server.d.ts +38 -0
  491. package/dist/server/src/nats/server.js +316 -0
  492. package/dist/server/src/nats/server.js.map +1 -0
  493. package/dist/server/src/nats/types.d.ts +18 -0
  494. package/dist/server/src/nats/types.js +2 -0
  495. package/dist/server/src/nats/types.js.map +1 -0
  496. package/dist/server/src/nats/utils.d.ts +2 -0
  497. package/dist/server/src/nats/utils.js +12 -0
  498. package/dist/server/src/nats/utils.js.map +1 -0
  499. package/dist/server/src/nats/websocket.d.ts +27 -0
  500. package/dist/server/src/nats/websocket.js +217 -0
  501. package/dist/server/src/nats/websocket.js.map +1 -0
  502. package/dist/server/src/plugins/index.d.ts +30 -0
  503. package/dist/server/src/plugins/index.js +244 -0
  504. package/dist/server/src/plugins/index.js.map +1 -0
  505. package/dist/server/src/plugins/plugin.d.ts +33 -0
  506. package/dist/server/src/plugins/plugin.js +159 -0
  507. package/dist/server/src/plugins/plugin.js.map +1 -0
  508. package/dist/server/src/plugins/types.d.ts +7 -0
  509. package/dist/server/src/plugins/types.js +3 -0
  510. package/dist/server/src/plugins/types.js.map +1 -0
  511. package/dist/server/src/plugins/worker.d.ts +36 -0
  512. package/dist/server/src/plugins/worker.js +293 -0
  513. package/dist/server/src/plugins/worker.js.map +1 -0
  514. package/dist/server/src/services/config/constants.d.ts +5 -0
  515. package/dist/server/src/services/config/constants.js +59 -0
  516. package/dist/server/src/services/config/constants.js.map +1 -0
  517. package/dist/server/src/services/config/index.d.ts +62 -0
  518. package/dist/server/src/services/config/index.js +399 -0
  519. package/dist/server/src/services/config/index.js.map +1 -0
  520. package/dist/server/src/services/config/types.d.ts +157 -0
  521. package/dist/server/src/services/config/types.js +11 -0
  522. package/dist/server/src/services/config/types.js.map +1 -0
  523. package/dist/server/src/services/logger/index.d.ts +11 -0
  524. package/dist/server/src/services/logger/index.js +35 -0
  525. package/dist/server/src/services/logger/index.js.map +1 -0
  526. package/dist/server/src/types.d.ts +7 -0
  527. package/dist/server/src/types.js +2 -0
  528. package/dist/server/src/types.js.map +1 -0
  529. package/localdeps.txt +5 -0
  530. package/package.json +137 -0
  531. package/upgrade-server.sh +205 -0
@@ -0,0 +1 @@
1
+ define(["exports"],(function(t){"use strict";try{self["workbox:core:7.0.0"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:7.0.0"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class i{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class r extends i{constructor(t,e,s){super((({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)}),e,s)}}class o{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",(t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map((e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})})));t.waitUntil(s),t.ports&&t.ports[0]&&s.then((()=>t.ports[0].postMessage(!0)))}}))}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let o=r&&r.handler;const c=t.method;if(!o&&this.i.has(c)&&(o=this.i.get(c)),!o)return;let a;try{a=o.handle({url:s,request:t,event:e,params:i})}catch(t){a=Promise.reject(t)}const h=r&&r.catchHandler;return a instanceof Promise&&(this.o||h)&&(a=a.catch((async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:i})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n}))),a}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const i=this.t.get(s.method)||[];for(const r of i){let i;const o=r.match({url:t,sameOrigin:e,request:s,event:n});if(o)return i=o,(Array.isArray(i)&&0===i.length||o.constructor===Object&&0===Object.keys(o).length||"boolean"==typeof o)&&(i=void 0),{route:r,params:i}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let c;const a=()=>(c||(c=new o,c.addFetchListener(),c.addCacheListener()),c);function h(t,e,n){let o;if("string"==typeof t){const s=new URL(t,location.href);o=new i((({url:t})=>t.href===s.href),e,n)}else if(t instanceof RegExp)o=new r(t,e,n);else if("function"==typeof t)o=new i(t,e,n);else{if(!(t instanceof i))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});o=t}return a().registerRoute(o),o}const u={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},l=t=>[u.prefix,t,u.suffix].filter((t=>t&&t.length>0)).join("-"),f=t=>t||l(u.precache),w=t=>t||l(u.runtime);function d(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:7.0.0"]&&_()}catch(t){}function p(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const i=new URL(n,location.href),r=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",e),{cacheKey:i.href,url:r.href}}class y{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class g{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.h.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.h=t}}let R;async function m(t,e){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const i=t.clone(),r={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},o=e?e(r):r,c=function(){if(void 0===R){const t=new Response("");if("body"in t)try{new Response(t.body),R=!0}catch(t){R=!1}R=!1}return R}()?i.body:await i.blob();return new Response(c,o)}function v(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class q{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}}const U=new Set;try{self["workbox:strategies:7.0.0"]&&_()}catch(t){}function L(t){return"string"==typeof t?new Request(t):t}class b{constructor(t,e){this.u={},Object.assign(this,e),this.event=e.event,this.l=t,this.p=new q,this.R=[],this.m=[...t.plugins],this.v=new Map;for(const t of this.m)this.v.set(t,{});this.event.waitUntil(this.p.promise)}async fetch(t){const{event:e}=this;let n=L(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const i=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const r=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.l.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:r,response:t});return t}catch(t){throw i&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:i.clone(),request:r.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=L(t);let s;const{cacheName:n,matchOptions:i}=this.l,r=await this.getCacheKey(e,"read"),o=Object.assign(Object.assign({},i),{cacheName:n});s=await caches.match(r,o);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:i,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(t,e){const n=L(t);var i;await(i=0,new Promise((t=>setTimeout(t,i))));const r=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(o=r.url,new URL(String(o),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var o;const c=await this.q(e);if(!c)return!1;const{cacheName:a,matchOptions:h}=this.l,u=await self.caches.open(a),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const i=v(e.url,s);if(e.url===i)return t.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),o=await t.keys(e,r);for(const e of o)if(i===v(e.url,s))return t.match(e,n)}(u,r.clone(),["__WB_REVISION__"],h):null;try{await u.put(r,l?c.clone():c)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of U)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:a,oldResponse:f,newResponse:c.clone(),request:r,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.u[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=L(await t({mode:e,request:n,event:this.event,params:this.params}));this.u[s]=n}return this.u[s]}hasCallback(t){for(const e of this.l.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.l.plugins)if("function"==typeof e[t]){const s=this.v.get(e),n=n=>{const i=Object.assign(Object.assign({},n),{state:s});return e[t](i)};yield n}}waitUntil(t){return this.R.push(t),t}async doneWaiting(){let t;for(;t=this.R.shift();)await t}destroy(){this.p.resolve(null)}async q(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class C{constructor(t={}){this.cacheName=w(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,i=new b(this,{event:e,request:s,params:n}),r=this.U(i,s,e);return[r,this.L(r,i,s,e)]}async U(t,e,n){let i;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(i=await this._(e,t),!i||"error"===i.type)throw new s("no-response",{url:e.url})}catch(s){if(s instanceof Error)for(const r of t.iterateCallbacks("handlerDidError"))if(i=await r({error:s,event:n,request:e}),i)break;if(!i)throw s}for(const s of t.iterateCallbacks("handlerWillRespond"))i=await s({event:n,request:e,response:i});return i}async L(t,e,s,n){let i,r;try{i=await t}catch(r){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:i}),await e.doneWaiting()}catch(t){t instanceof Error&&(r=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:i,error:r}),e.destroy(),r)throw r}}class E extends C{constructor(t={}){t.cacheName=f(t.cacheName),super(t),this.C=!1!==t.fallbackToNetwork,this.plugins.push(E.copyRedirectedCacheableResponsesPlugin)}async _(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.O(t,e):await this.N(t,e))}async N(t,e){let n;const i=e.params||{};if(!this.C)throw new s("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=i.integrity,r=t.integrity,o=!r||r===s;n=await e.fetch(new Request(t,{integrity:"no-cors"!==t.mode?r||s:void 0})),s&&o&&"no-cors"!==t.mode&&(this.k(),await e.cachePut(t,n.clone()))}return n}async O(t,e){this.k();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s("bad-precaching-response",{url:t.url,status:n.status});return n}k(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==E.copyRedirectedCacheableResponsesPlugin&&(n===E.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(E.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}E.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},E.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await m(t):t};class O{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.K=new Map,this.P=new Map,this.T=new Map,this.l=new E({cacheName:f(t),plugins:[...e,new g({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.l}precache(t){this.addToCacheList(t),this.W||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.W=!0)}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:i}=p(n),r="string"!=typeof n&&n.revision?"reload":"default";if(this.K.has(i)&&this.K.get(i)!==t)throw new s("add-to-cache-list-conflicting-entries",{firstEntry:this.K.get(i),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.T.has(t)&&this.T.get(t)!==n.integrity)throw new s("add-to-cache-list-conflicting-integrities",{url:i});this.T.set(t,n.integrity)}if(this.K.set(i,t),this.P.set(i,r),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return d(t,(async()=>{const e=new y;this.strategy.plugins.push(e);for(const[e,s]of this.K){const n=this.T.get(s),i=this.P.get(e),r=new Request(e,{integrity:n,cache:i,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(t){return d(t,(async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.K.values()),n=[];for(const i of e)s.has(i.url)||(await t.delete(i),n.push(i.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this.K}getCachedURLs(){return[...this.K.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.K.get(e.href)}getIntegrityForCacheKey(t){return this.T.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}let x;const N=()=>(x||(x=new O),x);class k extends i{constructor(t,e){super((({request:s})=>{const n=t.getURLsToCacheKeys();for(const i of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:i}={}){const r=new URL(t,location.href);r.hash="",yield r.href;const o=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some((t=>t.test(s)))&&t.searchParams.delete(s);return t}(r,e);if(yield o.href,s&&o.pathname.endsWith("/")){const t=new URL(o.href);t.pathname+=s,yield t.href}if(n){const t=new URL(o.href);t.pathname+=".html",yield t.href}if(i){const t=i({url:r});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(i);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}}),t.strategy)}}t.NavigationRoute=class extends i{constructor(t,{allowlist:e=[/./],denylist:s=[]}={}){super((t=>this.j(t)),t),this.M=e,this.S=s}j({url:t,request:e}){if(e&&"navigate"!==e.mode)return!1;const s=t.pathname+t.search;for(const t of this.S)if(t.test(s))return!1;return!!this.M.some((t=>t.test(s)))}},t.cleanupOutdatedCaches=function(){self.addEventListener("activate",(t=>{const e=f();t.waitUntil((async(t,e="-precache-")=>{const s=(await self.caches.keys()).filter((s=>s.includes(e)&&s.includes(self.registration.scope)&&s!==t));return await Promise.all(s.map((t=>self.caches.delete(t)))),s})(e).then((t=>{})))}))},t.clientsClaim=function(){self.addEventListener("activate",(()=>self.clients.claim()))},t.createHandlerBoundToURL=function(t){return N().createHandlerBoundToURL(t)},t.precacheAndRoute=function(t,e){!function(t){N().precache(t)}(t),function(t){const e=N();h(new k(e,t))}(e)},t.registerRoute=h}));
@@ -0,0 +1 @@
1
+ var M;(function(r){r.assertEqual=n=>n;function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},r.getValidEnumValues=n=>{const a=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return r.objectValues(i)},r.objectValues=n=>r.objectKeys(n).map(function(a){return n[a]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},r.find=(n,a)=>{for(const i of n)if(a(i))return i},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function s(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}r.joinValues=s,r.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(M||(M={}));var Ar;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Ar||(Ar={}));const v=M.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ge=r=>{switch(typeof r){case"undefined":return v.undefined;case"string":return v.string;case"number":return isNaN(r)?v.nan:v.number;case"boolean":return v.boolean;case"function":return v.function;case"bigint":return v.bigint;case"symbol":return v.symbol;case"object":return Array.isArray(r)?v.array:r===null?v.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?v.promise:typeof Map<"u"&&r instanceof Map?v.map:typeof Set<"u"&&r instanceof Set?v.set:typeof Date<"u"&&r instanceof Date?v.date:v.object;default:return v.unknown}},l=M.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),cn=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");let F=class ps extends Error{constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(a){return a.message},s={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let o=s,c=0;for(;c<i.path.length;){const d=i.path[c];c===i.path.length-1?(o[d]=o[d]||{_errors:[]},o[d]._errors.push(t(i))):o[d]=o[d]||{_errors:[]},o=o[d],c++}}};return n(this),s}static assert(e){if(!(e instanceof ps))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,M.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},s=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}};F.create=r=>new F(r);const We=(r,e)=>{let t;switch(r.code){case l.invalid_type:r.received===v.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case l.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,M.jsonStringifyReplacer)}`;break;case l.unrecognized_keys:t=`Unrecognized key(s) in object: ${M.joinValues(r.keys,", ")}`;break;case l.invalid_union:t="Invalid input";break;case l.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${M.joinValues(r.options)}`;break;case l.invalid_enum_value:t=`Invalid enum value. Expected ${M.joinValues(r.options)}, received '${r.received}'`;break;case l.invalid_arguments:t="Invalid function arguments";break;case l.invalid_return_type:t="Invalid function return type";break;case l.invalid_date:t="Invalid date";break;case l.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:M.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case l.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case l.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case l.custom:t="Invalid input";break;case l.invalid_intersection_types:t="Intersection results could not be merged";break;case l.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case l.not_finite:t="Number must be finite";break;default:t=e.defaultError,M.assertNever(r)}return{message:t}};let ms=We;function un(r){ms=r}function dr(){return ms}const cr=r=>{const{data:e,path:t,errorMaps:s,issueData:n}=r,a=[...t,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let o="";const c=s.filter(d=>!!d).slice().reverse();for(const d of c)o=d(i,{data:e,defaultError:o}).message;return{...n,path:a,message:o}},ln=[];function p(r,e){const t=dr(),s=cr({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===We?void 0:We].filter(n=>!!n)});r.common.issues.push(s)}let W=class ys{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const n of t){if(n.status==="aborted")return $;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const n of t){const a=await n.key,i=await n.value;s.push({key:a,value:i})}return ys.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return $;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(s[a.value]=i.value)}return{status:e.value,value:s}}};const $=Object.freeze({status:"aborted"}),Le=r=>({status:"dirty",value:r}),z=r=>({status:"valid",value:r}),Mr=r=>r.status==="aborted",Pr=r=>r.status==="dirty",ct=r=>r.status==="valid",ut=r=>typeof Promise<"u"&&r instanceof Promise;function ur(r,e,t,s){if(typeof e=="function"?r!==e||!s:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(r)}function vs(r,e,t,s,n){if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(r,t),t}var x;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(x||(x={}));var tt,rt;let de=class{constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const ds=(r,e)=>{if(ct(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new F(r.common.issues);return this._error=t,this._error}}};function O(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:n}=r;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>{var c,d;const{message:u}=r;return i.code==="invalid_enum_value"?{message:u??o.defaultError}:typeof o.data>"u"?{message:(c=u??s)!==null&&c!==void 0?c:o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:(d=u??t)!==null&&d!==void 0?d:o.defaultError}},description:n}}let R=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return ge(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:ge(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new W,ctx:{common:e.parent.common,data:e.data,parsedType:ge(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(ut(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const n={common:{issues:[],async:(s=t==null?void 0:t.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ge(e)},a=this._parseSync({data:e,path:n.path,parent:n});return ds(n,a)}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ge(e)},n=this._parse({data:e,path:s.path,parent:s}),a=await(ut(n)?n:Promise.resolve(n));return ds(s,a)}refine(e,t){const s=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:l.custom,...s(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof t=="function"?t(s,n):t),!1))}_refinement(e){return new re({schema:this,typeName:w.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return ae.create(this,this._def)}nullable(){return we.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return je.create(this,this._def)}promise(){return Je.create(this,this._def)}or(e){return vt.create([this,e],this._def)}and(e){return _t.create(this,e,this._def)}transform(e){return new re({...O(this._def),schema:this,typeName:w.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new bt({...O(this._def),innerType:this,defaultValue:t,typeName:w.ZodDefault})}brand(){return new ss({typeName:w.ZodBranded,type:this,...O(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new wt({...O(this._def),innerType:this,catchValue:t,typeName:w.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ns.create(this,e)}readonly(){return Zt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const fn=/^c[^\s-]{8,}$/i,hn=/^[0-9a-z]+$/,pn=/^[0-9A-HJKMNP-TV-Z]{26}$/,mn=/^[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,yn=/^[a-z0-9_-]{21}$/i,vn=/^[-+]?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)?)??$/,_n=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,gn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Rr;const xn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,kn=/^(([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})))$/,bn=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,_s="((\\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])))",wn=new RegExp(`^${_s}$`);function gs(r){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Zn(r){return new RegExp(`^${gs(r)}$`)}function xs(r){let e=`${_s}T${gs(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Tn(r,e){return!!((e==="v4"||!e)&&xn.test(r)||(e==="v6"||!e)&&kn.test(r))}let qe=class st extends R{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==v.string){const a=this._getOrReturnCtx(e);return p(a,{code:l.invalid_type,expected:v.string,received:a.parsedType}),$}const s=new W;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:l.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:l.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(n=this._getOrReturnCtx(e,n),i?p(n,{code:l.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&p(n,{code:l.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")_n.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"email",code:l.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")Rr||(Rr=new RegExp(gn,"u")),Rr.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"emoji",code:l.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")mn.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"uuid",code:l.invalid_string,message:a.message}),s.dirty());else if(a.kind==="nanoid")yn.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"nanoid",code:l.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")fn.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"cuid",code:l.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")hn.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"cuid2",code:l.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")pn.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"ulid",code:l.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),p(n,{validation:"url",code:l.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"regex",code:l.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),p(n,{code:l.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),p(n,{code:l.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),p(n,{code:l.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?xs(a).test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{code:l.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="date"?wn.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{code:l.invalid_string,validation:"date",message:a.message}),s.dirty()):a.kind==="time"?Zn(a).test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{code:l.invalid_string,validation:"time",message:a.message}),s.dirty()):a.kind==="duration"?vn.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"duration",code:l.invalid_string,message:a.message}),s.dirty()):a.kind==="ip"?Tn(e.data,a.version)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"ip",code:l.invalid_string,message:a.message}),s.dirty()):a.kind==="base64"?bn.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"base64",code:l.invalid_string,message:a.message}),s.dirty()):M.assertNever(a);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(n=>e.test(n),{validation:t,code:l.invalid_string,...x.errToObj(s)})}_addCheck(e){return new st({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...x.errToObj(e)})}url(e){return this._addCheck({kind:"url",...x.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...x.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...x.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...x.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...x.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...x.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...x.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...x.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...x.errToObj(e)})}datetime(e){var t,s;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(s=e==null?void 0:e.local)!==null&&s!==void 0?s:!1,...x.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...x.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...x.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...x.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...x.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...x.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...x.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...x.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...x.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...x.errToObj(t)})}nonempty(e){return this.min(1,x.errToObj(e))}trim(){return new st({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new st({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new st({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};qe.create=r=>{var e;return new qe({checks:[],typeName:w.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...O(r)})};function $n(r,e){const t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,a=parseInt(r.toFixed(n).replace(".","")),i=parseInt(e.toFixed(n).replace(".",""));return a%i/Math.pow(10,n)}let lt=class Vr extends R{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==v.number){const a=this._getOrReturnCtx(e);return p(a,{code:l.invalid_type,expected:v.number,received:a.parsedType}),$}let s;const n=new W;for(const a of this._def.checks)a.kind==="int"?M.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:l.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),p(s,{code:l.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),p(s,{code:l.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?$n(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),p(s,{code:l.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:l.not_finite,message:a.message}),n.dirty()):M.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,x.toString(t))}gt(e,t){return this.setLimit("min",e,!1,x.toString(t))}lte(e,t){return this.setLimit("max",e,!0,x.toString(t))}lt(e,t){return this.setLimit("max",e,!1,x.toString(t))}setLimit(e,t,s,n){return new Vr({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:x.toString(n)}]})}_addCheck(e){return new Vr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:x.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:x.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:x.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:x.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:x.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:x.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:x.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:x.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:x.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&M.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}};lt.create=r=>new lt({checks:[],typeName:w.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...O(r)});let ft=class Dr extends R{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==v.bigint){const a=this._getOrReturnCtx(e);return p(a,{code:l.invalid_type,expected:v.bigint,received:a.parsedType}),$}let s;const n=new W;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),p(s,{code:l.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),p(s,{code:l.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),p(s,{code:l.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):M.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,x.toString(t))}gt(e,t){return this.setLimit("min",e,!1,x.toString(t))}lte(e,t){return this.setLimit("max",e,!0,x.toString(t))}lt(e,t){return this.setLimit("max",e,!1,x.toString(t))}setLimit(e,t,s,n){return new Dr({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:x.toString(n)}]})}_addCheck(e){return new Dr({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:x.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:x.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:x.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:x.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:x.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};ft.create=r=>{var e;return new ft({checks:[],typeName:w.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...O(r)})};let ht=class extends R{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==v.boolean){const s=this._getOrReturnCtx(e);return p(s,{code:l.invalid_type,expected:v.boolean,received:s.parsedType}),$}return z(e.data)}};ht.create=r=>new ht({typeName:w.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...O(r)});let pt=class ks extends R{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==v.date){const a=this._getOrReturnCtx(e);return p(a,{code:l.invalid_type,expected:v.date,received:a.parsedType}),$}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return p(a,{code:l.invalid_date}),$}const s=new W;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:l.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:l.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):M.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ks({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:x.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:x.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};pt.create=r=>new pt({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:w.ZodDate,...O(r)});let lr=class extends R{_parse(e){if(this._getType(e)!==v.symbol){const s=this._getOrReturnCtx(e);return p(s,{code:l.invalid_type,expected:v.symbol,received:s.parsedType}),$}return z(e.data)}};lr.create=r=>new lr({typeName:w.ZodSymbol,...O(r)});let mt=class extends R{_parse(e){if(this._getType(e)!==v.undefined){const s=this._getOrReturnCtx(e);return p(s,{code:l.invalid_type,expected:v.undefined,received:s.parsedType}),$}return z(e.data)}};mt.create=r=>new mt({typeName:w.ZodUndefined,...O(r)});let yt=class extends R{_parse(e){if(this._getType(e)!==v.null){const s=this._getOrReturnCtx(e);return p(s,{code:l.invalid_type,expected:v.null,received:s.parsedType}),$}return z(e.data)}};yt.create=r=>new yt({typeName:w.ZodNull,...O(r)});let Ye=class extends R{constructor(){super(...arguments),this._any=!0}_parse(e){return z(e.data)}};Ye.create=r=>new Ye({typeName:w.ZodAny,...O(r)});let Ce=class extends R{constructor(){super(...arguments),this._unknown=!0}_parse(e){return z(e.data)}};Ce.create=r=>new Ce({typeName:w.ZodUnknown,...O(r)});let me=class extends R{_parse(e){const t=this._getOrReturnCtx(e);return p(t,{code:l.invalid_type,expected:v.never,received:t.parsedType}),$}};me.create=r=>new me({typeName:w.ZodNever,...O(r)});let fr=class extends R{_parse(e){if(this._getType(e)!==v.undefined){const s=this._getOrReturnCtx(e);return p(s,{code:l.invalid_type,expected:v.void,received:s.parsedType}),$}return z(e.data)}};fr.create=r=>new fr({typeName:w.ZodVoid,...O(r)});let je=class nr extends R{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==v.array)return p(t,{code:l.invalid_type,expected:v.array,received:t.parsedType}),$;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(i||o)&&(p(t,{code:i?l.too_big:l.too_small,minimum:o?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(p(t,{code:l.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(p(t,{code:l.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new de(t,i,t.path,o)))).then(i=>W.mergeArray(s,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new de(t,i,t.path,o)));return W.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new nr({...this._def,minLength:{value:e,message:x.toString(t)}})}max(e,t){return new nr({...this._def,maxLength:{value:e,message:x.toString(t)}})}length(e,t){return new nr({...this._def,exactLength:{value:e,message:x.toString(t)}})}nonempty(e){return this.min(1,e)}};je.create=(r,e)=>new je({type:r,minLength:null,maxLength:null,exactLength:null,typeName:w.ZodArray,...O(e)});function Pe(r){if(r instanceof J){const e={};for(const t in r.shape){const s=r.shape[t];e[t]=ae.create(Pe(s))}return new J({...r._def,shape:()=>e})}else return r instanceof je?new je({...r._def,type:Pe(r.element)}):r instanceof ae?ae.create(Pe(r.unwrap())):r instanceof we?we.create(Pe(r.unwrap())):r instanceof be?be.create(r.items.map(e=>Pe(e))):r}let J=class X extends R{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=M.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==v.object){const d=this._getOrReturnCtx(e);return p(d,{code:l.invalid_type,expected:v.object,received:d.parsedType}),$}const{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof me&&this._def.unknownKeys==="strip"))for(const d in n.data)i.includes(d)||o.push(d);const c=[];for(const d of i){const u=a[d],A=n.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new de(n,A,n.path,d)),alwaysSet:d in n.data})}if(this._def.catchall instanceof me){const d=this._def.unknownKeys;if(d==="passthrough")for(const u of o)c.push({key:{status:"valid",value:u},value:{status:"valid",value:n.data[u]}});else if(d==="strict")o.length>0&&(p(n,{code:l.unrecognized_keys,keys:o}),s.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const u of o){const A=n.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new de(n,A,n.path,u)),alwaysSet:u in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const d=[];for(const u of c){const A=await u.key,_e=await u.value;d.push({key:A,value:_e,alwaysSet:u.alwaysSet})}return d}).then(d=>W.mergeObjectSync(s,d)):W.mergeObjectSync(s,c)}get shape(){return this._def.shape()}strict(e){return x.errToObj,new X({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,a,i,o;const c=(i=(a=(n=this._def).errorMap)===null||a===void 0?void 0:a.call(n,t,s).message)!==null&&i!==void 0?i:s.defaultError;return t.code==="unrecognized_keys"?{message:(o=x.errToObj(e).message)!==null&&o!==void 0?o:c}:{message:c}}}:{}})}strip(){return new X({...this._def,unknownKeys:"strip"})}passthrough(){return new X({...this._def,unknownKeys:"passthrough"})}extend(e){return new X({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new X({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:w.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new X({...this._def,catchall:e})}pick(e){const t={};return M.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])}),new X({...this._def,shape:()=>t})}omit(e){const t={};return M.objectKeys(this.shape).forEach(s=>{e[s]||(t[s]=this.shape[s])}),new X({...this._def,shape:()=>t})}deepPartial(){return Pe(this)}partial(e){const t={};return M.objectKeys(this.shape).forEach(s=>{const n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()}),new X({...this._def,shape:()=>t})}required(e){const t={};return M.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof ae;)a=a._def.innerType;t[s]=a}}),new X({...this._def,shape:()=>t})}keyof(){return Ss(M.objectKeys(this.shape))}};J.create=(r,e)=>new J({shape:()=>r,unknownKeys:"strip",catchall:me.create(),typeName:w.ZodObject,...O(e)});J.strictCreate=(r,e)=>new J({shape:()=>r,unknownKeys:"strict",catchall:me.create(),typeName:w.ZodObject,...O(e)});J.lazycreate=(r,e)=>new J({shape:r,unknownKeys:"strip",catchall:me.create(),typeName:w.ZodObject,...O(e)});let vt=class extends R{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new F(o.ctx.common.issues));return p(t,{code:l.invalid_union,unionErrors:i}),$}if(t.common.async)return Promise.all(s.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const c of s){const d={...t,common:{...t.common,issues:[]},parent:null},u=c._parseSync({data:t.data,path:t.path,parent:d});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:d}),d.common.issues.length&&i.push(d.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(c=>new F(c));return p(t,{code:l.invalid_union,unionErrors:o}),$}}get options(){return this._def.options}};vt.create=(r,e)=>new vt({options:r,typeName:w.ZodUnion,...O(e)});const fe=r=>r instanceof gt?fe(r.schema):r instanceof re?fe(r.innerType()):r instanceof xt?[r.value]:r instanceof tr?r.options:r instanceof kt?M.objectValues(r.enum):r instanceof bt?fe(r._def.innerType):r instanceof mt?[void 0]:r instanceof yt?[null]:r instanceof ae?[void 0,...fe(r.unwrap())]:r instanceof we?[null,...fe(r.unwrap())]:r instanceof ss||r instanceof Zt?fe(r.unwrap()):r instanceof wt?fe(r._def.innerType):[];let bs=class ws extends R{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==v.object)return p(t,{code:l.invalid_type,expected:v.object,received:t.parsedType}),$;const s=this.discriminator,n=t.data[s],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(p(t,{code:l.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),$)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){const n=new Map;for(const a of t){const i=fe(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new ws({typeName:w.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...O(s)})}};function Lr(r,e){const t=ge(r),s=ge(e);if(r===e)return{valid:!0,data:r};if(t===v.object&&s===v.object){const n=M.objectKeys(e),a=M.objectKeys(r).filter(o=>n.indexOf(o)!==-1),i={...r,...e};for(const o of a){const c=Lr(r[o],e[o]);if(!c.valid)return{valid:!1};i[o]=c.data}return{valid:!0,data:i}}else if(t===v.array&&s===v.array){if(r.length!==e.length)return{valid:!1};const n=[];for(let a=0;a<r.length;a++){const i=r[a],o=e[a],c=Lr(i,o);if(!c.valid)return{valid:!1};n.push(c.data)}return{valid:!0,data:n}}else return t===v.date&&s===v.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}let _t=class extends R{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=(a,i)=>{if(Mr(a)||Mr(i))return $;const o=Lr(a.value,i.value);return o.valid?((Pr(a)||Pr(i))&&t.dirty(),{status:t.value,value:o.data}):(p(s,{code:l.invalid_intersection_types}),$)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}};_t.create=(r,e,t)=>new _t({left:r,right:e,typeName:w.ZodIntersection,...O(t)});let be=class Zs extends R{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==v.array)return p(s,{code:l.invalid_type,expected:v.array,received:s.parsedType}),$;if(s.data.length<this._def.items.length)return p(s,{code:l.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$;!this._def.rest&&s.data.length>this._def.items.length&&(p(s,{code:l.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...s.data].map((i,o)=>{const c=this._def.items[o]||this._def.rest;return c?c._parse(new de(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>W.mergeArray(t,i)):W.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new Zs({...this._def,rest:e})}};be.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new be({items:r,typeName:w.ZodTuple,rest:null,...O(e)})};let Ts=class zr extends R{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==v.object)return p(s,{code:l.invalid_type,expected:v.object,received:s.parsedType}),$;const n=[],a=this._def.keyType,i=this._def.valueType;for(const o in s.data)n.push({key:a._parse(new de(s,o,s.path,o)),value:i._parse(new de(s,s.data[o],s.path,o)),alwaysSet:o in s.data});return s.common.async?W.mergeObjectAsync(t,n):W.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof R?new zr({keyType:e,valueType:t,typeName:w.ZodRecord,...O(s)}):new zr({keyType:qe.create(),valueType:e,typeName:w.ZodRecord,...O(t)})}},hr=class extends R{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==v.map)return p(s,{code:l.invalid_type,expected:v.map,received:s.parsedType}),$;const n=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([o,c],d)=>({key:n._parse(new de(s,o,s.path,[d,"key"])),value:a._parse(new de(s,c,s.path,[d,"value"]))}));if(s.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const c of i){const d=await c.key,u=await c.value;if(d.status==="aborted"||u.status==="aborted")return $;(d.status==="dirty"||u.status==="dirty")&&t.dirty(),o.set(d.value,u.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const c of i){const d=c.key,u=c.value;if(d.status==="aborted"||u.status==="aborted")return $;(d.status==="dirty"||u.status==="dirty")&&t.dirty(),o.set(d.value,u.value)}return{status:t.value,value:o}}}};hr.create=(r,e,t)=>new hr({valueType:e,keyType:r,typeName:w.ZodMap,...O(t)});let pr=class Ur extends R{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==v.set)return p(s,{code:l.invalid_type,expected:v.set,received:s.parsedType}),$;const n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(p(s,{code:l.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(p(s,{code:l.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(c){const d=new Set;for(const u of c){if(u.status==="aborted")return $;u.status==="dirty"&&t.dirty(),d.add(u.value)}return{status:t.value,value:d}}const o=[...s.data.values()].map((c,d)=>a._parse(new de(s,c,s.path,d)));return s.common.async?Promise.all(o).then(c=>i(c)):i(o)}min(e,t){return new Ur({...this._def,minSize:{value:e,message:x.toString(t)}})}max(e,t){return new Ur({...this._def,maxSize:{value:e,message:x.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};pr.create=(r,e)=>new pr({valueType:r,minSize:null,maxSize:null,typeName:w.ZodSet,...O(e)});let $s=class ar extends R{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==v.function)return p(t,{code:l.invalid_type,expected:v.function,received:t.parsedType}),$;function s(o,c){return cr({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,dr(),We].filter(d=>!!d),issueData:{code:l.invalid_arguments,argumentsError:c}})}function n(o,c){return cr({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,dr(),We].filter(d=>!!d),issueData:{code:l.invalid_return_type,returnTypeError:c}})}const a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof Je){const o=this;return z(async function(...c){const d=new F([]),u=await o._def.args.parseAsync(c,a).catch(G=>{throw d.addIssue(s(c,G)),d}),A=await Reflect.apply(i,this,u);return await o._def.returns._def.type.parseAsync(A,a).catch(G=>{throw d.addIssue(n(A,G)),d})})}else{const o=this;return z(function(...c){const d=o._def.args.safeParse(c,a);if(!d.success)throw new F([s(c,d.error)]);const u=Reflect.apply(i,this,d.data),A=o._def.returns.safeParse(u,a);if(!A.success)throw new F([n(u,A.error)]);return A.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ar({...this._def,args:be.create(e).rest(Ce.create())})}returns(e){return new ar({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new ar({args:e||be.create([]).rest(Ce.create()),returns:t||Ce.create(),typeName:w.ZodFunction,...O(s)})}},gt=class extends R{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};gt.create=(r,e)=>new gt({getter:r,typeName:w.ZodLazy,...O(e)});let xt=class extends R{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return p(t,{received:t.data,code:l.invalid_literal,expected:this._def.value}),$}return{status:"valid",value:e.data}}get value(){return this._def.value}};xt.create=(r,e)=>new xt({value:r,typeName:w.ZodLiteral,...O(e)});function Ss(r,e){return new tr({values:r,typeName:w.ZodEnum,...O(e)})}let tr=class Br extends R{constructor(){super(...arguments),tt.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return p(t,{expected:M.joinValues(s),received:t.parsedType,code:l.invalid_type}),$}if(ur(this,tt)||vs(this,tt,new Set(this._def.values)),!ur(this,tt).has(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return p(t,{received:t.data,code:l.invalid_enum_value,options:s}),$}return z(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Br.create(e,{...this._def,...t})}exclude(e,t=this._def){return Br.create(this.options.filter(s=>!e.includes(s)),{...this._def,...t})}};tt=new WeakMap;tr.create=Ss;let kt=class extends R{constructor(){super(...arguments),rt.set(this,void 0)}_parse(e){const t=M.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==v.string&&s.parsedType!==v.number){const n=M.objectValues(t);return p(s,{expected:M.joinValues(n),received:s.parsedType,code:l.invalid_type}),$}if(ur(this,rt)||vs(this,rt,new Set(M.getValidEnumValues(this._def.values))),!ur(this,rt).has(e.data)){const n=M.objectValues(t);return p(s,{received:s.data,code:l.invalid_enum_value,options:n}),$}return z(e.data)}get enum(){return this._def.values}};rt=new WeakMap;kt.create=(r,e)=>new kt({values:r,typeName:w.ZodNativeEnum,...O(e)});let Je=class extends R{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==v.promise&&t.common.async===!1)return p(t,{code:l.invalid_type,expected:v.promise,received:t.parsedType}),$;const s=t.parsedType===v.promise?t.data:Promise.resolve(t.data);return z(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}};Je.create=(r,e)=>new Je({type:r,typeName:w.ZodPromise,...O(e)});let re=class extends R{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===w.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{p(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(s.data,a);if(s.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return $;const c=await this._def.schema._parseAsync({data:o,path:s.path,parent:s});return c.status==="aborted"?$:c.status==="dirty"||t.value==="dirty"?Le(c.value):c});{if(t.value==="aborted")return $;const o=this._def.schema._parseSync({data:i,path:s.path,parent:s});return o.status==="aborted"?$:o.status==="dirty"||t.value==="dirty"?Le(o.value):o}}if(n.type==="refinement"){const i=o=>{const c=n.refinement(o,a);if(s.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){const o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?$:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?$:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!ct(i))return i;const o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>ct(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):i);M.assertNever(n)}};re.create=(r,e,t)=>new re({schema:r,typeName:w.ZodEffects,effect:e,...O(t)});re.createWithPreprocess=(r,e,t)=>new re({schema:e,effect:{type:"preprocess",transform:r},typeName:w.ZodEffects,...O(t)});let ae=class extends R{_parse(e){return this._getType(e)===v.undefined?z(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ae.create=(r,e)=>new ae({innerType:r,typeName:w.ZodOptional,...O(e)});let we=class extends R{_parse(e){return this._getType(e)===v.null?z(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};we.create=(r,e)=>new we({innerType:r,typeName:w.ZodNullable,...O(e)});let bt=class extends R{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===v.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};bt.create=(r,e)=>new bt({innerType:r,typeName:w.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...O(e)});let wt=class extends R{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return ut(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new F(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new F(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}};wt.create=(r,e)=>new wt({innerType:r,typeName:w.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...O(e)});let mr=class extends R{_parse(e){if(this._getType(e)!==v.nan){const s=this._getOrReturnCtx(e);return p(s,{code:l.invalid_type,expected:v.nan,received:s.parsedType}),$}return{status:"valid",value:e.data}}};mr.create=r=>new mr({typeName:w.ZodNaN,...O(r)});const Sn=Symbol("zod_brand");let ss=class extends R{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}},ns=class Ns extends R{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?$:a.status==="dirty"?(t.dirty(),Le(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{const n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?$:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,t){return new Ns({in:e,out:t,typeName:w.ZodPipeline})}},Zt=class extends R{_parse(e){const t=this._def.innerType._parse(e),s=n=>(ct(n)&&(n.value=Object.freeze(n.value)),n);return ut(t)?t.then(n=>s(n)):s(t)}unwrap(){return this._def.innerType}};Zt.create=(r,e)=>new Zt({innerType:r,typeName:w.ZodReadonly,...O(e)});function Os(r,e={},t){return r?Ye.create().superRefine((s,n)=>{var a,i;if(!r(s)){const o=typeof e=="function"?e(s):typeof e=="string"?{message:e}:e,c=(i=(a=o.fatal)!==null&&a!==void 0?a:t)!==null&&i!==void 0?i:!0,d=typeof o=="string"?{message:o}:o;n.addIssue({code:"custom",...d,fatal:c})}}):Ye.create()}const Nn={object:J.lazycreate};var w;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(w||(w={}));const On=(r,e={message:`Input not instance of ${r.name}`})=>Os(t=>t instanceof r,e),Cs=qe.create,Es=lt.create,Cn=mr.create,En=ft.create,Rs=ht.create,Rn=pt.create,jn=lr.create,In=mt.create,An=yt.create,Mn=Ye.create,Pn=Ce.create,Vn=me.create,Dn=fr.create,Ln=je.create,zn=J.create,Un=J.strictCreate,Bn=vt.create,Wn=bs.create,qn=_t.create,Yn=be.create,Jn=Ts.create,Hn=hr.create,Gn=pr.create,Xn=$s.create,Qn=gt.create,Kn=xt.create,Fn=tr.create,ea=kt.create,ta=Je.create,cs=re.create,ra=ae.create,sa=we.create,na=re.createWithPreprocess,aa=ns.create,ia=()=>Cs().optional(),oa=()=>Es().optional(),da=()=>Rs().optional(),ca={string:r=>qe.create({...r,coerce:!0}),number:r=>lt.create({...r,coerce:!0}),boolean:r=>ht.create({...r,coerce:!0}),bigint:r=>ft.create({...r,coerce:!0}),date:r=>pt.create({...r,coerce:!0})},ua=$;var zo=Object.freeze({__proto__:null,defaultErrorMap:We,setErrorMap:un,getErrorMap:dr,makeIssue:cr,EMPTY_PATH:ln,addIssueToContext:p,ParseStatus:W,INVALID:$,DIRTY:Le,OK:z,isAborted:Mr,isDirty:Pr,isValid:ct,isAsync:ut,get util(){return M},get objectUtil(){return Ar},ZodParsedType:v,getParsedType:ge,ZodType:R,datetimeRegex:xs,ZodString:qe,ZodNumber:lt,ZodBigInt:ft,ZodBoolean:ht,ZodDate:pt,ZodSymbol:lr,ZodUndefined:mt,ZodNull:yt,ZodAny:Ye,ZodUnknown:Ce,ZodNever:me,ZodVoid:fr,ZodArray:je,ZodObject:J,ZodUnion:vt,ZodDiscriminatedUnion:bs,ZodIntersection:_t,ZodTuple:be,ZodRecord:Ts,ZodMap:hr,ZodSet:pr,ZodFunction:$s,ZodLazy:gt,ZodLiteral:xt,ZodEnum:tr,ZodNativeEnum:kt,ZodPromise:Je,ZodEffects:re,ZodTransformer:re,ZodOptional:ae,ZodNullable:we,ZodDefault:bt,ZodCatch:wt,ZodNaN:mr,BRAND:Sn,ZodBranded:ss,ZodPipeline:ns,ZodReadonly:Zt,custom:Os,Schema:R,ZodSchema:R,late:Nn,get ZodFirstPartyTypeKind(){return w},coerce:ca,any:Mn,array:Ln,bigint:En,boolean:Rs,date:Rn,discriminatedUnion:Wn,effect:cs,enum:Fn,function:Xn,instanceof:On,intersection:qn,lazy:Qn,literal:Kn,map:Hn,nan:Cn,nativeEnum:ea,never:Vn,null:An,nullable:sa,number:Es,object:zn,oboolean:da,onumber:oa,optional:ra,ostring:ia,pipeline:aa,preprocess:na,promise:ta,record:Jn,set:Gn,strictObject:Un,string:Cs,symbol:jn,transformer:cs,tuple:Yn,undefined:In,union:Bn,unknown:Pn,void:Dn,NEVER:ua,ZodIssueCode:l,quotelessJson:cn,ZodError:F}),P;(function(r){r.assertEqual=n=>n;function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},r.getValidEnumValues=n=>{const a=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return r.objectValues(i)},r.objectValues=n=>r.objectKeys(n).map(function(a){return n[a]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},r.find=(n,a)=>{for(const i of n)if(a(i))return i},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function s(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}r.joinValues=s,r.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(P||(P={}));var Wr;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Wr||(Wr={}));const _=P.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),xe=r=>{switch(typeof r){case"undefined":return _.undefined;case"string":return _.string;case"number":return isNaN(r)?_.nan:_.number;case"boolean":return _.boolean;case"function":return _.function;case"bigint":return _.bigint;case"symbol":return _.symbol;case"object":return Array.isArray(r)?_.array:r===null?_.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?_.promise:typeof Map<"u"&&r instanceof Map?_.map:typeof Set<"u"&&r instanceof Set?_.set:typeof Date<"u"&&r instanceof Date?_.date:_.object;default:return _.unknown}},f=P.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),la=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");let ee=class js extends Error{constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(a){return a.message},s={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let o=s,c=0;for(;c<i.path.length;){const d=i.path[c];c===i.path.length-1?(o[d]=o[d]||{_errors:[]},o[d]._errors.push(t(i))):o[d]=o[d]||{_errors:[]},o=o[d],c++}}};return n(this),s}static assert(e){if(!(e instanceof js))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,P.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},s=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}};ee.create=r=>new ee(r);const He=(r,e)=>{let t;switch(r.code){case f.invalid_type:r.received===_.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case f.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,P.jsonStringifyReplacer)}`;break;case f.unrecognized_keys:t=`Unrecognized key(s) in object: ${P.joinValues(r.keys,", ")}`;break;case f.invalid_union:t="Invalid input";break;case f.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${P.joinValues(r.options)}`;break;case f.invalid_enum_value:t=`Invalid enum value. Expected ${P.joinValues(r.options)}, received '${r.received}'`;break;case f.invalid_arguments:t="Invalid function arguments";break;case f.invalid_return_type:t="Invalid function return type";break;case f.invalid_date:t="Invalid date";break;case f.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:P.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case f.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case f.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case f.custom:t="Invalid input";break;case f.invalid_intersection_types:t="Intersection results could not be merged";break;case f.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case f.not_finite:t="Number must be finite";break;default:t=e.defaultError,P.assertNever(r)}return{message:t}};let Is=He;function fa(r){Is=r}function yr(){return Is}const vr=r=>{const{data:e,path:t,errorMaps:s,issueData:n}=r,a=[...t,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let o="";const c=s.filter(d=>!!d).slice().reverse();for(const d of c)o=d(i,{data:e,defaultError:o}).message;return{...n,path:a,message:o}},ha=[];function m(r,e){const t=yr(),s=vr({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===He?void 0:He].filter(n=>!!n)});r.common.issues.push(s)}let q=class As{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const n of t){if(n.status==="aborted")return S;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const n of t){const a=await n.key,i=await n.value;s.push({key:a,value:i})}return As.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return S;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(s[a.value]=i.value)}return{status:e.value,value:s}}};const S=Object.freeze({status:"aborted"}),ze=r=>({status:"dirty",value:r}),U=r=>({status:"valid",value:r}),qr=r=>r.status==="aborted",Yr=r=>r.status==="dirty",Tt=r=>r.status==="valid",$t=r=>typeof Promise<"u"&&r instanceof Promise;function _r(r,e,t,s){if(typeof e=="function"?r!==e||!s:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(r)}function Ms(r,e,t,s,n){if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(r,t),t}var k;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(k||(k={}));var nt,at;let ce=class{constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const us=(r,e)=>{if(Tt(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new ee(r.common.issues);return this._error=t,this._error}}};function C(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:n}=r;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>{var c,d;const{message:u}=r;return i.code==="invalid_enum_value"?{message:u??o.defaultError}:typeof o.data>"u"?{message:(c=u??s)!==null&&c!==void 0?c:o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:(d=u??t)!==null&&d!==void 0?d:o.defaultError}},description:n}}let j=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return xe(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:xe(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new q,ctx:{common:e.parent.common,data:e.data,parsedType:xe(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if($t(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const n={common:{issues:[],async:(s=t==null?void 0:t.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:xe(e)},a=this._parseSync({data:e,path:n.path,parent:n});return us(n,a)}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:xe(e)},n=this._parse({data:e,path:s.path,parent:s}),a=await($t(n)?n:Promise.resolve(n));return us(s,a)}refine(e,t){const s=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:f.custom,...s(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof t=="function"?t(s,n):t),!1))}_refinement(e){return new se({schema:this,typeName:Z.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return ie.create(this,this._def)}nullable(){return Te.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ie.create(this,this._def)}promise(){return Qe.create(this,this._def)}or(e){return jt.create([this,e],this._def)}and(e){return It.create(this,e,this._def)}transform(e){return new se({...C(this._def),schema:this,typeName:Z.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new Vt({...C(this._def),innerType:this,defaultValue:t,typeName:Z.ZodDefault})}brand(){return new as({typeName:Z.ZodBranded,type:this,...C(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new Dt({...C(this._def),innerType:this,catchValue:t,typeName:Z.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return is.create(this,e)}readonly(){return Lt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const pa=/^c[^\s-]{8,}$/i,ma=/^[0-9a-z]+$/,ya=/^[0-9A-HJKMNP-TV-Z]{26}$/,va=/^[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,_a=/^[a-z0-9_-]{21}$/i,ga=/^[-+]?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)?)??$/,xa=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ka="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let jr;const ba=/^(?:(?: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])$/,wa=/^(([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})))$/,Za=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ps="((\\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])))",Ta=new RegExp(`^${Ps}$`);function Vs(r){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`),e}function $a(r){return new RegExp(`^${Vs(r)}$`)}function Ds(r){let e=`${Ps}T${Vs(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Sa(r,e){return!!((e==="v4"||!e)&&ba.test(r)||(e==="v6"||!e)&&wa.test(r))}let Ge=class it extends j{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==_.string){const a=this._getOrReturnCtx(e);return m(a,{code:f.invalid_type,expected:_.string,received:a.parsedType}),S}const s=new q;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:f.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:f.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(n=this._getOrReturnCtx(e,n),i?m(n,{code:f.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&m(n,{code:f.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")xa.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"email",code:f.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")jr||(jr=new RegExp(ka,"u")),jr.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"emoji",code:f.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")va.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"uuid",code:f.invalid_string,message:a.message}),s.dirty());else if(a.kind==="nanoid")_a.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"nanoid",code:f.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")pa.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"cuid",code:f.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")ma.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"cuid2",code:f.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")ya.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"ulid",code:f.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),m(n,{validation:"url",code:f.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"regex",code:f.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),m(n,{code:f.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),m(n,{code:f.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),m(n,{code:f.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?Ds(a).test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{code:f.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="date"?Ta.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{code:f.invalid_string,validation:"date",message:a.message}),s.dirty()):a.kind==="time"?$a(a).test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{code:f.invalid_string,validation:"time",message:a.message}),s.dirty()):a.kind==="duration"?ga.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"duration",code:f.invalid_string,message:a.message}),s.dirty()):a.kind==="ip"?Sa(e.data,a.version)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"ip",code:f.invalid_string,message:a.message}),s.dirty()):a.kind==="base64"?Za.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"base64",code:f.invalid_string,message:a.message}),s.dirty()):P.assertNever(a);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(n=>e.test(n),{validation:t,code:f.invalid_string,...k.errToObj(s)})}_addCheck(e){return new it({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...k.errToObj(e)})}url(e){return this._addCheck({kind:"url",...k.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...k.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...k.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...k.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...k.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...k.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...k.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...k.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...k.errToObj(e)})}datetime(e){var t,s;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(s=e==null?void 0:e.local)!==null&&s!==void 0?s:!1,...k.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...k.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...k.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...k.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...k.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...k.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...k.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...k.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...k.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...k.errToObj(t)})}nonempty(e){return this.min(1,k.errToObj(e))}trim(){return new it({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new it({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new it({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};Ge.create=r=>{var e;return new Ge({checks:[],typeName:Z.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...C(r)})};function Na(r,e){const t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,a=parseInt(r.toFixed(n).replace(".","")),i=parseInt(e.toFixed(n).replace(".",""));return a%i/Math.pow(10,n)}let St=class Jr extends j{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==_.number){const a=this._getOrReturnCtx(e);return m(a,{code:f.invalid_type,expected:_.number,received:a.parsedType}),S}let s;const n=new q;for(const a of this._def.checks)a.kind==="int"?P.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),m(s,{code:f.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),m(s,{code:f.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),m(s,{code:f.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?Na(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),m(s,{code:f.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),m(s,{code:f.not_finite,message:a.message}),n.dirty()):P.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,k.toString(t))}gt(e,t){return this.setLimit("min",e,!1,k.toString(t))}lte(e,t){return this.setLimit("max",e,!0,k.toString(t))}lt(e,t){return this.setLimit("max",e,!1,k.toString(t))}setLimit(e,t,s,n){return new Jr({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:k.toString(n)}]})}_addCheck(e){return new Jr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:k.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:k.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:k.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:k.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:k.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:k.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:k.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:k.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:k.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&P.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}};St.create=r=>new St({checks:[],typeName:Z.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...C(r)});let Nt=class Hr extends j{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==_.bigint){const a=this._getOrReturnCtx(e);return m(a,{code:f.invalid_type,expected:_.bigint,received:a.parsedType}),S}let s;const n=new q;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),m(s,{code:f.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),m(s,{code:f.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),m(s,{code:f.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):P.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,k.toString(t))}gt(e,t){return this.setLimit("min",e,!1,k.toString(t))}lte(e,t){return this.setLimit("max",e,!0,k.toString(t))}lt(e,t){return this.setLimit("max",e,!1,k.toString(t))}setLimit(e,t,s,n){return new Hr({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:k.toString(n)}]})}_addCheck(e){return new Hr({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:k.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:k.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:k.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:k.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:k.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};Nt.create=r=>{var e;return new Nt({checks:[],typeName:Z.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...C(r)})};let Ot=class extends j{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==_.boolean){const s=this._getOrReturnCtx(e);return m(s,{code:f.invalid_type,expected:_.boolean,received:s.parsedType}),S}return U(e.data)}};Ot.create=r=>new Ot({typeName:Z.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...C(r)});let Ct=class Ls extends j{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==_.date){const a=this._getOrReturnCtx(e);return m(a,{code:f.invalid_type,expected:_.date,received:a.parsedType}),S}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return m(a,{code:f.invalid_date}),S}const s=new q;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:f.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:f.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):P.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ls({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:k.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:k.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};Ct.create=r=>new Ct({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:Z.ZodDate,...C(r)});let gr=class extends j{_parse(e){if(this._getType(e)!==_.symbol){const s=this._getOrReturnCtx(e);return m(s,{code:f.invalid_type,expected:_.symbol,received:s.parsedType}),S}return U(e.data)}};gr.create=r=>new gr({typeName:Z.ZodSymbol,...C(r)});let Et=class extends j{_parse(e){if(this._getType(e)!==_.undefined){const s=this._getOrReturnCtx(e);return m(s,{code:f.invalid_type,expected:_.undefined,received:s.parsedType}),S}return U(e.data)}};Et.create=r=>new Et({typeName:Z.ZodUndefined,...C(r)});let Rt=class extends j{_parse(e){if(this._getType(e)!==_.null){const s=this._getOrReturnCtx(e);return m(s,{code:f.invalid_type,expected:_.null,received:s.parsedType}),S}return U(e.data)}};Rt.create=r=>new Rt({typeName:Z.ZodNull,...C(r)});let Xe=class extends j{constructor(){super(...arguments),this._any=!0}_parse(e){return U(e.data)}};Xe.create=r=>new Xe({typeName:Z.ZodAny,...C(r)});let Ee=class extends j{constructor(){super(...arguments),this._unknown=!0}_parse(e){return U(e.data)}};Ee.create=r=>new Ee({typeName:Z.ZodUnknown,...C(r)});let ye=class extends j{_parse(e){const t=this._getOrReturnCtx(e);return m(t,{code:f.invalid_type,expected:_.never,received:t.parsedType}),S}};ye.create=r=>new ye({typeName:Z.ZodNever,...C(r)});let xr=class extends j{_parse(e){if(this._getType(e)!==_.undefined){const s=this._getOrReturnCtx(e);return m(s,{code:f.invalid_type,expected:_.void,received:s.parsedType}),S}return U(e.data)}};xr.create=r=>new xr({typeName:Z.ZodVoid,...C(r)});let Ie=class ir extends j{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==_.array)return m(t,{code:f.invalid_type,expected:_.array,received:t.parsedType}),S;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(i||o)&&(m(t,{code:i?f.too_big:f.too_small,minimum:o?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(m(t,{code:f.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(m(t,{code:f.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new ce(t,i,t.path,o)))).then(i=>q.mergeArray(s,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new ce(t,i,t.path,o)));return q.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new ir({...this._def,minLength:{value:e,message:k.toString(t)}})}max(e,t){return new ir({...this._def,maxLength:{value:e,message:k.toString(t)}})}length(e,t){return new ir({...this._def,exactLength:{value:e,message:k.toString(t)}})}nonempty(e){return this.min(1,e)}};Ie.create=(r,e)=>new Ie({type:r,minLength:null,maxLength:null,exactLength:null,typeName:Z.ZodArray,...C(e)});function Ve(r){if(r instanceof H){const e={};for(const t in r.shape){const s=r.shape[t];e[t]=ie.create(Ve(s))}return new H({...r._def,shape:()=>e})}else return r instanceof Ie?new Ie({...r._def,type:Ve(r.element)}):r instanceof ie?ie.create(Ve(r.unwrap())):r instanceof Te?Te.create(Ve(r.unwrap())):r instanceof Ze?Ze.create(r.items.map(e=>Ve(e))):r}let H=class Q extends j{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=P.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==_.object){const d=this._getOrReturnCtx(e);return m(d,{code:f.invalid_type,expected:_.object,received:d.parsedType}),S}const{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof ye&&this._def.unknownKeys==="strip"))for(const d in n.data)i.includes(d)||o.push(d);const c=[];for(const d of i){const u=a[d],A=n.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new ce(n,A,n.path,d)),alwaysSet:d in n.data})}if(this._def.catchall instanceof ye){const d=this._def.unknownKeys;if(d==="passthrough")for(const u of o)c.push({key:{status:"valid",value:u},value:{status:"valid",value:n.data[u]}});else if(d==="strict")o.length>0&&(m(n,{code:f.unrecognized_keys,keys:o}),s.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const u of o){const A=n.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new ce(n,A,n.path,u)),alwaysSet:u in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const d=[];for(const u of c){const A=await u.key,_e=await u.value;d.push({key:A,value:_e,alwaysSet:u.alwaysSet})}return d}).then(d=>q.mergeObjectSync(s,d)):q.mergeObjectSync(s,c)}get shape(){return this._def.shape()}strict(e){return k.errToObj,new Q({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,a,i,o;const c=(i=(a=(n=this._def).errorMap)===null||a===void 0?void 0:a.call(n,t,s).message)!==null&&i!==void 0?i:s.defaultError;return t.code==="unrecognized_keys"?{message:(o=k.errToObj(e).message)!==null&&o!==void 0?o:c}:{message:c}}}:{}})}strip(){return new Q({...this._def,unknownKeys:"strip"})}passthrough(){return new Q({...this._def,unknownKeys:"passthrough"})}extend(e){return new Q({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Q({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Z.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Q({...this._def,catchall:e})}pick(e){const t={};return P.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])}),new Q({...this._def,shape:()=>t})}omit(e){const t={};return P.objectKeys(this.shape).forEach(s=>{e[s]||(t[s]=this.shape[s])}),new Q({...this._def,shape:()=>t})}deepPartial(){return Ve(this)}partial(e){const t={};return P.objectKeys(this.shape).forEach(s=>{const n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()}),new Q({...this._def,shape:()=>t})}required(e){const t={};return P.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof ie;)a=a._def.innerType;t[s]=a}}),new Q({...this._def,shape:()=>t})}keyof(){return Ys(P.objectKeys(this.shape))}};H.create=(r,e)=>new H({shape:()=>r,unknownKeys:"strip",catchall:ye.create(),typeName:Z.ZodObject,...C(e)});H.strictCreate=(r,e)=>new H({shape:()=>r,unknownKeys:"strict",catchall:ye.create(),typeName:Z.ZodObject,...C(e)});H.lazycreate=(r,e)=>new H({shape:r,unknownKeys:"strip",catchall:ye.create(),typeName:Z.ZodObject,...C(e)});let jt=class extends j{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new ee(o.ctx.common.issues));return m(t,{code:f.invalid_union,unionErrors:i}),S}if(t.common.async)return Promise.all(s.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const c of s){const d={...t,common:{...t.common,issues:[]},parent:null},u=c._parseSync({data:t.data,path:t.path,parent:d});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:d}),d.common.issues.length&&i.push(d.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(c=>new ee(c));return m(t,{code:f.invalid_union,unionErrors:o}),S}}get options(){return this._def.options}};jt.create=(r,e)=>new jt({options:r,typeName:Z.ZodUnion,...C(e)});const he=r=>r instanceof At?he(r.schema):r instanceof se?he(r.innerType()):r instanceof Mt?[r.value]:r instanceof rr?r.options:r instanceof Pt?P.objectValues(r.enum):r instanceof Vt?he(r._def.innerType):r instanceof Et?[void 0]:r instanceof Rt?[null]:r instanceof ie?[void 0,...he(r.unwrap())]:r instanceof Te?[null,...he(r.unwrap())]:r instanceof as||r instanceof Lt?he(r.unwrap()):r instanceof Dt?he(r._def.innerType):[];let zs=class Us extends j{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==_.object)return m(t,{code:f.invalid_type,expected:_.object,received:t.parsedType}),S;const s=this.discriminator,n=t.data[s],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(m(t,{code:f.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),S)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){const n=new Map;for(const a of t){const i=he(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new Us({typeName:Z.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...C(s)})}};function Gr(r,e){const t=xe(r),s=xe(e);if(r===e)return{valid:!0,data:r};if(t===_.object&&s===_.object){const n=P.objectKeys(e),a=P.objectKeys(r).filter(o=>n.indexOf(o)!==-1),i={...r,...e};for(const o of a){const c=Gr(r[o],e[o]);if(!c.valid)return{valid:!1};i[o]=c.data}return{valid:!0,data:i}}else if(t===_.array&&s===_.array){if(r.length!==e.length)return{valid:!1};const n=[];for(let a=0;a<r.length;a++){const i=r[a],o=e[a],c=Gr(i,o);if(!c.valid)return{valid:!1};n.push(c.data)}return{valid:!0,data:n}}else return t===_.date&&s===_.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}let It=class extends j{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=(a,i)=>{if(qr(a)||qr(i))return S;const o=Gr(a.value,i.value);return o.valid?((Yr(a)||Yr(i))&&t.dirty(),{status:t.value,value:o.data}):(m(s,{code:f.invalid_intersection_types}),S)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}};It.create=(r,e,t)=>new It({left:r,right:e,typeName:Z.ZodIntersection,...C(t)});let Ze=class Bs extends j{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==_.array)return m(s,{code:f.invalid_type,expected:_.array,received:s.parsedType}),S;if(s.data.length<this._def.items.length)return m(s,{code:f.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),S;!this._def.rest&&s.data.length>this._def.items.length&&(m(s,{code:f.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...s.data].map((i,o)=>{const c=this._def.items[o]||this._def.rest;return c?c._parse(new ce(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>q.mergeArray(t,i)):q.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new Bs({...this._def,rest:e})}};Ze.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ze({items:r,typeName:Z.ZodTuple,rest:null,...C(e)})};let Ws=class Xr extends j{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==_.object)return m(s,{code:f.invalid_type,expected:_.object,received:s.parsedType}),S;const n=[],a=this._def.keyType,i=this._def.valueType;for(const o in s.data)n.push({key:a._parse(new ce(s,o,s.path,o)),value:i._parse(new ce(s,s.data[o],s.path,o)),alwaysSet:o in s.data});return s.common.async?q.mergeObjectAsync(t,n):q.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof j?new Xr({keyType:e,valueType:t,typeName:Z.ZodRecord,...C(s)}):new Xr({keyType:Ge.create(),valueType:e,typeName:Z.ZodRecord,...C(t)})}},kr=class extends j{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==_.map)return m(s,{code:f.invalid_type,expected:_.map,received:s.parsedType}),S;const n=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([o,c],d)=>({key:n._parse(new ce(s,o,s.path,[d,"key"])),value:a._parse(new ce(s,c,s.path,[d,"value"]))}));if(s.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const c of i){const d=await c.key,u=await c.value;if(d.status==="aborted"||u.status==="aborted")return S;(d.status==="dirty"||u.status==="dirty")&&t.dirty(),o.set(d.value,u.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const c of i){const d=c.key,u=c.value;if(d.status==="aborted"||u.status==="aborted")return S;(d.status==="dirty"||u.status==="dirty")&&t.dirty(),o.set(d.value,u.value)}return{status:t.value,value:o}}}};kr.create=(r,e,t)=>new kr({valueType:e,keyType:r,typeName:Z.ZodMap,...C(t)});let br=class Qr extends j{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==_.set)return m(s,{code:f.invalid_type,expected:_.set,received:s.parsedType}),S;const n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(m(s,{code:f.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(m(s,{code:f.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(c){const d=new Set;for(const u of c){if(u.status==="aborted")return S;u.status==="dirty"&&t.dirty(),d.add(u.value)}return{status:t.value,value:d}}const o=[...s.data.values()].map((c,d)=>a._parse(new ce(s,c,s.path,d)));return s.common.async?Promise.all(o).then(c=>i(c)):i(o)}min(e,t){return new Qr({...this._def,minSize:{value:e,message:k.toString(t)}})}max(e,t){return new Qr({...this._def,maxSize:{value:e,message:k.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};br.create=(r,e)=>new br({valueType:r,minSize:null,maxSize:null,typeName:Z.ZodSet,...C(e)});let qs=class or extends j{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==_.function)return m(t,{code:f.invalid_type,expected:_.function,received:t.parsedType}),S;function s(o,c){return vr({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,yr(),He].filter(d=>!!d),issueData:{code:f.invalid_arguments,argumentsError:c}})}function n(o,c){return vr({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,yr(),He].filter(d=>!!d),issueData:{code:f.invalid_return_type,returnTypeError:c}})}const a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof Qe){const o=this;return U(async function(...c){const d=new ee([]),u=await o._def.args.parseAsync(c,a).catch(G=>{throw d.addIssue(s(c,G)),d}),A=await Reflect.apply(i,this,u);return await o._def.returns._def.type.parseAsync(A,a).catch(G=>{throw d.addIssue(n(A,G)),d})})}else{const o=this;return U(function(...c){const d=o._def.args.safeParse(c,a);if(!d.success)throw new ee([s(c,d.error)]);const u=Reflect.apply(i,this,d.data),A=o._def.returns.safeParse(u,a);if(!A.success)throw new ee([n(u,A.error)]);return A.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new or({...this._def,args:Ze.create(e).rest(Ee.create())})}returns(e){return new or({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new or({args:e||Ze.create([]).rest(Ee.create()),returns:t||Ee.create(),typeName:Z.ZodFunction,...C(s)})}},At=class extends j{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};At.create=(r,e)=>new At({getter:r,typeName:Z.ZodLazy,...C(e)});let Mt=class extends j{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return m(t,{received:t.data,code:f.invalid_literal,expected:this._def.value}),S}return{status:"valid",value:e.data}}get value(){return this._def.value}};Mt.create=(r,e)=>new Mt({value:r,typeName:Z.ZodLiteral,...C(e)});function Ys(r,e){return new rr({values:r,typeName:Z.ZodEnum,...C(e)})}let rr=class Kr extends j{constructor(){super(...arguments),nt.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return m(t,{expected:P.joinValues(s),received:t.parsedType,code:f.invalid_type}),S}if(_r(this,nt)||Ms(this,nt,new Set(this._def.values)),!_r(this,nt).has(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return m(t,{received:t.data,code:f.invalid_enum_value,options:s}),S}return U(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Kr.create(e,{...this._def,...t})}exclude(e,t=this._def){return Kr.create(this.options.filter(s=>!e.includes(s)),{...this._def,...t})}};nt=new WeakMap;rr.create=Ys;let Pt=class extends j{constructor(){super(...arguments),at.set(this,void 0)}_parse(e){const t=P.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==_.string&&s.parsedType!==_.number){const n=P.objectValues(t);return m(s,{expected:P.joinValues(n),received:s.parsedType,code:f.invalid_type}),S}if(_r(this,at)||Ms(this,at,new Set(P.getValidEnumValues(this._def.values))),!_r(this,at).has(e.data)){const n=P.objectValues(t);return m(s,{received:s.data,code:f.invalid_enum_value,options:n}),S}return U(e.data)}get enum(){return this._def.values}};at=new WeakMap;Pt.create=(r,e)=>new Pt({values:r,typeName:Z.ZodNativeEnum,...C(e)});let Qe=class extends j{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==_.promise&&t.common.async===!1)return m(t,{code:f.invalid_type,expected:_.promise,received:t.parsedType}),S;const s=t.parsedType===_.promise?t.data:Promise.resolve(t.data);return U(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}};Qe.create=(r,e)=>new Qe({type:r,typeName:Z.ZodPromise,...C(e)});let se=class extends j{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Z.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{m(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(s.data,a);if(s.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return S;const c=await this._def.schema._parseAsync({data:o,path:s.path,parent:s});return c.status==="aborted"?S:c.status==="dirty"||t.value==="dirty"?ze(c.value):c});{if(t.value==="aborted")return S;const o=this._def.schema._parseSync({data:i,path:s.path,parent:s});return o.status==="aborted"?S:o.status==="dirty"||t.value==="dirty"?ze(o.value):o}}if(n.type==="refinement"){const i=o=>{const c=n.refinement(o,a);if(s.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){const o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?S:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?S:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!Tt(i))return i;const o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>Tt(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):i);P.assertNever(n)}};se.create=(r,e,t)=>new se({schema:r,typeName:Z.ZodEffects,effect:e,...C(t)});se.createWithPreprocess=(r,e,t)=>new se({schema:e,effect:{type:"preprocess",transform:r},typeName:Z.ZodEffects,...C(t)});let ie=class extends j{_parse(e){return this._getType(e)===_.undefined?U(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ie.create=(r,e)=>new ie({innerType:r,typeName:Z.ZodOptional,...C(e)});let Te=class extends j{_parse(e){return this._getType(e)===_.null?U(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Te.create=(r,e)=>new Te({innerType:r,typeName:Z.ZodNullable,...C(e)});let Vt=class extends j{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===_.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};Vt.create=(r,e)=>new Vt({innerType:r,typeName:Z.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...C(e)});let Dt=class extends j{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return $t(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new ee(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new ee(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}};Dt.create=(r,e)=>new Dt({innerType:r,typeName:Z.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...C(e)});let wr=class extends j{_parse(e){if(this._getType(e)!==_.nan){const s=this._getOrReturnCtx(e);return m(s,{code:f.invalid_type,expected:_.nan,received:s.parsedType}),S}return{status:"valid",value:e.data}}};wr.create=r=>new wr({typeName:Z.ZodNaN,...C(r)});const Oa=Symbol("zod_brand");let as=class extends j{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}},is=class Js extends j{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?S:a.status==="dirty"?(t.dirty(),ze(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{const n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?S:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,t){return new Js({in:e,out:t,typeName:Z.ZodPipeline})}},Lt=class extends j{_parse(e){const t=this._def.innerType._parse(e),s=n=>(Tt(n)&&(n.value=Object.freeze(n.value)),n);return $t(t)?t.then(n=>s(n)):s(t)}unwrap(){return this._def.innerType}};Lt.create=(r,e)=>new Lt({innerType:r,typeName:Z.ZodReadonly,...C(e)});function Hs(r,e={},t){return r?Xe.create().superRefine((s,n)=>{var a,i;if(!r(s)){const o=typeof e=="function"?e(s):typeof e=="string"?{message:e}:e,c=(i=(a=o.fatal)!==null&&a!==void 0?a:t)!==null&&i!==void 0?i:!0,d=typeof o=="string"?{message:o}:o;n.addIssue({code:"custom",...d,fatal:c})}}):Xe.create()}const Ca={object:H.lazycreate};var Z;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(Z||(Z={}));const Ea=(r,e={message:`Input not instance of ${r.name}`})=>Hs(t=>t instanceof r,e),Gs=Ge.create,Xs=St.create,Ra=wr.create,ja=Nt.create,Qs=Ot.create,Ia=Ct.create,Aa=gr.create,Ma=Et.create,Pa=Rt.create,Va=Xe.create,Da=Ee.create,La=ye.create,za=xr.create,Ua=Ie.create,Ba=H.create,Wa=H.strictCreate,qa=jt.create,Ya=zs.create,Ja=It.create,Ha=Ze.create,Ga=Ws.create,Xa=kr.create,Qa=br.create,Ka=qs.create,Fa=At.create,ei=Mt.create,ti=rr.create,ri=Pt.create,si=Qe.create,ls=se.create,ni=ie.create,ai=Te.create,ii=se.createWithPreprocess,oi=is.create,di=()=>Gs().optional(),ci=()=>Xs().optional(),ui=()=>Qs().optional(),li={string:r=>Ge.create({...r,coerce:!0}),number:r=>St.create({...r,coerce:!0}),boolean:r=>Ot.create({...r,coerce:!0}),bigint:r=>Nt.create({...r,coerce:!0}),date:r=>Ct.create({...r,coerce:!0})},fi=S;var hd=Object.freeze({__proto__:null,defaultErrorMap:He,setErrorMap:fa,getErrorMap:yr,makeIssue:vr,EMPTY_PATH:ha,addIssueToContext:m,ParseStatus:q,INVALID:S,DIRTY:ze,OK:U,isAborted:qr,isDirty:Yr,isValid:Tt,isAsync:$t,get util(){return P},get objectUtil(){return Wr},ZodParsedType:_,getParsedType:xe,ZodType:j,datetimeRegex:Ds,ZodString:Ge,ZodNumber:St,ZodBigInt:Nt,ZodBoolean:Ot,ZodDate:Ct,ZodSymbol:gr,ZodUndefined:Et,ZodNull:Rt,ZodAny:Xe,ZodUnknown:Ee,ZodNever:ye,ZodVoid:xr,ZodArray:Ie,ZodObject:H,ZodUnion:jt,ZodDiscriminatedUnion:zs,ZodIntersection:It,ZodTuple:Ze,ZodRecord:Ws,ZodMap:kr,ZodSet:br,ZodFunction:qs,ZodLazy:At,ZodLiteral:Mt,ZodEnum:rr,ZodNativeEnum:Pt,ZodPromise:Qe,ZodEffects:se,ZodTransformer:se,ZodOptional:ie,ZodNullable:Te,ZodDefault:Vt,ZodCatch:Dt,ZodNaN:wr,BRAND:Oa,ZodBranded:as,ZodPipeline:is,ZodReadonly:Lt,custom:Hs,Schema:j,ZodSchema:j,late:Ca,get ZodFirstPartyTypeKind(){return Z},coerce:li,any:Va,array:Ua,bigint:ja,boolean:Qs,date:Ia,discriminatedUnion:Ya,effect:ls,enum:ti,function:Ka,instanceof:Ea,intersection:Ja,lazy:Fa,literal:ei,map:Xa,nan:Ra,nativeEnum:ri,never:La,null:Pa,nullable:ai,number:Xs,object:Ba,oboolean:ui,onumber:ci,optional:ni,ostring:di,pipeline:oi,preprocess:ii,promise:si,record:Ga,set:Qa,strictObject:Wa,string:Gs,symbol:Aa,transformer:ls,tuple:Ha,undefined:Ma,union:qa,unknown:Da,void:za,NEVER:fi,ZodIssueCode:f,quotelessJson:la,ZodError:ee}),V;(function(r){r.assertEqual=n=>n;function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},r.getValidEnumValues=n=>{const a=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return r.objectValues(i)},r.objectValues=n=>r.objectKeys(n).map(function(a){return n[a]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},r.find=(n,a)=>{for(const i of n)if(a(i))return i},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function s(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}r.joinValues=s,r.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(V||(V={}));var Fr;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Fr||(Fr={}));const g=V.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ke=r=>{switch(typeof r){case"undefined":return g.undefined;case"string":return g.string;case"number":return isNaN(r)?g.nan:g.number;case"boolean":return g.boolean;case"function":return g.function;case"bigint":return g.bigint;case"symbol":return g.symbol;case"object":return Array.isArray(r)?g.array:r===null?g.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?g.promise:typeof Map<"u"&&r instanceof Map?g.map:typeof Set<"u"&&r instanceof Set?g.set:typeof Date<"u"&&r instanceof Date?g.date:g.object;default:return g.unknown}},h=V.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),hi=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class Y extends Error{constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(a){return a.message},s={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let o=s,c=0;for(;c<i.path.length;){const d=i.path[c];c===i.path.length-1?(o[d]=o[d]||{_errors:[]},o[d]._errors.push(t(i))):o[d]=o[d]||{_errors:[]},o=o[d],c++}}};return n(this),s}static assert(e){if(!(e instanceof Y))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,V.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},s=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}Y.create=r=>new Y(r);const Ke=(r,e)=>{let t;switch(r.code){case h.invalid_type:r.received===g.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case h.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,V.jsonStringifyReplacer)}`;break;case h.unrecognized_keys:t=`Unrecognized key(s) in object: ${V.joinValues(r.keys,", ")}`;break;case h.invalid_union:t="Invalid input";break;case h.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${V.joinValues(r.options)}`;break;case h.invalid_enum_value:t=`Invalid enum value. Expected ${V.joinValues(r.options)}, received '${r.received}'`;break;case h.invalid_arguments:t="Invalid function arguments";break;case h.invalid_return_type:t="Invalid function return type";break;case h.invalid_date:t="Invalid date";break;case h.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:V.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case h.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case h.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case h.custom:t="Invalid input";break;case h.invalid_intersection_types:t="Intersection results could not be merged";break;case h.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case h.not_finite:t="Number must be finite";break;default:t=e.defaultError,V.assertNever(r)}return{message:t}};let Ks=Ke;function pi(r){Ks=r}function Zr(){return Ks}const Tr=r=>{const{data:e,path:t,errorMaps:s,issueData:n}=r,a=[...t,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let o="";const c=s.filter(d=>!!d).slice().reverse();for(const d of c)o=d(i,{data:e,defaultError:o}).message;return{...n,path:a,message:o}},mi=[];function y(r,e){const t=Zr(),s=Tr({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===Ke?void 0:Ke].filter(n=>!!n)});r.common.issues.push(s)}class L{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const n of t){if(n.status==="aborted")return N;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const n of t){const a=await n.key,i=await n.value;s.push({key:a,value:i})}return L.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return N;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(s[a.value]=i.value)}return{status:e.value,value:s}}}const N=Object.freeze({status:"aborted"}),Ue=r=>({status:"dirty",value:r}),B=r=>({status:"valid",value:r}),es=r=>r.status==="aborted",ts=r=>r.status==="dirty",zt=r=>r.status==="valid",Ut=r=>typeof Promise<"u"&&r instanceof Promise;function $r(r,e,t,s){if(typeof e=="function"?r!==e||!s:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(r)}function Fs(r,e,t,s,n){if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(r,t),t}var b;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(b||(b={}));var ot,dt;class ue{constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const fs=(r,e)=>{if(zt(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Y(r.common.issues);return this._error=t,this._error}}};function E(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:n}=r;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>{var c,d;const{message:u}=r;return i.code==="invalid_enum_value"?{message:u??o.defaultError}:typeof o.data>"u"?{message:(c=u??s)!==null&&c!==void 0?c:o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:(d=u??t)!==null&&d!==void 0?d:o.defaultError}},description:n}}class I{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return ke(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:ke(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new L,ctx:{common:e.parent.common,data:e.data,parsedType:ke(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Ut(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const n={common:{issues:[],async:(s=t==null?void 0:t.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ke(e)},a=this._parseSync({data:e,path:n.path,parent:n});return fs(n,a)}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ke(e)},n=this._parse({data:e,path:s.path,parent:s}),a=await(Ut(n)?n:Promise.resolve(n));return fs(s,a)}refine(e,t){const s=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:h.custom,...s(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof t=="function"?t(s,n):t),!1))}_refinement(e){return new ne({schema:this,typeName:T.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return oe.create(this,this._def)}nullable(){return Oe.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return te.create(this,this._def)}promise(){return et.create(this,this._def)}or(e){return Yt.create([this,e],this._def)}and(e){return Jt.create(this,e,this._def)}transform(e){return new ne({...E(this._def),schema:this,typeName:T.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new Kt({...E(this._def),innerType:this,defaultValue:t,typeName:T.ZodDefault})}brand(){return new os({typeName:T.ZodBranded,type:this,...E(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new Ft({...E(this._def),innerType:this,catchValue:t,typeName:T.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return sr.create(this,e)}readonly(){return er.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const yi=/^c[^\s-]{8,}$/i,vi=/^[0-9a-z]+$/,_i=/^[0-9A-HJKMNP-TV-Z]{26}$/,gi=/^[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,xi=/^[a-z0-9_-]{21}$/i,ki=/^[-+]?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)?)??$/,bi=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,wi="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ir;const Zi=/^(?:(?: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])$/,Ti=/^(([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})))$/,$i=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,en="((\\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])))",Si=new RegExp(`^${en}$`);function tn(r){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Ni(r){return new RegExp(`^${tn(r)}$`)}function rn(r){let e=`${en}T${tn(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Oi(r,e){return!!((e==="v4"||!e)&&Zi.test(r)||(e==="v6"||!e)&&Ti.test(r))}class K extends I{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==g.string){const a=this._getOrReturnCtx(e);return y(a,{code:h.invalid_type,expected:g.string,received:a.parsedType}),N}const s=new L;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),y(n,{code:h.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),y(n,{code:h.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(n=this._getOrReturnCtx(e,n),i?y(n,{code:h.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&y(n,{code:h.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")bi.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"email",code:h.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")Ir||(Ir=new RegExp(wi,"u")),Ir.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"emoji",code:h.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")gi.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"uuid",code:h.invalid_string,message:a.message}),s.dirty());else if(a.kind==="nanoid")xi.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"nanoid",code:h.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")yi.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"cuid",code:h.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")vi.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"cuid2",code:h.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")_i.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"ulid",code:h.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),y(n,{validation:"url",code:h.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"regex",code:h.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),y(n,{code:h.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),y(n,{code:h.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),y(n,{code:h.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?rn(a).test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{code:h.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="date"?Si.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{code:h.invalid_string,validation:"date",message:a.message}),s.dirty()):a.kind==="time"?Ni(a).test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{code:h.invalid_string,validation:"time",message:a.message}),s.dirty()):a.kind==="duration"?ki.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"duration",code:h.invalid_string,message:a.message}),s.dirty()):a.kind==="ip"?Oi(e.data,a.version)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"ip",code:h.invalid_string,message:a.message}),s.dirty()):a.kind==="base64"?$i.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:"base64",code:h.invalid_string,message:a.message}),s.dirty()):V.assertNever(a);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(n=>e.test(n),{validation:t,code:h.invalid_string,...b.errToObj(s)})}_addCheck(e){return new K({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...b.errToObj(e)})}url(e){return this._addCheck({kind:"url",...b.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...b.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...b.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...b.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...b.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...b.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...b.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...b.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...b.errToObj(e)})}datetime(e){var t,s;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(s=e==null?void 0:e.local)!==null&&s!==void 0?s:!1,...b.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...b.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...b.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...b.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...b.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...b.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...b.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...b.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...b.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...b.errToObj(t)})}nonempty(e){return this.min(1,b.errToObj(e))}trim(){return new K({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new K({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new K({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}K.create=r=>{var e;return new K({checks:[],typeName:T.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...E(r)})};function Ci(r,e){const t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,a=parseInt(r.toFixed(n).replace(".","")),i=parseInt(e.toFixed(n).replace(".",""));return a%i/Math.pow(10,n)}class $e extends I{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==g.number){const a=this._getOrReturnCtx(e);return y(a,{code:h.invalid_type,expected:g.number,received:a.parsedType}),N}let s;const n=new L;for(const a of this._def.checks)a.kind==="int"?V.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),y(s,{code:h.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),y(s,{code:h.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),y(s,{code:h.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?Ci(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),y(s,{code:h.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),y(s,{code:h.not_finite,message:a.message}),n.dirty()):V.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,b.toString(t))}gt(e,t){return this.setLimit("min",e,!1,b.toString(t))}lte(e,t){return this.setLimit("max",e,!0,b.toString(t))}lt(e,t){return this.setLimit("max",e,!1,b.toString(t))}setLimit(e,t,s,n){return new $e({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:b.toString(n)}]})}_addCheck(e){return new $e({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:b.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:b.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:b.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:b.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:b.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:b.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:b.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:b.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:b.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&V.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}}$e.create=r=>new $e({checks:[],typeName:T.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...E(r)});class Se extends I{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==g.bigint){const a=this._getOrReturnCtx(e);return y(a,{code:h.invalid_type,expected:g.bigint,received:a.parsedType}),N}let s;const n=new L;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),y(s,{code:h.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),y(s,{code:h.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),y(s,{code:h.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):V.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,b.toString(t))}gt(e,t){return this.setLimit("min",e,!1,b.toString(t))}lte(e,t){return this.setLimit("max",e,!0,b.toString(t))}lt(e,t){return this.setLimit("max",e,!1,b.toString(t))}setLimit(e,t,s,n){return new Se({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:b.toString(n)}]})}_addCheck(e){return new Se({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:b.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:b.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:b.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:b.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:b.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Se.create=r=>{var e;return new Se({checks:[],typeName:T.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...E(r)})};class Bt extends I{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==g.boolean){const s=this._getOrReturnCtx(e);return y(s,{code:h.invalid_type,expected:g.boolean,received:s.parsedType}),N}return B(e.data)}}Bt.create=r=>new Bt({typeName:T.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...E(r)});class Ae extends I{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==g.date){const a=this._getOrReturnCtx(e);return y(a,{code:h.invalid_type,expected:g.date,received:a.parsedType}),N}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return y(a,{code:h.invalid_date}),N}const s=new L;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),y(n,{code:h.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),y(n,{code:h.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):V.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ae({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:b.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:b.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}Ae.create=r=>new Ae({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:T.ZodDate,...E(r)});class Sr extends I{_parse(e){if(this._getType(e)!==g.symbol){const s=this._getOrReturnCtx(e);return y(s,{code:h.invalid_type,expected:g.symbol,received:s.parsedType}),N}return B(e.data)}}Sr.create=r=>new Sr({typeName:T.ZodSymbol,...E(r)});class Wt extends I{_parse(e){if(this._getType(e)!==g.undefined){const s=this._getOrReturnCtx(e);return y(s,{code:h.invalid_type,expected:g.undefined,received:s.parsedType}),N}return B(e.data)}}Wt.create=r=>new Wt({typeName:T.ZodUndefined,...E(r)});class qt extends I{_parse(e){if(this._getType(e)!==g.null){const s=this._getOrReturnCtx(e);return y(s,{code:h.invalid_type,expected:g.null,received:s.parsedType}),N}return B(e.data)}}qt.create=r=>new qt({typeName:T.ZodNull,...E(r)});class Fe extends I{constructor(){super(...arguments),this._any=!0}_parse(e){return B(e.data)}}Fe.create=r=>new Fe({typeName:T.ZodAny,...E(r)});class Re extends I{constructor(){super(...arguments),this._unknown=!0}_parse(e){return B(e.data)}}Re.create=r=>new Re({typeName:T.ZodUnknown,...E(r)});class ve extends I{_parse(e){const t=this._getOrReturnCtx(e);return y(t,{code:h.invalid_type,expected:g.never,received:t.parsedType}),N}}ve.create=r=>new ve({typeName:T.ZodNever,...E(r)});class Nr extends I{_parse(e){if(this._getType(e)!==g.undefined){const s=this._getOrReturnCtx(e);return y(s,{code:h.invalid_type,expected:g.void,received:s.parsedType}),N}return B(e.data)}}Nr.create=r=>new Nr({typeName:T.ZodVoid,...E(r)});class te extends I{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==g.array)return y(t,{code:h.invalid_type,expected:g.array,received:t.parsedType}),N;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(i||o)&&(y(t,{code:i?h.too_big:h.too_small,minimum:o?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(y(t,{code:h.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(y(t,{code:h.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new ue(t,i,t.path,o)))).then(i=>L.mergeArray(s,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new ue(t,i,t.path,o)));return L.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new te({...this._def,minLength:{value:e,message:b.toString(t)}})}max(e,t){return new te({...this._def,maxLength:{value:e,message:b.toString(t)}})}length(e,t){return new te({...this._def,exactLength:{value:e,message:b.toString(t)}})}nonempty(e){return this.min(1,e)}}te.create=(r,e)=>new te({type:r,minLength:null,maxLength:null,exactLength:null,typeName:T.ZodArray,...E(e)});function De(r){if(r instanceof D){const e={};for(const t in r.shape){const s=r.shape[t];e[t]=oe.create(De(s))}return new D({...r._def,shape:()=>e})}else return r instanceof te?new te({...r._def,type:De(r.element)}):r instanceof oe?oe.create(De(r.unwrap())):r instanceof Oe?Oe.create(De(r.unwrap())):r instanceof le?le.create(r.items.map(e=>De(e))):r}class D extends I{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=V.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==g.object){const d=this._getOrReturnCtx(e);return y(d,{code:h.invalid_type,expected:g.object,received:d.parsedType}),N}const{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof ve&&this._def.unknownKeys==="strip"))for(const d in n.data)i.includes(d)||o.push(d);const c=[];for(const d of i){const u=a[d],A=n.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new ue(n,A,n.path,d)),alwaysSet:d in n.data})}if(this._def.catchall instanceof ve){const d=this._def.unknownKeys;if(d==="passthrough")for(const u of o)c.push({key:{status:"valid",value:u},value:{status:"valid",value:n.data[u]}});else if(d==="strict")o.length>0&&(y(n,{code:h.unrecognized_keys,keys:o}),s.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const u of o){const A=n.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new ue(n,A,n.path,u)),alwaysSet:u in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const d=[];for(const u of c){const A=await u.key,_e=await u.value;d.push({key:A,value:_e,alwaysSet:u.alwaysSet})}return d}).then(d=>L.mergeObjectSync(s,d)):L.mergeObjectSync(s,c)}get shape(){return this._def.shape()}strict(e){return b.errToObj,new D({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,a,i,o;const c=(i=(a=(n=this._def).errorMap)===null||a===void 0?void 0:a.call(n,t,s).message)!==null&&i!==void 0?i:s.defaultError;return t.code==="unrecognized_keys"?{message:(o=b.errToObj(e).message)!==null&&o!==void 0?o:c}:{message:c}}}:{}})}strip(){return new D({...this._def,unknownKeys:"strip"})}passthrough(){return new D({...this._def,unknownKeys:"passthrough"})}extend(e){return new D({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new D({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:T.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new D({...this._def,catchall:e})}pick(e){const t={};return V.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])}),new D({...this._def,shape:()=>t})}omit(e){const t={};return V.objectKeys(this.shape).forEach(s=>{e[s]||(t[s]=this.shape[s])}),new D({...this._def,shape:()=>t})}deepPartial(){return De(this)}partial(e){const t={};return V.objectKeys(this.shape).forEach(s=>{const n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()}),new D({...this._def,shape:()=>t})}required(e){const t={};return V.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof oe;)a=a._def.innerType;t[s]=a}}),new D({...this._def,shape:()=>t})}keyof(){return sn(V.objectKeys(this.shape))}}D.create=(r,e)=>new D({shape:()=>r,unknownKeys:"strip",catchall:ve.create(),typeName:T.ZodObject,...E(e)});D.strictCreate=(r,e)=>new D({shape:()=>r,unknownKeys:"strict",catchall:ve.create(),typeName:T.ZodObject,...E(e)});D.lazycreate=(r,e)=>new D({shape:r,unknownKeys:"strip",catchall:ve.create(),typeName:T.ZodObject,...E(e)});class Yt extends I{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new Y(o.ctx.common.issues));return y(t,{code:h.invalid_union,unionErrors:i}),N}if(t.common.async)return Promise.all(s.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const c of s){const d={...t,common:{...t.common,issues:[]},parent:null},u=c._parseSync({data:t.data,path:t.path,parent:d});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:d}),d.common.issues.length&&i.push(d.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(c=>new Y(c));return y(t,{code:h.invalid_union,unionErrors:o}),N}}get options(){return this._def.options}}Yt.create=(r,e)=>new Yt({options:r,typeName:T.ZodUnion,...E(e)});const pe=r=>r instanceof Gt?pe(r.schema):r instanceof ne?pe(r.innerType()):r instanceof Xt?[r.value]:r instanceof Ne?r.options:r instanceof Qt?V.objectValues(r.enum):r instanceof Kt?pe(r._def.innerType):r instanceof Wt?[void 0]:r instanceof qt?[null]:r instanceof oe?[void 0,...pe(r.unwrap())]:r instanceof Oe?[null,...pe(r.unwrap())]:r instanceof os||r instanceof er?pe(r.unwrap()):r instanceof Ft?pe(r._def.innerType):[];class Er extends I{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==g.object)return y(t,{code:h.invalid_type,expected:g.object,received:t.parsedType}),N;const s=this.discriminator,n=t.data[s],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(y(t,{code:h.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),N)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){const n=new Map;for(const a of t){const i=pe(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new Er({typeName:T.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...E(s)})}}function rs(r,e){const t=ke(r),s=ke(e);if(r===e)return{valid:!0,data:r};if(t===g.object&&s===g.object){const n=V.objectKeys(e),a=V.objectKeys(r).filter(o=>n.indexOf(o)!==-1),i={...r,...e};for(const o of a){const c=rs(r[o],e[o]);if(!c.valid)return{valid:!1};i[o]=c.data}return{valid:!0,data:i}}else if(t===g.array&&s===g.array){if(r.length!==e.length)return{valid:!1};const n=[];for(let a=0;a<r.length;a++){const i=r[a],o=e[a],c=rs(i,o);if(!c.valid)return{valid:!1};n.push(c.data)}return{valid:!0,data:n}}else return t===g.date&&s===g.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class Jt extends I{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=(a,i)=>{if(es(a)||es(i))return N;const o=rs(a.value,i.value);return o.valid?((ts(a)||ts(i))&&t.dirty(),{status:t.value,value:o.data}):(y(s,{code:h.invalid_intersection_types}),N)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}Jt.create=(r,e,t)=>new Jt({left:r,right:e,typeName:T.ZodIntersection,...E(t)});class le extends I{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==g.array)return y(s,{code:h.invalid_type,expected:g.array,received:s.parsedType}),N;if(s.data.length<this._def.items.length)return y(s,{code:h.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),N;!this._def.rest&&s.data.length>this._def.items.length&&(y(s,{code:h.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...s.data].map((i,o)=>{const c=this._def.items[o]||this._def.rest;return c?c._parse(new ue(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>L.mergeArray(t,i)):L.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new le({...this._def,rest:e})}}le.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new le({items:r,typeName:T.ZodTuple,rest:null,...E(e)})};class Ht extends I{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==g.object)return y(s,{code:h.invalid_type,expected:g.object,received:s.parsedType}),N;const n=[],a=this._def.keyType,i=this._def.valueType;for(const o in s.data)n.push({key:a._parse(new ue(s,o,s.path,o)),value:i._parse(new ue(s,s.data[o],s.path,o)),alwaysSet:o in s.data});return s.common.async?L.mergeObjectAsync(t,n):L.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof I?new Ht({keyType:e,valueType:t,typeName:T.ZodRecord,...E(s)}):new Ht({keyType:K.create(),valueType:e,typeName:T.ZodRecord,...E(t)})}}class Or extends I{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==g.map)return y(s,{code:h.invalid_type,expected:g.map,received:s.parsedType}),N;const n=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([o,c],d)=>({key:n._parse(new ue(s,o,s.path,[d,"key"])),value:a._parse(new ue(s,c,s.path,[d,"value"]))}));if(s.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const c of i){const d=await c.key,u=await c.value;if(d.status==="aborted"||u.status==="aborted")return N;(d.status==="dirty"||u.status==="dirty")&&t.dirty(),o.set(d.value,u.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const c of i){const d=c.key,u=c.value;if(d.status==="aborted"||u.status==="aborted")return N;(d.status==="dirty"||u.status==="dirty")&&t.dirty(),o.set(d.value,u.value)}return{status:t.value,value:o}}}}Or.create=(r,e,t)=>new Or({valueType:e,keyType:r,typeName:T.ZodMap,...E(t)});class Me extends I{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==g.set)return y(s,{code:h.invalid_type,expected:g.set,received:s.parsedType}),N;const n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(y(s,{code:h.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(y(s,{code:h.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(c){const d=new Set;for(const u of c){if(u.status==="aborted")return N;u.status==="dirty"&&t.dirty(),d.add(u.value)}return{status:t.value,value:d}}const o=[...s.data.values()].map((c,d)=>a._parse(new ue(s,c,s.path,d)));return s.common.async?Promise.all(o).then(c=>i(c)):i(o)}min(e,t){return new Me({...this._def,minSize:{value:e,message:b.toString(t)}})}max(e,t){return new Me({...this._def,maxSize:{value:e,message:b.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Me.create=(r,e)=>new Me({valueType:r,minSize:null,maxSize:null,typeName:T.ZodSet,...E(e)});class Be extends I{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==g.function)return y(t,{code:h.invalid_type,expected:g.function,received:t.parsedType}),N;function s(o,c){return Tr({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Zr(),Ke].filter(d=>!!d),issueData:{code:h.invalid_arguments,argumentsError:c}})}function n(o,c){return Tr({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Zr(),Ke].filter(d=>!!d),issueData:{code:h.invalid_return_type,returnTypeError:c}})}const a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof et){const o=this;return B(async function(...c){const d=new Y([]),u=await o._def.args.parseAsync(c,a).catch(G=>{throw d.addIssue(s(c,G)),d}),A=await Reflect.apply(i,this,u);return await o._def.returns._def.type.parseAsync(A,a).catch(G=>{throw d.addIssue(n(A,G)),d})})}else{const o=this;return B(function(...c){const d=o._def.args.safeParse(c,a);if(!d.success)throw new Y([s(c,d.error)]);const u=Reflect.apply(i,this,d.data),A=o._def.returns.safeParse(u,a);if(!A.success)throw new Y([n(u,A.error)]);return A.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Be({...this._def,args:le.create(e).rest(Re.create())})}returns(e){return new Be({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new Be({args:e||le.create([]).rest(Re.create()),returns:t||Re.create(),typeName:T.ZodFunction,...E(s)})}}class Gt extends I{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Gt.create=(r,e)=>new Gt({getter:r,typeName:T.ZodLazy,...E(e)});class Xt extends I{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return y(t,{received:t.data,code:h.invalid_literal,expected:this._def.value}),N}return{status:"valid",value:e.data}}get value(){return this._def.value}}Xt.create=(r,e)=>new Xt({value:r,typeName:T.ZodLiteral,...E(e)});function sn(r,e){return new Ne({values:r,typeName:T.ZodEnum,...E(e)})}class Ne extends I{constructor(){super(...arguments),ot.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return y(t,{expected:V.joinValues(s),received:t.parsedType,code:h.invalid_type}),N}if($r(this,ot)||Fs(this,ot,new Set(this._def.values)),!$r(this,ot).has(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return y(t,{received:t.data,code:h.invalid_enum_value,options:s}),N}return B(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Ne.create(e,{...this._def,...t})}exclude(e,t=this._def){return Ne.create(this.options.filter(s=>!e.includes(s)),{...this._def,...t})}}ot=new WeakMap;Ne.create=sn;class Qt extends I{constructor(){super(...arguments),dt.set(this,void 0)}_parse(e){const t=V.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==g.string&&s.parsedType!==g.number){const n=V.objectValues(t);return y(s,{expected:V.joinValues(n),received:s.parsedType,code:h.invalid_type}),N}if($r(this,dt)||Fs(this,dt,new Set(V.getValidEnumValues(this._def.values))),!$r(this,dt).has(e.data)){const n=V.objectValues(t);return y(s,{received:s.data,code:h.invalid_enum_value,options:n}),N}return B(e.data)}get enum(){return this._def.values}}dt=new WeakMap;Qt.create=(r,e)=>new Qt({values:r,typeName:T.ZodNativeEnum,...E(e)});class et extends I{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==g.promise&&t.common.async===!1)return y(t,{code:h.invalid_type,expected:g.promise,received:t.parsedType}),N;const s=t.parsedType===g.promise?t.data:Promise.resolve(t.data);return B(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}et.create=(r,e)=>new et({type:r,typeName:T.ZodPromise,...E(e)});class ne extends I{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===T.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{y(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(s.data,a);if(s.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return N;const c=await this._def.schema._parseAsync({data:o,path:s.path,parent:s});return c.status==="aborted"?N:c.status==="dirty"||t.value==="dirty"?Ue(c.value):c});{if(t.value==="aborted")return N;const o=this._def.schema._parseSync({data:i,path:s.path,parent:s});return o.status==="aborted"?N:o.status==="dirty"||t.value==="dirty"?Ue(o.value):o}}if(n.type==="refinement"){const i=o=>{const c=n.refinement(o,a);if(s.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){const o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?N:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?N:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!zt(i))return i;const o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>zt(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):i);V.assertNever(n)}}ne.create=(r,e,t)=>new ne({schema:r,typeName:T.ZodEffects,effect:e,...E(t)});ne.createWithPreprocess=(r,e,t)=>new ne({schema:e,effect:{type:"preprocess",transform:r},typeName:T.ZodEffects,...E(t)});class oe extends I{_parse(e){return this._getType(e)===g.undefined?B(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}oe.create=(r,e)=>new oe({innerType:r,typeName:T.ZodOptional,...E(e)});class Oe extends I{_parse(e){return this._getType(e)===g.null?B(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Oe.create=(r,e)=>new Oe({innerType:r,typeName:T.ZodNullable,...E(e)});class Kt extends I{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===g.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Kt.create=(r,e)=>new Kt({innerType:r,typeName:T.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...E(e)});class Ft extends I{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Ut(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Y(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Y(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Ft.create=(r,e)=>new Ft({innerType:r,typeName:T.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...E(e)});class Cr extends I{_parse(e){if(this._getType(e)!==g.nan){const s=this._getOrReturnCtx(e);return y(s,{code:h.invalid_type,expected:g.nan,received:s.parsedType}),N}return{status:"valid",value:e.data}}}Cr.create=r=>new Cr({typeName:T.ZodNaN,...E(r)});const Ei=Symbol("zod_brand");class os extends I{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class sr extends I{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?N:a.status==="dirty"?(t.dirty(),Ue(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{const n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?N:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,t){return new sr({in:e,out:t,typeName:T.ZodPipeline})}}class er extends I{_parse(e){const t=this._def.innerType._parse(e),s=n=>(zt(n)&&(n.value=Object.freeze(n.value)),n);return Ut(t)?t.then(n=>s(n)):s(t)}unwrap(){return this._def.innerType}}er.create=(r,e)=>new er({innerType:r,typeName:T.ZodReadonly,...E(e)});function nn(r,e={},t){return r?Fe.create().superRefine((s,n)=>{var a,i;if(!r(s)){const o=typeof e=="function"?e(s):typeof e=="string"?{message:e}:e,c=(i=(a=o.fatal)!==null&&a!==void 0?a:t)!==null&&i!==void 0?i:!0,d=typeof o=="string"?{message:o}:o;n.addIssue({code:"custom",...d,fatal:c})}}):Fe.create()}const Ri={object:D.lazycreate};var T;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(T||(T={}));const ji=(r,e={message:`Input not instance of ${r.name}`})=>nn(t=>t instanceof r,e),an=K.create,on=$e.create,Ii=Cr.create,Ai=Se.create,dn=Bt.create,Mi=Ae.create,Pi=Sr.create,Vi=Wt.create,Di=qt.create,Li=Fe.create,zi=Re.create,Ui=ve.create,Bi=Nr.create,Wi=te.create,qi=D.create,Yi=D.strictCreate,Ji=Yt.create,Hi=Er.create,Gi=Jt.create,Xi=le.create,Qi=Ht.create,Ki=Or.create,Fi=Me.create,eo=Be.create,to=Gt.create,ro=Xt.create,so=Ne.create,no=Qt.create,ao=et.create,hs=ne.create,io=oe.create,oo=Oe.create,co=ne.createWithPreprocess,uo=sr.create,lo=()=>an().optional(),fo=()=>on().optional(),ho=()=>dn().optional(),po={string:r=>K.create({...r,coerce:!0}),number:r=>$e.create({...r,coerce:!0}),boolean:r=>Bt.create({...r,coerce:!0}),bigint:r=>Se.create({...r,coerce:!0}),date:r=>Ae.create({...r,coerce:!0})},mo=N;var pd=Object.freeze({__proto__:null,defaultErrorMap:Ke,setErrorMap:pi,getErrorMap:Zr,makeIssue:Tr,EMPTY_PATH:mi,addIssueToContext:y,ParseStatus:L,INVALID:N,DIRTY:Ue,OK:B,isAborted:es,isDirty:ts,isValid:zt,isAsync:Ut,get util(){return V},get objectUtil(){return Fr},ZodParsedType:g,getParsedType:ke,ZodType:I,datetimeRegex:rn,ZodString:K,ZodNumber:$e,ZodBigInt:Se,ZodBoolean:Bt,ZodDate:Ae,ZodSymbol:Sr,ZodUndefined:Wt,ZodNull:qt,ZodAny:Fe,ZodUnknown:Re,ZodNever:ve,ZodVoid:Nr,ZodArray:te,ZodObject:D,ZodUnion:Yt,ZodDiscriminatedUnion:Er,ZodIntersection:Jt,ZodTuple:le,ZodRecord:Ht,ZodMap:Or,ZodSet:Me,ZodFunction:Be,ZodLazy:Gt,ZodLiteral:Xt,ZodEnum:Ne,ZodNativeEnum:Qt,ZodPromise:et,ZodEffects:ne,ZodTransformer:ne,ZodOptional:oe,ZodNullable:Oe,ZodDefault:Kt,ZodCatch:Ft,ZodNaN:Cr,BRAND:Ei,ZodBranded:os,ZodPipeline:sr,ZodReadonly:er,custom:nn,Schema:I,ZodSchema:I,late:Ri,get ZodFirstPartyTypeKind(){return T},coerce:po,any:Li,array:Wi,bigint:Ai,boolean:dn,date:Mi,discriminatedUnion:Hi,effect:hs,enum:so,function:eo,instanceof:ji,intersection:Gi,lazy:to,literal:ro,map:Ki,nan:Ii,nativeEnum:no,never:Ui,null:Di,nullable:oo,number:on,object:qi,oboolean:ho,onumber:fo,optional:io,ostring:lo,pipeline:uo,preprocess:co,promise:ao,record:Qi,set:Fi,strictObject:Yi,string:an,symbol:Pi,transformer:hs,tuple:Xi,undefined:Vi,union:Ji,unknown:zi,void:Bi,NEVER:mo,ZodIssueCode:h,quotelessJson:hi,ZodError:Y});export{J as Z,bt as a,w as b,hd as c,zo as d,pd as z};
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env node
2
+ export declare class CameraUiCLI {
3
+ IS_DEV: boolean;
4
+ APP_NAME: string;
5
+ DEFAULT_PORT: number;
6
+ action: 'install' | 'uninstall' | 'reinstall' | 'before-start' | 'start' | 'stop' | 'restart' | 'run' | 'logs' | 'status';
7
+ selfPath: string;
8
+ homePath: string;
9
+ storagePath: string;
10
+ serviceName: string;
11
+ allowRunRoot: boolean;
12
+ docker?: boolean;
13
+ asUser?: string;
14
+ addGroup?: string;
15
+ private installer;
16
+ private log?;
17
+ private forkedProcess?;
18
+ private stdout?;
19
+ private uid?;
20
+ private gid?;
21
+ private shuttingDown;
22
+ private logging;
23
+ get logPath(): string;
24
+ get configFilePath(): string;
25
+ get uiPort(): number;
26
+ constructor();
27
+ logger(msg: string, level?: 'info' | 'succeed' | 'fail' | 'warn' | 'debug'): void;
28
+ printPostInstallInstructions(type: 'start' | 'restart' | 'status'): Promise<void>;
29
+ portCheck(): Promise<void>;
30
+ homePathCheck(): Promise<void>;
31
+ getUserHomeDir(): string;
32
+ waitForApiHealth(maxWaitTime?: number): Promise<boolean>;
33
+ getInstallDir(): string;
34
+ private showVersion;
35
+ private launch;
36
+ private run;
37
+ private stop;
38
+ private setEnv;
39
+ private storagePathCheck;
40
+ private statusCheck;
41
+ private nodeVersionCheck;
42
+ private nvmCheck;
43
+ private staleProcessCheck;
44
+ private startLog;
45
+ private hookWriteStream;
46
+ private truncateLog;
47
+ private tailLogs;
48
+ private closeLog;
49
+ private fetchApiHealth;
50
+ private chownPath;
51
+ private fixDockerPermissions;
52
+ private handleClose;
53
+ private exitHandler;
54
+ }