@verdocs/web-sdk 2.3.84 → 2.3.86

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 (254) hide show
  1. package/dist/cjs/{EnvelopeStore-1275f980.js → EnvelopeStore-7b1adebb.js} +1 -1
  2. package/dist/cjs/{TemplateFieldStore-874f47c0.js → TemplateFieldStore-3d25fc86.js} +1 -1
  3. package/dist/cjs/{TemplateRoleStore-6f391aa6.js → TemplateRoleStore-a7f2b586.js} +1 -1
  4. package/dist/cjs/{TemplateStore-4a3c60f7.js → TemplateStore-62c90f8c.js} +3 -3
  5. package/dist/cjs/{index-39554143.js → index-5463795e.js} +0 -3
  6. package/dist/cjs/{index-7d1c0557.js → index-f712049c.js} +1 -1
  7. package/dist/cjs/ipc-test.cjs.entry.js +5 -5
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
  10. package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-build.cjs.entry.js +5 -5
  12. package/dist/cjs/verdocs-button-panel.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-button_3.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-checkbox_5.cjs.entry.js +5 -5
  15. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +1 -1
  16. package/dist/cjs/verdocs-dialog_2.cjs.entry.js +1 -1
  17. package/dist/cjs/verdocs-dropdown.cjs.entry.js +1 -1
  18. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
  19. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +3 -3
  20. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +3 -3
  21. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
  22. package/dist/cjs/verdocs-field-attachment_15.cjs.entry.js +4 -4
  23. package/dist/cjs/verdocs-field-payment.cjs.entry.js +4 -4
  24. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  25. package/dist/cjs/verdocs-floating-menu.cjs.entry.js +2 -2
  26. package/dist/cjs/verdocs-kba-dialog.cjs.entry.js +1 -1
  27. package/dist/cjs/verdocs-loader.cjs.entry.js +1 -1
  28. package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -1
  29. package/dist/cjs/verdocs-organization-card.cjs.entry.js +1 -1
  30. package/dist/cjs/verdocs-pagination_2.cjs.entry.js +1 -1
  31. package/dist/cjs/verdocs-preview_8.cjs.entry.js +5 -5
  32. package/dist/cjs/verdocs-quick-functions_2.cjs.entry.js +1 -1
  33. package/dist/cjs/verdocs-radio-button.cjs.entry.js +1 -1
  34. package/dist/cjs/verdocs-search-tabs.cjs.entry.js +1 -1
  35. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  36. package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +1 -1
  37. package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
  38. package/dist/cjs/verdocs-sign.cjs.entry.js +12 -8
  39. package/dist/cjs/verdocs-spinner.cjs.entry.js +1 -1
  40. package/dist/cjs/verdocs-status-indicator.cjs.entry.js +1 -1
  41. package/dist/cjs/verdocs-tabs.cjs.entry.js +1 -1
  42. package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
  43. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +5 -5
  44. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  45. package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
  46. package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
  47. package/dist/cjs/verdocs-toggle.cjs.entry.js +1 -1
  48. package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
  49. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  50. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +9 -5
  51. package/dist/components/verdocs-sign.js +9 -5
  52. package/dist/docs.json +1 -1
  53. package/dist/esm/{EnvelopeStore-9ba23493.js → EnvelopeStore-24a1f38f.js} +1 -1
  54. package/dist/esm/{TemplateFieldStore-dd0bdf08.js → TemplateFieldStore-6e67e86b.js} +1 -1
  55. package/dist/esm/{TemplateRoleStore-73163c7c.js → TemplateRoleStore-33229997.js} +1 -1
  56. package/dist/esm/{TemplateStore-74f2da56.js → TemplateStore-940da116.js} +3 -3
  57. package/dist/esm/{index-d5ba09f3.js → index-172625c5.js} +1 -3
  58. package/dist/esm/{index-1ce2872b.js → index-4439b0d1.js} +1 -1
  59. package/dist/esm/ipc-test.entry.js +5 -5
  60. package/dist/esm/loader.js +1 -1
  61. package/dist/esm/verdocs-activity-box.entry.js +1 -1
  62. package/dist/esm/verdocs-auth.entry.js +1 -1
  63. package/dist/esm/verdocs-build.entry.js +5 -5
  64. package/dist/esm/verdocs-button-panel.entry.js +1 -1
  65. package/dist/esm/verdocs-button_3.entry.js +1 -1
  66. package/dist/esm/verdocs-checkbox_5.entry.js +5 -5
  67. package/dist/esm/verdocs-contact-picker_2.entry.js +1 -1
  68. package/dist/esm/verdocs-dialog_2.entry.js +1 -1
  69. package/dist/esm/verdocs-dropdown.entry.js +1 -1
  70. package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
  71. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +3 -3
  72. package/dist/esm/verdocs-envelope-sidebar.entry.js +3 -3
  73. package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
  74. package/dist/esm/verdocs-field-attachment_15.entry.js +4 -4
  75. package/dist/esm/verdocs-field-payment.entry.js +4 -4
  76. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  77. package/dist/esm/verdocs-floating-menu.entry.js +2 -2
  78. package/dist/esm/verdocs-kba-dialog.entry.js +1 -1
  79. package/dist/esm/verdocs-loader.entry.js +1 -1
  80. package/dist/esm/verdocs-ok-dialog.entry.js +1 -1
  81. package/dist/esm/verdocs-organization-card.entry.js +1 -1
  82. package/dist/esm/verdocs-pagination_2.entry.js +1 -1
  83. package/dist/esm/verdocs-preview_8.entry.js +5 -5
  84. package/dist/esm/verdocs-quick-functions_2.entry.js +1 -1
  85. package/dist/esm/verdocs-radio-button.entry.js +1 -1
  86. package/dist/esm/verdocs-search-tabs.entry.js +1 -1
  87. package/dist/esm/verdocs-search.entry.js +1 -1
  88. package/dist/esm/verdocs-settings-api-keys_4.entry.js +1 -1
  89. package/dist/esm/verdocs-settings.entry.js +1 -1
  90. package/dist/esm/verdocs-sign.entry.js +12 -8
  91. package/dist/esm/verdocs-spinner.entry.js +1 -1
  92. package/dist/esm/verdocs-status-indicator.entry.js +1 -1
  93. package/dist/esm/verdocs-tabs.entry.js +1 -1
  94. package/dist/esm/verdocs-template-card.entry.js +1 -1
  95. package/dist/esm/verdocs-template-fields_4.entry.js +5 -5
  96. package/dist/esm/verdocs-template-star.entry.js +1 -1
  97. package/dist/esm/verdocs-template-tags.entry.js +1 -1
  98. package/dist/esm/verdocs-templates-list.entry.js +1 -1
  99. package/dist/esm/verdocs-toggle.entry.js +1 -1
  100. package/dist/esm/verdocs-view.entry.js +1 -1
  101. package/dist/esm/verdocs-web-sdk.js +1 -1
  102. package/dist/esm-es5/{EnvelopeStore-9ba23493.js → EnvelopeStore-24a1f38f.js} +1 -1
  103. package/dist/esm-es5/{TemplateFieldStore-dd0bdf08.js → TemplateFieldStore-6e67e86b.js} +1 -1
  104. package/dist/esm-es5/{TemplateRoleStore-73163c7c.js → TemplateRoleStore-33229997.js} +1 -1
  105. package/dist/esm-es5/{TemplateStore-74f2da56.js → TemplateStore-940da116.js} +1 -1
  106. package/dist/esm-es5/index-172625c5.js +2 -0
  107. package/dist/esm-es5/{index-1ce2872b.js → index-4439b0d1.js} +1 -1
  108. package/dist/esm-es5/ipc-test.entry.js +1 -1
  109. package/dist/esm-es5/loader.js +1 -1
  110. package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
  111. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  112. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  113. package/dist/esm-es5/verdocs-button-panel.entry.js +1 -1
  114. package/dist/esm-es5/verdocs-button_3.entry.js +1 -1
  115. package/dist/esm-es5/verdocs-checkbox_5.entry.js +1 -1
  116. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  117. package/dist/esm-es5/verdocs-dialog_2.entry.js +1 -1
  118. package/dist/esm-es5/verdocs-dropdown.entry.js +1 -1
  119. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  120. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  121. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  122. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  123. package/dist/esm-es5/verdocs-field-attachment_15.entry.js +1 -1
  124. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  125. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  126. package/dist/esm-es5/verdocs-floating-menu.entry.js +1 -1
  127. package/dist/esm-es5/verdocs-kba-dialog.entry.js +1 -1
  128. package/dist/esm-es5/verdocs-loader.entry.js +1 -1
  129. package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
  130. package/dist/esm-es5/verdocs-organization-card.entry.js +1 -1
  131. package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
  132. package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
  133. package/dist/esm-es5/verdocs-quick-functions_2.entry.js +1 -1
  134. package/dist/esm-es5/verdocs-radio-button.entry.js +1 -1
  135. package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -1
  136. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  137. package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
  138. package/dist/esm-es5/verdocs-settings.entry.js +1 -1
  139. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  140. package/dist/esm-es5/verdocs-spinner.entry.js +1 -1
  141. package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
  142. package/dist/esm-es5/verdocs-tabs.entry.js +1 -1
  143. package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
  144. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  145. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  146. package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
  147. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  148. package/dist/esm-es5/verdocs-toggle.entry.js +1 -1
  149. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  150. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  151. package/dist/verdocs-web-sdk/{p-ea96f5f4.system.entry.js → p-012d2533.system.entry.js} +1 -1
  152. package/dist/verdocs-web-sdk/{p-f1e641a0.system.entry.js → p-04bef805.system.entry.js} +1 -1
  153. package/dist/verdocs-web-sdk/{p-87312a1e.entry.js → p-0a8f32b9.entry.js} +1 -1
  154. package/dist/verdocs-web-sdk/{p-ef6f8f40.system.entry.js → p-0ef04e14.system.entry.js} +1 -1
  155. package/dist/verdocs-web-sdk/{p-f75dcbcf.entry.js → p-10c3b15b.entry.js} +1 -1
  156. package/dist/verdocs-web-sdk/{p-c73c5c27.system.entry.js → p-11f3549a.system.entry.js} +1 -1
  157. package/dist/verdocs-web-sdk/{p-bfa1011a.entry.js → p-11f95569.entry.js} +1 -1
  158. package/dist/verdocs-web-sdk/{p-876d3ff3.js → p-14b44491.js} +2 -2
  159. package/dist/verdocs-web-sdk/{p-5519e76c.entry.js → p-1823e8cd.entry.js} +1 -1
  160. package/dist/verdocs-web-sdk/{p-26218bd9.system.entry.js → p-189968f1.system.entry.js} +1 -1
  161. package/dist/verdocs-web-sdk/{p-fe8f27b7.entry.js → p-1bf648d5.entry.js} +1 -1
  162. package/dist/verdocs-web-sdk/{p-e48e3cfb.entry.js → p-1f6ee7f1.entry.js} +1 -1
  163. package/dist/verdocs-web-sdk/{p-5e45c089.system.js → p-1f9d9fe5.system.js} +1 -1
  164. package/dist/verdocs-web-sdk/{p-6e56bca8.entry.js → p-1fa5ef9a.entry.js} +1 -1
  165. package/dist/verdocs-web-sdk/{p-829aa8bb.entry.js → p-1fe3b3bf.entry.js} +1 -1
  166. package/dist/verdocs-web-sdk/{p-c83d188d.system.entry.js → p-20de620c.system.entry.js} +1 -1
  167. package/dist/verdocs-web-sdk/{p-81dcff5e.system.entry.js → p-21294863.system.entry.js} +1 -1
  168. package/dist/verdocs-web-sdk/{p-d842c235.system.entry.js → p-294ffd95.system.entry.js} +1 -1
  169. package/dist/verdocs-web-sdk/{p-8c08c9f9.entry.js → p-2b4b8754.entry.js} +1 -1
  170. package/dist/verdocs-web-sdk/{p-d79d096b.js → p-321da456.js} +1 -1
  171. package/dist/verdocs-web-sdk/{p-d67b2d1d.system.entry.js → p-3229cb32.system.entry.js} +1 -1
  172. package/dist/verdocs-web-sdk/{p-4b5b0646.entry.js → p-32eff598.entry.js} +1 -1
  173. package/dist/verdocs-web-sdk/{p-0cecd33d.system.entry.js → p-3350ad33.system.entry.js} +1 -1
  174. package/dist/verdocs-web-sdk/p-34140f60.entry.js +1 -0
  175. package/dist/verdocs-web-sdk/{p-7e63be48.system.entry.js → p-341d97ba.system.entry.js} +1 -1
  176. package/dist/verdocs-web-sdk/{p-029e9c61.system.entry.js → p-3a12e7a2.system.entry.js} +1 -1
  177. package/dist/verdocs-web-sdk/p-3af6b910.system.js +1 -0
  178. package/dist/verdocs-web-sdk/{p-b8bff8d4.system.entry.js → p-3dc2013b.system.entry.js} +1 -1
  179. package/dist/verdocs-web-sdk/p-4098a4a2.system.js +1 -0
  180. package/dist/verdocs-web-sdk/{p-83a620f8.system.entry.js → p-4e834dcc.system.entry.js} +1 -1
  181. package/dist/verdocs-web-sdk/{p-fd8dbf14.system.entry.js → p-50e0263a.system.entry.js} +1 -1
  182. package/dist/verdocs-web-sdk/{p-977a516a.system.entry.js → p-547f5660.system.entry.js} +1 -1
  183. package/dist/verdocs-web-sdk/{p-6a1aa8ea.system.entry.js → p-57c87e08.system.entry.js} +1 -1
  184. package/dist/verdocs-web-sdk/{p-9558a87a.entry.js → p-5a1c0b41.entry.js} +1 -1
  185. package/dist/verdocs-web-sdk/{p-534a26b0.system.entry.js → p-5b72bb32.system.entry.js} +1 -1
  186. package/dist/verdocs-web-sdk/{p-584d64c2.system.entry.js → p-5c67e9f6.system.entry.js} +1 -1
  187. package/dist/verdocs-web-sdk/{p-5247e965.entry.js → p-603d0733.entry.js} +1 -1
  188. package/dist/verdocs-web-sdk/{p-264cbd45.entry.js → p-63a62567.entry.js} +1 -1
  189. package/dist/verdocs-web-sdk/{p-045feca9.system.entry.js → p-68cfa909.system.entry.js} +1 -1
  190. package/dist/verdocs-web-sdk/{p-9242e5bd.system.entry.js → p-68e3aae3.system.entry.js} +1 -1
  191. package/dist/verdocs-web-sdk/{p-b0f1bbe1.system.entry.js → p-69422d8f.system.entry.js} +1 -1
  192. package/dist/verdocs-web-sdk/{p-0bc79a35.entry.js → p-7272e80c.entry.js} +1 -1
  193. package/dist/verdocs-web-sdk/{p-dd8c54eb.entry.js → p-7286272b.entry.js} +1 -1
  194. package/dist/verdocs-web-sdk/{p-a653b5b5.system.entry.js → p-745e8427.system.entry.js} +1 -1
  195. package/dist/verdocs-web-sdk/{p-85d0e79d.js → p-7648c449.js} +1 -1
  196. package/dist/verdocs-web-sdk/{p-9b80c742.entry.js → p-77205bff.entry.js} +1 -1
  197. package/dist/verdocs-web-sdk/{p-84babf11.entry.js → p-7b60293f.entry.js} +1 -1
  198. package/dist/verdocs-web-sdk/{p-5a283795.entry.js → p-7f487279.entry.js} +1 -1
  199. package/dist/verdocs-web-sdk/{p-fd1f0083.entry.js → p-8003357d.entry.js} +1 -1
  200. package/dist/verdocs-web-sdk/{p-eca7ffba.system.entry.js → p-85cb43de.system.entry.js} +1 -1
  201. package/dist/verdocs-web-sdk/{p-2621a900.entry.js → p-871f2e57.entry.js} +1 -1
  202. package/dist/verdocs-web-sdk/{p-ad1b9040.system.entry.js → p-8de34628.system.entry.js} +1 -1
  203. package/dist/verdocs-web-sdk/{p-136786ec.entry.js → p-9200270e.entry.js} +1 -1
  204. package/dist/verdocs-web-sdk/{p-26580438.system.js → p-95080569.system.js} +1 -1
  205. package/dist/verdocs-web-sdk/{p-b06f9f6a.system.entry.js → p-9595c814.system.entry.js} +1 -1
  206. package/dist/verdocs-web-sdk/{p-35b7055e.entry.js → p-964f83ef.entry.js} +1 -1
  207. package/dist/verdocs-web-sdk/{p-d1d42af2.entry.js → p-98c9b7d7.entry.js} +1 -1
  208. package/dist/verdocs-web-sdk/{p-8beb54d2.entry.js → p-9bfc868a.entry.js} +1 -1
  209. package/dist/verdocs-web-sdk/{p-bf7e741e.entry.js → p-9d1e6991.entry.js} +1 -1
  210. package/dist/verdocs-web-sdk/p-a27b7dfa.system.entry.js +1 -0
  211. package/dist/verdocs-web-sdk/p-a5f94a3f.entry.js +1 -0
  212. package/dist/verdocs-web-sdk/{p-ce79bbd3.system.entry.js → p-a85de84d.system.entry.js} +1 -1
  213. package/dist/verdocs-web-sdk/{p-59addd7b.entry.js → p-ab73a327.entry.js} +1 -1
  214. package/dist/verdocs-web-sdk/{p-74dad2b0.entry.js → p-abf7930b.entry.js} +1 -1
  215. package/dist/verdocs-web-sdk/{p-990b6645.system.entry.js → p-adb830b4.system.entry.js} +1 -1
  216. package/dist/verdocs-web-sdk/{p-e16c6d91.system.entry.js → p-b55a122e.system.entry.js} +1 -1
  217. package/dist/verdocs-web-sdk/{p-138bd0cf.system.js → p-b6df9fe6.system.js} +1 -1
  218. package/dist/verdocs-web-sdk/{p-854671ca.entry.js → p-b7d1e999.entry.js} +1 -1
  219. package/dist/verdocs-web-sdk/{p-d7c326c6.entry.js → p-b804e710.entry.js} +1 -1
  220. package/dist/verdocs-web-sdk/{p-535cbdd3.entry.js → p-bb2b0122.entry.js} +1 -1
  221. package/dist/verdocs-web-sdk/{p-3624c08b.entry.js → p-bb983c03.entry.js} +1 -1
  222. package/dist/verdocs-web-sdk/{p-ac16209a.system.entry.js → p-be7390d8.system.entry.js} +1 -1
  223. package/dist/verdocs-web-sdk/{p-99ada1d4.system.entry.js → p-c56a34a8.system.entry.js} +1 -1
  224. package/dist/verdocs-web-sdk/{p-6e6bd9ca.system.entry.js → p-c5f28000.system.entry.js} +1 -1
  225. package/dist/verdocs-web-sdk/{p-d2e8ff20.entry.js → p-cf6a9502.entry.js} +1 -1
  226. package/dist/verdocs-web-sdk/{p-c134bf3e.system.entry.js → p-d0564f02.system.entry.js} +1 -1
  227. package/dist/verdocs-web-sdk/{p-481ad7de.system.entry.js → p-d1837101.system.entry.js} +1 -1
  228. package/dist/verdocs-web-sdk/{p-c250ce88.js → p-d425fa2c.js} +1 -1
  229. package/dist/verdocs-web-sdk/{p-7acb5bde.system.entry.js → p-d636a3cd.system.entry.js} +1 -1
  230. package/dist/verdocs-web-sdk/{p-7b53fef7.system.entry.js → p-d81b1bc9.system.entry.js} +1 -1
  231. package/dist/verdocs-web-sdk/{p-a26459d5.system.entry.js → p-d9e8c0f9.system.entry.js} +1 -1
  232. package/dist/verdocs-web-sdk/{p-f5799571.entry.js → p-dbbf84f6.entry.js} +1 -1
  233. package/dist/verdocs-web-sdk/{p-5ce2f910.entry.js → p-dd9dba09.entry.js} +1 -1
  234. package/dist/verdocs-web-sdk/{p-677a7783.entry.js → p-df19dc00.entry.js} +1 -1
  235. package/dist/verdocs-web-sdk/{p-66dcbdf6.entry.js → p-e1b527eb.entry.js} +1 -1
  236. package/dist/verdocs-web-sdk/{p-a4e226f9.js → p-e1f4be7c.js} +1 -1
  237. package/dist/verdocs-web-sdk/{p-4efb82f0.entry.js → p-e2439f45.entry.js} +1 -1
  238. package/dist/verdocs-web-sdk/{p-893cb619.entry.js → p-e51f2b77.entry.js} +1 -1
  239. package/dist/verdocs-web-sdk/{p-9e88104d.system.entry.js → p-e63fe8b9.system.entry.js} +1 -1
  240. package/dist/verdocs-web-sdk/{p-b7ba461a.system.entry.js → p-e6fd0310.system.entry.js} +1 -1
  241. package/dist/verdocs-web-sdk/{p-b9493625.js → p-ef20cb50.js} +1 -1
  242. package/dist/verdocs-web-sdk/{p-5e203333.system.js → p-f04bf956.system.js} +1 -1
  243. package/dist/verdocs-web-sdk/{p-28d09c1b.system.entry.js → p-f27fe881.system.entry.js} +1 -1
  244. package/dist/verdocs-web-sdk/{p-cd61fea7.system.js → p-fbb8023f.system.js} +2 -2
  245. package/dist/verdocs-web-sdk/{p-59862c79.entry.js → p-ff8278e7.entry.js} +1 -1
  246. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  247. package/dist/verdocs-web-sdk/verdocs-web-sdk.js +1 -1
  248. package/package.json +1 -1
  249. package/dist/esm-es5/index-d5ba09f3.js +0 -2
  250. package/dist/verdocs-web-sdk/p-39e8600d.system.js +0 -1
  251. package/dist/verdocs-web-sdk/p-4b73be51.entry.js +0 -1
  252. package/dist/verdocs-web-sdk/p-55a956cb.entry.js +0 -1
  253. package/dist/verdocs-web-sdk/p-8c97a2a3.system.entry.js +0 -1
  254. package/dist/verdocs-web-sdk/p-9cbf9278.system.js +0 -1
@@ -1 +1 @@
1
- var __extends=this&&this.__extends||function(){var e=function(t,n){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]};return e(t,n)};return function(t,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function s(e){try{u(r.next(e))}catch(e){a(e)}}function o(e){try{u(r["throw"](e))}catch(e){a(e)}}function u(e){e.done?n(e.value):i(e.value).then(s,o)}u((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(t){return u([e,t])}}function u(s){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(a=s[0]&2?i["return"]:s[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;if(i=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1];a=s;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(s);break}if(a[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++){if(a||!(r in t)){if(!a)a=Array.prototype.slice.call(t,0,r);a[r]=t[r]}}return e.concat(a||Array.prototype.slice.call(t))};System.register(["./p-cd61fea7.system.js","./p-54498887.system.js","./p-235b4a0b.system.js","./p-3bcd86ea.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js","./p-cd20fb77.system.js","./p-dc9c4361.system.js","./p-0cafdb16.system.js","./p-bbee73c8.system.js","./p-8aae8d16.system.js","./p-173e86c3.system.js"],(function(e){"use strict";var t,n,r,i,a,s,o,u,l,c,d,f,p,h,v;return{setters:[function(e){t=e.r;n=e.c;r=e.h;i=e.H},function(){},function(e){a=e.V},function(e){s=e.a;o=e.c;u=e.b},function(e){l=e.V},function(e){c=e.S},function(e){d=e.g;f=e.a;p=e.u},function(e){h=e.f},function(e){v=e.c},function(){},function(){},function(){}],execute:function(){var m=function(e,t){return e.api.get("/organizations/".concat(t,"/api_key")).then((function(e){return e.data}))};var g=function(e,t,n){return e.api.post("/organizations/".concat(t,"/api_key"),n).then((function(e){return e.data}))};var _=function(e,t,n){return e.api.put("/organizations/".concat(t,"/api_key/").concat(n,"/rotate")).then((function(e){return e.data}))};var y=function(e,t,n){return e.api.delete("/organizations/".concat(t,"/api_key/").concat(n)).then((function(e){return e.data}))};var b=function(e,t){return e.api.get("/organizations/".concat(t,"/invitation")).then((function(e){return e.data}))};var T=function(e,t,n){return e.api.post("/organizations/".concat(t,"/invitation"),n).then((function(e){return e.data}))};var k=function(e,t,n){return e.api.delete("/organizations/".concat(t,"/invitation/").concat(n)).then((function(e){return e.data}))};var x=function(e,t,n){return e.api.post("/organizations/".concat(t,"/invitation/").concat(n,"/resend")).then((function(e){return e.data}))};var M=function(e,t){return e.api.get("/organizations/".concat(t,"/profiles")).then((function(e){return e.data}))};var w=function(e,t,n){return e.api.delete("/organizations/".concat(t,"/profiles/").concat(n)).then((function(e){return e.data}))};var G=function(e,t){return e.api.get("/organizations/".concat(t)).then((function(e){return e.data}))};var I=function(e,t,n){return e.api.patch("/organizations/".concat(t),n).then((function(e){return e.data}))};var S='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-settings-api-keys{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}verdocs-settings-api-keys .table{margin:12px 0}verdocs-settings-api-keys .data-col div{gap:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-settings-api-keys .data-col svg{width:24px;height:24px}verdocs-settings-api-keys .col-name svg,verdocs-settings-api-keys .col-client_id svg,verdocs-settings-api-keys .col-profile_id svg{fill:#a1a1aa}verdocs-settings-api-keys .col-actions svg{fill:#ffffff;stroke:#a1a1aa}verdocs-settings-api-keys .col-actions svg:hover{cursor:pointer;stroke:red}verdocs-settings-api-keys .col-actions>div{-ms-flex-pack:center;justify-content:center}verdocs-settings-api-keys .header-col.col-actions{text-align:center}verdocs-settings-api-keys verdocs-dialog p{font-size:16px;line-height:18px;margin:0 0 1em 0}@media all and (max-width: 450px){verdocs-settings-api-keys .col-client_id,verdocs-settings-api-keys .col-actions{display:none}}';var C='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M5.5 3A2.5 2.5 0 003 5.5v2.879a2.5 2.5 0 00.732 1.767l6.5 6.5a2.5 2.5 0 003.536 0l2.878-2.878a2.5 2.5 0 000-3.536l-6.5-6.5A2.5 2.5 0 008.38 3H5.5zM6 7a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd" /></svg>';var A='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-5.5-2.5a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zM10 12a5.99 5.99 0 00-4.793 2.39A6.483 6.483 0 0010 16.5a6.483 6.483 0 004.793-2.11A5.99 5.99 0 0010 12z" clip-rule="evenodd" /></svg>';var P='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var j='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99" /></svg>';var O=e("verdocs_settings_api_keys",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.memberInvited=n(this,"memberInvited",7);this.memberUpdated=n(this,"memberUpdated",7);this.memberRemoved=n(this,"memberRemoved",7);this.endpoint=a.getDefault();this.keys=[];this.creatingKey=false;this.createdKey=null;this.deletingKey=null;this.rotatingKey=null;this.newApiKeyName="";this.newApiKeyProfileId="";this.members=[]}e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.newApiKeyProfileId=this.endpoint.session.profile_id;M(this.endpoint,this.endpoint.session.organization_id).then((function(t){e.members=t})).catch((function(t){var n,r,i;console.log("[SETTINGS] Error loading organization members",t);(n=e.sdkError)===null||n===void 0?void 0:n.emit(new c(t.message,(r=t.response)===null||r===void 0?void 0:r.status,(i=t.response)===null||i===void 0?void 0:i.data));l("Unable to load API keys. Please try again later",{style:"error"})}));this.loadKeys();return[2]}))}))};e.prototype.loadKeys=function(){var e=this;m(this.endpoint,this.endpoint.session.organization_id).then((function(t){e.keys=t})).catch((function(t){var n,r,i;console.log("[SETTINGS] Unable to load API keys",t);(n=e.sdkError)===null||n===void 0?void 0:n.emit(new c(t.message,(r=t.response)===null||r===void 0?void 0:r.status,(i=t.response)===null||i===void 0?void 0:i.data));l("Unable to load API keys. Please try again later",{style:"error"})}))};e.prototype.handleDeleteKey=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){y(this.endpoint,this.deletingKey.organization_id,this.deletingKey.client_id).then((function(){e.deletingKey=null;l("API key deleted",{style:"success"});e.loadKeys()})).catch((function(t){var n,r,i;e.deletingKey=null;console.log("[SETTINGS] Unable to delete API key",t);(n=e.sdkError)===null||n===void 0?void 0:n.emit(new c(t.message,(r=t.response)===null||r===void 0?void 0:r.status,(i=t.response)===null||i===void 0?void 0:i.data));l("Unable to delete API key. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.handleRotateKey=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){_(this.endpoint,this.rotatingKey.organization_id,this.rotatingKey.client_id).then((function(t){e.rotatingKey=null;l("API key rotated",{style:"success"});e.loadKeys();e.createdKey=t})).catch((function(t){var n,r,i;e.rotatingKey=null;console.log("[SETTINGS] Unable to rotate API key",t);(n=e.sdkError)===null||n===void 0?void 0:n.emit(new c(t.message,(r=t.response)===null||r===void 0?void 0:r.status,(i=t.response)===null||i===void 0?void 0:i.data));l("Unable to rotate API key. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.handleCreateKey=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){g(this.endpoint,this.endpoint.session.organization_id,{name:this.newApiKeyName,profile_id:this.newApiKeyProfileId}).then((function(t){e.creatingKey=false;e.createdKey=t;l("API key created",{style:"success"});e.loadKeys()})).catch((function(t){var n,r,i;e.creatingKey=false;console.log("[SETTINGS] Unable to create API key",t);(n=e.sdkError)===null||n===void 0?void 0:n.emit(new c(t.message,(r=t.response)===null||r===void 0?void 0:r.status,(i=t.response)===null||i===void 0?void 0:i.data));l("Unable to create API key. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.render=function(){var e=this;var t,n,a,o;var u=this.members.map((function(e){return{label:s(e),value:e.id}}));if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return r(i,{class:"authentication-required"},"Must be authenticated")}return r(i,null,r("verdocs-table",{data:this.keys,columns:[{id:"name",header:"Name",renderCell:function(e,t){return r("div",null,r("div",null,t.name))}},{id:"client_id",header:"Client ID",renderCell:function(e,t){return r("div",null,r("div",{innerHTML:C}),r("div",null,t.client_id))}},{id:"profile_id",header:"Acts as",renderCell:function(e,t){return r("div",null,r("div",{innerHTML:A}),r("div",null,s(t.profile)))}},{id:"actions",header:"Actions",renderCell:function(t,n){return r("div",null,r("div",{innerHTML:P,onClick:function(){return e.deletingKey=n}}),r("div",{innerHTML:j,onClick:function(){return e.rotatingKey=n}}))}}]}),r("verdocs-button",{label:"Add API Key",size:"normal",onClick:function(){return e.creatingKey=true}}),this.deletingKey&&r("verdocs-dialog",{onExit:function(){return e.deletingKey=null}},r("div",{slot:"title",class:"heading"},'Delete API key "',this.deletingKey.name,'"?'),r("div",{class:"content"},r("p",null,"Are you sure you want to delete this key? This action cannot be undone."),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",label:"Cancel",onClick:function(){return e.deletingKey=null}}),r("verdocs-button",{size:"small",label:"OK",onClick:function(){return e.handleDeleteKey()}})))),this.rotatingKey&&r("verdocs-dialog",{onExit:function(){return e.rotatingKey=null}},r("div",{slot:"title",class:"heading"},'Rotate API key "',this.rotatingKey.name,'"?'),r("div",{class:"content"},r("p",null,"Are you sure you want to rotate this key? A new client secret will be generated, and the old value will become unusable. This action cannot be undone."),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",label:"Cancel",onClick:function(){return e.rotatingKey=null}}),r("verdocs-button",{size:"small",label:"OK",onClick:function(){return e.handleRotateKey()}})))),this.creatingKey&&r("verdocs-dialog",{onExit:function(){return e.creatingKey=false}},r("div",{slot:"title",class:"heading"},"Create API Key"),r("div",{class:"content"},r("verdocs-text-input",{label:"Name",placeholder:"API key name...",id:"verdocs-api-key-name",value:this.newApiKeyName,autocomplete:"off",required:true,onInput:function(t){return e.newApiKeyName=t.target.value},onFocusout:function(t){e.newApiKeyName=t.target.value.trim()}}),r("p",null,'API keys must be associated with a profile. Actions performed via API calls using this key will "act as" this profile.'),r("verdocs-select-input",{options:u,label:"Act as Profile",onInput:function(t){e.newApiKeyProfileId=t.target.value}}),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",label:"Cancel",onClick:function(){return e.creatingKey=false}}),r("verdocs-button",{size:"small",label:"OK",onClick:function(){return e.handleCreateKey()}})))),this.createdKey&&r("verdocs-dialog",{onExit:function(){return e.createdKey=null}},r("div",{slot:"title",class:"heading"},"API Key Details"),r("div",{class:"content"},r("verdocs-text-input",{label:"Name",disabled:true,value:(t=this.createdKey)===null||t===void 0?void 0:t.name}),r("verdocs-text-input",{label:"Profile",disabled:true,value:s((n=this.createdKey)===null||n===void 0?void 0:n.profile)}),r("p",null,"Please save the Client ID and Secret below. Be sure to never expose your secret key in insecure (Web or mobile environments)!"),r("verdocs-text-input",{label:"Client ID",disabled:true,value:(a=this.createdKey)===null||a===void 0?void 0:a.client_id,copyable:true}),r("verdocs-text-input",{label:"Secret Key",disabled:true,value:(o=this.createdKey)===null||o===void 0?void 0:o.client_secret,copyable:true}),r("div",{class:"buttons"},r("verdocs-button",{size:"small",label:"Done",onClick:function(){return e.createdKey=null}})))))};return e}());O.style=S;var E='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-settings-members{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}verdocs-settings-members .table{margin:12px 0}verdocs-settings-members .role{font-size:12px;width:32px;height:32px;border-radius:32px;background:#777777;color:#ffffff;font-weight:700;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-settings-members .table{margin:12px 0}verdocs-settings-members .data-col div{gap:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-settings-members .data-col svg{width:24px;height:24px}verdocs-settings-members .col-name svg,verdocs-settings-members .col-client_id svg,verdocs-settings-members .col-profile_id svg{fill:#a1a1aa}verdocs-settings-members .col-actions svg{fill:#ffffff;stroke:#a1a1aa}verdocs-settings-members .col-actions svg:hover{cursor:pointer;stroke:red}verdocs-settings-members .col-actions>div{-ms-flex-pack:center;justify-content:center}verdocs-settings-members .header-col.col-actions{text-align:center}verdocs-settings-members verdocs-dialog p{font-size:16px;line-height:18px;margin:0 0 1em 0}@media all and (max-width: 450px){verdocs-settings-members .col-email,verdocs-settings-members .col-phone,verdocs-settings-members .col-actions{display:none}}';var Z='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var N='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99" /></svg>';var z=function(e){if(e.find((function(e){return e.name==="owner"}))!==undefined)return"Owner";if(e.find((function(e){return e.name==="admin"}))!==undefined)return"Admin";if(e.find((function(e){return e.name==="member"}))!==undefined)return"Member";if(e.find((function(e){return e.name==="basic_user"}))!==undefined)return"Basic User";if(e.find((function(e){return e.name==="contact"}))!==undefined)return"Contact"};var K=function(e){if(e.find((function(e){return e.name==="owner"}))!==undefined)return"#9333ea";if(e.find((function(e){return e.name==="admin"}))!==undefined)return"#2563eb";if(e.find((function(e){return e.name==="member"}))!==undefined)return"#16a34a";if(e.find((function(e){return e.name==="basic_user"}))!==undefined)return"#ea580c";if(e.find((function(e){return e.name==="contact"}))!==undefined)return"#52525B"};var R=e("verdocs_settings_members",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.memberInvited=n(this,"memberInvited",7);this.memberUpdated=n(this,"memberUpdated",7);this.memberRemoved=n(this,"memberRemoved",7);this.endpoint=a.getDefault();this.members=[];this.invited=[];this.roles=[];this.selectedTab=0;this.invitingMember=false;this.newEmailAddress="";this.newRoleId="";this.submitting=false;this.deletingInvitation=null;this.resendingInvitation=null;this.deletingMember=null}e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.loadMembers().catch((function(e){return console.log("Unknown Error",e)}));return[2]}))}))};e.prototype.loadMembers=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,r,i,a,s,o,u;return __generator(this,(function(f){switch(f.label){case 0:f.trys.push([0,2,,3]);return[4,Promise.all([d(this.endpoint),M(this.endpoint,this.endpoint.session.organization_id),b(this.endpoint,this.endpoint.session.organization_id)])];case 1:i=f.sent(),a=i[0],s=i[1],o=i[2];this.roles=a;this.members=s;this.invited=o;this.newRoleId=((e=a.find((function(e){return e.name==="member"})))===null||e===void 0?void 0:e.id)||"";return[3,3];case 2:u=f.sent();(t=this.sdkError)===null||t===void 0?void 0:t.emit(new c(u.message,(n=u.response)===null||n===void 0?void 0:n.status,(r=u.response)===null||r===void 0?void 0:r.data));l("Unable to load members. Please try again later");return[3,3];case 3:return[2]}}))}))};e.prototype.handleInviteMember=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.submitting=true;T(a.getDefault(),this.endpoint.session.organization_id,{email:this.newEmailAddress,role_id:this.newRoleId,organization_id:this.endpoint.session.organization_id}).then((function(t){console.log("[SETTINGS] Invited member",t);e.invitingMember=false;e.submitting=false;e.newRoleId="";e.newEmailAddress="";l("Invitation sent!",{style:"success"});e.loadMembers()})).catch((function(t){console.log("[SETTINGS] Unable to invite member",t);e.invitingMember=false;e.submitting=false;e.newRoleId="";e.newEmailAddress="";l("Unable to invite member. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.handleDeleteMember=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.submitting=true;w(a.getDefault(),this.deletingMember.organization_id,this.deletingMember.email).then((function(){e.submitting=false;e.deletingMember=null;l("The member has been deleted.",{style:"success"});e.loadMembers()})).catch((function(t){e.submitting=false;e.deletingMember=null;console.log("Delete error",t);l("Unable to cancel invitation. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.handleDeleteInvitation=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.submitting=true;k(a.getDefault(),this.deletingInvitation.organization_id,this.deletingInvitation.email).then((function(){e.submitting=false;e.deletingInvitation=null;l("The invitation has been cancelled.",{style:"success"});e.loadMembers()})).catch((function(t){e.submitting=false;e.deletingInvitation=null;console.log("Delete error",t);l("Unable to cancel invitation. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.handleResendInvitation=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.submitting=true;x(a.getDefault(),this.resendingInvitation.organization_id,this.resendingInvitation.email).then((function(){e.submitting=false;e.resendingInvitation=null;l("The invitation has been resent.",{style:"success"});e.loadMembers()})).catch((function(t){e.submitting=false;e.resendingInvitation=null;console.log("REsend error",t);l("Unable to resend invitation. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return r(i,{class:"authentication-required"},"Must be authenticated")}var t=this.roles.map((function(e){return{label:z([{name:e.name}]),value:e.id}}));return r(i,null,r("verdocs-tabs",{tabs:[{label:"Members (".concat(this.members.length,")")},{label:"Pending Invitations (".concat(this.invited.length,")")}],onSelectTab:function(t){return e.selectedTab=t.detail.index}}),this.selectedTab===0&&r("verdocs-table",{data:this.members,columns:[{id:"name",renderHeader:function(){return"Member"},renderCell:function(e,t){return r("div",{style:{display:"flex",flexDirection:"row",gap:"10px",alignItems:"center"}},r("div",{class:"role",style:{backgroundColor:K(t.roles)}},u(t)),r("span",null,s(t)))}},{id:"email",header:"E-mail Address"},{id:"phone",header:"Phone Number"},{id:"roles",header:"Role",renderCell:function(e,t){return"".concat(z(t.roles))}},{id:"actions",header:"Actions",renderCell:function(t,n){return r("div",null,n.id!==e.endpoint.session.profile_id&&r("div",{innerHTML:Z,onClick:function(){return e.deletingMember=n}}))}}]}),this.selectedTab===1&&r("verdocs-table",{data:this.invited,columns:[{id:"email",header:"E-mail Address"},{id:"generated_at",header:"Invited",renderCell:function(e,t){return r("div",null,h(new Date(t.generated_at),"MMM d, Y"))}},{id:"role_id",header:"Role",renderCell:function(t,n){var i;return r("div",null,z([{name:(i=e.roles.find((function(e){return e.id===n.role_id})))===null||i===void 0?void 0:i.name}]))}},{id:"status",header:"Status",renderCell:function(e,t){return r("div",null,o(t.status))}},{id:"actions",header:"Actions",renderCell:function(t,n){return r("div",null,r("div",{innerHTML:Z,onClick:function(){return e.deletingInvitation=n}}),r("div",{innerHTML:N,onClick:function(){return e.resendingInvitation=n}}))}}]}),r("verdocs-button",{label:"Invite New Member",size:"normal",disabled:this.submitting,onClick:function(){return e.invitingMember=true}}),this.invitingMember&&r("verdocs-dialog",{onExit:function(){return e.invitingMember=false}},r("div",{slot:"title",class:"heading"},"Invite New Member"),r("div",{class:"content"},r("verdocs-text-input",{label:"E-mail Address",placeholder:"Enter the user's email address...",id:"verdocs-invite-email",value:this.newEmailAddress,autocomplete:"off",required:true,onInput:function(t){return e.newEmailAddress=t.target.value},onFocusout:function(t){e.newEmailAddress=t.target.value.trim()}}),r("div",{style:{marginBottom:"20px"}}),r("verdocs-select-input",{options:t,label:"Role",onInput:function(t){e.newRoleId=t.target.value}}),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",label:"Cancel",disabled:this.submitting,onClick:function(){return e.invitingMember=false}}),r("verdocs-button",{size:"small",label:"OK",disabled:this.submitting||!this.newEmailAddress||!this.newRoleId,onClick:function(){return e.handleInviteMember()}})))),this.deletingMember&&r("verdocs-dialog",{onExit:function(){return e.deletingMember=null}},r("div",{slot:"title",class:"heading"},"Delete Member?"),r("div",{class:"content"},r("p",null,"Are you sure you want to delete this member? This action cannot be undone."),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",disabled:this.submitting,label:"Cancel",onClick:function(){return e.deletingMember=null}}),r("verdocs-button",{size:"small",label:"OK",disabled:this.submitting,onClick:function(){return e.handleDeleteMember()}})))),this.deletingInvitation&&r("verdocs-dialog",{onExit:function(){return e.deletingInvitation=null}},r("div",{slot:"title",class:"heading"},"Cancel Invitation?"),r("div",{class:"content"},r("p",null,"Are you sure you want to cancel this invitation? This action cannot be undone."),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",disabled:this.submitting,label:"Cancel",onClick:function(){return e.deletingInvitation=null}}),r("verdocs-button",{size:"small",label:"OK",disabled:this.submitting,onClick:function(){return e.handleDeleteInvitation()}})))),this.resendingInvitation&&r("verdocs-dialog",{onExit:function(){return e.resendingInvitation=null}},r("div",{slot:"title",class:"heading"},"Resend Invitation?"),r("div",{class:"content"},r("p",null,"The user will receive an email reminder to join your organization."),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",disabled:this.submitting,label:"Cancel",onClick:function(){return e.resendingInvitation=null}}),r("verdocs-button",{size:"small",label:"OK",disabled:this.submitting,onClick:function(){return e.handleResendInvitation()}})))))};return e}());R.style=E;var D;(function(e){e.assertEqual=function(e){return e};function t(e){}e.assertIs=t;function n(e){throw new Error}e.assertNever=n;e.arrayToEnum=function(e){var t={};for(var n=0,r=e;n<r.length;n++){var i=r[n];t[i]=i}return t};e.getValidEnumValues=function(t){var n=e.objectKeys(t).filter((function(e){return typeof t[t[e]]!=="number"}));var r={};for(var i=0,a=n;i<a.length;i++){var s=a[i];r[s]=t[s]}return e.objectValues(r)};e.objectValues=function(t){return e.objectKeys(t).map((function(e){return t[e]}))};e.objectKeys=typeof Object.keys==="function"?function(e){return Object.keys(e)}:function(e){var t=[];for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){t.push(n)}}return t};e.find=function(e,t){for(var n=0,r=e;n<r.length;n++){var i=r[n];if(t(i))return i}return undefined};e.isInteger=typeof Number.isInteger==="function"?function(e){return Number.isInteger(e)}:function(e){return typeof e==="number"&&isFinite(e)&&Math.floor(e)===e};function r(e,t){if(t===void 0){t=" | "}return e.map((function(e){return typeof e==="string"?"'".concat(e,"'"):e})).join(t)}e.joinValues=r;e.jsonStringifyReplacer=function(e,t){if(typeof t==="bigint"){return t.toString()}return t}})(D||(D={}));var L;(function(e){e.mergeShapes=function(e,t){return __assign(__assign({},e),t)}})(L||(L={}));var U=D.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);var B=function(e){var t=typeof e;switch(t){case"undefined":return U.undefined;case"string":return U.string;case"number":return isNaN(e)?U.nan:U.number;case"boolean":return U.boolean;case"function":return U.function;case"bigint":return U.bigint;case"symbol":return U.symbol;case"object":if(Array.isArray(e)){return U.array}if(e===null){return U.null}if(e.then&&typeof e.then==="function"&&e.catch&&typeof e.catch==="function"){return U.promise}if(typeof Map!=="undefined"&&e instanceof Map){return U.map}if(typeof Set!=="undefined"&&e instanceof Set){return U.set}if(typeof Date!=="undefined"&&e instanceof Date){return U.date}return U.object;default:return U.unknown}};var V=D.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"]);var F=function(e){var t=JSON.stringify(e,null,2);return t.replace(/"([^"]+)":/g,"$1:")};var W=function(e){__extends(t,e);function t(t){var n=this.constructor;var r=e.call(this)||this;r.issues=[];r.addIssue=function(e){r.issues=__spreadArray(__spreadArray([],r.issues,true),[e],false)};r.addIssues=function(e){if(e===void 0){e=[]}r.issues=__spreadArray(__spreadArray([],r.issues,true),e,true)};var i=n.prototype;if(Object.setPrototypeOf){Object.setPrototypeOf(r,i)}else{r.__proto__=i}r.name="ZodError";r.issues=t;return r}Object.defineProperty(t.prototype,"errors",{get:function(){return this.issues},enumerable:false,configurable:true});t.prototype.format=function(e){var t=e||function(e){return e.message};var n={_errors:[]};var r=function(e){for(var i=0,a=e.issues;i<a.length;i++){var s=a[i];if(s.code==="invalid_union"){s.unionErrors.map(r)}else if(s.code==="invalid_return_type"){r(s.returnTypeError)}else if(s.code==="invalid_arguments"){r(s.argumentsError)}else if(s.path.length===0){n._errors.push(t(s))}else{var o=n;var u=0;while(u<s.path.length){var l=s.path[u];var c=u===s.path.length-1;if(!c){o[l]=o[l]||{_errors:[]}}else{o[l]=o[l]||{_errors:[]};o[l]._errors.push(t(s))}o=o[l];u++}}}};r(this);return n};t.assert=function(e){if(!(e instanceof t)){throw new Error("Not a ZodError: ".concat(e))}};t.prototype.toString=function(){return this.message};Object.defineProperty(t.prototype,"message",{get:function(){return JSON.stringify(this.issues,D.jsonStringifyReplacer,2)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isEmpty",{get:function(){return this.issues.length===0},enumerable:false,configurable:true});t.prototype.flatten=function(e){if(e===void 0){e=function(e){return e.message}}var t={};var n=[];for(var r=0,i=this.issues;r<i.length;r++){var a=i[r];if(a.path.length>0){t[a.path[0]]=t[a.path[0]]||[];t[a.path[0]].push(e(a))}else{n.push(e(a))}}return{formErrors:n,fieldErrors:t}};Object.defineProperty(t.prototype,"formErrors",{get:function(){return this.flatten()},enumerable:false,configurable:true});return t}(Error);W.create=function(e){var t=new W(e);return t};var q=function(e,t){var n;switch(e.code){case V.invalid_type:if(e.received===U.undefined){n="Required"}else{n="Expected ".concat(e.expected,", received ").concat(e.received)}break;case V.invalid_literal:n="Invalid literal value, expected ".concat(JSON.stringify(e.expected,D.jsonStringifyReplacer));break;case V.unrecognized_keys:n="Unrecognized key(s) in object: ".concat(D.joinValues(e.keys,", "));break;case V.invalid_union:n="Invalid input";break;case V.invalid_union_discriminator:n="Invalid discriminator value. Expected ".concat(D.joinValues(e.options));break;case V.invalid_enum_value:n="Invalid enum value. Expected ".concat(D.joinValues(e.options),", received '").concat(e.received,"'");break;case V.invalid_arguments:n="Invalid function arguments";break;case V.invalid_return_type:n="Invalid function return type";break;case V.invalid_date:n="Invalid date";break;case V.invalid_string:if(typeof e.validation==="object"){if("includes"in e.validation){n='Invalid input: must include "'.concat(e.validation.includes,'"');if(typeof e.validation.position==="number"){n="".concat(n," at one or more positions greater than or equal to ").concat(e.validation.position)}}else if("startsWith"in e.validation){n='Invalid input: must start with "'.concat(e.validation.startsWith,'"')}else if("endsWith"in e.validation){n='Invalid input: must end with "'.concat(e.validation.endsWith,'"')}else{D.assertNever(e.validation)}}else if(e.validation!=="regex"){n="Invalid ".concat(e.validation)}else{n="Invalid"}break;case V.too_small:if(e.type==="array")n="Array must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"more than"," ").concat(e.minimum," element(s)");else if(e.type==="string")n="String must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"over"," ").concat(e.minimum," character(s)");else if(e.type==="number")n="Number must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(e.minimum);else if(e.type==="date")n="Date must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(e.minimum)));else n="Invalid input";break;case V.too_big:if(e.type==="array")n="Array must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"less than"," ").concat(e.maximum," element(s)");else if(e.type==="string")n="String must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"under"," ").concat(e.maximum," character(s)");else if(e.type==="number")n="Number must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum);else if(e.type==="bigint")n="BigInt must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum);else if(e.type==="date")n="Date must be ".concat(e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(e.maximum)));else n="Invalid input";break;case V.custom:n="Invalid input";break;case V.invalid_intersection_types:n="Intersection results could not be merged";break;case V.not_multiple_of:n="Number must be a multiple of ".concat(e.multipleOf);break;case V.not_finite:n="Number must be finite";break;default:n=t.defaultError;D.assertNever(e)}return{message:n}};var H=q;function $(e){H=e}function J(){return H}var Y=function(e){var t=e.data,n=e.path,r=e.errorMaps,i=e.issueData;var a=__spreadArray(__spreadArray([],n,true),i.path||[],true);var s=__assign(__assign({},i),{path:a});if(i.message!==undefined){return __assign(__assign({},i),{path:a,message:i.message})}var o="";var u=r.filter((function(e){return!!e})).slice().reverse();for(var l=0,c=u;l<c.length;l++){var d=c[l];o=d(s,{data:t,defaultError:o}).message}return __assign(__assign({},i),{path:a,message:o})};var Q=[];function X(e,t){var n=J();var r=Y({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===q?undefined:q].filter((function(e){return!!e}))});e.common.issues.push(r)}var ee=function(){function e(){this.value="valid"}e.prototype.dirty=function(){if(this.value==="valid")this.value="dirty"};e.prototype.abort=function(){if(this.value!=="aborted")this.value="aborted"};e.mergeArray=function(e,t){var n=[];for(var r=0,i=t;r<i.length;r++){var a=i[r];if(a.status==="aborted")return te;if(a.status==="dirty")e.dirty();n.push(a.value)}return{status:e.value,value:n}};e.mergeObjectAsync=function(t,n){return __awaiter(this,void 0,void 0,(function(){var r,i,a,s,o,u;return __generator(this,(function(l){switch(l.label){case 0:r=[];i=0,a=n;l.label=1;case 1:if(!(i<a.length))return[3,5];s=a[i];return[4,s.key];case 2:o=l.sent();return[4,s.value];case 3:u=l.sent();r.push({key:o,value:u});l.label=4;case 4:i++;return[3,1];case 5:return[2,e.mergeObjectSync(t,r)]}}))}))};e.mergeObjectSync=function(e,t){var n={};for(var r=0,i=t;r<i.length;r++){var a=i[r];var s=a.key,o=a.value;if(s.status==="aborted")return te;if(o.status==="aborted")return te;if(s.status==="dirty")e.dirty();if(o.status==="dirty")e.dirty();if(s.value!=="__proto__"&&(typeof o.value!=="undefined"||a.alwaysSet)){n[s.value]=o.value}}return{status:e.value,value:n}};return e}();var te=Object.freeze({status:"aborted"});var ne=function(e){return{status:"dirty",value:e}};var re=function(e){return{status:"valid",value:e}};var ie=function(e){return e.status==="aborted"};var ae=function(e){return e.status==="dirty"};var se=function(e){return e.status==="valid"};var oe=function(e){return typeof Promise!=="undefined"&&e instanceof Promise};function ue(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function le(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t==="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n}typeof SuppressedError==="function"?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};var ce;(function(e){e.errToObj=function(e){return typeof e==="string"?{message:e}:e||{}};e.toString=function(e){return typeof e==="string"?e:e===null||e===void 0?void 0:e.message}})(ce||(ce={}));var de,fe;var pe=function(){function e(e,t,n,r){this._cachedPath=[];this.parent=e;this.data=t;this._path=n;this._key=r}Object.defineProperty(e.prototype,"path",{get:function(){var e,t;if(!this._cachedPath.length){if(this._key instanceof Array){(e=this._cachedPath).push.apply(e,__spreadArray(__spreadArray([],this._path,false),this._key,false))}else{(t=this._cachedPath).push.apply(t,__spreadArray(__spreadArray([],this._path,false),[this._key],false))}}return this._cachedPath},enumerable:false,configurable:true});return e}();var he=function(e,t){if(se(t)){return{success:true,data:t.value}}else{if(!e.common.issues.length){throw new Error("Validation failed but no issues detected.")}return{success:false,get error(){if(this._error)return this._error;var t=new W(e.common.issues);this._error=t;return this._error}}}};function ve(e){if(!e)return{};var t=e.errorMap,n=e.invalid_type_error,r=e.required_error,i=e.description;if(t&&(n||r)){throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.')}if(t)return{errorMap:t,description:i};var a=function(t,i){var a,s;var o=e.message;if(t.code==="invalid_enum_value"){return{message:o!==null&&o!==void 0?o:i.defaultError}}if(typeof i.data==="undefined"){return{message:(a=o!==null&&o!==void 0?o:r)!==null&&a!==void 0?a:i.defaultError}}if(t.code!=="invalid_type")return{message:i.defaultError};return{message:(s=o!==null&&o!==void 0?o:n)!==null&&s!==void 0?s:i.defaultError}};return{errorMap:a,description:i}}var me=function(){function e(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)}Object.defineProperty(e.prototype,"description",{get:function(){return this._def.description},enumerable:false,configurable:true});e.prototype._getType=function(e){return B(e.data)};e.prototype._getOrReturnCtx=function(e,t){return t||{common:e.parent.common,data:e.data,parsedType:B(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}};e.prototype._processInputParams=function(e){return{status:new ee,ctx:{common:e.parent.common,data:e.data,parsedType:B(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}};e.prototype._parseSync=function(e){var t=this._parse(e);if(oe(t)){throw new Error("Synchronous parse encountered promise.")}return t};e.prototype._parseAsync=function(e){var t=this._parse(e);return Promise.resolve(t)};e.prototype.parse=function(e,t){var n=this.safeParse(e,t);if(n.success)return n.data;throw n.error};e.prototype.safeParse=function(e,t){var n;var r={common:{issues:[],async:(n=t===null||t===void 0?void 0:t.async)!==null&&n!==void 0?n:false,contextualErrorMap:t===null||t===void 0?void 0:t.errorMap},path:(t===null||t===void 0?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)};var i=this._parseSync({data:e,path:r.path,parent:r});return he(r,i)};e.prototype.parseAsync=function(e,t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(r){switch(r.label){case 0:return[4,this.safeParseAsync(e,t)];case 1:n=r.sent();if(n.success)return[2,n.data];throw n.error}}))}))};e.prototype.safeParseAsync=function(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,i;return __generator(this,(function(a){switch(a.label){case 0:n={common:{issues:[],contextualErrorMap:t===null||t===void 0?void 0:t.errorMap,async:true},path:(t===null||t===void 0?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)};r=this._parse({data:e,path:n.path,parent:n});return[4,oe(r)?r:Promise.resolve(r)];case 1:i=a.sent();return[2,he(n,i)]}}))}))};e.prototype.refine=function(e,t){var n=function(e){if(typeof t==="string"||typeof t==="undefined"){return{message:t}}else if(typeof t==="function"){return t(e)}else{return t}};return this._refinement((function(t,r){var i=e(t);var a=function(){return r.addIssue(__assign({code:V.custom},n(t)))};if(typeof Promise!=="undefined"&&i instanceof Promise){return i.then((function(e){if(!e){a();return false}else{return true}}))}if(!i){a();return false}else{return true}}))};e.prototype.refinement=function(e,t){return this._refinement((function(n,r){if(!e(n)){r.addIssue(typeof t==="function"?t(n,r):t);return false}else{return true}}))};e.prototype._refinement=function(e){return new pt({schema:this,typeName:wt.ZodEffects,effect:{type:"refinement",refinement:e}})};e.prototype.superRefine=function(e){return this._refinement(e)};e.prototype.optional=function(){return ht.create(this,this._def)};e.prototype.nullable=function(){return vt.create(this,this._def)};e.prototype.nullish=function(){return this.nullable().optional()};e.prototype.array=function(){return He.create(this,this._def)};e.prototype.promise=function(){return ft.create(this,this._def)};e.prototype.or=function(e){return Ye.create([this,e],this._def)};e.prototype.and=function(e){return tt.create(this,e,this._def)};e.prototype.transform=function(e){return new pt(__assign(__assign({},ve(this._def)),{schema:this,typeName:wt.ZodEffects,effect:{type:"transform",transform:e}}))};e.prototype.default=function(e){var t=typeof e==="function"?e:function(){return e};return new mt(__assign(__assign({},ve(this._def)),{innerType:this,defaultValue:t,typeName:wt.ZodDefault}))};e.prototype.brand=function(){return new bt(__assign({typeName:wt.ZodBranded,type:this},ve(this._def)))};e.prototype.catch=function(e){var t=typeof e==="function"?e:function(){return e};return new gt(__assign(__assign({},ve(this._def)),{innerType:this,catchValue:t,typeName:wt.ZodCatch}))};e.prototype.describe=function(e){var t=this.constructor;return new t(__assign(__assign({},this._def),{description:e}))};e.prototype.pipe=function(e){return Tt.create(this,e)};e.prototype.readonly=function(){return kt.create(this)};e.prototype.isOptional=function(){return this.safeParse(undefined).success};e.prototype.isNullable=function(){return this.safeParse(null).success};return e}();var ge=/^c[^\s-]{8,}$/i;var _e=/^[0-9a-z]+$/;var ye=/^[0-9A-HJKMNP-TV-Z]{26}$/;var be=/^[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;var Te=/^[a-z0-9_-]{21}$/i;var ke=/^[-+]?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)?)??$/;var xe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;var Me="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";var we;var Ge=/^(?:(?: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])$/;var Ie=/^(([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})))$/;var Se=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;var Ce="((\\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])))";var Ae=new RegExp("^".concat(Ce,"$"));function Pe(e){var t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";if(e.precision){t="".concat(t,"\\.\\d{").concat(e.precision,"}")}else if(e.precision==null){t="".concat(t,"(\\.\\d+)?")}return t}function je(e){return new RegExp("^".concat(Pe(e),"$"))}function Oe(e){var t="".concat(Ce,"T").concat(Pe(e));var n=[];n.push(e.local?"Z?":"Z");if(e.offset)n.push("([+-]\\d{2}:?\\d{2})");t="".concat(t,"(").concat(n.join("|"),")");return new RegExp("^".concat(t,"$"))}function Ee(e,t){if((t==="v4"||!t)&&Ge.test(e)){return true}if((t==="v6"||!t)&&Ie.test(e)){return true}return false}var Ze=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){if(this._def.coerce){e.data=String(e.data)}var t=this._getType(e);if(t!==U.string){var n=this._getOrReturnCtx(e);X(n,{code:V.invalid_type,expected:U.string,received:n.parsedType});return te}var r=new ee;var i=undefined;for(var a=0,s=this._def.checks;a<s.length;a++){var o=s[a];if(o.kind==="min"){if(e.data.length<o.value){i=this._getOrReturnCtx(e,i);X(i,{code:V.too_small,minimum:o.value,type:"string",inclusive:true,exact:false,message:o.message});r.dirty()}}else if(o.kind==="max"){if(e.data.length>o.value){i=this._getOrReturnCtx(e,i);X(i,{code:V.too_big,maximum:o.value,type:"string",inclusive:true,exact:false,message:o.message});r.dirty()}}else if(o.kind==="length"){var u=e.data.length>o.value;var l=e.data.length<o.value;if(u||l){i=this._getOrReturnCtx(e,i);if(u){X(i,{code:V.too_big,maximum:o.value,type:"string",inclusive:true,exact:true,message:o.message})}else if(l){X(i,{code:V.too_small,minimum:o.value,type:"string",inclusive:true,exact:true,message:o.message})}r.dirty()}}else if(o.kind==="email"){if(!xe.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"email",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="emoji"){if(!we){we=new RegExp(Me,"u")}if(!we.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"emoji",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="uuid"){if(!be.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"uuid",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="nanoid"){if(!Te.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"nanoid",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="cuid"){if(!ge.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"cuid",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="cuid2"){if(!_e.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"cuid2",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="ulid"){if(!ye.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"ulid",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="url"){try{new URL(e.data)}catch(t){i=this._getOrReturnCtx(e,i);X(i,{validation:"url",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="regex"){o.regex.lastIndex=0;var c=o.regex.test(e.data);if(!c){i=this._getOrReturnCtx(e,i);X(i,{validation:"regex",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="trim"){e.data=e.data.trim()}else if(o.kind==="includes"){if(!e.data.includes(o.value,o.position)){i=this._getOrReturnCtx(e,i);X(i,{code:V.invalid_string,validation:{includes:o.value,position:o.position},message:o.message});r.dirty()}}else if(o.kind==="toLowerCase"){e.data=e.data.toLowerCase()}else if(o.kind==="toUpperCase"){e.data=e.data.toUpperCase()}else if(o.kind==="startsWith"){if(!e.data.startsWith(o.value)){i=this._getOrReturnCtx(e,i);X(i,{code:V.invalid_string,validation:{startsWith:o.value},message:o.message});r.dirty()}}else if(o.kind==="endsWith"){if(!e.data.endsWith(o.value)){i=this._getOrReturnCtx(e,i);X(i,{code:V.invalid_string,validation:{endsWith:o.value},message:o.message});r.dirty()}}else if(o.kind==="datetime"){var d=Oe(o);if(!d.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{code:V.invalid_string,validation:"datetime",message:o.message});r.dirty()}}else if(o.kind==="date"){var d=Ae;if(!d.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{code:V.invalid_string,validation:"date",message:o.message});r.dirty()}}else if(o.kind==="time"){var d=je(o);if(!d.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{code:V.invalid_string,validation:"time",message:o.message});r.dirty()}}else if(o.kind==="duration"){if(!ke.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"duration",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="ip"){if(!Ee(e.data,o.version)){i=this._getOrReturnCtx(e,i);X(i,{validation:"ip",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="base64"){if(!Se.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"base64",code:V.invalid_string,message:o.message});r.dirty()}}else{D.assertNever(o)}}return{status:r.value,value:e.data}};t.prototype._regex=function(e,t,n){return this.refinement((function(t){return e.test(t)}),__assign({validation:t,code:V.invalid_string},ce.errToObj(n)))};t.prototype._addCheck=function(e){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[e],false)}))};t.prototype.email=function(e){return this._addCheck(__assign({kind:"email"},ce.errToObj(e)))};t.prototype.url=function(e){return this._addCheck(__assign({kind:"url"},ce.errToObj(e)))};t.prototype.emoji=function(e){return this._addCheck(__assign({kind:"emoji"},ce.errToObj(e)))};t.prototype.uuid=function(e){return this._addCheck(__assign({kind:"uuid"},ce.errToObj(e)))};t.prototype.nanoid=function(e){return this._addCheck(__assign({kind:"nanoid"},ce.errToObj(e)))};t.prototype.cuid=function(e){return this._addCheck(__assign({kind:"cuid"},ce.errToObj(e)))};t.prototype.cuid2=function(e){return this._addCheck(__assign({kind:"cuid2"},ce.errToObj(e)))};t.prototype.ulid=function(e){return this._addCheck(__assign({kind:"ulid"},ce.errToObj(e)))};t.prototype.base64=function(e){return this._addCheck(__assign({kind:"base64"},ce.errToObj(e)))};t.prototype.ip=function(e){return this._addCheck(__assign({kind:"ip"},ce.errToObj(e)))};t.prototype.datetime=function(e){var t,n;if(typeof e==="string"){return this._addCheck({kind:"datetime",precision:null,offset:false,local:false,message:e})}return this._addCheck(__assign({kind:"datetime",precision:typeof(e===null||e===void 0?void 0:e.precision)==="undefined"?null:e===null||e===void 0?void 0:e.precision,offset:(t=e===null||e===void 0?void 0:e.offset)!==null&&t!==void 0?t:false,local:(n=e===null||e===void 0?void 0:e.local)!==null&&n!==void 0?n:false},ce.errToObj(e===null||e===void 0?void 0:e.message)))};t.prototype.date=function(e){return this._addCheck({kind:"date",message:e})};t.prototype.time=function(e){if(typeof e==="string"){return this._addCheck({kind:"time",precision:null,message:e})}return this._addCheck(__assign({kind:"time",precision:typeof(e===null||e===void 0?void 0:e.precision)==="undefined"?null:e===null||e===void 0?void 0:e.precision},ce.errToObj(e===null||e===void 0?void 0:e.message)))};t.prototype.duration=function(e){return this._addCheck(__assign({kind:"duration"},ce.errToObj(e)))};t.prototype.regex=function(e,t){return this._addCheck(__assign({kind:"regex",regex:e},ce.errToObj(t)))};t.prototype.includes=function(e,t){return this._addCheck(__assign({kind:"includes",value:e,position:t===null||t===void 0?void 0:t.position},ce.errToObj(t===null||t===void 0?void 0:t.message)))};t.prototype.startsWith=function(e,t){return this._addCheck(__assign({kind:"startsWith",value:e},ce.errToObj(t)))};t.prototype.endsWith=function(e,t){return this._addCheck(__assign({kind:"endsWith",value:e},ce.errToObj(t)))};t.prototype.min=function(e,t){return this._addCheck(__assign({kind:"min",value:e},ce.errToObj(t)))};t.prototype.max=function(e,t){return this._addCheck(__assign({kind:"max",value:e},ce.errToObj(t)))};t.prototype.length=function(e,t){return this._addCheck(__assign({kind:"length",value:e},ce.errToObj(t)))};t.prototype.nonempty=function(e){return this.min(1,ce.errToObj(e))};t.prototype.trim=function(){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[{kind:"trim"}],false)}))};t.prototype.toLowerCase=function(){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[{kind:"toLowerCase"}],false)}))};t.prototype.toUpperCase=function(){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[{kind:"toUpperCase"}],false)}))};Object.defineProperty(t.prototype,"isDatetime",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="datetime"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isDate",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="date"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isTime",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="time"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isDuration",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="duration"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isEmail",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="email"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isURL",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="url"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isEmoji",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="emoji"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isUUID",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="uuid"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isNANOID",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="nanoid"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isCUID",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="cuid"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isCUID2",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="cuid2"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isULID",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="ulid"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isIP",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="ip"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isBase64",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="base64"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"minLength",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="min"){if(e===null||r.value>e)e=r.value}}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"maxLength",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="max"){if(e===null||r.value<e)e=r.value}}return e},enumerable:false,configurable:true});return t}(me);Ze.create=function(e){var t;return new Ze(__assign({checks:[],typeName:wt.ZodString,coerce:(t=e===null||e===void 0?void 0:e.coerce)!==null&&t!==void 0?t:false},ve(e)))};function Ne(e,t){var n=(e.toString().split(".")[1]||"").length;var r=(t.toString().split(".")[1]||"").length;var i=n>r?n:r;var a=parseInt(e.toFixed(i).replace(".",""));var s=parseInt(t.toFixed(i).replace(".",""));return a%s/Math.pow(10,i)}var ze=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t.min=t.gte;t.max=t.lte;t.step=t.multipleOf;return t}t.prototype._parse=function(e){if(this._def.coerce){e.data=Number(e.data)}var t=this._getType(e);if(t!==U.number){var n=this._getOrReturnCtx(e);X(n,{code:V.invalid_type,expected:U.number,received:n.parsedType});return te}var r=undefined;var i=new ee;for(var a=0,s=this._def.checks;a<s.length;a++){var o=s[a];if(o.kind==="int"){if(!D.isInteger(e.data)){r=this._getOrReturnCtx(e,r);X(r,{code:V.invalid_type,expected:"integer",received:"float",message:o.message});i.dirty()}}else if(o.kind==="min"){var u=o.inclusive?e.data<o.value:e.data<=o.value;if(u){r=this._getOrReturnCtx(e,r);X(r,{code:V.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:false,message:o.message});i.dirty()}}else if(o.kind==="max"){var l=o.inclusive?e.data>o.value:e.data>=o.value;if(l){r=this._getOrReturnCtx(e,r);X(r,{code:V.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:false,message:o.message});i.dirty()}}else if(o.kind==="multipleOf"){if(Ne(e.data,o.value)!==0){r=this._getOrReturnCtx(e,r);X(r,{code:V.not_multiple_of,multipleOf:o.value,message:o.message});i.dirty()}}else if(o.kind==="finite"){if(!Number.isFinite(e.data)){r=this._getOrReturnCtx(e,r);X(r,{code:V.not_finite,message:o.message});i.dirty()}}else{D.assertNever(o)}}return{status:i.value,value:e.data}};t.prototype.gte=function(e,t){return this.setLimit("min",e,true,ce.toString(t))};t.prototype.gt=function(e,t){return this.setLimit("min",e,false,ce.toString(t))};t.prototype.lte=function(e,t){return this.setLimit("max",e,true,ce.toString(t))};t.prototype.lt=function(e,t){return this.setLimit("max",e,false,ce.toString(t))};t.prototype.setLimit=function(e,n,r,i){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[{kind:e,value:n,inclusive:r,message:ce.toString(i)}],false)}))};t.prototype._addCheck=function(e){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[e],false)}))};t.prototype.int=function(e){return this._addCheck({kind:"int",message:ce.toString(e)})};t.prototype.positive=function(e){return this._addCheck({kind:"min",value:0,inclusive:false,message:ce.toString(e)})};t.prototype.negative=function(e){return this._addCheck({kind:"max",value:0,inclusive:false,message:ce.toString(e)})};t.prototype.nonpositive=function(e){return this._addCheck({kind:"max",value:0,inclusive:true,message:ce.toString(e)})};t.prototype.nonnegative=function(e){return this._addCheck({kind:"min",value:0,inclusive:true,message:ce.toString(e)})};t.prototype.multipleOf=function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ce.toString(t)})};t.prototype.finite=function(e){return this._addCheck({kind:"finite",message:ce.toString(e)})};t.prototype.safe=function(e){return this._addCheck({kind:"min",inclusive:true,value:Number.MIN_SAFE_INTEGER,message:ce.toString(e)})._addCheck({kind:"max",inclusive:true,value:Number.MAX_SAFE_INTEGER,message:ce.toString(e)})};Object.defineProperty(t.prototype,"minValue",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="min"){if(e===null||r.value>e)e=r.value}}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"maxValue",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="max"){if(e===null||r.value<e)e=r.value}}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isInt",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="int"||e.kind==="multipleOf"&&D.isInteger(e.value)}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isFinite",{get:function(){var e=null,t=null;for(var n=0,r=this._def.checks;n<r.length;n++){var i=r[n];if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf"){return true}else if(i.kind==="min"){if(t===null||i.value>t)t=i.value}else if(i.kind==="max"){if(e===null||i.value<e)e=i.value}}return Number.isFinite(t)&&Number.isFinite(e)},enumerable:false,configurable:true});return t}(me);ze.create=function(e){return new ze(__assign({checks:[],typeName:wt.ZodNumber,coerce:(e===null||e===void 0?void 0:e.coerce)||false},ve(e)))};var Ke=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t.min=t.gte;t.max=t.lte;return t}t.prototype._parse=function(e){if(this._def.coerce){e.data=BigInt(e.data)}var t=this._getType(e);if(t!==U.bigint){var n=this._getOrReturnCtx(e);X(n,{code:V.invalid_type,expected:U.bigint,received:n.parsedType});return te}var r=undefined;var i=new ee;for(var a=0,s=this._def.checks;a<s.length;a++){var o=s[a];if(o.kind==="min"){var u=o.inclusive?e.data<o.value:e.data<=o.value;if(u){r=this._getOrReturnCtx(e,r);X(r,{code:V.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message});i.dirty()}}else if(o.kind==="max"){var l=o.inclusive?e.data>o.value:e.data>=o.value;if(l){r=this._getOrReturnCtx(e,r);X(r,{code:V.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message});i.dirty()}}else if(o.kind==="multipleOf"){if(e.data%o.value!==BigInt(0)){r=this._getOrReturnCtx(e,r);X(r,{code:V.not_multiple_of,multipleOf:o.value,message:o.message});i.dirty()}}else{D.assertNever(o)}}return{status:i.value,value:e.data}};t.prototype.gte=function(e,t){return this.setLimit("min",e,true,ce.toString(t))};t.prototype.gt=function(e,t){return this.setLimit("min",e,false,ce.toString(t))};t.prototype.lte=function(e,t){return this.setLimit("max",e,true,ce.toString(t))};t.prototype.lt=function(e,t){return this.setLimit("max",e,false,ce.toString(t))};t.prototype.setLimit=function(e,n,r,i){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[{kind:e,value:n,inclusive:r,message:ce.toString(i)}],false)}))};t.prototype._addCheck=function(e){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[e],false)}))};t.prototype.positive=function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:false,message:ce.toString(e)})};t.prototype.negative=function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:false,message:ce.toString(e)})};t.prototype.nonpositive=function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:true,message:ce.toString(e)})};t.prototype.nonnegative=function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:true,message:ce.toString(e)})};t.prototype.multipleOf=function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ce.toString(t)})};Object.defineProperty(t.prototype,"minValue",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="min"){if(e===null||r.value>e)e=r.value}}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"maxValue",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="max"){if(e===null||r.value<e)e=r.value}}return e},enumerable:false,configurable:true});return t}(me);Ke.create=function(e){var t;return new Ke(__assign({checks:[],typeName:wt.ZodBigInt,coerce:(t=e===null||e===void 0?void 0:e.coerce)!==null&&t!==void 0?t:false},ve(e)))};var Re=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){if(this._def.coerce){e.data=Boolean(e.data)}var t=this._getType(e);if(t!==U.boolean){var n=this._getOrReturnCtx(e);X(n,{code:V.invalid_type,expected:U.boolean,received:n.parsedType});return te}return re(e.data)};return t}(me);Re.create=function(e){return new Re(__assign({typeName:wt.ZodBoolean,coerce:(e===null||e===void 0?void 0:e.coerce)||false},ve(e)))};var De=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){if(this._def.coerce){e.data=new Date(e.data)}var t=this._getType(e);if(t!==U.date){var n=this._getOrReturnCtx(e);X(n,{code:V.invalid_type,expected:U.date,received:n.parsedType});return te}if(isNaN(e.data.getTime())){var r=this._getOrReturnCtx(e);X(r,{code:V.invalid_date});return te}var i=new ee;var a=undefined;for(var s=0,o=this._def.checks;s<o.length;s++){var u=o[s];if(u.kind==="min"){if(e.data.getTime()<u.value){a=this._getOrReturnCtx(e,a);X(a,{code:V.too_small,message:u.message,inclusive:true,exact:false,minimum:u.value,type:"date"});i.dirty()}}else if(u.kind==="max"){if(e.data.getTime()>u.value){a=this._getOrReturnCtx(e,a);X(a,{code:V.too_big,message:u.message,inclusive:true,exact:false,maximum:u.value,type:"date"});i.dirty()}}else{D.assertNever(u)}}return{status:i.value,value:new Date(e.data.getTime())}};t.prototype._addCheck=function(e){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[e],false)}))};t.prototype.min=function(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:ce.toString(t)})};t.prototype.max=function(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:ce.toString(t)})};Object.defineProperty(t.prototype,"minDate",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="min"){if(e===null||r.value>e)e=r.value}}return e!=null?new Date(e):null},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"maxDate",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="max"){if(e===null||r.value<e)e=r.value}}return e!=null?new Date(e):null},enumerable:false,configurable:true});return t}(me);De.create=function(e){return new De(__assign({checks:[],coerce:(e===null||e===void 0?void 0:e.coerce)||false,typeName:wt.ZodDate},ve(e)))};var Le=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t!==U.symbol){var n=this._getOrReturnCtx(e);X(n,{code:V.invalid_type,expected:U.symbol,received:n.parsedType});return te}return re(e.data)};return t}(me);Le.create=function(e){return new Le(__assign({typeName:wt.ZodSymbol},ve(e)))};var Ue=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t!==U.undefined){var n=this._getOrReturnCtx(e);X(n,{code:V.invalid_type,expected:U.undefined,received:n.parsedType});return te}return re(e.data)};return t}(me);Ue.create=function(e){return new Ue(__assign({typeName:wt.ZodUndefined},ve(e)))};var Be=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t!==U.null){var n=this._getOrReturnCtx(e);X(n,{code:V.invalid_type,expected:U.null,received:n.parsedType});return te}return re(e.data)};return t}(me);Be.create=function(e){return new Be(__assign({typeName:wt.ZodNull},ve(e)))};var Ve=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t._any=true;return t}t.prototype._parse=function(e){return re(e.data)};return t}(me);Ve.create=function(e){return new Ve(__assign({typeName:wt.ZodAny},ve(e)))};var Fe=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t._unknown=true;return t}t.prototype._parse=function(e){return re(e.data)};return t}(me);Fe.create=function(e){return new Fe(__assign({typeName:wt.ZodUnknown},ve(e)))};var We=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getOrReturnCtx(e);X(t,{code:V.invalid_type,expected:U.never,received:t.parsedType});return te};return t}(me);We.create=function(e){return new We(__assign({typeName:wt.ZodNever},ve(e)))};var qe=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t!==U.undefined){var n=this._getOrReturnCtx(e);X(n,{code:V.invalid_type,expected:U.void,received:n.parsedType});return te}return re(e.data)};return t}(me);qe.create=function(e){return new qe(__assign({typeName:wt.ZodVoid},ve(e)))};var He=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._processInputParams(e),n=t.ctx,r=t.status;var i=this._def;if(n.parsedType!==U.array){X(n,{code:V.invalid_type,expected:U.array,received:n.parsedType});return te}if(i.exactLength!==null){var a=n.data.length>i.exactLength.value;var s=n.data.length<i.exactLength.value;if(a||s){X(n,{code:a?V.too_big:V.too_small,minimum:s?i.exactLength.value:undefined,maximum:a?i.exactLength.value:undefined,type:"array",inclusive:true,exact:true,message:i.exactLength.message});r.dirty()}}if(i.minLength!==null){if(n.data.length<i.minLength.value){X(n,{code:V.too_small,minimum:i.minLength.value,type:"array",inclusive:true,exact:false,message:i.minLength.message});r.dirty()}}if(i.maxLength!==null){if(n.data.length>i.maxLength.value){X(n,{code:V.too_big,maximum:i.maxLength.value,type:"array",inclusive:true,exact:false,message:i.maxLength.message});r.dirty()}}if(n.common.async){return Promise.all(__spreadArray([],n.data,true).map((function(e,t){return i.type._parseAsync(new pe(n,e,n.path,t))}))).then((function(e){return ee.mergeArray(r,e)}))}var o=__spreadArray([],n.data,true).map((function(e,t){return i.type._parseSync(new pe(n,e,n.path,t))}));return ee.mergeArray(r,o)};Object.defineProperty(t.prototype,"element",{get:function(){return this._def.type},enumerable:false,configurable:true});t.prototype.min=function(e,n){return new t(__assign(__assign({},this._def),{minLength:{value:e,message:ce.toString(n)}}))};t.prototype.max=function(e,n){return new t(__assign(__assign({},this._def),{maxLength:{value:e,message:ce.toString(n)}}))};t.prototype.length=function(e,n){return new t(__assign(__assign({},this._def),{exactLength:{value:e,message:ce.toString(n)}}))};t.prototype.nonempty=function(e){return this.min(1,e)};return t}(me);He.create=function(e,t){return new He(__assign({type:e,minLength:null,maxLength:null,exactLength:null,typeName:wt.ZodArray},ve(t)))};function $e(e){if(e instanceof Je){var t={};for(var n in e.shape){var r=e.shape[n];t[n]=ht.create($e(r))}return new Je(__assign(__assign({},e._def),{shape:function(){return t}}))}else if(e instanceof He){return new He(__assign(__assign({},e._def),{type:$e(e.element)}))}else if(e instanceof ht){return ht.create($e(e.unwrap()))}else if(e instanceof vt){return vt.create($e(e.unwrap()))}else if(e instanceof nt){return nt.create(e.items.map((function(e){return $e(e)})))}else{return e}}var Je=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t._cached=null;t.nonstrict=t.passthrough;t.augment=t.extend;return t}t.prototype._getCached=function(){if(this._cached!==null)return this._cached;var e=this._def.shape();var t=D.objectKeys(e);return this._cached={shape:e,keys:t}};t.prototype._parse=function(e){var t=this;var n=this._getType(e);if(n!==U.object){var r=this._getOrReturnCtx(e);X(r,{code:V.invalid_type,expected:U.object,received:r.parsedType});return te}var i=this._processInputParams(e),a=i.status,s=i.ctx;var o=this._getCached(),u=o.shape,l=o.keys;var c=[];if(!(this._def.catchall instanceof We&&this._def.unknownKeys==="strip")){for(var d in s.data){if(!l.includes(d)){c.push(d)}}}var f=[];for(var p=0,h=l;p<h.length;p++){var d=h[p];var v=u[d];var m=s.data[d];f.push({key:{status:"valid",value:d},value:v._parse(new pe(s,m,s.path,d)),alwaysSet:d in s.data})}if(this._def.catchall instanceof We){var g=this._def.unknownKeys;if(g==="passthrough"){for(var _=0,y=c;_<y.length;_++){var d=y[_];f.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}})}}else if(g==="strict"){if(c.length>0){X(s,{code:V.unrecognized_keys,keys:c});a.dirty()}}else if(g==="strip");else{throw new Error("Internal ZodObject error: invalid unknownKeys value.")}}else{var b=this._def.catchall;for(var T=0,k=c;T<k.length;T++){var d=k[T];var m=s.data[d];f.push({key:{status:"valid",value:d},value:b._parse(new pe(s,m,s.path,d)),alwaysSet:d in s.data})}}if(s.common.async){return Promise.resolve().then((function(){return __awaiter(t,void 0,void 0,(function(){var e,t,n,r,i,a;return __generator(this,(function(s){switch(s.label){case 0:e=[];t=0,n=f;s.label=1;case 1:if(!(t<n.length))return[3,5];r=n[t];return[4,r.key];case 2:i=s.sent();return[4,r.value];case 3:a=s.sent();e.push({key:i,value:a,alwaysSet:r.alwaysSet});s.label=4;case 4:t++;return[3,1];case 5:return[2,e]}}))}))})).then((function(e){return ee.mergeObjectSync(a,e)}))}else{return ee.mergeObjectSync(a,f)}};Object.defineProperty(t.prototype,"shape",{get:function(){return this._def.shape()},enumerable:false,configurable:true});t.prototype.strict=function(e){var n=this;return new t(__assign(__assign(__assign({},this._def),{unknownKeys:"strict"}),e!==undefined?{errorMap:function(t,r){var i,a,s,o;var u=(s=(a=(i=n._def).errorMap)===null||a===void 0?void 0:a.call(i,t,r).message)!==null&&s!==void 0?s:r.defaultError;if(t.code==="unrecognized_keys")return{message:(o=ce.errToObj(e).message)!==null&&o!==void 0?o:u};return{message:u}}}:{}))};t.prototype.strip=function(){return new t(__assign(__assign({},this._def),{unknownKeys:"strip"}))};t.prototype.passthrough=function(){return new t(__assign(__assign({},this._def),{unknownKeys:"passthrough"}))};t.prototype.extend=function(e){var n=this;return new t(__assign(__assign({},this._def),{shape:function(){return __assign(__assign({},n._def.shape()),e)}}))};t.prototype.merge=function(e){var n=this;var r=new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:function(){return __assign(__assign({},n._def.shape()),e._def.shape())},typeName:wt.ZodObject});return r};t.prototype.setKey=function(e,t){var n;return this.augment((n={},n[e]=t,n))};t.prototype.catchall=function(e){return new t(__assign(__assign({},this._def),{catchall:e}))};t.prototype.pick=function(e){var n=this;var r={};D.objectKeys(e).forEach((function(t){if(e[t]&&n.shape[t]){r[t]=n.shape[t]}}));return new t(__assign(__assign({},this._def),{shape:function(){return r}}))};t.prototype.omit=function(e){var n=this;var r={};D.objectKeys(this.shape).forEach((function(t){if(!e[t]){r[t]=n.shape[t]}}));return new t(__assign(__assign({},this._def),{shape:function(){return r}}))};t.prototype.deepPartial=function(){return $e(this)};t.prototype.partial=function(e){var n=this;var r={};D.objectKeys(this.shape).forEach((function(t){var i=n.shape[t];if(e&&!e[t]){r[t]=i}else{r[t]=i.optional()}}));return new t(__assign(__assign({},this._def),{shape:function(){return r}}))};t.prototype.required=function(e){var n=this;var r={};D.objectKeys(this.shape).forEach((function(t){if(e&&!e[t]){r[t]=n.shape[t]}else{var i=n.shape[t];var a=i;while(a instanceof ht){a=a._def.innerType}r[t]=a}}));return new t(__assign(__assign({},this._def),{shape:function(){return r}}))};t.prototype.keyof=function(){return lt(D.objectKeys(this.shape))};return t}(me);Je.create=function(e,t){return new Je(__assign({shape:function(){return e},unknownKeys:"strip",catchall:We.create(),typeName:wt.ZodObject},ve(t)))};Je.strictCreate=function(e,t){return new Je(__assign({shape:function(){return e},unknownKeys:"strict",catchall:We.create(),typeName:wt.ZodObject},ve(t)))};Je.lazycreate=function(e,t){return new Je(__assign({shape:e,unknownKeys:"strip",catchall:We.create(),typeName:wt.ZodObject},ve(t)))};var Ye=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t;var n=this;var r=this._processInputParams(e).ctx;var i=this._def.options;function a(e){var t;for(var n=0,i=e;n<i.length;n++){var a=i[n];if(a.result.status==="valid"){return a.result}}for(var s=0,o=e;s<o.length;s++){var a=o[s];if(a.result.status==="dirty"){(t=r.common.issues).push.apply(t,a.ctx.common.issues);return a.result}}var u=e.map((function(e){return new W(e.ctx.common.issues)}));X(r,{code:V.invalid_union,unionErrors:u});return te}if(r.common.async){return Promise.all(i.map((function(e){return __awaiter(n,void 0,void 0,(function(){var t;var n;return __generator(this,(function(i){switch(i.label){case 0:t=__assign(__assign({},r),{common:__assign(__assign({},r.common),{issues:[]}),parent:null});n={};return[4,e._parseAsync({data:r.data,path:r.path,parent:t})];case 1:return[2,(n.result=i.sent(),n.ctx=t,n)]}}))}))}))).then(a)}else{var s=undefined;var o=[];for(var u=0,l=i;u<l.length;u++){var c=l[u];var d=__assign(__assign({},r),{common:__assign(__assign({},r.common),{issues:[]}),parent:null});var f=c._parseSync({data:r.data,path:r.path,parent:d});if(f.status==="valid"){return f}else if(f.status==="dirty"&&!s){s={result:f,ctx:d}}if(d.common.issues.length){o.push(d.common.issues)}}if(s){(t=r.common.issues).push.apply(t,s.ctx.common.issues);return s.result}var p=o.map((function(e){return new W(e)}));X(r,{code:V.invalid_union,unionErrors:p});return te}};Object.defineProperty(t.prototype,"options",{get:function(){return this._def.options},enumerable:false,configurable:true});return t}(me);Ye.create=function(e,t){return new Ye(__assign({options:e,typeName:wt.ZodUnion},ve(t)))};var Qe=function(e){if(e instanceof ot){return Qe(e.schema)}else if(e instanceof pt){return Qe(e.innerType())}else if(e instanceof ut){return[e.value]}else if(e instanceof ct){return e.options}else if(e instanceof dt){return D.objectValues(e.enum)}else if(e instanceof mt){return Qe(e._def.innerType)}else if(e instanceof Ue){return[undefined]}else if(e instanceof Be){return[null]}else if(e instanceof ht){return __spreadArray([undefined],Qe(e.unwrap()),true)}else if(e instanceof vt){return __spreadArray([null],Qe(e.unwrap()),true)}else if(e instanceof bt){return Qe(e.unwrap())}else if(e instanceof kt){return Qe(e.unwrap())}else if(e instanceof gt){return Qe(e._def.innerType)}else{return[]}};var Xe=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==U.object){X(t,{code:V.invalid_type,expected:U.object,received:t.parsedType});return te}var n=this.discriminator;var r=t.data[n];var i=this.optionsMap.get(r);if(!i){X(t,{code:V.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]});return te}if(t.common.async){return i._parseAsync({data:t.data,path:t.path,parent:t})}else{return i._parseSync({data:t.data,path:t.path,parent:t})}};Object.defineProperty(t.prototype,"discriminator",{get:function(){return this._def.discriminator},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"options",{get:function(){return this._def.options},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"optionsMap",{get:function(){return this._def.optionsMap},enumerable:false,configurable:true});t.create=function(e,n,r){var i=new Map;for(var a=0,s=n;a<s.length;a++){var o=s[a];var u=Qe(o.shape[e]);if(!u.length){throw new Error("A discriminator value for key `".concat(e,"` could not be extracted from all schema options"))}for(var l=0,c=u;l<c.length;l++){var d=c[l];if(i.has(d)){throw new Error("Discriminator property ".concat(String(e)," has duplicate value ").concat(String(d)))}i.set(d,o)}}return new t(__assign({typeName:wt.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i},ve(r)))};return t}(me);function et(e,t){var n=B(e);var r=B(t);if(e===t){return{valid:true,data:e}}else if(n===U.object&&r===U.object){var i=D.objectKeys(t);var a=D.objectKeys(e).filter((function(e){return i.indexOf(e)!==-1}));var s=__assign(__assign({},e),t);for(var o=0,u=a;o<u.length;o++){var l=u[o];var c=et(e[l],t[l]);if(!c.valid){return{valid:false}}s[l]=c.data}return{valid:true,data:s}}else if(n===U.array&&r===U.array){if(e.length!==t.length){return{valid:false}}var d=[];for(var f=0;f<e.length;f++){var p=e[f];var h=t[f];var c=et(p,h);if(!c.valid){return{valid:false}}d.push(c.data)}return{valid:true,data:d}}else if(n===U.date&&r===U.date&&+e===+t){return{valid:true,data:e}}else{return{valid:false}}}var tt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;var i=function(e,t){if(ie(e)||ie(t)){return te}var i=et(e.value,t.value);if(!i.valid){X(r,{code:V.invalid_intersection_types});return te}if(ae(e)||ae(t)){n.dirty()}return{status:n.value,value:i.data}};if(r.common.async){return Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then((function(e){var t=e[0],n=e[1];return i(t,n)}))}else{return i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};return t}(me);tt.create=function(e,t,n){return new tt(__assign({left:e,right:t,typeName:wt.ZodIntersection},ve(n)))};var nt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this;var n=this._processInputParams(e),r=n.status,i=n.ctx;if(i.parsedType!==U.array){X(i,{code:V.invalid_type,expected:U.array,received:i.parsedType});return te}if(i.data.length<this._def.items.length){X(i,{code:V.too_small,minimum:this._def.items.length,inclusive:true,exact:false,type:"array"});return te}var a=this._def.rest;if(!a&&i.data.length>this._def.items.length){X(i,{code:V.too_big,maximum:this._def.items.length,inclusive:true,exact:false,type:"array"});r.dirty()}var s=__spreadArray([],i.data,true).map((function(e,n){var r=t._def.items[n]||t._def.rest;if(!r)return null;return r._parse(new pe(i,e,i.path,n))})).filter((function(e){return!!e}));if(i.common.async){return Promise.all(s).then((function(e){return ee.mergeArray(r,e)}))}else{return ee.mergeArray(r,s)}};Object.defineProperty(t.prototype,"items",{get:function(){return this._def.items},enumerable:false,configurable:true});t.prototype.rest=function(e){return new t(__assign(__assign({},this._def),{rest:e}))};return t}(me);nt.create=function(e,t){if(!Array.isArray(e)){throw new Error("You must pass an array of schemas to z.tuple([ ... ])")}return new nt(__assign({items:e,typeName:wt.ZodTuple,rest:null},ve(t)))};var rt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}Object.defineProperty(t.prototype,"keySchema",{get:function(){return this._def.keyType},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"valueSchema",{get:function(){return this._def.valueType},enumerable:false,configurable:true});t.prototype._parse=function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==U.object){X(r,{code:V.invalid_type,expected:U.object,received:r.parsedType});return te}var i=[];var a=this._def.keyType;var s=this._def.valueType;for(var o in r.data){i.push({key:a._parse(new pe(r,o,r.path,o)),value:s._parse(new pe(r,r.data[o],r.path,o)),alwaysSet:o in r.data})}if(r.common.async){return ee.mergeObjectAsync(n,i)}else{return ee.mergeObjectSync(n,i)}};Object.defineProperty(t.prototype,"element",{get:function(){return this._def.valueType},enumerable:false,configurable:true});t.create=function(e,n,r){if(n instanceof me){return new t(__assign({keyType:e,valueType:n,typeName:wt.ZodRecord},ve(r)))}return new t(__assign({keyType:Ze.create(),valueType:e,typeName:wt.ZodRecord},ve(n)))};return t}(me);var it=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}Object.defineProperty(t.prototype,"keySchema",{get:function(){return this._def.keyType},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"valueSchema",{get:function(){return this._def.valueType},enumerable:false,configurable:true});t.prototype._parse=function(e){var t=this;var n=this._processInputParams(e),r=n.status,i=n.ctx;if(i.parsedType!==U.map){X(i,{code:V.invalid_type,expected:U.map,received:i.parsedType});return te}var a=this._def.keyType;var s=this._def.valueType;var o=__spreadArray([],i.data.entries(),true).map((function(e,t){var n=e[0],r=e[1];return{key:a._parse(new pe(i,n,i.path,[t,"key"])),value:s._parse(new pe(i,r,i.path,[t,"value"]))}}));if(i.common.async){var u=new Map;return Promise.resolve().then((function(){return __awaiter(t,void 0,void 0,(function(){var e,t,n,i,a;return __generator(this,(function(s){switch(s.label){case 0:e=0,t=o;s.label=1;case 1:if(!(e<t.length))return[3,5];n=t[e];return[4,n.key];case 2:i=s.sent();return[4,n.value];case 3:a=s.sent();if(i.status==="aborted"||a.status==="aborted"){return[2,te]}if(i.status==="dirty"||a.status==="dirty"){r.dirty()}u.set(i.value,a.value);s.label=4;case 4:e++;return[3,1];case 5:return[2,{status:r.value,value:u}]}}))}))}))}else{var l=new Map;for(var c=0,d=o;c<d.length;c++){var f=d[c];var p=f.key;var h=f.value;if(p.status==="aborted"||h.status==="aborted"){return te}if(p.status==="dirty"||h.status==="dirty"){r.dirty()}l.set(p.value,h.value)}return{status:r.value,value:l}}};return t}(me);it.create=function(e,t,n){return new it(__assign({valueType:t,keyType:e,typeName:wt.ZodMap},ve(n)))};var at=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==U.set){X(r,{code:V.invalid_type,expected:U.set,received:r.parsedType});return te}var i=this._def;if(i.minSize!==null){if(r.data.size<i.minSize.value){X(r,{code:V.too_small,minimum:i.minSize.value,type:"set",inclusive:true,exact:false,message:i.minSize.message});n.dirty()}}if(i.maxSize!==null){if(r.data.size>i.maxSize.value){X(r,{code:V.too_big,maximum:i.maxSize.value,type:"set",inclusive:true,exact:false,message:i.maxSize.message});n.dirty()}}var a=this._def.valueType;function s(e){var t=new Set;for(var r=0,i=e;r<i.length;r++){var a=i[r];if(a.status==="aborted")return te;if(a.status==="dirty")n.dirty();t.add(a.value)}return{status:n.value,value:t}}var o=__spreadArray([],r.data.values(),true).map((function(e,t){return a._parse(new pe(r,e,r.path,t))}));if(r.common.async){return Promise.all(o).then((function(e){return s(e)}))}else{return s(o)}};t.prototype.min=function(e,n){return new t(__assign(__assign({},this._def),{minSize:{value:e,message:ce.toString(n)}}))};t.prototype.max=function(e,n){return new t(__assign(__assign({},this._def),{maxSize:{value:e,message:ce.toString(n)}}))};t.prototype.size=function(e,t){return this.min(e,t).max(e,t)};t.prototype.nonempty=function(e){return this.min(1,e)};return t}(me);at.create=function(e,t){return new at(__assign({valueType:e,minSize:null,maxSize:null,typeName:wt.ZodSet},ve(t)))};var st=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t.validate=t.implement;return t}t.prototype._parse=function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==U.function){X(t,{code:V.invalid_type,expected:U.function,received:t.parsedType});return te}function n(e,n){return Y({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,J(),q].filter((function(e){return!!e})),issueData:{code:V.invalid_arguments,argumentsError:n}})}function r(e,n){return Y({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,J(),q].filter((function(e){return!!e})),issueData:{code:V.invalid_return_type,returnTypeError:n}})}var i={errorMap:t.common.contextualErrorMap};var a=t.data;if(this._def.returns instanceof ft){var s=this;return re((function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return __awaiter(this,void 0,void 0,(function(){var t,o,u,l;return __generator(this,(function(c){switch(c.label){case 0:t=new W([]);return[4,s._def.args.parseAsync(e,i).catch((function(r){t.addIssue(n(e,r));throw t}))];case 1:o=c.sent();return[4,Reflect.apply(a,this,o)];case 2:u=c.sent();return[4,s._def.returns._def.type.parseAsync(u,i).catch((function(e){t.addIssue(r(u,e));throw t}))];case 3:l=c.sent();return[2,l]}}))}))}))}else{var o=this;return re((function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}var s=o._def.args.safeParse(e,i);if(!s.success){throw new W([n(e,s.error)])}var u=Reflect.apply(a,this,s.data);var l=o._def.returns.safeParse(u,i);if(!l.success){throw new W([r(u,l.error)])}return l.data}))}};t.prototype.parameters=function(){return this._def.args};t.prototype.returnType=function(){return this._def.returns};t.prototype.args=function(){var e=[];for(var n=0;n<arguments.length;n++){e[n]=arguments[n]}return new t(__assign(__assign({},this._def),{args:nt.create(e).rest(Fe.create())}))};t.prototype.returns=function(e){return new t(__assign(__assign({},this._def),{returns:e}))};t.prototype.implement=function(e){var t=this.parse(e);return t};t.prototype.strictImplement=function(e){var t=this.parse(e);return t};t.create=function(e,n,r){return new t(__assign({args:e?e:nt.create([]).rest(Fe.create()),returns:n||Fe.create(),typeName:wt.ZodFunction},ve(r)))};return t}(me);var ot=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}Object.defineProperty(t.prototype,"schema",{get:function(){return this._def.getter()},enumerable:false,configurable:true});t.prototype._parse=function(e){var t=this._processInputParams(e).ctx;var n=this._def.getter();return n._parse({data:t.data,path:t.path,parent:t})};return t}(me);ot.create=function(e,t){return new ot(__assign({getter:e,typeName:wt.ZodLazy},ve(t)))};var ut=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){if(e.data!==this._def.value){var t=this._getOrReturnCtx(e);X(t,{received:t.data,code:V.invalid_literal,expected:this._def.value});return te}return{status:"valid",value:e.data}};Object.defineProperty(t.prototype,"value",{get:function(){return this._def.value},enumerable:false,configurable:true});return t}(me);ut.create=function(e,t){return new ut(__assign({value:e,typeName:wt.ZodLiteral},ve(t)))};function lt(e,t){return new ct(__assign({values:e,typeName:wt.ZodEnum},ve(t)))}var ct=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;de.set(t,void 0);return t}t.prototype._parse=function(e){if(typeof e.data!=="string"){var t=this._getOrReturnCtx(e);var n=this._def.values;X(t,{expected:D.joinValues(n),received:t.parsedType,code:V.invalid_type});return te}if(!ue(this,de,"f")){le(this,de,new Set(this._def.values),"f")}if(!ue(this,de,"f").has(e.data)){var t=this._getOrReturnCtx(e);var n=this._def.values;X(t,{received:t.data,code:V.invalid_enum_value,options:n});return te}return re(e.data)};Object.defineProperty(t.prototype,"options",{get:function(){return this._def.values},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"enum",{get:function(){var e={};for(var t=0,n=this._def.values;t<n.length;t++){var r=n[t];e[r]=r}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"Values",{get:function(){var e={};for(var t=0,n=this._def.values;t<n.length;t++){var r=n[t];e[r]=r}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"Enum",{get:function(){var e={};for(var t=0,n=this._def.values;t<n.length;t++){var r=n[t];e[r]=r}return e},enumerable:false,configurable:true});t.prototype.extract=function(e,n){if(n===void 0){n=this._def}return t.create(e,__assign(__assign({},this._def),n))};t.prototype.exclude=function(e,n){if(n===void 0){n=this._def}return t.create(this.options.filter((function(t){return!e.includes(t)})),__assign(__assign({},this._def),n))};return t}(me);de=new WeakMap;ct.create=lt;var dt=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;fe.set(t,void 0);return t}t.prototype._parse=function(e){var t=D.getValidEnumValues(this._def.values);var n=this._getOrReturnCtx(e);if(n.parsedType!==U.string&&n.parsedType!==U.number){var r=D.objectValues(t);X(n,{expected:D.joinValues(r),received:n.parsedType,code:V.invalid_type});return te}if(!ue(this,fe,"f")){le(this,fe,new Set(D.getValidEnumValues(this._def.values)),"f")}if(!ue(this,fe,"f").has(e.data)){var r=D.objectValues(t);X(n,{received:n.data,code:V.invalid_enum_value,options:r});return te}return re(e.data)};Object.defineProperty(t.prototype,"enum",{get:function(){return this._def.values},enumerable:false,configurable:true});return t}(me);fe=new WeakMap;dt.create=function(e,t){return new dt(__assign({values:e,typeName:wt.ZodNativeEnum},ve(t)))};var ft=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.unwrap=function(){return this._def.type};t.prototype._parse=function(e){var t=this;var n=this._processInputParams(e).ctx;if(n.parsedType!==U.promise&&n.common.async===false){X(n,{code:V.invalid_type,expected:U.promise,received:n.parsedType});return te}var r=n.parsedType===U.promise?n.data:Promise.resolve(n.data);return re(r.then((function(e){return t._def.type.parseAsync(e,{path:n.path,errorMap:n.common.contextualErrorMap})})))};return t}(me);ft.create=function(e,t){return new ft(__assign({type:e,typeName:wt.ZodPromise},ve(t)))};var pt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.innerType=function(){return this._def.schema};t.prototype.sourceType=function(){return this._def.schema._def.typeName===wt.ZodEffects?this._def.schema.sourceType():this._def.schema};t.prototype._parse=function(e){var t=this;var n=this._processInputParams(e),r=n.status,i=n.ctx;var a=this._def.effect||null;var s={addIssue:function(e){X(i,e);if(e.fatal){r.abort()}else{r.dirty()}},get path(){return i.path}};s.addIssue=s.addIssue.bind(s);if(a.type==="preprocess"){var o=a.transform(i.data,s);if(i.common.async){return Promise.resolve(o).then((function(e){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:if(r.value==="aborted")return[2,te];return[4,this._def.schema._parseAsync({data:e,path:i.path,parent:i})];case 1:t=n.sent();if(t.status==="aborted")return[2,te];if(t.status==="dirty")return[2,ne(t.value)];if(r.value==="dirty")return[2,ne(t.value)];return[2,t]}}))}))}))}else{if(r.value==="aborted")return te;var u=this._def.schema._parseSync({data:o,path:i.path,parent:i});if(u.status==="aborted")return te;if(u.status==="dirty")return ne(u.value);if(r.value==="dirty")return ne(u.value);return u}}if(a.type==="refinement"){var l=function(e){var t=a.refinement(e,s);if(i.common.async){return Promise.resolve(t)}if(t instanceof Promise){throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.")}return e};if(i.common.async===false){var c=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(c.status==="aborted")return te;if(c.status==="dirty")r.dirty();l(c.value);return{status:r.value,value:c.value}}else{return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then((function(e){if(e.status==="aborted")return te;if(e.status==="dirty")r.dirty();return l(e.value).then((function(){return{status:r.value,value:e.value}}))}))}}if(a.type==="transform"){if(i.common.async===false){var d=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!se(d))return d;var u=a.transform(d.value,s);if(u instanceof Promise){throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.")}return{status:r.value,value:u}}else{return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then((function(e){if(!se(e))return e;return Promise.resolve(a.transform(e.value,s)).then((function(e){return{status:r.value,value:e}}))}))}}D.assertNever(a)};return t}(me);pt.create=function(e,t,n){return new pt(__assign({schema:e,typeName:wt.ZodEffects,effect:t},ve(n)))};pt.createWithPreprocess=function(e,t,n){return new pt(__assign({schema:t,effect:{type:"preprocess",transform:e},typeName:wt.ZodEffects},ve(n)))};var ht=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t===U.undefined){return re(undefined)}return this._def.innerType._parse(e)};t.prototype.unwrap=function(){return this._def.innerType};return t}(me);ht.create=function(e,t){return new ht(__assign({innerType:e,typeName:wt.ZodOptional},ve(t)))};var vt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t===U.null){return re(null)}return this._def.innerType._parse(e)};t.prototype.unwrap=function(){return this._def.innerType};return t}(me);vt.create=function(e,t){return new vt(__assign({innerType:e,typeName:wt.ZodNullable},ve(t)))};var mt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._processInputParams(e).ctx;var n=t.data;if(t.parsedType===U.undefined){n=this._def.defaultValue()}return this._def.innerType._parse({data:n,path:t.path,parent:t})};t.prototype.removeDefault=function(){return this._def.innerType};return t}(me);mt.create=function(e,t){return new mt(__assign({innerType:e,typeName:wt.ZodDefault,defaultValue:typeof t.default==="function"?t.default:function(){return t.default}},ve(t)))};var gt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this;var n=this._processInputParams(e).ctx;var r=__assign(__assign({},n),{common:__assign(__assign({},n.common),{issues:[]})});var i=this._def.innerType._parse({data:r.data,path:r.path,parent:__assign({},r)});if(oe(i)){return i.then((function(e){return{status:"valid",value:e.status==="valid"?e.value:t._def.catchValue({get error(){return new W(r.common.issues)},input:r.data})}}))}else{return{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new W(r.common.issues)},input:r.data})}}};t.prototype.removeCatch=function(){return this._def.innerType};return t}(me);gt.create=function(e,t){return new gt(__assign({innerType:e,typeName:wt.ZodCatch,catchValue:typeof t.catch==="function"?t.catch:function(){return t.catch}},ve(t)))};var _t=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t!==U.nan){var n=this._getOrReturnCtx(e);X(n,{code:V.invalid_type,expected:U.nan,received:n.parsedType});return te}return{status:"valid",value:e.data}};return t}(me);_t.create=function(e){return new _t(__assign({typeName:wt.ZodNaN},ve(e)))};var yt=Symbol("zod_brand");var bt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._processInputParams(e).ctx;var n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})};t.prototype.unwrap=function(){return this._def.type};return t}(me);var Tt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this;var n=this._processInputParams(e),r=n.status,i=n.ctx;if(i.common.async){var a=function(){return __awaiter(t,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,this._def.in._parseAsync({data:i.data,path:i.path,parent:i})];case 1:e=t.sent();if(e.status==="aborted")return[2,te];if(e.status==="dirty"){r.dirty();return[2,ne(e.value)]}else{return[2,this._def.out._parseAsync({data:e.value,path:i.path,parent:i})]}return[2]}}))}))};return a()}else{var s=this._def.in._parseSync({data:i.data,path:i.path,parent:i});if(s.status==="aborted")return te;if(s.status==="dirty"){r.dirty();return{status:"dirty",value:s.value}}else{return this._def.out._parseSync({data:s.value,path:i.path,parent:i})}}};t.create=function(e,n){return new t({in:e,out:n,typeName:wt.ZodPipeline})};return t}(me);var kt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._def.innerType._parse(e);var n=function(e){if(se(e)){e.value=Object.freeze(e.value)}return e};return oe(t)?t.then((function(e){return n(e)})):n(t)};t.prototype.unwrap=function(){return this._def.innerType};return t}(me);kt.create=function(e,t){return new kt(__assign({innerType:e,typeName:wt.ZodReadonly},ve(t)))};function xt(e,t,n){if(t===void 0){t={}}if(e)return Ve.create().superRefine((function(r,i){var a,s;if(!e(r)){var o=typeof t==="function"?t(r):typeof t==="string"?{message:t}:t;var u=(s=(a=o.fatal)!==null&&a!==void 0?a:n)!==null&&s!==void 0?s:true;var l=typeof o==="string"?{message:o}:o;i.addIssue(__assign(__assign({code:"custom"},l),{fatal:u}))}}));return Ve.create()}var Mt={object:Je.lazycreate};var wt;(function(e){e["ZodString"]="ZodString";e["ZodNumber"]="ZodNumber";e["ZodNaN"]="ZodNaN";e["ZodBigInt"]="ZodBigInt";e["ZodBoolean"]="ZodBoolean";e["ZodDate"]="ZodDate";e["ZodSymbol"]="ZodSymbol";e["ZodUndefined"]="ZodUndefined";e["ZodNull"]="ZodNull";e["ZodAny"]="ZodAny";e["ZodUnknown"]="ZodUnknown";e["ZodNever"]="ZodNever";e["ZodVoid"]="ZodVoid";e["ZodArray"]="ZodArray";e["ZodObject"]="ZodObject";e["ZodUnion"]="ZodUnion";e["ZodDiscriminatedUnion"]="ZodDiscriminatedUnion";e["ZodIntersection"]="ZodIntersection";e["ZodTuple"]="ZodTuple";e["ZodRecord"]="ZodRecord";e["ZodMap"]="ZodMap";e["ZodSet"]="ZodSet";e["ZodFunction"]="ZodFunction";e["ZodLazy"]="ZodLazy";e["ZodLiteral"]="ZodLiteral";e["ZodEnum"]="ZodEnum";e["ZodEffects"]="ZodEffects";e["ZodNativeEnum"]="ZodNativeEnum";e["ZodOptional"]="ZodOptional";e["ZodNullable"]="ZodNullable";e["ZodDefault"]="ZodDefault";e["ZodCatch"]="ZodCatch";e["ZodPromise"]="ZodPromise";e["ZodBranded"]="ZodBranded";e["ZodPipeline"]="ZodPipeline";e["ZodReadonly"]="ZodReadonly"})(wt||(wt={}));var Gt=function(e,t){if(t===void 0){t={message:"Input not instance of ".concat(e.name)}}return xt((function(t){return t instanceof e}),t)};var It=Ze.create;var St=ze.create;var Ct=_t.create;var At=Ke.create;var Pt=Re.create;var jt=De.create;var Ot=Le.create;var Et=Ue.create;var Zt=Be.create;var Nt=Ve.create;var zt=Fe.create;var Kt=We.create;var Rt=qe.create;var Dt=He.create;var Lt=Je.create;var Ut=Je.strictCreate;var Bt=Ye.create;var Vt=Xe.create;var Ft=tt.create;var Wt=nt.create;var qt=rt.create;var Ht=it.create;var $t=at.create;var Jt=st.create;var Yt=ot.create;var Qt=ut.create;var Xt=ct.create;var en=dt.create;var tn=ft.create;var nn=pt.create;var rn=ht.create;var an=vt.create;var sn=pt.createWithPreprocess;var on=Tt.create;var un=function(){return It().optional()};var ln=function(){return St().optional()};var cn=function(){return Pt().optional()};var dn={string:function(e){return Ze.create(__assign(__assign({},e),{coerce:true}))},number:function(e){return ze.create(__assign(__assign({},e),{coerce:true}))},boolean:function(e){return Re.create(__assign(__assign({},e),{coerce:true}))},bigint:function(e){return Ke.create(__assign(__assign({},e),{coerce:true}))},date:function(e){return De.create(__assign(__assign({},e),{coerce:true}))}};var fn=te;var pn=Object.freeze({__proto__:null,defaultErrorMap:q,setErrorMap:$,getErrorMap:J,makeIssue:Y,EMPTY_PATH:Q,addIssueToContext:X,ParseStatus:ee,INVALID:te,DIRTY:ne,OK:re,isAborted:ie,isDirty:ae,isValid:se,isAsync:oe,get util(){return D},get objectUtil(){return L},ZodParsedType:U,getParsedType:B,ZodType:me,datetimeRegex:Oe,ZodString:Ze,ZodNumber:ze,ZodBigInt:Ke,ZodBoolean:Re,ZodDate:De,ZodSymbol:Le,ZodUndefined:Ue,ZodNull:Be,ZodAny:Ve,ZodUnknown:Fe,ZodNever:We,ZodVoid:qe,ZodArray:He,ZodObject:Je,ZodUnion:Ye,ZodDiscriminatedUnion:Xe,ZodIntersection:tt,ZodTuple:nt,ZodRecord:rt,ZodMap:it,ZodSet:at,ZodFunction:st,ZodLazy:ot,ZodLiteral:ut,ZodEnum:ct,ZodNativeEnum:dt,ZodPromise:ft,ZodEffects:pt,ZodTransformer:pt,ZodOptional:ht,ZodNullable:vt,ZodDefault:mt,ZodCatch:gt,ZodNaN:_t,BRAND:yt,ZodBranded:bt,ZodPipeline:Tt,ZodReadonly:kt,custom:xt,Schema:me,ZodSchema:me,late:Mt,get ZodFirstPartyTypeKind(){return wt},coerce:dn,any:Nt,array:Dt,bigint:At,boolean:Pt,date:jt,discriminatedUnion:Vt,effect:nn,enum:Xt,function:Jt,instanceof:Gt,intersection:Ft,lazy:Yt,literal:Qt,map:Ht,nan:Ct,nativeEnum:en,never:Kt,null:Zt,nullable:an,number:St,object:Lt,oboolean:cn,onumber:ln,optional:rn,ostring:un,pipeline:on,preprocess:sn,promise:tn,record:qt,set:$t,strictObject:Ut,string:It,symbol:Ot,transformer:nn,tuple:Wt,undefined:Et,union:Bt,unknown:zt,void:Rt,NEVER:fn,ZodIssueCode:V,quotelessJson:F,ZodError:W});var hn=[["International Date Line West","GMT-11:00","(GMT-11:00) International Date Line West"],["Midway Island","GMT-11:00","(GMT-11:00) Midway Island"],["Samoa","GMT-11:00","(GMT-11:00) Samoa"],["Hawaii","GMT-10:00","(GMT-10:00) Hawaii"],["Alaska","GMT-09:00","(GMT-09:00) Alaska"],["Pacific Time (US & Canada)","GMT-08:00","(GMT-08:00) Pacific Time (US & Canada)"],["Tijuana","GMT-08:00","(GMT-08:00) Tijuana"],["Arizona","GMT-07:00","(GMT-07:00) Arizona"],["Chihuahua","GMT-07:00","(GMT-07:00) Chihuahua"],["Mazatlan","GMT-07:00","(GMT-07:00) Mazatlan"],["Mountain Time (US & Canada)","GMT-07:00","(GMT-07:00) Mountain Time (US & Canada)"],["Central America","GMT-06:00","(GMT-06:00) Central America"],["Central Time (US & Canada)","GMT-06:00","(GMT-06:00) Central Time (US & Canada)"],["Guadalajara","GMT-06:00","(GMT-06:00) Guadalajara"],["Mexico City","GMT-06:00","(GMT-06:00) Mexico City"],["Monterrey","GMT-06:00","(GMT-06:00) Monterrey"],["Saskatchewan","GMT-06:00","(GMT-06:00) Saskatchewan"],["Bogota","GMT-05:00","(GMT-05:00) Bogota"],["Eastern Time (US & Canada)","GMT-05:00","(GMT-05:00) Eastern Time (US & Canada)"],["Indiana (East)","GMT-05:00","(GMT-05:00) Indiana (East)"],["Lima","GMT-05:00","(GMT-05:00) Lima"],["Quito","GMT-05:00","(GMT-05:00) Quito"],["Caracas","GMT-04:30","(GMT-04:30) Caracas"],["Atlantic Time (Canada)","GMT-04:00","(GMT-04:00) Atlantic Time (Canada)"],["Georgetown","GMT-04:00","(GMT-04:00) Georgetown"],["La Paz","GMT-04:00","(GMT-04:00) La Paz"],["Santiago","GMT-04:00","(GMT-04:00) Santiago"],["Newfoundland","GMT-03:30","(GMT-03:30) Newfoundland"],["Brasilia","GMT-03:00","(GMT-03:00) Brasilia"],["Buenos Aires","GMT-03:00","(GMT-03:00) Buenos Aires"],["Greenland","GMT-03:00","(GMT-03:00) Greenland"],["Mid-Atlantic","GMT-02:00","(GMT-02:00) Mid-Atlantic"],["Azores","GMT-01:00","(GMT-01:00) Azores"],["Cape Verde Is.","GMT-01:00","(GMT-01:00) Cape Verde Is."],["Casablanca","GMT+00:00","(GMT+00:00) Casablanca"],["Dublin","GMT+00:00","(GMT+00:00) Dublin"],["Edinburgh","GMT+00:00","(GMT+00:00) Edinburgh"],["Lisbon","GMT+00:00","(GMT+00:00) Lisbon"],["London","GMT+00:00","(GMT+00:00) London"],["Monrovia","GMT+00:00","(GMT+00:00) Monrovia"],["UTC","GMT+00:00","(GMT+00:00) UTC"],["Amsterdam","GMT+01:00","(GMT+01:00) Amsterdam"],["Belgrade","GMT+01:00","(GMT+01:00) Belgrade"],["Berlin","GMT+01:00","(GMT+01:00) Berlin"],["Bern","GMT+01:00","(GMT+01:00) Bern"],["Bratislava","GMT+01:00","(GMT+01:00) Bratislava"],["Brussels","GMT+01:00","(GMT+01:00) Brussels"],["Budapest","GMT+01:00","(GMT+01:00) Budapest"],["Copenhagen","GMT+01:00","(GMT+01:00) Copenhagen"],["Ljubljana","GMT+01:00","(GMT+01:00) Ljubljana"],["Madrid","GMT+01:00","(GMT+01:00) Madrid"],["Paris","GMT+01:00","(GMT+01:00) Paris"],["Prague","GMT+01:00","(GMT+01:00) Prague"],["Rome","GMT+01:00","(GMT+01:00) Rome"],["Sarajevo","GMT+01:00","(GMT+01:00) Sarajevo"],["Skopje","GMT+01:00","(GMT+01:00) Skopje"],["Stockholm","GMT+01:00","(GMT+01:00) Stockholm"],["Vienna","GMT+01:00","(GMT+01:00) Vienna"],["Warsaw","GMT+01:00","(GMT+01:00) Warsaw"],["West Central Africa","(GMT+01:00","(GMT+01:00) West Central Africa"],["Zagreb","GMT+01:00","(GMT+01:00) Zagreb"],["Athens","GMT+02:00","(GMT+02:00) Athens"],["Bucharest","GMT+02:00","(GMT+02:00) Bucharest"],["Cairo","GMT+02:00","(GMT+02:00) Cairo"],["Harare","GMT+02:00","(GMT+02:00) Harare"],["Helsinki","GMT+02:00","(GMT+02:00) Helsinki"],["Istanbul","GMT+02:00","(GMT+02:00) Istanbul"],["Jerusalem","GMT+02:00","(GMT+02:00) Jerusalem"],["Kyiv","GMT+02:00","(GMT+02:00) Kyiv"],["Minsk","GMT+02:00","(GMT+02:00) Minsk"],["Pretoria","GMT+02:00","(GMT+02:00) Pretoria"],["Riga","GMT+02:00","(GMT+02:00) Riga"],["Sofia","GMT+02:00","(GMT+02:00) Sofia"],["Tallinn","GMT+02:00","(GMT+02:00) Tallinn"],["Vilnius","GMT+02:00","(GMT+02:00) Vilnius"],["Baghdad","GMT+03:00","(GMT+03:00) Baghdad"],["Kuwait","GMT+03:00","(GMT+03:00) Kuwait"],["Moscow","GMT+03:00","(GMT+03:00) Moscow"],["Nairobi","GMT+03:00","(GMT+03:00) Nairobi"],["Riyadh","GMT+03:00","(GMT+03:00) Riyadh"],["St. Petersburg","GMT+03:00","(GMT+03:00) St. Petersburg"],["Volgograd","GMT+03:00","(GMT+03:00) Volgograd"],["Tehran","GMT+03:30","(GMT+03:30) Tehran"],["Abu Dhabi","GMT+04:00","(GMT+04:00) Abu Dhabi"],["Baku","GMT+04:00","(GMT+04:00) Baku"],["Muscat","GMT+04:00","(GMT+04:00) Muscat"],["Tbilisi","GMT+04:00","(GMT+04:00) Tbilisi"],["Yerevan","GMT+04:00","(GMT+04:00) Yerevan"],["Kabul","GMT+04:30","(GMT+04:30) Kabul"],["Ekaterinburg","GMT+05:00","(GMT+05:00) Ekaterinburg"],["Islamabad","GMT+05:00","(GMT+05:00) Islamabad"],["Karachi","GMT+05:00","(GMT+05:00) Karachi"],["Tashkent","GMT+05:00","(GMT+05:00) Tashkent"],["Chennai","GMT+05:30","(GMT+05:30) Chennai"],["Kolkata","GMT+05:30","(GMT+05:30) Kolkata"],["Mumbai","GMT+05:30","(GMT+05:30) Mumbai"],["New Delhi","GMT+05:30","(GMT+05:30) New Delhi"],["Sri Jayawardenepura","GMT+05:30","(GMT+05:30) Sri Jayawardenepura"],["Kathmandu","GMT+05:45","(GMT+05:45) Kathmandu"],["Almaty","GMT+06:00","(GMT+06:00) Almaty"],["Astana","GMT+06:00","(GMT+06:00) Astana"],["Dhaka","GMT+06:00","(GMT+06:00) Dhaka"],["Novosibirsk","GMT+06:00","(GMT+06:00) Novosibirsk"],["Rangoon","GMT+06:30","(GMT+06:30) Rangoon"],["Bangkok","GMT+07:00","(GMT+07:00) Bangkok"],["Hanoi","GMT+07:00","(GMT+07:00) Hanoi"],["Jakarta","GMT+07:00","(GMT+07:00) Jakarta"],["Krasnoyarsk","GMT+07:00","(GMT+07:00) Krasnoyarsk"],["Beijing","GMT+08:00","(GMT+08:00) Beijing"],["Chongqing","GMT+08:00","(GMT+08:00) Chongqing"],["Hong Kong","GMT+08:00","(GMT+08:00) Hong Kong"],["Irkutsk","GMT+08:00","(GMT+08:00) Irkutsk"],["Kuala Lumpur","GMT+08:00","(GMT+08:00) Kuala Lumpur"],["Perth","GMT+08:00","(GMT+08:00) Perth"],["Singapore","GMT+08:00","(GMT+08:00) Singapore"],["Taipei","GMT+08:00","(GMT+08:00) Taipei"],["Ulaan Bataar","GMT+08:00","(GMT+08:00) Ulaan Bataar"],["Urumqi","GMT+08:00","(GMT+08:00) Urumqi"],["Osaka","GMT+09:00","(GMT+09:00) Osaka"],["Sapporo","GMT+09:00","(GMT+09:00) Sapporo"],["Seoul","GMT+09:00","(GMT+09:00) Seoul"],["Tokyo","GMT+09:00","(GMT+09:00) Tokyo"],["Yakutsk","GMT+09:00","(GMT+09:00) Yakutsk"],["Adelaide","GMT+09:30","(GMT+09:30) Adelaide"],["Darwin","GMT+09:30","(GMT+09:30) Darwin"],["Brisbane","GMT+10:00","(GMT+10:00) Brisbane"],["Canberra","GMT+10:00","(GMT+10:00) Canberra"],["Guam","GMT+10:00","(GMT+10:00) Guam"],["Hobart","GMT+10:00","(GMT+10:00) Hobart"],["Melbourne","GMT+10:00","(GMT+10:00) Melbourne"],["Port Moresby","GMT+10:00","(GMT+10:00) Port Moresby"],["Sydney","GMT+10:00","(GMT+10:00) Sydney"],["Vladivostok","GMT+10:00","(GMT+10:00) Vladivostok"],["Kamchatka","GMT+11:00","(GMT+11:00) Kamchatka"],["Magadan","GMT+11:00","(GMT+11:00) Magadan"],["New Caledonia","GMT+11:00","(GMT+11:00) New Caledonia"],["Solomon Is.","GMT+11:00","(GMT+11:00) Solomon Is."],["Auckland","GMT+12:00","(GMT+12:00) Auckland"],["Fiji","GMT+12:00","(GMT+12:00) Fiji"],["Marshall Is.","GMT+12:00","(GMT+12:00) Marshall Is."],["Wellington","GMT+12:00","(GMT+12:00) Wellington"],["Nuku'alofa","GMT+13:00","(GMT+13:00) Nuku'alofa"]];var vn='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-settings-organization{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}verdocs-settings-organization .columns{gap:20px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row}verdocs-settings-organization .column{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-settings-organization verdocs-text-input{margin:10px 0}verdocs-settings-organization verdocs-text-input input{height:32px}@media screen and (max-width: 600px){verdocs-settings-organization .columns{gap:0;-ms-flex-direction:column;flex-direction:column}}';var mn=hn.map((function(e){return{value:e[2],label:e[2]}}));var gn=pn.object({business_name:pn.string().trim().max(30).optional(),contact_email:pn.string().trim().email("Invalid email").optional().or(pn.literal("")),phone:pn.preprocess((function(e){return v(String(e).trim())}),pn.string().optional()),timezone:pn.string().trim().optional(),url:pn.string().trim().optional()});var _n=e("verdocs_settings_organization",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.organizationUpdated=n(this,"organizationUpdated",7);this.endpoint=a.getDefault();this.valid=false;this.dirty=false;this.submitting=false;this.name="";this.business_name="";this.contact_email="";this.phone="";this.address="";this.address2="";this.timezone="";this.url=""}e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,G(this.endpoint,this.endpoint.session.organization_id)];case 1:e=t.sent();console.log("[SETTINGS] Loaded organization",e);this.resetForm(e);return[2]}}))}))};e.prototype.resetForm=function(e){this.name=e.name;this.business_name=e.business_name;this.contact_email=e.contact_email;this.phone=e.phone;this.address=e.address;this.address2=e.address2;this.timezone=e.timezone;this.url=e.url;this.dirty=false;this.valid=true};e.prototype.handleSubmit=function(e){var t=this;e.preventDefault();e.stopPropagation();I(a.getDefault(),this.endpoint.session.organization_id,{name:this.name,business_name:this.business_name,contact_email:this.contact_email,phone:this.phone,address:this.address,address2:this.address2,timezone:this.timezone,url:this.url}).then((function(e){var n;console.log("[SETTINGS] Update result",e);(n=t.organizationUpdated)===null||n===void 0?void 0:n.emit({endpoint:t.endpoint,organization:e});t.resetForm(e)})).catch((function(e){return l("Error updating organization: ".concat(e.message),{style:"error"})}))};e.prototype.processFields=function(){var e=gn.safeParse({name:this.name,business_name:this.business_name,contact_email:this.contact_email,phone:this.phone,address:this.address,address2:this.address2,timezone:this.timezone,url:this.url});console.log("[SETTINGS] Validation result",e);this.valid=e.success;this.dirty=true};e.prototype.render=function(){var e=this;if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return r(i,{class:"authentication-required"},"Must be authenticated")}return r(i,null,r("h1",null,"Organization Profile"),r("form",{onSubmit:function(t){return e.handleSubmit(t)}},r("div",{class:"columns"},r("div",{class:"column"},r("verdocs-text-input",{id:"verdocs-organization-name",value:this.name,autocomplete:"off",label:"Name",required:false,disabled:false,placeholder:"Enter your organization's name...",onInput:function(t){return e.name=t.target.value},onFocusout:function(t){e.name=t.target.value.trim();e.processFields()}}),r("verdocs-text-input",{id:"verdocs-organization-business-name",value:this.business_name,autocomplete:"off",label:"Display Name",placeholder:"The name to display on communications...",onInput:function(t){return e.business_name=t.target.value},onFocusout:function(t){e.business_name=t.target.value.trim();e.processFields()}}),r("verdocs-text-input",{id:"verdocs-organization-url",value:this.url,autocomplete:"off",label:"Web URL",placeholder:"Enter your Web URL...",onInput:function(t){return e.url=t.target.value},onFocusout:function(t){e.url=t.target.value.trim();e.processFields()}}),r("verdocs-text-input",{id:"verdocs-organization-phone",value:this.phone,autocomplete:"off",label:"Phone Number",placeholder:"Enter your phone number...",onInput:function(t){return e.phone=t.target.value},onFocusout:function(t){e.phone=t.target.value.trim();e.processFields()}})),r("div",{class:"column"},r("verdocs-text-input",{id:"verdocs-organization-email",value:this.contact_email,clearable:true,autocomplete:"off",label:"Contact Email",placeholder:"Enter your contact email address...",onInput:function(t){return e.contact_email=t.target.value},onFocusout:function(t){e.contact_email=t.target.value.trim();e.processFields()}}),r("verdocs-select-input",{options:mn,value:this.timezone,label:"Time Zone"}))),r("verdocs-button",{type:"submit",label:"Save",size:"normal",disabled:this.submitting||!this.dirty})))};return e}());_n.style=vn;var yn='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-settings-profile{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}verdocs-settings-profile .columns{gap:20px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row}verdocs-settings-profile .column{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-settings-profile verdocs-text-input{margin:10px 0}verdocs-settings-profile verdocs-text-input input{height:32px}@media screen and (max-width: 600px){verdocs-settings-profile .columns{gap:0;-ms-flex-direction:column;flex-direction:column}}';var bn=pn.object({first_name:pn.string().trim().min(1,"First name is required").max(30),last_name:pn.string().trim().min(1,"Last name is required").max(30),email:pn.string().trim().email("Invalid email").min(1,"Email is required"),phone:pn.preprocess((function(e){return v(String(e).trim())}),pn.string())});var Tn=e("verdocs_settings_profile",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.profileUpdated=n(this,"profileUpdated",7);this.endpoint=a.getDefault();this.valid=false;this.dirty=false;this.submitting=false;this.first_name="";this.last_name="";this.email="";this.phone=""}e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,f(this.endpoint)];case 1:e=t.sent();console.log("[SETTINGS] Loaded profile",e);this.resetForm(e);return[2]}}))}))};e.prototype.resetForm=function(e){this.first_name=e.first_name;this.last_name=e.last_name;this.email=e.email;this.phone=e.phone;this.dirty=false;this.valid=true};e.prototype.handleSubmit=function(e){var t=this;e.preventDefault();e.stopPropagation();p(a.getDefault(),this.endpoint.session.profile_id,{first_name:this.first_name,last_name:this.last_name,phone:this.phone}).then((function(e){var n;console.log("[SETTINGS] Update result",e);(n=t.profileUpdated)===null||n===void 0?void 0:n.emit({endpoint:t.endpoint,profile:e});t.resetForm(e)})).catch((function(e){return l("Error updating profile: ".concat(e.message),{style:"error"})}))};e.prototype.processFields=function(){var e=bn.safeParse({first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone});console.log("[SETTINGS] Validation result",e);this.valid=e.success;this.dirty=true};e.prototype.render=function(){var e=this;if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return r(i,{class:"authentication-required"},"Must be authenticated")}return r(i,null,r("h1",null,"My Profile"),r("form",{onSubmit:function(t){return e.handleSubmit(t)}},r("div",{class:"columns"},r("div",{class:"column"},r("verdocs-text-input",{id:"verdocs-profile-first-name",value:this.first_name,autocomplete:"off",label:"First Name",required:true,placeholder:"Enter your first name...",onInput:function(t){return e.first_name=t.target.value},onFocusout:function(t){e.first_name=t.target.value.trim();e.processFields()}}),r("verdocs-text-input",{id:"verdocs-profile-last-name",value:this.last_name,autocomplete:"off",label:"Last Name",required:true,placeholder:"Enter your last name...",onInput:function(t){return e.last_name=t.target.value},onFocusout:function(t){e.last_name=t.target.value.trim();e.processFields()}})),r("div",{class:"column"},r("verdocs-text-input",{id:"verdocs-profile-email",value:this.email,autocomplete:"off",label:"Email Address",required:true,disabled:true,placeholder:"Enter your email address...",onInput:function(t){return e.email=t.target.value},onFocusout:function(t){e.email=t.target.value.trim();e.processFields()}}),r("verdocs-text-input",{id:"verdocs-profile-phone",value:this.phone,clearable:true,autocomplete:"off",label:"Phone Number",placeholder:"Enter your phone number...",onInput:function(t){return e.phone=t.target.value},onFocusout:function(t){e.phone=t.target.value.trim();e.processFields()}}))),r("verdocs-button",{type:"submit",label:"Save",size:"normal",disabled:this.submitting||!this.dirty})))};return e}());Tn.style=yn}}}));
1
+ var __extends=this&&this.__extends||function(){var e=function(t,n){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]};return e(t,n)};return function(t,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function s(e){try{u(r.next(e))}catch(e){a(e)}}function o(e){try{u(r["throw"](e))}catch(e){a(e)}}function u(e){e.done?n(e.value):i(e.value).then(s,o)}u((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(t){return u([e,t])}}function u(s){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(a=s[0]&2?i["return"]:s[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;if(i=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1];a=s;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(s);break}if(a[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++){if(a||!(r in t)){if(!a)a=Array.prototype.slice.call(t,0,r);a[r]=t[r]}}return e.concat(a||Array.prototype.slice.call(t))};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-235b4a0b.system.js","./p-3bcd86ea.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js","./p-cd20fb77.system.js","./p-dc9c4361.system.js","./p-0cafdb16.system.js","./p-bbee73c8.system.js","./p-8aae8d16.system.js","./p-173e86c3.system.js"],(function(e){"use strict";var t,n,r,i,a,s,o,u,l,c,d,f,p,h,v;return{setters:[function(e){t=e.r;n=e.c;r=e.h;i=e.H},function(){},function(e){a=e.V},function(e){s=e.a;o=e.c;u=e.b},function(e){l=e.V},function(e){c=e.S},function(e){d=e.g;f=e.a;p=e.u},function(e){h=e.f},function(e){v=e.c},function(){},function(){},function(){}],execute:function(){var m=function(e,t){return e.api.get("/organizations/".concat(t,"/api_key")).then((function(e){return e.data}))};var g=function(e,t,n){return e.api.post("/organizations/".concat(t,"/api_key"),n).then((function(e){return e.data}))};var _=function(e,t,n){return e.api.put("/organizations/".concat(t,"/api_key/").concat(n,"/rotate")).then((function(e){return e.data}))};var y=function(e,t,n){return e.api.delete("/organizations/".concat(t,"/api_key/").concat(n)).then((function(e){return e.data}))};var b=function(e,t){return e.api.get("/organizations/".concat(t,"/invitation")).then((function(e){return e.data}))};var T=function(e,t,n){return e.api.post("/organizations/".concat(t,"/invitation"),n).then((function(e){return e.data}))};var k=function(e,t,n){return e.api.delete("/organizations/".concat(t,"/invitation/").concat(n)).then((function(e){return e.data}))};var x=function(e,t,n){return e.api.post("/organizations/".concat(t,"/invitation/").concat(n,"/resend")).then((function(e){return e.data}))};var M=function(e,t){return e.api.get("/organizations/".concat(t,"/profiles")).then((function(e){return e.data}))};var w=function(e,t,n){return e.api.delete("/organizations/".concat(t,"/profiles/").concat(n)).then((function(e){return e.data}))};var G=function(e,t){return e.api.get("/organizations/".concat(t)).then((function(e){return e.data}))};var I=function(e,t,n){return e.api.patch("/organizations/".concat(t),n).then((function(e){return e.data}))};var S='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-settings-api-keys{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}verdocs-settings-api-keys .table{margin:12px 0}verdocs-settings-api-keys .data-col div{gap:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-settings-api-keys .data-col svg{width:24px;height:24px}verdocs-settings-api-keys .col-name svg,verdocs-settings-api-keys .col-client_id svg,verdocs-settings-api-keys .col-profile_id svg{fill:#a1a1aa}verdocs-settings-api-keys .col-actions svg{fill:#ffffff;stroke:#a1a1aa}verdocs-settings-api-keys .col-actions svg:hover{cursor:pointer;stroke:red}verdocs-settings-api-keys .col-actions>div{-ms-flex-pack:center;justify-content:center}verdocs-settings-api-keys .header-col.col-actions{text-align:center}verdocs-settings-api-keys verdocs-dialog p{font-size:16px;line-height:18px;margin:0 0 1em 0}@media all and (max-width: 450px){verdocs-settings-api-keys .col-client_id,verdocs-settings-api-keys .col-actions{display:none}}';var C='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M5.5 3A2.5 2.5 0 003 5.5v2.879a2.5 2.5 0 00.732 1.767l6.5 6.5a2.5 2.5 0 003.536 0l2.878-2.878a2.5 2.5 0 000-3.536l-6.5-6.5A2.5 2.5 0 008.38 3H5.5zM6 7a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd" /></svg>';var A='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-5.5-2.5a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zM10 12a5.99 5.99 0 00-4.793 2.39A6.483 6.483 0 0010 16.5a6.483 6.483 0 004.793-2.11A5.99 5.99 0 0010 12z" clip-rule="evenodd" /></svg>';var P='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var j='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99" /></svg>';var O=e("verdocs_settings_api_keys",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.memberInvited=n(this,"memberInvited",7);this.memberUpdated=n(this,"memberUpdated",7);this.memberRemoved=n(this,"memberRemoved",7);this.endpoint=a.getDefault();this.keys=[];this.creatingKey=false;this.createdKey=null;this.deletingKey=null;this.rotatingKey=null;this.newApiKeyName="";this.newApiKeyProfileId="";this.members=[]}e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.newApiKeyProfileId=this.endpoint.session.profile_id;M(this.endpoint,this.endpoint.session.organization_id).then((function(t){e.members=t})).catch((function(t){var n,r,i;console.log("[SETTINGS] Error loading organization members",t);(n=e.sdkError)===null||n===void 0?void 0:n.emit(new c(t.message,(r=t.response)===null||r===void 0?void 0:r.status,(i=t.response)===null||i===void 0?void 0:i.data));l("Unable to load API keys. Please try again later",{style:"error"})}));this.loadKeys();return[2]}))}))};e.prototype.loadKeys=function(){var e=this;m(this.endpoint,this.endpoint.session.organization_id).then((function(t){e.keys=t})).catch((function(t){var n,r,i;console.log("[SETTINGS] Unable to load API keys",t);(n=e.sdkError)===null||n===void 0?void 0:n.emit(new c(t.message,(r=t.response)===null||r===void 0?void 0:r.status,(i=t.response)===null||i===void 0?void 0:i.data));l("Unable to load API keys. Please try again later",{style:"error"})}))};e.prototype.handleDeleteKey=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){y(this.endpoint,this.deletingKey.organization_id,this.deletingKey.client_id).then((function(){e.deletingKey=null;l("API key deleted",{style:"success"});e.loadKeys()})).catch((function(t){var n,r,i;e.deletingKey=null;console.log("[SETTINGS] Unable to delete API key",t);(n=e.sdkError)===null||n===void 0?void 0:n.emit(new c(t.message,(r=t.response)===null||r===void 0?void 0:r.status,(i=t.response)===null||i===void 0?void 0:i.data));l("Unable to delete API key. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.handleRotateKey=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){_(this.endpoint,this.rotatingKey.organization_id,this.rotatingKey.client_id).then((function(t){e.rotatingKey=null;l("API key rotated",{style:"success"});e.loadKeys();e.createdKey=t})).catch((function(t){var n,r,i;e.rotatingKey=null;console.log("[SETTINGS] Unable to rotate API key",t);(n=e.sdkError)===null||n===void 0?void 0:n.emit(new c(t.message,(r=t.response)===null||r===void 0?void 0:r.status,(i=t.response)===null||i===void 0?void 0:i.data));l("Unable to rotate API key. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.handleCreateKey=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){g(this.endpoint,this.endpoint.session.organization_id,{name:this.newApiKeyName,profile_id:this.newApiKeyProfileId}).then((function(t){e.creatingKey=false;e.createdKey=t;l("API key created",{style:"success"});e.loadKeys()})).catch((function(t){var n,r,i;e.creatingKey=false;console.log("[SETTINGS] Unable to create API key",t);(n=e.sdkError)===null||n===void 0?void 0:n.emit(new c(t.message,(r=t.response)===null||r===void 0?void 0:r.status,(i=t.response)===null||i===void 0?void 0:i.data));l("Unable to create API key. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.render=function(){var e=this;var t,n,a,o;var u=this.members.map((function(e){return{label:s(e),value:e.id}}));if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return r(i,{class:"authentication-required"},"Must be authenticated")}return r(i,null,r("verdocs-table",{data:this.keys,columns:[{id:"name",header:"Name",renderCell:function(e,t){return r("div",null,r("div",null,t.name))}},{id:"client_id",header:"Client ID",renderCell:function(e,t){return r("div",null,r("div",{innerHTML:C}),r("div",null,t.client_id))}},{id:"profile_id",header:"Acts as",renderCell:function(e,t){return r("div",null,r("div",{innerHTML:A}),r("div",null,s(t.profile)))}},{id:"actions",header:"Actions",renderCell:function(t,n){return r("div",null,r("div",{innerHTML:P,onClick:function(){return e.deletingKey=n}}),r("div",{innerHTML:j,onClick:function(){return e.rotatingKey=n}}))}}]}),r("verdocs-button",{label:"Add API Key",size:"normal",onClick:function(){return e.creatingKey=true}}),this.deletingKey&&r("verdocs-dialog",{onExit:function(){return e.deletingKey=null}},r("div",{slot:"title",class:"heading"},'Delete API key "',this.deletingKey.name,'"?'),r("div",{class:"content"},r("p",null,"Are you sure you want to delete this key? This action cannot be undone."),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",label:"Cancel",onClick:function(){return e.deletingKey=null}}),r("verdocs-button",{size:"small",label:"OK",onClick:function(){return e.handleDeleteKey()}})))),this.rotatingKey&&r("verdocs-dialog",{onExit:function(){return e.rotatingKey=null}},r("div",{slot:"title",class:"heading"},'Rotate API key "',this.rotatingKey.name,'"?'),r("div",{class:"content"},r("p",null,"Are you sure you want to rotate this key? A new client secret will be generated, and the old value will become unusable. This action cannot be undone."),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",label:"Cancel",onClick:function(){return e.rotatingKey=null}}),r("verdocs-button",{size:"small",label:"OK",onClick:function(){return e.handleRotateKey()}})))),this.creatingKey&&r("verdocs-dialog",{onExit:function(){return e.creatingKey=false}},r("div",{slot:"title",class:"heading"},"Create API Key"),r("div",{class:"content"},r("verdocs-text-input",{label:"Name",placeholder:"API key name...",id:"verdocs-api-key-name",value:this.newApiKeyName,autocomplete:"off",required:true,onInput:function(t){return e.newApiKeyName=t.target.value},onFocusout:function(t){e.newApiKeyName=t.target.value.trim()}}),r("p",null,'API keys must be associated with a profile. Actions performed via API calls using this key will "act as" this profile.'),r("verdocs-select-input",{options:u,label:"Act as Profile",onInput:function(t){e.newApiKeyProfileId=t.target.value}}),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",label:"Cancel",onClick:function(){return e.creatingKey=false}}),r("verdocs-button",{size:"small",label:"OK",onClick:function(){return e.handleCreateKey()}})))),this.createdKey&&r("verdocs-dialog",{onExit:function(){return e.createdKey=null}},r("div",{slot:"title",class:"heading"},"API Key Details"),r("div",{class:"content"},r("verdocs-text-input",{label:"Name",disabled:true,value:(t=this.createdKey)===null||t===void 0?void 0:t.name}),r("verdocs-text-input",{label:"Profile",disabled:true,value:s((n=this.createdKey)===null||n===void 0?void 0:n.profile)}),r("p",null,"Please save the Client ID and Secret below. Be sure to never expose your secret key in insecure (Web or mobile environments)!"),r("verdocs-text-input",{label:"Client ID",disabled:true,value:(a=this.createdKey)===null||a===void 0?void 0:a.client_id,copyable:true}),r("verdocs-text-input",{label:"Secret Key",disabled:true,value:(o=this.createdKey)===null||o===void 0?void 0:o.client_secret,copyable:true}),r("div",{class:"buttons"},r("verdocs-button",{size:"small",label:"Done",onClick:function(){return e.createdKey=null}})))))};return e}());O.style=S;var E='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-settings-members{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}verdocs-settings-members .table{margin:12px 0}verdocs-settings-members .role{font-size:12px;width:32px;height:32px;border-radius:32px;background:#777777;color:#ffffff;font-weight:700;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-settings-members .table{margin:12px 0}verdocs-settings-members .data-col div{gap:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-settings-members .data-col svg{width:24px;height:24px}verdocs-settings-members .col-name svg,verdocs-settings-members .col-client_id svg,verdocs-settings-members .col-profile_id svg{fill:#a1a1aa}verdocs-settings-members .col-actions svg{fill:#ffffff;stroke:#a1a1aa}verdocs-settings-members .col-actions svg:hover{cursor:pointer;stroke:red}verdocs-settings-members .col-actions>div{-ms-flex-pack:center;justify-content:center}verdocs-settings-members .header-col.col-actions{text-align:center}verdocs-settings-members verdocs-dialog p{font-size:16px;line-height:18px;margin:0 0 1em 0}@media all and (max-width: 450px){verdocs-settings-members .col-email,verdocs-settings-members .col-phone,verdocs-settings-members .col-actions{display:none}}';var Z='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var N='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99" /></svg>';var z=function(e){if(e.find((function(e){return e.name==="owner"}))!==undefined)return"Owner";if(e.find((function(e){return e.name==="admin"}))!==undefined)return"Admin";if(e.find((function(e){return e.name==="member"}))!==undefined)return"Member";if(e.find((function(e){return e.name==="basic_user"}))!==undefined)return"Basic User";if(e.find((function(e){return e.name==="contact"}))!==undefined)return"Contact"};var K=function(e){if(e.find((function(e){return e.name==="owner"}))!==undefined)return"#9333ea";if(e.find((function(e){return e.name==="admin"}))!==undefined)return"#2563eb";if(e.find((function(e){return e.name==="member"}))!==undefined)return"#16a34a";if(e.find((function(e){return e.name==="basic_user"}))!==undefined)return"#ea580c";if(e.find((function(e){return e.name==="contact"}))!==undefined)return"#52525B"};var R=e("verdocs_settings_members",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.memberInvited=n(this,"memberInvited",7);this.memberUpdated=n(this,"memberUpdated",7);this.memberRemoved=n(this,"memberRemoved",7);this.endpoint=a.getDefault();this.members=[];this.invited=[];this.roles=[];this.selectedTab=0;this.invitingMember=false;this.newEmailAddress="";this.newRoleId="";this.submitting=false;this.deletingInvitation=null;this.resendingInvitation=null;this.deletingMember=null}e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.loadMembers().catch((function(e){return console.log("Unknown Error",e)}));return[2]}))}))};e.prototype.loadMembers=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,r,i,a,s,o,u;return __generator(this,(function(f){switch(f.label){case 0:f.trys.push([0,2,,3]);return[4,Promise.all([d(this.endpoint),M(this.endpoint,this.endpoint.session.organization_id),b(this.endpoint,this.endpoint.session.organization_id)])];case 1:i=f.sent(),a=i[0],s=i[1],o=i[2];this.roles=a;this.members=s;this.invited=o;this.newRoleId=((e=a.find((function(e){return e.name==="member"})))===null||e===void 0?void 0:e.id)||"";return[3,3];case 2:u=f.sent();(t=this.sdkError)===null||t===void 0?void 0:t.emit(new c(u.message,(n=u.response)===null||n===void 0?void 0:n.status,(r=u.response)===null||r===void 0?void 0:r.data));l("Unable to load members. Please try again later");return[3,3];case 3:return[2]}}))}))};e.prototype.handleInviteMember=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.submitting=true;T(a.getDefault(),this.endpoint.session.organization_id,{email:this.newEmailAddress,role_id:this.newRoleId,organization_id:this.endpoint.session.organization_id}).then((function(t){console.log("[SETTINGS] Invited member",t);e.invitingMember=false;e.submitting=false;e.newRoleId="";e.newEmailAddress="";l("Invitation sent!",{style:"success"});e.loadMembers()})).catch((function(t){console.log("[SETTINGS] Unable to invite member",t);e.invitingMember=false;e.submitting=false;e.newRoleId="";e.newEmailAddress="";l("Unable to invite member. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.handleDeleteMember=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.submitting=true;w(a.getDefault(),this.deletingMember.organization_id,this.deletingMember.email).then((function(){e.submitting=false;e.deletingMember=null;l("The member has been deleted.",{style:"success"});e.loadMembers()})).catch((function(t){e.submitting=false;e.deletingMember=null;console.log("Delete error",t);l("Unable to cancel invitation. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.handleDeleteInvitation=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.submitting=true;k(a.getDefault(),this.deletingInvitation.organization_id,this.deletingInvitation.email).then((function(){e.submitting=false;e.deletingInvitation=null;l("The invitation has been cancelled.",{style:"success"});e.loadMembers()})).catch((function(t){e.submitting=false;e.deletingInvitation=null;console.log("Delete error",t);l("Unable to cancel invitation. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.handleResendInvitation=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.submitting=true;x(a.getDefault(),this.resendingInvitation.organization_id,this.resendingInvitation.email).then((function(){e.submitting=false;e.resendingInvitation=null;l("The invitation has been resent.",{style:"success"});e.loadMembers()})).catch((function(t){e.submitting=false;e.resendingInvitation=null;console.log("REsend error",t);l("Unable to resend invitation. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return r(i,{class:"authentication-required"},"Must be authenticated")}var t=this.roles.map((function(e){return{label:z([{name:e.name}]),value:e.id}}));return r(i,null,r("verdocs-tabs",{tabs:[{label:"Members (".concat(this.members.length,")")},{label:"Pending Invitations (".concat(this.invited.length,")")}],onSelectTab:function(t){return e.selectedTab=t.detail.index}}),this.selectedTab===0&&r("verdocs-table",{data:this.members,columns:[{id:"name",renderHeader:function(){return"Member"},renderCell:function(e,t){return r("div",{style:{display:"flex",flexDirection:"row",gap:"10px",alignItems:"center"}},r("div",{class:"role",style:{backgroundColor:K(t.roles)}},u(t)),r("span",null,s(t)))}},{id:"email",header:"E-mail Address"},{id:"phone",header:"Phone Number"},{id:"roles",header:"Role",renderCell:function(e,t){return"".concat(z(t.roles))}},{id:"actions",header:"Actions",renderCell:function(t,n){return r("div",null,n.id!==e.endpoint.session.profile_id&&r("div",{innerHTML:Z,onClick:function(){return e.deletingMember=n}}))}}]}),this.selectedTab===1&&r("verdocs-table",{data:this.invited,columns:[{id:"email",header:"E-mail Address"},{id:"generated_at",header:"Invited",renderCell:function(e,t){return r("div",null,h(new Date(t.generated_at),"MMM d, Y"))}},{id:"role_id",header:"Role",renderCell:function(t,n){var i;return r("div",null,z([{name:(i=e.roles.find((function(e){return e.id===n.role_id})))===null||i===void 0?void 0:i.name}]))}},{id:"status",header:"Status",renderCell:function(e,t){return r("div",null,o(t.status))}},{id:"actions",header:"Actions",renderCell:function(t,n){return r("div",null,r("div",{innerHTML:Z,onClick:function(){return e.deletingInvitation=n}}),r("div",{innerHTML:N,onClick:function(){return e.resendingInvitation=n}}))}}]}),r("verdocs-button",{label:"Invite New Member",size:"normal",disabled:this.submitting,onClick:function(){return e.invitingMember=true}}),this.invitingMember&&r("verdocs-dialog",{onExit:function(){return e.invitingMember=false}},r("div",{slot:"title",class:"heading"},"Invite New Member"),r("div",{class:"content"},r("verdocs-text-input",{label:"E-mail Address",placeholder:"Enter the user's email address...",id:"verdocs-invite-email",value:this.newEmailAddress,autocomplete:"off",required:true,onInput:function(t){return e.newEmailAddress=t.target.value},onFocusout:function(t){e.newEmailAddress=t.target.value.trim()}}),r("div",{style:{marginBottom:"20px"}}),r("verdocs-select-input",{options:t,label:"Role",onInput:function(t){e.newRoleId=t.target.value}}),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",label:"Cancel",disabled:this.submitting,onClick:function(){return e.invitingMember=false}}),r("verdocs-button",{size:"small",label:"OK",disabled:this.submitting||!this.newEmailAddress||!this.newRoleId,onClick:function(){return e.handleInviteMember()}})))),this.deletingMember&&r("verdocs-dialog",{onExit:function(){return e.deletingMember=null}},r("div",{slot:"title",class:"heading"},"Delete Member?"),r("div",{class:"content"},r("p",null,"Are you sure you want to delete this member? This action cannot be undone."),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",disabled:this.submitting,label:"Cancel",onClick:function(){return e.deletingMember=null}}),r("verdocs-button",{size:"small",label:"OK",disabled:this.submitting,onClick:function(){return e.handleDeleteMember()}})))),this.deletingInvitation&&r("verdocs-dialog",{onExit:function(){return e.deletingInvitation=null}},r("div",{slot:"title",class:"heading"},"Cancel Invitation?"),r("div",{class:"content"},r("p",null,"Are you sure you want to cancel this invitation? This action cannot be undone."),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",disabled:this.submitting,label:"Cancel",onClick:function(){return e.deletingInvitation=null}}),r("verdocs-button",{size:"small",label:"OK",disabled:this.submitting,onClick:function(){return e.handleDeleteInvitation()}})))),this.resendingInvitation&&r("verdocs-dialog",{onExit:function(){return e.resendingInvitation=null}},r("div",{slot:"title",class:"heading"},"Resend Invitation?"),r("div",{class:"content"},r("p",null,"The user will receive an email reminder to join your organization."),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",disabled:this.submitting,label:"Cancel",onClick:function(){return e.resendingInvitation=null}}),r("verdocs-button",{size:"small",label:"OK",disabled:this.submitting,onClick:function(){return e.handleResendInvitation()}})))))};return e}());R.style=E;var D;(function(e){e.assertEqual=function(e){return e};function t(e){}e.assertIs=t;function n(e){throw new Error}e.assertNever=n;e.arrayToEnum=function(e){var t={};for(var n=0,r=e;n<r.length;n++){var i=r[n];t[i]=i}return t};e.getValidEnumValues=function(t){var n=e.objectKeys(t).filter((function(e){return typeof t[t[e]]!=="number"}));var r={};for(var i=0,a=n;i<a.length;i++){var s=a[i];r[s]=t[s]}return e.objectValues(r)};e.objectValues=function(t){return e.objectKeys(t).map((function(e){return t[e]}))};e.objectKeys=typeof Object.keys==="function"?function(e){return Object.keys(e)}:function(e){var t=[];for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){t.push(n)}}return t};e.find=function(e,t){for(var n=0,r=e;n<r.length;n++){var i=r[n];if(t(i))return i}return undefined};e.isInteger=typeof Number.isInteger==="function"?function(e){return Number.isInteger(e)}:function(e){return typeof e==="number"&&isFinite(e)&&Math.floor(e)===e};function r(e,t){if(t===void 0){t=" | "}return e.map((function(e){return typeof e==="string"?"'".concat(e,"'"):e})).join(t)}e.joinValues=r;e.jsonStringifyReplacer=function(e,t){if(typeof t==="bigint"){return t.toString()}return t}})(D||(D={}));var L;(function(e){e.mergeShapes=function(e,t){return __assign(__assign({},e),t)}})(L||(L={}));var U=D.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);var B=function(e){var t=typeof e;switch(t){case"undefined":return U.undefined;case"string":return U.string;case"number":return isNaN(e)?U.nan:U.number;case"boolean":return U.boolean;case"function":return U.function;case"bigint":return U.bigint;case"symbol":return U.symbol;case"object":if(Array.isArray(e)){return U.array}if(e===null){return U.null}if(e.then&&typeof e.then==="function"&&e.catch&&typeof e.catch==="function"){return U.promise}if(typeof Map!=="undefined"&&e instanceof Map){return U.map}if(typeof Set!=="undefined"&&e instanceof Set){return U.set}if(typeof Date!=="undefined"&&e instanceof Date){return U.date}return U.object;default:return U.unknown}};var V=D.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"]);var F=function(e){var t=JSON.stringify(e,null,2);return t.replace(/"([^"]+)":/g,"$1:")};var W=function(e){__extends(t,e);function t(t){var n=this.constructor;var r=e.call(this)||this;r.issues=[];r.addIssue=function(e){r.issues=__spreadArray(__spreadArray([],r.issues,true),[e],false)};r.addIssues=function(e){if(e===void 0){e=[]}r.issues=__spreadArray(__spreadArray([],r.issues,true),e,true)};var i=n.prototype;if(Object.setPrototypeOf){Object.setPrototypeOf(r,i)}else{r.__proto__=i}r.name="ZodError";r.issues=t;return r}Object.defineProperty(t.prototype,"errors",{get:function(){return this.issues},enumerable:false,configurable:true});t.prototype.format=function(e){var t=e||function(e){return e.message};var n={_errors:[]};var r=function(e){for(var i=0,a=e.issues;i<a.length;i++){var s=a[i];if(s.code==="invalid_union"){s.unionErrors.map(r)}else if(s.code==="invalid_return_type"){r(s.returnTypeError)}else if(s.code==="invalid_arguments"){r(s.argumentsError)}else if(s.path.length===0){n._errors.push(t(s))}else{var o=n;var u=0;while(u<s.path.length){var l=s.path[u];var c=u===s.path.length-1;if(!c){o[l]=o[l]||{_errors:[]}}else{o[l]=o[l]||{_errors:[]};o[l]._errors.push(t(s))}o=o[l];u++}}}};r(this);return n};t.assert=function(e){if(!(e instanceof t)){throw new Error("Not a ZodError: ".concat(e))}};t.prototype.toString=function(){return this.message};Object.defineProperty(t.prototype,"message",{get:function(){return JSON.stringify(this.issues,D.jsonStringifyReplacer,2)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isEmpty",{get:function(){return this.issues.length===0},enumerable:false,configurable:true});t.prototype.flatten=function(e){if(e===void 0){e=function(e){return e.message}}var t={};var n=[];for(var r=0,i=this.issues;r<i.length;r++){var a=i[r];if(a.path.length>0){t[a.path[0]]=t[a.path[0]]||[];t[a.path[0]].push(e(a))}else{n.push(e(a))}}return{formErrors:n,fieldErrors:t}};Object.defineProperty(t.prototype,"formErrors",{get:function(){return this.flatten()},enumerable:false,configurable:true});return t}(Error);W.create=function(e){var t=new W(e);return t};var q=function(e,t){var n;switch(e.code){case V.invalid_type:if(e.received===U.undefined){n="Required"}else{n="Expected ".concat(e.expected,", received ").concat(e.received)}break;case V.invalid_literal:n="Invalid literal value, expected ".concat(JSON.stringify(e.expected,D.jsonStringifyReplacer));break;case V.unrecognized_keys:n="Unrecognized key(s) in object: ".concat(D.joinValues(e.keys,", "));break;case V.invalid_union:n="Invalid input";break;case V.invalid_union_discriminator:n="Invalid discriminator value. Expected ".concat(D.joinValues(e.options));break;case V.invalid_enum_value:n="Invalid enum value. Expected ".concat(D.joinValues(e.options),", received '").concat(e.received,"'");break;case V.invalid_arguments:n="Invalid function arguments";break;case V.invalid_return_type:n="Invalid function return type";break;case V.invalid_date:n="Invalid date";break;case V.invalid_string:if(typeof e.validation==="object"){if("includes"in e.validation){n='Invalid input: must include "'.concat(e.validation.includes,'"');if(typeof e.validation.position==="number"){n="".concat(n," at one or more positions greater than or equal to ").concat(e.validation.position)}}else if("startsWith"in e.validation){n='Invalid input: must start with "'.concat(e.validation.startsWith,'"')}else if("endsWith"in e.validation){n='Invalid input: must end with "'.concat(e.validation.endsWith,'"')}else{D.assertNever(e.validation)}}else if(e.validation!=="regex"){n="Invalid ".concat(e.validation)}else{n="Invalid"}break;case V.too_small:if(e.type==="array")n="Array must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"more than"," ").concat(e.minimum," element(s)");else if(e.type==="string")n="String must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"over"," ").concat(e.minimum," character(s)");else if(e.type==="number")n="Number must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(e.minimum);else if(e.type==="date")n="Date must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(e.minimum)));else n="Invalid input";break;case V.too_big:if(e.type==="array")n="Array must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"less than"," ").concat(e.maximum," element(s)");else if(e.type==="string")n="String must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"under"," ").concat(e.maximum," character(s)");else if(e.type==="number")n="Number must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum);else if(e.type==="bigint")n="BigInt must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum);else if(e.type==="date")n="Date must be ".concat(e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(e.maximum)));else n="Invalid input";break;case V.custom:n="Invalid input";break;case V.invalid_intersection_types:n="Intersection results could not be merged";break;case V.not_multiple_of:n="Number must be a multiple of ".concat(e.multipleOf);break;case V.not_finite:n="Number must be finite";break;default:n=t.defaultError;D.assertNever(e)}return{message:n}};var H=q;function $(e){H=e}function J(){return H}var Y=function(e){var t=e.data,n=e.path,r=e.errorMaps,i=e.issueData;var a=__spreadArray(__spreadArray([],n,true),i.path||[],true);var s=__assign(__assign({},i),{path:a});if(i.message!==undefined){return __assign(__assign({},i),{path:a,message:i.message})}var o="";var u=r.filter((function(e){return!!e})).slice().reverse();for(var l=0,c=u;l<c.length;l++){var d=c[l];o=d(s,{data:t,defaultError:o}).message}return __assign(__assign({},i),{path:a,message:o})};var Q=[];function X(e,t){var n=J();var r=Y({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===q?undefined:q].filter((function(e){return!!e}))});e.common.issues.push(r)}var ee=function(){function e(){this.value="valid"}e.prototype.dirty=function(){if(this.value==="valid")this.value="dirty"};e.prototype.abort=function(){if(this.value!=="aborted")this.value="aborted"};e.mergeArray=function(e,t){var n=[];for(var r=0,i=t;r<i.length;r++){var a=i[r];if(a.status==="aborted")return te;if(a.status==="dirty")e.dirty();n.push(a.value)}return{status:e.value,value:n}};e.mergeObjectAsync=function(t,n){return __awaiter(this,void 0,void 0,(function(){var r,i,a,s,o,u;return __generator(this,(function(l){switch(l.label){case 0:r=[];i=0,a=n;l.label=1;case 1:if(!(i<a.length))return[3,5];s=a[i];return[4,s.key];case 2:o=l.sent();return[4,s.value];case 3:u=l.sent();r.push({key:o,value:u});l.label=4;case 4:i++;return[3,1];case 5:return[2,e.mergeObjectSync(t,r)]}}))}))};e.mergeObjectSync=function(e,t){var n={};for(var r=0,i=t;r<i.length;r++){var a=i[r];var s=a.key,o=a.value;if(s.status==="aborted")return te;if(o.status==="aborted")return te;if(s.status==="dirty")e.dirty();if(o.status==="dirty")e.dirty();if(s.value!=="__proto__"&&(typeof o.value!=="undefined"||a.alwaysSet)){n[s.value]=o.value}}return{status:e.value,value:n}};return e}();var te=Object.freeze({status:"aborted"});var ne=function(e){return{status:"dirty",value:e}};var re=function(e){return{status:"valid",value:e}};var ie=function(e){return e.status==="aborted"};var ae=function(e){return e.status==="dirty"};var se=function(e){return e.status==="valid"};var oe=function(e){return typeof Promise!=="undefined"&&e instanceof Promise};function ue(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function le(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t==="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n}typeof SuppressedError==="function"?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};var ce;(function(e){e.errToObj=function(e){return typeof e==="string"?{message:e}:e||{}};e.toString=function(e){return typeof e==="string"?e:e===null||e===void 0?void 0:e.message}})(ce||(ce={}));var de,fe;var pe=function(){function e(e,t,n,r){this._cachedPath=[];this.parent=e;this.data=t;this._path=n;this._key=r}Object.defineProperty(e.prototype,"path",{get:function(){var e,t;if(!this._cachedPath.length){if(this._key instanceof Array){(e=this._cachedPath).push.apply(e,__spreadArray(__spreadArray([],this._path,false),this._key,false))}else{(t=this._cachedPath).push.apply(t,__spreadArray(__spreadArray([],this._path,false),[this._key],false))}}return this._cachedPath},enumerable:false,configurable:true});return e}();var he=function(e,t){if(se(t)){return{success:true,data:t.value}}else{if(!e.common.issues.length){throw new Error("Validation failed but no issues detected.")}return{success:false,get error(){if(this._error)return this._error;var t=new W(e.common.issues);this._error=t;return this._error}}}};function ve(e){if(!e)return{};var t=e.errorMap,n=e.invalid_type_error,r=e.required_error,i=e.description;if(t&&(n||r)){throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.')}if(t)return{errorMap:t,description:i};var a=function(t,i){var a,s;var o=e.message;if(t.code==="invalid_enum_value"){return{message:o!==null&&o!==void 0?o:i.defaultError}}if(typeof i.data==="undefined"){return{message:(a=o!==null&&o!==void 0?o:r)!==null&&a!==void 0?a:i.defaultError}}if(t.code!=="invalid_type")return{message:i.defaultError};return{message:(s=o!==null&&o!==void 0?o:n)!==null&&s!==void 0?s:i.defaultError}};return{errorMap:a,description:i}}var me=function(){function e(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)}Object.defineProperty(e.prototype,"description",{get:function(){return this._def.description},enumerable:false,configurable:true});e.prototype._getType=function(e){return B(e.data)};e.prototype._getOrReturnCtx=function(e,t){return t||{common:e.parent.common,data:e.data,parsedType:B(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}};e.prototype._processInputParams=function(e){return{status:new ee,ctx:{common:e.parent.common,data:e.data,parsedType:B(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}};e.prototype._parseSync=function(e){var t=this._parse(e);if(oe(t)){throw new Error("Synchronous parse encountered promise.")}return t};e.prototype._parseAsync=function(e){var t=this._parse(e);return Promise.resolve(t)};e.prototype.parse=function(e,t){var n=this.safeParse(e,t);if(n.success)return n.data;throw n.error};e.prototype.safeParse=function(e,t){var n;var r={common:{issues:[],async:(n=t===null||t===void 0?void 0:t.async)!==null&&n!==void 0?n:false,contextualErrorMap:t===null||t===void 0?void 0:t.errorMap},path:(t===null||t===void 0?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)};var i=this._parseSync({data:e,path:r.path,parent:r});return he(r,i)};e.prototype.parseAsync=function(e,t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(r){switch(r.label){case 0:return[4,this.safeParseAsync(e,t)];case 1:n=r.sent();if(n.success)return[2,n.data];throw n.error}}))}))};e.prototype.safeParseAsync=function(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,i;return __generator(this,(function(a){switch(a.label){case 0:n={common:{issues:[],contextualErrorMap:t===null||t===void 0?void 0:t.errorMap,async:true},path:(t===null||t===void 0?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)};r=this._parse({data:e,path:n.path,parent:n});return[4,oe(r)?r:Promise.resolve(r)];case 1:i=a.sent();return[2,he(n,i)]}}))}))};e.prototype.refine=function(e,t){var n=function(e){if(typeof t==="string"||typeof t==="undefined"){return{message:t}}else if(typeof t==="function"){return t(e)}else{return t}};return this._refinement((function(t,r){var i=e(t);var a=function(){return r.addIssue(__assign({code:V.custom},n(t)))};if(typeof Promise!=="undefined"&&i instanceof Promise){return i.then((function(e){if(!e){a();return false}else{return true}}))}if(!i){a();return false}else{return true}}))};e.prototype.refinement=function(e,t){return this._refinement((function(n,r){if(!e(n)){r.addIssue(typeof t==="function"?t(n,r):t);return false}else{return true}}))};e.prototype._refinement=function(e){return new pt({schema:this,typeName:wt.ZodEffects,effect:{type:"refinement",refinement:e}})};e.prototype.superRefine=function(e){return this._refinement(e)};e.prototype.optional=function(){return ht.create(this,this._def)};e.prototype.nullable=function(){return vt.create(this,this._def)};e.prototype.nullish=function(){return this.nullable().optional()};e.prototype.array=function(){return He.create(this,this._def)};e.prototype.promise=function(){return ft.create(this,this._def)};e.prototype.or=function(e){return Ye.create([this,e],this._def)};e.prototype.and=function(e){return tt.create(this,e,this._def)};e.prototype.transform=function(e){return new pt(__assign(__assign({},ve(this._def)),{schema:this,typeName:wt.ZodEffects,effect:{type:"transform",transform:e}}))};e.prototype.default=function(e){var t=typeof e==="function"?e:function(){return e};return new mt(__assign(__assign({},ve(this._def)),{innerType:this,defaultValue:t,typeName:wt.ZodDefault}))};e.prototype.brand=function(){return new bt(__assign({typeName:wt.ZodBranded,type:this},ve(this._def)))};e.prototype.catch=function(e){var t=typeof e==="function"?e:function(){return e};return new gt(__assign(__assign({},ve(this._def)),{innerType:this,catchValue:t,typeName:wt.ZodCatch}))};e.prototype.describe=function(e){var t=this.constructor;return new t(__assign(__assign({},this._def),{description:e}))};e.prototype.pipe=function(e){return Tt.create(this,e)};e.prototype.readonly=function(){return kt.create(this)};e.prototype.isOptional=function(){return this.safeParse(undefined).success};e.prototype.isNullable=function(){return this.safeParse(null).success};return e}();var ge=/^c[^\s-]{8,}$/i;var _e=/^[0-9a-z]+$/;var ye=/^[0-9A-HJKMNP-TV-Z]{26}$/;var be=/^[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;var Te=/^[a-z0-9_-]{21}$/i;var ke=/^[-+]?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)?)??$/;var xe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;var Me="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";var we;var Ge=/^(?:(?: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])$/;var Ie=/^(([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})))$/;var Se=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;var Ce="((\\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])))";var Ae=new RegExp("^".concat(Ce,"$"));function Pe(e){var t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";if(e.precision){t="".concat(t,"\\.\\d{").concat(e.precision,"}")}else if(e.precision==null){t="".concat(t,"(\\.\\d+)?")}return t}function je(e){return new RegExp("^".concat(Pe(e),"$"))}function Oe(e){var t="".concat(Ce,"T").concat(Pe(e));var n=[];n.push(e.local?"Z?":"Z");if(e.offset)n.push("([+-]\\d{2}:?\\d{2})");t="".concat(t,"(").concat(n.join("|"),")");return new RegExp("^".concat(t,"$"))}function Ee(e,t){if((t==="v4"||!t)&&Ge.test(e)){return true}if((t==="v6"||!t)&&Ie.test(e)){return true}return false}var Ze=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){if(this._def.coerce){e.data=String(e.data)}var t=this._getType(e);if(t!==U.string){var n=this._getOrReturnCtx(e);X(n,{code:V.invalid_type,expected:U.string,received:n.parsedType});return te}var r=new ee;var i=undefined;for(var a=0,s=this._def.checks;a<s.length;a++){var o=s[a];if(o.kind==="min"){if(e.data.length<o.value){i=this._getOrReturnCtx(e,i);X(i,{code:V.too_small,minimum:o.value,type:"string",inclusive:true,exact:false,message:o.message});r.dirty()}}else if(o.kind==="max"){if(e.data.length>o.value){i=this._getOrReturnCtx(e,i);X(i,{code:V.too_big,maximum:o.value,type:"string",inclusive:true,exact:false,message:o.message});r.dirty()}}else if(o.kind==="length"){var u=e.data.length>o.value;var l=e.data.length<o.value;if(u||l){i=this._getOrReturnCtx(e,i);if(u){X(i,{code:V.too_big,maximum:o.value,type:"string",inclusive:true,exact:true,message:o.message})}else if(l){X(i,{code:V.too_small,minimum:o.value,type:"string",inclusive:true,exact:true,message:o.message})}r.dirty()}}else if(o.kind==="email"){if(!xe.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"email",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="emoji"){if(!we){we=new RegExp(Me,"u")}if(!we.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"emoji",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="uuid"){if(!be.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"uuid",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="nanoid"){if(!Te.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"nanoid",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="cuid"){if(!ge.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"cuid",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="cuid2"){if(!_e.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"cuid2",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="ulid"){if(!ye.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"ulid",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="url"){try{new URL(e.data)}catch(t){i=this._getOrReturnCtx(e,i);X(i,{validation:"url",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="regex"){o.regex.lastIndex=0;var c=o.regex.test(e.data);if(!c){i=this._getOrReturnCtx(e,i);X(i,{validation:"regex",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="trim"){e.data=e.data.trim()}else if(o.kind==="includes"){if(!e.data.includes(o.value,o.position)){i=this._getOrReturnCtx(e,i);X(i,{code:V.invalid_string,validation:{includes:o.value,position:o.position},message:o.message});r.dirty()}}else if(o.kind==="toLowerCase"){e.data=e.data.toLowerCase()}else if(o.kind==="toUpperCase"){e.data=e.data.toUpperCase()}else if(o.kind==="startsWith"){if(!e.data.startsWith(o.value)){i=this._getOrReturnCtx(e,i);X(i,{code:V.invalid_string,validation:{startsWith:o.value},message:o.message});r.dirty()}}else if(o.kind==="endsWith"){if(!e.data.endsWith(o.value)){i=this._getOrReturnCtx(e,i);X(i,{code:V.invalid_string,validation:{endsWith:o.value},message:o.message});r.dirty()}}else if(o.kind==="datetime"){var d=Oe(o);if(!d.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{code:V.invalid_string,validation:"datetime",message:o.message});r.dirty()}}else if(o.kind==="date"){var d=Ae;if(!d.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{code:V.invalid_string,validation:"date",message:o.message});r.dirty()}}else if(o.kind==="time"){var d=je(o);if(!d.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{code:V.invalid_string,validation:"time",message:o.message});r.dirty()}}else if(o.kind==="duration"){if(!ke.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"duration",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="ip"){if(!Ee(e.data,o.version)){i=this._getOrReturnCtx(e,i);X(i,{validation:"ip",code:V.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="base64"){if(!Se.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"base64",code:V.invalid_string,message:o.message});r.dirty()}}else{D.assertNever(o)}}return{status:r.value,value:e.data}};t.prototype._regex=function(e,t,n){return this.refinement((function(t){return e.test(t)}),__assign({validation:t,code:V.invalid_string},ce.errToObj(n)))};t.prototype._addCheck=function(e){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[e],false)}))};t.prototype.email=function(e){return this._addCheck(__assign({kind:"email"},ce.errToObj(e)))};t.prototype.url=function(e){return this._addCheck(__assign({kind:"url"},ce.errToObj(e)))};t.prototype.emoji=function(e){return this._addCheck(__assign({kind:"emoji"},ce.errToObj(e)))};t.prototype.uuid=function(e){return this._addCheck(__assign({kind:"uuid"},ce.errToObj(e)))};t.prototype.nanoid=function(e){return this._addCheck(__assign({kind:"nanoid"},ce.errToObj(e)))};t.prototype.cuid=function(e){return this._addCheck(__assign({kind:"cuid"},ce.errToObj(e)))};t.prototype.cuid2=function(e){return this._addCheck(__assign({kind:"cuid2"},ce.errToObj(e)))};t.prototype.ulid=function(e){return this._addCheck(__assign({kind:"ulid"},ce.errToObj(e)))};t.prototype.base64=function(e){return this._addCheck(__assign({kind:"base64"},ce.errToObj(e)))};t.prototype.ip=function(e){return this._addCheck(__assign({kind:"ip"},ce.errToObj(e)))};t.prototype.datetime=function(e){var t,n;if(typeof e==="string"){return this._addCheck({kind:"datetime",precision:null,offset:false,local:false,message:e})}return this._addCheck(__assign({kind:"datetime",precision:typeof(e===null||e===void 0?void 0:e.precision)==="undefined"?null:e===null||e===void 0?void 0:e.precision,offset:(t=e===null||e===void 0?void 0:e.offset)!==null&&t!==void 0?t:false,local:(n=e===null||e===void 0?void 0:e.local)!==null&&n!==void 0?n:false},ce.errToObj(e===null||e===void 0?void 0:e.message)))};t.prototype.date=function(e){return this._addCheck({kind:"date",message:e})};t.prototype.time=function(e){if(typeof e==="string"){return this._addCheck({kind:"time",precision:null,message:e})}return this._addCheck(__assign({kind:"time",precision:typeof(e===null||e===void 0?void 0:e.precision)==="undefined"?null:e===null||e===void 0?void 0:e.precision},ce.errToObj(e===null||e===void 0?void 0:e.message)))};t.prototype.duration=function(e){return this._addCheck(__assign({kind:"duration"},ce.errToObj(e)))};t.prototype.regex=function(e,t){return this._addCheck(__assign({kind:"regex",regex:e},ce.errToObj(t)))};t.prototype.includes=function(e,t){return this._addCheck(__assign({kind:"includes",value:e,position:t===null||t===void 0?void 0:t.position},ce.errToObj(t===null||t===void 0?void 0:t.message)))};t.prototype.startsWith=function(e,t){return this._addCheck(__assign({kind:"startsWith",value:e},ce.errToObj(t)))};t.prototype.endsWith=function(e,t){return this._addCheck(__assign({kind:"endsWith",value:e},ce.errToObj(t)))};t.prototype.min=function(e,t){return this._addCheck(__assign({kind:"min",value:e},ce.errToObj(t)))};t.prototype.max=function(e,t){return this._addCheck(__assign({kind:"max",value:e},ce.errToObj(t)))};t.prototype.length=function(e,t){return this._addCheck(__assign({kind:"length",value:e},ce.errToObj(t)))};t.prototype.nonempty=function(e){return this.min(1,ce.errToObj(e))};t.prototype.trim=function(){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[{kind:"trim"}],false)}))};t.prototype.toLowerCase=function(){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[{kind:"toLowerCase"}],false)}))};t.prototype.toUpperCase=function(){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[{kind:"toUpperCase"}],false)}))};Object.defineProperty(t.prototype,"isDatetime",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="datetime"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isDate",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="date"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isTime",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="time"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isDuration",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="duration"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isEmail",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="email"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isURL",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="url"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isEmoji",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="emoji"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isUUID",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="uuid"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isNANOID",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="nanoid"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isCUID",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="cuid"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isCUID2",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="cuid2"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isULID",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="ulid"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isIP",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="ip"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isBase64",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="base64"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"minLength",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="min"){if(e===null||r.value>e)e=r.value}}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"maxLength",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="max"){if(e===null||r.value<e)e=r.value}}return e},enumerable:false,configurable:true});return t}(me);Ze.create=function(e){var t;return new Ze(__assign({checks:[],typeName:wt.ZodString,coerce:(t=e===null||e===void 0?void 0:e.coerce)!==null&&t!==void 0?t:false},ve(e)))};function Ne(e,t){var n=(e.toString().split(".")[1]||"").length;var r=(t.toString().split(".")[1]||"").length;var i=n>r?n:r;var a=parseInt(e.toFixed(i).replace(".",""));var s=parseInt(t.toFixed(i).replace(".",""));return a%s/Math.pow(10,i)}var ze=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t.min=t.gte;t.max=t.lte;t.step=t.multipleOf;return t}t.prototype._parse=function(e){if(this._def.coerce){e.data=Number(e.data)}var t=this._getType(e);if(t!==U.number){var n=this._getOrReturnCtx(e);X(n,{code:V.invalid_type,expected:U.number,received:n.parsedType});return te}var r=undefined;var i=new ee;for(var a=0,s=this._def.checks;a<s.length;a++){var o=s[a];if(o.kind==="int"){if(!D.isInteger(e.data)){r=this._getOrReturnCtx(e,r);X(r,{code:V.invalid_type,expected:"integer",received:"float",message:o.message});i.dirty()}}else if(o.kind==="min"){var u=o.inclusive?e.data<o.value:e.data<=o.value;if(u){r=this._getOrReturnCtx(e,r);X(r,{code:V.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:false,message:o.message});i.dirty()}}else if(o.kind==="max"){var l=o.inclusive?e.data>o.value:e.data>=o.value;if(l){r=this._getOrReturnCtx(e,r);X(r,{code:V.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:false,message:o.message});i.dirty()}}else if(o.kind==="multipleOf"){if(Ne(e.data,o.value)!==0){r=this._getOrReturnCtx(e,r);X(r,{code:V.not_multiple_of,multipleOf:o.value,message:o.message});i.dirty()}}else if(o.kind==="finite"){if(!Number.isFinite(e.data)){r=this._getOrReturnCtx(e,r);X(r,{code:V.not_finite,message:o.message});i.dirty()}}else{D.assertNever(o)}}return{status:i.value,value:e.data}};t.prototype.gte=function(e,t){return this.setLimit("min",e,true,ce.toString(t))};t.prototype.gt=function(e,t){return this.setLimit("min",e,false,ce.toString(t))};t.prototype.lte=function(e,t){return this.setLimit("max",e,true,ce.toString(t))};t.prototype.lt=function(e,t){return this.setLimit("max",e,false,ce.toString(t))};t.prototype.setLimit=function(e,n,r,i){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[{kind:e,value:n,inclusive:r,message:ce.toString(i)}],false)}))};t.prototype._addCheck=function(e){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[e],false)}))};t.prototype.int=function(e){return this._addCheck({kind:"int",message:ce.toString(e)})};t.prototype.positive=function(e){return this._addCheck({kind:"min",value:0,inclusive:false,message:ce.toString(e)})};t.prototype.negative=function(e){return this._addCheck({kind:"max",value:0,inclusive:false,message:ce.toString(e)})};t.prototype.nonpositive=function(e){return this._addCheck({kind:"max",value:0,inclusive:true,message:ce.toString(e)})};t.prototype.nonnegative=function(e){return this._addCheck({kind:"min",value:0,inclusive:true,message:ce.toString(e)})};t.prototype.multipleOf=function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ce.toString(t)})};t.prototype.finite=function(e){return this._addCheck({kind:"finite",message:ce.toString(e)})};t.prototype.safe=function(e){return this._addCheck({kind:"min",inclusive:true,value:Number.MIN_SAFE_INTEGER,message:ce.toString(e)})._addCheck({kind:"max",inclusive:true,value:Number.MAX_SAFE_INTEGER,message:ce.toString(e)})};Object.defineProperty(t.prototype,"minValue",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="min"){if(e===null||r.value>e)e=r.value}}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"maxValue",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="max"){if(e===null||r.value<e)e=r.value}}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isInt",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="int"||e.kind==="multipleOf"&&D.isInteger(e.value)}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isFinite",{get:function(){var e=null,t=null;for(var n=0,r=this._def.checks;n<r.length;n++){var i=r[n];if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf"){return true}else if(i.kind==="min"){if(t===null||i.value>t)t=i.value}else if(i.kind==="max"){if(e===null||i.value<e)e=i.value}}return Number.isFinite(t)&&Number.isFinite(e)},enumerable:false,configurable:true});return t}(me);ze.create=function(e){return new ze(__assign({checks:[],typeName:wt.ZodNumber,coerce:(e===null||e===void 0?void 0:e.coerce)||false},ve(e)))};var Ke=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t.min=t.gte;t.max=t.lte;return t}t.prototype._parse=function(e){if(this._def.coerce){e.data=BigInt(e.data)}var t=this._getType(e);if(t!==U.bigint){var n=this._getOrReturnCtx(e);X(n,{code:V.invalid_type,expected:U.bigint,received:n.parsedType});return te}var r=undefined;var i=new ee;for(var a=0,s=this._def.checks;a<s.length;a++){var o=s[a];if(o.kind==="min"){var u=o.inclusive?e.data<o.value:e.data<=o.value;if(u){r=this._getOrReturnCtx(e,r);X(r,{code:V.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message});i.dirty()}}else if(o.kind==="max"){var l=o.inclusive?e.data>o.value:e.data>=o.value;if(l){r=this._getOrReturnCtx(e,r);X(r,{code:V.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message});i.dirty()}}else if(o.kind==="multipleOf"){if(e.data%o.value!==BigInt(0)){r=this._getOrReturnCtx(e,r);X(r,{code:V.not_multiple_of,multipleOf:o.value,message:o.message});i.dirty()}}else{D.assertNever(o)}}return{status:i.value,value:e.data}};t.prototype.gte=function(e,t){return this.setLimit("min",e,true,ce.toString(t))};t.prototype.gt=function(e,t){return this.setLimit("min",e,false,ce.toString(t))};t.prototype.lte=function(e,t){return this.setLimit("max",e,true,ce.toString(t))};t.prototype.lt=function(e,t){return this.setLimit("max",e,false,ce.toString(t))};t.prototype.setLimit=function(e,n,r,i){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[{kind:e,value:n,inclusive:r,message:ce.toString(i)}],false)}))};t.prototype._addCheck=function(e){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[e],false)}))};t.prototype.positive=function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:false,message:ce.toString(e)})};t.prototype.negative=function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:false,message:ce.toString(e)})};t.prototype.nonpositive=function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:true,message:ce.toString(e)})};t.prototype.nonnegative=function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:true,message:ce.toString(e)})};t.prototype.multipleOf=function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ce.toString(t)})};Object.defineProperty(t.prototype,"minValue",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="min"){if(e===null||r.value>e)e=r.value}}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"maxValue",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="max"){if(e===null||r.value<e)e=r.value}}return e},enumerable:false,configurable:true});return t}(me);Ke.create=function(e){var t;return new Ke(__assign({checks:[],typeName:wt.ZodBigInt,coerce:(t=e===null||e===void 0?void 0:e.coerce)!==null&&t!==void 0?t:false},ve(e)))};var Re=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){if(this._def.coerce){e.data=Boolean(e.data)}var t=this._getType(e);if(t!==U.boolean){var n=this._getOrReturnCtx(e);X(n,{code:V.invalid_type,expected:U.boolean,received:n.parsedType});return te}return re(e.data)};return t}(me);Re.create=function(e){return new Re(__assign({typeName:wt.ZodBoolean,coerce:(e===null||e===void 0?void 0:e.coerce)||false},ve(e)))};var De=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){if(this._def.coerce){e.data=new Date(e.data)}var t=this._getType(e);if(t!==U.date){var n=this._getOrReturnCtx(e);X(n,{code:V.invalid_type,expected:U.date,received:n.parsedType});return te}if(isNaN(e.data.getTime())){var r=this._getOrReturnCtx(e);X(r,{code:V.invalid_date});return te}var i=new ee;var a=undefined;for(var s=0,o=this._def.checks;s<o.length;s++){var u=o[s];if(u.kind==="min"){if(e.data.getTime()<u.value){a=this._getOrReturnCtx(e,a);X(a,{code:V.too_small,message:u.message,inclusive:true,exact:false,minimum:u.value,type:"date"});i.dirty()}}else if(u.kind==="max"){if(e.data.getTime()>u.value){a=this._getOrReturnCtx(e,a);X(a,{code:V.too_big,message:u.message,inclusive:true,exact:false,maximum:u.value,type:"date"});i.dirty()}}else{D.assertNever(u)}}return{status:i.value,value:new Date(e.data.getTime())}};t.prototype._addCheck=function(e){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[e],false)}))};t.prototype.min=function(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:ce.toString(t)})};t.prototype.max=function(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:ce.toString(t)})};Object.defineProperty(t.prototype,"minDate",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="min"){if(e===null||r.value>e)e=r.value}}return e!=null?new Date(e):null},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"maxDate",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="max"){if(e===null||r.value<e)e=r.value}}return e!=null?new Date(e):null},enumerable:false,configurable:true});return t}(me);De.create=function(e){return new De(__assign({checks:[],coerce:(e===null||e===void 0?void 0:e.coerce)||false,typeName:wt.ZodDate},ve(e)))};var Le=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t!==U.symbol){var n=this._getOrReturnCtx(e);X(n,{code:V.invalid_type,expected:U.symbol,received:n.parsedType});return te}return re(e.data)};return t}(me);Le.create=function(e){return new Le(__assign({typeName:wt.ZodSymbol},ve(e)))};var Ue=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t!==U.undefined){var n=this._getOrReturnCtx(e);X(n,{code:V.invalid_type,expected:U.undefined,received:n.parsedType});return te}return re(e.data)};return t}(me);Ue.create=function(e){return new Ue(__assign({typeName:wt.ZodUndefined},ve(e)))};var Be=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t!==U.null){var n=this._getOrReturnCtx(e);X(n,{code:V.invalid_type,expected:U.null,received:n.parsedType});return te}return re(e.data)};return t}(me);Be.create=function(e){return new Be(__assign({typeName:wt.ZodNull},ve(e)))};var Ve=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t._any=true;return t}t.prototype._parse=function(e){return re(e.data)};return t}(me);Ve.create=function(e){return new Ve(__assign({typeName:wt.ZodAny},ve(e)))};var Fe=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t._unknown=true;return t}t.prototype._parse=function(e){return re(e.data)};return t}(me);Fe.create=function(e){return new Fe(__assign({typeName:wt.ZodUnknown},ve(e)))};var We=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getOrReturnCtx(e);X(t,{code:V.invalid_type,expected:U.never,received:t.parsedType});return te};return t}(me);We.create=function(e){return new We(__assign({typeName:wt.ZodNever},ve(e)))};var qe=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t!==U.undefined){var n=this._getOrReturnCtx(e);X(n,{code:V.invalid_type,expected:U.void,received:n.parsedType});return te}return re(e.data)};return t}(me);qe.create=function(e){return new qe(__assign({typeName:wt.ZodVoid},ve(e)))};var He=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._processInputParams(e),n=t.ctx,r=t.status;var i=this._def;if(n.parsedType!==U.array){X(n,{code:V.invalid_type,expected:U.array,received:n.parsedType});return te}if(i.exactLength!==null){var a=n.data.length>i.exactLength.value;var s=n.data.length<i.exactLength.value;if(a||s){X(n,{code:a?V.too_big:V.too_small,minimum:s?i.exactLength.value:undefined,maximum:a?i.exactLength.value:undefined,type:"array",inclusive:true,exact:true,message:i.exactLength.message});r.dirty()}}if(i.minLength!==null){if(n.data.length<i.minLength.value){X(n,{code:V.too_small,minimum:i.minLength.value,type:"array",inclusive:true,exact:false,message:i.minLength.message});r.dirty()}}if(i.maxLength!==null){if(n.data.length>i.maxLength.value){X(n,{code:V.too_big,maximum:i.maxLength.value,type:"array",inclusive:true,exact:false,message:i.maxLength.message});r.dirty()}}if(n.common.async){return Promise.all(__spreadArray([],n.data,true).map((function(e,t){return i.type._parseAsync(new pe(n,e,n.path,t))}))).then((function(e){return ee.mergeArray(r,e)}))}var o=__spreadArray([],n.data,true).map((function(e,t){return i.type._parseSync(new pe(n,e,n.path,t))}));return ee.mergeArray(r,o)};Object.defineProperty(t.prototype,"element",{get:function(){return this._def.type},enumerable:false,configurable:true});t.prototype.min=function(e,n){return new t(__assign(__assign({},this._def),{minLength:{value:e,message:ce.toString(n)}}))};t.prototype.max=function(e,n){return new t(__assign(__assign({},this._def),{maxLength:{value:e,message:ce.toString(n)}}))};t.prototype.length=function(e,n){return new t(__assign(__assign({},this._def),{exactLength:{value:e,message:ce.toString(n)}}))};t.prototype.nonempty=function(e){return this.min(1,e)};return t}(me);He.create=function(e,t){return new He(__assign({type:e,minLength:null,maxLength:null,exactLength:null,typeName:wt.ZodArray},ve(t)))};function $e(e){if(e instanceof Je){var t={};for(var n in e.shape){var r=e.shape[n];t[n]=ht.create($e(r))}return new Je(__assign(__assign({},e._def),{shape:function(){return t}}))}else if(e instanceof He){return new He(__assign(__assign({},e._def),{type:$e(e.element)}))}else if(e instanceof ht){return ht.create($e(e.unwrap()))}else if(e instanceof vt){return vt.create($e(e.unwrap()))}else if(e instanceof nt){return nt.create(e.items.map((function(e){return $e(e)})))}else{return e}}var Je=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t._cached=null;t.nonstrict=t.passthrough;t.augment=t.extend;return t}t.prototype._getCached=function(){if(this._cached!==null)return this._cached;var e=this._def.shape();var t=D.objectKeys(e);return this._cached={shape:e,keys:t}};t.prototype._parse=function(e){var t=this;var n=this._getType(e);if(n!==U.object){var r=this._getOrReturnCtx(e);X(r,{code:V.invalid_type,expected:U.object,received:r.parsedType});return te}var i=this._processInputParams(e),a=i.status,s=i.ctx;var o=this._getCached(),u=o.shape,l=o.keys;var c=[];if(!(this._def.catchall instanceof We&&this._def.unknownKeys==="strip")){for(var d in s.data){if(!l.includes(d)){c.push(d)}}}var f=[];for(var p=0,h=l;p<h.length;p++){var d=h[p];var v=u[d];var m=s.data[d];f.push({key:{status:"valid",value:d},value:v._parse(new pe(s,m,s.path,d)),alwaysSet:d in s.data})}if(this._def.catchall instanceof We){var g=this._def.unknownKeys;if(g==="passthrough"){for(var _=0,y=c;_<y.length;_++){var d=y[_];f.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}})}}else if(g==="strict"){if(c.length>0){X(s,{code:V.unrecognized_keys,keys:c});a.dirty()}}else if(g==="strip");else{throw new Error("Internal ZodObject error: invalid unknownKeys value.")}}else{var b=this._def.catchall;for(var T=0,k=c;T<k.length;T++){var d=k[T];var m=s.data[d];f.push({key:{status:"valid",value:d},value:b._parse(new pe(s,m,s.path,d)),alwaysSet:d in s.data})}}if(s.common.async){return Promise.resolve().then((function(){return __awaiter(t,void 0,void 0,(function(){var e,t,n,r,i,a;return __generator(this,(function(s){switch(s.label){case 0:e=[];t=0,n=f;s.label=1;case 1:if(!(t<n.length))return[3,5];r=n[t];return[4,r.key];case 2:i=s.sent();return[4,r.value];case 3:a=s.sent();e.push({key:i,value:a,alwaysSet:r.alwaysSet});s.label=4;case 4:t++;return[3,1];case 5:return[2,e]}}))}))})).then((function(e){return ee.mergeObjectSync(a,e)}))}else{return ee.mergeObjectSync(a,f)}};Object.defineProperty(t.prototype,"shape",{get:function(){return this._def.shape()},enumerable:false,configurable:true});t.prototype.strict=function(e){var n=this;return new t(__assign(__assign(__assign({},this._def),{unknownKeys:"strict"}),e!==undefined?{errorMap:function(t,r){var i,a,s,o;var u=(s=(a=(i=n._def).errorMap)===null||a===void 0?void 0:a.call(i,t,r).message)!==null&&s!==void 0?s:r.defaultError;if(t.code==="unrecognized_keys")return{message:(o=ce.errToObj(e).message)!==null&&o!==void 0?o:u};return{message:u}}}:{}))};t.prototype.strip=function(){return new t(__assign(__assign({},this._def),{unknownKeys:"strip"}))};t.prototype.passthrough=function(){return new t(__assign(__assign({},this._def),{unknownKeys:"passthrough"}))};t.prototype.extend=function(e){var n=this;return new t(__assign(__assign({},this._def),{shape:function(){return __assign(__assign({},n._def.shape()),e)}}))};t.prototype.merge=function(e){var n=this;var r=new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:function(){return __assign(__assign({},n._def.shape()),e._def.shape())},typeName:wt.ZodObject});return r};t.prototype.setKey=function(e,t){var n;return this.augment((n={},n[e]=t,n))};t.prototype.catchall=function(e){return new t(__assign(__assign({},this._def),{catchall:e}))};t.prototype.pick=function(e){var n=this;var r={};D.objectKeys(e).forEach((function(t){if(e[t]&&n.shape[t]){r[t]=n.shape[t]}}));return new t(__assign(__assign({},this._def),{shape:function(){return r}}))};t.prototype.omit=function(e){var n=this;var r={};D.objectKeys(this.shape).forEach((function(t){if(!e[t]){r[t]=n.shape[t]}}));return new t(__assign(__assign({},this._def),{shape:function(){return r}}))};t.prototype.deepPartial=function(){return $e(this)};t.prototype.partial=function(e){var n=this;var r={};D.objectKeys(this.shape).forEach((function(t){var i=n.shape[t];if(e&&!e[t]){r[t]=i}else{r[t]=i.optional()}}));return new t(__assign(__assign({},this._def),{shape:function(){return r}}))};t.prototype.required=function(e){var n=this;var r={};D.objectKeys(this.shape).forEach((function(t){if(e&&!e[t]){r[t]=n.shape[t]}else{var i=n.shape[t];var a=i;while(a instanceof ht){a=a._def.innerType}r[t]=a}}));return new t(__assign(__assign({},this._def),{shape:function(){return r}}))};t.prototype.keyof=function(){return lt(D.objectKeys(this.shape))};return t}(me);Je.create=function(e,t){return new Je(__assign({shape:function(){return e},unknownKeys:"strip",catchall:We.create(),typeName:wt.ZodObject},ve(t)))};Je.strictCreate=function(e,t){return new Je(__assign({shape:function(){return e},unknownKeys:"strict",catchall:We.create(),typeName:wt.ZodObject},ve(t)))};Je.lazycreate=function(e,t){return new Je(__assign({shape:e,unknownKeys:"strip",catchall:We.create(),typeName:wt.ZodObject},ve(t)))};var Ye=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t;var n=this;var r=this._processInputParams(e).ctx;var i=this._def.options;function a(e){var t;for(var n=0,i=e;n<i.length;n++){var a=i[n];if(a.result.status==="valid"){return a.result}}for(var s=0,o=e;s<o.length;s++){var a=o[s];if(a.result.status==="dirty"){(t=r.common.issues).push.apply(t,a.ctx.common.issues);return a.result}}var u=e.map((function(e){return new W(e.ctx.common.issues)}));X(r,{code:V.invalid_union,unionErrors:u});return te}if(r.common.async){return Promise.all(i.map((function(e){return __awaiter(n,void 0,void 0,(function(){var t;var n;return __generator(this,(function(i){switch(i.label){case 0:t=__assign(__assign({},r),{common:__assign(__assign({},r.common),{issues:[]}),parent:null});n={};return[4,e._parseAsync({data:r.data,path:r.path,parent:t})];case 1:return[2,(n.result=i.sent(),n.ctx=t,n)]}}))}))}))).then(a)}else{var s=undefined;var o=[];for(var u=0,l=i;u<l.length;u++){var c=l[u];var d=__assign(__assign({},r),{common:__assign(__assign({},r.common),{issues:[]}),parent:null});var f=c._parseSync({data:r.data,path:r.path,parent:d});if(f.status==="valid"){return f}else if(f.status==="dirty"&&!s){s={result:f,ctx:d}}if(d.common.issues.length){o.push(d.common.issues)}}if(s){(t=r.common.issues).push.apply(t,s.ctx.common.issues);return s.result}var p=o.map((function(e){return new W(e)}));X(r,{code:V.invalid_union,unionErrors:p});return te}};Object.defineProperty(t.prototype,"options",{get:function(){return this._def.options},enumerable:false,configurable:true});return t}(me);Ye.create=function(e,t){return new Ye(__assign({options:e,typeName:wt.ZodUnion},ve(t)))};var Qe=function(e){if(e instanceof ot){return Qe(e.schema)}else if(e instanceof pt){return Qe(e.innerType())}else if(e instanceof ut){return[e.value]}else if(e instanceof ct){return e.options}else if(e instanceof dt){return D.objectValues(e.enum)}else if(e instanceof mt){return Qe(e._def.innerType)}else if(e instanceof Ue){return[undefined]}else if(e instanceof Be){return[null]}else if(e instanceof ht){return __spreadArray([undefined],Qe(e.unwrap()),true)}else if(e instanceof vt){return __spreadArray([null],Qe(e.unwrap()),true)}else if(e instanceof bt){return Qe(e.unwrap())}else if(e instanceof kt){return Qe(e.unwrap())}else if(e instanceof gt){return Qe(e._def.innerType)}else{return[]}};var Xe=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==U.object){X(t,{code:V.invalid_type,expected:U.object,received:t.parsedType});return te}var n=this.discriminator;var r=t.data[n];var i=this.optionsMap.get(r);if(!i){X(t,{code:V.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]});return te}if(t.common.async){return i._parseAsync({data:t.data,path:t.path,parent:t})}else{return i._parseSync({data:t.data,path:t.path,parent:t})}};Object.defineProperty(t.prototype,"discriminator",{get:function(){return this._def.discriminator},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"options",{get:function(){return this._def.options},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"optionsMap",{get:function(){return this._def.optionsMap},enumerable:false,configurable:true});t.create=function(e,n,r){var i=new Map;for(var a=0,s=n;a<s.length;a++){var o=s[a];var u=Qe(o.shape[e]);if(!u.length){throw new Error("A discriminator value for key `".concat(e,"` could not be extracted from all schema options"))}for(var l=0,c=u;l<c.length;l++){var d=c[l];if(i.has(d)){throw new Error("Discriminator property ".concat(String(e)," has duplicate value ").concat(String(d)))}i.set(d,o)}}return new t(__assign({typeName:wt.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i},ve(r)))};return t}(me);function et(e,t){var n=B(e);var r=B(t);if(e===t){return{valid:true,data:e}}else if(n===U.object&&r===U.object){var i=D.objectKeys(t);var a=D.objectKeys(e).filter((function(e){return i.indexOf(e)!==-1}));var s=__assign(__assign({},e),t);for(var o=0,u=a;o<u.length;o++){var l=u[o];var c=et(e[l],t[l]);if(!c.valid){return{valid:false}}s[l]=c.data}return{valid:true,data:s}}else if(n===U.array&&r===U.array){if(e.length!==t.length){return{valid:false}}var d=[];for(var f=0;f<e.length;f++){var p=e[f];var h=t[f];var c=et(p,h);if(!c.valid){return{valid:false}}d.push(c.data)}return{valid:true,data:d}}else if(n===U.date&&r===U.date&&+e===+t){return{valid:true,data:e}}else{return{valid:false}}}var tt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;var i=function(e,t){if(ie(e)||ie(t)){return te}var i=et(e.value,t.value);if(!i.valid){X(r,{code:V.invalid_intersection_types});return te}if(ae(e)||ae(t)){n.dirty()}return{status:n.value,value:i.data}};if(r.common.async){return Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then((function(e){var t=e[0],n=e[1];return i(t,n)}))}else{return i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};return t}(me);tt.create=function(e,t,n){return new tt(__assign({left:e,right:t,typeName:wt.ZodIntersection},ve(n)))};var nt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this;var n=this._processInputParams(e),r=n.status,i=n.ctx;if(i.parsedType!==U.array){X(i,{code:V.invalid_type,expected:U.array,received:i.parsedType});return te}if(i.data.length<this._def.items.length){X(i,{code:V.too_small,minimum:this._def.items.length,inclusive:true,exact:false,type:"array"});return te}var a=this._def.rest;if(!a&&i.data.length>this._def.items.length){X(i,{code:V.too_big,maximum:this._def.items.length,inclusive:true,exact:false,type:"array"});r.dirty()}var s=__spreadArray([],i.data,true).map((function(e,n){var r=t._def.items[n]||t._def.rest;if(!r)return null;return r._parse(new pe(i,e,i.path,n))})).filter((function(e){return!!e}));if(i.common.async){return Promise.all(s).then((function(e){return ee.mergeArray(r,e)}))}else{return ee.mergeArray(r,s)}};Object.defineProperty(t.prototype,"items",{get:function(){return this._def.items},enumerable:false,configurable:true});t.prototype.rest=function(e){return new t(__assign(__assign({},this._def),{rest:e}))};return t}(me);nt.create=function(e,t){if(!Array.isArray(e)){throw new Error("You must pass an array of schemas to z.tuple([ ... ])")}return new nt(__assign({items:e,typeName:wt.ZodTuple,rest:null},ve(t)))};var rt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}Object.defineProperty(t.prototype,"keySchema",{get:function(){return this._def.keyType},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"valueSchema",{get:function(){return this._def.valueType},enumerable:false,configurable:true});t.prototype._parse=function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==U.object){X(r,{code:V.invalid_type,expected:U.object,received:r.parsedType});return te}var i=[];var a=this._def.keyType;var s=this._def.valueType;for(var o in r.data){i.push({key:a._parse(new pe(r,o,r.path,o)),value:s._parse(new pe(r,r.data[o],r.path,o)),alwaysSet:o in r.data})}if(r.common.async){return ee.mergeObjectAsync(n,i)}else{return ee.mergeObjectSync(n,i)}};Object.defineProperty(t.prototype,"element",{get:function(){return this._def.valueType},enumerable:false,configurable:true});t.create=function(e,n,r){if(n instanceof me){return new t(__assign({keyType:e,valueType:n,typeName:wt.ZodRecord},ve(r)))}return new t(__assign({keyType:Ze.create(),valueType:e,typeName:wt.ZodRecord},ve(n)))};return t}(me);var it=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}Object.defineProperty(t.prototype,"keySchema",{get:function(){return this._def.keyType},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"valueSchema",{get:function(){return this._def.valueType},enumerable:false,configurable:true});t.prototype._parse=function(e){var t=this;var n=this._processInputParams(e),r=n.status,i=n.ctx;if(i.parsedType!==U.map){X(i,{code:V.invalid_type,expected:U.map,received:i.parsedType});return te}var a=this._def.keyType;var s=this._def.valueType;var o=__spreadArray([],i.data.entries(),true).map((function(e,t){var n=e[0],r=e[1];return{key:a._parse(new pe(i,n,i.path,[t,"key"])),value:s._parse(new pe(i,r,i.path,[t,"value"]))}}));if(i.common.async){var u=new Map;return Promise.resolve().then((function(){return __awaiter(t,void 0,void 0,(function(){var e,t,n,i,a;return __generator(this,(function(s){switch(s.label){case 0:e=0,t=o;s.label=1;case 1:if(!(e<t.length))return[3,5];n=t[e];return[4,n.key];case 2:i=s.sent();return[4,n.value];case 3:a=s.sent();if(i.status==="aborted"||a.status==="aborted"){return[2,te]}if(i.status==="dirty"||a.status==="dirty"){r.dirty()}u.set(i.value,a.value);s.label=4;case 4:e++;return[3,1];case 5:return[2,{status:r.value,value:u}]}}))}))}))}else{var l=new Map;for(var c=0,d=o;c<d.length;c++){var f=d[c];var p=f.key;var h=f.value;if(p.status==="aborted"||h.status==="aborted"){return te}if(p.status==="dirty"||h.status==="dirty"){r.dirty()}l.set(p.value,h.value)}return{status:r.value,value:l}}};return t}(me);it.create=function(e,t,n){return new it(__assign({valueType:t,keyType:e,typeName:wt.ZodMap},ve(n)))};var at=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==U.set){X(r,{code:V.invalid_type,expected:U.set,received:r.parsedType});return te}var i=this._def;if(i.minSize!==null){if(r.data.size<i.minSize.value){X(r,{code:V.too_small,minimum:i.minSize.value,type:"set",inclusive:true,exact:false,message:i.minSize.message});n.dirty()}}if(i.maxSize!==null){if(r.data.size>i.maxSize.value){X(r,{code:V.too_big,maximum:i.maxSize.value,type:"set",inclusive:true,exact:false,message:i.maxSize.message});n.dirty()}}var a=this._def.valueType;function s(e){var t=new Set;for(var r=0,i=e;r<i.length;r++){var a=i[r];if(a.status==="aborted")return te;if(a.status==="dirty")n.dirty();t.add(a.value)}return{status:n.value,value:t}}var o=__spreadArray([],r.data.values(),true).map((function(e,t){return a._parse(new pe(r,e,r.path,t))}));if(r.common.async){return Promise.all(o).then((function(e){return s(e)}))}else{return s(o)}};t.prototype.min=function(e,n){return new t(__assign(__assign({},this._def),{minSize:{value:e,message:ce.toString(n)}}))};t.prototype.max=function(e,n){return new t(__assign(__assign({},this._def),{maxSize:{value:e,message:ce.toString(n)}}))};t.prototype.size=function(e,t){return this.min(e,t).max(e,t)};t.prototype.nonempty=function(e){return this.min(1,e)};return t}(me);at.create=function(e,t){return new at(__assign({valueType:e,minSize:null,maxSize:null,typeName:wt.ZodSet},ve(t)))};var st=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t.validate=t.implement;return t}t.prototype._parse=function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==U.function){X(t,{code:V.invalid_type,expected:U.function,received:t.parsedType});return te}function n(e,n){return Y({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,J(),q].filter((function(e){return!!e})),issueData:{code:V.invalid_arguments,argumentsError:n}})}function r(e,n){return Y({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,J(),q].filter((function(e){return!!e})),issueData:{code:V.invalid_return_type,returnTypeError:n}})}var i={errorMap:t.common.contextualErrorMap};var a=t.data;if(this._def.returns instanceof ft){var s=this;return re((function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return __awaiter(this,void 0,void 0,(function(){var t,o,u,l;return __generator(this,(function(c){switch(c.label){case 0:t=new W([]);return[4,s._def.args.parseAsync(e,i).catch((function(r){t.addIssue(n(e,r));throw t}))];case 1:o=c.sent();return[4,Reflect.apply(a,this,o)];case 2:u=c.sent();return[4,s._def.returns._def.type.parseAsync(u,i).catch((function(e){t.addIssue(r(u,e));throw t}))];case 3:l=c.sent();return[2,l]}}))}))}))}else{var o=this;return re((function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}var s=o._def.args.safeParse(e,i);if(!s.success){throw new W([n(e,s.error)])}var u=Reflect.apply(a,this,s.data);var l=o._def.returns.safeParse(u,i);if(!l.success){throw new W([r(u,l.error)])}return l.data}))}};t.prototype.parameters=function(){return this._def.args};t.prototype.returnType=function(){return this._def.returns};t.prototype.args=function(){var e=[];for(var n=0;n<arguments.length;n++){e[n]=arguments[n]}return new t(__assign(__assign({},this._def),{args:nt.create(e).rest(Fe.create())}))};t.prototype.returns=function(e){return new t(__assign(__assign({},this._def),{returns:e}))};t.prototype.implement=function(e){var t=this.parse(e);return t};t.prototype.strictImplement=function(e){var t=this.parse(e);return t};t.create=function(e,n,r){return new t(__assign({args:e?e:nt.create([]).rest(Fe.create()),returns:n||Fe.create(),typeName:wt.ZodFunction},ve(r)))};return t}(me);var ot=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}Object.defineProperty(t.prototype,"schema",{get:function(){return this._def.getter()},enumerable:false,configurable:true});t.prototype._parse=function(e){var t=this._processInputParams(e).ctx;var n=this._def.getter();return n._parse({data:t.data,path:t.path,parent:t})};return t}(me);ot.create=function(e,t){return new ot(__assign({getter:e,typeName:wt.ZodLazy},ve(t)))};var ut=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){if(e.data!==this._def.value){var t=this._getOrReturnCtx(e);X(t,{received:t.data,code:V.invalid_literal,expected:this._def.value});return te}return{status:"valid",value:e.data}};Object.defineProperty(t.prototype,"value",{get:function(){return this._def.value},enumerable:false,configurable:true});return t}(me);ut.create=function(e,t){return new ut(__assign({value:e,typeName:wt.ZodLiteral},ve(t)))};function lt(e,t){return new ct(__assign({values:e,typeName:wt.ZodEnum},ve(t)))}var ct=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;de.set(t,void 0);return t}t.prototype._parse=function(e){if(typeof e.data!=="string"){var t=this._getOrReturnCtx(e);var n=this._def.values;X(t,{expected:D.joinValues(n),received:t.parsedType,code:V.invalid_type});return te}if(!ue(this,de,"f")){le(this,de,new Set(this._def.values),"f")}if(!ue(this,de,"f").has(e.data)){var t=this._getOrReturnCtx(e);var n=this._def.values;X(t,{received:t.data,code:V.invalid_enum_value,options:n});return te}return re(e.data)};Object.defineProperty(t.prototype,"options",{get:function(){return this._def.values},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"enum",{get:function(){var e={};for(var t=0,n=this._def.values;t<n.length;t++){var r=n[t];e[r]=r}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"Values",{get:function(){var e={};for(var t=0,n=this._def.values;t<n.length;t++){var r=n[t];e[r]=r}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"Enum",{get:function(){var e={};for(var t=0,n=this._def.values;t<n.length;t++){var r=n[t];e[r]=r}return e},enumerable:false,configurable:true});t.prototype.extract=function(e,n){if(n===void 0){n=this._def}return t.create(e,__assign(__assign({},this._def),n))};t.prototype.exclude=function(e,n){if(n===void 0){n=this._def}return t.create(this.options.filter((function(t){return!e.includes(t)})),__assign(__assign({},this._def),n))};return t}(me);de=new WeakMap;ct.create=lt;var dt=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;fe.set(t,void 0);return t}t.prototype._parse=function(e){var t=D.getValidEnumValues(this._def.values);var n=this._getOrReturnCtx(e);if(n.parsedType!==U.string&&n.parsedType!==U.number){var r=D.objectValues(t);X(n,{expected:D.joinValues(r),received:n.parsedType,code:V.invalid_type});return te}if(!ue(this,fe,"f")){le(this,fe,new Set(D.getValidEnumValues(this._def.values)),"f")}if(!ue(this,fe,"f").has(e.data)){var r=D.objectValues(t);X(n,{received:n.data,code:V.invalid_enum_value,options:r});return te}return re(e.data)};Object.defineProperty(t.prototype,"enum",{get:function(){return this._def.values},enumerable:false,configurable:true});return t}(me);fe=new WeakMap;dt.create=function(e,t){return new dt(__assign({values:e,typeName:wt.ZodNativeEnum},ve(t)))};var ft=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.unwrap=function(){return this._def.type};t.prototype._parse=function(e){var t=this;var n=this._processInputParams(e).ctx;if(n.parsedType!==U.promise&&n.common.async===false){X(n,{code:V.invalid_type,expected:U.promise,received:n.parsedType});return te}var r=n.parsedType===U.promise?n.data:Promise.resolve(n.data);return re(r.then((function(e){return t._def.type.parseAsync(e,{path:n.path,errorMap:n.common.contextualErrorMap})})))};return t}(me);ft.create=function(e,t){return new ft(__assign({type:e,typeName:wt.ZodPromise},ve(t)))};var pt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.innerType=function(){return this._def.schema};t.prototype.sourceType=function(){return this._def.schema._def.typeName===wt.ZodEffects?this._def.schema.sourceType():this._def.schema};t.prototype._parse=function(e){var t=this;var n=this._processInputParams(e),r=n.status,i=n.ctx;var a=this._def.effect||null;var s={addIssue:function(e){X(i,e);if(e.fatal){r.abort()}else{r.dirty()}},get path(){return i.path}};s.addIssue=s.addIssue.bind(s);if(a.type==="preprocess"){var o=a.transform(i.data,s);if(i.common.async){return Promise.resolve(o).then((function(e){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:if(r.value==="aborted")return[2,te];return[4,this._def.schema._parseAsync({data:e,path:i.path,parent:i})];case 1:t=n.sent();if(t.status==="aborted")return[2,te];if(t.status==="dirty")return[2,ne(t.value)];if(r.value==="dirty")return[2,ne(t.value)];return[2,t]}}))}))}))}else{if(r.value==="aborted")return te;var u=this._def.schema._parseSync({data:o,path:i.path,parent:i});if(u.status==="aborted")return te;if(u.status==="dirty")return ne(u.value);if(r.value==="dirty")return ne(u.value);return u}}if(a.type==="refinement"){var l=function(e){var t=a.refinement(e,s);if(i.common.async){return Promise.resolve(t)}if(t instanceof Promise){throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.")}return e};if(i.common.async===false){var c=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(c.status==="aborted")return te;if(c.status==="dirty")r.dirty();l(c.value);return{status:r.value,value:c.value}}else{return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then((function(e){if(e.status==="aborted")return te;if(e.status==="dirty")r.dirty();return l(e.value).then((function(){return{status:r.value,value:e.value}}))}))}}if(a.type==="transform"){if(i.common.async===false){var d=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!se(d))return d;var u=a.transform(d.value,s);if(u instanceof Promise){throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.")}return{status:r.value,value:u}}else{return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then((function(e){if(!se(e))return e;return Promise.resolve(a.transform(e.value,s)).then((function(e){return{status:r.value,value:e}}))}))}}D.assertNever(a)};return t}(me);pt.create=function(e,t,n){return new pt(__assign({schema:e,typeName:wt.ZodEffects,effect:t},ve(n)))};pt.createWithPreprocess=function(e,t,n){return new pt(__assign({schema:t,effect:{type:"preprocess",transform:e},typeName:wt.ZodEffects},ve(n)))};var ht=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t===U.undefined){return re(undefined)}return this._def.innerType._parse(e)};t.prototype.unwrap=function(){return this._def.innerType};return t}(me);ht.create=function(e,t){return new ht(__assign({innerType:e,typeName:wt.ZodOptional},ve(t)))};var vt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t===U.null){return re(null)}return this._def.innerType._parse(e)};t.prototype.unwrap=function(){return this._def.innerType};return t}(me);vt.create=function(e,t){return new vt(__assign({innerType:e,typeName:wt.ZodNullable},ve(t)))};var mt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._processInputParams(e).ctx;var n=t.data;if(t.parsedType===U.undefined){n=this._def.defaultValue()}return this._def.innerType._parse({data:n,path:t.path,parent:t})};t.prototype.removeDefault=function(){return this._def.innerType};return t}(me);mt.create=function(e,t){return new mt(__assign({innerType:e,typeName:wt.ZodDefault,defaultValue:typeof t.default==="function"?t.default:function(){return t.default}},ve(t)))};var gt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this;var n=this._processInputParams(e).ctx;var r=__assign(__assign({},n),{common:__assign(__assign({},n.common),{issues:[]})});var i=this._def.innerType._parse({data:r.data,path:r.path,parent:__assign({},r)});if(oe(i)){return i.then((function(e){return{status:"valid",value:e.status==="valid"?e.value:t._def.catchValue({get error(){return new W(r.common.issues)},input:r.data})}}))}else{return{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new W(r.common.issues)},input:r.data})}}};t.prototype.removeCatch=function(){return this._def.innerType};return t}(me);gt.create=function(e,t){return new gt(__assign({innerType:e,typeName:wt.ZodCatch,catchValue:typeof t.catch==="function"?t.catch:function(){return t.catch}},ve(t)))};var _t=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t!==U.nan){var n=this._getOrReturnCtx(e);X(n,{code:V.invalid_type,expected:U.nan,received:n.parsedType});return te}return{status:"valid",value:e.data}};return t}(me);_t.create=function(e){return new _t(__assign({typeName:wt.ZodNaN},ve(e)))};var yt=Symbol("zod_brand");var bt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._processInputParams(e).ctx;var n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})};t.prototype.unwrap=function(){return this._def.type};return t}(me);var Tt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this;var n=this._processInputParams(e),r=n.status,i=n.ctx;if(i.common.async){var a=function(){return __awaiter(t,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,this._def.in._parseAsync({data:i.data,path:i.path,parent:i})];case 1:e=t.sent();if(e.status==="aborted")return[2,te];if(e.status==="dirty"){r.dirty();return[2,ne(e.value)]}else{return[2,this._def.out._parseAsync({data:e.value,path:i.path,parent:i})]}return[2]}}))}))};return a()}else{var s=this._def.in._parseSync({data:i.data,path:i.path,parent:i});if(s.status==="aborted")return te;if(s.status==="dirty"){r.dirty();return{status:"dirty",value:s.value}}else{return this._def.out._parseSync({data:s.value,path:i.path,parent:i})}}};t.create=function(e,n){return new t({in:e,out:n,typeName:wt.ZodPipeline})};return t}(me);var kt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._def.innerType._parse(e);var n=function(e){if(se(e)){e.value=Object.freeze(e.value)}return e};return oe(t)?t.then((function(e){return n(e)})):n(t)};t.prototype.unwrap=function(){return this._def.innerType};return t}(me);kt.create=function(e,t){return new kt(__assign({innerType:e,typeName:wt.ZodReadonly},ve(t)))};function xt(e,t,n){if(t===void 0){t={}}if(e)return Ve.create().superRefine((function(r,i){var a,s;if(!e(r)){var o=typeof t==="function"?t(r):typeof t==="string"?{message:t}:t;var u=(s=(a=o.fatal)!==null&&a!==void 0?a:n)!==null&&s!==void 0?s:true;var l=typeof o==="string"?{message:o}:o;i.addIssue(__assign(__assign({code:"custom"},l),{fatal:u}))}}));return Ve.create()}var Mt={object:Je.lazycreate};var wt;(function(e){e["ZodString"]="ZodString";e["ZodNumber"]="ZodNumber";e["ZodNaN"]="ZodNaN";e["ZodBigInt"]="ZodBigInt";e["ZodBoolean"]="ZodBoolean";e["ZodDate"]="ZodDate";e["ZodSymbol"]="ZodSymbol";e["ZodUndefined"]="ZodUndefined";e["ZodNull"]="ZodNull";e["ZodAny"]="ZodAny";e["ZodUnknown"]="ZodUnknown";e["ZodNever"]="ZodNever";e["ZodVoid"]="ZodVoid";e["ZodArray"]="ZodArray";e["ZodObject"]="ZodObject";e["ZodUnion"]="ZodUnion";e["ZodDiscriminatedUnion"]="ZodDiscriminatedUnion";e["ZodIntersection"]="ZodIntersection";e["ZodTuple"]="ZodTuple";e["ZodRecord"]="ZodRecord";e["ZodMap"]="ZodMap";e["ZodSet"]="ZodSet";e["ZodFunction"]="ZodFunction";e["ZodLazy"]="ZodLazy";e["ZodLiteral"]="ZodLiteral";e["ZodEnum"]="ZodEnum";e["ZodEffects"]="ZodEffects";e["ZodNativeEnum"]="ZodNativeEnum";e["ZodOptional"]="ZodOptional";e["ZodNullable"]="ZodNullable";e["ZodDefault"]="ZodDefault";e["ZodCatch"]="ZodCatch";e["ZodPromise"]="ZodPromise";e["ZodBranded"]="ZodBranded";e["ZodPipeline"]="ZodPipeline";e["ZodReadonly"]="ZodReadonly"})(wt||(wt={}));var Gt=function(e,t){if(t===void 0){t={message:"Input not instance of ".concat(e.name)}}return xt((function(t){return t instanceof e}),t)};var It=Ze.create;var St=ze.create;var Ct=_t.create;var At=Ke.create;var Pt=Re.create;var jt=De.create;var Ot=Le.create;var Et=Ue.create;var Zt=Be.create;var Nt=Ve.create;var zt=Fe.create;var Kt=We.create;var Rt=qe.create;var Dt=He.create;var Lt=Je.create;var Ut=Je.strictCreate;var Bt=Ye.create;var Vt=Xe.create;var Ft=tt.create;var Wt=nt.create;var qt=rt.create;var Ht=it.create;var $t=at.create;var Jt=st.create;var Yt=ot.create;var Qt=ut.create;var Xt=ct.create;var en=dt.create;var tn=ft.create;var nn=pt.create;var rn=ht.create;var an=vt.create;var sn=pt.createWithPreprocess;var on=Tt.create;var un=function(){return It().optional()};var ln=function(){return St().optional()};var cn=function(){return Pt().optional()};var dn={string:function(e){return Ze.create(__assign(__assign({},e),{coerce:true}))},number:function(e){return ze.create(__assign(__assign({},e),{coerce:true}))},boolean:function(e){return Re.create(__assign(__assign({},e),{coerce:true}))},bigint:function(e){return Ke.create(__assign(__assign({},e),{coerce:true}))},date:function(e){return De.create(__assign(__assign({},e),{coerce:true}))}};var fn=te;var pn=Object.freeze({__proto__:null,defaultErrorMap:q,setErrorMap:$,getErrorMap:J,makeIssue:Y,EMPTY_PATH:Q,addIssueToContext:X,ParseStatus:ee,INVALID:te,DIRTY:ne,OK:re,isAborted:ie,isDirty:ae,isValid:se,isAsync:oe,get util(){return D},get objectUtil(){return L},ZodParsedType:U,getParsedType:B,ZodType:me,datetimeRegex:Oe,ZodString:Ze,ZodNumber:ze,ZodBigInt:Ke,ZodBoolean:Re,ZodDate:De,ZodSymbol:Le,ZodUndefined:Ue,ZodNull:Be,ZodAny:Ve,ZodUnknown:Fe,ZodNever:We,ZodVoid:qe,ZodArray:He,ZodObject:Je,ZodUnion:Ye,ZodDiscriminatedUnion:Xe,ZodIntersection:tt,ZodTuple:nt,ZodRecord:rt,ZodMap:it,ZodSet:at,ZodFunction:st,ZodLazy:ot,ZodLiteral:ut,ZodEnum:ct,ZodNativeEnum:dt,ZodPromise:ft,ZodEffects:pt,ZodTransformer:pt,ZodOptional:ht,ZodNullable:vt,ZodDefault:mt,ZodCatch:gt,ZodNaN:_t,BRAND:yt,ZodBranded:bt,ZodPipeline:Tt,ZodReadonly:kt,custom:xt,Schema:me,ZodSchema:me,late:Mt,get ZodFirstPartyTypeKind(){return wt},coerce:dn,any:Nt,array:Dt,bigint:At,boolean:Pt,date:jt,discriminatedUnion:Vt,effect:nn,enum:Xt,function:Jt,instanceof:Gt,intersection:Ft,lazy:Yt,literal:Qt,map:Ht,nan:Ct,nativeEnum:en,never:Kt,null:Zt,nullable:an,number:St,object:Lt,oboolean:cn,onumber:ln,optional:rn,ostring:un,pipeline:on,preprocess:sn,promise:tn,record:qt,set:$t,strictObject:Ut,string:It,symbol:Ot,transformer:nn,tuple:Wt,undefined:Et,union:Bt,unknown:zt,void:Rt,NEVER:fn,ZodIssueCode:V,quotelessJson:F,ZodError:W});var hn=[["International Date Line West","GMT-11:00","(GMT-11:00) International Date Line West"],["Midway Island","GMT-11:00","(GMT-11:00) Midway Island"],["Samoa","GMT-11:00","(GMT-11:00) Samoa"],["Hawaii","GMT-10:00","(GMT-10:00) Hawaii"],["Alaska","GMT-09:00","(GMT-09:00) Alaska"],["Pacific Time (US & Canada)","GMT-08:00","(GMT-08:00) Pacific Time (US & Canada)"],["Tijuana","GMT-08:00","(GMT-08:00) Tijuana"],["Arizona","GMT-07:00","(GMT-07:00) Arizona"],["Chihuahua","GMT-07:00","(GMT-07:00) Chihuahua"],["Mazatlan","GMT-07:00","(GMT-07:00) Mazatlan"],["Mountain Time (US & Canada)","GMT-07:00","(GMT-07:00) Mountain Time (US & Canada)"],["Central America","GMT-06:00","(GMT-06:00) Central America"],["Central Time (US & Canada)","GMT-06:00","(GMT-06:00) Central Time (US & Canada)"],["Guadalajara","GMT-06:00","(GMT-06:00) Guadalajara"],["Mexico City","GMT-06:00","(GMT-06:00) Mexico City"],["Monterrey","GMT-06:00","(GMT-06:00) Monterrey"],["Saskatchewan","GMT-06:00","(GMT-06:00) Saskatchewan"],["Bogota","GMT-05:00","(GMT-05:00) Bogota"],["Eastern Time (US & Canada)","GMT-05:00","(GMT-05:00) Eastern Time (US & Canada)"],["Indiana (East)","GMT-05:00","(GMT-05:00) Indiana (East)"],["Lima","GMT-05:00","(GMT-05:00) Lima"],["Quito","GMT-05:00","(GMT-05:00) Quito"],["Caracas","GMT-04:30","(GMT-04:30) Caracas"],["Atlantic Time (Canada)","GMT-04:00","(GMT-04:00) Atlantic Time (Canada)"],["Georgetown","GMT-04:00","(GMT-04:00) Georgetown"],["La Paz","GMT-04:00","(GMT-04:00) La Paz"],["Santiago","GMT-04:00","(GMT-04:00) Santiago"],["Newfoundland","GMT-03:30","(GMT-03:30) Newfoundland"],["Brasilia","GMT-03:00","(GMT-03:00) Brasilia"],["Buenos Aires","GMT-03:00","(GMT-03:00) Buenos Aires"],["Greenland","GMT-03:00","(GMT-03:00) Greenland"],["Mid-Atlantic","GMT-02:00","(GMT-02:00) Mid-Atlantic"],["Azores","GMT-01:00","(GMT-01:00) Azores"],["Cape Verde Is.","GMT-01:00","(GMT-01:00) Cape Verde Is."],["Casablanca","GMT+00:00","(GMT+00:00) Casablanca"],["Dublin","GMT+00:00","(GMT+00:00) Dublin"],["Edinburgh","GMT+00:00","(GMT+00:00) Edinburgh"],["Lisbon","GMT+00:00","(GMT+00:00) Lisbon"],["London","GMT+00:00","(GMT+00:00) London"],["Monrovia","GMT+00:00","(GMT+00:00) Monrovia"],["UTC","GMT+00:00","(GMT+00:00) UTC"],["Amsterdam","GMT+01:00","(GMT+01:00) Amsterdam"],["Belgrade","GMT+01:00","(GMT+01:00) Belgrade"],["Berlin","GMT+01:00","(GMT+01:00) Berlin"],["Bern","GMT+01:00","(GMT+01:00) Bern"],["Bratislava","GMT+01:00","(GMT+01:00) Bratislava"],["Brussels","GMT+01:00","(GMT+01:00) Brussels"],["Budapest","GMT+01:00","(GMT+01:00) Budapest"],["Copenhagen","GMT+01:00","(GMT+01:00) Copenhagen"],["Ljubljana","GMT+01:00","(GMT+01:00) Ljubljana"],["Madrid","GMT+01:00","(GMT+01:00) Madrid"],["Paris","GMT+01:00","(GMT+01:00) Paris"],["Prague","GMT+01:00","(GMT+01:00) Prague"],["Rome","GMT+01:00","(GMT+01:00) Rome"],["Sarajevo","GMT+01:00","(GMT+01:00) Sarajevo"],["Skopje","GMT+01:00","(GMT+01:00) Skopje"],["Stockholm","GMT+01:00","(GMT+01:00) Stockholm"],["Vienna","GMT+01:00","(GMT+01:00) Vienna"],["Warsaw","GMT+01:00","(GMT+01:00) Warsaw"],["West Central Africa","(GMT+01:00","(GMT+01:00) West Central Africa"],["Zagreb","GMT+01:00","(GMT+01:00) Zagreb"],["Athens","GMT+02:00","(GMT+02:00) Athens"],["Bucharest","GMT+02:00","(GMT+02:00) Bucharest"],["Cairo","GMT+02:00","(GMT+02:00) Cairo"],["Harare","GMT+02:00","(GMT+02:00) Harare"],["Helsinki","GMT+02:00","(GMT+02:00) Helsinki"],["Istanbul","GMT+02:00","(GMT+02:00) Istanbul"],["Jerusalem","GMT+02:00","(GMT+02:00) Jerusalem"],["Kyiv","GMT+02:00","(GMT+02:00) Kyiv"],["Minsk","GMT+02:00","(GMT+02:00) Minsk"],["Pretoria","GMT+02:00","(GMT+02:00) Pretoria"],["Riga","GMT+02:00","(GMT+02:00) Riga"],["Sofia","GMT+02:00","(GMT+02:00) Sofia"],["Tallinn","GMT+02:00","(GMT+02:00) Tallinn"],["Vilnius","GMT+02:00","(GMT+02:00) Vilnius"],["Baghdad","GMT+03:00","(GMT+03:00) Baghdad"],["Kuwait","GMT+03:00","(GMT+03:00) Kuwait"],["Moscow","GMT+03:00","(GMT+03:00) Moscow"],["Nairobi","GMT+03:00","(GMT+03:00) Nairobi"],["Riyadh","GMT+03:00","(GMT+03:00) Riyadh"],["St. Petersburg","GMT+03:00","(GMT+03:00) St. Petersburg"],["Volgograd","GMT+03:00","(GMT+03:00) Volgograd"],["Tehran","GMT+03:30","(GMT+03:30) Tehran"],["Abu Dhabi","GMT+04:00","(GMT+04:00) Abu Dhabi"],["Baku","GMT+04:00","(GMT+04:00) Baku"],["Muscat","GMT+04:00","(GMT+04:00) Muscat"],["Tbilisi","GMT+04:00","(GMT+04:00) Tbilisi"],["Yerevan","GMT+04:00","(GMT+04:00) Yerevan"],["Kabul","GMT+04:30","(GMT+04:30) Kabul"],["Ekaterinburg","GMT+05:00","(GMT+05:00) Ekaterinburg"],["Islamabad","GMT+05:00","(GMT+05:00) Islamabad"],["Karachi","GMT+05:00","(GMT+05:00) Karachi"],["Tashkent","GMT+05:00","(GMT+05:00) Tashkent"],["Chennai","GMT+05:30","(GMT+05:30) Chennai"],["Kolkata","GMT+05:30","(GMT+05:30) Kolkata"],["Mumbai","GMT+05:30","(GMT+05:30) Mumbai"],["New Delhi","GMT+05:30","(GMT+05:30) New Delhi"],["Sri Jayawardenepura","GMT+05:30","(GMT+05:30) Sri Jayawardenepura"],["Kathmandu","GMT+05:45","(GMT+05:45) Kathmandu"],["Almaty","GMT+06:00","(GMT+06:00) Almaty"],["Astana","GMT+06:00","(GMT+06:00) Astana"],["Dhaka","GMT+06:00","(GMT+06:00) Dhaka"],["Novosibirsk","GMT+06:00","(GMT+06:00) Novosibirsk"],["Rangoon","GMT+06:30","(GMT+06:30) Rangoon"],["Bangkok","GMT+07:00","(GMT+07:00) Bangkok"],["Hanoi","GMT+07:00","(GMT+07:00) Hanoi"],["Jakarta","GMT+07:00","(GMT+07:00) Jakarta"],["Krasnoyarsk","GMT+07:00","(GMT+07:00) Krasnoyarsk"],["Beijing","GMT+08:00","(GMT+08:00) Beijing"],["Chongqing","GMT+08:00","(GMT+08:00) Chongqing"],["Hong Kong","GMT+08:00","(GMT+08:00) Hong Kong"],["Irkutsk","GMT+08:00","(GMT+08:00) Irkutsk"],["Kuala Lumpur","GMT+08:00","(GMT+08:00) Kuala Lumpur"],["Perth","GMT+08:00","(GMT+08:00) Perth"],["Singapore","GMT+08:00","(GMT+08:00) Singapore"],["Taipei","GMT+08:00","(GMT+08:00) Taipei"],["Ulaan Bataar","GMT+08:00","(GMT+08:00) Ulaan Bataar"],["Urumqi","GMT+08:00","(GMT+08:00) Urumqi"],["Osaka","GMT+09:00","(GMT+09:00) Osaka"],["Sapporo","GMT+09:00","(GMT+09:00) Sapporo"],["Seoul","GMT+09:00","(GMT+09:00) Seoul"],["Tokyo","GMT+09:00","(GMT+09:00) Tokyo"],["Yakutsk","GMT+09:00","(GMT+09:00) Yakutsk"],["Adelaide","GMT+09:30","(GMT+09:30) Adelaide"],["Darwin","GMT+09:30","(GMT+09:30) Darwin"],["Brisbane","GMT+10:00","(GMT+10:00) Brisbane"],["Canberra","GMT+10:00","(GMT+10:00) Canberra"],["Guam","GMT+10:00","(GMT+10:00) Guam"],["Hobart","GMT+10:00","(GMT+10:00) Hobart"],["Melbourne","GMT+10:00","(GMT+10:00) Melbourne"],["Port Moresby","GMT+10:00","(GMT+10:00) Port Moresby"],["Sydney","GMT+10:00","(GMT+10:00) Sydney"],["Vladivostok","GMT+10:00","(GMT+10:00) Vladivostok"],["Kamchatka","GMT+11:00","(GMT+11:00) Kamchatka"],["Magadan","GMT+11:00","(GMT+11:00) Magadan"],["New Caledonia","GMT+11:00","(GMT+11:00) New Caledonia"],["Solomon Is.","GMT+11:00","(GMT+11:00) Solomon Is."],["Auckland","GMT+12:00","(GMT+12:00) Auckland"],["Fiji","GMT+12:00","(GMT+12:00) Fiji"],["Marshall Is.","GMT+12:00","(GMT+12:00) Marshall Is."],["Wellington","GMT+12:00","(GMT+12:00) Wellington"],["Nuku'alofa","GMT+13:00","(GMT+13:00) Nuku'alofa"]];var vn='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-settings-organization{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}verdocs-settings-organization .columns{gap:20px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row}verdocs-settings-organization .column{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-settings-organization verdocs-text-input{margin:10px 0}verdocs-settings-organization verdocs-text-input input{height:32px}@media screen and (max-width: 600px){verdocs-settings-organization .columns{gap:0;-ms-flex-direction:column;flex-direction:column}}';var mn=hn.map((function(e){return{value:e[2],label:e[2]}}));var gn=pn.object({business_name:pn.string().trim().max(30).optional(),contact_email:pn.string().trim().email("Invalid email").optional().or(pn.literal("")),phone:pn.preprocess((function(e){return v(String(e).trim())}),pn.string().optional()),timezone:pn.string().trim().optional(),url:pn.string().trim().optional()});var _n=e("verdocs_settings_organization",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.organizationUpdated=n(this,"organizationUpdated",7);this.endpoint=a.getDefault();this.valid=false;this.dirty=false;this.submitting=false;this.name="";this.business_name="";this.contact_email="";this.phone="";this.address="";this.address2="";this.timezone="";this.url=""}e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,G(this.endpoint,this.endpoint.session.organization_id)];case 1:e=t.sent();console.log("[SETTINGS] Loaded organization",e);this.resetForm(e);return[2]}}))}))};e.prototype.resetForm=function(e){this.name=e.name;this.business_name=e.business_name;this.contact_email=e.contact_email;this.phone=e.phone;this.address=e.address;this.address2=e.address2;this.timezone=e.timezone;this.url=e.url;this.dirty=false;this.valid=true};e.prototype.handleSubmit=function(e){var t=this;e.preventDefault();e.stopPropagation();I(a.getDefault(),this.endpoint.session.organization_id,{name:this.name,business_name:this.business_name,contact_email:this.contact_email,phone:this.phone,address:this.address,address2:this.address2,timezone:this.timezone,url:this.url}).then((function(e){var n;console.log("[SETTINGS] Update result",e);(n=t.organizationUpdated)===null||n===void 0?void 0:n.emit({endpoint:t.endpoint,organization:e});t.resetForm(e)})).catch((function(e){return l("Error updating organization: ".concat(e.message),{style:"error"})}))};e.prototype.processFields=function(){var e=gn.safeParse({name:this.name,business_name:this.business_name,contact_email:this.contact_email,phone:this.phone,address:this.address,address2:this.address2,timezone:this.timezone,url:this.url});console.log("[SETTINGS] Validation result",e);this.valid=e.success;this.dirty=true};e.prototype.render=function(){var e=this;if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return r(i,{class:"authentication-required"},"Must be authenticated")}return r(i,null,r("h1",null,"Organization Profile"),r("form",{onSubmit:function(t){return e.handleSubmit(t)}},r("div",{class:"columns"},r("div",{class:"column"},r("verdocs-text-input",{id:"verdocs-organization-name",value:this.name,autocomplete:"off",label:"Name",required:false,disabled:false,placeholder:"Enter your organization's name...",onInput:function(t){return e.name=t.target.value},onFocusout:function(t){e.name=t.target.value.trim();e.processFields()}}),r("verdocs-text-input",{id:"verdocs-organization-business-name",value:this.business_name,autocomplete:"off",label:"Display Name",placeholder:"The name to display on communications...",onInput:function(t){return e.business_name=t.target.value},onFocusout:function(t){e.business_name=t.target.value.trim();e.processFields()}}),r("verdocs-text-input",{id:"verdocs-organization-url",value:this.url,autocomplete:"off",label:"Web URL",placeholder:"Enter your Web URL...",onInput:function(t){return e.url=t.target.value},onFocusout:function(t){e.url=t.target.value.trim();e.processFields()}}),r("verdocs-text-input",{id:"verdocs-organization-phone",value:this.phone,autocomplete:"off",label:"Phone Number",placeholder:"Enter your phone number...",onInput:function(t){return e.phone=t.target.value},onFocusout:function(t){e.phone=t.target.value.trim();e.processFields()}})),r("div",{class:"column"},r("verdocs-text-input",{id:"verdocs-organization-email",value:this.contact_email,clearable:true,autocomplete:"off",label:"Contact Email",placeholder:"Enter your contact email address...",onInput:function(t){return e.contact_email=t.target.value},onFocusout:function(t){e.contact_email=t.target.value.trim();e.processFields()}}),r("verdocs-select-input",{options:mn,value:this.timezone,label:"Time Zone"}))),r("verdocs-button",{type:"submit",label:"Save",size:"normal",disabled:this.submitting||!this.dirty})))};return e}());_n.style=vn;var yn='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-settings-profile{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}verdocs-settings-profile .columns{gap:20px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row}verdocs-settings-profile .column{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-settings-profile verdocs-text-input{margin:10px 0}verdocs-settings-profile verdocs-text-input input{height:32px}@media screen and (max-width: 600px){verdocs-settings-profile .columns{gap:0;-ms-flex-direction:column;flex-direction:column}}';var bn=pn.object({first_name:pn.string().trim().min(1,"First name is required").max(30),last_name:pn.string().trim().min(1,"Last name is required").max(30),email:pn.string().trim().email("Invalid email").min(1,"Email is required"),phone:pn.preprocess((function(e){return v(String(e).trim())}),pn.string())});var Tn=e("verdocs_settings_profile",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.profileUpdated=n(this,"profileUpdated",7);this.endpoint=a.getDefault();this.valid=false;this.dirty=false;this.submitting=false;this.first_name="";this.last_name="";this.email="";this.phone=""}e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,f(this.endpoint)];case 1:e=t.sent();console.log("[SETTINGS] Loaded profile",e);this.resetForm(e);return[2]}}))}))};e.prototype.resetForm=function(e){this.first_name=e.first_name;this.last_name=e.last_name;this.email=e.email;this.phone=e.phone;this.dirty=false;this.valid=true};e.prototype.handleSubmit=function(e){var t=this;e.preventDefault();e.stopPropagation();p(a.getDefault(),this.endpoint.session.profile_id,{first_name:this.first_name,last_name:this.last_name,phone:this.phone}).then((function(e){var n;console.log("[SETTINGS] Update result",e);(n=t.profileUpdated)===null||n===void 0?void 0:n.emit({endpoint:t.endpoint,profile:e});t.resetForm(e)})).catch((function(e){return l("Error updating profile: ".concat(e.message),{style:"error"})}))};e.prototype.processFields=function(){var e=bn.safeParse({first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone});console.log("[SETTINGS] Validation result",e);this.valid=e.success;this.dirty=true};e.prototype.render=function(){var e=this;if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return r(i,{class:"authentication-required"},"Must be authenticated")}return r(i,null,r("h1",null,"My Profile"),r("form",{onSubmit:function(t){return e.handleSubmit(t)}},r("div",{class:"columns"},r("div",{class:"column"},r("verdocs-text-input",{id:"verdocs-profile-first-name",value:this.first_name,autocomplete:"off",label:"First Name",required:true,placeholder:"Enter your first name...",onInput:function(t){return e.first_name=t.target.value},onFocusout:function(t){e.first_name=t.target.value.trim();e.processFields()}}),r("verdocs-text-input",{id:"verdocs-profile-last-name",value:this.last_name,autocomplete:"off",label:"Last Name",required:true,placeholder:"Enter your last name...",onInput:function(t){return e.last_name=t.target.value},onFocusout:function(t){e.last_name=t.target.value.trim();e.processFields()}})),r("div",{class:"column"},r("verdocs-text-input",{id:"verdocs-profile-email",value:this.email,autocomplete:"off",label:"Email Address",required:true,disabled:true,placeholder:"Enter your email address...",onInput:function(t){return e.email=t.target.value},onFocusout:function(t){e.email=t.target.value.trim();e.processFields()}}),r("verdocs-text-input",{id:"verdocs-profile-phone",value:this.phone,clearable:true,autocomplete:"off",label:"Phone Number",placeholder:"Enter your phone number...",onInput:function(t){return e.phone=t.target.value},onFocusout:function(t){e.phone=t.target.value.trim();e.processFields()}}))),r("verdocs-button",{type:"submit",label:"Save",size:"normal",disabled:this.submitting||!this.dirty})))};return e}());Tn.style=yn}}}));